简体   繁体   中英

Adding another key to AOSP build

I have two different Android devices from two different vendors. Each has their own customized AOSP build (which I manage). I've one set of system-signed apps to install on both devices. I'd like to avoid having to sign each APK separately for each device.

I can do this by replacing the system certs in the AOSP builds ( target/product/security/platform.{pk8,x50.pem} ). But this would mean re-signing any vendor-supplied apps for each device. I'd like to avoid that.

How can I add a second system cert to each build? I'd sign my own apps with the matching key and have single APKs that would install on both devices. Vendor apps could retain their existing signature matching the original system key.

You should your key files (pk8 and x509,pem) in the target/product/security/your_new_key.{pk8,x50.pem} directory and use this phrase in Android.mk files of your application:

LOCAL_CERTIFICATE := you_new_key

This app will then be signed using your new key.

For more info search about default keys present in AOSP (shared, media, ...)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM