HI,
ROM: I build aosp-6.0.1-r7 aosp_flo-userdebug
Devices: Nexus 7 II
Goal: I want to use my application executes the command "load_policy" in
this ROM.

I have tried these steps as follows:
step 1.creat an application
1-1 the main code is as follows
>>Process process = Runtime.getRuntime().exec("su");
>>DataOutputStream os = new DataOutputStream(process.getOutputStream());
>>os.writeBytes("load_policy /data/local/tmp/sepolicy.dontaudit\n");
>>os.writeBytes("exit\n");
>>os.flush();
1-2 Androidmanifest.xml
add this
android:sharedUserId="android.uid.system"

step 2.App into AOSP
/package/apps
UserId: system
context: sysem_app

step 3.modify source code
3-1policy
system_app.te: add "allow system_app su_exec:file rx_file_perms;"
domain.te    : line 399 modify "neverallow { domain
userdebug_or_eng(`-dumpstate -shell -su -system_app') } su_exec:file
no_x_file_perms;"
3-2/system/core/libcutils/fs_config modify
{ 06755, AID_ROOT,      AID_SHELL,     0, "system/xbin/su" },

app's execution result shows there is no error(nothing) in logcat, but
didn't load new policy.

Why this would NOT work?
How can I achieve that?

Lee
_______________________________________________
Seandroid-list mailing list
[email protected]
To unsubscribe, send email to [email protected].
To get help, send an email containing "help" to 
[email protected].

Reply via email to