FORUMS
Remove All Ads from XDA

RE-Odex ROM (Flashable Zip in CWM)

385 posts
Thanks Meter: 417
 
By androidphone2012, Senior Member on 14th May 2013, 06:51 PM
Post Reply Email Thread
Original thread (zman0900) : http://forum.xda-developers.com/show....php?t=1441293

I just slightly modified.

ROM, Google Apps, MODs .... Now for the daily drive? Just Flash this zip in CWM. (Don't flash in TWRP. Not working with that)

The attached files are just examples. If you're running that ROM, flash that zip matches the name. That's all.

Otherwise, you can modify odex.sh in zip.

1) Red

BOOTCLASSPATH found in init.rc on your device's root. Or extract boot.img then you can find that in the ramdisk.

2) Blue

Looking above add or remove

e.g. CM10.1
Code:
#!/tmp/busybox sh

export PATH=/tmp:$PATH
export BOOTCLASSPATH=/system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar

# Order matters here, up to BOOTCLASSPATH
FRAMEWORK="/system/framework/core.jar
/system/framework/core-junit.jar
/system/framework/bouncycastle.jar
/system/framework/ext.jar
/system/framework/framework.jar
/system/framework/telephony-common.jar
/system/framework/mms-common.jar
/system/framework/android.policy.jar
/system/framework/services.jar
/system/framework/apache-xml.jar"

# Odex Framework Rest
REST="/system/framework/*.jar"

# Odex apps
APPS="/system/app/*.apk"

# Set up busybox symlinks
for i in $(busybox --list)
do
	ln -s busybox /tmp/$i
done

# Framework
for i in $FRAMEWORK
do
	odex=`echo $i | sed -e 's/.jar/.odex/g'`
	dexopt-wrapper $i $odex
	zip -d $i classes.dex
done

# Framework Rest
for i in $REST
do
	odex=`echo $i | sed -e 's/.jar/.odex/g'`
	dexopt-wrapper $i $odex
	zip -d $i classes.dex
done

# System apps
for i in $APPS
do
	odex=`echo $i | sed -e 's/.apk/.odex/g'`
	dexopt-wrapper $i $odex
	zip -d $i classes.dex
done

# wipe Dalvik-cache
rm -rf /data/dalvik-cache
rm -rf /cache/dalvik-cache
Attached Files
File Type: zip Odex-ROM_for.CM7.2.0.zip - [Click for QR Code] (980.3 KB, 298 views)
File Type: zip Odex-ROM_for.CM9.zip - [Click for QR Code] (980.3 KB, 228 views)
File Type: zip Odex-ROM_for.CM10.zip - [Click for QR Code] (980.3 KB, 274 views)
File Type: zip Odex-ROM_for.CM10.1.zip - [Click for QR Code] (980.3 KB, 636 views)
File Type: zip Odex-ROM_for.CM10.2.zip - [Click for QR Code] (980.3 KB, 642 views)
The Following 20 Users Say Thank You to androidphone2012 For This Useful Post: [ View ] Gift androidphone2012 Ad-Free
 
 
15th May 2013, 05:13 AM |#2  
OP Senior Member
Thanks Meter: 417
 
More
As for TWRP

Quote:
Originally Posted by Dees_Troy

The copy of dexopt-wrapper that you have included in the zip is dynamically linked. This means that the binary is using libraries from /system/lib in order to run. You may run into problems with this binary working on some ROMs as variances in libraries may fail to link properly with your binary. The reason it doesn't work with TWRP is because TWRP is dynamically linked and TWRP is usually set up to prevent linking to libraries in /system. The best practice would be to build your own dexopt-wrapper binary that is statically linked so that it doesn't need any outside libraries to run.

The Following User Says Thank You to androidphone2012 For This Useful Post: [ View ] Gift androidphone2012 Ad-Free
11th June 2013, 09:04 AM |#3  
Junior Member
Thanks Meter: 7
 
More
can work this script for nexus 4?
11th June 2013, 10:50 AM |#4  
OP Senior Member
Thanks Meter: 417
 
More
Quote:
Originally Posted by misha84

can work this script for nexus 4?

On any device and Android version, this can work

Before flashing, check your init.rc
The Following User Says Thank You to androidphone2012 For This Useful Post: [ View ] Gift androidphone2012 Ad-Free
11th June 2013, 11:40 AM |#5  
eushaun99's Avatar
Senior Member
Flag Subang Jaya
Thanks Meter: 974
 
More
For aokp 4.2.2 I assume is cm10.1 zip? BTW, I just flashed it on a cm10.1 based ROM, I thought /system/app should have odex files? I only see core.odex in /system/framework.

Sent from my GT-P7500 using XDA Premium HD app
11th June 2013, 01:02 PM |#6  
OP Senior Member
Thanks Meter: 417
 
More
Quote:
Originally Posted by eushaun99

For aokp 4.2.2 I assume is cm10.1 zip? BTW, I just flashed it on a cm10.1 based ROM, I thought /system/app should have odex files? I only see core.odex in /system/framework.

Sent from my GT-P7500 using XDA Premium HD app

BOOTCLASSPATH may be diffrent. Check your init.rc
The Following User Says Thank You to androidphone2012 For This Useful Post: [ View ] Gift androidphone2012 Ad-Free
15th June 2013, 12:37 PM |#7  
rmsinaga's Avatar
Senior Member
Thanks Meter: 152
 
More
What's the benefit of having framework being odex-ed?
Will this work on SlimROM which is AOSP & CM based?
Thanks
16th June 2013, 11:57 AM |#8  
OP Senior Member
Thanks Meter: 417
 
More
Quote:
Originally Posted by rmsinaga

What's the benefit of having framework being odex-ed?...

http://forum.xda-developers.com/show...php?p=20281743

http://forum.xda-developers.com/show....php?t=1423118

http://forum.xda-developers.com/show....php?t=2200349

http://forum.xda-developers.com/show....php?t=1443957

Quote:
Originally Posted by rmsinaga

...
Will this work on SlimROM which is AOSP & CM based?
...

On any device and Android version, this can work

Before flashing, check your init.rc. If different, edit odex.sh in zip.
The Following User Says Thank You to androidphone2012 For This Useful Post: [ View ] Gift androidphone2012 Ad-Free
16th June 2013, 02:40 PM |#9  
rmsinaga's Avatar
Senior Member
Thanks Meter: 152
 
More
I've tried this to SlimROM v6.5. It works. Thank you.
The Following User Says Thank You to rmsinaga For This Useful Post: [ View ] Gift rmsinaga Ad-Free
16th June 2013, 03:21 PM |#10  
Kevinjoa's Avatar
Inactive Recognized Developer
Flag Luedenscheid
Thanks Meter: 2,844
 
Donate to Me
More
I get status 0. CWM 5.0.28
16th June 2013, 03:52 PM |#11  
OP Senior Member
Thanks Meter: 417
 
More
Quote:
Originally Posted by Kevinjoa

I get status 0. CWM 5.0.28

I'm not sure, try another CWM version. As for me, I'm using CWM v6.0.1.0

Or try the attached in this post, just repacked
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes