Discussion:
can I pack and pre-install app APK in 'data\app' instead of 'system\app' as part of iso image ??
(too old to reply)
jack zhang
2018-11-16 18:14:20 UTC
Permalink
I have an apk ("myAPP.apk") built from Android Studio that I want to put
into 'data\app' directory as part of the 6.0-r3 iso image it should be
pre-installed just like 'Calculator', 'Calendar' apps etc that are in
'system/app' directory, but I want it to be 'data\app' directory so user
can un-install it.

I created an 'android.mk' shown at bottom in '../packages/apps/myAPP', put
"myAPP.apk" in '../packages/apps/myAPP'.
I added 'myAPP' in 'PRODUCT_PACKAGES' in
'../device/generic/common/packages.mk'.

*after iso image is generated, I don't see 'myAPP' in
'installed-files.txt', after burning the iso image to the hard disk, the
hard disk 'data\app' directory is empty.*

If I put the apk in 'system/app' directory by commenting out the line
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS), then 'myAPP' is installed and
i can see its icon on desktop.

my android.mk:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := myAPP

LOCAL_SRC_FILES := $(LOCAL_MODULE).apk

LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)

LOCAL_MODULE_CLASS := APPS

LOCAL_CERTIFICATE := PRESIGNED

LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)

LOCAL_MODULE_TAGS := optional

include $(BUILD_PREBUILT)
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
jack zhang
2018-11-20 23:39:55 UTC
Permalink
Chih-Wei:

can you tell me the steps how to modify the installer to consider
data.img?
The installer of Android-x86 won't install anything to /data/.
It just creates an empty dir (if not exist).
If you want to install something to /data/,
you have to modify the installer to consider data.img.
Post by jack zhang
I have an apk ("myAPP.apk") built from Android Studio that I want to put
into 'data\app' directory as part of the 6.0-r3 iso image it should be
pre-installed just like 'Calculator', 'Calendar' apps etc that are in
'system/app' directory, but I want it to be 'data\app' directory so user
can un-install it.
Post by jack zhang
I created an 'android.mk' shown at bottom in '../packages/apps/myAPP',
put "myAPP.apk" in '../packages/apps/myAPP'.
Post by jack zhang
I added 'myAPP' in 'PRODUCT_PACKAGES' in '../device/generic/common/
packages.mk'.
Post by jack zhang
after iso image is generated, I don't see 'myAPP' in
'installed-files.txt', after burning the iso image to the hard disk, the
hard disk 'data\app' directory is empty.
Post by jack zhang
If I put the apk in 'system/app' directory by commenting out the line
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS), then 'myAPP' is installed and
i can see its icon on desktop.
Post by jack zhang
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := myAPP
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_MODULE_CLASS := APPS
LOCAL_CERTIFICATE := PRESIGNED
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
LOCAL_MODULE_TAGS := optional
include $(BUILD_PREBUILT)
--
You received this message because you are subscribed to the Google
Groups "Android-x86" group.
Post by jack zhang
To unsubscribe from this group and stop receiving emails from it, send
<javascript:>.
Post by jack zhang
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
--
Chih-Wei
Android-x86 project
http://www.android-x86.org
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...