I’m currently working on a project that requires preinstalling some apps and services into an image file. I’ve tried putting the .apk into the out\target\product\kvim3\system\app directory, but after compiling the image nothing changed.
Put the corresponding APK in this directory: device\khadas\kvim3\preinstall
Add corresponding file modification: device\khadas\kvim3\preinstall\Android.mk
Appreciate your response. I think I’ve already tried this solution yesterday. The app was installed. But it showed the error OpenCV manager package was not found. I think .so wasn’t properly compiled into the image. But I will try this solution again tomorrow morning in case I missed some steps last time!
I’ve tried to install two of our apps using the solution above. One installed properly, but the other one didn’t get installed at all. I tried to use pm install manually under /system/preinstall/ourAPP/* directory. It showed the error Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Package /data/app/vmdl438956791.tmp/base.apk has no certificates at entry AndroidManifest.xml], which Im pretty sure out app is signed properly.
Anyone know what could be the potential reason for this?
@noobsplzwin Put the corresponding APK in this directory: vendor/amlogic/common/apps/xxx/
Add corresponding file modification: vendor/amlogic/common/apps/xxx/Android.mk
Thanks again for the help. I will try this solution tomorrow morning. Couple questions
Does the second solution only apply for the apk I sent to u or it’s a general solution? What’s the reason caused the apk I sent to u can’t be installed using ur previous solution?
Based on ur solution, except Android.mk, I also need to modify product_mbox.mk right?