[DEV HELP] PowerMenu

C

Cricco

Guest
Hi everybody!
I have a problem with PowerMenu.
I decompiled, edited and recompiled framework.res.apk without errors.
I decompiled android.policy, edited and recompiled, i replace original framework.res.apk and android.policy.jar from my ROM with edited files but when i reboot my phone after the flashing my phone stay to LG word... :(
 

mastershefis

Senior Member
Mar 16, 2011
756
920
0
Amsterdam
Hi everybody!
I have a problem with PowerMenu.
I decompiled, edited and recompiled framework.res.apk without errors.
I decompiled android.policy, edited and recompiled, i replace original framework.res.apk and android.policy.jar from my ROM with edited files but when i reboot my phone after the flashing my phone stay to LG word... :(
Try logcat to determinate your problem why you stay in bootloop..
 

thachtunganh

Senior Member
Mar 19, 2011
1,695
1,901
0
Hà Nội - Hanoi
Hi everybody!
I have a problem with PowerMenu.
I decompiled, edited and recompiled framework.res.apk without errors.
I decompiled android.policy, edited and recompiled, i replace original framework.res.apk and android.policy.jar from my ROM with edited files but when i reboot my phone after the flashing my phone stay to LG word... :(
I'm having this problem too... i created power menu by following Paolo's Guide... and put framework-res.apk , android.policy.jar and set them permission. Then and i reboot , it was booted up , but when i press power button to launch the power menu , it freezed for a while and then it reboot my phone..


Sent from my LG-P500 using XDA App
 
C

Cricco

Guest
Oh my god, then...
This is a logcat but i don't know what is the problem

E/AudioHardwareMSM72XX( 3255): [LGE] output devices :2
E/AudioHardwareMSM72XX( 3255): Routing audio to Speakerphone
E/AudioHardwareMSM72XX( 3255): [doRouting]new_snd_device=0,mCurSndDevice=-1
E/AudioHardwareMSM72XX( 3255): [SKW]do_route_audio_rpc(0, 1, 1)
W/Zygote ( 3267): <!>com.android.internal.os.ZygoteInit 309<!> Class not found
for preloading: android.widget.TextView$SelectionModifierCursorController$1
W/dalvikvm( 3267): Exception Ljava/lang/RuntimeException; thrown while initializ
ing Lcom/android/internal/policy/PolicyManager;
E/Zygote ( 3267): Error preloading com.android.internal.policy.PolicyManager.
E/Zygote ( 3267): java.lang.ExceptionInInitializerError
E/Zygote ( 3267): at java.lang.Class.classForName(Native Method)
E/Zygote ( 3267): at java.lang.Class.forName(Class.java:234)
E/Zygote ( 3267): at java.lang.Class.forName(Class.java:181)
E/Zygote ( 3267): at com.android.internal.os.ZygoteInit.preloadClasses(Zyg
oteInit.java:297)
E/Zygote ( 3267): at com.android.internal.os.ZygoteInit.main(ZygoteInit.ja
va:599)
E/Zygote ( 3267): at dalvik.system.NativeStart.main(Native Method)
E/Zygote ( 3267): Caused by: java.lang.RuntimeException: com.android.internal.p
olicy.impl.Policy could not be loaded
E/Zygote ( 3267): at com.android.internal.policy.PolicyManager.<clinit>(Po
licyManager.java:42)
E/Zygote ( 3267): ... 6 more
E/Zygote ( 3267): Caused by: java.lang.ClassNotFoundException: com.android.inte
rnal.policy.impl.Policy
E/Zygote ( 3267): at java.lang.Class.classForName(Native Method)
E/Zygote ( 3267): at java.lang.Class.forName(Class.java:234)
E/Zygote ( 3267): at java.lang.Class.forName(Class.java:181)
E/Zygote ( 3267): at com.android.internal.policy.PolicyManager.<clinit>(Po
licyManager.java:39)
E/Zygote ( 3267): ... 6 more
E/Zygote ( 3267): Caused by: java.lang.NoClassDefFoundError: com.android.intern
al.policy.impl.Policy
E/Zygote ( 3267): ... 10 more
E/Zygote ( 3267): Caused by: java.lang.ClassNotFoundException: com.android.inte
rnal.policy.impl.Policy in loader dalvik.system.PathClassLoader[.]
E/Zygote ( 3267): at dalvik.system.PathClassLoader.findClass(PathClassLoad
er.java:240)
E/Zygote ( 3267): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)

E/Zygote ( 3267): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)

E/Zygote ( 3267): ... 10 more
E/Zygote ( 3267): <!>com.android.internal.os.ZygoteInit 234<!> setreuid() faile
d. errno: 17
W/dalvikvm( 3267): threadid=1: thread exiting with uncaught exception (group=0x4
0018560)
 
Last edited by a moderator:

Roqu3

Senior Member
May 9, 2011
256
186
0
It seems that you messed up the android.policy.jar, you know that you have to extract first the classes.dex then do the baksmali then do the smali to make a new classes.dex and finally put it in the jar file replacing the older dex, I did it that way with some v10 and v20 and the powermenu worked.


Also I think this thread is more "theming" than "dev" so it should be in the other section.

Personally I prefer to use combo buttons to reboot and to go to recovery (mi power button is kinda broke), to do that just add this to the init.rc

Code:
# Reboot : HOME + VolUp

service rbt /system/bin/reboot
oneshot
disabled
 keycodes 102 115


# Recovery : HOME + VolDown

service rcvry /system/bin/reboot recovery
oneshot
disabled
keycodes 102 114
I got the idea from a post of BuglessPete
 
Last edited:

matteof93

Senior Member
Aug 26, 2011
660
248
0
Bagnolo Piemonte, ITA
It seems that you messed up the android.policy.jar, you know that you have to extract first the classes.dex then do the baksmali then do the smali to make a new classes.dex and finally put it in the jar file replacing the older dex, I did it that way with some v10 and v20 and the powermenu worked.


Also I think this thread is more "theming" than "dev" so it should be in the other section.

Personally I prefer to use combo buttons to reboot and to go to recovery (mi power button is kinda broke), to do that just add this to the init.rc

Code:
# Reboot : HOME + VolUp

service rbt /system/bin/reboot
oneshot
disabled
 keycodes 102 115


# Recovery : HOME + VolDown

service rcvry /system/bin/reboot recovery
oneshot
disabled
keycodes 102 114
I got the idea from a post of BuglessPete
thanks for this....i'll try tomorrow....
 
  • Like
Reactions: mDroidd

Turducken

Senior Member
Jun 22, 2011
359
159
0
After recompiling the android.policy.jar make sure META-INF folder is included. Copy it from the original if it's not.

Bootloop is likely because resources.arsc is compressed. Make sure it's stored inside framework-res.apk uncompressed.
 

Attachments

  • Like
Reactions: galabuon

diazneoones

Senior Member
Jan 4, 2011
110
47
0
Hi Buddy,

I wanna know the process in adding a power menu options for Custom roms...i read the other post...but still not clear frm other blog

Can u please do a tutorial on how to do for power menu... and tools exactly used in doing it...

DiazNeo
 

thachtunganh

Senior Member
Mar 19, 2011
1,695
1,901
0
Hà Nội - Hanoi
Hi Buddy,

I wanna know the process in adding a power menu options for Custom roms...i read the other post...but still not clear frm other blog

Can u please do a tutorial on how to do for power menu... and tools exactly used in doing it...

DiazNeo
First.. search for it before you ask, OK :D

I'm on mobile now , can you please search for "LOL v1.4.2" , after you found it , read the post 2 for the tutorial :) ... also give Him thank ;)

Sent from my LG-P500 using XDA App