[FX-MOD][SENSE] Reboot option in power menu 4-in-1 (UPD)

Search This thread

snq-

Retired Recognized Developer
Aug 13, 2010
581
852
this is an updated* version of my framework mod that adds reboot (normal, hboot, recovery) option to the power-button menu on htc sense based desire roms

*: a new option ('hot restart') has been added that will allow you to respawn android's system server process, thereby starting with a "clean system" w/o actually rebooting the device (credits to xda member appelflap for the idea, you can have a look at his app 'hot reboot' here. i took a slightly different approach to killing the process but the basics remain the same)


enjoy


requirements:
  • htc sense based desire (froyo) rom (HD VERSION HERE)
  • deodexed framework libs
  • busybox with pkill support (or any other pkill implementation, accessible in $path)

how to install:
  • please make sure your device/setup meets the requirements above
  • check your framework build number (settings >> about phone >> software information >> build number)
  • download the archive that matches your build number
  • copy it to your sdcard and flash it in recovery mode (as always, it is advisable to do a nandroid backup prior flashing)

impact:
  • a framework lib (/system/framework/android.policy.jar) will be overwritten
  • the first boot after flashing this may take a (long) while (dexopt will be busy)


--


--
sense_powermenu_rebootdlg-4in1_2.09.405.8.zip
sense_powermenu_rebootdlg-4in1_2.10.405.2.zip
sense_powermenu_rebootdlg-4in1_2.12.911.1.zip
sense_powermenu_rebootdlg-4in1_2.13.707.1.zip
sense_powermenu_rebootdlg-4in1_2.14.207.1.zip

[Mod Edit]
Sense powermenu-4u1-v2.29.zip Submitted by PrinzEisenherz1
 
Last edited by a moderator:

snq-

Retired Recognized Developer
Aug 13, 2010
581
852
source code, porting to other htc devices:

due to the nature of the hack (patching a htc-modified, closed source framework lib) there is no "source code" for it
obviously, i also can't provide a smali patch applicable for any framework version / htc device
for reference, i've attached the smali patch for my own device/setup
it doesn't take a great deal to understand it, porting should be relatively straightforward. you should also take into account that string/icon resource ids may vary between different framework versions, and that some versions don't support com.android.internal.app.ShutdownThread.reboot()

sense_powermenu_rebootdlg-4in1_bravofx2.x.patch.7z


hd version:
here
 
Last edited:

snq-

Retired Recognized Developer
Aug 13, 2010
581
852
Is it a way of adding this mod to non sense roms like Cyanogen has ?

cyanogenmod is an opensource project, there is no need for hacks like this (dalvik bytecode injected into a closed source lib) to implement missing features
 
Last edited:

mike1986.

Senior Member
yes. just make sure you add the version matching to your framework build number



main menu entry, dialog header, buttons are localized, radio items aren't:


Ok, thanks. Just to make sure - not whole deodexed is required, just android.policy.odex, right? Is it possible to edit this jar file and change the language of "Normal" etc... and here footprint is also required as in 3in1?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    this is an updated* version of my framework mod that adds reboot (normal, hboot, recovery) option to the power-button menu on htc sense based desire roms

    *: a new option ('hot restart') has been added that will allow you to respawn android's system server process, thereby starting with a "clean system" w/o actually rebooting the device (credits to xda member appelflap for the idea, you can have a look at his app 'hot reboot' here. i took a slightly different approach to killing the process but the basics remain the same)


    enjoy


    requirements:
    • htc sense based desire (froyo) rom (HD VERSION HERE)
    • deodexed framework libs
    • busybox with pkill support (or any other pkill implementation, accessible in $path)

    how to install:
    • please make sure your device/setup meets the requirements above
    • check your framework build number (settings >> about phone >> software information >> build number)
    • download the archive that matches your build number
    • copy it to your sdcard and flash it in recovery mode (as always, it is advisable to do a nandroid backup prior flashing)

    impact:
    • a framework lib (/system/framework/android.policy.jar) will be overwritten
    • the first boot after flashing this may take a (long) while (dexopt will be busy)


    --


    --
    sense_powermenu_rebootdlg-4in1_2.09.405.8.zip
    sense_powermenu_rebootdlg-4in1_2.10.405.2.zip
    sense_powermenu_rebootdlg-4in1_2.12.911.1.zip
    sense_powermenu_rebootdlg-4in1_2.13.707.1.zip
    sense_powermenu_rebootdlg-4in1_2.14.207.1.zip

    [Mod Edit]
    Sense powermenu-4u1-v2.29.zip Submitted by PrinzEisenherz1
    1
    Can you tell me which specific smali need to be modified?

    as the smali patch in the second post shows:
    mod: GlobalActions.smali
    mod: GlobalActions$SinglePressAction.smali
    add: GlobalActions$X.smali
    add: GlobalActions$X$1.smali
    add: GlobalActions$X$2.smali
    where X is a number not already taken by other delegates

    resource identifiers will certainly be different than in my version, they'll need to be updated too

    Can you recompile this jar with the mods?

    this is not the right one
    the following ones are necessary: android.policy.jar (only this one will be modified), com.htc.framework.jar, com.htc.resources.apk, framework-res.apk

    i can't promise that i'll do it rsn, looking up resource ids is a rather boring job ;)
    1
    I'd like this on my wife....:D
    .
    .
    .
    I mean i'd like this on my wifes Legend...

    I don't have the skills to do the mod myself, so if anyone who could hook me up....
    that would be great!

    android.policy.jar

    Try this... Button text might wrong since hex ids are most likely different.

    android.policy.jar
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone