HTC M9 Roundup: Availability and Prices

The post HTC M9 Roundup: Availability and Prices appeared first on xda-developers. … more

OnePlus Late March AMAA Roundup

The post OnePlus Late March AMAA Roundup appeared first on xda-developers. … more

Galaxy S6 Pricing & Availability Roundup

The post Galaxy S6 Pricing & Availability Roundup appeared first on xda-developers. … more

Are You Excited for USB Type-C on Smartphones?

The post Are You Excited for USB Type-C on Smartphones? appeared first on xda-developers. … 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
 
21 posts
Join Date:Joined: Jan 2014
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
 
396 posts
Join Date:Joined: Sep 2013
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
 
123 posts
Join Date:Joined: Dec 2010
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
 
21 posts
Join Date:Joined: Jan 2014
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: 152
 
412 posts
Join Date:Joined: Oct 2013
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,442
 
9,288 posts
Join Date:Joined: Jul 2010
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,146
 
5,102 posts
Join Date:Joined: Jan 2014
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
 
21 posts
Join Date:Joined: Jan 2014
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,146
 
5,102 posts
Join Date:Joined: Jan 2014
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
 
1,411 posts
Join Date:Joined: Jun 2012
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:	276
Size:	46.2 KB
ID:	3107949   Click image for larger version

Name:	1420894071667.jpg
Views:	286
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