Re: [android-building] Not booting after adding app to priv-app

2019-09-17 Thread Vishnu M J
Thanks Colin... After adding permissions to 
privapp-permissions-platform.xml, everything works fine and as expected. 

On Monday, September 9, 2019 at 10:45:27 PM UTC+5:30, Colin Cross wrote:
>
> 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
>
> On Mon, Sep 9, 2019 at 7:01 AM Vishnu M J  > wrote:
>
>> 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???
>>
>> -- 
>> -- 
>> 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-...@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-...@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
>>  
>> 
>> .
>>
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@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-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/97818cb0-0ec7-405e-99e2-2afeb165a083%40googlegroups.com.


Re: [android-building] Not booting after adding app to priv-app

2019-09-09 Thread 'Colin Cross' via Android Building
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

On Mon, Sep 9, 2019 at 7:01 AM Vishnu M J 
wrote:

> 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???
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@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-building+unsubscr...@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
> 
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@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-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRSqLEhfK1V_V4gVO7fYwSKnj35%3DWCTMAEMfE6n9mSjqNw%40mail.gmail.com.


[android-building] Not booting after adding app to priv-app

2019-09-09 Thread Vishnu M J
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???

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@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-building+unsubscr...@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.