[Android Software/Hacking General [Developers Only]] gredmy:
No does not work. Shows errors!

Auto Odexer Script
Done by Alkhafaf. The odexing commands are posted by sicopat in xda forums.

remounting
List of devices attached
TA2070EX8I recovery

remount succeeded

VERY IMPORTANT, REBOOT TO RECOVERY FIRST, OR YOU WILL GET A BOOTLOOP AFTER
YOU RESTART YOUR DEVICE. YOU CAN NOT MOD YOUR FRAMEWORK FILES (SPECIALLY
FRAMEWORK.JAR OR ANY OTHER) WITHOUT BEING IN RECOVERY FIRST

Enter the name of the .jar file u want to odex (without .jar): framework

7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18

Processing archive: mod\framework.jar

Extracting preloaded-classes

Everything is Ok

Size: 65580
Compressed: 3644690

7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18

Processing archive: mod\framework.jar

No files to process

Files: 0
Size: 0
Compressed: 3644690

7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18

Processing archive: mod\framework.jar

No files to process

Files: 0
Size: 0
Compressed: 3644690

7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18

Processing archive: mod\framework.jar

No files to process

Files: 0
Size: 0
Compressed: 3644690

7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18

Scanning

Updating archive original\framework.jar

Compressing preloaded-classes

Everything is Ok

7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18

Scanning

resources.arsc: WARNING: Can not find the file specified.

Updating archive original\framework.jar

WARNINGS for files:

resources.arsc : Can not find the file specified.

----------------
WARNING: Cannot find 1 file

7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18

Scanning

res: WARNING: Can not find the file specified.

Updating archive original\framework.jar

WARNINGS for files:

res : Can not find the file specified.

----------------
WARNING: Cannot find 1 file

7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18

Scanning

AndroidManifest.xml: WARNING: Can not find the file specified.

Updating archive original\framework.jar

WARNINGS for files:

AndroidManifest.xml : Can not find the file specified.

----------------
WARNING: Cannot find 1 file
Cannot find file C:\Auto Odexer Script_v2-Alkhafaf\resources.arsc
Can not find the file specified.
Cannot find file C:\Auto Odexer Script_v2-Alkhafaf\AndroidManifest.xml

sending dexopt-wrapper to the device
5 KB/s (5512 bytes in 1.000s)

sending the deodexed file to the device
1966 KB/s (3644690 bytes in 1.810s)

Odexing the file:
--- BEGIN '/system/framework/framework.jar' (bootstrap=0) ---
--- waiting for verify+opt, pid=1385
--- would reduce privs here
--- END '/system/framework/framework.jar' --- status=0xff00, process failed

pushing the original files to the system
1613 KB/s (66071 bytes in 0.040s)
1581 KB/s (9621584 bytes in 5.940s)

Setting permissions..

copying signature from original file:
20+0 records in
20+0 records out
20 bytes (20B) copied, 0.191201 seconds, 104B/s

replacing with the new odex file

settings permissions for the new odex file

deleting worked- on file

Finished

To odex a file again, press any key
To pull the jar file, press 1
To exit, press 0

I tried: adb shell "cd /system/bin && ./dexopt-wrapper /system/framework/%jarname%.jar /system/framework/new_%jarname%.odex $BOOTCLASSPATH"

I have not patched stock kernel with root.

I think the problem with $BOOTCLASSPATH.

If i edit line:

adb shell /system/bin/dexopt-wrapper /system/framework/%jarname%.jar $BOOTCLASSPATH

to

adb shell /system/bin/dexopt-wrapper /system/framework/%jarname%.jar /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:/system/framework/com.motorola.android.frameworks.jar:/system/framework/com.motorola.android.widget.jar:/system/framework/com.motorola.orange.simauth.jar

getting error

Odexing the file:
Usage: /system/bin/dexopt-wrapper <input jar/apk> <output odex> [<bootclasspath>]

Example: dexopttest /system/app/NotePad.apk /system/app/NotePad.odex

pushing the original files to the system
30 KB/s (313 bytes in 0.010s)
1877 KB/s (346096 bytes in 0.180s)

Setting permissions..
chmod: /system/framework/new_android.policy.odex: No such file or directory

copying signature from original file:
20+0 records in
20+0 records out
20 bytes (20B) copied, 0.000541 seconds, 36.1KB/s

replacing with the new odex file

settings permissions for the new odex file

deleting worked- on file

Finished

To odex a file again, press any key
To pull the jar file, press 1
To exit, press 0

Where is my problem, help to understand.