AOSP Android 10 - How to add in Precompiled APK as System App in Build

Hi guys.

So, finally got my Khadas Edge Board and have been able to compile a stock “Vanilla” version of Android 10.

Next step is to be able to bundle in an APK which we build in the company. I have found this link to a Stackoverflow thread, but I am not sure where exactly to place the APK and how to bundle it in correctly.

Our requirements are that the app comes in on the update.img file we hand over to customer and that it is updatable without requiring a new flash of the device. Also, it should store some data (eg. logs and settings files) in 0/Android/data/my.app.package/{files}.

I have seen it requires me to create some custom .mk files and place them in root/packages/apps/{myapp}/Android.mk, but I am still a little unsure of the process.

If anyone is able to help me through this, perhaps with a template or skeleton with which I can begin, that would be very much appreciated.

Thank you kindly.

Best,
Lorenzo

PS: this might not be the correct category for this question, if so please feel free to move it where it best fits

@lorenz please see if you can take any cues from this topic, its not directly related to Edge board, but Android building itself :slightly_smiling_face:

I presume you need to replace the kvim1 with edge

if you have more queries you can tag Terry or goenjoy

He asks about Rockchip, and you offer him Amlogic, with your zero knowledge of Androyd, why are you trying to confuse users? :see_no_evil:

For Edge-V place your app in
/device/rockchip/rk3399/preinstall_del/ folder for it to be preinstalled.
Make sure the app is 32-bit(arm) since 64-bit(arm64) apps can’t be preinstalled.
If you want to add it as a system, non removable app, you need to use a Makefile instead.

3 Likes
vendor\rockchip\common\apps 

You can refer to the apks in this directory to add.

vendor\rockchip\common\apps\apps.mk

This file is the APK file that manages this directory

1 Like

@Electr1 thank you very much for your response. With a little bit of digging and figuring out, managed to achieve the desired result.
@goenjoy sums it up pretty well.

Thanks lads!

1 Like