-From f60df3b40bef428241ee3d931568e8de816fef7e Mon Sep 17 00:00:00 2001
+From 1de70b8ad770aee39a1d6f3f7760c03758a7b989 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?M=C3=A5rten=20Kongstad?= <marten.kongstad@sonymobile.com>
Date: Mon, 22 Jun 2015 09:31:25 +0200
-Subject: [PATCH 01/12] OMS7-N: Add service 'overlay' to service_contexts
+Subject: [PATCH 01/13] OMS7-N: Add service 'overlay' to service_contexts
The 'overlay' service is the Overlay Manager Service, which tracks
packages and their Runtime Resource Overlay overlay packages.
allow system_server system_server_service:service_manager { add find };
allow system_server surfaceflinger_service:service_manager find;
--
-2.11.1
+2.9.4
-From a420610fb6940291fac20da7d7310b9fe942dfcb Mon Sep 17 00:00:00 2001
+From f3023ad17cc9aab41336d0c3c483033e2762ffdf Mon Sep 17 00:00:00 2001
From: d34d <clark@cyngn.com>
Date: Wed, 4 Jan 2017 10:29:34 -0800
-Subject: [PATCH 02/12] Introduce sepolicy exceptions for theme assets
+Subject: [PATCH 02/13] Introduce sepolicy exceptions for theme assets
Assets such as composed icons and ringtones need to be accessed
by apps. This patch adds the policy needed to facilitate this.
+allow zygote theme_data_file:file r_file_perms;
+allow zygote theme_data_file:dir r_dir_perms;
--
-2.11.1
+2.9.4
-From 1d859c985c4bea5656dd525b35885a1cd9cd15aa Mon Sep 17 00:00:00 2001
+From da9c8f029beadf84bbdc9be179409ea2ca9ddec4 Mon Sep 17 00:00:00 2001
From: bigrushdog <randall.rushing@gmail.com>
Date: Wed, 4 Jan 2017 10:31:29 -0800
-Subject: [PATCH 03/12] sepolicy: fix themed boot animation
+Subject: [PATCH 03/13] sepolicy: fix themed boot animation
W BootAnimation: type=1400 audit(0.0:42): avc: denied { open } for uid=1003 path="/data/system/theme/bootanimation.zip" dev="mmcblk0p42" ino=1657697 scontext=u:r:bootanim:s0 tcontext=u:object_r:system_data_file:s0 tclass=file permissive=0
allow bootanim theme_data_file:file r_file_perms;
+allow bootanim system_data_file:file open;
--
-2.11.1
+2.9.4
-From 43b569d877370cf0ea109cfdd57976c22a4eba91 Mon Sep 17 00:00:00 2001
+From 39d41be24e718c928a9ca7e21b103913f78ea6ac Mon Sep 17 00:00:00 2001
From: George G <kreach3r@users.noreply.github.com>
Date: Wed, 8 Feb 2017 17:22:44 +0200
-Subject: [PATCH 04/12] sepolicy: fix themed sounds
+Subject: [PATCH 04/13] sepolicy: fix themed sounds
02-08 17:26:48.011 18259-18259/? W/SoundPoolThread: type=1400 audit(0.0:31): avc: denied { read } for path="/data/system/theme/audio/ui/Lock.ogg" dev="dm-0" ino=1006317 scontext=u:r:drmserver:s0 tcontext=u:object_r:theme_data_file:s0 tclass=file permissive=0
+allow drmserver theme_data_file:dir r_dir_perms;
+allow drmserver theme_data_file:file r_file_perms;
--
-2.11.1
+2.9.4
-From d7c74a0c8d441ebd4db743a56bd22e01609d3c1c Mon Sep 17 00:00:00 2001
+From db29bf3d87f10c7c857ce15f1d33793b21aee8b7 Mon Sep 17 00:00:00 2001
From: Surge1223 <surge1223@gmail.com>
Date: Sat, 18 Feb 2017 08:46:15 -0600
-Subject: [PATCH 05/12] initial policy edits for masquerade to operate rootless
+Subject: [PATCH 05/13] initial policy edits for masquerade to operate rootless
Change-Id: Iddfc408f206033772b9d49d335ca94e63b5e5210
---
# Write to various other parts of /data.
diff --git a/domain.te b/domain.te
-index a74833c..b18bfa7 100644
+index 59de1f1..f7ce715 100644
--- a/domain.te
+++ b/domain.te
-@@ -381,6 +381,7 @@ neverallow {
+@@ -385,6 +385,7 @@ neverallow {
-init # TODO: limit init to relabelfrom for files
-zygote
-installd
-postinstall_dexopt
-cppreopts
-dex2oat
-@@ -487,6 +488,7 @@ neverallow {
+@@ -491,6 +492,7 @@ neverallow {
-system_server
-system_app
-init
### neverallow rules
###
--
-2.11.1
+2.9.4
-From 7fb0e2bca061721e879e4dd05c0985fc003407d6 Mon Sep 17 00:00:00 2001
+From 20435b01f61fa357c6f2e52fe49a72ac351386bd Mon Sep 17 00:00:00 2001
From: Surge1223 <surge1223@gmail.com>
Date: Tue, 21 Feb 2017 12:28:05 -0600
-Subject: [PATCH 06/12] sepolicy: rename masquerade domain and allow JobService
+Subject: [PATCH 06/13] sepolicy: rename masquerade domain and allow JobService
in system_server
This attempts to address the issue of JobService being unable to process
# Write to various other parts of /data.
diff --git a/domain.te b/domain.te
-index b18bfa7..5bc5fcb 100644
+index f7ce715..b473da7 100644
--- a/domain.te
+++ b/domain.te
-@@ -381,7 +381,7 @@ neverallow {
+@@ -385,7 +385,7 @@ neverallow {
-init # TODO: limit init to relabelfrom for files
-zygote
-installd
-postinstall_dexopt
-cppreopts
-dex2oat
-@@ -488,7 +488,7 @@ neverallow {
+@@ -492,7 +492,7 @@ neverallow {
-system_server
-system_app
-init
allow system_server mediaextractor_service:service_manager find;
allow system_server mediacodec_service:service_manager find;
--
-2.11.1
+2.9.4
-From 35e7f6b212da283b29132f2734da6360c3a36c13 Mon Sep 17 00:00:00 2001
+From d47eac54afab000b8b273d6a7e7dbbcf4764ab5d Mon Sep 17 00:00:00 2001
From: Surge1223 <surge1223@gmail.com>
Date: Wed, 22 Feb 2017 20:45:04 -0600
-Subject: [PATCH 07/12] sepolicy: allow masquerade to read and write theme
+Subject: [PATCH 07/13] sepolicy: allow masquerade to read and write theme
assets
Fix for masquerade to handle theme assets including fonts and bootanimation, also
+allow masquerade connectivity_service:service_manager find;
+allow masquerade display_service:service_manager find;
--
-2.11.1
+2.9.4
-From ff7ba5a6d5524f632134c6bcf43173043479e27e Mon Sep 17 00:00:00 2001
+From e13c58ca101a08f70f0e6c7a8be890b5814b569f Mon Sep 17 00:00:00 2001
From: Miccia <bono.michele94@gmail.com>
Date: Mon, 27 Feb 2017 12:36:21 +0100
-Subject: [PATCH 08/12] sepolicy: Fix application of bootanimation
+Subject: [PATCH 08/13] sepolicy: Fix application of bootanimation
Change-Id: I7365d28fecf18b4d1aa42b2210e023b202dd97a5
---
+
+allow system_server theme_data_file:dir search;
--
-2.11.1
+2.9.4
-From 931433e0e94054c4898276213fa18e0ca93d29e2 Mon Sep 17 00:00:00 2001
+From c7fcf28a1ef47e74cf91153e8503c19b6175714e Mon Sep 17 00:00:00 2001
From: LuK1337 <priv.luk@gmail.com>
Date: Wed, 1 Mar 2017 23:11:49 +0100
-Subject: [PATCH 09/12] sepolicy: Redo masquerade rules
+Subject: [PATCH 09/13] sepolicy: Redo masquerade rules
* Use macros
* Label custom properties
-
-allow system_server theme_data_file:dir search;
--
-2.11.1
+2.9.4
-From 4ef2c96d7fa1f63ebbec4b9ac3ac7fe7b6cd36a0 Mon Sep 17 00:00:00 2001
+From 1c0171ad09ae123a87e31c1d1354de4f40d02427 Mon Sep 17 00:00:00 2001
From: Nathan Chancellor <natechancellor@gmail.com>
Date: Sat, 4 Mar 2017 19:20:10 -0700
-Subject: [PATCH 10/12] Welcome to Theme Interfacer! [2/2]
+Subject: [PATCH 10/13] Welcome to Theme Interfacer! [2/2]
Change-Id: I4a28c8840957d385338529540e081eabd3135cc1
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
# Write to various other parts of /data.
diff --git a/domain.te b/domain.te
-index 5bc5fcb..634f3bf 100644
+index b473da7..fbd6c26 100644
--- a/domain.te
+++ b/domain.te
-@@ -381,7 +381,7 @@ neverallow {
+@@ -385,7 +385,7 @@ neverallow {
-init # TODO: limit init to relabelfrom for files
-zygote
-installd
-postinstall_dexopt
-cppreopts
-dex2oat
-@@ -488,7 +488,7 @@ neverallow {
+@@ -492,7 +492,7 @@ neverallow {
-system_server
-system_app
-init
allow system_server mediaextractor_service:service_manager find;
allow system_server mediacodec_service:service_manager find;
--
-2.11.1
+2.9.4
-From 44f026c91d25d3e72d9654efc0c238cb451d6451 Mon Sep 17 00:00:00 2001
+From 3e15fbb8057baaeeba5a557edb57626e6d1fa53c Mon Sep 17 00:00:00 2001
From: Surge Raval <Surge1223@gmail.com>
Date: Sun, 16 Apr 2017 05:00:13 +0000
-Subject: [PATCH 11/12] sepolicy: add file and domain trans to interfacer
+Subject: [PATCH 11/13] sepolicy: add file and domain trans to interfacer
This will fix bootanimations not applying on 7.1.2 ROMs
neverallow untrusted_app anr_data_file:dir ~search;
+allow untrusted_app system_app_data_file:dir getattr;
--
-2.11.1
+2.9.4
-From b3bdd5ba0f03e0e85c064defb3842d57ca1990ab Mon Sep 17 00:00:00 2001
+From 9ff626d3b6fefa7a54a6faddf93d2fa29052cdfa Mon Sep 17 00:00:00 2001
From: Harsh Shandilya <msfjarvis@gmail.com>
Date: Tue, 9 May 2017 09:18:10 +0530
-Subject: [PATCH 12/12] sepolicy: Allow system_server to set theme_prop
+Subject: [PATCH 12/13] sepolicy: Allow system_server to set theme_prop
[ 6065.716763] init: avc: denied { set } for property=sys.refresh_theme
pid=1131 uid=1000 gid=1000 scontext=u:r:system_server:s0
# Create a socket for receiving info from wpa.
type_transition system_server wifi_data_file:sock_file system_wpa_socket;
--
-2.11.1
+2.9.4
--- /dev/null
+From fea6eb7c59965d99f0c0fe019772cdf1f950972d Mon Sep 17 00:00:00 2001
+From: Surge Raval <Surge1223@gmail.com>
+Date: Tue, 30 May 2017 00:59:31 +0200
+Subject: [PATCH 13/13] Add policy to fix interfacer derp on boot
+
+05-29 08:40:17.200 10546 10600 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 10600 (POSIX timer 0)
+05-29 08:40:17.200 428 428 W : debuggerd: handling request: pid=10546 uid=1006 gid=1006 tid=10600
+05-29 08:40:17.223 20058 20058 E : debuggerd: Unable to connect to activity manager (connect failed: Connection refused)
+05-29 08:40:17.225 580 580 E SELinux : SELinux: Could not set context for /data/data/projekt.interfacer: Permission denied
+05-29 08:40:17.226 580 580 E installd: Failed top-level restorecon for /data/data/projekt.interfacer: Permission denied
+05-29 08:40:17.219 580 580 W installd: type=1400 audit(0.0:135): avc: denied { relabelto } for name="projekt.interfacer" dev="sda15" ino=61332 scontext=u:r:installd:s0 tcontext=u:object_r:theme_data_file:s0 tclass=dir permissive=0
+05-29 08:40:17.226 19831 19831 E PackageManager: Failed to create app data for projekt.interfacer, but trying to recover: com.android.internal.os.InstallerConnection$InstallerException: Failed to execute create_app_data [null, projekt.interfacer, 0, 3, 1000, platform:privapp, 25]: -1
+05-29 08:40:17.228 580 580 E : Couldn't opendir /data/user_de/0/projekt.interfacer: No such file or directory
+05-29 08:40:17.229 19831 19831 W PackageManager: com.android.internal.os.InstallerConnection$InstallerException: Failed to execute destroy_app_data [null, projekt.interfacer, 0, 3, 61332]: -2
+05-29 08:40:17.229 580 580 E SELinux : SELinux: Could not set context for /data/data/projekt.interfacer: Permission denied
+05-29 08:40:17.229 580 580 E installd: Failed top-level restorecon for /data/data/projekt.interfacer: Permission denied
+05-29 08:40:17.219 580 580 W installd: type=1400 audit(0.0:136): avc: denied { relabelto } for name="projekt.interfacer" dev="sda15" ino=61488 scontext=u:r:installd:s0 tcontext=u:object_r:theme_data_file:s0 tclass=dir permissive=0
+05-29 08:40:17.230 19831 19831 D PackageManager: Recovery failed!
+05-29 08:40:17.231 580 580 E SELinux : SELinux: Could not set context for /data/data/projekt.interfacer: Permission denied
+05-29 08:40:17.231 580 580 E installd: Failed top-level restorecon for /data/data/projekt.interfacer: Permission denied
+05-29 08:40:17.232 19831 19831 E PackageManager: Failed to create app data for projekt.interfacer, but trying to recover: com.android.internal.os.InstallerConnection$InstallerException: Failed to execute create_app_data [null, projekt.interfacer, 0, 3, 1000, platform:privapp, 25]: -1
+05-29 08:40:17.219 580 580 W installd: type=1400 audit(0.0:137): avc: denied { relabelto } for name="projekt.interfacer" dev="sda15" ino=61488 scontext=u:r:installd:s0 tcontext=u:object_r:theme_data_file:s0 tclass=dir permissive=0
+05-29 08:40:17.233 580 580 E : Couldn't opendir /data/user_de/0/projekt.interfacer: No such file or directory
+05-29 08:40:17.233 19831 19831 W PackageManager: com.android.internal.os.InstallerConnection$InstallerException: Failed to execute destroy_app_data [null, projekt.interfacer, 0, 3, 61488]: -2
+05-29 08:40:17.234 580 580 E SELinux : SELinux: Could not set context for /data/data/projekt.interfacer: Permission denied
+05-29 08:40:17.234 580 580 E installd: Failed top-level restorecon for /data/data/projekt.interfacer: Permission denied
+05-29 08:40:17.234 19831 19831 D PackageManager: Recovery failed!
+05-29 08:40:17.229 580 580 W installd: type=1400 audit(0.0:138): avc: denied { relabelto } for name="projekt.interfacer" dev="sda15" ino=61491 scontext=u:r:installd:s0 tcontext=u:object_r:theme_data_file:s0 tclass=dir permissive=0
+05-29 08:40:17.274 20058 20058 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
+
+Change-Id: I39def485bbeea25e2b32baa30e575779afd50ce4
+---
+ installd.te | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/installd.te b/installd.te
+index ab0aadc..6800695 100644
+--- a/installd.te
++++ b/installd.te
+@@ -126,3 +126,7 @@ allow installd devpts:chr_file rw_file_perms;
+
+ # execute toybox for app relocation
+ allow installd toolbox_exec:file rx_file_perms;
++
++# allow /data/data/ theme attributes for theme_data explicitly without macros
++allow installd theme_data_file:dir { add_name getattr read relabelto remove_name setattr write open search };
++allow installd theme_data_file:lnk_file { create getattr unlink };
+--
+2.9.4
+