2

I'm building an Android image from the Rockchip source and I would like to include an APK.

The APK has the following line in its AndroidManifest.xml:

android:sharedUserId="android.uid.system"

Which works fine as long as the application is signed with the same certificates as the system was. I'm currently achieving this by signing manually after the APK is built.

I'm using this answer to include the APK while the system is being built, however I have a little confusion in regards to the following line in the Android.mk file:

LOCAL_CERTIFICATE := < desired key >

The possible values of this field are: platform, shared, media and releasekey.

My question is if I include an unsigned copy of my application, is there a means to have it signed along with the rest of the system while building from source? Perhaps using one of these values for LOCAL_CERTIFICATE?

Daniel
  • 2,355
  • 9
  • 23
  • 30
keag
  • 299
  • 2
  • 15
  • Hmm, after some further searching I've found [this](http://stackoverflow.com/a/32135870/2698179), is this my only option? Do I have to manually sign the APK before inclusion in the image? – keag Apr 17 '17 at 19:25

1 Answers1

3

One way it to resign it before putting it into the build.

And for it to have system permissions you need to use the platform certificate:

LOCAL_CERTIFICATE := platform
skoperst
  • 2,259
  • 1
  • 23
  • 35