How I can set file permissions in a custom project added to Android AOSP -
i add aosp device-owner app.
- create directory @ packages/apps/myapp
- copy myapp.apk , device-owner.xml packages/apps/myapp
- create android.mk:
local_path := $(call my-dir) include $(clear_vars) $(shell mkdir -p $(target_out_data)/system) $(shell cp $(local_path)/device_owner.xml $(target_out_data)/system) local_module_tags := optional local_module := myapp local_certificate := presigned local_privileged_module := true local_src_files := $(local_module).apk local_module_class := apps local_module_suffix := $(common_android_package_suffix) local_post_install_cmd := chown system:system $(target_out_data)/system/device_owner.xml include $(build_prebuilt)
- device-owner.xml
<?xml version='1.0' encoding='utf-8' standalone='yes' ?> <device-owner package="com.test.test.myapp" />
- after flash userdata.img device have permissions:
-rw-r--r-- root root 112 2016-09-22 06:29 device_owner.xml
but must have such after dpm set-device-owner com.test.test.myapp/.deviceadminreceiver
-rw------- system system 112 2016-09-22 06:29 device_owner.xml
how can set permissions /data/system/device-owner.xml via android.xml or way?
sorry if unclear - mean can modify permission of file in system/core/include/private/android_filesystem_config.h
described here: http://paldan.altervista.org/dir-and-files-permissions-in-the-aosp-filesystem/?doing_wp_cron=1474724093.3321709632873535156250 or place device-owner.xml folder proper permissions
Comments
Post a Comment