Not booting after adding app to priv-app

564 views
Skip to first unread message

Vishnu M J

unread,
Sep 9, 2019, 10:01:15 AM9/9/19
to Android Building
Hi,

I have been trying to add a apk to priv-app.

Following are the steps i did:

Made a folder named Testapk in packages/apps
Copied apk to folder with name Testapk.apk
In same directory, created an Android.mk file with following contents:

LOCAL_PATH := $(call my-dir)


include $(CLEAR_VARS)


LOCAL_MODULE_TAGS := optional


LOCAL_MODULE := Testapk


LOCAL_CERTIFICATE := PRESIGNED


LOCAL_SRC_FILES := Testapk.apk


LOCAL_MODULE_CLASS := APPS


LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)


LOCAL_PRIVILEGED_MODULE := true


TARGET_OUT_DATA_APPS_PRIVILEGED := $(TARGET_OUT_DATA)/priv-app


include $(BUILD_PREBUILT)


Then, added Testapk to core.mk


Build is successful and i can see my apk in priv-app folder in out/target/product/sailfish/system/priv-app. After flashing, the device wont boot up. Its stuck on Android logo. 


(I am using google pixel-sailfish. Branch is android-9.0.0_r33)

(On adding apk to system/apps, i can boot and the apk works fine)


Can someone help me on this???

Colin Cross

unread,
Sep 9, 2019, 1:15:27 PM9/9/19
to android-...@googlegroups.com
It's hard to tell without logs (you can get adb access for early crashes like this by pre-installing an ADB public key using PRODUCT_ADB_KEYS), but my guess is you need to add something to https://android.googlesource.com/platform/frameworks/base/+/master/data/etc/privapp-permissions-platform.xml?pli=1 or https://android.googlesource.com/device/google/marlin/+/master/permissions/privapp-permissions-marlin.xml

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/78f67bd6-2e90-40ea-81a8-1a4f1644b8a0%40googlegroups.com.

Vishnu M J

unread,
Sep 17, 2019, 3:38:18 PM9/17/19
to Android Building
Thanks Colin... After adding permissions to privapp-permissions-platform.xml, everything works fine and as expected. 

For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages