Pre-install some apps so they can be uninstalled without root by user











up vote
2
down vote

favorite












Can I (As a AOSP builder) pre install some apps so after burning on device, they can easily be uninstalled (like regular downloaded apps)?



I am already familiar with system apps and priv-apps but as they lie in system partition they can not be removed! (only disabled in settings menu)



P.S. I know huawei for example uses /system/delapp to install such apps. But I seek for a general way or for AMLogic platform specifically which I am working on!










share|improve this question















This question had a bounty worth +50
reputation from Saleh that ended 9 hours ago. Grace period ends in 14 hours


This question has not received enough attention.


Please tell me exactly and step-by-step how to compile and build AOSP 7.1 for amlogic platform so I have some uninstallable Pre-installed apps
















  • An app is removable only if it is in /data. So I got an idea, install all the apps you want on a device and make the data partition an image. But this may not as easy what I think.
    – reavenisadesk
    Nov 29 at 15:32










  • I think this not the way other vendors try to put their apps... @reavenisadesk
    – Saleh
    Nov 29 at 20:46















up vote
2
down vote

favorite












Can I (As a AOSP builder) pre install some apps so after burning on device, they can easily be uninstalled (like regular downloaded apps)?



I am already familiar with system apps and priv-apps but as they lie in system partition they can not be removed! (only disabled in settings menu)



P.S. I know huawei for example uses /system/delapp to install such apps. But I seek for a general way or for AMLogic platform specifically which I am working on!










share|improve this question















This question had a bounty worth +50
reputation from Saleh that ended 9 hours ago. Grace period ends in 14 hours


This question has not received enough attention.


Please tell me exactly and step-by-step how to compile and build AOSP 7.1 for amlogic platform so I have some uninstallable Pre-installed apps
















  • An app is removable only if it is in /data. So I got an idea, install all the apps you want on a device and make the data partition an image. But this may not as easy what I think.
    – reavenisadesk
    Nov 29 at 15:32










  • I think this not the way other vendors try to put their apps... @reavenisadesk
    – Saleh
    Nov 29 at 20:46













up vote
2
down vote

favorite









up vote
2
down vote

favorite











Can I (As a AOSP builder) pre install some apps so after burning on device, they can easily be uninstalled (like regular downloaded apps)?



I am already familiar with system apps and priv-apps but as they lie in system partition they can not be removed! (only disabled in settings menu)



P.S. I know huawei for example uses /system/delapp to install such apps. But I seek for a general way or for AMLogic platform specifically which I am working on!










share|improve this question













Can I (As a AOSP builder) pre install some apps so after burning on device, they can easily be uninstalled (like regular downloaded apps)?



I am already familiar with system apps and priv-apps but as they lie in system partition they can not be removed! (only disabled in settings menu)



P.S. I know huawei for example uses /system/delapp to install such apps. But I seek for a general way or for AMLogic platform specifically which I am working on!







android-source android-7.1-nougat






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 21 at 15:51









Saleh

357519




357519






This question had a bounty worth +50
reputation from Saleh that ended 9 hours ago. Grace period ends in 14 hours


This question has not received enough attention.


Please tell me exactly and step-by-step how to compile and build AOSP 7.1 for amlogic platform so I have some uninstallable Pre-installed apps








This question had a bounty worth +50
reputation from Saleh that ended 9 hours ago. Grace period ends in 14 hours


This question has not received enough attention.


Please tell me exactly and step-by-step how to compile and build AOSP 7.1 for amlogic platform so I have some uninstallable Pre-installed apps














  • An app is removable only if it is in /data. So I got an idea, install all the apps you want on a device and make the data partition an image. But this may not as easy what I think.
    – reavenisadesk
    Nov 29 at 15:32










  • I think this not the way other vendors try to put their apps... @reavenisadesk
    – Saleh
    Nov 29 at 20:46


















  • An app is removable only if it is in /data. So I got an idea, install all the apps you want on a device and make the data partition an image. But this may not as easy what I think.
    – reavenisadesk
    Nov 29 at 15:32










  • I think this not the way other vendors try to put their apps... @reavenisadesk
    – Saleh
    Nov 29 at 20:46
















An app is removable only if it is in /data. So I got an idea, install all the apps you want on a device and make the data partition an image. But this may not as easy what I think.
– reavenisadesk
Nov 29 at 15:32




An app is removable only if it is in /data. So I got an idea, install all the apps you want on a device and make the data partition an image. But this may not as easy what I think.
– reavenisadesk
Nov 29 at 15:32












I think this not the way other vendors try to put their apps... @reavenisadesk
– Saleh
Nov 29 at 20:46




I think this not the way other vendors try to put their apps... @reavenisadesk
– Saleh
Nov 29 at 20:46












1 Answer
1






active

oldest

votes

















up vote
0
down vote













You can do that by configuring your build to produce a userdata.img file with your app(s) included, which you can then flash with fastboot flash userdata.



The Android.mk file for these apps that go in userdata.img roughly looks like the following:



include $(CLEAR_VARS)
LOCAL_MODULE := myapp1
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/app
LOCAL_CERTIFICATE := PRESIGNED
include $(BUILD_PREBUILT)


And add the apps to product packages in device.mk:



PRODUCT_PACKAGES += myapp1 myapp2 ...


You should be able to find plenty of examples on GitHub, e.g., https://github.com/search?l=Makefile&q=TARGET_OUT_DATA+BUILD_PREBUILT&type=Code






share|improve this answer





















  • Can you please explain how to create userdata.img ? and also how to pack this new partition with other partitions when packing image in AOSP build environment
    – Saleh
    7 hours ago











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53415804%2fpre-install-some-apps-so-they-can-be-uninstalled-without-root-by-user%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













You can do that by configuring your build to produce a userdata.img file with your app(s) included, which you can then flash with fastboot flash userdata.



The Android.mk file for these apps that go in userdata.img roughly looks like the following:



include $(CLEAR_VARS)
LOCAL_MODULE := myapp1
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/app
LOCAL_CERTIFICATE := PRESIGNED
include $(BUILD_PREBUILT)


And add the apps to product packages in device.mk:



PRODUCT_PACKAGES += myapp1 myapp2 ...


You should be able to find plenty of examples on GitHub, e.g., https://github.com/search?l=Makefile&q=TARGET_OUT_DATA+BUILD_PREBUILT&type=Code






share|improve this answer





















  • Can you please explain how to create userdata.img ? and also how to pack this new partition with other partitions when packing image in AOSP build environment
    – Saleh
    7 hours ago















up vote
0
down vote













You can do that by configuring your build to produce a userdata.img file with your app(s) included, which you can then flash with fastboot flash userdata.



The Android.mk file for these apps that go in userdata.img roughly looks like the following:



include $(CLEAR_VARS)
LOCAL_MODULE := myapp1
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/app
LOCAL_CERTIFICATE := PRESIGNED
include $(BUILD_PREBUILT)


And add the apps to product packages in device.mk:



PRODUCT_PACKAGES += myapp1 myapp2 ...


You should be able to find plenty of examples on GitHub, e.g., https://github.com/search?l=Makefile&q=TARGET_OUT_DATA+BUILD_PREBUILT&type=Code






share|improve this answer





















  • Can you please explain how to create userdata.img ? and also how to pack this new partition with other partitions when packing image in AOSP build environment
    – Saleh
    7 hours ago













up vote
0
down vote










up vote
0
down vote









You can do that by configuring your build to produce a userdata.img file with your app(s) included, which you can then flash with fastboot flash userdata.



The Android.mk file for these apps that go in userdata.img roughly looks like the following:



include $(CLEAR_VARS)
LOCAL_MODULE := myapp1
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/app
LOCAL_CERTIFICATE := PRESIGNED
include $(BUILD_PREBUILT)


And add the apps to product packages in device.mk:



PRODUCT_PACKAGES += myapp1 myapp2 ...


You should be able to find plenty of examples on GitHub, e.g., https://github.com/search?l=Makefile&q=TARGET_OUT_DATA+BUILD_PREBUILT&type=Code






share|improve this answer












You can do that by configuring your build to produce a userdata.img file with your app(s) included, which you can then flash with fastboot flash userdata.



The Android.mk file for these apps that go in userdata.img roughly looks like the following:



include $(CLEAR_VARS)
LOCAL_MODULE := myapp1
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/app
LOCAL_CERTIFICATE := PRESIGNED
include $(BUILD_PREBUILT)


And add the apps to product packages in device.mk:



PRODUCT_PACKAGES += myapp1 myapp2 ...


You should be able to find plenty of examples on GitHub, e.g., https://github.com/search?l=Makefile&q=TARGET_OUT_DATA+BUILD_PREBUILT&type=Code







share|improve this answer












share|improve this answer



share|improve this answer










answered 9 hours ago









John

468313




468313












  • Can you please explain how to create userdata.img ? and also how to pack this new partition with other partitions when packing image in AOSP build environment
    – Saleh
    7 hours ago


















  • Can you please explain how to create userdata.img ? and also how to pack this new partition with other partitions when packing image in AOSP build environment
    – Saleh
    7 hours ago
















Can you please explain how to create userdata.img ? and also how to pack this new partition with other partitions when packing image in AOSP build environment
– Saleh
7 hours ago




Can you please explain how to create userdata.img ? and also how to pack this new partition with other partitions when packing image in AOSP build environment
– Saleh
7 hours ago


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53415804%2fpre-install-some-apps-so-they-can-be-uninstalled-without-root-by-user%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Berounka

Sphinx de Gizeh

Different font size/position of beamer's navigation symbols template's content depending on regular/plain...