Commit graph

54 commits

Author SHA1 Message Date
Tri Vo
4f408746cf ueventd.rc: Move device-specific entries to /vendor/ueventd.rc.
Bug: 110962171
Test: boot sailfish, taimen, blueline
Change-Id: If740c2bd85409c9a057cff68f8bfd870cad35b37
2019-01-06 16:15:07 -08:00
Tri Vo
16cdffe8cb Reland "Remove obsolete ueventd.rc rules."
/dev/* nodes referenced in the removed rules are not present on Pixel
devices, i.e. android platform doesn't depend on these nodes. If a
device relies on one of these rules, the rule should be added to the
device-specific ueventd.rc.

v1->v2:
Added back usb-specific rules
/dev/bus/usb/*            0660   root       usb
/dev/mtp_usb              0660   root       mtp

Bug: 110962171
Test: boot walleye
Test: init_tests
Test: wired headset plays audio
Test: USB PTP works between 2 devices
Change-Id: Ic2d77806a01c8918b2485fb5f0bd9b670b01d1df
2018-12-14 14:57:54 -08:00
Treehugger Robot
36b5dd845c Merge "Revert "Remove obsolete ueventd.rc rules."" 2018-12-11 17:47:11 +00:00
Andy Hung
3fddf92465 Revert "Remove obsolete ueventd.rc rules."
This reverts commit d3b0b2708b.

Reason for revert: Regression in USB audio handling

Test: USB audio playback on Crosshatch
Bug: 120795549
Change-Id: Ibd05cd9b419f3e7988ce24a45f800d4bfe91ef6a
2018-12-11 04:14:30 +00:00
Tri Vo
dc978cc15b Merge "Remove obsolete ueventd.rc rules." 2018-12-07 17:53:00 +00:00
Tri Vo
d3b0b2708b Remove obsolete ueventd.rc rules.
/dev/* nodes referenced in the removed rules are not present on Pixel
devices, i.e. android platform doesn't depend on these nodes. If a
device relies on one of these rules, the rule should be added to the
device-specific ueventd.rc.

Bug: 110962171
Test: boot walleye
Test: init_tests
Change-Id: I3262475d4ff22386e8da0436efaf98b208e4fa1c
2018-12-06 16:07:20 -08:00
Tom Cherry
e29101077c ueventd: allow configuring SO_RCVBUF(FORCE) for the ueventd socket
Some configurations won't allow ueventd to have CAP_NET_ADMIN, so the
new default size of 16M is not possible for those.  Those
configurations also won't need such a large buffer size, so this
change allows devices to customize the SO_RCVBUF(FORCE) size for the
uevent socket.

This is done by adding the line 'uevent_socket_rcvbuf_size <size>' to
your device's ueventd.rc file.  <size> is specified as a byte count,
for example '16M' is 16MiB.

The last parsed uevent_socket_rcvbuf_size line is the one that is
used.

Bug: 120485624
Test: boot sailfish
Test: ueventd unit tests
Change-Id: If8123b92ca8a9b089ad50318caada2f21bc94707
2018-12-06 13:35:52 -08:00
Siarhei Vishniakou
e615b2aa76 Permissions for /dev/uinput
Currently /dev/uinput is owned by system/bluetooth.
But that's inconsistent with some of the sepolicies for uhid_device.
This also means that the new native tests for inputflinger aren't able
to execute properly, because they require the ability to register a new
input device via uinput.

Bug: none
Test: atest inputflinger_test
The newly added EventHub_test is still under review

Change-Id: I53524738db1a5d3ba962b9bec35ef322ed3028f2
2018-11-27 11:21:21 -08:00
Tom Cherry
7421fa1aed ueventd: let scripts provide firmware directories
Since some vendors will have firmware in mount points in
/mnt/vendor/..., we extend the ueventd script language to allow
specifying the firmware directories.

Also, move the existing 4 directories to ueventd.rc as a primary user
of this mechanism.

Bug: 111337229
Test: boot sailfish; firmwares load
Change-Id: I0854b0b786ad761e40d2332312c637610432fce2
2018-07-13 15:34:25 -07:00
Siarhei Vishniakou
38d4352fce Allow input system access to /dev/v4l-touch
Bug: 62940136
Test: read /dev/v4l-touchX from inputflinger

Change-Id: I394686e4167855f50ddd6ff9aebcf3c94f6550b0
2017-12-22 17:06:24 -08:00
Siarhei Vishniakou
b995b58631 Merge "Adding 'uhid' permission for access to /dev/uhid." am: cecbc9993d am: 04daed4793
am: d819380f50

Change-Id: If06b07c88276c32cdf5b53e6afcf0563e6538544
2017-05-12 01:00:46 +00:00
Siarhei Vishniakou
0729dd1edb Adding 'uhid' permission for access to /dev/uhid.
This CL is in support of another CL c/2048848, topic
'Refactor hid command in /frameworks/base/cmds' in
internal master. Adding the permissions for
shell here to access uhid_node as part of the
new 'uhid' group.

Bug: 34052337
Test: Tested on angler, bluetooth mouse works OK.

Change-Id: If9e100aa1262d689fb8adc5c0ce93f157c96399e
2017-05-11 01:28:53 +00:00
Tom Cherry
aa85663027 Merge changes Ie5ec609a,I5a2ac369,I690137b5 am: 659b78ed10 am: 01b87aac9c
am: 8d9eee4f2b

Change-Id: I5cd7d00f71bfd3970189481f381629cedc358c9b
2017-04-13 21:45:58 +00:00
Tom Cherry
780a71e779 ueventd: move subsystem logic from code to ueventd.rc
Test: Boot bullhead
Test: Boot sailfish, observe no boot time regression
Test: init unit tests

Change-Id: I690137b584fcc2b9cd2dd932a2678f75a56d6737
2017-04-12 16:36:20 -07:00
Tom Cherry
6289bb1341 Merge "ueventd: remove /dev/log" am: 120add07ab am: 9ae606d659
am: 6c2e8b10fe

Change-Id: Ic257774710a74e72a97f4187e48587150ee3d613
2017-04-12 08:17:29 +00:00
Tom Cherry
d4ff8d83d3 ueventd: remove /dev/log
This was marked deprecated in 2014 and removed in 2015, let's remove
the uevent rule now too.

Test: see that logging still works on bullhead
Change-Id: Idaf3f49a1afe7046eba6c976628b9f1c8b3ec094
2017-04-11 21:35:46 +00:00
Martijn Coenen
62c5b47b9f Add /dev/vndbinder to ueventd.rc
Bug: 36052864
Test: vndservicemanager can access /dev/vndbinder
Change-Id: I208ae91e722185f015fe8f0047c54087be6d21a2
2017-04-03 17:04:02 -07:00
Michael Wright
14667c19cd Revert "Only allow system to write to existing input nodes."
This reverts commit 344e929e6d.

Bug: 35301292
Change-Id: Ib6805c986c0aa88d14652de59ad4602b1cce8b56
2017-02-21 17:12:59 +00:00
Michael Wright
344e929e6d Only allow system to write to existing input nodes.
This prevents the shell user from injecting input as if it were coming
from an existing input device, which in turn makes it easier for malware
/ abuse analysis to detect when someone is injecting input via the
command line vs a real user using a device.

(cherrypick of 95637eb2a332b9a09914b1bf32c10fccfba4a175.)

Bug: 30861057
Test: ran getevent, saw correct output, played with device
Change-Id: Ib53eea1b7767f25510b5d36fe6109101a9fad8e0
2017-02-09 14:45:25 -08:00
Josh Gao
183b73e665 adb: remove support for legacy f_adb interface.
Everything should be using the functionfs interface instead by now.

Bug: http://b/34228376
Test: grepping for f_adb, android_adb in source tree
Test: m
Change-Id: I6bc41049c49a867499832588dac8ed108c636c11
2017-01-11 15:00:03 -08:00
Martijn Coenen
f5110ea029 Add hwbinder dev node permissions.
b/31458381
Test: pass

Change-Id: I8ec92a29287b17636c363c55a8565dacab19043d
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-26 00:23:51 -07:00
Ajay Panicker
604208e957 Remove net_bt_stack group and replace it with bluetooth
Bug: 31549206
Change-Id: I667963e5f9fd1a5dc9ad74378b318e3b782e6883
2016-09-20 12:01:33 -07:00
Kevin Cernekee
fa432b0e2f Merge "ueventd.rc: Document the different rule formats for /dev and /sys nodes" 2016-01-26 23:44:56 +00:00
Kevin Cernekee
1f0dd2210b ueventd.rc: Document the different rule formats for /dev and /sys nodes
This was causing some confusion during shark bringup and we weren't able
to find docs online, so let's add some hints at the top of the file in
case it comes up again.

Change-Id: Ica2cd8a0fb28efb99077fdc98673dbbdd6f58ff6
Signed-off-by: Kevin Cernekee <cernekee@google.com>
2015-05-12 09:56:34 -07:00
Terry Heo
bf81356e22 rootdir: add permission for /dev/dvb*
Bug: 20112245
Change-Id: I513c6ed5b65d5bd4edef6cb12d7fc20eb9cad4f1
2015-05-07 16:49:00 +09:00
Mark Salyzyn
8c7380b476 am 3802b5d4: Merge "rootdir: add pstore"
* commit '3802b5d4c5cb14864dcdd8820e9140b81a2d7d78':
  rootdir: add pstore
2015-01-14 17:46:46 +00:00
Mark Salyzyn
4b0313e4d3 rootdir: add pstore
/dev/pmsg0 used to record the Android log messages, then
on reboot /sys/fs/pstore/pmsg-ramoops-0 provides a means
to pull and triage user-space activities leading
up to a panic. A companion to the pstore console logs.

Change-Id: Id92cacb8a30339ae10b8bf9e5d46bb0bd4a284c4
2015-01-14 17:15:39 +00:00
Arve Hjønnevåg
7770252a84 rootdir: Make trusty version readable by dumpstate
Change-Id: I761650d286b454f1fe01a585e7cd6ec769bfc527
2014-10-16 16:11:37 -07:00
Ruchi Kandoi
75b287b771 ueventd: Ueventd changes the permission of sysfs files for max/min
cpufreq

The owner and permissions for the sysfs file
/sys/devices/system/cpu*/cpufreq/scaling_max/min_freq is changed.
This would allow the PowerHAL to change the max/min cpufreq even after
the associated CPU's are hotplugged out and back in.

Change-Id: Ibe0b4aaf3db555ed48e89a7fcd0c5fd3a18cf233
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2014-05-01 17:30:41 +00:00
Greg Hackmann
b34fed34af rootdir: reduce permissions on /dev/rtc0
Remove world-readable, reduce group permissions to readable by system
daemons

Change-Id: I6c7d7d78b8d8281960659bb8490a01cf7fde28b4
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2014-03-27 15:52:01 -07:00
Greg Hackmann
a585e662e0 rootdir: add permissions for /dev/rtc0
Change-Id: If9d853bdae2399b1e7434f45df375ba1fd6dbe9c
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-12-17 14:45:39 -08:00
Greg Hackmann
95b348c5d7 rootdir: add ueventd.rc rule for adf subsystem
Change-Id: I727d91355229692c11e0e309c0fcac051269eba3
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-11-26 13:18:26 -08:00
Alex Klyubin
b2478a713a Expose /dev/hw_random to group "system".
This is needed to let EntropyMixer (runs inside system_server) read
from /dev/hw_random.

Change-Id: Ifde851004301ffd41b2189151a64a0c5989c630f
2013-10-03 13:32:36 -07:00
Zhihai Xu
9f239afc35 second user doesnot pickup input operations from A2DP
bug 7335014

Change-Id: I39e450d254647f0b84a07f38f2f2571711fca075
2012-10-16 17:32:51 -07:00
Matthew Xie
bdec5ead74 Change dev/uhid group id from bluetooth to net_bt_stack
Secondary user need that group id to access the file to support hid
bug 7315419

Change-Id: I9d2d3d5a5114d289dc4d83c697421622db4beae6
2012-10-10 15:18:28 -07:00
Scott Anderson
edb2d634b3 Merge "ueventd.rc: Add /dev/uhid for bluedroid" into jb-mr1-dev 2012-08-16 12:22:51 -07:00
Scott Anderson
3ad289dca6 ueventd.rc: Add /dev/uhid for bluedroid
Change-Id: Ica71265856fce1abc0a0ba9c0b1ca016510c61b7
Signed-off-by: Scott Anderson <saa@android.com>
2012-08-15 15:02:00 -07:00
Lukasz Anaczkowski
e6f8d45da8 Char device /dev/dri/card0 was not created during startup.
This device is required by libdrm for GPUs like IvyBridge.

Change-Id: I0ac47056a9cec2100f3e6eaa5591571fe6bbc145
Signed-off-by: Lukasz Anaczkowski <lukasz.anaczkowski@intel.com>
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2012-07-23 16:08:17 -07:00
Nick Kralevich
3439cc6145 change files in /dev/log/ to 666
With newer Android kernels, anyone can read from the files in
/dev/log. If you're in the logs group (have the READ_LOGS) permission,
you'll see all entries. If you're not in that group, you'll see
log messages associated with your UID.

Relax the permissions on the files in /dev/log/ to allow an application
to read it's own log messages.

Bug: 5748848
Change-Id: Ie740284e96a69567dc73d738117316f938491777
2012-03-29 09:32:33 -07:00
Chia-chi Yeh
69f43c90cb Update the device permission of /dev/tun.
Change-Id: Ie8ad60047fc7160997100bd28a0abb439406806a
2011-05-12 13:43:34 -07:00
Mike Lockwood
ddc4cfd8b2 ueventd.rc: Give system process permission to enable and disable USB functions
Change-Id: I4af1f3fed857df2be96a640f65cd612577c957c7
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-08 17:41:19 -05:00
Mike Lockwood
45e96d0e49 Set USB group for /dev/usb_accessory
Change-Id: I17db8d9bb1bf6336979e9b7bce62306d0d7a79d2
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-08 17:40:50 -05:00
Mike Lockwood
48b911c573 am af7bdc64: Add separate permission and group for access to MTP USB driver
* commit 'af7bdc646088e3112052f4fd35061bb720393287':
  Add separate permission and group for access to MTP USB driver
2011-01-10 09:27:56 -08:00
Mike Lockwood
af7bdc6460 Add separate permission and group for access to MTP USB driver
Since the "usb" group and ACCESS_USB permission will be used by regular apps
to access USB devices in host mode, we need a separate permission for the
device side MTP driver.

Change-Id: Ibb546b8726d61e041fc7c273f71929624ad1575b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-10 08:22:30 -05:00
David 'Digit' Turner
1f2565ca08 rootdir: Fix system emulation startup.
This fixes the goldfish-specific config scripts used by init and ueventd
to properly setup the system under emulation. This fixes a lot of broken-ess
introduced by recent permission changes in the system.

Note that there are still several problems after this patch is applied, but
at least it becomes possible to get an adb connection to the emulated system,

Change-Id: I1e8f5828b4d5cbb3a4338878df875dc718276b38
2011-01-06 14:04:12 +01:00
Brian Swetland
7ffa661595 am 60afdedc: am 146481b9: add rules to set perms for input device sysfs attributes 2010-10-26 15:44:20 -07:00
Brian Swetland
146481b946 add rules to set perms for input device sysfs attributes
Change-Id: I28ab7f1ac5cc07ade7830e87f5e70c96464bb686
2010-10-26 15:38:00 -07:00
Iliyan Malchev
e306a9044a Revert "system/core: add system/audio persmissions for /dev/audio*"
This reverts commit 7e8b01229d.
2010-07-30 19:58:31 -07:00
Iliyan Malchev
7e8b01229d system/core: add system/audio persmissions for /dev/audio*
Change-Id: If214241f8150f5ff6cce8b9a76c6c8e5bad9c35a
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-07-29 17:11:51 -07:00
Mike Lockwood
69286093d0 ueventd.rc: Give the USB group read/write access to the MTP USB driver.
Change-Id: I305671848dbdf427333dc088f83f88cea1b33945
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-29 14:52:20 -04:00