2

我可以pm很好地从 adb shell 执行,但是如果我尝试从终端执行它,则会出现分段错误。我已经阅读了这个线程,它提出了一个类似的问题,但他们的解决方案似乎不起作用。

堆栈跟踪如下:

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)
4

1 回答 1

3
  1. 检查 init.rc 的 BOOTCLASSPATH。BOOTCLASSPATH 必须包含 /system/framework/ext.jar 和 /system/framework/framework.jar 等。

  2. 检查 build/core/dex_preopt.mk 的 DEXPREOPT_BOOT_JARS。DEXPREOPT_BOOT_JARS 必须包含 ext 和 framework 等。

  3. BOOTCLASSPATH 上所有项目的顺序必须等于 DEXPREOPT_BOOT_JARS 上所有项目的顺序。

于 2013-02-01T02:50:41.233 回答