dex2oat command line does not work

633 views
Skip to first unread message

Dong Li

unread,
Dec 16, 2015, 8:36:37 PM12/16/15
to android-platform
Hi, 

When I use "adb install" to install an apk, everything works and I got the dex2oat cmd line from logcat. 
But when I use the dex2oat cmd line directly from adb shell, it failed and complained about the apk file is invalid
Can any one please give me some help ?
Thanks :)

-------------------------
When using "adb install", the command line from logcat is as below:
I/dex2oat ( 5662): /system/bin/dex2oat --zip-fd=6 --zip-location=/data/app/com.example.dongl.test1-1/base.apk --oat-fd=7 --oat-location=/data/dalvik-cache/arm64/data@app@com.example....@base.apk@classes.dex --instruction-set=arm64 --instruction-set-features=div --runtime-arg -Xms64m --runtime-arg -Xmx512m

-------------------------
how ever, when I try to call this command line directly from adb, it does not work any more. Here is the command line I am using:
"adb shell /system/bin/dex2oat --zip-fd=6 --zip-location=/data/app/com.example.dongl.test1-1/base.apk --oat-fd=7 --oat-location=/data/dalvik-cache/arm64/data@app@com.example....@base.apk@classes.dex --instruction-set=arm64 --instruction-set-features=div --runtime-arg -Xms64m --runtime-arg -Xmx512m"
-------------------------
The error msg is:
"E/dex2oat ( 5942): Failed to open zip from file descriptor for '/data/app/com.example.dongl.test1-1/base.apk': Invalid file"

Your help will be greatly appreciated






Reply all
Reply to author
Forward
0 new messages