[Utility][win] De-Odexer and Odexer Tool

Search This thread

t-minik

Senior Member
Feb 16, 2011
289
45
Prades le lez
Hi majdinj, thanks for your great work.

I tried to use your app with my Acer V370 liquid E2 (Mediatek MT6589 SoC) but it stop working at pushing dextop-wrapper on /system/bin

I tried to mount /system read/write manually before the process and commenting the 2 lines from your script :
Code:
echo Mounting System partition as Read/Write,,
echo Please accept SU permissions if prompt in your device
     [user=302893]@adb[/user] shell "su" "" "mount -o remount,rw /system" > nul
     [user=302893]@adb[/user] remount > nul

the problem remains the same ...

Code:
  ---------------------------------------------------------------------------- 
  |23/07/2013                         --                         11:29:24| 
  ---------------------------------------------------------------------------- 
failed to copy 'C:\apk\DeodexOdex\tools\dexopt-wrapper' to '/system/bin/dexopt-wrapper': Permission denied

does anyone have a clue ?


EDIT // please don't bother this post.

adbd insecure noob ....


Works perfect on Acer Liquid E2 Duo V370 :good:

great work man !
 
Last edited:
  • Like
Reactions: majdinj

bombaybadboy

Senior Member
Apr 22, 2012
7,782
16,693
Wherever
Hi majdinj, thanks for your great work.

I tried to use your app with my Acer V370 liquid E2 (Mediatek MT6589 SoC) but it stop working at pushing dextop-wrapper on /system/bin

I tried to mount /system read/write manually before the process and commenting the 2 lines from your script :
Code:
echo Mounting System partition as Read/Write,,
echo Please accept SU permissions if prompt in your device
     [user=302893]@adb[/user] shell "su" "" "mount -o remount,rw /system" > nul
     [user=302893]@adb[/user] remount > nul

the problem remains the same ...

Code:
  ---------------------------------------------------------------------------- 
  |23/07/2013                         --                         11:29:24| 
  ---------------------------------------------------------------------------- 
failed to copy 'C:\apk\DeodexOdex\tools\dexopt-wrapper' to '/system/bin/dexopt-wrapper': Permission denied

does anyone have a clue ?


EDIT // please don't bother this post.

adbd insecure noob ....


Works perfect on Acer Liquid E2 Duo V370 :good:

great work man !

so what was the answer noob here to at this

failed to copy 'C:\Mandinj deodex tool\tools\dexopt-wrapper' to '/system/bin/dexopt-wrapper': Permission denied
* server not running *

what did i miss?
 

majdinj

Senior Member
Nov 25, 2006
980
3,442
AlAhsa
  • Like
Reactions: bombaybadboy

bombaybadboy

Senior Member
Apr 22, 2012
7,782
16,693
Wherever
I have installed adbd insecure app now and will try again when I can get on the pc next. Thanks guys :)

Sent from my GT-I9100 using xda premium
 

luigimak

Senior Member
Oct 6, 2012
56
117
Catania
OnePlus 7 Pro
OnePlus 10 Pro
Yeah sure.......I tried it on my galaxy note gt n7000.
Thanks again for the great work:

Sent from my GT-N7000 using xda premium

---------- Post added at 11:54 PM ---------- Previous post was at 11:49 PM ----------

Yeah sure.......I tried it on my galaxy note gt n7000.
Thanks again for the great work:


Sent from my GT-N7000 using xda premium

you can add compatibility with Note3 N9005?
 

Tehs

Member
Jan 10, 2014
8
0
i used this tool to deodex and edit an apk (in lenovo A660) and then reodexing it. It is really helpful and straightforward. Great work :good:
What i had to change a bit in the script is to make it wait while deodexing just before "echo B. Smali classes output into classes.dex file,," in order to edit the .smali files.
 

JrSmilez

Senior Member
Mar 15, 2013
360
415
Monroe
Thank you sir for your hard work. This is the only tool I've found that will deodex the LG G2 rom I'm on.
 

GreatApo

Senior Member
Feb 15, 2011
1,093
664
Lenovo A850
Amazon Fire HD 8 and HD 10
Awesome tool!
Works with Lenovo A850 :good:

I added an option in the A menu so you can also decompile the classes.dex file of a jar.
No extra tool needed :)

View attachment 2898413

Add at the bottom of the bat:
Code:
:class_decompile
if %capp%==None goto noproject1
IF NOT EXIST "%~dp0/finish/Deodexed_%capp%" ( goto noproject3 )
echo.
cd "%~dp0tools"
echo Extacting Backsmali classes from Deodexed_%capp%,,
java -Xmx%heap%M -jar baksmali.jar -x "../finish/Deodexed_%capp%" -o "../finish/%capp%-classout"
IF errorlevel 1 (goto error)
echo.
rmdir /S /Q temp
mkdir temp
echo.
echo Your files are saved in "finish" folder as:
echo /%capp%-classout
goto OpenFinish

:noproject3
echo.
echo                        *************
echo                        *   ERROR   *
echo                        *************
echo.
echo    Please deodex first your Current Android Aplication. 
echo                         (Option 3)
echo.
PAUSE
goto restart
And change the menu in order to redirect you at "class_decompile" when you press the d or D button
(menu starts at line 140)
Code:
IF %menu%==d (goto class_decompile)
IF %menu%==D (goto class_decompile)

All credits goes to majdinj.
 
Last edited:
  • Like
Reactions: User_99

Top Liked Posts

  • There are no posts matching your filters.
  • 39
    De-Odexer and Odexer Tool


    31p7.png

    To odex app or deodex app? That is the question..!!

    Well, depending on whom you ask, each option is preferable to the other. In reality, both have their own unique pros and cons. While a Deodexed ROM will undoubtedly be much more receptive to customization, an Odexed ROM may feel a little snappier under certain circumstances.

    4p3.png

    Odex files
    Advantages:
    • Speed up loading as odex is uncompressed and already optimized
    • Saves space as no need to put optimized dex in Dalvik-cache (already have the ODEX file in /system/framework or /system/app)
    Disadvantages:
    • Can not make modifications to apks or jars
    • Can not be themed
    • Can not change BOOTCLASSPATH if system libraries are affected

    Deodex files
    Advantages:
    • Can make modifications to apks and jars
    • Can be themed easily
    • Can change/add/remove libraries and thus recompile all the current apks with the new implementation
    Disadvantages:
    • Slower loading but just the one time when a modification is done or Dalvik-cache cleaned (wiped).
    • Space needed to put optimized dex in Dalvik-cache

    If you still not familiar with the difference between odex and deodex files, check out XDA Elite Recognized Developer Adam Outler’s Pro Tip Number 5: Why You Should Odex and Deodex


    Making modifications to an Odexed file requires a tedious and time consuming process of Deodexing, modifying, and then Reodexing. So here I thought, why not to have a tool by which I could deodex a targeted application, then I can do my modifications, then odex back the file again.. So it was the birth of this tool.. yey ;)

    With power of baksmali and smali codes (credits to JesusFreke), and dexopt-wrapper and busybox binaries (credits to Denys Vlasenko); I have came up with this tool..

    xq1.png
    toim.png

    As Adam said, each device might need special way for odexing back.. So I don't know whether this tool will work on other devices other than Samsung GT-N7000 or not (but tectonically it should - give it a try and tell us your results :laugh:).

    How to use:
    It is simple.. Just click on Deodexer-Odexer-Tool.bat file and it will automatically create all needed folders.. As in splash screen explains..
    A. For Deodexing:
    1- Put whole framework files in "framework-dependencies" folder; you can use pull option in this tool.
    2- Put jar or apk files, that you will deodex with their corresponding odex files in "put-file-here" folder.
    3- Set Current-apk/jar and Current-Odex and start deodexing process.

    B. For Odexing:
    1- Put deodexed file in "finish" folder and name it as Deodexed_xx.x; example: Deodexed_SystemUI.apk, Deodexed_android.policy.jar
    2- Put the original odex with its original corresponding jar or apk files in "put-file-here" folder.
    3- Current-apk/jar, and Current-Odex are set to original files.
    4- Set device to USB debugging mode and connected to PC.
    5- Start odexing process.
    The odexing process will push all needed files to your device, then it will pull the final odex files and will delete all temp files pushed to the device. This might requires root access permission since it will write on system partition and insecure boot.img or adbd insecure pre-installed on the device (credits to Elite Recognized Developer Chainfire for this app).


    s54r.png

    - Deodexer-Odexer-Tool_v1.0 @ 1/July/2013


    Change-log:
    @ 1/July/2013 (v1.0):
    - First release...


    3
    So far tested and worked flawlessly on:
    >> Samsung Devices:
    - Samsung Galaxy Note I (GT-N7000).
    - Samsung Galaxy Note II (GT-N7100).
    - Samsung Galaxy Note 10.1 (GT-N8000 - GT-N8010 - GT-N8013 - GT-N8020).
    - Samsung Galaxy S3 (GT-I9300).
    - Samsung Galaxy S II (GT-I9100) - Thanks to remuntada78 for testing.

    >> Sony Devices:
    - Sony Xperia T (LT30p) - Thanks to eybee1970 for testing.

    >> Acer Devices:
    - Acer V370 liquid E2 - Thanks to t-minik for testing.







    Needs more testing from other devices platforms,,,
    2
    De-Odexer and Odexer Tool


    31p7.png

    To odex app or deodex app? That is the question..!!

    Well, depending on whom you ask, each option is preferable to the other. In reality, both have their own unique pros and cons. While a Deodexed ROM will undoubtedly be much more receptive to customization, an Odexed ROM may feel a little snappier under certain circumstances.


    thanks for sharing but it work for galaxy s2 too?
    2
    You must use adbd insecure app by chainfire ;)

    Sent from my A1-810 using xda app-developers app
    1
    Awesome tool!
    Works with Lenovo A850 :good:

    I added an option in the A menu so you can also decompile the classes.dex file of a jar.
    No extra tool needed :)

    View attachment 2898413

    Add at the bottom of the bat:
    Code:
    :class_decompile
    if %capp%==None goto noproject1
    IF NOT EXIST "%~dp0/finish/Deodexed_%capp%" ( goto noproject3 )
    echo.
    cd "%~dp0tools"
    echo Extacting Backsmali classes from Deodexed_%capp%,,
    java -Xmx%heap%M -jar baksmali.jar -x "../finish/Deodexed_%capp%" -o "../finish/%capp%-classout"
    IF errorlevel 1 (goto error)
    echo.
    rmdir /S /Q temp
    mkdir temp
    echo.
    echo Your files are saved in "finish" folder as:
    echo /%capp%-classout
    goto OpenFinish
    
    :noproject3
    echo.
    echo                        *************
    echo                        *   ERROR   *
    echo                        *************
    echo.
    echo    Please deodex first your Current Android Aplication. 
    echo                         (Option 3)
    echo.
    PAUSE
    goto restart
    And change the menu in order to redirect you at "class_decompile" when you press the d or D button
    (menu starts at line 140)
    Code:
    IF %menu%==d (goto class_decompile)
    IF %menu%==D (goto class_decompile)

    All credits goes to majdinj.