简体   繁体   中英

How to make android open source project (AOSP) with preinstalled custom apps (using my own release key)?

I'm trying to make an AOSP ROM for a custom device that my company builds and I have to put some OEM apps (which are non-removable and should be updatable) in the build, I replaced all the default release keys (platform, media, shared, testkey, networkstack) that comes with the AOSP with the ones that I generated. and I'm signing the OEM apps with the platform key. my questions are as below:

  1. Should I set a password on.pk8 release keys? (When I do, the build process throws an error requesting the password for every key and every app)
  2. Is it better (or even technically possible) to put an additional release key in the build just to sign the OEM apps? or is there any better solutions?

Thanks in advance

It is good to have a password set, you can use the concept of $ANDROID_PW_FILE . You have to create a file to store the password on your system and set the value of this variable pointing to the file. More info in build/make/releasetools/common.py . Secondly, you can also assign the value of result[k] to your password, however it is not a very good habit to commit passwords to git.

Also, since you will sign apps with this key as well, need to update build/make/tools/signapk/src/com/android/signapk/SignApk.java for this change again.

Secondly, yes, you can create a new folder in the build directory (for example, if beta and release are two different channels with different keys) and export the path to these key directories for the variable PRODUCT_DEFAULT_DEV_CERTIFICATE based on if else logic for the channel. However, it is much easier to maintain one key for the OS and the system apps.

Also take a look at Android build custom certificates prompt for password ANDROID_PW_FILE

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