Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AOSP building: replace my own keys with default test-keys

I am building AOSP and I want to sign the build with my own key. There is some official doc about this process here.

But I wonder if I can simply turn around all of that process and instead do this things:

  1. Delete default android test-keys which are located at build/target/product/security
  2. put my keys (which are generated using official instructions at here) in that folder with same names. (Assume one key for all of shared,media,...)

But this approach does not work. After burning the image, system apps (SystemUI, settings,..) will stop and continuously show the ANR dialog. I know this happens if system signature does not match with these apps's signature... but why?

Another question: Is using same key as shared.pk8 , media.pk8, testkey.pk8 , ... causes any problem?

Thanks

like image 609
Saleh Avatar asked Sep 15 '25 09:09

Saleh


1 Answers

One suggestion:

If you don't want to keep your private keys in source control together with the aosp code, you can define a path to them in your device mk:

PRODUCT_DEFAULT_DEV_CERTIFICATE :=  /home/my_user/release_keys_folder/releasekey
PRODUCT_VERITY_SIGNING_KEY := /home/my_user/release_keys_folder/verity
like image 136
Rick Sanchez Avatar answered Sep 18 '25 11:09

Rick Sanchez