[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.


[android-building] Logging all events in android

2019-09-09 Thread Ajay Kumar
Hi, I am new to building android from source. In my custom rom (for 
testing), I need to log all events (like an app opened, app closed, new 
notification arrived and all other possible events) in the android phone.

I would like to know where to add the logging code. As far as I know, the 
system server is the place to do so. Please correct me if I am wrong. Also, 
please name the primary file to look at if possible (easier for me to 
change rather than looking at entire code).

Thank you.

-- 
-- 
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/7dde3c4a-9b94-4278-b6d3-a813eac3477e%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] Android Security Backport Released

2019-09-09 Thread 'Bill Yi' via Android Building
Android security backport source code is now available. The following 
builds and tags are supported:

5725749, android-7.1.1_r60
5725750, android-7.1.2_r38
5729099, android-8.0.0_r38
5725752, android-8.1.0_r68
5748468, android-9.0.0_r48

bill

-- 
-- 
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/7b6c091e-04f9-40d8-bb2d-53bc45576acc%40googlegroups.com.


[android-building] Re: Building kernel inline with rom

2019-09-09 Thread Viacheslav Krenev
I'm doing it like that (my case is Marlin (Pixel, Pixel XL), AOSP 8.1), 
don't know anything about Pie and later.

1. Download the kernel for msm, checkout the proper branch
2. Rename the kernel checkout directory to "marlin" and place it to 
kernel/google/ in the AOSP tree,
3. Open AndroidKernel.mk and find lines:
TARGET_KERNEL := msm-$(TARGET_KERNEL_VERSION)
ifeq ($(TARGET_KERNEL),$(current_dir))
# New style, kernel/msm-version
BUILD_ROOT_LOC := ../../
TARGET_KERNEL_SOURCE := kernel/$(TARGET_KERNEL)
KERNEL_OUT := $(TARGET_OUT_INTERMEDIATES)/kernel/$(TARGET_KERNEL)
KERNEL_SYMLINK := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ
KERNEL_USR := $(KERNEL_SYMLINK)/usr
else
# Legacy style, kernel source directly under kernel
KERNEL_LEGACY_DIR := true
BUILD_ROOT_LOC := ../
TARGET_KERNEL_SOURCE := kernel
KERNEL_OUT := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ
endif

and change them to 

TARGET_KERNEL := google/marlin

BUILD_ROOT_LOC := ../../../

4. In device/google/marlin make a new file called AndroidBoard.mk with the 
following content:

#ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
#KERNEL_DEFCONFIG := marlin-debug_defconfig
#else
KERNEL_DEFCONFIG := marlin_defconfig
#endif

KERNEL_DIR := kernel/google/marlin
TARGET_KERNEL_APPEND_DTB := true

include $(TOP)/$(KERNEL_DIR)/AndroidKernel.mk

.PHONY: $(PRODUCT_OUT)/kernel
$(PRODUCT_OUT)/kernel: $(TARGET_PREBUILT_KERNEL)
cp $(TARGET_PREBUILT_KERNEL) $(PRODUCT_OUT)/kernel
uncomment the condition on the top if you need.

5. In device/google/marlin/device-common.mk find lines: 

ifeq ($(TARGET_PREBUILT_KERNEL),)
LOCAL_KERNEL := device/google/marlin-kernel/Image.lz4-dtb
else
LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
endif

PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel

and delete them.

6. In device/google/marlin/marlin and device/google/marlin/sailfish make a 
symlink AndroidBoard.mk -> device/google/marlin/AndroidBoard.mk

7. I don't know exactly, but if you really need, you can try to uncomment 
the line in BoardConfig.mk

# TARGET_COMPILE_WITH_MSM_KERNEL := true 

to make your condition work. I never did that so can't say if it works.

BTW: Personally I don't know if Pie is different about compiling kernels. I 
see the same conditions about prebuilt kernels as in Oreo.

понедельник, 9 сентября 2019 г., 4:23:23 UTC+3 пользователь Clienthax 
написал:
>
> Problem with that is that the kernel headers won't get 'installed', 
> breaking qcom msm kernel header locations, 
> https://android.googlesource.com/platform/hardware/qcom/display/+/refs/heads/master/msm8994/common.mk#48
>
> On Monday, 9 September 2019 01:18:43 UTC+1, The Glitchh wrote:
>>
>> Use prebuilt kernel , compile the kernel separately and then push the 
>> Image.gz-dtb to the device tree and use the preceding flags to define the 
>> prebuilt kernel 
>>
>> # Prebuilt \kernel 
>> PRODUCT_COPY_FILES += \ 
>> $(LOCAL_PATH)/Image.gz-dtb:kernel 
>>
>> Paste this in device.mk makkefile of your device tree
>
>

-- 
-- 
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/004620f7-e5e6-4e30-ba53-4aa11539a632%40googlegroups.com.