Skip to content
Snippets Groups Projects
Commit 5259c5e6 authored by Nick Kralevich's avatar Nick Kralevich
Browse files

dex2oat: fix forward locked apps

dex2oat can't access file descriptors associated with asec_apk_files.
This breaks installing forward locked apps, and generates the following
denial:

  type=1400 audit(0.0:18): avc: denied { read } for path="/mnt/asec/com.example.android.simplejni-1/pkg.apk" dev="dm-0" ino=12 scontext=u:r:dex2oat:s0 tcontext=u:object_r:asec_apk_file:s0 tclass=file

Steps to reproduce:

  $ adb install -r -l SimpleJNI.apk

Expected:

  app installs

Actual:

  app fails to install.

Change-Id: I5a468508014e9963460d13d78e1c4867187322b3
Bug: 16328233
parent db416305
No related branches found
No related tags found
No related merge requests found
......@@ -4,3 +4,6 @@ type dex2oat_exec, exec_type, file_type;
allow dex2oat dalvikcache_data_file:file write;
allow dex2oat installd:fd use;
# Read already open asec_apk_file file descriptors passed by installd.
allow dex2oat asec_apk_file:file read;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment