Commit graph

430 commits

Author SHA1 Message Date
Jack Wu
a8295107d3 init: support boot.charger_mode feature
1. If the device is powered off by users, boot to charger mode
   after plugging in the charger. Otherwise, boot to OS.
2. Disable this feature by default
3. Enable this feature by persist.sys.boot.charger_mode.enable=1

Bug: 251680171
Test: can enter charger mode from power off
Signed-off-by: Jack Wu <wjack@google.com>
Change-Id: Ibd1f88c961d884d8e6f9d0019cf550fd0de1192d
2022-10-14 07:09:39 +00:00
Vaibhav Devmurari
a690698afa Allow system server to access sysfs node of led lights.
To support input device lights manager feature in frameworks, provide
sysfs node access to system server process.
DD: go/pk_backlight_control (For keyboard backlight control for external
keyboards)

Kernel provides a standardized LED interface to expose LED controls
over sysfs: https://docs.kernel.org/leds/leds-class.html
The feature will be provided for devices with kernel sysfs class led
support and vendor kernel driver for input controllers that do have
lights. The kernel sysfs class led support is a kernel config option
(LEDS_CLASS), and an input device driver will create the sysfs class
node interface.
By giving system_server the access to these sysfs nodes, the feature
will work on devices with the kernel option and kernel input/hid driver
support. We do use CTS tests to enforce the kernel options and the
input device drivers.

What's already supported:
- We already expose paths for UHID based LED nodes which covers all
bluetooth based peripherals that have custom vendor drivers to expose
LED sysfs nodes. (see CL aosp/1546377)

What's included in this CL:
- Exposing paths for sysfs nodes for external USB based devices that
expose LED nodes using vendor specific drivers using standard LED
interface provided by Kernel
- We are using specific paths for USB devices instead of
/sys/class/leds to avoid giving access to system LED nodes that would
also appear under /sys/class/leds (see discussion in aosp/1546377)

NOTE: Light HAL should never touch the HID device sysfs light, as the
light HAL only defines a number of lights supported
(https://android.googlesource.com/platform/hardware/interfaces/+/master/light/2.0/types.hal)
but not include input device lights, so we shouldn't have conflict
for managing these lights.

NOTE: External keyboard backlight is different for HAL light type
KEYBOARD which is for devices with attached keyboards.

Test: manual
Bug: 245506418
Change-Id: I2e9f3cbce55f3f894ca346bafa5ded280086a3ca
2022-10-04 09:22:33 +00:00
Jenny Ho
68737867c9 init: add permission to adjust wlc fan alarm level am: 926cb2a319 am: 52fcfba09b
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/19992036

Change-Id: I7f4dff7d109acd5c0a98331e3f7349e312e2f5c7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-20 17:25:36 +00:00
Jenny Ho
52fcfba09b init: add permission to adjust wlc fan alarm level am: 926cb2a319
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/19992036

Change-Id: I3568b1fa5f4787b2316a981a22ccfcccd683fd0c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-20 16:30:39 +00:00
Jenny Ho
926cb2a319 init: add permission to adjust wlc fan alarm level
Bug: 246486657
Signed-off-by: Jenny Ho <hsiufangho@google.com>
Change-Id: I6336a86c1e7cfa8d30f593d1b8fcbe8aba699226
2022-09-20 13:09:58 +08:00
Cheng Chang
95a8304b0a gps: raise gps service priority am: b1ea1a74fe am: 1db9781209
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/19570488

Change-Id: Ic921bc3e90f7952ebac6d29eb32800ca854b9b94
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-06 04:00:32 +00:00
Cheng Chang
1db9781209 gps: raise gps service priority am: b1ea1a74fe
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/19570488

Change-Id: I4984df1009be32bbaa3c2d4cef54a7f30656c0ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-06 03:30:41 +00:00
Cheng Chang
b1ea1a74fe gps: raise gps service priority
Bug: 237695224
Test: Test Result 241195410
Change-Id: Ia72596564b3bcf9d9142155cd48ab57beb4c847e
2022-09-06 03:07:09 +00:00
Adam Shih
89501813f0 move insmod script to gs-common
Bug: 243763292
Test: boot to home
Change-Id: I4662b5265ccaaf92889931214597fabc120e9dbc
2022-09-05 11:40:22 +08:00
David Chao
1fe98d0174 thermal: move charger thermal HAL setup into project am: f121ec6625 am: 59a427c887
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/19638879

Change-Id: Ia2e793d099e3e6a28bb2270b5832aff7651ce5e7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-22 20:39:33 +00:00
David Chao
59a427c887 thermal: move charger thermal HAL setup into project am: f121ec6625
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/19638879

Change-Id: I886eadc929e77308189aa3b664f97b08608cfb37
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-22 20:11:23 +00:00
David Chao
f121ec6625 thermal: move charger thermal HAL setup into project
Move charger pixel-thermal-symlink from common to project folder
to prevent the GKI version dependencies from blocking init.

Bug: 240897207
Test: thermal_symlinks worked properly in charging mode
Change-Id: I0d3b03c9add57b14f255eb66a1a7a46fa6c4b257
2022-08-22 19:54:12 +00:00
Jimmy Chen
e0826531c6 p2p: fix p2p configuration am: 3749b75764
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/19238029

Change-Id: Id8569098c070f42ee02d286a501cf72b3d5ecc51
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-05 04:01:33 +00:00
Jimmy Chen
3749b75764 p2p: fix p2p configuration
The correct path should be under /data,
or it is not writable.

wpa_supplicant now support p2p overlay configuration, a unified
wpa_supplicant init entry can be used.

Bug: 238601241
Test: create a group and check this group is persisted
      after reboot
Merged-In: I3c5523626de22c26cb562c03e9fbd7aabf6d98e7
Change-Id: I3c5523626de22c26cb562c03e9fbd7aabf6d98e7
2022-08-04 05:20:13 +00:00
Prasanna Prapancham
58677ed760 Change ownership of charge_stats to system for clearing am: 1dc5d62371 am: a203131d2d
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/19213521

Change-Id: I971a16e995d20d1cdc776c3d2217bd39735958f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-29 00:14:37 +00:00
Prasanna Prapancham
a203131d2d Change ownership of charge_stats to system for clearing am: 1dc5d62371
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/19213521

Change-Id: Ia1889f9c95c2e95875f9782e157e6509d10a7008
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-29 00:04:16 +00:00
Prasanna Prapancham
1dc5d62371 Change ownership of charge_stats to system for clearing
Test: Tested with tablet with dock. Userspace is able to read
and clear sysfs node successfully

Bug: 218802317
Signed-off-by: Prasanna Prapancham <prapancham@google.com>
Change-Id: I1e97920ff0e810ce2888102f3971b21aabc55909
2022-07-28 23:17:26 +00:00
Tri Vo
fd9a1da25f storageproxyd: start storageproxyd as "system" user and group am: db0342fbad am: 3732bf0bc2 am: 07e738908d am: 4c287a190f am: 668c982d75
Original change: https://android-review.googlesource.com/c/device/google/gs101/+/2154278

Change-Id: I3eaea309de31c3ca82348a4307cbec6269a81c1c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-27 22:09:48 +00:00
Tri Vo
668c982d75 storageproxyd: start storageproxyd as "system" user and group am: db0342fbad am: 3732bf0bc2 am: 07e738908d am: 4c287a190f
Original change: https://android-review.googlesource.com/c/device/google/gs101/+/2154278

Change-Id: I8d779e607ba2de90bd345acbb6126e74eed6cefd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-27 21:44:32 +00:00
Tri Vo
3732bf0bc2 storageproxyd: start storageproxyd as "system" user and group am: db0342fbad
Original change: https://android-review.googlesource.com/c/device/google/gs101/+/2154278

Change-Id: I6f70b459a6cc41ca577d0774674b3ddca83d5ce1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-27 19:59:59 +00:00
Jimmy Chen
c38d0a2d4c p2p: fix p2p configuration
The correct path should be under /data,
or it is not writable.

wpa_supplicant now support p2p overlay configuration, a unified
wpa_supplicant init entry can be used.

Bug: 238601241
Test: create a group and check this group is persisted
      after reboot
Change-Id: I3c5523626de22c26cb562c03e9fbd7aabf6d98e7
2022-07-23 02:04:16 +00:00
Jack Wu
1d1a9e5a36 init: disable dock-defend am: 67240b1cdc am: e8b25ba765
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/19377351

Change-Id: Ic12fef546e6159d9827c1c3e0f85539571cd9d1f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-22 07:08:21 +00:00
Jack Wu
67240b1cdc init: disable dock-defend
User will enable/disable this feature from UI setting

Bug: 239889098
Test: dock-defend is disabled by default
Signed-off-by: Jack Wu <wjack@google.com>
Change-Id: I25376ce6174e4e09ed4a7ce8f1258dc099da4cd8
2022-07-22 03:58:32 +00:00
Woody Lin
7a331b67fd watchdog: Move platform watchdog daemon to gs-common
Bug: 238701471
Change-Id: I002a7f82167c6d9aa11f4ec23860eb443551713a
2022-07-21 06:53:06 +00:00
Tri Vo
db0342fbad storageproxyd: start storageproxyd as "system" user and group
Bug: 205904330
Test: boot
Change-Id: I7ad81b202e25307e4f49c48e4ae790d0b9ec6801
2022-07-15 13:05:33 -07:00
Robin Peng
cd975b492c init.gs101.rc: remove vendor.device.modules.ready from 'on init' section am: 21932fae4c am: 17f264b71e
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/19279087

Change-Id: Ib2666687fccc48413d77fa4a87fcd0c678400769
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-15 15:24:11 +00:00
Robin Peng
21932fae4c init.gs101.rc: remove vendor.device.modules.ready from 'on init' section
1) for projects with device specific modules, this property should only
   be set while device modules been loaded.
2) also remove "wait_for_prop vendor.device.modules.ready 1" to prevent
   infinite wait
3) migrate vendor.all.modules.ready/vendor.all.devices.ready to
   init.insmod.<DEVICE>.cfg and set these proprieties while .cfg not
   exist

Bug: 238853979
Signed-off-by: Robin Peng <robinpeng@google.com>
Change-Id: I17aa42ef0a459c33871891e5036edf7eea57e39a
2022-07-14 13:08:55 +00:00
TeYuan Wang
210934874c thermal: allow thermal_controld to overwrite CDEV state
Bug: 236698810
Test: adb shell setprop persist.vendor.disable.thermal.control 1
Change-Id: I71a34a4563c4b799ed1bd8fddac2f26f1b97431d
2022-07-12 09:41:43 +00:00
George Lee
5ed728dd1a bcl/init: Remove unused sysfs write. am: b73054581d am: 61996c3851
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/19170759

Change-Id: I83581243eb170ccf8c61631a9710cfedfda1a556
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 02:36:06 +00:00
George Lee
b73054581d bcl/init: Remove unused sysfs write.
SOFT_OCP_TPU/GPU/CPU are no longer used.  Clock divider ratio should
also be set accordingly.

Bug: 234275748
Test: Boot and verify
Signed-off-by: George Lee <geolee@google.com>
Change-Id: Icb45b4f30605efaae72bef3ccd1c3d82df8b71a7
2022-07-06 01:47:21 +00:00
matthuang
18c819ee32 Set permission and owner for acd-com.google.usf.non_wake_up. am: 4ea4bdb936 am: fedfdaee64
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/18869636

Change-Id: I9676d1a99cac47fe7a390d319b5655bc7138895e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 03:12:30 +00:00
matthuang
4ea4bdb936 Set permission and owner for acd-com.google.usf.non_wake_up.
Bug: 195077076
Test: check file permission.
Change-Id: Id03d489dda97a05a72ebf6a8c2e1987f70159f4f
2022-07-01 02:16:04 +00:00
Daeho Jeong
eb703a418c fstab: disable auto compression for apk,apex and so am: c10d805383 am: 489cd831f2
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/18931177

Change-Id: If01b764df27952b109b44f85c7eb43e5d1e527ad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-21 22:08:43 +00:00
Daeho Jeong
1ec55cd83d fstab: disable auto compression for apk,apex and so am: c10d805383 am: 7c4f2ae2ff
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/18931177

Change-Id: I2a3813a275f0ce30640f37a676177e1c86a1d093
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-21 22:08:03 +00:00
Daeho Jeong
c10d805383 fstab: disable auto compression for apk,apex and so
Bug: 235480291
Test: check mount option

Signed-off-by: Daeho Jeong <daehojeong@google.com>
Change-Id: I3765847b9c2074e1501646675fed7109a7a73230
2022-06-21 21:14:26 +00:00
David Chao
f66bf2fe25 gs101: move charger thermalHAL setup into common code am: 88fb3bfe07 am: 1af01d23c2
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/18910875

Change-Id: I1eabfde0a5aa734f0bbeb5205f230e2c98e014c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-20 08:15:41 +00:00
David Chao
88fb3bfe07 gs101: move charger thermalHAL setup into common code
To aligned with P22 to move charger thermalHAL setup into common code

Bug: 200615564
Test: build pass and boot to home
Change-Id: Idfe47fe64e4c158f27cd587ca8d768e13292c361
2022-06-20 07:10:50 +00:00
Jack Wu
ebbbe0b86e init: disable dock-defend in charger mode am: 4a612faaaf am: b8adde1c94
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/18816148

Change-Id: I942c07d2de5ec604ccd020232d19c43047438a4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-14 06:03:04 +00:00
Jack Wu
4a612faaaf init: disable dock-defend in charger mode
Need to meet energy certification test requirement which needs to
be able to charge FULL.

Bug: 235437635
Test: can charge to full on dock in charger mode
Signed-off-by: Jack Wu <wjack@google.com>
Change-Id: I9f92cffdefbeef8e3671812dbc2891d4fef71230
2022-06-14 11:00:53 +08:00
David Chao
72d8897fae Revert "gs101: move charger thermal HAL setup into common code" am: 38d2997f6a am: 5b49d7f1ba
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/18614370

Change-Id: I3c8db83ed5186664592f1dac48ce7ac608b6a0c2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 17:38:40 +00:00
David Chao
38d2997f6a Revert "gs101: move charger thermal HAL setup into common code"
This reverts commit 980650080a.

Reason for revert: Since the vendor.thermal.symlinks is init early than google-module init
such as gpu cooling, the gpu cooling is not ready while creating thermal.symlinks.
Thermal-hal GPU thermal throttling will fail because there is no thermal-gpufreq-0 in thermal.symlinks.

Bug: 200615564
Test: thermal symlinks can be created in dev folder
Change-Id: Ia3b0999c7a8038f7be5e2390926ff74473c0c339
2022-05-26 17:53:01 +08:00
David Chao
161e1bddf8 gs101: move charger thermal HAL setup into common code am: 980650080a am: 0d8627b8eb am: fb574fe307 am: bd68080722
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/17346883

Change-Id: I0b185cb397584eee8464ea9dd8d21ddf4588f6f9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 09:24:05 +00:00
David Chao
980650080a gs101: move charger thermal HAL setup into common code
Bug: 200615564
Test: build pass
Change-Id: I5a32c2b695dc9fd3e29e580c8a82e25f6c3a5f69
2022-05-25 07:46:52 +00:00
Akilesh Kailash
89bfa8d6fb Revert "gs101: Enable system_dlkm dynamic partition" am: 7bb4293087 am: 40af2bb4a4 am: 3f5f295fe3 am: 4a4ecfbb6c
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/18513552

Change-Id: I211c9da335d036f602b5452c52bae9722c86fa9c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 20:18:23 +00:00
Akilesh Kailash
7bb4293087 Revert "gs101: Enable system_dlkm dynamic partition"
This reverts commit 58893b442f.

Reason for revert: OTA failues observed during S -> T

Bug: 228927535
Test: Full and Incremental OTA's.
Change-Id: Iec9e15d60dab92213494c9e679de6702f8d56e37
2022-05-24 18:15:49 +00:00
Kyle Tso
4db75dda18 dumpstate: Dump logs
Bug: 232556226
Test: log dumped in bugreport
Signed-off-by: Kyle Tso <kyletso@google.com>
Change-Id: Iacd4db38dd56c1d5ba6f58c757f023795a9c3a3b
Merged-In: Iacd4db38dd56c1d5ba6f58c757f023795a9c3a3b
2022-05-24 00:00:46 +00:00
Richard Chang
621f413ca9 gs101: Support Vendor System Native Experiment for cpusets am: 688710d159 am: 65922cfe2b am: 0cf988c2f2 am: 58c49e9020
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/18047574

Change-Id: I18971102f1f5149f61aa1cdbd5bef4e6cc16a1ae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 07:40:09 +00:00
Richard Chang
58c49e9020 gs101: Support Vendor System Native Experiment for cpusets am: 688710d159 am: 65922cfe2b am: 0cf988c2f2
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/18047574

Change-Id: I6a3afe2b350d3c67706950d795e23943663251e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 07:21:59 +00:00
Richard Chang
688710d159 gs101: Support Vendor System Native Experiment for cpusets
Let vendor_init adjusted the cpusets by device config from the
server. Allow us to study the performance and power impacts
by various experiment settings.

Bug: 223685902
Test: adb remount ; adb push init.gs101.rc /vendor/etc/hw/ ; adb reboot
Test: change persist.device_config.vendor_system_native.<group>_cpuset and check /dev/cpuset/<group>/cpus is also modified
Change-Id: I73369f2cef7b999cb380278503a4dbfcc4cff3cd
2022-05-23 06:06:15 +00:00
Wei Wang
dc20b170cb Remove group_throttle setting am: faaa95c900 am: b4d1eaec1a am: f992078f44 am: 5199bd3f73
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/18486178

Change-Id: If90af1979b2c11e82b3fe28f933a4c830994d6a1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 16:32:50 +00:00