Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,811,702 Members 54,147 Now Online
XDA Developers Android and Mobile Development Forum

[Toturial][Windows] How Editing The ODEX framework files? [Simplified]

Tip us?
 
M_J_Nazari
Old
(Last edited by M_J_Nazari; 20th April 2012 at 07:38 AM.)
#1  
M_J_Nazari's Avatar
Recognized Developer - OP
Thanks Meter 2,539
Posts: 1,531
Join Date: Jul 2010
Location: Bushehr

 
DONATE TO ME
Thumbs up [Toturial][Windows] How Editing The ODEX framework files? [Simplified]

Hi, This is a simple tutorial for someone that wants to working on ODEX structure.

All needed files are attached, you don't need to download anything files.
Extract the Amestris_ODEX.zip file, your working folder will be this one.



I'm creating the simple example here.
for example i want to edit the services.jar file on ODEX structure.


We need to work on DEODEX version at first.

You can Deodex your files from here:
Quote:
The Best solution is here , Android Kitchen by dsixda user.
[KITCHEN] Android Kitchen, v0.192 [Linux / Mac / Windows]
Your Phone needs to be rooted and Busybox get installed.

the sample file is services.jar,also you can do it for any odex file.

1- Do all your editing and working on your deodex version.
2- Create this folders on your sd-card partition.
Code:
amestris_mod
amestris_original
3- Copy your modded file [your deodexed and edited services.jar] into amestris_mod folder.
4- Copy original jar file into amestris_original folder. [original odex services.jar]
5-Copy dexopt-wrapper into /system/bin folder and give full permission to that. [the simple way is root explorer ]

through the adb command:
Run the Amestris.bat file.
Code:
adb remount
adb push dexopt-wrapper /system/bin/dexopt-wrapper
adb shell chown 777 /system/bin/dexopt-wrapper
adb shell chmod 777 /system/bin/dexopt-wrapper
6-run this adb commands.
Code:
adb shell

cp /sdcard/amestris_mod/services.jar /system/framework/services.jar

dexopt-wrapper /system/framework/services.jar /system/framework/new_services.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar

cp -f /sdcard/amestris_original/services.jar /system/framework

chmod 777 /system/framework/services.odex
chmod 777 /system/framework/services.jar
chmod 777 /system/framework/new_services.odex

busybox dd if=/system/framework/services.odex of=/system/framework/new_services.odex bs=1 count=20 skip=52 seek=52 conv=notrunc

cp /system/framework/new_services.odex /system/framework/services.odex

chmod 644 /system/framework/services.odex
chown root.root /system/framework/services.odex
rm /system/framework/new_services.odex

reboot
Credits:
Quote:
M_J_Nazari
sicopat
jubeh
Decad3nce
software_samurai
Attached Files
File Type: zip Amestris_ODEX.zip - [Click for QR Code] (286.1 KB, 1181 views)
If you like my work, please consider a donation. or you can press the Thanks button
----------------------------------------------------------------------------------------------------------------------


Amestris BlackDiamond For GSIII Thread
[GUIDE] [Advanced] How to make an IconPack for Samsung Touchwiz [JellyBean]
[GT-I9000] Amestris DarkCyan V12 - Odex
[Theme] GT-I9000 DarkCyan Ultimate Version 2.5 JW9
[ROM][4.1.2] [GT-I9100] Biftor™JB Rom - Black Diamond Theme
[Script] Amestris Odexer V4.0 ! GSIII GT-I9300
----------------------------------------------------------------------------------------------------------------------
| [Tool | Script] Amestris DEODEX to ODEX Convertor | For Themer and Developers [V5.0] |
PDA-PLANET APK EDITOR V1.0
----------------------------------------------------------------------------------------------------------------------
Current Device: Galaxy S4 mini duos , Nokia X1
The Following 12 Users Say Thank You to M_J_Nazari For This Useful Post: [ Click to Expand ]
 
M_J_Nazari
Old
(Last edited by M_J_Nazari; 20th April 2012 at 01:28 AM.)
#2  
M_J_Nazari's Avatar
Recognized Developer - OP
Thanks Meter 2,539
Posts: 1,531
Join Date: Jul 2010
Location: Bushehr

 
DONATE TO ME
Default Android.policy.jar

This is a Sample for android.policy.jar

Run Amestris.bat file and run this commands here
Code:
adb remount
adb shell
cp /sdcard/amestris_mod/android.policy.jar /system/framework/android.policy.jar

dexopt-wrapper /system/framework/android.policy.jar /system/framework/new_android.policy.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar

cp -f /sdcard/amestris_original/android.policy.jar /system/framework

chmod 777 /system/framework/android.policy.odex

chmod 777 /system/framework/new_android.policy.odex

busybox dd if=/system/framework/android.policy.odex of=/system/framework/new_android.policy.odex bs=1 count=20 skip=52 seek=52 conv=notrunc

cp /system/framework/new_android.policy.odex /system/framework/android.policy.odex

chmod 777 /system/framework/android.policy.odex
chown root.root /system/framework/android.policy.odex
rm /system/framework/new_android.policy.odex

reboot
If you like my work, please consider a donation. or you can press the Thanks button
----------------------------------------------------------------------------------------------------------------------


Amestris BlackDiamond For GSIII Thread
[GUIDE] [Advanced] How to make an IconPack for Samsung Touchwiz [JellyBean]
[GT-I9000] Amestris DarkCyan V12 - Odex
[Theme] GT-I9000 DarkCyan Ultimate Version 2.5 JW9
[ROM][4.1.2] [GT-I9100] Biftor™JB Rom - Black Diamond Theme
[Script] Amestris Odexer V4.0 ! GSIII GT-I9300
----------------------------------------------------------------------------------------------------------------------
| [Tool | Script] Amestris DEODEX to ODEX Convertor | For Themer and Developers [V5.0] |
PDA-PLANET APK EDITOR V1.0
----------------------------------------------------------------------------------------------------------------------
Current Device: Galaxy S4 mini duos , Nokia X1
The Following 4 Users Say Thank You to M_J_Nazari For This Useful Post: [ Click to Expand ]
 
M_J_Nazari
Old
(Last edited by M_J_Nazari; 20th April 2012 at 01:05 AM.)
#3  
M_J_Nazari's Avatar
Recognized Developer - OP
Thanks Meter 2,539
Posts: 1,531
Join Date: Jul 2010
Location: Bushehr

 
DONATE TO ME
Default This is a Sample for framework.jar

The framework.jar or frameowrk.odex file is very sensitive and vital file for android.
some changes of this file will turn your phone into force close messages.

but i create a sample for this file;

do it like below:
Run Amestris.bat file and type this commands.
Code:
adb remount
adb shell
cp /sdcard/amestris_mod/framework.jar /system/framework/framework.jar
dexopt-wrapper /system/framework/framework.jar /system/framework/new_framework.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
cp -f /sdcard/amestris_original/framework.jar /system/framework
chmod 777 /system/framework/framework.odex
chmod 777 /system/framework/framework.jar
chmod 777 /system/framework/new_framework.odex
busybox dd if=/system/framework/framework.odex of=/system/framework/new_framework.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
cp /system/framework/new_framework.odex /system/framework/framework.odex
chmod 777 /system/framework/framework.odex
chown root.root /system/framework/framework.odex
rm /system/framework/new_framework.odex
reboot
If you like my work, please consider a donation. or you can press the Thanks button
----------------------------------------------------------------------------------------------------------------------


Amestris BlackDiamond For GSIII Thread
[GUIDE] [Advanced] How to make an IconPack for Samsung Touchwiz [JellyBean]
[GT-I9000] Amestris DarkCyan V12 - Odex
[Theme] GT-I9000 DarkCyan Ultimate Version 2.5 JW9
[ROM][4.1.2] [GT-I9100] Biftor™JB Rom - Black Diamond Theme
[Script] Amestris Odexer V4.0 ! GSIII GT-I9300
----------------------------------------------------------------------------------------------------------------------
| [Tool | Script] Amestris DEODEX to ODEX Convertor | For Themer and Developers [V5.0] |
PDA-PLANET APK EDITOR V1.0
----------------------------------------------------------------------------------------------------------------------
Current Device: Galaxy S4 mini duos , Nokia X1
The Following 3 Users Say Thank You to M_J_Nazari For This Useful Post: [ Click to Expand ]
 
M_J_Nazari
Old
(Last edited by M_J_Nazari; 23rd April 2012 at 03:19 PM.)
#4  
M_J_Nazari's Avatar
Recognized Developer - OP
Thanks Meter 2,539
Posts: 1,531
Join Date: Jul 2010
Location: Bushehr

 
DONATE TO ME
1: Q: When i use the cp command , the error shows with " cp: not found " message
A: try to use " busybox cp" instead the " cp " command.
If you like my work, please consider a donation. or you can press the Thanks button
----------------------------------------------------------------------------------------------------------------------


Amestris BlackDiamond For GSIII Thread
[GUIDE] [Advanced] How to make an IconPack for Samsung Touchwiz [JellyBean]
[GT-I9000] Amestris DarkCyan V12 - Odex
[Theme] GT-I9000 DarkCyan Ultimate Version 2.5 JW9
[ROM][4.1.2] [GT-I9100] Biftor™JB Rom - Black Diamond Theme
[Script] Amestris Odexer V4.0 ! GSIII GT-I9300
----------------------------------------------------------------------------------------------------------------------
| [Tool | Script] Amestris DEODEX to ODEX Convertor | For Themer and Developers [V5.0] |
PDA-PLANET APK EDITOR V1.0
----------------------------------------------------------------------------------------------------------------------
Current Device: Galaxy S4 mini duos , Nokia X1
The Following 3 Users Say Thank You to M_J_Nazari For This Useful Post: [ Click to Expand ]
 
ramanadodda
Old
#5  
Senior Member
Thanks Meter 54
Posts: 239
Join Date: May 2010
Location: Hyderabad
Excellent explanation!!! Thank you very much.
The Following User Says Thank You to ramanadodda For This Useful Post: [ Click to Expand ]
 
PoorCollegeGuy
Old
#6  
Account currently disabled
Thanks Meter 364
Posts: 2,440
Join Date: Dec 2011
Location: Columbus

 
DONATE TO ME
Hey there, i saw this guide and really liked it, so I wrote about it on the XDA Portal

here's the link!

http://www.xda-developers.com/androi...amework-files/

i hope you enjoy the write up.
 
chils41
Old
#7  
chils41's Avatar
Senior Member
Thanks Meter 460
Posts: 1,585
Join Date: Mar 2009
Location: Champaign, IL

 
DONATE TO ME
Thank you so much all you guys.

now lets see if i can use this to port SMemo to imilka's CM9 or AOSP

thnx.
Not into Phones any more!
now into AirGuns!

zech out the AirGun Forum I am working on:

http://www.AmatureAirGunner.com/Forum
 
burakgon
Old
(Last edited by burakgon; 23rd April 2012 at 08:04 AM.)
#8  
burakgon's Avatar
Senior Member
Thanks Meter 3,770
Posts: 2,963
Join Date: Oct 2010
Location: Bursa

 
DONATE TO ME
You can do same on linux. Smali is cross platform. Just needs java. I added deoxt wrapper on my ROM's for who want to do it easily.

Sent from my GT-I9000 using Tapatalk 2 Beta-6
The Following User Says Thank You to burakgon For This Useful Post: [ Click to Expand ]
 
myn
Old
#9  
myn's Avatar
Senior Recognized Developer
Thanks Meter 4,002
Posts: 2,658
Join Date: Nov 2007

 
DONATE TO ME
Great write up.

Does this method also remove the classes.dex file that is found in apks since it is now housed as a seperate .odex file?
 
M_J_Nazari
Old
#10  
M_J_Nazari's Avatar
Recognized Developer - OP
Thanks Meter 2,539
Posts: 1,531
Join Date: Jul 2010
Location: Bushehr

 
DONATE TO ME
Quote:
Originally Posted by myn View Post
Great write up.

Does this method also remove the classes.dex file that is found in apks since it is now housed as a seperate .odex file?
This method doesn't remove anything. this is a method for replacing [editing] odex files.

if you want to convert the apk files to odex structure you need to check the Amestris Odexer Script v1.2.
If you like my work, please consider a donation. or you can press the Thanks button
----------------------------------------------------------------------------------------------------------------------


Amestris BlackDiamond For GSIII Thread
[GUIDE] [Advanced] How to make an IconPack for Samsung Touchwiz [JellyBean]
[GT-I9000] Amestris DarkCyan V12 - Odex
[Theme] GT-I9000 DarkCyan Ultimate Version 2.5 JW9
[ROM][4.1.2] [GT-I9100] Biftor™JB Rom - Black Diamond Theme
[Script] Amestris Odexer V4.0 ! GSIII GT-I9300
----------------------------------------------------------------------------------------------------------------------
| [Tool | Script] Amestris DEODEX to ODEX Convertor | For Themer and Developers [V5.0] |
PDA-PLANET APK EDITOR V1.0
----------------------------------------------------------------------------------------------------------------------
Current Device: Galaxy S4 mini duos , Nokia X1

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes