问题描述
我可以从 adb shell 执行 pm
很好,但是如果我尝试从终端执行它,我会遇到分段错误.我已阅读 this thread 提出了类似的问题,但他们的解决方案似乎不起作用.
I am able to execute pm
from the adb shell fine, but I get a segmentation fault if I try and execute it from the terminal.
I have read this thread which suggests a similar problem, but their solution doesn't seem to work.
堆栈跟踪如下:
01-22 04:04:39.356: D/AndroidRuntime(5059): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
01-22 04:04:39.356: D/AndroidRuntime(5059): CheckJNI is OFF
01-22 04:04:39.366: I/dalvikvm(5059): DexOpt: Some deps went away
01-22 04:04:39.366: E/dalvikvm(5059): /system/framework/ext.jar odex has stale dependencies
01-22 04:04:39.366: I/dalvikvm(5059): Zip is good, but no classes.dex inside, and no valid .odex file in the same directory
01-22 04:04:39.366: D/dalvikvm(5059): Unable to process classpath element '/system/framework/ext.jar'
01-22 04:04:39.366: I/dalvikvm(5059): DexOpt: Some deps went away
01-22 04:04:39.366: E/dalvikvm(5059): /system/framework/framework.jar odex has stale dependencies
01-22 04:04:39.366: I/dalvikvm(5059): Zip is good, but no classes.dex inside, and no valid .odex file in the same directory
01-22 04:04:39.366: D/dalvikvm(5059): Unable to process classpath element '/system/framework/framework.jar'
01-22 04:04:39.366: I/dalvikvm(5059): DexOpt: Some deps went away
01-22 04:04:39.366: E/dalvikvm(5059): /system/framework/android.policy.jar odex has stale dependencies
01-22 04:04:39.366: I/dalvikvm(5059): Zip is good, but no classes.dex inside, and no valid .odex file in the same directory
01-22 04:04:39.366: D/dalvikvm(5059): Unable to process classpath element '/system/framework/android.policy.jar'
01-22 04:04:39.366: I/dalvikvm(5059): DexOpt: Some deps went away
01-22 04:04:39.366: E/dalvikvm(5059): /system/framework/services.jar odex has stale dependencies
01-22 04:04:39.366: I/dalvikvm(5059): Zip is good, but no classes.dex inside, and no valid .odex file in the same directory
01-22 04:04:39.366: D/dalvikvm(5059): Unable to process classpath element '/system/framework/services.jar'
01-22 04:04:39.366: D/dalvikvm(5059): Trying to load lib libjavacore.so 0x0
01-22 04:04:39.376: D/dalvikvm(5059): Added shared lib libjavacore.so 0x0
01-22 04:04:39.376: D/dalvikvm(5059): Trying to load lib libnativehelper.so 0x0
01-22 04:04:39.376: D/dalvikvm(5059): Added shared lib libnativehelper.so 0x0
01-22 04:04:39.406: I/dalvikvm(5059): DexOpt: Some deps went away
01-22 04:04:39.406: E/dalvikvm(5059): /system/framework/pm.jar odex has stale dependencies
01-22 04:04:39.406: I/dalvikvm(5059): Zip is good, but no classes.dex inside, and no valid .odex file in the same directory
01-22 04:04:39.406: E/appproc(5059): ERROR: could not find class 'com.android.commands.pm.Pm'
01-22 04:04:39.406: E/JNIHelp(5059): Native registration unable to find class 'android/debug/JNITest', aborting
01-22 04:04:39.406: A/libc(5059): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 5059 (app_process)
推荐答案
检查 init.rc 的 BOOTCLASSPATH.BOOTCLASSPATH 必须包含/system/framework/ext.jar 和/system/framework/framework.jar 等.
Check BOOTCLASSPATH of your init.rc. BOOTCLASSPATH must include /system/framework/ext.jar and /system/framework/framework.jar and so on.
检查 build/core/dex_preopt.mk 的 DEXPREOPT_BOOT_JARS.DEXPREOPT_BOOT_JARS 必须包含 ext 和 framework 等.
Check DEXPREOPT_BOOT_JARS of build/core/dex_preopt.mk. DEXPREOPT_BOOT_JARS must include ext and framework and so on.
BOOTCLASSPATH 上所有项目的顺序必须与 DEXPREOPT_BOOT_JARS 上所有项目的顺序相同.
The order of all items on BOOTCLASSPATH must be equal to the order of all items on DEXPREOPT_BOOT_JARS.
这篇关于在android上执行pm的分段错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!