Is creating an application in an Android source compiled into a system / application instead of data / applications?

I am collecting Android-ROM from the source, and I have several applications that compile but in the data / app on the phone. They are deleted by phone settings. I want it impossible to delete them from the phone and compile them into a system / application instead of data / applications.

Any tips?

edit: typo

+6
source share
4 answers

Add

LOCAL_MODULE_PATH := system/app LOCAL_UNINSTALLABLE_MODULE := true LOCAL_CERTIFICATE := platform 
+3
source

Here is an example mk file that you can use. In my case, the application is then embedded in system/app :

 LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_PACKAGE_NAME := package_name LOCAL_CERTIFICATE := platform include $(BUILD_PACKAGE) # Use the folloing include to make our test app include $(call all-makefiles-under,$(LOCAL_PATH)) 
+2
source

With cm_10.2, I added my application to packages / applications and by default, mm built it into / data / app. I wanted it in a system / application. This worked by adding this to Android.mk:

 LOCAL_MODULE_PATH := $(TARGET_OUT_APPS) 

But I'm not sure if this is the clean way, since I almost did not find that no one is doing this.

0
source
 LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_UNINSTALLABLE_MODULE := true LOCAL_MODULE_PATH := $(TARGET_OUT_APPS) LOCAL_CERTIFICATE := platform LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_PACKAGE_NAME := MyTestApp LOCAL_PROGUARD_ENABLED := disabled LOCAL_PRIVILEGED_MODULE := true LOCAL_STATIC_JAVA_LIBRARIES := libarity android-support-v4 include $(BUILD_PACKAGE) include $(call all-makefiles-under,$(LOCAL_PATH)) 
0
source

Source: https://habr.com/ru/post/913166/


All Articles