0
votes

I'm building a custom ROM and would like to include a simple launcher I built as a system app. Here is my Android.mk

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

# General
LOCAL_PACKAGE_NAME := Tott
LOCAL_SDK_VERSION := current
LOCAL_MODULE_TAGS := optional
LOCAL_PROGUARD_ENABLED := disabled

# To make system app
LOCAL_CERTIFICATE := platform
LOCAL_UNINSTALLABLE_MODULE := true
LOCAL_PRIVILEGED_MODULE := true
LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3

# src/res files
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res

# libraries
LOCAL_STATIC_JAVA_LIBRARIES := android-support-v7-appcompat

#flags
LOCAL_AAPT_FLAGS := \
    --auto-add-overlay \
    --extra-packages android.support.v7.appcompat 

include $(BUILD_PACKAGE)

I have placed the Android.mk, AndroidManifest.xml, res folder, and src (containing java) in a directory called Tott which has been placed in [source]/packages/apps. I've also added Tott to PRODUCT_PACKAGES at [source]/build/target/product/core.mk

When I build the android system.img, it says that that it is including [source]/packages/apps/Tott/Android.mk in terminal but my app never shows in [source]/out/target/product/vender/system/app or priv-app. I'm also able to build my app successfully by simply running make Tott at [source].

What am I doing wrong here????

Thanks

1
Your Android.mk file looks similar to ones I have written. I will say that I've seen strange behavior when specifying LOCAL_SDK_VERSION, so I stopped including that line. I've also never used LOCAL_UNINSTALLABLE_MODULE. Everything else looks normal to me. Have you tried cding into your app directory and running the "mm" command? Does mm build and place your app in the correct place? - Greg Moens
One other thing to check, I see you are overriding Launcher2 and Launcher3. If you delete those apps under /out/.../system/priv-app, do they reappear after you run a build? If they do that means make does not like your Android.mk file for whatever reason because those app are not being overridden like you are requesting. - Greg Moens
Thanks! Commenting out the LOCAL_SDK_VERSION & LOCAL_UNINSTALLABLE_MODULE did the trick - nblandfo
Awesome! Let's turn that into an answer and you can accept it! - Greg Moens

1 Answers

0
votes

Comment out LOCAL_SDK_VERSION and LOCAL_UNINSTALLABLE_MODULE. I don't use those in my Android.mk files and I never have a problem.