Removing the default app from android build source

Hallo @Terry,

I would like to reduce the first booting time, for it I would like to remove all default app and only put my app on it. Which source that I can modify for it. Thanks.

There are too many apps. :sweat:
You need to remove these apps by yourself.
This is a demo for removing the Launcher3 application

diff --git a/kvim/product/product.mk b/kvim/product/product.mk
index a4a7021..49b3d89 100644
--- a/kvim/product/product.mk
+++ b/kvim/product/product.mk
@@ -51,8 +51,8 @@ PRODUCT_PACKAGES += \
     Settings
 
 #MboxLauncher
-PRODUCT_PACKAGES += \
-    Launcher3
+#PRODUCT_PACKAGES += \
+#    Launcher3
 
 #USB PM
 PRODUCT_PACKAGES += \

Hallo @Terry,

Form the folder “/kvim/product/product.mk”, I could not find the whole list of the Apps. In which folder that I can find it? Should I change the CMake file in order to build the image?. Thanks for your help.

BR,

Doel

That’s too more, you need to search it on SDK source code, The easy way to do it is deleting the Android.mk file in application path.

Thanks a lot, I will try it later. I still have another question >> How to add the android app (apk file) which I had already created to the pre-built or pre_installed app?

You only need to copy your apk into the path device/khadas/kvim1/preinstall

1 Like

Hallo Terry,

Both removing the app and adding the apk for the pre-installed work properly. Thanks a loooooottt :+1:

Next question :slight_smile: How to run myApp automatically in a sense of the first booting?

Best Regards,

Doel

1 Like

You need to modify your application, and you can search BOOT_COMPLETED by google

Hallo Terry,

This one is done in my app. After first running, the app is automatically start after the boot completed. The thing is I have to at least tap/run the app after the first booting. Maybe there is a way that the app is atuomatically run after first booting so I do not need to tap the app. I had already tried to change the product.mk by replacing the Launcher3 with my app but it did not work. It is important for us, regarding the production aspect. It will save a lot of time.

BR,

Doel

Is your application as a Launcher application? You need to change your application property on AndroidManifest.xml file.

<category android:name="android.intent.category.HOME" />

I think you can search it by google.

Hello @Terry I want to remove unwanted apps from my Android source code. I tried removing the app from PRODUCT_PACKAGES list I found at make/target/product/handheld_product.mk

PRODUCT_PACKAGES +=
Calendar
Camera
Email
Music

This doesn’t seem to work. I still see these apps in the phone.
I tried renaming Android.mk files that too didn’t work for me.
Do we require to remove all the dependencies of the application on other apps in source code?
Or Am I looking at the right files?

Which application did you want to remove?

Hi @Terry, thanks for the reply. I want to remove most of the applications including camera, gallery, calendar, calculator, browser etc, because my requirement is to have only one app i.e, my application developed by me to be running, I want to remove all the unwanted apps from the build system.

Hi @Terry,
I want to remove unwanted apps from build to save system partition space so that i can add required new apks/apps.
I tried first by removing the apk directly in Makefile (main makefile ) just before the system.img get created. But we see functional issues even though the space is reduced.
Later we tried in Makefile in couple of places before system.img get created but it was throwing compilation errors saying the apk file is missing.
After googling several posts i came to know that we need to remove in the component or app name from PRODUCT_PACKAGES list macro. However i dont see all apps are listed under this list. This is for Automotive AOSP(car) not sure where and how to remove other apps which is not listed in PRODUCT_PACKAGES. Could you please help me on this?
Thanks
Sathya