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

后端 未结 2 1445
野性不改
野性不改 2021-01-27 02:01

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

2条回答
  •  情书的邮戳
    2021-01-27 02:16

    First, make sure the build has re-signed the apps. You may have to do a make clean to get rid of the previous artifacts.

    Also check the Android.mk files for your bundled system apps (like in packages/apps or wherever you may have put them). Where you see this line:

    LOCAL_CERTIFICATE := PRESIGNED
    

    replace it with this instead:

    LOCAL_CERTIFICATE := platform
    

    This will let the build re-sign your system apps with the key they'll be checked against.

    While using the same key for shared, media, testkey, platform will work (in the sense that your system should boot and function), it removes a layer of isolation from apps built with those keys. In particular, non-system apps that are normally signed with the testkey will now be signed with the same key as platform. This will give them access to system app data and code and also give them heightened privileges (like not having to ask the user for confirmation to use the camera or access their files). I don't think that's recommended.

提交回复
热议问题