Android OS Forum banner

1 - 12 of 12 Posts

·
Developer
Joined
·
24 Posts
Hey guys, I've patched android.policy.jar to add more options to the power menu.

* power off
* hibernate
* 4-in-1 reboot menu (normal, hot reboot, bootloader, recovery)
* silent mode toggle
* vibration mode toggle
* airplane mode toggle
* mobile network toggle

This is not a flashable zip, it is the patched GlobalActions*.smali files required to make this work. All the strings should be correct, but I haven't been able to test yet. Sorry for not posting a complete jar, I added this to my framework and realized it was not stock (had extra mods that may cause instability). I'll post up a stock flashable zip when I get the chance, but until then, let your favorite dev know to add this to their roms


You are free to use, modify, redistribute, etc. as you see fit. All I ask is to share any fixes added.

Thanks to LeeDroid for help with the code.
Thanks to snq- for the original code.

http://dev-host.org/b69g6n1so6p7/apm_files.zip

OLD VERSION (4.06.xxx.x):
http://www.multiupload.com/ICO9VMJGEF
 

·
Developer
Joined
·
24 Posts
Discussion Starter · #3 ·
"fakiesk8r333 said:
any way you could do this for the droid x?
I have no idea, send me your rom's android.policy.jar from /system/framework and ill take a look. I have a feeling its completely different, so no promises ;)
 

·
Developer
Joined
·
24 Posts
Discussion Starter · #5 ·
"fakiesk8r333 said:
here you go. thanks for the time, i tried but had no idea where to even start lol

http://dl.dropbox.com/u/9609070/android.policy.jar
No problem man. In HTC roms (which is all I've known lol), its in the GlobalActions*.smali files. I'll take a look :)

Oh, almost forgot, I need your framework-res.apk and any other apk in the framework folder, as well as the SystemUI.apk (if its gingerbread), in case I need to add/reference resources.
 

·
Developer
Joined
·
24 Posts
Discussion Starter · #10 ·
In miui, isn't there toggle in the notifications? Should have a reboot option iirc. Haven't used miui in ages.

No luck porting it over, far too different, and many htc-specific features/classes.
 

·
Developer
Joined
·
24 Posts
Discussion Starter · #12 ·
Mkay, uploaded the files to make it possible to add this to any 4.08.xxx.x based rom.

If you want to do this yourself, you'll need apktool, android.policy.jar, and the patched files in the OP. The procedure:

Code:
apktool d android.policy.jar
Navigate to android.policy.jar.out/smali/com/android/internal/policy/impl, and drop the GlobalActions*.smali files into the directory, replace/overwrite if prompted. Recompile:

Code:
apktool b android.policy.jar.out
Open the original android policy.jar with an archive viewer, as well as the one located in android.policy.jar.out/dist. Drag/copy the META-INF folder from the original to the new version you just compiled (ABSOLUTELY NECESSARY!).

Drop it in your favorite rom and flash, or drop it in the old zip in the OP and flash as usual.
 
1 - 12 of 12 Posts
Top