Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
Cricco
Old
#1  
Senior Member - OP
Thanks Meter 12
Posts: 129
Join Date: Jan 2011
Default [DEV HELP] PowerMenu

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
Old
#2  
mastershefis's Avatar
Senior Member
Thanks Meter 849
Posts: 699
Join Date: Mar 2011
Location: Brno

 
DONATE TO ME
Quote:
Originally Posted by Cricco View Post
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..
[THEME][CM9-AOKP][MDPI-HDPI] -MasterUIv4- [RELEASED ALPHA][08.06.2012]
 
thachtunganh
Old
#3  
thachtunganh's Avatar
Senior Member
Thanks Meter 1914
Posts: 1,658
Join Date: Mar 2011
Location: Hà Nội - Hanoi
Quote:
Originally Posted by Cricco View Post
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
HTC Desire HD
  • The one who brought sweep2wake feature for Atmel touch panel driver to HTC Desire HD .
    First for Android with Sense 4.1, then for AOSP based ROM.
Advice: Only Use Original Software
Nevermind, install CyanogenMod ROM, doesn't matter it's unofficial or official version, believe me, it's still the best!
 
galabuon
Old
#4  
Junior Member
Thanks Meter 3
Posts: 14
Join Date: May 2007
same problem
 
matteof93
Old
#5  
matteof93's Avatar
Senior Member
Thanks Meter 245
Posts: 654
Join Date: Aug 2011
Location: Bagnolo Piemonte, ITA
Same problem

Sent from my LG-P500 using Tapatalk
 
Cricco
Old
(Last edited by Cricco; 5th October 2011 at 02:05 PM.)
#6  
Senior Member - OP
Thanks Meter 12
Posts: 129
Join Date: Jan 2011
Oh my god, then...
This is a logcat but i don't know what is the problem

Quote:
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$SelectionModifierCursorCon troller$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(PathClassL oad
er.java:240)
E/Zygote ( 3267): at java.lang.ClassLoader.loadClass(ClassLoader.java:5 51)

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

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)
 
SWEATTAIMI
Old
#7  
Account currently disabled
Thanks Meter 380
Posts: 1,774
Join Date: Oct 2010
Location: W4ZT3D

 
DONATE TO ME
Quote:
Originally Posted by Cricco View Post
Oh my god, then...
This is a logcat but i don't know what is the problem
: com.android.internal.p
olicy.impl.Policy could not be loaded

thats the problem,
 
Roqu3
Old
(Last edited by Roqu3; 5th October 2011 at 08:14 PM.)
#8  
Senior Member
Thanks Meter 184
Posts: 249
Join Date: May 2011
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
The Following 4 Users Say Thank You to Roqu3 For This Useful Post: [ Click to Expand ]
 
matteof93
Old
#9  
matteof93's Avatar
Senior Member
Thanks Meter 245
Posts: 654
Join Date: Aug 2011
Location: Bagnolo Piemonte, ITA
Quote:
Originally Posted by Roqu3 View Post
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....
The Following User Says Thank You to matteof93 For This Useful Post: [ Click to Expand ]
 
Turducken
Old
#10  
Turducken's Avatar
Senior Member
Thanks Meter 160
Posts: 358
Join Date: Jun 2011
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.
Attached Thumbnails
Click image for larger version

Name:	compressed.jpg
Views:	98
Size:	59.6 KB
ID:	741106   Click image for larger version

Name:	uncompressed.jpg
Views:	75
Size:	56.6 KB
ID:	741108  

The Following User Says Thank You to Turducken For This Useful Post: [ Click to Expand ]
 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...