Segmentation Fault executing pm on android(在android上执行pm的分段错误)
问题描述
我可以从 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的分段错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在android上执行pm的分段错误


- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01