Skip to content
Snippets Groups Projects
Commit ce5ca4d0 authored by Tao Bao's avatar Tao Bao
Browse files

recovery.te: Allow setting sys.usb.ffs.ready.

This is needed for devices using configfs, where init listens for
sys.usb.ffs.ready=1 to config usb_gadget. When recovery starts
sideloading, minadbd (forked from recovery) sets the property to trigger
that action.

avc:  denied  { set } for property=sys.usb.ffs.ready pid=541 uid=0 gid=0
scontext=u:r:recovery:s0 tcontext=u:object_r:ffs_prop:s0
tclass=property_service

Bug: 35803743
Test: Device shows up in sideload mode.
Change-Id: Ie7f1224d3a8650160ac29811f73b8286fbced4f4
parent c895f278
No related branches found
No related tags found
No related merge requests found
...@@ -105,6 +105,9 @@ recovery_only(` ...@@ -105,6 +105,9 @@ recovery_only(`
# Read serial number of the device from system properties # Read serial number of the device from system properties
get_prop(recovery, serialno_prop) get_prop(recovery, serialno_prop)
# Set sys.usb.ffs.ready when starting minadbd for sideload.
set_prop(recovery, ffs_prop)
# Use setfscreatecon() to label files for OTA updates. # Use setfscreatecon() to label files for OTA updates.
allow recovery self:process setfscreate; allow recovery self:process setfscreate;
......
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