How I can set file permissions in a custom project added to Android AOSP -


i add aosp device-owner app.

  1. create directory @ packages/apps/myapp
  2. copy myapp.apk , device-owner.xml packages/apps/myapp
  3. 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) 
  1. device-owner.xml
<?xml version='1.0' encoding='utf-8' standalone='yes' ?> <device-owner package="com.test.test.myapp" /> 
  1. 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

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -