[Guide] [Tutorial] How to Deodex Stock Rom using Universal Deodexer (Easiest Way) - Upgrading, Modifying and Unlocking

Hello Friends..!!!
This guide is for all who wants to deodex their roms for easy customization.
First Lets know some Basic knowledge about DEODEX/ODEX...
What is Odex and Deodex ROM
What is an ODEX file?
In Android file system, applications come in packages with the extension .apk.
These application packages, or APKs contain certain .odex files whose supposed function is to save space.
These ‘odex’ files are actually collections of parts of an application that are optimized before booting.
Doing so speeds up the boot process, as it preloads part of an application.
On the other hand, it also makes hacking those applications difficult because a part of the coding has already been extracted to another location before execution.
What is an DEODEX file?
Deodexing is basically repackaging of these APKs in a certain way, such that they are reassembled into classes.dex files.
By doing that, all pieces of an application package are put together back in one place, thus eliminating the worry of a modified APK conflicting with some separate odexed parts.
So, Deodexed ROMs (or APKs) have all their application packages put back together in one place,
allowing for easy modification such as theming. Since no pieces of code are coming from any external location,
custom ROMs or APKs are always deodexed to ensure integrity.
How this works?
For the majority noobs amongst us, Android OS uses a Java-based virtual machine called the Dalvik Virtual Machine.
A deodexed or .dex file contains the cache used by this virtual machine (referred to as Dalvik-cache) for a program, and it is stored inside the APK.
An .odex file, on the other hand, is an optimized version of this same .
dex file that is stored next to the APK as opposed to inside it.
Android applies this technique by default to all the system applications.
When an Android-based system is booting, the davlik cache for the Davlik VM is built using these .odex files, allowing the OS to learn in advance what applications will be loaded, and thus speeds up the booting process.
By deodexing these APKs, a developer actually puts the .odex files back inside their respective APK packages.
Since all code is now contained within the APK itself, it becomes possible to modify any application package without conflicting with the operating system’s execution environment.
Advanteges & Disadvantages
The advantage of deodexing is in modification possibilities.
This is most widely used in custom ROMs and themes. A developer building a custom ROM would almost always choose to deodex the ROM package first,
since that would not only allow him to modify various APKs, but also leave room for post-install theming.
On the other hand, since the .odex files were supposed to quickly build the dalvik cache, removing them would mean longer initial boot times.
However, this is true only for the first ever boot after deodexing, since the cache would still get built over time as applications are used.
Longer boot times may only be seen again if the dalvik cache is wiped for some reason.
Note: Themes for android come in APKs too, and if you want to modify any of those, you should always choose a dedoexed custom ROM.
Now Lets Start!!!
Requirements:-
1. Java installed on your PC
2. Universal Deodexer (Download from here - http://d-h.st/bMp)
3. Android SDK (for installing deodexed files)
Instructions:-
1. Now first of all you need to copy system/framework and system/apps folders from your phone to your PC. You can do this by simply using the Root Explorer or using ADB commands.
2. Download and extract the zip. You will get a folder called "Universal Deodexer V4"
3. Open the folder and place all your apks or jars from the apps folder in the "apks" folder. No need to manually check if a apk has the corresponding .odex file or not. Apks or Jars which do not have .odex files are automatically deleted.
4. Double click on Universal Deodexer V4.jar. If it does not open then right click--->Properties--->change the Opens With: to "Java(TM) Platform SE Binary". Now double click and it will open. If it still doesn't open then shift+right click anywhere in the folder and open a command prompt window there. Then type - "java -jar Universal Deodexer V4.jar" (no quotes) and see the output.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
5. Select the various options (android version, compression level, debug mode).
6. Then chose the deodex all apks option. Once the deodex is complete, you will get a popup message if it was successful or not.
7. You can find the deodexed apks in the "deodexed" folder. Copy them to some other folder and empty the "apks" and "deodexed" folder.
8. Now for framewok files, you also need to put them in the "apks" folder not in "framework" folder (because there is a bug in this tool).
9. Then you need to choose both the options deodex all apks and deodex all jars one by one.
10. Thats it... Done :good:
Now for installing deoedexed files in your phone:-
1. Put the phone in USB mass storage.
2. Go to folder where you have copied Deodexed apks and framework files and move them to the root of the sdcard.
3. Now get out from USB storage mode.
4. Go to the folder there you android SDK is installed. Go to C:\Program Files\Android\android-sdk\ [Assuming that your SDK is installed in C:\]. Then open a command prompt here. For this press Right Mouse click while holding the Shift key and select the "Open command window here" option.
5.Enter following codes.
(If you are using ADB shell in su for the first time, keep phone screen on. After entering "su" code, super user request prompt in phone. Press allow )
Code:
adb shell
su
stop
mount -o rw,remount /system/ /system/
cp /sdcard/done_app/* /system/app/
rm /system/app/*.odex
cp /sdcard/done_frame/* /system/framework/
rm /system/framework/*.odex
mount -o ro,remount /system/ /system/
reboot
6. Congrats...!!! Now you have deodexed rom :good: :victory:

Does this need unlocked bootloader?

ADB shell not working
divyamg28 said:
Hello Friends..!!!
This guide is for all who wants to deodex their roms for easy customization.
First Lets know some Basic knowledge about DEODEX/ODEX...
What is Odex and Deodex ROM
What is an ODEX file?
In Android file system, applications come in packages with the extension .apk.
These application packages, or APKs contain certain .odex files whose supposed function is to save space.
These ‘odex’ files are actually collections of parts of an application that are optimized before booting.
Doing so speeds up the boot process, as it preloads part of an application.
On the other hand, it also makes hacking those applications difficult because a part of the coding has already been extracted to another location before execution.
What is an DEODEX file?
Deodexing is basically repackaging of these APKs in a certain way, such that they are reassembled into classes.dex files.
By doing that, all pieces of an application package are put together back in one place, thus eliminating the worry of a modified APK conflicting with some separate odexed parts.
So, Deodexed ROMs (or APKs) have all their application packages put back together in one place,
allowing for easy modification such as theming. Since no pieces of code are coming from any external location,
custom ROMs or APKs are always deodexed to ensure integrity.
How this works?
For the majority noobs amongst us, Android OS uses a Java-based virtual machine called the Dalvik Virtual Machine.
A deodexed or .dex file contains the cache used by this virtual machine (referred to as Dalvik-cache) for a program, and it is stored inside the APK.
An .odex file, on the other hand, is an optimized version of this same .
dex file that is stored next to the APK as opposed to inside it.
Android applies this technique by default to all the system applications.
When an Android-based system is booting, the davlik cache for the Davlik VM is built using these .odex files, allowing the OS to learn in advance what applications will be loaded, and thus speeds up the booting process.
By deodexing these APKs, a developer actually puts the .odex files back inside their respective APK packages.
Since all code is now contained within the APK itself, it becomes possible to modify any application package without conflicting with the operating system’s execution environment.
Advanteges & Disadvantages
The advantage of deodexing is in modification possibilities.
This is most widely used in custom ROMs and themes. A developer building a custom ROM would almost always choose to deodex the ROM package first,
since that would not only allow him to modify various APKs, but also leave room for post-install theming.
On the other hand, since the .odex files were supposed to quickly build the dalvik cache, removing them would mean longer initial boot times.
However, this is true only for the first ever boot after deodexing, since the cache would still get built over time as applications are used.
Longer boot times may only be seen again if the dalvik cache is wiped for some reason.
Note: Themes for android come in APKs too, and if you want to modify any of those, you should always choose a dedoexed custom ROM.
Now Lets Start!!!
Requirements:-
1. Java installed on your PC
2. Universal Deodexer (Download from here - http://d-h.st/bMp)
3. Android SDK (for installing deodexed files)
Instructions:-
1. Now first of all you need to copy system/framework and system/apps folders from your phone to your PC. You can do this by simply using the Root Explorer or using ADB commands.
2. Download and extract the zip. You will get a folder called "Universal Deodexer V4"
3. Open the folder and place all your apks or jars from the apps folder in the "apks" folder. No need to manually check if a apk has the corresponding .odex file or not. Apks or Jars which do not have .odex files are automatically deleted.
4. Double click on Universal Deodexer V4.jar. If it does not open then right click--->Properties--->change the Opens With: to "Java(TM) Platform SE Binary". Now double click and it will open. If it still doesn't open then shift+right click anywhere in the folder and open a command prompt window there. Then type - "java -jar Universal Deodexer V4.jar" (no quotes) and see the output.
5. Select the various options (android version, compression level, debug mode).
6. Then chose the deodex all apks option. Once the deodex is complete, you will get a popup message if it was successful or not.
7. You can find the deodexed apks in the "deodexed" folder. Copy them to some other folder and empty the "apks" and "deodexed" folder.
8. Now for framewok files, you also need to put them in the "apks" folder not in "framework" folder (because there is a bug in this tool).
9. Then you need to choose both the options deodex all apks and deodex all jars one by one.
10. Thats it... Done :good:
Now for installing deoedexed files in your phone:-
1. Put the phone in USB mass storage.
2. Go to folder where you have copied Deodexed apks and framework files and move them to the root of the sdcard.
3. Now get out from USB storage mode.
4. Go to the folder there you android SDK is installed. Go to C:\Program Files\Android\android-sdk\ [Assuming that your SDK is installed in C:\]. Then open a command prompt here. For this press Right Mouse click while holding the Shift key and select the "Open command window here" option.
5.Enter following codes.
(If you are using ADB shell in su for the first time, keep phone screen on. After entering "su" code, super user request prompt in phone. Press allow )
Code:
adb shell
su
stop
mount -o rw,remount /system/ /system/
cp /sdcard/done_app/* /system/app/
rm /system/app/*.odex
cp /sdcard/done_frame/* /system/framework/
rm /system/framework/*.odex
mount -o ro,remount /system/ /system/
reboot
6. Congrats...!!! Now you have deodexed rom :good: :victory:
Click to expand...
Click to collapse
As per the above guide, i was able to deodex all system apk/framework. Then i have copied the deodexed apk and framework folder to the root of the sdcard as said above but at the time of running adb shell, all commands were accepted and except "cp /sdcard/done_app/* /system/app/", it says "cp: /sdcard/done_app/*: No such file or directories. By this, what does it mean, i don't know as it is available on sdcard and i can access it through root explorer. I am totally stuck here, kindly help me to get out of this ...

Problem using adb shell
[/INDENT][/INDENT][/INDENT][/INDENT][/INDENT]
gusato said:
As per the above guide, i was able to deodex all system apk/framework. Then i have copied the deodexed apk and framework folder to the root of the sdcard as said above but at the time of running adb shell, all commands were accepted and except "cp /sdcard/done_app/* /system/app/", it says "cp: /sdcard/done_app/*: No such file or directories. By this, what does it mean, i don't know as it is available on sdcard and i can access it through root explorer. I am totally stuck here, kindly help me to get out of this ...
Click to expand...
Click to collapse
Thanks for your advice but i think you didn't get my point, i have done all the process of deodexing apk n jar file successfully. Then i tried to push them bach into my fone with adb shell and it didn't work. Using adb shell when i entered
"cp /sdcard/done_app/* /system/app/" it says No such file or directory but when entered
"cp /sdcard/done_frame/* /system/framework/" it accept. Why this used to happen????????

Thank you so much !! This Worked really well on my Micromax a25:victory:

I tried it bt it doesn't work for me....showing some classpath error...however my java is perfectly install even test result show completely fine n every thing got passed

same here!
deoboy said:
I tried it bt it doesn't work for me....showing some classpath error...however my java is perfectly install even test result show completely fine n every thing got passed
Click to expand...
Click to collapse
Mybe theres somtething is missing in this guide! after deodexing both apks and jars, when i opened in archive still no classes.dex which is needed in decompling the apks. I think the boothclasspath is missing here?
---------- Post added at 10:40 AM ---------- Previous post was at 10:37 AM ----------
Guys can you help me decompiling the apks of huawei which being odexed? I have tried decompiling some apks of huawei and was successfully recompile without error. But my huawei g526 is odexed room which really hard to decompile. Can yopu help me? please?

divyamg28 said:
Hello Friends..!!!
This guide is for all who wants to deodex their roms for easy customization.
First Lets know some Basic knowledge about DEODEX/ODEX...
What is Odex and Deodex ROM
What is an ODEX file?
In Android file system, applications come in packages with the extension .apk.
These application packages, or APKs contain certain .odex files whose supposed function is to save space.
These ‘odex’ files are actually collections of parts of an application that are optimized before booting.
Doing so speeds up the boot process, as it preloads part of an application.
On the other hand, it also makes hacking those applications difficult because a part of the coding has already been extracted to another location before execution.
What is an DEODEX file?
Deodexing is basically repackaging of these APKs in a certain way, such that they are reassembled into classes.dex files.
By doing that, all pieces of an application package are put together back in one place, thus eliminating the worry of a modified APK conflicting with some separate odexed parts.
So, Deodexed ROMs (or APKs) have all their application packages put back together in one place,
allowing for easy modification such as theming. Since no pieces of code are coming from any external location,
custom ROMs or APKs are always deodexed to ensure integrity.
How this works?
For the majority noobs amongst us, Android OS uses a Java-based virtual machine called the Dalvik Virtual Machine.
A deodexed or .dex file contains the cache used by this virtual machine (referred to as Dalvik-cache) for a program, and it is stored inside the APK.
An .odex file, on the other hand, is an optimized version of this same .
dex file that is stored next to the APK as opposed to inside it.
Android applies this technique by default to all the system applications.
When an Android-based system is booting, the davlik cache for the Davlik VM is built using these .odex files, allowing the OS to learn in advance what applications will be loaded, and thus speeds up the booting process.
By deodexing these APKs, a developer actually puts the .odex files back inside their respective APK packages.
Since all code is now contained within the APK itself, it becomes possible to modify any application package without conflicting with the operating system’s execution environment.
Advanteges & Disadvantages
The advantage of deodexing is in modification possibilities.
This is most widely used in custom ROMs and themes. A developer building a custom ROM would almost always choose to deodex the ROM package first,
since that would not only allow him to modify various APKs, but also leave room for post-install theming.
On the other hand, since the .odex files were supposed to quickly build the dalvik cache, removing them would mean longer initial boot times.
However, this is true only for the first ever boot after deodexing, since the cache would still get built over time as applications are used.
Longer boot times may only be seen again if the dalvik cache is wiped for some reason.
Note: Themes for android come in APKs too, and if you want to modify any of those, you should always choose a dedoexed custom ROM.
Now Lets Start!!!
Requirements:-
1. Java installed on your PC
2. Universal Deodexer (Download from here - http://d-h.st/bMp)
3. Android SDK (for installing deodexed files)
Instructions:-
1. Now first of all you need to copy system/framework and system/apps folders from your phone to your PC. You can do this by simply using the Root Explorer or using ADB commands.
2. Download and extract the zip. You will get a folder called "Universal Deodexer V4"
3. Open the folder and place all your apks or jars from the apps folder in the "apks" folder. No need to manually check if a apk has the corresponding .odex file or not. Apks or Jars which do not have .odex files are automatically deleted.
4. Double click on Universal Deodexer V4.jar. If it does not open then right click--->Properties--->change the Opens With: to "Java(TM) Platform SE Binary". Now double click and it will open. If it still doesn't open then shift+right click anywhere in the folder and open a command prompt window there. Then type - "java -jar Universal Deodexer V4.jar" (no quotes) and see the output.
5. Select the various options (android version, compression level, debug mode).
6. Then chose the deodex all apks option. Once the deodex is complete, you will get a popup message if it was successful or not.
7. You can find the deodexed apks in the "deodexed" folder. Copy them to some other folder and empty the "apks" and "deodexed" folder.
8. Now for framewok files, you also need to put them in the "apks" folder not in "framework" folder (because there is a bug in this tool).
9. Then you need to choose both the options deodex all apks and deodex all jars one by one.
10. Thats it... Done :good:
Now for installing deoedexed files in your phone:-
1. Put the phone in USB mass storage.
2. Go to folder where you have copied Deodexed apks and framework files and move them to the root of the sdcard.
3. Now get out from USB storage mode.
4. Go to the folder there you android SDK is installed. Go to C:\Program Files\Android\android-sdk\ [Assuming that your SDK is installed in C:\]. Then open a command prompt here. For this press Right Mouse click while holding the Shift key and select the "Open command window here" option.
5.Enter following codes.
(If you are using ADB shell in su for the first time, keep phone screen on. After entering "su" code, super user request prompt in phone. Press allow )
Code:
adb shell
su
stop
mount -o rw,remount /system/ /system/
cp /sdcard/done_app/* /system/app/
rm /system/app/*.odex
cp /sdcard/done_frame/* /system/framework/
rm /system/framework/*.odex
mount -o ro,remount /system/ /system/
reboot
6. Congrats...!!! Now you have deodexed rom :good: :victory:
Click to expand...
Click to collapse
I had some few questions? After deodexing my apks and frameworks, I was able to check the classes.dex was there but why when I decompiled the apks then smali is empty? I thought that the size of deodexed apks would be bigger but the size of odexed apk still the same with deodexed apks? can you help to solve my problem? I dont why encounter ?
---------- Post added at 05:27 AM ---------- Previous post was at 05:10 AM ----------
deoboy said:
I tried it bt it doesn't work for me....showing some classpath error...however my java is perfectly install even test result show completely fine n every thing got passed
Click to expand...
Click to collapse
yes thats what I think coz after reading the error I thnink the bootclasspath is missing. hope it will be fixed soon...
---------- Post added at 05:34 AM ---------- Previous post was at 05:27 AM ----------
toto2011 said:
I had some few questions? After deodexing my apks and frameworks, I was able to check the classes.dex was there but why when I decompiled the apks then smali is empty? I thought that the size of deodexed apks would be bigger but the size of odexed apk still the same with deodexed apks? can you help to solve my problem? I dont why encounter ?
---------- Post added at 05:27 AM ---------- Previous post was at 05:10 AM ----------
yes thats what I think coz after reading the error I thnink the bootclasspath is missing. hope it will be fixed soon...please see attaeched photos
Click to expand...
Click to collapse

Hello, I have already pulled my .apks and .jars but nothing is appearing in the deodexed file. Here's the debug script of what happens with any one particular .apk:
deodexapk.bat said:
Welcome!
Deodexing apk..
Compression=0
API=17
'xcopy' is not recognized as an internal or external command, operable program or batch file.
Can't find the file AllshareMediaShare.odex
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Cannot find file or directory "out/" at org.if.smali.main.main(main.java:180)
'xcopy' is not recognized as an internal or external command, operable program or batch file.
Can't find the file AllshareMediaShare.odex
'xcopy' is not recognized as an internal or external command, operable program or batch file.
Can't find the file AllshareMediaShare.odex
'xcopy' is not recognized as an internal or external command, operable program or batch file.
Can't find the file AllshareMediaShare.odex
'7za' is not recognized as an internal or external command, operable program or batch file.
Can't find the file AllshareMediaShare.odex
'7za' is not recognized as an internal or external command, operable program or batch file.
Can't find the file AllshareMediaShare.odex
The system cannot find the file specified.
'xcopy' is not recognized as an internal or external command, operable program or batch file.
The system cannot find the file specified.
Could Not Find C:¥Users¥Teracotta¥Downloads¥Android¥Universal Deodexer V4¥framework¥AllshareMediaShare.odex
Could Not Find C:¥Users¥Teracotta¥Downloads¥Android¥Universal Deodexer V4¥framework¥classes.dex
The system cannot find the file specified.
Could Not Find C:¥Users¥Teracotta¥Downloads¥Android¥Universal Deodexer V4¥framework¥AllshareMediaShare.odex
DEODEXED SUCCESSFULLY.
Press any key to continue...
Click to expand...
Click to collapse
The Path I have set in Advanced Systems: C:\ProgramData\Oracle\Java\javapath;C:\Users\Teracotta\AppData\Local\Android\android-sdk\platform-tools

Related

[Q] Mod a mod to add custom apks preinstalled?

Hi..
I've had problems with Gmail and Maps applications previously with Neophyte ROMs. In that case one of the solutions was removing the apks for these apps from with the /system/app folder of the ROM zip.
My question is:
Is it possible to add our own apks to the custom ROM so that these apks come preinstalled on the ROM when someone flashes it..in a manner, a kind of 2nd generation mod?
Is it possible to add our own system variables and settings files so that the ROM autoinstalls it on First Install? In particular, I'd like to preset my own APN file for the network.
The simple answer is yes.
The entire system folder in the zip file is written to your /system partition, with the full architecture of folders and so on, so any changes made in there will also be on the system, when it is flashed.
There is also a script file, in the META-INF folder, which you can use to run commands to delete or edit something along with the flash, whenever the zip file is flashed. This is a bit more advanced though.
edit: it is the same for the data folder of course, which folders is flashed and where to is also specified in the script file mentioned above.
Thank you!
In that case, for installation of a program like Gmail.apk or Maps.apk, would be as simple as adding the .apk to the /system/app, or would I have to include other files? Would there be dependancies in other folders?
Well the apps have their own data folder on the data partition, but this is for storing changes in settings and so on, and it should be created by the app itself on first boot just like right after you wipe the data partition/factory reset
Thanks..Got some mod modding to do!
So in case I'd want to manually uninstall/manually install an apk, what would be the steps I'd have to go through?
Would there be filesystem config files (like the older Windows versions), or a central database of entries of the likes of the Registry tables of newer Windows? How does Android go about installing a file? Like which folders and files would be modified other than /system/app and /data/app? Any common files with entries? And in case of the latter, whether it would be machine readable or plain text?

[DEV][TUT] How to re-odex deodexed roms for use with link2sd

Requirements:
ADB
windows cmd
Ok here's how to re-odex a rom
Sense 2.1 GB 2.3.3 and 2.3.5 - use reodex_win_2.1.rar
Sense 3.5 GB 2.3.5 - use reodex_win_3.5.rar
Example here I'm using Thing ROM, but you can use this guide in any rom 2.3.5 or 2.3.3 and 3.5 deodexed
1.Extract ThingROM.zip delete all contents of /data/app/ only files not folder
2.Delete following files in /system/app/ folder
Gmail.apk
Herring.apk
Maps.apk
Slate.apk
Superuser.apk
Vending.apk
Youtube.apk
3.Re zip All extracted files name it anything you want copy to sdcard
4.Go to recovery wipe all then install the rom you have made
5.Once finished go to advanced> reboot recovery [note dont reboot system after flashing only reboot recovery]
6.Once recovery has started Go to mounts and mount system/ mount data/
7.Connect usb to phone then run odex script from the file I gave you, but you must extract it first ofcourse.
8.Once finished. open a new cmd window and type this: note you must have adb installed or open
a cmd in your adb folder. Make 2 folders in c: named app and framework
commands:
adb pull /system/app/ C:\app
then when finished next command
adb pull /system/framework/ c:\framework
now when finished copy c: app and framework folder to desktop
extract original rom cut 2 folders app and framework then move somewhere
then copy the app and framework folders from c: to the extracted rom.
9.copy back deleted files in 1. and 2. instructions.
10.re zip all files and name the rom to odexThingrom.zip or anything.
11.Now you can flash it. Then you will have 115MB free space odex rom
NOTE: Sometimes system partition becomes full and refuses to boot ROM cause no space to extract some files, if this happen try moving some apps in system/app to data/app like maps.apk/gmail.apk/facebook.apk/ etc.
Worked for me, thanks!
Can i use this on a single apk ?
Deleted
mm its seems to be easy. Thanks!
einstein.frat said:
Requirements:
ADB
windows cmd
Ok here's how to re-odex a rom
Sense 2.1 GB 2.3.3 and 2.3.5 - use reodex_win_2.1.rar
Sense 3.5 GB 2.3.5 - use reodex_win_3.5.rar
Example here I'm using Thing ROM, but you can use this guide in any rom 2.3.5 or 2.3.3 and 3.5 deodexed
1.Extract ThingROM.zip delete all contents of /data/app/ only files not folder
2.Delete following files in /system/app/ folder
Gmail.apk
Herring.apk
Maps.apk
Slate.apk
Superuser.apk
Vending.apk
Youtube.apk
3.Re zip All extracted files name it anything you want copy to sdcard
4.Go to recovery wipe all then install the rom you have made
5.Once finished go to advanced> reboot recovery [note dont reboot system after flashing only reboot recovery]
6.Once recovery has started Go to mounts and mount system/ mount data/
7.Connect usb to phone then run odex script from the file I gave you, but you must extract it first ofcourse.
8.Once finished. open a new cmd window and type this: note you must have adb installed or open
a cmd in your adb folder. Make 2 folders in c: named app and framework
commands:
adb pull /system/app/ C:\app
then when finished next command
adb pull /system/framework/ c:\framework
now when finished copy c: app and framework folder to desktop
extract original rom cut 2 folders app and framework then move somewhere
then copy the app and framework folders from c: to the extracted rom.
9.copy back deleted files in 1. and 2. instructions.
10.re zip all files and name the rom to odexThingrom.zip or anything.
11.Now you can flash it. Then you will have 115MB free space odex rom
NOTE: Sometimes system partition becomes full and refuses to boot ROM cause no space to extract some files, if this happen try moving some apps in system/app to data/app like maps.apk/gmail.apk/facebook.apk/ etc.
Click to expand...
Click to collapse
it works to me .thanks !
Sent from my MT15i using xda premium

[GUIDE]How to make your own rom

This is a simple guide to make your own custom rom……..(the other parts will be written…as soon as I become bothered to type for hours again)
PART 1:setup the kitchen and rom
1.Download java(java.com) and install the java JDK(www.oracle.com/technetwork/java/javase/downloads/index.html)
2.Download the kitchen(http://forum.xda-developers.com/showthread.php?t=633246) (thankyou DSIXDA for your amazing kitchen)
3.Download Cygwin(Cygwin.com)
3.extract the cygwin file(using winzip or winrar) in C drive only….dont put it into any folders
a.Enter a file called Cygwin(setup file)
b.click next>install from local directory
c.now it will ask you where to put the program….leave everything as default
d.now It will ask you where the location of the packages are so>click browse>click my computer >go to drive C>and you will fin the folder Cygwin-packages>so select that folder and click ok>next.
e.now it will extract the folders>a promt is going to pop up..>click ok
f.now you will see a list>go to the first line and you will see next to the word ALL ,two arrows>click on them so all files can be installed.
g.now it will install the program whick take from 5-10min.
h.when its done …select finish.
i.you can now delete the setup file and Cygwin-packages folder.
j.now enter the Cygwin program and it will create some files..>when its done exit the program….
Now Cygwin program is done installing .
3.To use the kitchen:
a.Enter Cygwin folder>home>your user name>so you will find 3 files
b.in the same folder>extract the kitchen zip file(Android-Kitchen-master.zip)
c.now enter the kitchen folder>you will find a folder called>put rom here.
d.so in that folder>either put a rom.zip file or put a system.img file if you want complete stock…..(which you get from the ruu of your phone)
e.now enter tools folder>edifly_......(something like that) and see if you mount points are in it…
f.to know go to your build.prop file>check ro.product.device>and if you see a txt file under the name of your device …..your device is supported…
g.if NOT,go to the original thread …where the dev has stated a way on how to add your device…..
Now we are done from the setup of the kitchen…..
To use the kitchen:
1.Enter Cygwin
2.type
a.cd kitchen>press enter
b. ./menu>press enter
Now a list of options will come infront of you ……
3.go to the option>setup working folder>enter its number and press enter…
4.now if you go to Cygwin folder >enter home>user name>kitchen.
5.you will find a folder called(working folder_8254897)
NOW YOU ARE DONE WITH SETTING UP THE KITCHEN……AND YOU CAN START PLAYING WITH THE ROM
PART 2:Clearing up the options
Explanation for each option:
1.creates you a working folder,which extracts the rom for you.
2. It gives you super user access aka SU, Some apps require root to work properly….so if your rom isn’t rooted … it’ll be useless.
3. Busy Box is something that you install on your phone to give you some additional handy LINUX / UNIX based commands. You need Busy Box installed because some commands are not available to you and you made need them for some root level tasks.
4.To disable sounds while phone is booting
5.To add you a tethering app…..and allow you do wireless tethering
6. Zipalign is an archive alignment tool. It optimizes the way an app is packaged. Doing so enables the operating system to interact with the application more efficiently, and has the potential to make the application and overall the whole system much faster. Execution time is minimized for zipaligned applications, resulting in a lower amount of RAM consumption when running the app.
7.If you want the rom to do a FULL WIPE while installing the rom
8.To change the name of the rom
9.Checks if the update script contains any errors….because if it did the rom wont be installed correctly,which may lead to a brick
10.To see all information about your rom..ex: if you have root access/if you aren’t using stock kernel/if you have app2sd support etc..
11. Apk files have respective odexes that devs use to supposedly save space. Deodexing means you convert it back to a .dex file and put it back inside the apk. This allows you to easily replace files (not having to worry about odexes), but the main point was to deodex services.jar so that you can change all text to different colors (such as the clock color to white) and to deodex services.jar, you need to deodex everything.
12.To add a task killer….which closes applications to free RAM
13.To add a /data/app folder so applications could be installed their rather than getting installed in system/app
14.To add text editor…for ex.if you want to edit build.prop or any txt file which is in system.
15.To add a command shell which allows you to use in in the terminal
16.To give the option of moving applications to sd card
17. To add /etc/init.d scripts support ….which allow you to add tweaks and stuff for the phone
18.To allow user to put the boot-animation that he desires.
19.To be able to extract the boot.img(kernel)
20.To extract data.img (which I don’t know what it is )
21.check this (http://developer.android.com/tools/publishing/app-signing.html)
22.To covert update script to updater script which is a must before you build the rom.
99.To build the rom when you finish editing and modding.
PART 3:How to mod apks
OK SO NOW SINCE YOU KNOW WHAT EACH OPTION DOES…..LETS START MODDING,and to start customizing,you have to use an apk extractor and zipper because the apks contain all the treasure …..for example:SystemUI.apk(contains battery icons ,signal icons, the location of the clock and many many more things)
So what were gonna use is apk manager,which is an very easy program to use,and helps a lot in apk extracting and zipping and signing.
Here are the steps to use it:
1.Extract the zip file(apk manager)
2.youll find a file called setup>enter it and select option 3 and press enter.
3.folders will be created
4.so to extract an apk>select an apk file and drop it into the folder (put apk here)
5.go into script file>press enter file>and after you’ve put the apk file in the specified folder>select option 2 >so the apk will be extracted
6.after you extract it you will find the extracted files it in the same folder(put apk here) in a new folder under the name of the apk file.
7.edit whatever you want
8.When you finish >select option 3>press enter.
9.then select option 5 and 6 to sign and zipalign the apk…..
And your done ,but to find the modded apk…..go into place apk here for signing and you will find it there.
.........................
RESERVVED
Reserved45
RESE8VED
Hayde reserved yaben 3amme
W hayde kamen yaben 5alte....................reserved
Sorry need help....
donhashem.dh said:
.........................
Click to expand...
Click to collapse
Hey dude/*****.....
Me again and loving yr tutorial. But do have a couple of questions that I hope you can help with.
Firstly the update version of Cygwin menu is not exactly as yours in the tutorial. Why is the allow Tethering function not there and could this be a problem.
Secondly i am nooooooB and are unsure on how to add remove system apk's from rom. Do I just dig in and delete them from windows. And can I pull apk's from another rom to put into the data app folder which was created using Cygwin.
I was wanting to add aroma installer as well but another story....
Really appreciate if you can advise. If I sound to noooobish then understrand that I am to much work.
veroby said:
Hey dude/*****.....
Me again and loving yr tutorial. But do have a couple of questions that I hope you can help with.
Firstly the update version of Cygwin menu is not exactly as yours in the tutorial. Why is the allow Tethering function not there and could this be a problem.
Secondly i am nooooooB and are unsure on how to add remove system apk's from rom. Do I just dig in and delete them from windows. And can I pull apk's from another rom to put into the data app folder which was created using Cygwin.
I was wanting to add aroma installer as well but another story....
Really appreciate if you can advise. If I sound to noooobish then understrand that I am to much work.
Click to expand...
Click to collapse
Ayyy take it easy cun*
I'll update the tutorial because I made it from a long time and posted it now
For the apks you just enter the rom.zip system>app and you'll find all the apks there..
The data folder cygwin creates is that when you use the Rom ..the apps won't be installed in system>app anymore,they will be installed the folder the kitchen created data
And for the aroma installer,leave it for later ...your still not ready for it ...
no signature....problem ?!?!?!
donhashem.dh said:
Ayyy take it easy cun*
I'll update the tutorial because I made it from a long time and posted it now
For the apks you just enter the rom.zip system>app and you'll find all the apks there..
The data folder cygwin creates is that when you use the Rom ..the apps won't be installed in system>app anymore,they will be installed the folder the kitchen created data
And for the aroma installer,leave it for later ...your still not ready for it ...
no signature....problem ?!?!?!
Click to expand...
Click to collapse
I was going to ask you about signature but didnt want to over do it. I am guessing you need to sign it after the 99 - Build ROM from working folder?
I have proceed with the Build rom and are at the recomend to sign rom stage. Its some thing I dont understand. Is it ok to proceed without?
Cool I have noticed the roms produced by dev's here xda are not signed so doesnt seem to matter for this purpose. I have hit thx ***** 5 or 6 times.
I will hit 500 s****y if you give share some knowledge in installing arroma installer. or do you recomend just trying things....cheers anyway its been awsome.....:good:

[MOD - GUIDE] ODEX any 4.1.1 deodexed ROM for note 2!! Save battery!!

This script will Odex your /system/framework/ directory live while booted into android. You can thank freeza for providing the original boot class path from the s3 when I was initially trying to do this on that platform. Tonight I was bored, and putting together my note II ROM and out of pure curiosity wanted to know if it would work straight across to this device as the framework directories of the two devices have similar contents... apparently the bootclasspath for the two devices are identical otherwise this script wouldn't have executed in the first place. But it did! So here we go. Devs, feel free to place this is in your ROMs as an optional add on. It should be noted that most themes for the UI are not odex compatible, and will cause boot loops if flashed. BUT... you can flash a theme, modifying your framework (as a theme does) THEN run this script
This is beneficial for those who flash deodexed ROMs in order to theme. The idea is simple: find your favorite theme/ROM, then optimize it using this script.
Simple instruction, this is easy to do.
Download the attached zip file...
http://db.tt/na11Ma9L
Extract the zip file (the ouput should be a folder named "odex' with some files in it)... place the odex folder it in your /data/local/tmp/ directory with a file explorer such as FX File explorer...
Use said file explorer to give the folder, and all of its file contents FULL read/write/execute permissions and root ownership. This is typically done with a file explorer by long pressing on the folder/file and selecting the appropriate options. With FX long pressing will give you an option for "permissions" select that then change all tabs on the left to say root, and check all boxes for full 0777 perms (this will need to be done individually for each file and folder, you cannot just do it to the folder because it will not change the content's)...
With root explorer you should also be able to figure out this process...
Use said file explorer to mount your /system/ directory as r/w... this is done by simply clicking the green "locked" icon while browsing the /system/ directory with FX File explorer...
with root explorer there is a grey tab at the top of the app window that says "mount as r/w"...
Download terminal emulator from the market and open it up... type the following commands:
su (hit enter and it will ask for root perms... grant it)
Then type:
/data/local/tmp/odex/odex (hit enter, it will do some things you will not be able to read so don't worry about it lol
When it finishes type "reboot" without quotes and hit enter
Done. Profit.
This will work on any deodexed ROM for the note II running 4.1.1
Question: how will this benefit me?
Answer: odexed framework is more efficiently accessed by the CPU thus reducing CPU cycles and saving battery life a tick. Apps/frameworks that are odexed are opened faster, thus performance is improved - smoother UI, etc.
IMPORTANT * * * DO NOT DO THIS IF YOU HAVE ODEXED YOUR /SYSTEM/APP/ DIRECTORY WITH AN APP LIKE TITANIUM BACKUP. UNDO IT, REBOOT, RUN THIS, THEN RE-ODEX /SYSTEM/APP/ ....not doing this will likely cause you to boot loop/lock up at boot. You have been warned.
reserved
This is cool thank you very much. By chance is it possible to write a script to deodex also?
Worked great on my s3, just what ive been looking for. THANKS
Awesome! Love odexed roms
Master'd Note 2
Only framework is odexed?
Lol. Guess the first line of op answers that dumb question. Thanks for sharing :thumbup:
Sent from my SGH-T889 using xda premium
Use this for the rest, it works great.
http://forum.xda-developers.com/showthread.php?t=1839445

TOOLS TO WORK ON ROM

Hi!
I let you here some tools to work on ROM.
First One is Brottli (files ROM format) to Ext4, like it say change from brottli format to ext4 format as example system.new.dat.br and system.transfer.list to system.ext4
Brottli_Dat_to_EXT4.zip
Second on ( the one i use more to extract files from ext4 format images) 7z_Ext4_Imgextractor, for this tool you need to extract, enter in work folder, right click on 7z.exe, compatibility and select execute as administrator or it will not work properly.
7z_Ext4_Imgextractor.zip
Third, is the same as 7z_Ext4_Imgextractor.zip but i only use if 7z_Ext4_Imgextractor.zip doesn´t work. Some times extract with a few errors...
Ext4_Imgextractor.zip
And the last one, is a Update.zip, inside you will find system and vendor folders, inside that folder you can paste a directory/file as you find inside the extract image, example if the file is in vendor/etc, you need to create/paste etc directory inside vendor...
Important Only works with directory with 755 permission and files with 644 permission!!!!! You need to know what you are doing...
update.zip
I hope this tools helps you.

Categories

Resources