yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] Inside 4ndroid:
4.1.2 problems..

i am trying to get this to work for my deodexed JB 4.1.2 rom which can be found HERE. but i am having a massive problem...

basically i am decompiling framework-res.apk, adding the 2 images then editing the the strings.xml then i recompile with no errors then i decompile the new framework and when i go to the public.xml the id's are not added to the file???

what am i doing wrong or should i add them manually??

any help would be great and thanks..
[Samsung Galaxy Nexus] djmcnz:
After you've added your resources/strings the re-encode process (with apktool) should automatically create the public.xml entries. You're describing the correct steps, which path are you adding the images and changing the strings in?
[Samsung Galaxy Nexus] Inside 4ndroid:
Mmmmm i am using apkmultitool maybe thats why i am having problems...

well i got the entries to be added to the public.xml and everything has gone smoothly but after i have copied the res folder and resources file to the original framework apk for some strange reason the original framework apk reduces in size and then when i push it to my device and reboot i get a bootlop??

do you think this could be caused because i am using th apk multitool??

thanks

EDIT: i wa just messing around and could i not just add the png's and edit the strings/public xml's then recompile and use the new framework apk as i have recorded the values in the public xml and hese id's are the same everytime so if no other files are touched by this process i would not need to copy the res folder and resources file to the original and i can use the new framework???
[Samsung Galaxy Nexus] djmcnz:
Hi there,

I have no experience with apk-multitool sorry, I just use the pure apktool.

Yep, that should work.
[Samsung Galaxy Nexus] Inside 4ndroid:
Billiant well i will convert to apk tool and start using that lol...

and i will try this method now i have the public.xml id's

i will report my results

many thanks
[Samsung Galaxy Nexus] whalesplaho:
following dis guide: https://docs.google.com/document/d/11a7ghZpdTcZbeDtneTnEHkHLn5_XQ9k2FDFFh-os-q0/edit?pli=0

i did everything but stuck on bootloop!!!

Edited files: http://www52.zippyshare.com/v/17591699/file.html

Original files (it contains 2 files needed to be installed to be able to decompile framework): http://www50.zippyshare.com/v/95480210/file.html

Please help me brov... Am using Xperia P JB 4.1.2 FW!!!!

Thanks

Best regards...:good:
[Samsung Galaxy Nexus] djmcnz:
Sorry for the delay, I hope you recovered from the bootloop.

I'm not sure I can really help (and the original file link above is 0 bytes?). I say this because it's almost impossible to verify smali changes because I do not have an Xperia phone, this mod really is for the Galaxy Nexus AOSP builds, OEM (Sony) builds are likely to be very different sorry.

Good luck though.
[Samsung Galaxy Nexus] whalesplaho:
Yeap brov... wasnt easy though!!!

thanks, will keep tryning & check for another tutorial.
[Samsung Galaxy Nexus] Anthrax:
hey you got boot loop when i tried i didn't get any boot loop but the problem was whenever i pressed the power button for long to get the menu it would directly restart.... without any options.....
[Samsung Galaxy Nexus] whalesplaho:
i experience dat too but dnt know what causes dat..... instead of Power option, it soft reboot!!!

hope will work dis out soon.
[Samsung Galaxy Nexus] Anthrax:
if you get any work around just let me know.... :)

@OP:

if you can help us it will be great....

here's a log cat attached......
[Samsung Galaxy Nexus] bluenile:
[MENTION=2084946]djmcnz[/MENTION] any idea how we can switch to this "Power Menu" instead of the Shutdown Confirmation Alert dialog box that we get on some tablets like PiPo M9? Thanks for your time.
[Samsung Galaxy Nexus] Anthrax:
That's what this tut is about.... Follow the tutorial to get the power menu....
[Samsung Galaxy Nexus] bluenile:
Thanks for your reply. I compiled the framework-res.apk and android.policy.jar as per the instructions in the tut, still get the old shutdown confirmation box. I will try again. May be I'm missing something?
[Samsung Galaxy Nexus] Anthrax:
provide a logcat.... and also as said by OP this method works confirm on Nexus only....
[Samsung Galaxy Nexus] bluenile:
Logcat attached. Thanks for your time.

** Also attached the screenshot of the Shutdown Confirmation Alert dialog box I still get.
[Samsung Galaxy Nexus] djmcnz:
Yes, the problem will be that the OEM who made your device didn't use the standard Google/Android methods for shutdown/reboot. This is quite common and it's not "bad" at all, just different.

The principles in this guide will still apply but the various methods used and messages displayed are probably named differently and, more problematically, located in different places in the smali code. It would be impractical I think for anyone to try and work through that process without the specific device in hand.

Removing the confirmation should be easy, you just need to find that message, skip it and provide a "yes" message to the system automatically. If you can do some basic smali navigation then tracing this is probably quite easy.

Adding in functions (reboot/recovery etc) will require you a) finding the correct location and b) finding suitable code to insert. There may already be useful code in there you can "copy and paste" and change a few values (my guide has an example of this applicable to the Nexus).

Adding long-press will be a pain if it's not already there somewhere by default. If it is then again, it's copy and paste making sure you change some values.

All said and done though, if you can't "read" smali (or convert it to java and read that) then it will be a cumbersome process of trial and error I'm afraid.

Note: a custom rom dev that's building from source could add these features in a matter of minutes, if you have access to a custom rom for your device it may pay to ask the dev if they can add it in.
[Samsung Galaxy Nexus] bluenile:
Thanks for your reply. I'm totally a n00b here.

But you are correct, upon long pressing the power/lock button the tablet calls the shutdown procedure in services.jar (ShutdownThread.smali). Is there any way I can call the createdialog function in android.policy.jar from within the shutdown function already invoked?
[Samsung Galaxy Nexus] djmcnz:
In theory yes, in practice it would be difficult unless you had some sample code.

Thinking about it more, if it's anything like my tablet (ASUS) then you may find the stock shutdown code all still in there. You could get lucky with this and if so some small changes would probably allow it to be invoked. Look for the existence of the files and strings in my guide, they'll be a good indicator.

Sorry for the tardy replies...
[Samsung Galaxy Nexus] bluenile:
Hi - Thanks for your reply, I appreciate your help. I was able to solve the issue by changing the order of menus invoked in phonewindowmanager2.smali. (credit: kahvitahra for the tip)
[Samsung Galaxy Nexus] Zombeezy:
Nexus 5

Loved your Super PowerMenu that was an integral part of the 4.2.1 MiNCO v6 (Minooch + Franco) Toro ROM for the Galaxy Nexus. I now have a Nexus 5 and am missing your power menu functionality to reboot to recovery, etc.

Since I am using ART instead of Dalvik, is there any chance you might do a Super PowerMenu for Nexus 5 Kit Kat that is not part of Xposed Framework using Dalvik?

Thank you!
[Samsung Galaxy Nexus] LiquidXed:
Maybe look into the xposed module, it has the reboot menu for the GNex
[Samsung Galaxy Nexus] djmcnz:
Z' wants to use the ART compiler so no Xposed... :(

Sorry for the delay, we had a holiday weekend here and I've been working on my car.

To be honest, since I didn't notice a difference between ART and Dalvik on my N5 I'm using Xposed and GravityBox which is just awesome. I probably won't be making changes to the stock KK ROM this time around but if somebody wants to decompile the code and do the testing I'm happy to assist with any changes... our you could set yourself a challenge and follow the DIY - I'm almost sure the power menu code won't have changed much.
[Samsung Galaxy Nexus] Zombeezy:
No problem, appreciate you getting back to me on this.

Not adventurous or smart enough enough to tackle it as a DIY, lol, but you bring up a good point - notable performance difference so far between ART and Dalvik to me also was minimal, mostly while doing scrolling long web pages, it seemed to do it more smoothly.

Good suggestion - I'll head back to Dalvik, Xposed and GravityBox. Definitely awesome, you're right. Thank you!
[Samsung Galaxy Nexus] djmcnz:
Yep, but not tonight, maybe tomorrow.
[Samsung Galaxy Nexus] Moursy93:
great mod man !, just to let everyone know the enhanced power menu doesn't work with anything rather than the stock height of nav bar,the whole power menu disappears the power button only restarts phone and thats it !
[Samsung Galaxy Nexus] djmcnz:
That's interesting info, thanks - I'll add it to the first post when I get home.
[Samsung Galaxy Nexus] Painkiller006:
=) now it's working. I re-download the file, fixed permission on recovery and boot up the phone, got a message saying Android was updating all my apps and once it finish updating the mod works.
[Samsung Galaxy Nexus] djmcnz:
Nice, glad to hear. Enjoy.
[Samsung Galaxy Nexus] simms22:
there is a stock option for that(in ics and jellybean). go to system settings, security, turn off the lockscreen. now you can wake with your volume button.
[Samsung Galaxy Nexus] chlehqls:
Sweet, thanks for this mod. I was relying upon Rom Manager to get to recovery.
[Samsung Galaxy Nexus] kramnod:
Worked for me, using bigxie's jb deodexed rom
[Samsung Galaxy Nexus] mrich137:
Confirming that this works on the CDMA/LTE Verizon Nexus using team liquid vicious jb rom
[Samsung Galaxy Nexus] kevin-sc:
good

job
[Samsung Galaxy Nexus] 52brandon:
works just fine on tr4nscend
[Samsung Galaxy Nexus] DeoXCodeX:
Thanks, this worked fine =)
[Samsung Galaxy Nexus] lildoug2410:
I think the link is broken. None of the mirrors or the xda download are working
[Samsung Galaxy Nexus] djmcnz:
XDA is broken and so is my host... :rolleyes:

However the multiupload mirror just worked for me.
[Samsung Galaxy Nexus] runderekrun:
Just tried and it keeps bringing me to "Internet vs Hollywood" page. It doesn't give me option to download at all.
[Samsung Galaxy Nexus] djmcnz:
lol- are you in the USA?

Edit: I don't mean for that to sound rude - but if you are in the US then I suspect the file hosts are giving you the big two fingers because the Fed's really screwed everyone when they killed Mega.
[Samsung Galaxy Nexus] runderekrun:
YEAH! Tried a few different browsers too. I can't even go to multiupload.nl at all... Hmm...

Any chance for another mirror? :D
[Samsung Galaxy Nexus] djmcnz:
I suspected so...

... if you are in the US then I suspect the file hosts are giving you the big two fingers because the Fed's really screwed everyone when they killed Mega.

Edit: my host is back up.... :)
[Samsung Galaxy Nexus] llohcyoing:
works fine here...thanks

Inviato dal mio Galaxy Nexus
[Samsung Galaxy Nexus] nomad4ever:
Works flawless, thanks a million!
[Samsung Galaxy Nexus] electronicrice:
So for the life of me I cannot get this to work. I'm running stock, rooted 4.1 JB. I cleared Cache and Dalvik Cache, also fixed permissions after flashing the file and no matter what the mod won't take... Anything else I can try? I want this to work so badly!
[Samsung Galaxy Nexus] sam razzy:
Is this working on bigxie Jb ROM ?

sent from jElly Belly NeXus PrimE
[Samsung Galaxy Nexus] nomad4ever:
Yes it does!
[Samsung Galaxy Nexus] maumaumau:
could you please make a "revert".

I have some issues with flashing Themes.

1. I flashed your mod

2. flashed auf theme

If I longpress Power, my phone reboots quickly (you just see the Bootanimation).
[Samsung Galaxy Nexus] djmcnz:
Hmm, that's odd - it's quite a binary situation:

It will work and work well; or,

It will not work and screw up your phone

You're somewhere in the middle... :)

Can you use adb? If so they this while connected with via adb in recovery:

adb pull /temp/recovery.log

Immediately *after* flashing my zip. Post the results on pastebin.com (or similar) and then the link back here, I can take a look for you.

Alternatively, you could check the MD5's of the these two files to see if they're the same as the ones I've provided in the zip... that'll tell you if they flashed.

/system/framework/android.policy.jar

/system/framework/framework-res.apk

'tis a bit odd...
[Samsung Galaxy Nexus] djmcnz:
Take these two files:

/system/framework/android.policy.jar

/system/framework/framework-res.apk

From your ROM zip and add them into my zip, replacing my files and then flash the result (backup first in case you make a mistake).

That will revert to your ROM stock files.
[Samsung Galaxy Nexus] albsat:
Would you consider merging other mods in your one? I have in mind battery percentage and the order of navigation buttons...
[Samsung Galaxy Nexus] djmcnz:
1% and Nav Bar mods are in SystemUI - which isn't touched by this mod so it wouldn't make sense to also include those mods.

You should be able to apply nav bar mods and batt % alongside this mod.
[Samsung Galaxy Nexus] albsat:
You are right. Didn't check the files. It worked in bigxie v2 rom. Thanks
[Samsung Galaxy Nexus] Seadub2:
If you change the size of the Nav bar it won't let you get to the power menu. It just reboots when you hold the power.
[Samsung Galaxy Nexus] djmcnz:
Quick reboot... ;)

Sorry, I've not looked into this, I use the standard nav bar size... as a guess it's failing to determine where the centre of the display is - why it then chooses to reboot is beyond me.

To be honest, it's not something I can prioritise looking into but will do so if I get the time.
[Samsung Galaxy Nexus] kokwei:
Is it possible to add "Screenshot" option to the menu?
[Samsung Galaxy Nexus] djmcnz:
I suspect so, I've never looked into it and to be honest since we have VOL_DWN+PWR for screenshots I'm not inclined to spend any time on it sorry.
[Samsung Galaxy Nexus] mpressive:
Been lurking here for awhile and never remember to log-in to provide feedback to this awesome forum. I'm currently on Jelly Bean, Vicious V3, Trinity Alpha 20 and I just successfully flashed the power menu and I wanted to thank the developer but couldn't find the thanks feature. Maybe it's now apparent because I have so few posts.

Thanks anyway!!
[Samsung Galaxy Nexus] djmcnz:
:)

No problem, 'Thanks' button is next to 'Quote' - not sure about the visibility parameters.

I accept your thanks!
[Samsung Galaxy Nexus] mpressive:
Sorry, just found the thanks button. You had to be signed in to see it, so I updated by thanks!! I appreciate your efforts. Any idea how to get the USB quick charge as easy as your update on JB?
[Samsung Galaxy Nexus] yeahrite:
On bigxie's JB ROM, Trinity Alpha 20 and flashed this. Works flawlessly thanks!!
[Samsung Galaxy Nexus] Tynen:
Thanks for this, makes JB seem a little more like home. :)
[Samsung Galaxy Nexus] djmcnz:
No, sorry I've not looked into that.
[Samsung Galaxy Nexus] daewond3r:
Is the XDA attached version still no good?

I'm in the middle of a backup and that's the version I have my phone. Do I need to reboot and get it from another link?
[Samsung Galaxy Nexus] djmcnz:
Possibly...XDA attachments have been playing up lately.
[Samsung Galaxy Nexus] farfromovin:
Funny you mentioned Trinity. I find myself only restarting to flash a new kernel, which I'm usually tooling around in the TKT app which has a reboot to recovery function. Still, nice to have it built into the power menu :good:
[Samsung Galaxy Nexus] harmohn:
I've just flashed the xda attached file. A minor issue of no touch sounds after reboot was corrected by fixing permissions.

Thanks for this mod fella! :)
[Samsung Galaxy Nexus] djdarkknight96:
What's up DJ it's DJ :-P glad to see you in action again...I'm going to try this out. Can I add this to my theme if it goes good? With credit of course! Later dude, thanks!

Sent from my DarkICE Skanky CM9 Gnex using the app!
[Samsung Galaxy Nexus] djmcnz:
No problem and of course you can, thanks for asking.
[Samsung Galaxy Nexus] darkhack:
Thanks

Flashing the zip file was smooth, no error here, tested on my Verizon Galaxy Nexus with 4.1 Jelly Bean.

There is one option that's missing from the power menu which is the "Boobloader", hopefully you will implement that function whenever you have the time, but still this is great feature to have and so thank you so much for your hard work.
[Samsung Galaxy Nexus] Lambetts:
+1

Also man, great work, am using and its relief to have them back. Thank you!!! :D

Sent from the Nexusus!
[Samsung Galaxy Nexus] kudoboi:
hey guys does this work with nav bar mod?
[Samsung Galaxy Nexus] D3VI0US:
I flashed the mod with no problem cleared the cache the no bootloop but also no mod .. no effect at all ,, tried to fix permissions but no luck
[Samsung Galaxy Nexus] MYAbln:
that would be awesome
[Samsung Galaxy Nexus] albsat:
+1 please in adding volume waker. thanks
[Samsung Galaxy Nexus] djmcnz:
Seems I missed all these questions... sorry.

No, I won't add bootloader (although it's possible on the Nexus) because it's infrequently used by most.

However, once I get around to posting a guide I'll include that and possibly screenshot as well (in the guide that is).

Yep.

Flash again, post /tmp/recovery.log here after flashing (grab it via adb before you reboot out of recovery!) and I'll take a look for you.

Not at this stage sorry... although that might be useful for my desktop dock since I can't get to the power button... hmmm.
[Samsung Galaxy Nexus] D3VI0US:
here you go i attached the log file for u
[Samsung Galaxy Nexus] djmcnz:
Well, I see this:

minzip: Extracted file "/system/framework/android.policy.jar"
minzip: Extracted file "/system/framework/framework-res.apk"

In the log and no errors relating to the flash at all... I simply can't explain it. I mean, seriously that's odd because we have log evidence that the flash took.

You could always check the MD5 of the two files before and after but it shouldn't be necessary, the flashing process itself has some inbuilt safeguards.

Do you get a 100% stock power menu? Not even a 1% difference?
[Samsung Galaxy Nexus] D3VI0US:
yes it is a 100% stock no difference ... so what you think the problem is?
[Samsung Galaxy Nexus] electronicrice:
I'm in this same boat. Exact same situation.
[Samsung Galaxy Nexus] djmcnz:
Well... it's beyond me.

If one of you are so inclined I'd love to get a MD5 hash from framework-res.apk both before and after the flash... it would confirm whether the file is actually there.

You can get the MD5 in ESExplorer during runtime.
[Samsung Galaxy Nexus] Gunthy`:
Doesn't work (yet) on 4.1.1

Flashed this over bigxie JB 4.1.1 JRO03C but when long pressing the power button it doesn't work. Phone does a soft reset. Keep up the good work though! :D
[Samsung Galaxy Nexus] djmcnz:
Okay, I'll look into that and update the thread title in the meantime.
[Samsung Galaxy Nexus] Gunthy`:
Cool! I can test if needed, just PM me or something :)
[Samsung Galaxy Nexus] djmcnz:
Jelly Bean 4.1.1 Release

Enhanced Power Menu

For Android 4.1.1 (AOSP ONLY)

This version has been tested on the 4.1.1 AOSP (Android Open Source Project) build of Android. This IS NOT compatible with the OTA (Over the Air) build!! For OTA click here.

NOW WITH HOT SAUCE + OMG BACON!!

HOT SAUCE: Available now below is a version with long-press Recovery to reboot to the bootloader!

NEW BACON: Reboot with Recovery on long-press so no visible Recovery menu option! (screenshot in first post)

Instructions

Download one of these files:

Standard options without Bootloader version (also attached to this post): JBEnhancedPowerMenu411.zip

Long press Recovery for Bootloader version (also attached to this post): JBEnhancedPowerMenu411BL.zip

Long press Reboot for Recovery version, no Bootloader option (also attached to this post): JBEnhancedPowerMenu411RR.zip

Copy it to your SD card

Reboot to recovery

Wipe caches

Do a full backup

Flash the file you downloaded

Reboot

Enjoy

Hit 'Thanks' below

And if you're a chef, kanger or code monkey and you want to use this mod just drop me a line! :)
[Samsung Galaxy Nexus] daewond3r:
Damn, I just flashed the 4.1 version over 4.1.1. Nandroid restore and flash new version, or just flash new version?

EDIT: Didn't do a restore, just flashed new version and things seem to be OK.
[Samsung Galaxy Nexus] djmcnz:
Something spicy coming soon... :cool:
[Samsung Galaxy Nexus] chugger93:
djmcnz; Has anyone ever mentioned that this mod may be causing conflicts with MMS? I have reason to believe it may, but I'd like your feedback on if it's even possible or not
[Samsung Galaxy Nexus] djmcnz:
Nobody has mentioned it, no. But I don't dismiss it because of that. However, I can confirm that it can't interfere with MMS. The files I touch for this mod are far, far removed from any of the phone or messaging functions.
[Samsung Galaxy Nexus] edangel:
i can confirm this.. i am using this mod with bigxie's rom and it work fine with mms..no issues here!also no problems with sms..i ialready received and sent 60+ sms and 3 mms..
[Samsung Galaxy Nexus] djmcnz:
Spicy!

Check out the hot sauce here:

The spice of life... http://xdaforums.com/showthread.php?p=28559395#post28559395

Long press Recovery in power menu to reboot to Bootloader!

Sizzling... :cool:
[Samsung Galaxy Nexus] Neejay:
Do you have a mirror for the Long press Recovery for Bootloader version? Seems to be down.
[Samsung Galaxy Nexus] HkDng:
Anyway to add screenshot to power menu? Thanks.
[Samsung Galaxy Nexus] spaceman860:
Edit I misread your post LOL

Sent from my Gnex {GSM}
[Samsung Galaxy Nexus] LNJ:
This will only work for deodexed JB roms right?

Sent from my GNex running Jelly Bean 4.1.1
[Samsung Galaxy Nexus] djmcnz:
Most likely only stock but it doesn't need to be deodexed. Backup first and you can only lose time trying. :)
[Samsung Galaxy Nexus] dandyqb:
any mirror link, tried several times but im always cut halfway, thanks to a very great work! :cowboy:
[Samsung Galaxy Nexus] djmcnz:
Okay, I've just attached the two 4.1.1 versions to the download post a page back, that should work for you.
[Samsung Galaxy Nexus] qsec:
Nice mod.

Is this made with the newest framework-res.apk from JRO03C?

Cheers.
[Samsung Galaxy Nexus] djmcnz:
Yes the 4.1.1 version is.
[Samsung Galaxy Nexus] djmcnz:
I shouldn't ignore you, although it has been asked a few times.

The simple answer is apparently 'yes' but I've not looked into it. To be honest I don't see 'screenshot' fitting logically with the power menu (irrespective of what some OEM's believe). And since we have PWR+VOL_DWN for screenshots, would this option really add any value?

I'm reluctant also because I know I'd never use is... so there's an effort/benefit equation too... :)
[Samsung Galaxy Nexus] Geo411m:
This is a great mod but I'm having a problem. With the previous version if I factory reset it would work fine but with this version a factory reset makes my phone unable to boot. I'm using it with my own custom OTA 4.1.1 deodexed Rom.
[Samsung Galaxy Nexus] teshxx:
Hey,

Can you post a tutorial on how to did this, so that someone of us can do it ourselves and learn ?

Thanks
[Samsung Galaxy Nexus] zenzip:
flashed on 4.1.1 bixie JB ROM and work perfectly, if add % abttery mod, and navbar size mod + notification power menu like AOKP i can die happy...:D hahaha thanks man ;)
[Samsung Galaxy Nexus] derrzredeem:
i really dig the enhanced power menu with reboot to bootloader.

so i took the liberty and add some minor stuff to it for my personal use and decided to share with you guys, i hope djmcnz doesn't mind ;)

32dpi navbar, off-center batt and of course enhanced powermenu

https://www.box.com/s/e5442ce3eeb1e948e06a

edit: i attached the wallpaper ;]
[Samsung Galaxy Nexus] saar73:
same here. bootloop on 4.1.1 stock
[Samsung Galaxy Nexus] fatappel:
This is great. Thanks for sharing. Can you make a version that has the 32dpi navbar in landscape too?