FORUMS

XDA Recap: This Week In Android (May 17 – 23)

Another week, another recap. The Sunday tradition marches on this week with a fresh … more

Huawei To Sell Honor Smartphones Via Indian Retail Outlets

World’s fourth largest smartphone maker Huawei plans to now sell its … more

Sunday Debate: Are Smaller Bezels Better or Worth It?

Bezels have been getting smaller and smaller as the years go by, and while devices … more

LG G4 First Impressions and Unboxing – XDA TV

The latest in LG’s signature line of “G phones” has been released. … more
Post Reply Subscribe to Thread Email Thread

[Q] Is there a way to add more reboot options to power menu? (Lollipop)

2nd January 2015, 06:03 AM |#1  
OP Junior Member
Thanks Meter: 0
 
More
Title^^
?

I have only power which is the stock option but is there a way to add more? like reboot and recovery
 
 
2nd January 2015, 06:19 AM |#2  
rajneeshk's Avatar
Senior Member
Flag gurgaon
Thanks Meter: 174
 
Donate to Me
More
Quote:
Originally Posted by AppEx213

Title^^
?

I have only power which is the stock option but is there a way to add more? like reboot and recovery

You have to root your phone for that. Check if Xposed support included for Android 5, if yes you can do that with Xposed
2nd January 2015, 07:15 AM |#3  
hr_kaleu's Avatar
Senior Member
Thanks Meter: 24
 
More
Quote:
Originally Posted by rajneeshk

You have to root your phone for that. Check if Xposed support included for Android 5, if yes you can do that with Xposed

Xposed does not run on Android 5 (ART runtime), xposed only runs on DALVIK


For the reboot options I'm fine with Simple Reboot by Francisco Franco - https://play.google.com/store/apps/d...boot.com&hl=de


Cheers
2nd January 2015, 08:36 AM |#4  
OP Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by hr_kaleu

Xposed does not run on Android 5 (ART runtime), xposed only runs on DALVIK


For the reboot options I'm fine with Simple Reboot by Francisco Franco - https://play.google.com/store/apps/d...boot.com&hl=de


Cheers

Simple reboot is fine, but its still an app. I wanted something that is on the power menu.
Is there nothing you can do to the framework apk or system ui?
2nd January 2015, 08:49 AM |#5  
BirchBarlow's Avatar
Senior Member
Flag Philadelphia
Thanks Meter: 156
 
More
Quote:
Originally Posted by rajneeshk

You have to root your phone for that. Check if Xposed support included for Android 5, if yes you can do that with Xposed

Everyone and their mother knows that Xposed is incompatible with Lollipop.

Quote:
Originally Posted by AppEx213

Simple reboot is fine, but its still an app. I wanted something that is on the power menu.
Is there nothing you can do to the framework apk or system ui?

You can flash a custom ROM with that option i.e. Cataclysm.
2nd January 2015, 09:47 AM |#6  
gee2012's Avatar
Recognized Contributor
Flag Heerlen
Thanks Meter: 3,593
 
More
Quote:
Originally Posted by AppEx213

Title^^
?

I have only power which is the stock option but is there a way to add more? like reboot and recovery

Not on the stock framework (if you are rooted) atm as Xposed doesn`t support ART yet and maybe never will.
2nd January 2015, 09:55 AM |#7  
Elluel's Avatar
Recognized Contributor
Flag えうれる
Thanks Meter: 3,197
 
More
Pure AOSP and stock do not have the functionality to add more reboot options.
Without modifying anything else, the only thing you can add is a shortcut to settings, airplane mode, and the silent/vibrate/sound-thing.

frameworks_base/core/res/res/values/config.xml
Code:
    <!-- Defines the default set of global actions. Actions may still be disabled or hidden based
         on the current state of the device.
         Each item must be one of the following strings:
         "power" = Power off
         "settings" = An action to launch settings
         "airplane" = Airplane mode toggle
         "bugreport" = Take bug report, if available
         "silent" = silent mode
         "users" = list of users
         -->
    <string-array translatable="false" name="config_globalActionsList">
        <item>power</item>
        <item>bugreport</item>
        <item>users</item>
    </string-array>
2nd January 2015, 10:17 AM |#8  
OP Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by Lethargy

Pure AOSP and stock do not have the functionality to add more reboot options.
Without modifying anything else, the only thing you can add is a shortcut to settings, airplane mode, and the silent/vibrate/sound-thing.

frameworks_base/core/res/res/values/config.xml

Code:
    <!-- Defines the default set of global actions. Actions may still be disabled or hidden based
         on the current state of the device.
         Each item must be one of the following strings:
         "power" = Power off
         "settings" = An action to launch settings
         "airplane" = Airplane mode toggle
         "bugreport" = Take bug report, if available
         "silent" = silent mode
         "users" = list of users
         -->
    <string-array translatable="false" name="config_globalActionsList">
        <item>power</item>
        <item>bugreport</item>
        <item>users</item>
    </string-array>

So I decompile framework-res.apk go to values and edit config.xml, search for silent and change false to true?
2nd January 2015, 10:24 AM |#9  
Elluel's Avatar
Recognized Contributor
Flag えうれる
Thanks Meter: 3,197
 
More
Quote:
Originally Posted by AppEx213

So I decompile framework-res.apk go to values and edit config.xml, search for silent and change false to true?

This part is commented out (isn't included when built/compiled, used in source to usually provide info) and won't appear when you decompile it:
Code:
    <!-- Defines the default set of global actions. Actions may still be disabled or hidden based
         on the current state of the device.
         Each item must be one of the following strings:
         "power" = Power off
         "settings" = An action to launch settings
         "airplane" = Airplane mode toggle
         "bugreport" = Take bug report, if available
         "silent" = silent mode
         "users" = list of users
         -->
It tells you the possible options you can use in the power menu array

See this part, which is the actual array:
Code:
    <string-array translatable="false" name="config_globalActionsList">
        <item>power</item>
        <item>bugreport</item>
        <item>users</item>
    </string-array>
Bug report is shown only if you enable it in Settings > Developer Options and User selector is only shown if you have multiple users.

"silent" isn't in the array (config_globalActionsList), but its a possible option as stated by the comment in source code, so you can add:
Code:
        <item>silent</item>
into the array where you want it to be, and it'll show up in the power menu. You can also add settings and airplane mode as stated by the comment.



Adding additional possible entries (like reboot) requires modifying other source code, which you'll have to compile AOSP to do anyways which defeats the purpose of specifically modifying stock, except maybe in a case like Cataclysm ROM by atl4ntis. Or edit smali.
Last edited by Elluel; 11th January 2015 at 06:20 AM.
The Following User Says Thank You to Elluel For This Useful Post: [ View ]
10th January 2015, 12:47 PM |#10  
howard bamber's Avatar
Senior Member
Southport
Thanks Meter: 193
 
More
That icon on the right with the white circular arrow saves all that, if you put it in the dock is a very good substitute. Plus it's a wide choice...
I know it's not baking something into the OS but those after a quick, useful workaround it's a winner
Attached Thumbnails
Click image for larger version

Name:	1420894059695.jpg
Views:	320
Size:	46.2 KB
ID:	3107949   Click image for larger version

Name:	1420894071667.jpg
Views:	336
Size:	105.6 KB
ID:	3107950  
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes