标签:security openssl 调试 eclipse android
操作系统:Ubuntu12.04
手机系统:Android5.0
需要有编译过的Android代码
在Eclipse上开发系统应用时,应用需要系统权限,如:Setting、Phone需要添加android:sharedUserId="android.uid.system"。但不能直接run,
会报下面的错误:Installation error: INSTALL_FAILED_SHARED_USER_INCOMPATIBLE
[2015-03-10 10:24:06 - GNSmartShot] ------------------------------ [2015-03-10 10:24:06 - GNSmartShot] Android Launch! [2015-03-10 10:24:06 - GNSmartShot] adb is running normally. [2015-03-10 10:24:06 - GNSmartShot] Performing com.gionee.gnsmartshot.ui.MainActivity activity launch [2015-03-10 10:24:06 - GNSmartShot] Automatic Target Mode: using device '0123456789ABCDEF' [2015-03-10 10:24:06 - GNSmartShot] Uploading GNSmartShot.apk onto device '0123456789ABCDEF' [2015-03-10 10:24:06 - GNSmartShot] Installing GNSmartShot.apk... [2015-03-10 10:24:09 - GNSmartShot] Installation error: INSTALL_FAILED_SHARED_USER_INCOMPATIBLE [2015-03-10 10:24:09 - GNSmartShot] Please check logcat output for more details. [2015-03-10 10:24:09 - GNSmartShot] Launch canceled!
需要以下四个步骤
进入./build/target/product/security目录可以看到有以下文件
dzt@uu:~/workarea/7501_mp_l/android_mtk_l6752_lwt_mp/build/target/product/security$ ls Android.mk media.x509.pem platform.x509.pem releasekey.pk8 shared.pk8 testkey.pk8 verity_key media.pk8 platform.pk8 README releasekey.x509.pem shared.x509.pem testkey.x509.pem verity_private_dev_key
上面命令的截图:
4、eclipse 的Windows/Preferences/Android/Build中设置"Custom debug keystore"为刚才生成的keystore即可
参考资料:
1.http://my.oschina.net/blackylin/blog/176851
标签:security openssl 调试 eclipse android
原文地址:http://blog.csdn.net/deng0zhaotai/article/details/44224905