{TUT} How to Odex your APKs.

Search This thread

mavd5831

Senior Member
Sep 24, 2007
347
175
NYC
little-melon.com
Google Pixel 7 Pro
EDIT: I apologize for not including this earlier, but I have attached dexopt-wrapper.bin to the bottom of the post. Unzip and push it to system/bin. Then give it the correct permissions which are

Read Write Execute
--x----x------x
--x-----------x
--x-----------x


I haven't seen any tutorials on how to odex an apk sooooo i thought i'd throw one up on here.

Before we begin, of course, a great big thank you to strongsteve, mpcdata and Capp5050.


Well first things first make a nandroid backup in recovery. Once thats done follow these steps.

Apps needed if doing it on the phone:

1. Rom Toolbox (I have the paid version)
(You can also just download a terminal emulator)

2.Get both Root Explorer and Astro File Manager.

3.Use Root Explorer and go to either system/app or data/app (system/app is for system files{most if not ALL of these files are already odexed} data/app is where you can find the apps you've installed from the market{!!!-I'm pretty sure the launchers are in system/app-!!!})

4.Copy the app that you want to odex into a new folder on your internal sdcard named "app"(in case you mess up you don't get problems ;D)

5.I suggest you write down the name of the app so you don't have to go back and forth if you have horrible memory like me =D.

6.Open up your terminal emulator and type

dexopt-wrapper /sdcard/app/insert.name.of.file.here.apk /sdcard/app/insert.name.of.file.here.odex

7.Press enter and check that new folder you made named "app", you should see both the .apk and the .odex file.

8.Next long press the .apk file in Root Explorer and hit Open With and then select Astro File Manager. Astro should pop up with three choices, you're going to click Browse File.

9.In that file you should see "classes.dex". DELETE that file.

(NOTE: you MUST do this from within Astro because if you unzip it will break the signature and file will be usless{unless you can resign it})

10.Once done you exit Astro and head back into Root Explorer, copy the .apk and .odex files and put them back into the folder you got the original .apk from (system/app or data/app)

11.Once you put both of them in there you need to fix the permissions, simply long press on the files (one at a time ;D) and scroll down the pop-up menu to Permissions.

12.You will have three columns Read, Write and Execute along with three rows Owner, Group and Others.

Your Permissions should be (this is for both .apk and .odex)

Read Write Execute
--X----X-----------
--X----------------
--X----------------

(I've attached a picture below of what your permissions should look like)

13.Once your permissions match the above diagram hit OK and restart your phone and your app is officially ODEXED.



If you have any questions feel free to PM me. I'll be glad to help with as much as i can. =D

NOTE:To Everyone: If i forgot something PLEASE let me know.
: To Mods: If this shouldn't be here please move it (if unnecessary, delete it)
 

Attachments

  • 1327440023235.jpg
    1327440023235.jpg
    19.2 KB · Views: 2,988
  • dexopt-wrapper.zip
    2.5 KB · Views: 4,407
Last edited:

BigJPNut

Senior Member
Jan 21, 2011
1,809
571
....um one major thing...your gonna need dexopt-wrapper script in system/bin to be able to odex within the rom
 
  • Like
Reactions: mavd5831

Optimal Carnage

Senior Member
Nov 5, 2010
300
39
Cleveland, OH
Hmmm have you put dexopt-wrapper.bin in system/bin and gave it permissions?

And did you copy the apk into sdcard/app?

Sent from my SPH-D710 using xda premium

Yeah I copied the bin file as well as copied the app to the sdcard location. I'm trying to get scrolling wallpaper back after el29 and somebody posted the old apk but it's deodexed and I'm odex on my phone.

Sent from my SPH-D710 using xda premium
 

mavd5831

Senior Member
Sep 24, 2007
347
175
NYC
little-melon.com
Google Pixel 7 Pro
Yeah I copied the bin file as well as copied the app to the sdcard location. I'm trying to get scrolling wallpaper back after el29 and somebody posted the old apk but it's deodexed and I'm odex on my phone.

Sent from my SPH-D710 using xda premium

Im not sure but check to see if the app folder you created is App or app and try it however it is there

Sent from my SPH-D710 using xda premium
 

mavd5831

Senior Member
Sep 24, 2007
347
175
NYC
little-melon.com
Google Pixel 7 Pro
You can also try odexing it from within its originl folder
Ex. dexopt-wrapper /data/app/galleries.apk /data/app/galleries.odex and then copy the apk somewhere outside the data folder and delete the classes.dex file then put it back in the data folder and set permissions.

Sent from my SPH-D710 using xda premium
 

JohnCorleone

Senior Member
Dec 19, 2010
16,188
5,864
Whittier,CA
Thirded. Lol. I learned how to odex my apps this morning! Worked first try. Great instructions. Thanks

Sent from my SPH-D710 using Xparent Blue Tapatalk 2
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 65
    EDIT: I apologize for not including this earlier, but I have attached dexopt-wrapper.bin to the bottom of the post. Unzip and push it to system/bin. Then give it the correct permissions which are

    Read Write Execute
    --x----x------x
    --x-----------x
    --x-----------x


    I haven't seen any tutorials on how to odex an apk sooooo i thought i'd throw one up on here.

    Before we begin, of course, a great big thank you to strongsteve, mpcdata and Capp5050.


    Well first things first make a nandroid backup in recovery. Once thats done follow these steps.

    Apps needed if doing it on the phone:

    1. Rom Toolbox (I have the paid version)
    (You can also just download a terminal emulator)

    2.Get both Root Explorer and Astro File Manager.

    3.Use Root Explorer and go to either system/app or data/app (system/app is for system files{most if not ALL of these files are already odexed} data/app is where you can find the apps you've installed from the market{!!!-I'm pretty sure the launchers are in system/app-!!!})

    4.Copy the app that you want to odex into a new folder on your internal sdcard named "app"(in case you mess up you don't get problems ;D)

    5.I suggest you write down the name of the app so you don't have to go back and forth if you have horrible memory like me =D.

    6.Open up your terminal emulator and type

    dexopt-wrapper /sdcard/app/insert.name.of.file.here.apk /sdcard/app/insert.name.of.file.here.odex

    7.Press enter and check that new folder you made named "app", you should see both the .apk and the .odex file.

    8.Next long press the .apk file in Root Explorer and hit Open With and then select Astro File Manager. Astro should pop up with three choices, you're going to click Browse File.

    9.In that file you should see "classes.dex". DELETE that file.

    (NOTE: you MUST do this from within Astro because if you unzip it will break the signature and file will be usless{unless you can resign it})

    10.Once done you exit Astro and head back into Root Explorer, copy the .apk and .odex files and put them back into the folder you got the original .apk from (system/app or data/app)

    11.Once you put both of them in there you need to fix the permissions, simply long press on the files (one at a time ;D) and scroll down the pop-up menu to Permissions.

    12.You will have three columns Read, Write and Execute along with three rows Owner, Group and Others.

    Your Permissions should be (this is for both .apk and .odex)

    Read Write Execute
    --X----X-----------
    --X----------------
    --X----------------

    (I've attached a picture below of what your permissions should look like)

    13.Once your permissions match the above diagram hit OK and restart your phone and your app is officially ODEXED.



    If you have any questions feel free to PM me. I'll be glad to help with as much as i can. =D

    NOTE:To Everyone: If i forgot something PLEASE let me know.
    : To Mods: If this shouldn't be here please move it (if unnecessary, delete it)
    3
    ....um one major thing...your gonna need dexopt-wrapper script in system/bin to be able to odex within the rom

    Dexopt-wrapper is a binary.. Not a script..

    Sent from my SPH-D710 using Tapatalk
    3
    Me too, I just found this thread on deodexing as well: http://xdaforums.com/showthread.php?t=1208320
    Is that the only and proper way?

    Sent from my SPH-D710 using Tapatalk

    Smali supports deodex.

    java -jar baksmali.jar -x app.odex

    java -Xmx512M -jar smali.jar out -o classes.dex
    2
    Was actually just wondering about that cause my script was in the rom already. Ill look into that in a few cause I'm going back to bed XD and you're welcome Cole I hope it has clear instructions XD

    Sent from my SPH-D710 using xda premium
    1
    Alred hit yo button but just wanted to say thank you in writing.