The purpose of this thread is to give basics to manually deodex and odexing back framework and apk files
Credits and Thanks to :
jubeh
Decad3nce
software_samurai
JKay
LeoMar75
and many others I forgot
Click to expand...
Click to collapse
Theory :
WHAT IS AN ODEX FILE?
In Android file system, applications and framework files come in packages with the extension .apk or .jar. These APKs or JARs 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.
THEN COMES DEODEX
Deodexing is basically repackaging of these APKs or JARs in a certain way, such that the .odex files are reassembled into classes.dex files directly integrated inside the APKs or JARs. By doing that, all pieces of an application package are put together back in one place.
For now, we need Baksmali.jar and Smali.jar to deodex, it seems these tools are not perfect and it seems to be why deodexed stock browser is laging/freezing.
This is the reason why there is a return to odexed customROMs
Click to expand...
Click to collapse
Prerequisites :
You will need these files :
* backsmali.jar
* smali.jar
* custom java.awt.jar
* dexopt wrapper
* recent version of busybox
Click to expand...
Click to collapse
all included in the attached .zip (end of post)
You will also need :
* your GS2
* with the official odexed firmware you want to mod
* rooted and with root explorer (pay app but really usefull) and with CWM recovery (better )
* ADB installed and working in su (#)
* copy dexopt-wrapper in /system/bin/ and giving it 755 permissions (using root explorer or command: chmod 755 /system/bin/dexopt-wrapper
* optional (if errors during odexing back) overwrite installed busybox with the one included here in /system/xbin/
Click to expand...
Click to collapse
You have to know :
* even on stock firmware (odexed) there are some deodexed .apk (like framework-res.apk in /system/framework/ and like some .apk in system/app/)
Tip on Windows "Vista / 7" : open a CMD prompt in a specified folder
1. Select the folder you want to open in the command prompt
2. Right-click on it while holding the Shift key
3. Select Open command window here
Click to expand...
Click to collapse
Manually Deodexing :
theory :
to decompil an odex file you need Baksmali.jar and you needs the BOOTCLASSPATH
BOOTCLASSPATH is a list in specific order of some framework .jar files
** To decompil and re-odex back .odex from JAR file you need to use the BOOTCLASSPATH specified in the init.rc file located in the root folder of your GS2 : (open init.rc with notepad ++)
Extract of I9100 init.rc :
export BOOTCLASSPATH /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
** To decompil an .odex from APK file, BOOTCLASSPATH is different in fonction of the APKs, so the lazy way is to include all the .JAR files of the framework folder
2 applications : Emails.apk and MobilePrint.apk needs one more custom java.awt.jar
Click to expand...
Click to collapse
1/ put in the same folder :
* apk to deodex
* all system/framework files
add :
* custom java.awt.jar
* baksami.jar
* smali.jar
* zipalign.exe
Click to expand...
Click to collapse
2/ open CMD prompt in this folder (see above for how to)
3/ Deodexing Framework file (I will take android.policy.jar for example) :
* BAKSMALI of the android.policy.odex :
Code:
java -Xmx1024m -jar baksmali.jar -c :core.jar:bouncycastle.jar:ext.jar:framework.jar:android.policy.jar:services.jar:core-junit.jar -x [B]android.policy.odex[/B]
* This create an out folder. You can now modify some files (like adding Advanced power menu)
* SMALI the /out folder in a classes.dex file :
Code:
java -Xmx1024m -jar smali.jar [B]out[/B] -o classes.dex
* finally deodex your android.policy.jar :
open android.policy.jar with 7zip without extracting
push the classes.dex created in the 7zip window in the root folder
close the 7zip windows and here is your deodexed android.policy.jar
Click to expand...
Click to collapse
4/ Deodexing APK in system/app (I will take SystemUI.apk for exemple) :
* BAKSMALI of the SystemUI.odex :
Code:
java -Xmx1024m -jar baksmali.jar -c :am.jar:android.policy.jar:android.test.runner.jar:bmgr.jar:bouncycastle.jar:com.android.location.provider.jar:com.google.android.maps.jar:com.samsung.device.jar:com.yamaha.android.media.jar:core.jar:core-junit.jar:ext.jar:framework.jar:ime.jar:input.jar:[B]java.awt.jar[/B]:javax.obex.jar:libvtmanagerjar.jar:monkey.jar:pm.jar:sec_feature.jar:seccamera.jar:sechardware.jar:secmediarecorder.jar:services.jar:sqlite-jdbc.jar:svc.jar:twframework.jar -x [B]SystemUI.odex[/B]
* an out folder is created. You can modify the files inside if you want.
* SMALI the /out folder in a classes.dex file :
Code:
java -Xmx1024m -jar smali.jar [B]out[/B] -o classes.dex
* finally deodex your SystemUI.apk :
open SystemUI.apk with 7zip without extracting
push the classes.dex created in the 7zip window in the root folder
close the 7zip windows and here is your deodexed SystemUI.apk
Click to expand...
Click to collapse
* extra step for APKs : zipaplign of your new deodexed SystemUI.apk
--> In the same CMD prompt windows, type :
Code:
zipalign -v 4 SystemUI.apk zip_SystemUI.apk
A zip_SystemUI.apk file is created. Delete your deodexed SystemUI.apk and rename zip_SystemUI.apk in SystemUI.apk
ODEXING BACK :
the theory :
*You will need to copy the (custom) deodexed file (.jar or .apk) in the system/framework/ folder of your phone.
*You will use dexopt wrapper (already copied in your phone) to obtain a new .odex file (patched_android.policy.odex for example)
* You will copy the signature of original .odex file to patched.odex file - if not, the phone won't boot ...
Click to expand...
Click to collapse
How To :
1/ backup your original files (apk jar and odex) to /sdcard/Mod/
2/ copy modified deodexed files (.apk and .jar) in /system/framework/ of your GS2
Now we are going to odex back
3/ open a CMD prompt in the folder of adb.exe (usualy /android-sdk-windows/platform-tools/)
4/ type command :
Code:
adb shell
su
## for .JAR file :
dexopt-wrapper /system/framework/XXX.jar /system/framework/patched_XXX.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
response must be :
--- BEGIN '/system/framework/android.policy.jar' (bootstrap=0) ---
--- waiting for verify+opt, pid=7194
--- would reduce privs here
--- END '/system/framework/android.policy.jar' (success) ---
## for .APK file :
dexopt-wrapper /system/framework/XXX.apk /system/framework/patched_XXX.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
--> This will create the patched_XXX.odex file
Now we need to copy signature from original .odex file to patched .odex file cause Dalvik need files signature integrity in order to boot.
5/ always in the same CMD prompt windows :
Code:
# if not already done ...
adb shell
su
# copy the original .odex and .jar in system/framework (not .apk) :
cp /sdcard/MOD/original.XXX.odex /system/framework
cp -f /sdcard/MOD/XXX.jar /system/framework # where XXX.jar is the original odexed .jar
# give all permissions to XXX.odex files :
chmod 777 /system/framework/original.XXX.odex
chmod 777 /system/framework/patched_XXX.odex
# copy signature :
busybox dd if=/system/framework/original.XXX.odex of=/system/framework/patched_XXX.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
response must be :
busybox dd if=/system/framework/original.XXX.odex of=/system/framewor
k/patched_XXX.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
20+0 records in
20+0 records out
20 bytes (20B) copied, 0.002042 seconds, 9.6KB/s
Now the signature is copied over the patched_XXX.odex
Notice :
a - if you don't have response after busybox dd command : busybox is not installed or you have a to old version, use the busybox included in the attached .zip
b - if you don't have the last response line : 20 byt
Awesome! Thank you for your time sir!
Best regards,
aDEO
awesome man!'help me out of questions!
Thanks for the guide, just a quick question.
Can I odex a custom deodexed ROM? Just that will save me time.
If not, I'll unpack an official ROM and made my mods. You've posted some other great guides which has really helped me tonight! Thanks again.
nice tutorial
I've successfully deodex them.
lets try odex them back .
Mekrel said:
Thanks for the guide, just a quick question.
Can I odex a custom deodexed ROM? Just that will save me time.
If not, I'll unpack an official ROM and made my mods. You've posted some other great guides which has really helped me tonight! Thanks again.
Click to expand...
Click to collapse
Yes you can odex back a customROM (in theory) I never try to, but you will need to odex back all the .jar of the framework folder. And you will need the original firmware to copy signature of original .odex files to re-odexed .odex files
Sent from my GT-I9100 using XDA Premium App
abu2x said:
nice tutorial
I've successfully deodex them.
lets try odex them back .
Click to expand...
Click to collapse
Sometimes it will work the first time.
Sometimes it won't cause you forgot to give good permissions to dexopt-wrapper in system/bin
Or to the pached_XXX.odex files (need write permissions for all)
Or Busybox not installed or to old... Then the copy signature step won't work
Sent from my GT-I9100 using XDA Premium App
brilliant! thx a ton!
Great ! I was looking for this, thank you.
One thing was still giving me a hard time and i got that one solved also.
When doing a odex back from a custom theme, the method is different.
Because you need to use the modified framework file in the dependencylist.
So for me it was:
(I put a modified framework.jar in /sdcard)
dexopt-wrapper /sdcard/framework.jar /sdcard/framework.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/sdcard/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
Otherwise it does NOT work. Now i have succusfully added overglow to a odex ROM.
Ok a new problem with the framework.jar
In the method to odex on the FP there was mentioned to use the dependency framework stuff.
When doing that trying to odex framework.jar i only get bootloops. aka the created odex file is wrong. The weird part is that the odex file created is 6,8 mb
When using the method i proposed in including the modified framework.jar in the dependencylist a bigger framework.odex is created. This one is about 7,14 mb
And it boots !
But it seems to be messed up because when trying to do some settings i get fc or it just exits. It appears to focus on phone settings. (try adding a apn and it closes)
Does anyone know of a solution for this ?
I did try to add the java.awt.jat in the dependencylist, but it does not seem to matter at all.
Yes you need to use your modded framework.jar in bootclasspath dependencies of dexopt wrapper.
If force close, perhaps you did not erase dalvik cache or made a mistake when modding framework.jar
Did you use the last Smali version out today x.7 to make your mod ? cause smali.jar was buggy with framwork.jar deodexing.
If you just want to odex a theme with more than 1 framework file, you should need to do by step : first you copy 1 file and odex it back then you do the same for second file ... You should only use 1 deodexed jar in your bootclasspath corresponding to the file you try to odex back.
Hope this will help, i cannot help much cause my GS2 doesn't really love the beautifull sand of the mediteraneen sea I am on vacation ...
Sent from my GT-I9100 using XDA Premium App
Thanx for the reply, i did just that.
The framework.jar file works flawlessly on a deodexed system, so i guess this file is ok.
But it does not work correctly when trying to odex back. I keep getting (thesame ) errors. Even doing a binary compare of the odex files when trying different methods to odex back is identical.
But the endresult is always thesame. The phone does boot but there are issues inside the jarfile.
Brotuck said:
Thanx for the reply, i did just that.
The framework.jar file works flawlessly on a deodexed system, so i guess this file is ok.
But it does not work correctly when trying to odex back. I keep getting (thesame ) errors. Even doing a binary compare of the odex files when trying different methods to odex back is identical.
But the endresult is always thesame. The phone does boot but there are issues inside the jarfile.
Click to expand...
Click to collapse
I just remember that original developper of overscroll glow for Galaxy S has stopped to dev odexed owerscroll glow cause of same errors (MMS)
I believe this due to a dexopt wrapper bug on odexing back framework.odex ??
smali / baksmali v1.2.8 is available
Hi Sicopat,
I'm having issues with this.
I'm currently running XXKG6 ROM that I've successfully deodexed and after reading your thread, I've wrote the below shell script that successfully runs.
Code:
#!/system/bin/sh
chmod 755 /system/bin/dexopt-wrapper
chmod 755 /system/bin/zip
coreframework="/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"
echo "Odexing /system/framework/*jar files"
for i in $coreframework
do
filename=$(basename $i .jar)
dexopt-wrapper $i /system/framework/$filename.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
zip -d $i classes.dex
done
for i in /system/framework/*.jar
do
if [ $i == "/system/framework/core.jar" -o $i == "/system/framework/bouncycastle.jar" -o $i == "/system/framework/ext.jar" -o $i == "/system/framework/framework.jar" -o $i == "/system/framework/android.policy.jar" -o $i == "/system/framework/services.jar" -o $i == "/system/framework/core-junit.jar" ]
then
echo "Already odexed in sequence"
else
filename=$(basename $i .jar)
dexopt-wrapper $i /system/framework/$filename.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
zip -d $i classes.dex
fi
done
echo "Giving permissions to all *odex files"
chmod -R 777 /sdcard/original-framework/*.odex
chmod -R 777 /system/framework/*.odex
echo "Copying signatures from original odex files"
for i in /sdcard/original-framework/*.odex
do
filename=$(basename $i .odex)
busybox dd if=$i of=/system/framework/$filename.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
done
rm -r /data/dalvik-cache/*
The script does the following process:
Sets permisions for the dexopt-wrapper and zip binaries.
Odexes the core framework in the same order they're listed in BOOTCLASSPATH in init.rc.
Odexes the other framework files that were not previously odexed
Copies the signatures from the original XXKG6 .odex files, to the ones that have just been created (the origials are stored on the sdcard)
The only difference in the script I wrote is the classes.dex are removed from the .jar files using the zip binary.
I can see the .odex files created when running a ls /system/framework command and pulling the .jar files reveals that the dex file from inside has been removed.
I've also tried copying the original .jar files over, rather than removing the .dex files on the fly.
However, the phone doesn't even boot, i.e. it doesn't even get past the splash image.
Can you see anything wrong with my logic/shell script?
Many thanks
Mark
Mekrel said:
Hi Sicopat,
I'm having issues with this.
I'm currently running XXKG6 ROM that I've successfully deodexed and after reading your thread, I've wrote the below shell script that successfully runs.
Code:
#!/system/bin/sh
chmod 755 /system/bin/dexopt-wrapper
chmod 755 /system/bin/zip
coreframework="/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"
echo "Odexing /system/framework/*jar files"
for i in $coreframework
do
filename=$(basename $i .jar)
dexopt-wrapper $i /system/framework/$filename.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
zip -d $i classes.dex
done
for i in /system/framework/*.jar
do
if [ $i == "/system/framework/core.jar" -o $i == "/system/framework/bouncycastle.jar" -o $i == "/system/framework/ext.jar" -o $i == "/system/framework/framework.jar" -o $i == "/system/framework/android.policy.jar" -o $i == "/system/framework/services.jar" -o $i == "/system/framework/core-junit.jar" ]
then
echo "Already odexed in sequence"
else
filename=$(basename $i .jar)
dexopt-wrapper $i /system/framework/$filename.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
zip -d $i classes.dex
fi
done
echo "Giving permissions to all *odex files"
chmod -R 777 /sdcard/original-framework/*.odex
chmod -R 777 /system/framework/*.odex
echo "Copying signatures from original odex files"
for i in /sdcard/original-framework/*.odex
do
filename=$(basename $i .odex)
busybox dd if=$i of=/system/framework/$filename.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
done
rm -r /data/dalvik-cache/*
The script does the following process:
Sets permisions for the dexopt-wrapper and zip binaries.
Odexes the core framework in the same order they're listed in BOOTCLASSPATH in init.rc.
Odexes the other framework files that were not previously odexed
Copies the signatures from the original XXKG6 .odex files, to the ones that have just been created (the origials are stored on the sdcard)
The only difference in the script I wrote is the classes.dex are removed from the .jar files using the zip binary.
I can see the .odex files created when running a ls /system/framework command and pulling the .jar files reveals that the dex file from inside has been removed.
I've also tried copying the original .jar files over, rather than removing the .dex files on the fly.
However, the phone doesn't even boot, i.e. it doesn't even get past the splash image.
Can you see anything wrong with my logic/shell script?
Many thanks
Mark
Click to expand...
Click to collapse
Okay, I actually got this to work by removing the copying of signatures from the stock .odex files to the new ones.
I find that a little weird seeing as that step is specifically mentioned in your guide and that the phone is supposedly unable to boot without copying the signature.
After deodexing (and not odexing back) my framework and app folder of my custom ROM in my kitchen (before flashing),
is it necessary to sign/resign apks?
ok i have a few questions if you wouldnt mind helping.
i've been using androids since July of this year, only 2 months now, so i'm really new to modding...
i'm trying very hard to catch on and to learn...
unfortunately, i purchased a device with absolutely no development
anyway, assuming that you'll help, i'll proceed...
i'm not on a galaxy s II - i'm doing this on a gravity smart.
our bootclass path is different:
system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar
your bootclass path:
/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
so i removed the difference in your command example to this:
java -Xmx1024m -jar baksmali.jar -c :core.jar:framework.jar:android.policy.jar:services.jar -x android.policy.odex
all is fine, i get an "out" folder created with files in it
i then use your command example:
java -Xmx1024m -jar smali.jar out -o classes.dex
and a classes.dex is created
i then opened the android.policy.jar with 7zip and dropped the classes.dex file in its root
i'm assuming the process is going as its supposed to at this point.
question 1: am i doing this right?
question 2: do i do this to all the .jars in the /system/framework/ directory to have a completely deodexed system (and of course all the /system/app/files)?
question 3: do i also use these methods or the apk methods listed on your 2nd post to do the twframework-res.apk file?
question 4: do i create a new "out" folder for each .jar (run the command line for each .jar) or do i use the first created classes.dex for all the .jar files in /system/framework/ directory?
question 5: after i create the deodexed files i can safely delete the .odex companion files correct? (this may be a dumb question with an obvious answer, but i don't want to screw up)
question 6: can i place the deodexed files on the sdcard and move them with root explorer or do i need to push them thru using ADB?
any help or suggestions would be greatly appreciated!
NitroOnTheRocks said:
After deodexing (and not odexing back) my framework and app folder of my custom ROM in my kitchen (before flashing),
is it necessary to sign/resign apks?
Click to expand...
Click to collapse
Nope
Sent from my GT-I9100 using xda premium
Arhtard said:
ok i have a few questions if you wouldnt mind helping.
i've been using androids since July of this year, only 2 months now, so i'm really new to modding...
i'm trying very hard to catch on and to learn...
unfortunately, i purchased a device with absolutely no development
anyway, assuming that you'll help, i'll proceed...
i'm not on a galaxy s II - i'm doing this on a gravity smart.
our bootclass path is different:
system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar
your bootclass path:
/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
so i removed the difference in your command example to this:
java -Xmx1024m -jar baksmali.jar -c :core.jar:framework.jar:android.policy.jar:services.jar -x android.policy.odex
all is fine, i get an "out" folder created with files in it
i then use your command example:
java -Xmx1024m -jar smali.jar out -o classes.dex
and a classes.dex is created
i then opened the android.policy.jar with 7zip and dropped the classes.dex file in its root
i'm assuming the process is going as its supposed to at this point.
question 1: am i doing this right?
question 2: do i do this to all the .jars in the /system/framework/ directory to have a completely deodexed system (and of course all the /system/app/files)?
question 3: do i also use these methods or the apk methods listed on your 2nd post to do the twframework-res.apk file?
question 4: do i create a new "out" folder for each .jar (run the command line for each .jar) or do i use the first created classes.dex for all the .jar files in /system/framework/ directory?
question 5: after i create the deodexed files i can safely delete the .odex companion files correct? (this may be a dumb question with an obvious answer, but i don't want to screw up)
question 6: can i place the deodexed files on the sdcard and move them with root explorer or do i need to push them thru using ADB?
any help or suggestions would be greatly appreciated!
Click to expand...
Click to collapse
Q1/ yes
Q2/ yes if you want a deodexed Rom
Q3/you don't need to deodex twframework and framework-res ...
Q4/ you need to backsmali every files. You can rename out folders to core, android.policy, ... And replace out with the "name of folder" in smali command. Classes.dex is specific of 1 file
Q5Yes, you can delete odex files. This is the point of deodexing
Q6/ you can do the 2 ways, to try if deodexed files are correct, then correct the permissions and then backup and delete odex file. But for entire rom, the better is to use a non wipe script and to flash the entire deodexed Rom.
Finaly, there are many deodexing auto kit. I made an How to deodex resign and zipalign a customRom, try the kit-Deodexage included.
Or look for more used deodex script cause there are many apks to deodex, doing this manually will be very long ...
Sent from my GT-I9100 using xda premium
Related
MAC/ LINUX Instructions
How to Deodex your Xoom the long way:
Requirements:
1) Have a knowledge of ADB and have it set up on your computer
2) Have smali and baksmali on your computer. I used the ones attached below.
3) If on a Mac, download betterzip, Windows, download 7Zip or WinRar
Steps:
1) First, you must pull your system apps and framework from your xoom. To accomplish this, navigate to where ADB is located and do the following:
Code:
adb pull /system/app/ <output directory>/app
example: adb pull /system/app /Users/dhemke17/Desktop/system_dump/app/
adb pull /system/framework/ /<output directory>/framework
example: adb pull /system/app/ /Users/dhemke17/Desktop/system_dump/framework
2) Now that you have your apps and framework, you can begin working…this is a pretty lengthy process so bare with me…
3) Place both smali.jar and baksmali.jar into the folder where your framework is. And do the following commands. (These are for a mac and may need to be altered for Windows). You must change the xxxx.odex to the desired odex file and substitute in your output directory
Code:
java –jar baksmali.jar –o temp1 –x xxxx.odex
cd <output directory>/framework/temp1
find ./ -type f -exec sed -i -e 's/return-void-barrier/return-void/g' {} \;
cd <output directory>/framework/
java -Xmx512M -jar smali.jar temp1 -o classes.dex
rm –rf temp1
4) Once these steps are completed, you have a classes.dex folder in your framework folder. Using BetterZip (7-Zip) Open the initial jar file (example: if you just deodexed am.odex, open am.jar) and place the classes.dex into the root of the archive (do not place it in any folder) and then delete the classes.dex file. This will work for all framework files but framework.jar, policy.jar, services.jar, and ext.jar. For these, do the following: just replace xxxxx with each of the 4 corresponding . odex files.
Code:
java -jar baksmali.jar -c :core-junit.jar:framework.jar -o temp1 -x xxxxx.odex
cd <output directory>/framework/temp1
find ./ -type f -exec sed -i -e 's/return-void-barrier/return-void/g' {} \;
cd <output directory>/framework/
java -Xmx512M -jar smali.jar temp1 -o classes.dex
rm –rf temp1
5) Once completed, create a folder named frame_done and copy the deodexed framework files into it.
6) Copy all of the framework files into the <output directory>/app folder as they are needed to deodex the system apps.
7) Copy your baksmali.jar and smali.jar into the <output directory>/app folder as well.
8) To deodex the system apps, do the following. Be sure to replace xxxx.odex with the desired odex file.
Code:
java -jar baksmali.jar -c :com.android.location.provider.jar:javax.obex.jar:core.jar:apache-xml.jar:bouncycastle.jar -o temp1 -x xxxx.odex
cd <output directory>/app/temp1;
find ./ -type f -exec sed -i -e 's/return-void-barrier/return-void/g' {} \;
cd <output directory>/app/;
java -Xmx512M -jar smali.jar temp1 -o classes.dex
rm -rf temp1
9) At this point, it’s a repeat story. Just open the corresponding .apk file and drop the classes.dex into archive’s root and then delete the classes.dex file. Continue steps 8 and 9 until all of your system apps are deodexed. Create a folder named app_done and move all of the completed apk files into it.
10) Now you have a completely deodexed system and framework in separate folders. To get them onto your xoom, you can use the following update.zip, just be sure to place your apps into the /system/app folder and your framework into the /system/framework folder. Flash the update.zip in CWR and reboot. Your system will now be deodexed!
Update.zip for you to drop your framework and apps into:
Deodex.zip
Helpful hints:
For a mac, for the steps after the baksmali step, you can create a script to do the rest, besides moving anything. Mine can be downloaded but needs to be modified to your output directory/temp1 and output directory in two different spots, then you can just do the following:
Code:
java –jar baksmali.jar –o temp1 –x xxxx.odex
bash deodex.sh
My Script:
deodex.sh
Baksmali is attached in a zip file below...be sure to extract and rename it to baksmali.jar
Smali.jar
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Windows Instructions
Requirements:
1) Know how to use adb and have it set up
2) Have Baksmali and smali.jars installed
3) Have 7-Zip or WinRAR
4) Must have Cygwin installed...steps are below
Procedure to install Cygwin (Thanks dsixda):
1. Download and install the Java JDK for Windows 32-bit from java.sun.com (WARNING: Do not install Cygwin before the JDK!!)
2. (Install the JDK in Step 1 before you proceed to this step!!)
3. Download the file cygwin_packages.zip, unzip it and follow the instructions in the "kitchen_readme.txt" file to install a customized version of Cygwin. Done!!
NOTE: A default install of Cygwin will not work, you need to use the customized version described in the guide.
NOTE2: If you had installed Java after Cygwin, then Cygwin may have issues finding the Java executable file, which will require an edit of the .bash_profile file. See here to fix it.
Procedure to Deodex:
1) First, you must pull your system apps and framework from your xoom. To accomplish this, navigate to where ADB is located and do the following:
Code:
adb pull /system/app/ <output directory>/app
example: adb pull /system/app /Users/dhemke17/Desktop/system_dump/app/
adb pull /system/framework/ /<output directory>/framework
example: adb pull /system/app/ /Users/dhemke17/Desktop/system_dump/framework
2) Place both smali.jar and baksmali.jar into the folder where your framework is. And do the following commands. (These are for a mac and may need to be altered for Windows). You must change the xxxx.odex to the desired odex file and substitute in your output directory. Notice, in the find command line, -e has been removed as it is not needed.
Code:
java –jar baksmali.jar –o temp1 –x xxxx.odex
cd <output directory>/framework/temp1
find ./ -type f -exec sed -i 's/return-void-barrier/return-void/g' {} \;
cd <output directory>/framework/
java -Xmx512M -jar smali.jar temp1 -o classes.dex
rm –rf temp1
3) Follow Steps 4 - 10 From the mac instructions MAKING SURE YOU MAKE THE CHANGE TO THE FIND LINE INDICATED ABOVE
If there is anything you are unsure about and you get confused, please feel free to PM me, or ask on this board...
If this post has helped you, and you feel so inclined to do so, you can hit the thanks button, or if you are really excited, you can donate to me here: Donate HERE
Thanks for the guide. Happy to see another dev with a Xoom. Obviously we have to ask you for a rom now
Sent from my Thunderbolt using Tapatalk
Lol...well idk about that...maybe someday, but for now this will work. I got an already deodexed system/ pretty heavily themes "Rom" linked for for WiFi only devices, but its more or less just a tool for others to use.
Sent from my ADR6400L using XDA App
Cool thanks again, I'm a wifi only Guy as well, we get no love around here, lol.
Sent from my Thunderbolt using Tapatalk
lrs421 said:
Cool thanks again, I'm a wifi only Guy as well, we get no love around here, lol.
Sent from my Thunderbolt using Tapatalk
Click to expand...
Click to collapse
It's all I have, so if I put anything out, it will most definitely be for that.
Updated for Windows...
thanks for the guide. will look at doing it once I have the time to dedicate to it!
The links for baksmali.jar and deodex.sh are broken.
woolmonkey said:
The links for baksmali.jar and deodex.sh are broken.
Click to expand...
Click to collapse
Fixed it...
Thanks and am.jar at least for 3.2 needs
Code:
java -jar baksmali.jar -c :core-junit.jar:framework.jar -o temp1 -x xxxx.odex
Mine didn't I have the entire framework and system done and I am going to be uploading it in a couple hours. If you can, try and deodex VoiceSearch.odex, I can't seem to get it to go.
Posted the stock 3.2 Rom deodexed for anyone that wants to use it for anything...It is required that you already be on 3.2 and rooted...easiest way to do this is posted by solarnz
Yah I have everything done now except VoiceSearch.
Did you manage to get VoiceSearch done? I;ve tried some things with no success. Also do you zipalign afterwords?
woolmonkey said:
Did you manage to get VoiceSearch done? I;ve tried some things with no success. Also do you zipalign afterwords?
Click to expand...
Click to collapse
didn't zipalign...not sure how to on xoom...
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:
The Best solution is here , Android Kitchen by dsixda user.
[KITCHEN] Android Kitchen, v0.192 [Linux / Mac / Windows]
Click to expand...
Click to collapse
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:
M_J_Nazari
sicopat
jubeh
Decad3nce
software_samurai
Click to expand...
Click to collapse
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
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
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.
Excellent explanation!!! Thank you very much.
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/android/tutorial-simplifies-editing-odexed-framework-files/
i hope you enjoy the write up.
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.
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
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?
myn said:
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?
Click to expand...
Click to collapse
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.
Ops wrong thread, sry
If my ROM already have framework.odex does it mean that I only need to make the changes directly into the odex file and then recompile it?
how do i decompile framework.jar files using ADB?
Use apktool or something..
Cant with Only adb I think
Sent from my GT-S5660 using xda premium
Baksmali and smali
Sent from my GT-S5830 using xda premium
CoolCatGetHome said:
Baksmali and smali
Sent from my GT-S5830 using xda premium
Click to expand...
Click to collapse
tutorial?
get your framework.jar from your phone by doing this in command prompt while phone is connected:
Code:
cd c:\adb\platform-tools (if this is where you installed android sdk)
adb pull /system/framework/framework.jar c:\adb\platform-tools\framework.jar (or wherever you want it, 2nd path is where it will get saved)
it is now located in the given map, c:\adb\platform-tools in this case.
Use 7zip to extract the classes.dex file from it (dont extract whole archive, only classes.dex)
put the classes.dex in the same map as your smali/baksmali files (download smali/baksmali files here
go in command prompt (cmd) again and navigate to the map your classes.dex and smali/baksmali are located
to decompile:
Code:
java -jar baksmali-0.93.jar -o <output directory> classes.dex
this makes a map named "classes.dex" with all files from classes.dex in it
edit stuff you want to
to recompile:
Code:
java -Xmx512M -jar smali-0.92.jar <output directory from above step> -o <name for new .dex output file>
This makes a new .dex file which you should rename to "classes.dex", but for now any name will do it. Open framework.jar with 7zip again (Dont extract, just open it), and put your new classes.dex in it
after that you can push it back to your phone or whatever you want to do with it
example:
cd c:\adb\platform-tools
adb pull /system/framework/framework.jar c:\user\outputmap\framework.jar
*extract the classes.dex from framework and place in same directory*
java -jar baksmali-0.93.jar -o c:\user\outputmap classes.dex
*edit, edit edit*
java -Xmx512M -jar smali-0.92.jar c:\user\outputmap -o new_classes.dex
*put new_classes.dex into framework.jar and rename to classes.dex*
Hope this helps
MerynGoesAndroid said:
get your framework.jar from your phone by doing this in command prompt while phone is connected:
Code:
cd c:\adb\platform-tools (if this is where you installed android sdk)
adb pull /system/framework/framework.jar c:\adb\platform-tools\framework.jar (or wherever you want it, 2nd path is where it will get saved)
it is now located in the given map, c:\adb\platform-tools in this case.
Use 7zip to extract the classes.dex file from it (dont extract whole archive, only classes.dex)
put the classes.dex in the same map as your smali/baksmali files (download smali/baksmali files here
go in command prompt (cmd) again and navigate to the map your classes.dex and smali/baksmali are located
to decompile:
Code:
java -jar baksmali-0.93.jar -o <output directory> classes.dex
this makes a map named "classes.dex" with all files from classes.dex in it
edit stuff you want to
to recompile:
Code:
java -Xmx512M -jar smali-0.92.jar <output directory from above step> -o <name for new .dex output file>
This makes a new .dex file which you should rename to "classes.dex", but for now any name will do it. Open framework.jar with 7zip again (Dont extract, just open it), and put your new classes.dex in it
after that you can push it back to your phone or whatever you want to do with it
example:
cd c:\adb\platform-tools
adb pull /system/framework/framework.jar c:\user\outputmap\framework.jar
*extract the classes.dex from framework and place in same directory*
java -jar baksmali-0.93.jar -o c:\user\outputmap classes.dex
*edit, edit edit*
java -Xmx512M -jar smali-0.92.jar c:\user\outputmap -o new_classes.dex
*put new_classes.dex into framework.jar and rename to classes.dex*
Hope this helps
Click to expand...
Click to collapse
very very thanks because i can't finding its briefly tutorial.
can't find file
I have a different phone with 4.0.4, it's rooted and i have allready transfered all content from /system/framework/ to my PC but I cannot find the .dex files inside the framework.jar it only have a "preloaded-classes" file, a meta-inf dir and a "MANIFEST.MF" file inside it.
I'm having the incoming call not showing contacts problem, unless it has the exactly number as the phone book, it's freaking annoying...
Can any one gimme some light?
MerynGoesAndroid said:
get your framework.jar from your phone by doing this in command prompt while phone is connected:
Code:
cd c:\adb\platform-tools (if this is where you installed android sdk)
adb pull /system/framework/framework.jar c:\adb\platform-tools\framework.jar (or wherever you want it, 2nd path is where it will get saved)
it is now located in the given map, c:\adb\platform-tools in this case.
Use 7zip to extract the classes.dex file from it (dont extract whole archive, only classes.dex)
put the classes.dex in the same map as your smali/baksmali files (download smali/baksmali files here
go in command prompt (cmd) again and navigate to the map your classes.dex and smali/baksmali are located
to decompile:
Code:
java -jar baksmali-0.93.jar -o <output directory> classes.dex
this makes a map named "classes.dex" with all files from classes.dex in it
edit stuff you want to
to recompile:
Code:
java -Xmx512M -jar smali-0.92.jar <output directory from above step> -o <name for new .dex output file>
This makes a new .dex file which you should rename to "classes.dex", but for now any name will do it. Open framework.jar with 7zip again (Dont extract, just open it), and put your new classes.dex in it
after that you can push it back to your phone or whatever you want to do with it
example:
cd c:\adb\platform-tools
adb pull /system/framework/framework.jar c:\user\outputmap\framework.jar
*extract the classes.dex from framework and place in same directory*
java -jar baksmali-0.93.jar -o c:\user\outputmap classes.dex
*edit, edit edit*
java -Xmx512M -jar smali-0.92.jar c:\user\outputmap -o new_classes.dex
*put new_classes.dex into framework.jar and rename to classes.dex*
Hope this helps
Click to expand...
Click to collapse
use apktool. much easier than random dcriots
Sent from my GT-S5660 using xda app-developers app
voetbalremco said:
use apktool. much easier than random dcriots
Sent from my GT-S5660 using xda app-developers app
Click to expand...
Click to collapse
what is the apktool? i searched to play store but i was not able to find it....
NickosD said:
what is the apktool? i searched to play store but i was not able to find it....
Click to expand...
Click to collapse
search XDA
Sent from my GT-S5660 using xda app-developers app
Mine too... Can't find classes.dex
Hi can anyone help me try whether the enable flashlight widget in notification drawer is fixed in this apk? I had tried editing the smalis but need a tester because I am no longer using this ROM. Don't worry, it won't screw up your system. Thanks, and I would be grateful for feedback and comments below.(I know the file size is bigger but it should not affect the installation of the apk. If you could help me reduce the size of the apk. Thanks!)
Download link: https://doc-04-00-docs.googleusercontent.com/docs/securesc/uubj7fqvfjf5ec0jql27eda8tuf8buor/0p3fbcmmlesfvj1h7ji0l8d737crl4c7/1373608800000/04484889645328413275/04484889645328413275/0BxwsPruxmr3vZHlGZHRSYkhrbkE?e=download&h=16653014193614665626&nonce=k5np8umoqtbfq&user=04484889645328413275&hash=sl05t2dh68pd6a3bo75r5ndohmuh8b9h
This is a direct link, just click on it and the download will start.
How to install the apk(for those who don't know)
If you don't know how to install it into /system, here's a guide to how to do it.
If you are using Terminal emulator:
1. Type su, then type this:
Code:
busybox mount -o remount, -rw -t yaffs2 /system
2. Then, type this:
Code:
rm /system/app/Settings.apk
3. Then, type this:
Code:
cp /sdcard/<where is the file>/file.apk /system/app
3. Then, type this(Rename the apk to Settings.apk, then do this step):
Code:
chmod 0644 /system/app/Settings.apk
4. Then, type this:
Code:
reboot
5. Your phone will reboot, and after that test the apk out!
If you're using Root explorer(any kind of root explorer):
1. Copy the file to /system/app
2. Set the permissions to -rw -r -r OR 0644
3. Reboot.
4.Your phone will reboot, and after that test the apk out!
THANK you for trying this out! I appreciate suggestions!
I have deodexed the odexed apps and framework jars of Android 4.3 for M Dual.
Now how to move it to /system/ folder with the help of adb?
I tried flash Gordon by making a flash-able zip but it ain't working.
I have a locked boot-loader and I do not want to unlock it.
SArnab©® said:
I have deodexed the odexed apps and framework jars of Android 4.3 for M Dual.
Now how to move it to /system/ folder with the help of adb?
I tried flash Gordon by making a flash-able zip but it ain't working.
I have a locked boot-loader and I do not want to unlock it.
Click to expand...
Click to collapse
This method assumes you have adb set up as an environment variable on windows.
1) Rename the 'app' folder with the deodexed apps to 'done_app' and the 'framework' folder with the deodexed framework to 'done_framework'.
2) Copy both of the folders to the root of your SD Card, basically so when you want them on your phone it is /sdcard1/done_*/ (* being used as a wildcard).
4) Connect your device to the computer with USB debugging enabled.
5) Open up command prompt and then run the following code individually and line by line:
Code:
adb shell
su
stop
mount -o rw,remount /system
rm /system/app/*.odex
rm /system/framework/*.odex
cp /sdcard1/done_app/* /system/app/
cp /sdcard1/done_frame/* /system/framework/
mount -o ro,remount /system
reboot
This may cause the device to bootloop, just battery pull and restart. Android is upgrading will appear but that is normal.
The reason flash gordon isn't working is because it replaces some framework files and that could cause the device to freeze and then bootloop and it has a safeguard to prevent that.
gamer649 said:
This method assumes you have adb set up as an environment variable on windows.
1) Rename the 'app' folder with the deodexed apps to 'done_app' and the 'framework' folder with the deodexed framework to 'done_framework'.
2) Copy both of the folders to the root of your SD Card, basically so when you want them on your phone it is /sdcard1/done_*/ (* being used as a wildcard).
4) Connect your device to the computer with USB debugging enabled.
5) Open up command prompt and then run the following code individually and line by line:
Code:
adb shell
su
stop
mount -o rw,remount /system
rm /system/app/*.odex
rm /system/framework/*.odex
cp /sdcard1/done_app/* /system/app/
cp /sdcard1/done_frame/* /system/framework/
mount -o ro,remount /system
reboot
This may cause the device to bootloop, just battery pull and restart. Android is upgrading will appear but that is normal.
The reason flash gordon isn't working is because it replaces some framework files and that could cause the device to freeze and then bootloop and it has a safeguard to prevent that.
Click to expand...
Click to collapse
Thank-you for your quick reply...
I tried this before too but without asking for root permissions and thus it failed each and every time.
Hope it works now.
Will edit the post with the result ones device boots up.
EDIT : IT GOT INTO A BOOT LOOP...
WHAT TO DO NOW?
FLASH THE FTF AGAIN?
EDIT 2 : MY MISTAKE. TRYING AGAIN.
SArnab©® said:
Thank-you for your quick reply...
I tried this before too but without asking for root permissions and thus it failed each and every time.
Hope it works now.
Will edit the post with the result ones device boots up.
Click to expand...
Click to collapse
I used that code for my single SIM and it worked perfectly, just the possible bootloop happened and then I battery pulled and then restarted and it worked. You need su permissions to remount.
gamer649 said:
I used that code for my single SIM and it worked perfectly, just the possible bootloop happened and then I battery pulled and then restarted and it worked. You need su permissions to remount.
Click to expand...
Click to collapse
Yeah I got your procedure.
I made the mistake in copying the deodexed files.
Will report after retrying when I get free.
gamer649 said:
I used that code for my single SIM and it worked perfectly, just the possible bootloop happened and then I battery pulled and then restarted and it worked. You need su permissions to remount.
Click to expand...
Click to collapse
This time I did everything correct yet the same problem...
Here's what I did :
D:\Working Folder\adt-bundle-windows-x86_64-20131030\sdk\platform-tools>adb shel
l
[email protected]:/ $ su
su
[email protected]:/ # stop
stop
[email protected]:/ # mount -o rw,remount /system
mount -o rw,remount /system
[email protected]:/ # rm /system/app/*.odex
rm /system/app/*.odex
[email protected]:/ # rm /system/framework/*.odex
rm /system/framework/*.odex
[email protected]:/ # cp /sdcard1/done_app/* /system/app/
cp /sdcard1/done_app/* /system/app/
cp: /sdcard1/done_app/*: No such file or directory
1|[email protected]:/ # cp /ext_card/done_app/* /system/app/
cp /ext_card/done_app/* /system/app/
[email protected]:/ # cp /ext_card/done_frame/* /system/framework/
cp /ext_card/done_frame/* /system/framework/
cp: /ext_card/done_frame/*: No such file or directory
1|[email protected]:/ # cp /ext_card/done_framework/* /system/framework/
cp /ext_card/done_framework/* /system/framework/
[email protected]:/ # mount -o ro,remount /system
mount -o ro,remount /system
[email protected]:/ # reboot
reboot
Click to expand...
Click to collapse
SArnab©® said:
This time I did everything correct yet the same problem...
Here's what I did :
Click to expand...
Click to collapse
I don't know what is wrong, you have followed the procedure correctly and I have even compared it to my own screencap and it is the same. Are you sure you deodexed properly?
gamer649 said:
I don't know what is wrong, you have followed the procedure correctly and I have even compared it to my own screencap and it is the same. Are you sure you deodexed properly?
Click to expand...
Click to collapse
Leave mate.
Thanxxx for your help.
I think I need to unlock the bootloader and deodex.
SArnab©® said:
I have deodexed the odexed apps and framework jars of Android 4.3 for M Dual.
Now how to move it to /system/ folder with the help of adb?
I tried flash Gordon by making a flash-able zip but it ain't working.
I have a locked boot-loader and I do not want to unlock it.
Click to expand...
Click to collapse
well i have a question to ask how did you deodexed as i am not able to find anything working
deodex error
i try to deodexed xperia m c2004 4.3 by this method
http://forum.xda-developers.com/showthread.php?t=2213235
with compression level 5
result:- "56 apk deodexed" and "0 rar deodexed" (i don't know may be right/wrong)
and then make it cwm flashable zip
then install via cwm
but i got "NFC force close" message
pls give me solution
sorry for my bad english
stalin.sk2 said:
i try to deodexed xperia m c2004 4.3 by this method
http://forum.xda-developers.com/showthread.php?t=2213235
with compression level 5
result:- "56 apk deodexed" and "0 rar deodexed" (i don't know may be right/wrong)
and then make it cwm flashable zip
then install via cwm
but i got "NFC force close" message
pls give me solution
sorry for my bad english
Click to expand...
Click to collapse
In cwm zip, in uodater script add the lines to delete all. odex files.
Flash n your problem wulill be solved.
Sent from my C2004 using Tapatalk
SArnab©® said:
In cwm zip, in uodater script add the lines to delete all. odex files.
Flash n your problem wulill be solved.
Sent from my C2004 using Tapatalk
Click to expand...
Click to collapse
you mean adding this "delete("/system/app/*.odex");" is correct script
and another doubt that 0 jar deodexed when deodex /system/framework will it work?
stalin.sk2 said:
you mean adding this "delete("/system/app/*.odex");" is correct script
and another doubt that 0 jar deodexed when deodex /system/framework will it work?
Click to expand...
Click to collapse
You need to seperately deodex framework files and then flash
also delete the framework odex files
SArnab©® said:
You need to seperately deodex framework files and then flash
also delete the framework odex files
Click to expand...
Click to collapse
Another doubt(may be final question in deodex)
in system/app more than 46 apks are there
in system/framwork more than 35 jars are there
but i deodexed 46 apks and 35 jars only
my question is i need to delete all odex files
or particular i mean delete deodexed odex file in system/app and system/framework
stalin.sk2 said:
Another doubt(may be final question in deodex)
in system/app more than 46 apks are there
in system/framwork more than 35 jars are there
but i deodexed 46 apks and 35 jars only
my question is i need to delete all odex files
or particular i mean delete deodexed odex file in system/app and system/framework
Click to expand...
Click to collapse
Ok.. I am gonna try to be as informative as possible in a short span of time.
There are almost 200 apks in the app folder but most of then are already deodexed.
I have deodexed dual sim firmware and there were 56 apps in total and not 46.
I can't remember the number of jars but ya 35 or near to that.
Now you just need to flash this 56 or 46 apps as per you and those 35 or so jars + 1 framework apk name sony.uxp.something.apk
and delete all the *.odex files in /system/app and /system/framework.
SArnab©® said:
Ok.. I am gonna try to be as informative as possible in a short span of time.
There are almost 200 apks in the app folder but most of then are already deodexed.
I have deodexed dual sim firmware and there were 56 apps in total and not 46.
I can't remember the number of jars but ya 35 or near to that.
Now you just need to flash this 56 or 46 apps as per you and those 35 or so jars + 1 framework apk name sony.uxp.something.apk
and delete all the *.odex files in /system/app and /system/framework.
Click to expand...
Click to collapse
i can't find "sony.uxp.____.apk" where to get and why it need?
stalin.sk2 said:
i can't find "sony.uxp.____.apk" where to get and why it need?
Click to expand...
Click to collapse
Its in framework folder.
There are only 2 apk files and this is one of them.
SArnab©® said:
Its in framework folder.
There are only 2 apk files and this is one of them.
Click to expand...
Click to collapse
in that location 2 apks are there named
1.framework-res.apk
2.SemcGenericUxpRes.apk ( i think you denote this apk)
2nd one already deodexed
am i complete?
stalin.sk2 said:
in that location 2 apks are there named
1.framework-res.apk
2.SemcGenericUxpRes.apk ( i think you denote this apk)
2nd one already deodexed
am i complete?
Click to expand...
Click to collapse
Yup...
Sent from my C2004 using Tapatalk
SArnab©® said:
This time I did everything correct yet the same problem...
Here's what I did :
Click to expand...
Click to collapse
well put the done_app folder in the internal memory card ie sd card
so code will be
adb shell
su
stop
mount -o rw,remount /system
rm /system/app/*.odex
rm /system/framework/*.odex
cp /sdcard/done_app/* /system/app/
cp /sdcard/done_frame/* /system/framework/
mount -o ro,remount /system
reboot
change sdcard1 with sdcard
happened with me also changing this helped