ICS Android 系统服务器在放置符号错误后死亡
他,我现在正在尝试构建自己的 ICS 系统映像(来自 android-native 源 4.0.3_r1 分支),我现在可以收到 adb 消息,但不知何故,系统服务器由于启动时的签名错误而死亡
01-01 08:41:52.689: WARN/PackageParser(7755): Exception reading AndroidManifest.xml in /system/framework/framework-res.apk 01-01 08:41:52.689: WARN/PackageParser(7755): java.lang.SecurityException: /system/framework/framework-res.apk failed verification of META-INF/CERT.SF 01-01 08:41:52.689: WARN/PackageParser(7755): at java.util.jar.JarVerifier.failedVerification(JarVerifier.java:136) 01-01 08:41:52.689: WARN/PackageParser(7755): at java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:305) 01-01 08:41:52.689: WARN/PackageParser(7755): at java.util.jar.JarVerifier.readCertificates(JarVerifier.java:258) 01-01 08:41:52.689: WARN/PackageParser(7755): at java.util.jar.JarFile.getInputStream(JarFile.java:378) 01-01 08:41:52.689: WARN/PackageParser(7755): at android.content.pm.PackageParser.loadCertificates(PackageParser.java:362) 01-01 08:41:52.689: WARN/PackageParser(7755): at android.content.pm.PackageParser.collectCertificates(PackageParser.java:512) 01-01 08:41:52.689: WARN/PackageParser(7755): at com.android.server.pm.PackageManagerService.collectCertificatesLI(PackageManagerService.java:2806) 01-01 08:41:52.689: WARN/PackageParser(7755): at com.android.server.pm.PackageManagerService.scanPackageLI(PackageManagerService.java:2895) 01-01 08:41:52.689: WARN/PackageParser(7755): at com.android.server.pm.PackageManagerService.scanDirLI(PackageManagerService.java:2750) 01-01 08:41:52.689: WARN/PackageParser(7755): at com.android.server.pm.PackageManagerService.(PackageManagerService.java:1053) 01-01 08:41:52.689: WARN/PackageParser(7755): at com.android.server.pm.PackageManagerService.main(PackageManagerService.java:833) 01-01 08:41:52.689: WARN/PackageParser(7755): at com.android.server.ServerThread.run(SystemServer.java:163) 01-01 08:41:52.689: ERROR/PackageParser(7755): Package android has no certificates at entry AndroidManifest.xml; ignoring! 01-01 08:41:52.689: INFO/PackageManager(7755): /system/app/HTMLViewer.apk changed; collecting certs 01-01 08:41:52.689: WARN/PackageManager(7755): Failed verifying certificates for package:android 01-01 08:41:52.699: WARN/PackageParser(7755): Exception reading AndroidManifest.xml in /system/app/HTMLViewer.apk 01-01 08:41:52.699: WARN/PackageParser(7755): java.lang.SecurityException: /system/app/HTMLViewer.apk failed verification of META-INF/CERT.SF 01-01 08:41:52.699: WARN/PackageParser(7755): at java.util.jar.JarVerifier.failedVerification(JarVerifier.java:136) 01-01 08:41:52.699: WARN/PackageParser(7755): at java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:305) 01-01 08:41:52.699: WARN/PackageParser(7755): at java.util.jar.JarVerifier.readCertificates(JarVerifier.java:258)
如您所见,主要的 android apk 无法加载,因为它似乎没有正确的密钥, 但我发现系统映像中的所有apk都已签名,并且我的java版本是1.6.2_64位,所以应该没有问题。
jhb@ARND1B7:~/android-4.0.3_r1/out/debug/target/product/android/system/framework$ jarsigner -verify framework-res.apk jar verified. jhb@ARND1B7:~/android-4.0.3_r1/out/debug/target/product/android/system/framework$ java -version java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
一个可疑的事情是,构建属性。 我完全像这样构建android, (构建时屏幕上会出现此提示,
jhb@ARND1B7:~/android-4.0.3_r1$ make -j12 PRODUCT-android-eng ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=4.0.1 TARGET_PRODUCT=android TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=debug TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a HOST_ARCH=x86 HOST_OS=linux HOST_BUILD_TYPE=release BUILD_ID=ITL41D ============================================
我是否必须在 AndroidProduct.mk 上添加一些属性?或者我应该做什么? 任何答案将不胜感激。
Him I'm now trying to build my own ICS system image (from android-native source 4.0.3_r1 branch), and I can get adb message now, but somehow system-server died because of signing error in booting time
01-01 08:41:52.689: WARN/PackageParser(7755): Exception reading AndroidManifest.xml in /system/framework/framework-res.apk 01-01 08:41:52.689: WARN/PackageParser(7755): java.lang.SecurityException: /system/framework/framework-res.apk failed verification of META-INF/CERT.SF 01-01 08:41:52.689: WARN/PackageParser(7755): at java.util.jar.JarVerifier.failedVerification(JarVerifier.java:136) 01-01 08:41:52.689: WARN/PackageParser(7755): at java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:305) 01-01 08:41:52.689: WARN/PackageParser(7755): at java.util.jar.JarVerifier.readCertificates(JarVerifier.java:258) 01-01 08:41:52.689: WARN/PackageParser(7755): at java.util.jar.JarFile.getInputStream(JarFile.java:378) 01-01 08:41:52.689: WARN/PackageParser(7755): at android.content.pm.PackageParser.loadCertificates(PackageParser.java:362) 01-01 08:41:52.689: WARN/PackageParser(7755): at android.content.pm.PackageParser.collectCertificates(PackageParser.java:512) 01-01 08:41:52.689: WARN/PackageParser(7755): at com.android.server.pm.PackageManagerService.collectCertificatesLI(PackageManagerService.java:2806) 01-01 08:41:52.689: WARN/PackageParser(7755): at com.android.server.pm.PackageManagerService.scanPackageLI(PackageManagerService.java:2895) 01-01 08:41:52.689: WARN/PackageParser(7755): at com.android.server.pm.PackageManagerService.scanDirLI(PackageManagerService.java:2750) 01-01 08:41:52.689: WARN/PackageParser(7755): at com.android.server.pm.PackageManagerService.(PackageManagerService.java:1053) 01-01 08:41:52.689: WARN/PackageParser(7755): at com.android.server.pm.PackageManagerService.main(PackageManagerService.java:833) 01-01 08:41:52.689: WARN/PackageParser(7755): at com.android.server.ServerThread.run(SystemServer.java:163) 01-01 08:41:52.689: ERROR/PackageParser(7755): Package android has no certificates at entry AndroidManifest.xml; ignoring! 01-01 08:41:52.689: INFO/PackageManager(7755): /system/app/HTMLViewer.apk changed; collecting certs 01-01 08:41:52.689: WARN/PackageManager(7755): Failed verifying certificates for package:android 01-01 08:41:52.699: WARN/PackageParser(7755): Exception reading AndroidManifest.xml in /system/app/HTMLViewer.apk 01-01 08:41:52.699: WARN/PackageParser(7755): java.lang.SecurityException: /system/app/HTMLViewer.apk failed verification of META-INF/CERT.SF 01-01 08:41:52.699: WARN/PackageParser(7755): at java.util.jar.JarVerifier.failedVerification(JarVerifier.java:136) 01-01 08:41:52.699: WARN/PackageParser(7755): at java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:305) 01-01 08:41:52.699: WARN/PackageParser(7755): at java.util.jar.JarVerifier.readCertificates(JarVerifier.java:258)
As you see, main android apk cannot be loaded because it seems doesn't have proper key,
but I found all apks in system image is signed, and my java version is 1.6.2_64bit so there should be no problem
jhb@ARND1B7:~/android-4.0.3_r1/out/debug/target/product/android/system/framework$ jarsigner -verify framework-res.apk jar verified. jhb@ARND1B7:~/android-4.0.3_r1/out/debug/target/product/android/system/framework$ java -version java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
The one suspicious thing is , build property.
I build android exactly like this,
(this prompt put out on screen when you build
jhb@ARND1B7:~/android-4.0.3_r1$ make -j12 PRODUCT-android-eng ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=4.0.1 TARGET_PRODUCT=android TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=debug TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a HOST_ARCH=x86 HOST_OS=linux HOST_BUILD_TYPE=release BUILD_ID=ITL41D ============================================
Do I have to add some property on my AndroidProduct.mk? or what should I do?
Any answer would be very appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试以下过程。运行:
你会看到所有可能的目标。那么如果你为 android 模拟器构建:
并且
Try the following process. Run:
You will see all possible targets. Then if you build for android emulator:
And
我找到了原因,它与 ramdisk 映像上的 init.rc 有关
在 init.rc 文件中,我们定义了用于引导 android 的 BOOTCLASSPATH
如果我们使用 ICS,BOOTCLASSPATH 变量应该像这样不同
I found what cause this, it was about init.rc on ramdisk image
In init.rc file, we defined BOOTCLASSPATH for boot android
If we use ICS, BOOTCLASSPATH variable should be different like this