Commit graph

118 commits

Author SHA1 Message Date
TeYuan Wang
5c95b36ea8 thermal: provide chg_mdis permission for thermalHAL
Bug: 226130317
Test: ls -al dev/thermal/cdev-by-name/chg_mdis/cur_state
Change-Id: Id0681d66f33f94baed52f67aea63270a6875ac14
2022-04-06 01:55:13 +00:00
George Lee
ea926b06e2 thermal: Reconfigure DFS Clock to divide by 4
1. Reconfigure DFS clock divider to divide by 4.
2. OCP_WARN_CPU2 was repurposed for DFS usage.  Since SOFT_OCP_WARN_CPU2
was not used by BCL, it will be repurposed to replace OCP_WARN_CPU2.

Bug: 223909471
Test: Local test to verify register value
Signed-off-by: George Lee <geolee@google.com>
Change-Id: Ie9960c30b102d67f0ade156631386b656ff82790
2022-04-01 18:34:58 +00:00
TeYuan Wang
6f00cd7be1 bcl: modify batoilo trip_point_0 permission for thermalHAL
Bug: 222017625
Test: adb shell ls -al dev/thermal/tz-by-name/batoilo/trip_point_0*
Change-Id: Ie8d122a8b70bd4f975e586733f5f2a74c46cdaa9
2022-03-30 06:12:12 +00:00
Ray Chi
7be02c0708 usb: remove set_usb_irq script for irq change
Since the dwc3 irq is moved by USB gadget hal now, the
script is not needed.

Bug: 225789036
Test: build pass
Change-Id: I42299d30df5343f06be810870c61c5cff3e41df2
2022-03-30 04:42:16 +00:00
chungkai
1a05b6dc70 init: add uclamp threshold setting
To filter tiny task, add uclamp threshold setting

Test: build and boot pass
Bug: 214098855
Signed-off-by: chungkai <chungkai@google.com>
Change-Id: Ib8f20a8d0134eff972084cd72a2975d7f778d539
2022-03-30 03:49:30 +00:00
Rick Yiu
3c9226acc7 Change file permission for perfer_idle
Sync permission to other nodes.

Bug: 224637637
Test: build pass
Change-Id: I5e9d4dab6bdb94ad2ca8dd4bb6e52bff72f8b6ee
2022-03-29 10:25:06 +00:00
Nishok Kumar S
f980e770bd ueventd: Modify gxp device permission to allow GCA app to access GXP
device.

This is required to allow GCA app to access GXP
device. This is separate from selinux policies, which have already
been added to regulate access to GXP device.

Test: Run GCAEng
Bug: 223088240
Change-Id: I78b97e61c569c47771b528d8c8a4cd0e7d8a54b0
2022-03-28 08:59:19 +00:00
Ken Tsou
ee38fc1122 battery: Enable Battery Defender
Sync with ag/14540731 to fix the wrong path.
BatteryDefender: Failed to write /sys/devices/platform/soc/soc:google,charger/charge_start_level
BatteryDefender: Failed to write /sys/devices/platform/soc/soc:google,charger/charge_stop_level

Bug: 222008498
Change-Id: I4782e2c387b147fc48cf4134d27af8675964dc44
Signed-off-by: Ken Tsou <kentsou@google.com>
2022-03-25 03:08:25 +00:00
Omer Osman
b1a1796c47 Enable /dev/hidraw along with the appropriate group permisssions
Test: Incoming HID data from Pixel Buds
Change-Id: I5934f1244f5dda8b169cdd85103b41446c81964a
2022-03-24 19:05:45 +00:00
chungkai
b586e0609f sched: move sysfs to procfs
Modify the path of vendor_sched nodes

Test: work normally
Bug: 216207007
Signed-off-by: chungkai <chungkai@google.com>
Change-Id: Ib239ec8bbff66a7f25205eff68c0213cc6b62d69
2022-03-24 17:44:37 +00:00
SalmaxChang
602c38c63f conf: support to mount modem erofs image
- Create fstab.modem for modem as flexibility.
- Add and support both erofs and ext4 images for compatibility.

Bug: 201348703
Change-Id: Idc6dd8ef8f044c764f2811469806ee9e6defb87f
2022-03-17 05:56:33 +00:00
Jaegeuk Kim
6d4913e3c7 Remove discard command tuning
This is done by rootdir/init.rc.

Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I939c97aa2cd2ee271f05053eea0af006f6c9b8a1
2022-03-17 03:22:07 +00:00
Jaegeuk Kim
975370904a Enable COMPRESS CACHE in f2fs
Bug: 222321709
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Ia10007c678ea640d00c2fe0438218707d5fd7ce8
2022-03-16 18:24:09 +00:00
Randall Huang
3bec1149e8 UFS: enable UFS clock gating when off mode charging
Avoid high UFS power consumption

Bug: 224888044
Test: check clkgate_enable in uart console
Signed-off-by: Randall Huang <huangrandall@google.com>
Change-Id: Ie5504a259621a8661133eebd8f574d5af2809abb
2022-03-16 16:50:46 +00:00
Ryan Chu
1f95aca935 factory: update owner and group for root
Update the exec root owner and group for factory_post_boot

Bug: 222226268
Test: pidx=`adb shell pidof adbd` && adb shell cat proc/$pidx/task/$pidx/sched | grep "adbd \|effective uclamp.min"
Change-Id: I7ad3fc9f2db8bd4d6f4c3d2fdf1de1abc0ddcb16
2022-03-16 06:56:14 +00:00
Denny cy Lee
f9c2f03287 Pixelstats: porting from p21
Bug: 222019890
Bug: 222657999
Test: check debug logcat in pixelstat, HardwareInfo
Change-Id: I110a2b2713b6c27e23418569bb8d1b726af07b95
2022-03-15 03:09:18 +00:00
Midas Chien
93fdc4704e display: make early wakeup node is readable
Bug: 221384860
Test: cat node
Change-Id: I69fe93f467c12e009e97d6f953ba404bec558834
2022-03-14 18:30:42 +00:00
George Lee
5d2540b63c bcl: Increase hardware clock divider count
By increasing hardware clock divider count, we do not need to throttle
as hard to mitigate for brownout.

Bug: 221070649
Test: Local stress test to ensure no brownout.
Signed-off-by: George Lee <geolee@google.com>
Change-Id: If130d477f617c0e62efa5f35effa122b60253107
2022-03-10 20:17:32 +00:00
Nishok Kumar S
37c514bbcf ueventd: Add gxp device with system group read write permission
Test: adb shell setprop persist.vendor.camera.blur_refine.enable_dsp 1
      adb shell pkill -f camera
Bug: 223088240
Change-Id: I87e714e03320ae30ab885c4713d1031ffa6b2ae1
2022-03-10 06:34:06 +00:00
Andrew Chant
2f2f7fd3de factory: add factory_post_boot.sh/boost adbd
Add factory_post_boot.sh for factory targets to boost
adbd on boot.

Bug: 222226268
Change-Id: If20455705e2632eda95297952cfd770a4e8ff6f7
2022-03-09 10:15:36 +00:00
Ray Chi
b30924e359 usb: move the permission change to usb rc
Since permission change in hal rc may be late, gadget
hal would enable USB function failed. The solution will
change the permission before USB gadget hal starts.

Bug: 206902205
Test: build pass and verified pass
Change-Id: I45c1318f647220480fa03ba3b813a81b21393d71
2022-03-07 07:45:50 +00:00
Kris Chen
997787e3f7 Set owner for mfg_data partiton.
Bug: 197780765
Test: UDFPS HAL can access mfg_data
Change-Id: Ib68fd0ff2f7717000b918c580e459309e088cde2
2022-03-07 01:44:16 +00:00
Midas Chien
a7b2be93d0 display: allow composer to access panel idle handle exit node
Bug: 202182467
Test: composer can access panel idle handle exit node
Change-Id: I1d117ba50871e633d044b4c8bb25da14df506b66
2022-03-04 06:55:04 +00:00
Ramji Jiyani
f53de92c92 Pixel T launch devices: Enable system_dlkm
Set flags to enable system_dlkm dynmaic partition
for GKI Modules for T launch pixel devices.

Partition will be empty as of now but this adds
enough support to pass the vts for feature.

Bug: 222334390
Test: TH, manual build, Code testing gs101 & R6
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: Ic56dd711ab97f3ae993cc5c543fabc8cbe3f347c
Merged-In: Ic56dd711ab97f3ae993cc5c543fabc8cbe3f347c
2022-03-04 01:42:47 +00:00
Ray Chi
ef1c863453 Revert "usb: modify the permission of USB gadget hal"
This reverts commit bdd4728a17.

Reason for revert: original issue is fixed.

Bug: 206902205
Test: adb work without the error of gadget hal.
Change-Id: I3b7ab36f93e8bb7d6c23d53d4a12ed95d441fede
2022-03-01 18:33:17 +08:00
Rick Yiu
34cad67219 Support SetProcessProfiles for vendor groups
Add ProcFilePath for vendor group change of a process.

Bug: 218684257
Test: function works
Change-Id: I2d87a1a5d27dee699b37de6fac8d8b52334ba54e
2022-03-01 04:32:22 +00:00
Devin Moore
2b15c10b02 Build init_boot for new devices
Builds a new init_boot.img with the ramdisk that was previously in
boot.img.
Removes the ramdisk from boot.img.
Change fstab to make sure the /dev/block/by-name/init_boot_* entries are
created in first stage init for Verified Boot.
Add init_boot.img to the list of OTA images so it is picked up for OTA
updates.

Test: unpack_bootimg --boot_img=boot.img
Test: unpack_bootimg --boot_img=init_boot.img
Test: Build and boot new device with required bootloader changes
Bug: 211823573

Merged-In: Idbd700b17d862f48ea568d1274a6550b965763ea
Change-Id: Idbd700b17d862f48ea568d1274a6550b965763ea
2022-02-24 23:32:46 +00:00
Ray Chi
48ebc5fe18 recovery: add wait for dwc3 device to probe
If fastbootd starts before the dwc3 device probes, fastbootd
would be failed to enable USB gadget.

This patch adds a dependency on the dwc3 device probing before setting
the sys.usb.controller property.

Bug: 220393297
Test: build pass, fastboot works
Change-Id: I4e5b34354f19547f55acc53ccff0b54adce2d982
2022-02-22 02:32:17 +00:00
Midas Chien
e542e25078 display: allow composer to access panel idle node
Change panel idle node ownership to allow composer to access.

Bug: 198808492
Test: init and composer can write to panel idle node
Change-Id: I9fd7fe752cfe0694216d608765c4647dd3c00b95
2022-02-17 09:17:42 +00:00
Ted Lin
805826c2cc fix the avc denied for maxfg/registers
01-13 11:02:39.148 10124 10045 10045 I id.hardwareinfo: type=1400 audit(0.0:28): avc: denied { search } for name="maxfg" dev="debugfs" ino=31872 scontext=u:r:hardware_info_app:s0:c512,c768 tcontext=u:object_r:vendor_maxfg_debugfs:s0 tclass=dir permissive=1 app=com.google.android.hardwareinfo
01-13 11:02:39.148 10124 10045 10045 I id.hardwareinfo: type=1400 audit(0.0:29): avc: denied { read } for name="registers" dev="debugfs" ino=31885 scontext=u:r:hardware_info_app:s0:c512,c768 tcontext=u:object_r:vendor_maxfg_debugfs:s0 tclass=file permissive=1 app=com.google.android.hardwareinfo
01-13 11:02:39.148 10124 10045 10045 I id.hardwareinfo: type=1400 audit(0.0:30): avc: denied { open } for path="/sys/kernel/debug/maxfg/registers" dev="debugfs" ino=31885 scontext=u:r:hardware_info_app:s0:c512,c768 tcontext=u:object_r:vendor_maxfg_debugfs:s0 tclass=file permissive=1 app=com.google.android.hardwareinfo
01-13 11:02:39.148 10124 10045 10045 I id.hardwareinfo: type=1400 audit(0.0:31): avc: denied { getattr } for path="/sys/kernel/debug/maxfg/registers" dev="debugfs" ino=31885 scontext=u:r:hardware_info_app:s0:c512,c768 tcontext=u:object_r:vendor_maxfg_debugfs:s0 tclass=file permissive=1 app=com.google.android.hardwareinfo

Bug: 208909060
Test: adb bugreport
Change-Id: I72a6b72e568fe109350edd2a0a91747251e6fba4
Signed-off-by: Ted Lin <tedlin@google.com>
2022-02-17 09:04:23 +00:00
TeYuan Wang
ae8e17631b thermal: provide gxp-cooling user_vote permission for thermalHAL
Bug: 219869479
Test: ls -al dev/thermal/cdev-by-name/gxp-cooling/user_vote
Change-Id: Id11ad3cb6b1770cbaffb760feaad571c678a22df
2022-02-16 19:34:39 +00:00
Sayanna Chandula
589318e5c4 thermal: enable cooling devices cur state permissions
Enable permissions for wcl_fcc and dc_icl cooling devices
current state for charging throttling.

Bug: 204523879
Test: build and boot on device. Check charging throttling
Change-Id: Icf175bd270d0eb6a9d2adcde2199b034683a8b8f
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2022-02-15 05:10:46 +00:00
Rick Yiu
1b0d78ac5b Sync vendor task_profiles and init rc file
Sync the settings from P21.

Bug: 207573268
Test: build pass
Change-Id: Ia6f761c6247522707d34888347bec6736c227e9e
2022-02-11 13:47:55 +00:00
Kris Chen
0567190969 Configure permission for AOC UDFPS sysfs node.
Bug: 205242782
Bug: 215044794
Test: Verify system process can read/write to the node.
Change-Id: Iecadeb47e08abf300ccd93eb8e95c91eb3195fd2
2022-02-11 02:43:14 +00:00
George Lee
5f5dbb824b thermal: enable gpu/tpu permission for user_vote
Bug: 215814890
Test: Local test to verify permission
Signed-off-by: George Lee <geolee@google.com>

Change-Id: I09d3d9bc5033ba2f31adbb34fa8969dc75a767bc
2022-01-28 23:48:56 +00:00
Kai Shi
fda5286dd1 Increase TCP wmem max size
Increase TCP wmem max size to allow high Tx throughput over wifi.

Bug: 213596972
Test: manual test to confirm TCP memory size is increased and wifi TCP throughput with default TCP window size can reach 700Mbps in HE80 mode.
Change-Id: Id1f6ea94da83825ca39093aba5c85bec5bee4a72
2022-01-26 17:15:38 +00:00
TeYuan Wang
8bf22ece52 BCL: remove thermal zone policy change
ThermalHAL listens genl event, so we do not need to
modify the thermal zone policy to user_space

Bug: 204718864
Test: Confirm no selinux denied log, and thermal zone policy is not changed
Change-Id: I77119d79d65902f6ce5cb632349a8cf7aec1d664
2022-01-26 02:41:03 +00:00
TeYuan Wang
b4f08a7823 thermal: chown quiet_therm trip_point
Bug: 211777844
Test: Confirm quiet_therm trip_point_0_temp can be modified by thermalHAL
Change-Id: I5c1c901bdf979917cca2e60552250cfc8756d806
2022-01-26 02:41:03 +00:00
Ray Chi
a872edb528 tune usb irq (dwc3) based on usb function
This among other things greatly increases tethering performance.

Bug: 202103325
Test: tput improved
(synced from commit f9e02b98b8243d2db566df16d4e763250ac9efaf)

Change-Id: I19b22d748352eb04bc27d85c0f69fa2571b63d53
2022-01-25 03:28:35 +00:00
Thurston Dang
70b9383b97 Backport 'Set /dev/sg1 permissions in ueventd.rc' to P22
... 'This way we don't need to guess when we need to chown.'

This is Tri's change to init.gs101.rc (http://go/a-g/15447093),
applied to init.<censored>.rc.

Under some circumstances (see bug), storageproxyd needs to access
/dev/sg1 but doesn't have permission, leading to other apps
blocking on storage.

Bug: 214910469
Test: Check that steps b/214910469#comment76 no longer gets stuck
Change-Id: I9e4133b6bb9ffab1e0044a16b3582436ccf5dd44
2022-01-24 05:13:57 +00:00
Thurston Dang
3a41cf3876 Backport 'Start storageproxyd early' to P22
... 'And restart it after /data is mounted.'

This is Tri's change to init.gs101.rc (http://go/a-g/15447094),
applied to init.<censored>.rc.

Bug: 187105270
Test: boot device, secure storage test com.android.storage-unittest.td
Change-Id: I226181b35c59f4882e466d2b8a839d32750e93e0
2022-01-22 19:05:46 +00:00
George Lee
acbed80455 bcl: Update threshold levels
Bug: 197028142
Test: Boot and confirm level
Signed-off-by: George Lee <geolee@google.com>
Change-Id: I16b357b6c9fb26fc338ec2af66cd43692072b6b5
2022-01-18 22:36:47 +00:00
joenchen
e625d127ad init change owners of sysfs nodes min_vrefresh and idle_delay_ms
init: change file owners of sysfs nodes min_vrefresh and
idle_delay_ms in order to grant permission for hwcomposer

Bug: 213299701
Test: use the following commands
adb shell "vndservice call Exynos.HWCService 1005 i32 0 i32 30"
adb shell "vndservice call Exynos.HWCService 1006 i32 0 i32 1000"

Change-Id: I57043afd6ac08740775680505ee6f3247d56a956
2022-01-17 10:21:16 +00:00
jonerlin
7d12f0defa bluetooth: correct btuart logger device node path
* modify dev/logbuffer_tty16 to dev/logbuffer_tty18

Bug: 213759828
Test: 1. Enable Bluetooth in P22 devices and check uart log in
android.hardware.bluetooth@1.1::IBluetoothHci.txt
2. Enable Bluetooth in P21 devices and check uart log in
android.hardware.bluetooth@1.1::IBluetoothHci.txt
3. Fake bthal ssrdump and check the coredump log.

Change-Id: I208fae8e5ddf60d7df52311c32249bf3ac401dbc
2022-01-17 09:06:28 +00:00
Wei Wang
2b490ccab5 Start bootanimation explicitly.
Bug: 207573158
Test: build
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I7e628828062f0203d9aefded94aacf086565ceef
2022-01-12 22:01:07 +00:00
linpeter
638ece5abc display: atc sysfs node change
Give atc nodes are changed to dqe0 form.

Bug: 213133646
test: check file node permission
Change-Id: Ibe1b9dc6739994342e44b2867827ce0428c6095c
2022-01-12 08:07:30 +00:00
Minchan Kim
c7c0d7c274 P22: set up some MM parameters
What this patch does:

1. prepare zram size to increase 3G by property
2. set up zram writeback params
3. set up lmk filecahe_min_kb

Bug: 207572845
Bug: 207572250
Signed-off-by: Minchan Kim <minchan@google.com>
Change-Id: I5a3376268392ad1360586d2002e4a42feecd83ad
2022-01-12 01:31:27 +00:00
Yifan Hong
074c7216c4 Implement health AIDL HAL.
Test: VTS
Test: manual charger mode
Test: recovery
Bug: 213273090
Change-Id: If6e730d8dbd7d7ca95cfd4f045ac045d69597568
2022-01-11 21:39:14 +00:00
Taeju Park
07853908da Remove a0 and a1 powerhints
Bug: 208243183
Signed-off-by: Taeju Park <taeju@google.com>
Change-Id: I4a29445e7be74c280ce9d58eb8a1b7782aa9fcb6
2022-01-11 16:40:55 +00:00
Hsiu-Chang Chen
3a33edc542 wifi: Add /dev/wlan as driver control interface for qcom
Bug: 209934729
Test: Basic functions tests, SSR tests
Change-Id: I111852ca339dff6cee680b89ae199ce6a628577d
2022-01-11 01:00:21 +00:00