Comments (12)
Comment #1 originally posted by JesusFreke on 2010-01-01T05:31:29.000Z:
You need to set the BOOTCLASSPATH environment variable on the phone. Not on your
computer :)
adb shell
BOOTCLASSPATH=$BOOTCLASSPATH:/system/framework/com.google.android.gtalkservice.jar
deodexerant /system/app/gtalkservice.odex 1234 &
exit
tcp forward tcp:1234 tcp:1234
baksmali gtalkservice.odex -x :1234
from smali.
Comment #2 originally posted by JesusFreke on 2010-01-01T05:32:30.000Z:
dedexer can de-odex "app\gtalkservice\gtalkservice.odex" without problems.
from smali.
Comment #3 originally posted by JesusFreke on 2010-01-01T05:32:30.000Z:
Also, for the record, you don't have to deodex
/system/framework/com.google.android.gtalkservice.odex first. You can just deodex
/system/app/gtalkservice.odex, if that's all that you're interested in.
from smali.
Comment #4 originally posted by JesusFreke on 2010-01-01T05:34:13.000Z:
baksmali/deodexerant can deodex it fine. You just have to do it correctly.
Also: interesting. I wasn't aware dedexer could do deodexing now.
from smali.
Comment #5 originally posted by JesusFreke on 2010-01-01T06:06:22.000Z:
Yes. dedexer can do odex files now. I just tried other odex files
with "baksmali/deodexerant", and most of them are fine (Calculator.odex etc. worked
well). However, I had a similar problem with "GmailProvider.odex", see below:
C:\android-sdk_r04\smali>java -Xss1m -Xmx512M -jar baksmali.jar -x :1234 GmailProv
ider.odex
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: java.lang.RuntimeException: class
Lcom/google/android/gtalkservice/GTalkHttpClient; could not be found for common
superclass lookup
at org.jf.dexlib.Util.Deodexerant.sendCommand(Deodexerant.java:193)
at org.jf.dexlib.Util.Deodexerant.lookupCommonSuperclass
(Deodexerant.java:167)
at org.jf.dexlib.Util.DeodexUtil$insn.findCommonSuperclass
(DeodexUtil.java:1241)
at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1412)
at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
from smali.
Comment #6 originally posted by JesusFreke on 2010-01-01T06:07:47.000Z:
You just need to add the extra dependency jar to the BOOTCLASSPATH environment
variable on the phone, before running deodexerant.
from smali.
Comment #7 originally posted by JesusFreke on 2010-01-01T06:10:36.000Z:
"/system/app/MarketUpdater.odex" is good with "baksmali/deodexerant". Just
that "/system/app/gtalkservice.odex" and "/system/app/GmailProvider.odex" have dep
problems, not be de-odexed at this point. This is from Google ADP2/Sapphire rom.
from smali.
Comment #8 originally posted by JesusFreke on 2010-01-01T06:10:39.000Z:
I do want to add functionality to deodexerant so that it reads the dependencies from
the odex file and automatically sets the bootclasspath appropriately. But for now,
you have to set it before calling it :)
I haven't taken a look at dedexer in a while. It looks like he's been doing some work
on it :)
from smali.
Comment #9 originally posted by JesusFreke on 2010-01-01T06:13:14.000Z:
<empty>
from smali.
Comment #10 originally posted by JesusFreke on 2010-01-01T06:28:11.000Z:
Thanks JF!
Yes. After export
BOOTCLASSPATH=$BOOTCLASSPATH:/system/framework/com.google.android.gtalkservice.jar,
it works perfect now!
from smali.
Comment #11 originally posted by JesusFreke on 2010-01-01T06:38:42.000Z:
How come dedexer can do it offline on host, and has no dependence issue?
from smali.
Comment #12 originally posted by JesusFreke on 2010-01-01T06:58:03.000Z:
It's because he took a different path to deodex stuff than I did. When a dex file is
odexed, various instructions are replaced with an "optimized" version of the
instruction. For things like invoke-virtual, instead of directly specifying the name
of the method that should be invoked, the odex instruction instead contains the index
into the vtable that dalvik keeps for each class.
What dedexer does (or appears to do, I haven't looked at the source much yet), is to
load the dependency odex files, and recreate the virtual tables, so that he can
resolve the virtual table indexes in the odexed instructions. Like most things, his
approach is a trade-off. On the positive side, it is a lot easier to use, since you
don't have to be running a helper binary on a device. On the negative side, it's
possible that dalvik's internal representation of the vtable will change, and his
deodexer will no longer work with the new format, without changes.
On the other hand, I chose to use a method that is more robust, but is more difficult
to use. My method should be able to handle changes in dalvik's internal
representation easier, but it's more difficult to use.
from smali.
Related Issues (20)
- Ive been Hacked please help me HOT 6
- Parsing smali methode HOT 1
- The Fields do not keep their initial values if they're default value
- odex error
- Error while writing instruction at code offset 0x8
- How to calculate the contribution of each class to the dex HOT 2
- Dex file size increases by ~50% without making changes (DexFileFactory.loadDexFile then DexFileFactory.writeDexFile) HOT 7
- missing EOF at '.class'
- any method to replace one String with modifiedString in StringIds section of dex file using dexlib2? HOT 3
- How to create a new method using dexlib2 HOT 2
- Try to run examples/BracketedMemberNames HOT 1
- how to copy class to new dex using dexlib2 HOT 4
- Smali patcher does not support Dex version 039 HOT 1
- java.lang.NoSuchMethodError when calling DexPool.internClass
- smali report error
- how to move the useless classes to a new dex using dexlib2? HOT 1
- [Feature Request] Could we support dex v41? HOT 3
- Won't build under Debian WSL
- Regenerate correct boot.oat/.art/.vdex files after a recompile
- dexlib2 cannot open dex file extracted from framework.jar (/system/framework/framework.jar)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smali.