[Galaxy S Advance I9070 General] anantttt:
GUIDE

This is a guide to help you de-odex your Jellybean odexed firmware.

As X-ultimate is not working on jellybean firmwares and [MENTION=5052628]Agadoo[/MENTION] spends a lot of time deodexing every firmware, I thought this guide can help a lot of people including [MENTION=5052628]Agadoo[/MENTION].

THINGS TO REMEMBER :-

1. I AM “ NOT AT ALL RESPONSIBLE” FOR ANY SOFT-BRICKS OR ANY OTHER DAMAGES TO YOUR PC OR PHONE

2. WHEN YOU DEODEX YOUR FIRMWARE, SYSTEM WILL WRITE “.dex” FILES IN /data/dalvik-cache, WHICH WILL REDUCE SPACE IN THAT FOLDER.

3.YOU WILL READ THE WHOLE THREAD CAREFULLY BEFORE DOING ANYTHING.

There is a simple way to deodex your firmware i.e. using universal deodexer (http://xdaforums.com/showthread.php?t=2213235). Here, when I say simple, I mean the download and setup of this program is simple.

But a few features are missing in it. Firstly it cannot zipalign after deodexing the firmware. The second problem is a major problem , as far as I think. We have preload partition and a system partition in our phone. The “.apk” and “.odex” files stored in the preload partition, have symlinks in the system folder. It means there are a few “.apk” and “.odex” files in the system folders which are not actually applications but symlinks of those apps in preload folder. So you need to manually sort them out, which is a real pain in your a**. But don’t worry, the below mentioned method is different.

ANOTHER way to deodex, like Universal deodexer....... Carbonite tool (credits- adityaf) --- http://xdaforums.com/showthread.php?t=2226160 (ty kingbabasula)

***********************************************************************************************************************************************************************************************************************************************************

This method uses android kitchen (by dsixda) to deodex the firmware. SO ALL THE CREDITS GO TO HIM. Original thread ------- http://xdaforums.com/showthread.php?t=633246

Setup looks complex because I have given a detailed explanation on how to do it.

The guide is in two parts. First part in first post and the second in the second post.

PART - 1

PREREQUISITES :- (installing cygwin and android kitchen)

1.LATEST VERSION OF JAVA SHOULD BE INSTALLED ON YOUR PC.

2.CYGWIN……….

Go to (http://www.cygwin.com) and download the LATEST setup.exe file TO AVOID ERRORS. (Remember to install in C:\cygwin) SEE BELOW, HOW TO INSTALL.

************************************************************************************************************

Cygwin instructions for dsixda's Android Kitchen

-------------------------------------------------

1) Run the Cygwin setup.exe and select the defaults for the installation paths, such as:

- install from internet

- install to C:\cygwin

2) At the 'Select Packages' screen, go to the 'Search' box to look for the following package:

* gcc4 (found under 'Devel')

- Click on the '+' symbol at the section it's found under

NOTE:- IN THE SELECT PACKAGE SCREEN, UNTICK "HIDE OBSOLETEPACKAGES" IN BOTTOM LEFT CORNER, AND THEN SEARCH FOR "gcc4".

..................Now it would be found under "_obsolete" and not under DEVEL...... (thanks bob for pointing)

- Then find this single package (only the one with this exact name, not multiple similarly-named ones!) and click 'Skip' once so that it changes to show a version number

Go back to the Search box and repeat the above steps for the rest of the packages:

* libmpfr4 (found under 'Libs')

* perl (found under 'Interpreters')

* cpio (found under 'Utils')

* util-linux (found under 'Utils')

* ncurses (found under 'Utils')

* zip (found under 'Archive')

* unzip (found under 'Archive')

* wget (found under 'Web')

3) Press Next to proceed installing these packages.

4) When installation has been completed, click on your new Cygwin desktop shortcut. This will open a terminal session that will run some initialization.

5) With the Cygwin terminal still open, we need to configure the path to the Java application so that it can be executed within Cygwin.

In the terminal, type the command 'java' (without quotes). If it says 'command not found', then read the below. Otherwise, skip this section.

First, make a backup of your .bash_profile file in case you make a mistake later in this procedure.

Enter the following in the terminal:

cp .bash_profile .bash_profile.backup

Next, find out where your java.exe file is and run the appropriate command to add it to your Cygwin path.

For example, my java.exe is found under C:\Program Files\Java\jre7\bin, so I had to type:

echo "PATH=/cygdrive/c/Program\ Files/Java/jre7/bin:\${PATH}" >> .bash_profile

Modify the command above so that it matches the actual path to your installed Java.

Remember to add a "\" character before any spaces in your path, as shown above.

Type the following so that the file gets loaded (you only need to do this once):

source .bash_profile

There should not be any errors displayed if successful.

(Otherwise, if you made an error in the .bash_profile file, restore your backup by typing: cp .bash_profile.backup .bash_profile, and then try the procedure again)

If done correctly, then when you type 'java' it should display some help information.

6) Your Cygwin is now ready for the kitchen!

************************************************************************************************************

3. Now download the kitchen from dsixda’s github https://github.com/dsixda/Android-Kitchen/tags. (Click the zip option.)

4. Now create a folder kitchen inside C:\cygwin\home\ and extract the kitchen’s zip in that folder. Your kitchen is setup now.

View the next post for deodexing

Credits:

1. Cygwin

2. dsixda

3. BOBFRANTIC FOR REPORTING