Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[TOOL]Universal Deodexer for Bash

OP Tory Gaurnier

16th April 2014, 07:58 AM   |  #1  
Tory Gaurnier's Avatar
OP Member
Thanks Meter: 26
 
34 posts
Join Date:Joined: Mar 2014
More
WARNING: I am not responsible for you breaking your phone, you need to make sure you have a PROPER backup before using this tool, and if you don't know what a proper backup is, then I suggest you do more research before attempting something like this.

ABOUT
This is a bash script I just wrote, it can deodex your entire phone, or just a specified file, it can also restore the original odexed files. You can just drop the files in the working directory, or you can add them to your global $PATH variable, either way it will be able to work (even if you use a symlink for the $PATH variable, it'll still be able to detect where the included smali and baksmali files are).

DEPENDANCIES
Bash (obviously), 7z, adb, and realpath (might not be installed by default on most Linux distros)
Code:
sudo apt-get install p7zip && sudo apt-get install realpath
IMPORTANT
I consider this script to be in Beta, even though I tested it thoroughly on my phone, until more people test it you need to be prepared that it may not work 100% on your phone, and if it doesn't PLEASE copy and paste the command output, I want this script to work on as many devices as possible but that requires people to let me know when it doesn't work for them.

FOR THIS TO WORK PROPERLY MAKE SURE YOU ARE BOOTED TO RECOVERY WITH THE SYSTEM PARTITION MOUNTED

Example Usage

deodex --all
-This will scan your phone for odexed files, pull them, deodex them, push them back, and delete the odex files from the phone

deodex <file_name_without_extension>
-This is not as useful, it does the same thing as the --all option, except it only deodexes the specified file
-Example: deodex SystemUI (notice you leave off the extension, THIS IS IMPORTANT, file name ONLY without extension)

deodex --restore
-This will restore all your original files back to the phone (as long as you didn't delete the original folder that was created when deodexing )


The project is located on GitHub:
https://github.com/tgaurnier/UniversalDeodexer
Last edited by Tory Gaurnier; 17th April 2014 at 09:50 AM. Reason: Added dependancies
Post Reply Subscribe to Thread

Tags
deodex, mod
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes