From 1c597f0cda67f0b37de4b64666567526e67f40ba Mon Sep 17 00:00:00 2001
From: Jeff Sharkey <jsharkey@android.com>
Date: Mon, 30 Mar 2015 17:47:22 -0700
Subject: [PATCH] Shell needs to read /storage/self/primary symlink.

avc: denied { read } for name="primary" dev="tmpfs" ino=3134 scontext=u:r:shell:s0 tcontext=u:object_r:storage_file:s0 tclass=lnk_file

Change-Id: Id0ed2297a89054199fc73f27b18f717ae19c6778
---
 shell.te | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/shell.te b/shell.te
index cfadf77c9..e7d03e8a4 100644
--- a/shell.te
+++ b/shell.te
@@ -74,3 +74,6 @@ allow shell domain:process getattr;
 # and read other files created by init process under /data/bootchart
 allow shell bootchart_data_file:dir rw_dir_perms;
 allow shell bootchart_data_file:file create_file_perms;
+
+# Follow the /storage/self/primary symlink
+allow appdomain storage_file:lnk_file r_file_perms;
-- 
GitLab