yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] hlxanthus:
Re: [MOD][FEB27][Deodexed/Odexed][All JB Versions] Multi-Reboot Power Menu & Volume S

This morning I was working on trying to add a reboot menu to a deodexed stock 4.2.2 ROM for the nexus 7 I am working on. Found this thread and your deodex files didn't work. It booted fine but when choosing the reboot option from the power menu, instead of taking me to the 4way menu it just rebooted me. My question is, are there any unmodded jar files where I can decompile both and do a compare? I really don't want to download the whole gNex factory image for a single jar file.

Or better yet, any idea why it didn't work? I know it might be difficult to track down, but thought you may have seen this during your initial creation of this mod.

Edit: well I went ahead and tried it again and I messed up. I had tried to build my own and that one had the faulty reboot menu. With your mod the lock screen won't unlock, but if I open the power menu it works, as I used it to boot back to recovery to restore my nand. I am including a picture as the icon is wrong too lol.
[Samsung Galaxy Nexus] xIC-MACIx:
Re: [MOD][FEB27][Deodexed/Odexed][All JB Versions] Multi-Reboot Power Menu & Volume S

The ROM your making has been modified or is not the same as a stock OTA (save for deodex and root) so simply flashing a mod like this is obviously going to cause issues lol.

It should work on any pure nexus device. I've personally tested on my GNex & N10 & I know that it works on N4 & N7 b/c the file modified here is identical to those.

If you personally compiled your ROM or have made changes to it, things like your public.xml might not be the same as the factory imgs/OTAs. This is probably the cause of the random images being pulled in.

If you have made any modifications in frameworks apk and regenerated your public xml, the hex values used could have changed

Just pull your untouched android.policy.jar to your computer & use a diff tool to merge the changes made in this mod.
[Samsung Galaxy Nexus] hlxanthus:
It is a stock 4.2.2 pulled directly from the google factory image. I dropped the system.img and boot.img into dsixda's kitchen to deodex (also rooted, added busybox, and added init.d support). No system or framework files were modded. I will try a diff of your and my android.policy.jar and see where that leads me.
[Samsung Galaxy Nexus] xIC-MACIx:
Okay, I just compared a stock 4.2.2 copy of android.policy.jar for grouper with the one I had and they are different. Specifically, in GlobalActions.smali there are like 3 lines that are different from the rest of Nexus AOSP code, so that's the problem. I guess for the Nexus 7, Google decided to make edits due to the phablet layout, my bad.

So yeah, just install a diff tool and compare yours with mine. When you merge GlobalActions.smali, the two hex values you are adding refer to the text string and image. You need to get the correct hex values from the Nexus 7's public.xml in frameworks apk. The text string is something like "factorytestreboot" and the image is "ic_dialog_alert_holo_dark." For diff tools, a good & free one on Mac is DiffMerge, and on Windows I use WinMerge. (You can compare folder directories with both)

- Mac
[Samsung Galaxy Nexus] hlxanthus:
[MOD][FEB27][Deodexed/Odexed][All JB Versions] Multi-Reboot Power Menu & Volume

Awesome, if I get it working I will post it up, both deodex and odex!
[Samsung Galaxy Nexus] bodh:
So at first i found an app, by mDroid, I believe, that creates the epm. And i thought, f* i hate apps. So for the sake of learning, I thought i'd go ahead with your instruction.

The first issue I ran into was here:

root@android:/ # busybox cp /sdcard/dexopt-wrapper /system/bin

cp: can't create '/system/bin/dexopt-wrapper': Read-only file system

To remedy this, I exited the shell, patched to insecure adbd by chainfire, and used ./adb remount. Back into shell, and i was able to chmod, but unable to chown, which seems needed since group ownership is sdcard_rw. And of course my rootbrowserlite would fc every time i tried to change the ownership via gui. So i went ahead anyway with the odexing.

QUESTION: Do you think this would matter, using dexopt-wrapper with the incorrect ownership? I tried the following several times to no avail. Any ideas why?

root@android:/ # busybox chown root.root dexopt-wrapper

chown: unknown user/group root:root

I went ahead with the dd, successfully. One of your last steps, to place the new .odex seemed questionable to me. Why cp an .odex that does not match the original android.policy.jar which is still in system? So I figured i have the .odex, I'll zip it up [Keka on mac, store only].

CWM 6.0.2.3 would not install it. I tried modifying the .zip several times, as of yet to no avail. I got to 'opening update package, installation aborted'.

After the error, i decided to modify your empty.zip:

I thought maybe your certs were a problem, since they say 2008. So i removed Cert.rsa, cert.sf, and manifest.mf. I replaced the update-binary with that of my latest ota. I placed the modified (de-odexed) android.policy.jar and the android.policy.odex i created inside the framework folder.

One problem I did note, however, was an error in your updater-script:

this line "run_program("/sbin/busybox", "mount", "/system");"

Since busybox is located in /system/bin, i modified it to:

run_program("/system/bin/busybox", "mount", "/system");

I BELIEVE THE SOURCE OF MY CURRENT PROBLEM IS THAT I USED THE DEFAULT TEXTEDIT.APP TO MODIFY IT, which I've read can cause problems.

Since I need my phone to wake me in the morning, i figure I'll keep trying as I have time. I plan to re-do the script via my recently installed Notepad++.app (wine).

The only reason I know anything about edify scripting and flashable .zips is because of WilskyWalker's tutorial here on xda. But i wanted to offer you some feedback and let you know I am working on it. Thanks for reading!
[Samsung Galaxy Nexus] xIC-MACIx:
The instructions I provided are basic & I assume the users who choose to use them have a basic understanding of adb (not saying you don't), but things such as mounting and permissions might need to be adapted to your device/needs.

1. Just use the abd that comes with the SDK, just remount through adb. And yes, dexopt-wrapper needs to have the right permissions to edit the system directory.

2. "cd /system/framework" and "busybox cp /sdcard/new.odex android.policy.odex" do just what they says - takes the new file you just odexed and copies it to system/framework as "android.policy.odex" which overwrites the old odex file. NOTE: If you are using this on a device other than the Galaxy Nexus, you need to be sure that the original/deodexed mod is compatible with your device. (For example: the Nexus 7 has slightly different code as discussed above your post.)

3. You can't just "zip up" a previously signed zip file, once you decompile the zip the signature is broken. Keka does not have the "archive viewer/updater" feature. If you use BetterZip, you can drop in the edited files without unzipping. You shouldn't ever have to update the certs or anything like that as you are not flashing a ROM.

4. That's not a problem, to my knowledge, "/sbin/busybox" is pre-defined with busybox and picked up by the appropriate applet. Every updater-script I have seen uses this sytanx when flashing anything other than a ROM. If that was the problem it would give you a different error, but recovery isn't even able to open the zip and instead prints "opening update package, installation aborted"

5. Use TextWrangler or Aquamacs, there are plenty of free text editors to use so you don't have to use wine scripts to run a buggy version of NP++. Regardless, DON'T try and edit the updater-script, it works fine lol, but I use TextWrangler with my udpate scripts all the time and they work fine.

So, the biggest issue is your method of building the zip file. DL the free trial of BetterZip to update my "empty.zip" archive with the new files and click the save button. (DON'T unzip it)

Also, issues like this are exactly why you should back up the originals before you mod your device lol. Oh and Google is your friend, there are tons of adb tutorials!

- Mac
[Samsung Galaxy Nexus] MikeFields:
Is someone trying to make these mods work in odexed stock 4.2.2 for Galaxy Nexus?
[Samsung Galaxy Nexus] hlxanthus:
Here is a version that works for the Nexus 7 stock 4.2.2. It is only the reboot menu.

Download - 4.2.2_Multi_Rbt_Only_03042013_grouper_deodex.zip

Download - 4.2.2_Multi_Rbt_Only_03042013_grouper_odex.zip

Edit: Updated to include an odexed version.
[Samsung Galaxy Nexus] bodh:
Here's for 4.2.2 Gnex Odexed

You need either an insecure boot or insecure adbd to use remount.. This time, I was able to chown with no problem. But maybe you can do me a favor: check your dexopt-wrapper ownership and tell me if it's root, root or maybe root,shell.

Turns out I have Stuffit, just only began to learn to use it today..

And my apologies about the script 'error'. I'm just beginning to learn edify.

Also, I only used your empty.zip for this, but i plan to try and make my own. For that, I thank you for suggesting textwrangler and aquamacs, while also enlightening me about keka.

All i did was to .odex the modded 4.2.2 android.policy.jar, and added the two files to your .zip. Tested and working! And of course I'd only do any of this if i had a backup or new how to recover! Perhaps I'll adapt the other two forms of this mod for your op. Thanks for this learning experience.

EDIT: I don't recall fixing the permissions in either the .jar or .odex here. It appears cwm did it for me though, and it works on my device.

EDIT #2: Also added an odexed version of the Volume skip only mod. Figured I'm getting the hang of this.

GUESS I SHOULD NOTE THAT THESE ARE ALL MAGURO.

I added the full mod version I did. It flashed fine, i guess i'm just not sure how this volume skip works [I don't really listen to music on my device, but i figured someone might want this mod].
[Samsung Galaxy Nexus] xIC-MACIx:
I wish I could, but ever since 4.2.2, I can't get my Mac to compile a build and there are no odexed builds available here for the toro variant. :(

Thanks man, glad you got it working. It would actually make sense that you didn't have to mess with permissions as I had already set them on dexopt-wrapper when I odexed on my N10 lol.

- Mac
[Samsung Galaxy Nexus] xIC-MACIx:
OP Updated with more devices. Download carefully! There are quite a few downloads available now lol.

Thanks to those who contributed to the downloads section :D

Oh and it's always best to MAKE A BACKUP before you flash!

- Mac
[Samsung Galaxy Nexus] Androyx96:
Works perfecrtly on my Galaxy Nexus 4.2.2 now!

Now it works perfectly on my Galaxy Nexus stock 4.2.2.. But at every boot I get the "upgrading Android" message.. How can I fix it?
[Samsung Galaxy Nexus] xIC-MACIx:
I've never seen or encountered that before, so I have no clue. Being that I own the toro variant of the Galaxy Nexus, I haven't had an odexed 4.2.2 rom to test on. I did hear that the verizon 4.2.2 build leaked today so maybe I can flash the OTA tonight and either fix the current ones or odex my own ...

- Mac
[Samsung Galaxy Nexus] bodh:
I got that once, when i wiped the dalvik after flash. You're sure it's every boot?
[Samsung Galaxy Nexus] gpvecchi:
Flashing this will broke my OTA updates? Thanks!
[Samsung Galaxy Nexus] bodh:
Yes it will break your ota updates, but to fix that, just fastboot flash your official system.img before trying to apply an update.

OR, you could put your original android.policy.jar and android.policy.odex back into a flashable and flash it before the update.
[Samsung Galaxy Nexus] djwyman:
I wish I would have read this before flashing this on my nexus 7 and nexus 4... I was liking the fact that I could just use the official updates on these two devices without having to do anything special or reinstalling everything over again... And since 4.2 came out it has everything stock that I want except for the reboot feature...oh well I guess its not the end of the world.
[Samsung Galaxy Nexus] gpvecchi:
Great, thanks!
[Samsung Galaxy Nexus] xIC-MACIx:
This is why you should

always

make a backup of the original files lol. The general rule of thumb I follow is - if it modifies/changes or removes any system files - it breaks OTA.

- Mac
[Samsung Galaxy Nexus] djwyman:
its fine...I am used to flashing roms...when I had my nexus s I used to be a flashing fool so when the next update comes out I will just flash it no big deal. But I do love that this tweak exists for stock roms as I like running stock now better than I like using custom roms that are usually buggy and full of stuff I don't care to have. the one of the two things I liked on custom roms has been now addressed with 4.2...the other is this tweak which is the power button reboot options.
[Samsung Galaxy Nexus] staud:
Maybe this is a stupid question but can anyone tell me what VOLUME SKIP is?
[Samsung Galaxy Nexus] TheMysteriousOne:
Re: [MOD][Deodexed/Odexed][All JB Versions] Multi-Reboot Power Menu & Volume Skip

Skip tracks by long pressing volume buttons.
[Samsung Galaxy Nexus] MikeFields:
I flashed the GNex 4.2.2 odexed Multi Reboot & Volume Skip mod, but after rebooting nothing happened. Did I do something wrong?
[Samsung Galaxy Nexus] aeox:
Similar problem. Volume skip suddenly stopped working on my deodex 4.2.2 Nexus 4. Using Google Play Music app.
[Samsung Galaxy Nexus] rskyline:
There's any way to remove the Volume Warning when you're using headphones?
[Samsung Galaxy Nexus] hlxanthus:
Re: [MOD][Deodexed/Odexed][All JB Versions] Multi-Reboot Power Menu & Volume Skip

It seems the latest Google music update has borked the volume skip mod. I have uninstalled the update and that works, but letting it update again ruins it again. Even pushing to system does not fix it. This is on my nexus 7. I would be interested in any fix that is found.

Edit: The only fix I have found at this time is to go to Manage Apps>uninstall updates (make sure app data is wiped too). Then boot to recovery, wipe cache and dalvik cache, fix permissions and reboot. Every step may not be needed, but this is the method I took to to get it working. After that, just don't let Music update itself.
[Samsung Galaxy Nexus] hlaalu:
Hey first, thanks for this awesome mod. I flashed it on my nexus 10 and it works flawlessly. I am trying to get the multi boot menu on my galaxy nexus but it results in a boot loop every time. It's stock 4.2.2 (fresh factory image odex). I am flashing the appropriate odex version but no luck. Is there any advice you can give me? Thank you
[Samsung Galaxy Nexus] albsat:
Re: [MOD][Deodexed/Odexed][All JB Versions] Multi-Reboot Power Menu & Volume Skip

Sorry to bring back this post. Would be possible to have multi power menu and volume wake instead the current combo. I mean to remove volume skip and have volume wake instead...

Thanks
[Samsung Galaxy Nexus] sga999:
With my Nexus 4, I did similar steps to yours, but I did not need to clear Play Music app data or fix permissions. Thanks for your tips about how to get it working.
[Samsung Galaxy Nexus] riannugrahaa:
would you like to add the screen shoot button ?
[Samsung Galaxy Nexus] xIC-MACIx:
Bringing odex versions into the mix presents a lot of variables b/c the gnex has 3 different variants. I didn't personally make the odex versions b/c of a lack of a toro factory IMG for 4.2.2. Which variant of the Gnex are you using? Now that the vzw variant has been updated I can personally odex this mod.

As for the G-Music update, they must have changed the method used to implement the lockscreen music. I have no clue as to what they changed, but a logcat might be useful for anyone that wants to provide one!
[Samsung Galaxy Nexus] hlaalu:
I'm on the Verizon galaxy nexus 4.2.2. Many thanks for taking the time to make this!
[Samsung Galaxy Nexus] Samu 17:
how can i replace stock?
[Samsung Galaxy Nexus] rskyline:
What do you mean?
[Samsung Galaxy Nexus] tshelby73:
So is a galaxy nexus toro odex version on the way? I tried the galaxy nexus odex version and just stays on nexus logo.
[Samsung Galaxy Nexus] inscythe:
Seeing that there's no one who did the N7 deodex version with the audio skip, I decided to do it myself.

This one is N7 grouper with the extended power menu and volume skip.
[Samsung Galaxy Nexus] hlaalu:
Nice! Can we temp you for a toro version? :)
[Samsung Galaxy Nexus] tshelby73:
+1 but power menu only would also be nice
[Samsung Galaxy Nexus] hlaalu:
Yup. I might just deodex, but I really like the performance of pure stock so far. For now I've been using switch pro widget that's in my notification bar.
[Samsung Galaxy Nexus] desertflame:
Would this pose any problems if OTA updating? I installed this a while back and made a nandroid just in case. (i like my phones stock, rooted)
[Samsung Galaxy Nexus] hlxanthus:
It likely will break OTA, especially of you flash one of my full packages that zipaligns and updates apps etc. Always a good idea to keep a nandroid on hand. :)
[Samsung Galaxy Nexus] xIC-MACIx:
If anyone wants to odex a version for the Toro that would be great! Now that there is a factory toro release for 4.2.2, I can do an odex version. Problem is, I'm a full-time college student with multiple finals coming up, it might be a while until I can do anything.

Yupp, would break OTA as it runs a check for system files.
[Samsung Galaxy Nexus] rskyline:
Anyone has the original file for the nexus 4 that i need to replace to have ota?

Enviado desde mi Nexus 4 usando Tapatalk 2
[Samsung Galaxy Nexus] noodles2224:
I second this too, please.. But in a flashable format. Thank you. Odex version..

Sent from my Nexus 4
[Samsung Galaxy Nexus] DeaconBoogie:
4.2.2 AOSP de-odexed here... Installed the correct zip and phone would not allow me to pass the unlock screen. Nandroid time!
[Samsung Galaxy Nexus] HMJ-q8:
THANKS !!

wish you post this on Nexus 4 section
[Samsung Galaxy Nexus] gpvecchi:
Anything for Nexus 4 leaked 4.3? Thanks!

---------- Post added at 11:08 PM ---------- Previous post was at 11:06 PM ----------

Please, version for Nexus 4 leaked 4.3.... Thanks!
[Samsung Galaxy Nexus] xIC-MACIx:
Not until it is officially released.
[Samsung Galaxy Nexus] daniel57:
Hi !

I have flash the zip file on my GN with rom stock.

The flash suceed but any new reboot option appears.

Sorry for my English
[Samsung Galaxy Nexus] HMJ-q8:
You can find option after you click reboot
[Samsung Galaxy Nexus] itasoulas:
hey	xIC-MACIx

any chance you update your mods now that factory images are out?
[Samsung Galaxy Nexus] boykioy:
Please update to 4.3 thank you
[Samsung Galaxy Nexus] jjhiza:
Not too demanding, are we? :rolleyes:
[Samsung Galaxy Nexus] Ghisy:
I would love it if the OP could update this for 4.3. Thank you :)
[Samsung Galaxy Nexus] :
i need it...but.. i will wait with patience until you release
[Samsung Galaxy Nexus] VictorML:
Patiently waiting for a 4.3 version for the Galaxy Nexus :)

Thanks a lot for the work you do guys... it makes this community awesome.
[Samsung Galaxy Nexus] xIC-MACIx:
I've got them put together, but I need a tester before I post them. There isn't a completely stock 4.3 rom for toro yet, so I can't test ATM.

Let me know and I'll PM the flashable zip!

- Mac
[Samsung Galaxy Nexus] X_N_:
Just sent you a PM.
[Samsung Galaxy Nexus] fernandezhjr:
I will test if needed. I'm stock rooted 4.3 on my N4.
[Samsung Galaxy Nexus] naijaguy:
Willing to test. I am on stock 4.3 Galaxy Nexus GSM (MAGURO).
[Samsung Galaxy Nexus] mwalt2:
I built stock toro from AOSP. Everything for the mod is the same except the following:

const v3, 0x104033e needs changed to const v3, 0x1040360 in GlobalActions.smali so that it will say reboot instead of pattern lock something or other :).
[Samsung Galaxy Nexus] xIC-MACIx:
What's funny is I was actually looking for your rom thread b/c you always keep the mods separate. I ended up using my Nexus 10's rom since android.policy is identical to the GNex.

4.3 version of power menu mod is available for download in OP. Thanks [MENTION=4506379]X_N_[/MENTION] for helping me test things out!

- Mac
[Samsung Galaxy Nexus] mulbyungjahri:
Huge thanks!! :) :good: :) Working great!

4.3 Odexed version and your Multi-Reboot source, I hope you don't mind.
[Samsung Galaxy Nexus] capychimp:
This is for stock maguro?
[Samsung Galaxy Nexus] mulbyungjahri:
Yeah, Stock maguro odex.

For deodex, in OP
[Samsung Galaxy Nexus] capychimp:
Thank you, saved me time, now I don't have to fix it myself hehe. Then I can just fix up quick settings
[Samsung Galaxy Nexus] gpvecchi:
Odexed Nexus 4, please...:crying:
[Samsung Galaxy Nexus] inscythe:
Compatible with grouper?
[Samsung Galaxy Nexus] :
thanks bro

works perfect on my maguro deodexed :victory:
[Samsung Galaxy Nexus] itlnstln:
I don't think so. I flashed the de-odexed version on my N7 and it didn't work. It works fine on my N4, though.
[Samsung Galaxy Nexus] Jagoflax:
+1, thanx!
[Samsung Galaxy Nexus] fernandezhjr:
Thanks!! Also working on my N4.
[Samsung Galaxy Nexus] kgraphic:
My N4 went into boot loop after flash it with cwm 6.0.3.1. I had to restore the system from recovery.

I have not tried again yet, some ideas?

Thanks!
[Samsung Galaxy Nexus] itlnstln:
Was it the odex version? The de-odexed version works fine on my N4 (stock, de-odexed), but the odex version did not on the stock image (boot loop). I use TWRP 2.5.
[Samsung Galaxy Nexus] Sesme:
Maguro power menu run's no skip tracks... :S
[Samsung Galaxy Nexus] fernandezhjr:
I'm also using deodexed and twrp for recovery as the other person that replied to you.
[Samsung Galaxy Nexus] kgraphic:
So I can use the deodexed version? I have the stock odex rom.
[Samsung Galaxy Nexus] fernandezhjr:
No, this is why you are bootlooping.
[Samsung Galaxy Nexus] kgraphic:
But i've used the Odex version posted in the #288 post... or i misunderstood :confused:

thanks again
[Samsung Galaxy Nexus] fernandezhjr:
That one is for aokp based.
[Samsung Galaxy Nexus] cargobr151:
The odex Reboot Mod works fine with the Stock GSM yakju GNexus.

If you flash this on a N4 - no idea if it works.
[Samsung Galaxy Nexus] kgraphic:
you are right! :fingers-crossed:

I will wait for the right one..
[Samsung Galaxy Nexus] noodles2224:
Can you make odex version please 4.3

Sent from my Nexus 4
[Samsung Galaxy Nexus] capychimp:
Do reboot and hot boot work for you ? Mine just exits
[Samsung Galaxy Nexus] VictorML:
Thanks a lot guys. The odexed version works perfectly in my Galaxy Nexus :)

Any chance of adding the volume skip thing as well? I was so used to this from previous roms that I'm really missing it...
[Samsung Galaxy Nexus] r_dub:
For some reason after flashing this my reboot menu comes out looking like this anyone know what's up with that? I'm using deodexed version on muzzys toro build just fyi.
[Samsung Galaxy Nexus] capychimp:
Toro is carrier ROM so resources are different you need it nodded for toro
[Samsung Galaxy Nexus] r_dub:
Ah makes sense. Thanks I can live with it like this until someone gets around to it everything still works like it should.