94 Commits
vic ... bka

Author SHA1 Message Date
c71e0f7bf8 gs101: Initialize for Evolution X 11.x
Change-Id: I263bc42d98438cebc8d8d004a8cf05e912be5d46
Signed-off-by: AnierinB <anierin@evolution-x.org>
2025-09-26 04:50:13 +00:00
Michael Bestas
95a7513af6 gs101: Drop kernel copy
We are using prebuilt boot.img. If we weren't using it, we would be
using the vendor/lineage kernel.mk rules to copy the kernel.

Change-Id: Ib8ab9416b96900f008dbce9d9f41f298a1b05f30
2025-08-28 16:27:45 +03:00
Michael Bestas
64760d59eb gs101: Bump SPL to 2025-08-05
Change-Id: I079629bc2b5bb728dac7fdab902ce53ffa336810
2025-08-13 03:35:15 +00:00
LuK1337
1ef71edb05 gs101: Remove vendor/lineage device framework matrix inclusion
See: I78da6340f38b93fdc4c3694cb8f431f387d16c0d
Change-Id: I0b9f527de50ca02082be9b92375559f4893b2688
2025-08-11 16:17:03 -04:00
Michael Bestas
f208e8945a gs101: sepolicy: Remove duplicate service label
This is defined in gs-common

Change-Id: Ib90caea46da6cc9e191efe8f04b783bba9e2691a
2025-06-26 10:13:12 +03:00
Michael Bestas
d76003dde7 gs101: sepolicy: Update tracking denials bug map from BP2A
Change-Id: Ibdfb2fa34bc43399f944ef73f6687d8e5051a2ef
2025-06-26 10:13:12 +03:00
Michael Bestas
363750d68d gs101: Selectively update overlays from BP2A
Change-Id: Icfa723318c46e0674772b7138e2e83b387908a29
2025-06-26 10:13:12 +03:00
Michael Bestas
aaf7de8484 gs101: Remove non-existent vendor includes
Change-Id: I1bc76430d30259984f4eb91907be61ef39646c27
2025-06-26 10:13:12 +03:00
Michael Bestas
f97fa0ec44 gs101: Remove unused UWB configuration
Change-Id: I99c094cf2b129d780b5f9d27b9e398354a82f7b6
2025-06-26 10:13:12 +03:00
Michael Bestas
39ce582e31 gs101: Remove factory configuration
Change-Id: Ib46639b684db8f0bbd42be9ffd518e62277d63f0
2025-06-26 10:13:12 +03:00
Michael Bestas
bfb257ca9a gs101: Remove SystemUI dexpreopt speed compile flags
They are already defined in vendor

Change-Id: I27097e32091d0066fc3da1a1b786e5a6ae11bc86
2025-06-26 10:13:12 +03:00
Michael Bestas
9e4f6f83b6 gs101: Include missing NFC sepolicy
Change-Id: Ic93f74e25694f19cfc23a86203c17e6f1d9be0ea
2025-06-26 10:13:12 +03:00
Michael Bestas
664fd462d1 gs101: Include missing bt dump sepolicy
Change-Id: I7e16eba76b87db4c8fc45d9401ce4f2c143b6478
2025-06-26 10:13:11 +03:00
Michael Bestas
61f97072ca gs101: Move wfc-pkt-router to gs-common
Change-Id: I922b28e1bd8dc0baece89428c0032eabde5c13dc
2025-06-26 10:13:11 +03:00
Michael Bestas
635eee8532 gs101: Remove unused fingerprint configuration
Change-Id: Ifd79557c81280f9e93076bc1e6824c650ea12ed7
2025-06-26 10:13:11 +03:00
Maciej Żenczykowski
6e0b710b3c oem-iptables-init.sh not used any more
Specifically due to netd change:
  http://go/aog/3530692
  Add support for new oem_in hook.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ibec85ae1303789018a8d4a95f48ca429fe49acda
2025-06-26 10:13:11 +03:00
Michael Bestas
23c4b461c1 gs101: Remove userdebug/eng configuration
Change-Id: Ie1e8b6bbebdfac97f8bc382e41c70cc8a32caf07
2025-06-26 10:13:11 +03:00
Michael Bestas
b619bb97bc gs101: Remove AOSP gerrit configuration
Change-Id: I3bf3987b08a710ddf278cae5243946fae70fce6a
2025-06-23 06:18:59 +03:00
Michael Bestas
bc0bcb3e34 gs101: Remove CleanSpec.mk
Change-Id: I6af355cfbfd5fc388ca25cd25cea9df9e74c41c3
2025-06-23 06:18:47 +03:00
Michael Bestas
9ab8c53f67 gs101: Bump SPL to 2025-06-05
Change-Id: I8d3f5a9479d0fddd6fa79baa3e573f00ad125e9c
2025-06-23 06:18:39 +03:00
Michael Bestas
9f02944989 gs101: Update task_profiles.json from BP2A
Change-Id: I5303433e19e6e53afc0635d9a00b7467e00391cd
2025-06-23 06:18:10 +03:00
Michael Bestas
d35ae071e7 gs101: Update init scripts from BP2A
Change-Id: I9e36e0faec4860fe714c0151b3cb7f373cbcf0ea
2025-06-23 06:18:04 +03:00
Michael Bestas
896c06b264 gs101: Update FCM for 16
Change-Id: If85ec83e37e9d983903aed4c6f809664fd2b293e
2025-06-23 06:17:59 +03:00
Michael Bestas
fde11dd697 gs101: Remove pixelstats-vendor
This does not build with the current hardware/google/pixel dependencies
so make it prebuilt.

Change-Id: Ifcbf49fb482164bd72ad0e1f05fa2d48ca2fbc98
2025-06-23 06:17:54 +03:00
Michael Bestas
2909c91023 Merge tag 'aml_tz6_351400020' into staging/lineage-23.0_merge-aml_tz6_351400020
aml_tz6_351400020 (13155446,com.google.android.go.tzdata6,com.google.android.tzdata6)

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCZ9i73wAKCRDorT+BmrEO
# eFcxAJ9FjuwU+gpMXe30sSxhISfEmxN2owCeLtsSixLCQo0oS2uAROPj1Ss1KYw=
# =RGaz
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Mar 18 02:18:39 2025 EET
# gpg:                using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78
# gpg: Good signature from "The Android Open Source Project <initial-contribution@android.com>" [ultimate]

# By Nina Chen (3) and others
# Via Android Build Coastguard Worker (8) and others
* tag 'aml_tz6_351400020':
  Add udc sysfs to udc_sysfs fs context
  Update SELinux error
  Remove chre vendor_data_file from tracking denials bug map
  RamdumpService: Fix the SELinux errors from introducing Firebase Analytics.
  init-display-sh: Don't audit writing to kmsg
  gs101: update selinux to allow UMI on user build
  Remove sced sepolicy rule
  whi: Add selinux permission for fth
  sepolicy: gs101: add genfscon wireless into sysfs_batteryinfo
  Update SELinux error
  Update SELinux error
  Revert "Remove hal_camera_default aconfig_storage_metadata_file ..."
  Remove hal_camera_default aconfig_storage_metadata_file from bugmap
  Update SELinux error

Change-Id: Idee2829022f41f42017aab5ab99e5043767fd8e0
2025-06-23 05:21:13 +03:00
Michael Bestas
a7ada3bcea Merge tag 'aml_tz6_351400020' into staging/lineage-23.0_merge-aml_tz6_351400020
aml_tz6_351400020 (13155446,com.google.android.go.tzdata6,com.google.android.tzdata6)

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCZ9i73wAKCRDorT+BmrEO
# eE0jAJ9LUlDeVJV2JVbzsyWRdWRRhpFGkwCfbEbrFRYUgH7HHshxtjQlrRTLJ/U=
# =bAod
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Mar 18 02:18:39 2025 EET
# gpg:                using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78
# gpg: Good signature from "The Android Open Source Project <initial-contribution@android.com>" [ultimate]

# By Piotr Klasa (4) and others
# Via Android Build Coastguard Worker (9) and others
* tag 'aml_tz6_351400020': (21 commits)
  Enable usb state update via udc sysfs
  usb: fix usb state path in host mode
  usb: migrate UsbDataSessionMonitor to libpixelusb
  Use 2025-03-01 deqp level for GLES
  Use 2025-03-01 deqp levels for Vulkan
  Revert "Use 2025-03-01 deqp levels for GLES and Vulkan"
  Use 2025-03-01 deqp levels for GLES and Vulkan
  move common init perf settings to gs_common
  Revert "move common init perf settings to gs_common"
  move common init perf settings to gs_common
  Enable open source multi akm for specific Broadcom project
  pixelstats: gs101: remove firmware update path
  init-display-sh: Allow writing to kmsg
  Remove ResetUclamp profiles
  Update IDisplay to V13-V14
  display-dump: make display dump project-specific
  Refactor: Use googleDeviceConfig namespace in gs101 BoardConfig
  dump_power: add battery caretaker dump into bugreport
  Set initial value for foreground_window group
  Move all vendor_sched parameters and permissions to init.pixel.perf.rc
  ...

Change-Id: I296bc05a0b9bc48ee3ca478f305e7ab76f5941ee
2025-06-23 05:21:04 +03:00
Chirayu Desai
04140bb2f4 Freeze SPL to 2025-05-05
Change-Id: I3dfa3c342582d14c1b5b89061c8a58a72dc6cbcd
2025-06-03 19:57:53 +00:00
Android Build Coastguard Worker
4f22836dba Snap for 13025264 from bc8263d2ff to mainline-tzdata6-release
Change-Id: I24969d1f96f5749b1c73d0630e8b7156d5cce328
2025-02-06 14:21:01 -08:00
Android Build Coastguard Worker
ad0f4eaa6b Snap for 13025264 from 73ea462096 to mainline-tzdata6-release
Change-Id: I955a1a6da4dded86654108e666f23189cc76f626
2025-02-06 14:21:00 -08:00
Roy Luo
bc8263d2ff Merge "Add udc sysfs to udc_sysfs fs context" into main 2025-02-06 10:27:37 -08:00
Roy Luo
73ea462096 Enable usb state update via udc sysfs
Bug: 339241080
Test: tested on Oriole
Flag: android.hardware.usb.flags.enable_udc_sysfs_usb_state_update
Change-Id: Iab39cbc7d51f5598b70fb836b9c8863fa188f63f
2025-02-06 10:27:35 -08:00
Roy Luo
7fb2864005 usb: fix usb state path in host mode
USB_DUMMY_HCD is disabled in kernel 6.1, modify the usb state path in
host mode accordingly.

Bug: 388367091
Test: test on oriole
Flag: EXEMPT trivial bug fix
Change-Id: If85077fddcadd25d15777d4b1ff5be2a0528c253
2025-02-05 20:25:29 -08:00
Roy Luo
e61b680408 usb: migrate UsbDataSessionMonitor to libpixelusb
Use the libpixelusb version of UsbDataSessionMonitor.

Bug: 388367091
Test: test on oriole
Flag: EXEMPT CP
Change-Id: I93b74fc9bb63c260e900ee5af73e66fb1559142d
2025-02-05 20:25:29 -08:00
Roy Luo
5a75cda76d Add udc sysfs to udc_sysfs fs context
Meeded for system server to monitor usb gadget state.
Grant hal_usb_impl read access as it's needed by UsbDataSessionMonitor.
Starting at board level api 202504 due to its dependency on aosp/3337514

10956 10956 W android.hardwar: type=1400 audit(0.0:327): avc:  denied  { read } for  name="state" dev="sysfs" ino=84394 scontext=u:r:hal_usb_impl:s0 tcontext=u:object_r:sysfs_udc:s0 tclass=file permissive=0

Bug: 339241080
Test: tested on Oriole
Flag: android.hardware.usb.flags.enable_udc_sysfs_usb_state_update
Change-Id: Iac9384cc81090d71e0cda8a6ba83476af865fe33
2025-02-05 11:32:57 -08:00
Nina Chen
2f510558b1 Update SELinux error
Test: SELinuxUncheckedDenialBootTest
Bug: 394433509
FLag: EXEMPT bugfix
Change-Id: If192082b7d675bb41d91bf4eaf727d43b8df54a7
2025-02-04 18:56:53 -08:00
Masha Chizhova
b70d478bfb Use 2025-03-01 deqp level for GLES
Bug: 392805030
Flag: EXEMPT version updates
Change-Id: I474efd47391012424cba1e3e3549da00b23a4753
2025-02-03 11:24:38 +00:00
Masha Chizhova
9b7a38fb7b Use 2025-03-01 deqp levels for Vulkan
Bug: 392805030
Flag: EXEMPT version updates
Change-Id: Ib63b918fd1c67d4bfd751624f435d8a02798c2ac
2025-01-31 10:54:31 +00:00
Priyanka Advani (xWF)
2306f2cd7f Revert "Use 2025-03-01 deqp levels for GLES and Vulkan"
Revert submission 31488081-deqp-2025-03-01

Reason for revert: Droidmonitor created revert due to b/393355394. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:31488081-deqp-2025-03-01

Change-Id: I054aaf0583ab9d4976514ac46917b661a494e186
2025-01-30 10:53:08 -08:00
Masha Chizhova
ada24418c9 Use 2025-03-01 deqp levels for GLES and Vulkan
Bug: 392805030
Flag: EXEMPT version updates
Change-Id: Ib67709eee81a5519c3f0c0b42b4625472f54a881
2025-01-29 18:21:09 +00:00
yixuanwang
503ffc6d56 Remove chre vendor_data_file from tracking denials bug map
Flag: EXEMPT remove bug map only
Bug: 301948771
Test: presubmit
Change-Id: I1a41fc646cb337c28d100af31138e5cdf7726cf7
2025-01-28 23:15:27 +00:00
Piotr Klasa
b2592019c9 move common init perf settings to gs_common
compared to ag/31352563 I did not transfer the settings for "write /sys/devices/system/cpu/cpuidle/current_governor teo", which caused the problem

Test: Verified if all values ​​of transferred settings are as they should be after rebooting the device, and and checked that there are no new selinux errors for hal_power_default, verified all metrics that caused power regression in the previous commit on abtd

Bug: 335874870

Flag: EXEMPT not supported by this component yet

Change-Id: I7ad8dbd7fd2783017c5bae8181008db32b95e9b7
2025-01-23 03:36:14 -08:00
Piotr Klasa
b60a6a9f89 Revert "move common init perf settings to gs_common"
Revert submission 31215196-move_common_init_perf_settings_to_gscommon

Reason for revert: Power Regression

Reverted changes: /q/submissionid:31215196-move_common_init_perf_settings_to_gscommon
Bug: 390502171
Change-Id: I9e88aecf6ed56d1d2171d379f16f215b4a135547
2025-01-21 01:27:04 -08:00
Enzo Liao
249369ecab RamdumpService: Fix the SELinux errors from introducing Firebase Analytics.
Fix it by ag/31334770 and remove the tracking bug number.

Bug: 386149238
Flag: EXEMPT bugfix
Change-Id: Icbf1745ced50ce2a2fa8ae48598c126580aa82eb
2025-01-21 14:13:18 +08:00
Yi-Yo Chiang
210d42804b init-display-sh: Allow writing to kmsg am: 6864f9f43b am: 7ff9bca803
Original change: https://android-review.googlesource.com/c/device/google/gs101/+/3442471

Change-Id: I97ba2eaa1e1d68b3b2bfb5ea593eae57491c18e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-01-20 21:43:41 -08:00
Yi-Yo Chiang
e1c9a3383e init-display-sh: Don't audit writing to kmsg am: 829c6fb863 am: 70df5492b9
Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/3444579

Change-Id: I0f84fe4430931119f095c0ff6e3133855a5b2575
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-01-20 21:43:41 -08:00
Yi-Yo Chiang
7ff9bca803 init-display-sh: Allow writing to kmsg am: 6864f9f43b
Original change: https://android-review.googlesource.com/c/device/google/gs101/+/3442471

Change-Id: I19231856243852a688eccb8a1b277e4c3fc39cda
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-01-20 21:19:12 -08:00
Yi-Yo Chiang
70df5492b9 init-display-sh: Don't audit writing to kmsg am: 829c6fb863
Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/3444579

Change-Id: I6b7f5d20252648e8e35b85d803ae834bc5a39f74
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-01-20 21:19:12 -08:00
Yi-Yo Chiang
829c6fb863 init-display-sh: Don't audit writing to kmsg
modprobe would log errors to /dev/kmsg, need to explicit allow this.

```
avc:  denied  { write } for  comm="modprobe" name="kmsg" dev="tmpfs" ino=5 scontext=u:r:init-display-sh:s0 tcontext=u:object_r:kmsg_device:s0 tclass=chr_file permissive=0
```

Bug: 388717752
Test: DeviceBootTest#SELinuxUncheckedDenialBootTest
Change-Id: I62a43416291d4d79164765004f156f2bdb69b0b5
2025-01-20 01:38:19 -08:00
Piotr Klasa
992d32e318 move common init perf settings to gs_common
Test: Verified if all values ​​of transferred settings are as they should be after rebooting the device, and and checked that there are no new selinux errors for hal_power_default
Bug: 335874870
Flag: EXEMPT not supported by this component yet

Change-Id: I7054fb3ab6f8fce9cf06c7691e8e1aea2453ca88
2025-01-16 01:38:28 -08:00
Treehugger Robot
ccf51fc02b Merge "Remove sced sepolicy rule" into main 2025-01-14 23:40:47 -08:00
Isaac Chiou
470aae4369 Enable open source multi akm for specific Broadcom project
For cross akm roaming function, we have two ways in supplicant :
1. Open source way.
2. Broadcom specific way.

Originally, Broadcom projects follow way 2 due to the limitation of the driver.
For now, we plan to move all Broadcom projects to follow way 1 to make supplicant code clean and downsteam without conflict.

For those projects which is ready for way 1, we control it to follow way 1 with WIFI_BRCM_OPEN_SOURCE_MULTI_AKM config.
For the rest of Broadcom projects, we still follow way 2 until the multiple AKMs is fully supported by driver and verified.

For ongoing Broadcom project, we also need to exercise the open source path in supplicant to do multiple AKM configuration to comply with WFA Wifi 7 AKM24 specification (b/331896542 ).

Bug: 246871098
Test: AU drop test
Test: Cross AKM roaming test
Flag: EXEMPT enable control flag for aosp akms
Change-Id: I2594e3741d5be1c055d364104639b3d55336a5a7
2025-01-14 18:42:41 -08:00
Xiaofan Jiang
e521ebbc45 gs101: update selinux to allow UMI on user build
Bug: 375335464

[   68.189198] type=1400 audit(1722986580.568:59): avc:  denied  { unlink } for  comm="binder:892_2" name="modem_svc_socket" dev="dm-52" ino=20239 scontext=u:r:modem_svc_sit:s0 tcontext=u:object_r:radio_vendor_data_file:s0 tclass=sock_file permissive=1
[   68.189448] type=1400 audit(1722986580.568:60): avc:  denied  { create } for  comm="binder:892_2" name="modem_svc_socket" scontext=u:r:modem_svc_sit:s0 tcontext=u:object_r:radio_vendor_data_file:s0 tclass=sock_file permissive=1
[   68.189448] type=1400 audit(1722986580.568:60): avc:  denied  { write } for  comm="binder:892_2" name="modem_svc_socket" scontext=u:r:modem_svc_sit:s0 tcontext=u:object_r:radio_vendor_data_file:s0 tclass=sock_file permissive=1


Flag: EXEMPT Critical modem system service
Change-Id: Iedda88ebf6d03ea8218ae7843a226be8021491c0
2025-01-09 19:13:05 -08:00
Spade Lee
2c0ef869df pixelstats: gs101: remove firmware update path
Bug: 386187651
Test: local test pass
Flag: EXEMPT refactor
Change-Id: I2886e26186b12ffe34df6aa559bdf66e3e8f059d
Signed-off-by: Spade Lee <spadelee@google.com>
2025-01-09 12:16:07 -08:00
Yi-Yo Chiang
6864f9f43b init-display-sh: Allow writing to kmsg
modprobe would log errors to /dev/kmsg, need to explicit allow this.

Bug: 388717752
Test: DeviceBootTest#SELinuxUncheckedDenialBootTest
Change-Id: Iecb9d45e5ef08edc04c87d8f1375803c1df11621
2025-01-09 18:42:06 +08:00
Terry Huang
e1977e8287 Remove sced sepolicy rule
Bug: 381778782
Test: gts pass
Flag: EXEMPT bugfix

Change-Id: I2c75c28ddf2ded0c8902acc2b2ded845da5e4464
2025-01-09 09:04:10 +08:00
Rick Yiu
aa719bb3e3 Remove ResetUclamp profiles
Replaced with sched qos profiles.

Bug: 355612114
Flag: NONE vendor task_profiles.json does not support flag
Test: build pass
Change-Id: Ib3ade136be980afeed5c63fbc88bac8cdcc2a4c5
2025-01-06 19:16:18 -08:00
Android Build Coastguard Worker
fe2d679530 Snap for 12872597 from 276946c265 to mainline-tzdata6-release
Change-Id: I6266ea52576e17f950c0a6ec73284932ee19d336
2025-01-06 04:35:07 -08:00
Android Build Coastguard Worker
998211dd99 Snap for 12872597 from 4af1d41ade to mainline-tzdata6-release
Change-Id: I99c2a77873f4d5108f8248d3774394b1bd782739
2025-01-06 04:35:06 -08:00
chenkris
276946c265 whi: Add selinux permission for fth
Fix the following avc denials:
avc:  denied  { open } for  path="/dev/fth_fd" dev="tmpfs" ino=1575 scontext=u:r:hal_fingerprint_default:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
avc:  denied  { read } for  name="wakeup96" dev="sysfs" ino=101698 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0

Bug: 383048849
Test: ls -lZ /sys/devices/platform/odm//odm:fps_touch_handler/wakeup
Test: authenticate fingerprint
Flag: EXEMPT NDK
Change-Id: I97305f6ac077e114624674e18b5d0718771a5e3a
2025-01-03 04:29:02 +00:00
YiKai Peng
5f1c4ee7f7 Merge "sepolicy: gs101: add genfscon wireless into sysfs_batteryinfo" into main 2024-12-30 19:34:28 -08:00
Chris Lu
4af1d41ade Update IDisplay to V13-V14
V14 is not frozen yet. We should still allow V13 for 'next' build.

Bug: 381463038
Bug: 378407278
Test: build pass
Flag: EXEMPT bugfix
Change-Id: Ibd87dadc9137dafaea0b3b3433c3d58764a7fa4e
2024-12-30 14:43:02 -08:00
YiKai Peng
b807c761ff sepolicy: gs101: add genfscon wireless into sysfs_batteryinfo
Bug: 377264254
Flag: EXEMPT bugfix
Test: ABTD
Change-Id: Iaaa20ac86422fe4052c9f4c263a23b06a9a5bcf3
Signed-off-by: YiKai Peng <kenpeng@google.com>
2024-12-30 05:06:09 -08:00
Hung-Yeh Lee
1c69abb60d display-dump: make display dump project-specific
Bug: 376426334
Test: adb bugreport
Test: adb shell /vendor/bin/dump/dump_*_display
Test: adb shell /vendor/bin/dump/dump_*_second_display
Flag: EXEMPT bugfix
Change-Id: I7eefbaad93206fb249f26811398f756dabac7bea
2024-12-29 18:31:41 -08:00
Wilson Sung
5dbf8b9836 Update SELinux error
Test: SELinuxUncheckedDenialBootTest
Bug: 386149238
Flag: EXEMPT update sepolicy
Change-Id: I903a71b445af846a3fc290c572c9a7faba1a0e47
2024-12-26 00:33:09 -08:00
Nelson Li
56fd7fd671 Refactor: Use googleDeviceConfig namespace in gs101 BoardConfig
Replaces the `CitadelProvision` Soong config namespace with the more
generic `googleDeviceConfig` in
device/google/gs101/BoardConfig-common.mk. This improves clarity and
consistency, as the namespace is used for configurations beyond
Citadel-related functionality.

Flag: EXEMPT refactor

Bug: 386114735
Test: m CitadelProvision
Change-Id: Id601ebc72c00e3961b850676896ffd8c206156ee
2024-12-26 03:05:17 +00:00
Nina Chen
efcb01f9a3 Update SELinux error
Test: SELinuxUncheckedDenialBootTest
Bug: 385977809
Flag: EXEMPT bugfix
Change-Id: I0882cc3e0cbb2fa3761811f1492158e1ca62eb9d
2024-12-24 19:20:19 -08:00
Jack Wu
3b8bae4b85 dump_power: add battery caretaker dump into bugreport
logging for AACR(+H), AAFV, AACT, AACC and AACP Version

Bug: 384737509
Test: adb bugreport
Flag: EXEMPT bugfix
Change-Id: Ice4985d13554dde3b65ba0c34bbac4085445699e
Signed-off-by: Jack Wu <wjack@google.com>
2024-12-20 18:07:19 +08:00
Timmy Li
5be4b5d997 Merge "Revert "Remove hal_camera_default aconfig_storage_metadata_file ..."" into main 2024-12-16 18:34:16 -08:00
Timmy Li
99e1afe75d Revert "Remove hal_camera_default aconfig_storage_metadata_file ..."
Revert submission 30930671-hal_camera_default_ aconfig_storage_metadata_file2

Reason for revert: b/384580942

Reverted changes: /q/submissionid:30930671-hal_camera_default_+aconfig_storage_metadata_file2

Change-Id: Ic505a8cdb84c48dd622e51ba0193ae1a4141784c
2024-12-16 16:34:52 -08:00
Timmy Li
934be8f5b2 Merge "Remove hal_camera_default aconfig_storage_metadata_file from bugmap" into main 2024-12-16 10:14:02 -08:00
Paulsu Su
dbdb448c8b Set initial value for foreground_window group
For multi-window foreground app group.

Bug: 200769420 
Change-Id: I2b65feb4732e33b27155dcfaf0b64a38b1b01026
Test: build pass
Flag: NONE vendor init file does not support flag
2024-12-16 04:23:58 -08:00
timmyli
5c7033096b Remove hal_camera_default aconfig_storage_metadata_file from bugmap
Bug: 383013727
Test: compiles
Flag: EXEMPT refactor
Change-Id: I67c8f502e590297a1720ffb64d2c402a23ad7806
2024-12-16 06:50:39 +00:00
Xin Li
9a7a444b8a [automerger skipped] Merge 24Q4 into AOSP main am: a96f3c7cd2 -s ours am: e8440982a7 -s ours
am skip reason: Merged-In I0c0a39e3fc03d8df4e9e87cf61fb8e1dafcfc996 with SHA-1 b6da7df66e is already in history

Original change: https://android-review.googlesource.com/c/device/google/gs101/+/3393999

Change-Id: I9cb742dffedccad1be1377f63c12b37d471f7acb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-13 21:49:09 -08:00
Xin Li
7112c15bfc [automerger skipped] Merge 24Q4 into AOSP main am: 4969643398 -s ours am: c9dd8dcf36 -s ours
am skip reason: Merged-In I195f779cc6588c37ccdbe4bb8b29ee8f2edd861a with SHA-1 bc766489dc is already in history

Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/29888759

Change-Id: I70acd758bbffaba7d6496724a4aa5a154717bb91
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-13 20:47:20 -08:00
Xin Li
c9dd8dcf36 [automerger skipped] Merge 24Q4 into AOSP main am: 4969643398 -s ours
am skip reason: Merged-In I195f779cc6588c37ccdbe4bb8b29ee8f2edd861a with SHA-1 bc766489dc is already in history

Original change: https://android-review.googlesource.com/c/device/google/gs101-sepolicy/+/3413479

Change-Id: I1a273dbcaf6e738d04009152926d8d296ec549d6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-13 19:55:50 -08:00
Xin Li
e8440982a7 [automerger skipped] Merge 24Q4 into AOSP main am: a96f3c7cd2 -s ours
am skip reason: Merged-In I0c0a39e3fc03d8df4e9e87cf61fb8e1dafcfc996 with SHA-1 b6da7df66e is already in history

Original change: https://android-review.googlesource.com/c/device/google/gs101/+/3413858

Change-Id: I5f287f6d0d7a3009d45531f38cddee26c0ea77bf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-13 18:52:33 -08:00
Xin Li
4969643398 Merge 24Q4 into AOSP main
Bug: 370570306
Merged-In: I195f779cc6588c37ccdbe4bb8b29ee8f2edd861a
Change-Id: I589a40cba254050bc510e87cecc6eec908d2c862
2024-12-13 11:15:09 -08:00
Xin Li
a96f3c7cd2 Merge 24Q4 into AOSP main
Bug: 370570306
Merged-In: I0c0a39e3fc03d8df4e9e87cf61fb8e1dafcfc996
Change-Id: If7556c897a8e8a3a42aee44002aa985805a1c9dd
2024-12-13 11:15:09 -08:00
Nina Chen
a920c3e875 Update SELinux error
Test: SELinuxUncheckedDenialBootTest
Flag: EXEMPT sepolicy
Bug: 383949055
Change-Id: Ibb64328a31a16fb930f459a6c4f299b40ce2af92
2024-12-12 22:40:51 -08:00
Piotr Klasa
71c878d984 Move all vendor_sched parameters and permissions to init.pixel.perf.rc
Bug: 335874870
Test: Checked that permissions and values ​​for all affected files are correct (ls -l, cat)
Flag: EXEMPT not supported by this component yet

Change-Id: I00fa4d3c3f1d7bb3e7c19f94c87dc8c541ebdc85
2024-12-12 04:08:53 -08:00
Chungkai Mei
c03f9eb35c set input to 100 explicitly in task_profile
instead of using ADPF, let's use task_profile to boost input tasks'
priroity

Bug: 378761104
Flag: EXEMPT new task_profile behavior
Change-Id: Ice311b1abcf3d629917e16f1490d4cb63fd83796
Signed-off-by: Chungkai Mei <chungkai@google.com>
2024-12-12 05:55:16 +00:00
Android Build Coastguard Worker
0ebb2343e8 Snap for 12605939 from 541b51e17b to mainline-tzdata6-release
Change-Id: I6b635a329677d54c17bbdff5b9434d5275127afe
2024-11-05 10:09:29 +00:00
Android Build Coastguard Worker
8ffd3f4d7e Snap for 12605939 from ecb4cc2682 to mainline-tzdata6-release
Change-Id: I2af571df61aaae7d171bf888be2d18a31a3b485d
2024-11-05 10:09:28 +00:00
Android Build Coastguard Worker
d1c30b33c7 Snap for 12462067 from e746382d78 to mainline-tzdata6-release
Change-Id: Ibd5996e81a6fd85ba472ae955584a5b4a3f749b0
2024-10-07 08:57:13 +00:00
Android Build Coastguard Worker
ea81bedd27 Snap for 12462067 from 164d01e0d4 to mainline-tzdata6-release
Change-Id: I1a814b828a625384372c952869a557f50ba1395e
2024-10-07 08:57:09 +00:00
Android Build Coastguard Worker
8a65ea660b Snap for 12238800 from 181183a4f5 to mainline-tzdata6-release
Change-Id: If4fed82ad2ccda8851bdd96160c713832737d723
2024-08-16 12:56:21 +00:00
Android Build Coastguard Worker
1d3254949e Snap for 12238800 from 9adfff45e2 to mainline-tzdata6-release
Change-Id: Ic125736cc1adf80f3b5c57102d9f05a6cad4b416
2024-08-16 12:56:17 +00:00
Android Build Coastguard Worker
4a4ac02ec4 Snap for 12034474 from 7d1765c2de to mainline-tzdata6-release
Change-Id: Ib25e6e1ad398465c37fd7aae9493c7700bda3ae7
2024-07-01 08:33:42 +00:00
Android Build Coastguard Worker
a178d13863 Snap for 12034474 from 7b58898aee to mainline-tzdata6-release
Change-Id: I84e94d6337d6a91c6dcca21b8133fc835e962dbc
2024-07-01 08:33:39 +00:00
Android Build Coastguard Worker
1d824f9938 Snap for 11947112 from 0e0a8e2d91 to mainline-tzdata6-release
Change-Id: I4293c825c79cfc9996407bb9b2deb62f3e768061
2024-06-10 10:12:39 +00:00
Android Build Coastguard Worker
177d9c117a Snap for 11919022 from 78d96c7781 to mainline-tzdata6-release
Change-Id: Ia8535c895752e74f7dc175de7ed5021c648413f3
2024-06-03 15:30:37 +00:00
Android Build Coastguard Worker
d67fc7dead Snap for 11919022 from 7c4a5e4019 to mainline-tzdata6-release
Change-Id: I33e363b11c18381f05f8230b06d49e384fe9fb88
2024-06-03 15:30:37 +00:00
Android Build Coastguard Worker
94d1ff80fc Snap for 11607654 from 9ddb9bab3d to mainline-tzdata6-release
Change-Id: Ib77a4dc6ec7bb6f74abaa73514d70bcf305c13d4
2024-03-21 12:27:15 +00:00
Android Build Coastguard Worker
85c2235f68 Snap for 11595244 from 3970338cd2 to mainline-tzdata6-release
Change-Id: I3d761366fe36d24ffc9d0be9f530324e3bcae37c
2024-03-19 17:12:48 +00:00
108 changed files with 146 additions and 2746 deletions

View File

@@ -34,11 +34,3 @@ license {
"NOTICE",
],
}
prebuilt_etc {
name: "preinstalled-packages-product-gs101-device-debug.xml",
src: "preinstalled-packages-product-gs101-device-debug.xml",
product_specific: true,
sub_dir: "sysconfig",
filename_from_src: true,
}

View File

@@ -22,7 +22,7 @@ TARGET_SOC := gs101
TARGET_SOC_NAME := google
USES_DEVICE_GOOGLE_GS101 := true
$(call soong_config_set,CitadelProvision,target_soc,gs101)
$(call soong_config_set,googleDeviceConfig,target_soc,gs101)
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-2a
@@ -208,12 +208,6 @@ BOARD_USES_GENERIC_AUDIO := true
$(call soong_config_set,aoc_audio_func,ext_hidl,true)
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
$(call soong_config_set,aoc_audio_func,dump_usecase_data,true)
$(call soong_config_set,aoc_audio_func,hal_socket_control,true)
$(call soong_config_set,aoc_audio_func,record_tuning_keys,true)
endif
ifneq (,$(filter aosp_%,$(TARGET_PRODUCT)))
$(call soong_config_set,aoc_audio_func,aosp_build,true)
endif
@@ -407,7 +401,5 @@ BOARD_KERNEL_CMDLINE += log_buf_len=1024K
# Protected VM firmware
BOARD_PVMFWIMAGE_PARTITION_SIZE := 0x00100000
-include vendor/google_devices/gs-common/proprietary/BoardConfigVendor.mk
include device/google/gs101/BoardConfigLineage.mk
include device/google/gs101/BoardConfigEvolution.mk

View File

@@ -5,7 +5,6 @@
#
# Manifests
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += vendor/lineage/config/device_framework_matrix.xml
DEVICE_MANIFEST_FILE += device/google/gs101/manifest_radio.xml
# Partitions

View File

@@ -1,91 +0,0 @@
# Copyright (C) 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# If you don't need to do a full clean build but would like to touch
# a file or delete some intermediate files, add a clean step to the end
# of the list. These steps will only be run once, if they haven't been
# run before.
#
# E.g.:
# $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
#
# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
# files that are missing or have been moved.
#
# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
# Use $(OUT_DIR) to refer to the "out" directory.
#
# If you need to re-do something that's already mentioned, just copy
# the command and add it to the bottom of the list. E.g., if a change
# that you made last week required touching a file and a change you
# made today requires touching the same file, just copy the old
# touch step and add it to the end of the list.
#
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
# For example:
#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
$(call add-clean-step, find $(PRODUCT_OUT) -name "*.apk" | xargs rm)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libsurfaceflinger_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libui_intermediates)
$(call add-clean-step, rm -f $(PRODUCT_OUT)/root/default.prop)
$(call add-clean-step, rm -f $(TARGET_OUT)/build.prop)
$(call add-clean-step, rm -f $(PRODUCT_OUT)/system/etc/mixer_paths_lb.xml)
$(call add-clean-step, rm -f $(PRODUCT_OUT)/system/etc/permissions/android.hardware.camera.xml)
$(call add-clean-step, rm -f $(PRODUCT_OUT)/root/*)
# Power HAL 1.0
$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/init/android.hardware.power@1.0-service.rc)
$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.power@1.0-service)
# Power HAL HIDL
$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/etc/init/android.hardware.power@1.3-service.pixel-libperfmgr.rc)
# Health storage HAL
$(call add-clean-step, find $(PRODUCT_OUT) -type f -name "*android.hardware.health.storage@1.0*" -print0 | xargs -0 rm -f)
# USB HAL to AIDL
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.usb-service.gs101)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.usb.gadget-service.gs101)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.usb-service.rc)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.usb.gadget-service-gs101.rc)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.usb-service.xml)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.usb.gadget@1.2-service.gs101.xml)
# Power Stats HAL 1.0 to AIDL
$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.power.stats@1.0-service.gs101)
$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/etc/init/android.hardware.power.stats@1.0-service.gs101.rc)
$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.power.stats@1.0-service.gs101.xml)
# Keymaster to KeyMint
$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.keymaster@4.0-service.trusty)
$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/etc/init/android.hardware.keymaster@4.0-service.trusty.rc)
$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.keymaster@4.0-service.trusty.xml)
$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/bin/hw/wait_for_strongbox)
# Health HAL to AIDL
$(call add-clean-step, find $(PRODUCT_OUT)/system -type f -name "*charger*" -print0 | xargs -0 rm -f)
$(call add-clean-step, find $(PRODUCT_OUT)/vendor -type f -name "*health@*" -print0 | xargs -0 rm -f)
$(call add-clean-step, find $(PRODUCT_OUT)/recovery/root -type f -name "*charger*" -print0 | xargs -0 rm -f)
$(call add-clean-step, find $(PRODUCT_OUT)/recovery/root -type f -name "*health@*" -print0 | xargs -0 rm -f)

5
OWNERS
View File

@@ -1,5 +0,0 @@
per-file powerhint.json = wvw@google.com,joaodias@google.com,jenhaochen@google.com,rkganesh@google.com,jychen@google.com
per-file powerhint.json = wvw@google.com,joaodias@google.com,jenhaochen@google.com,rkganesh@google.com,jychen@google.com
# per-file for Pixel device makefiles, see go/pixel-device-mk-owner-checklist for details.
per-file *.mk,{**/,}Android.bp=file:device/google/gs-common:main:/MK_OWNERS

View File

@@ -1,2 +0,0 @@
[Builtin Hooks]
jsonlint = true

View File

@@ -49,7 +49,6 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_vendor.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_vendor.mk)
#$(call inherit-product, device/google/gs101/device.mk)
#$(call inherit-product-if-exists, vendor/google_devices/gs101/proprietary/device-vendor.mk)
# TODO: fix
# PRODUCT_RESTRICT_VENDOR_FILES := all

View File

@@ -1,2 +0,0 @@
# per-file for Pixel fstab
per-file fstab.*=file:device/google/gs-common:main:/FSTAB_OWNERS

View File

@@ -1,30 +0,0 @@
# SJTAG
on init
chown system system /sys/devices/platform/sjtag_ap/interface/access_lvl
chown system system /sys/devices/platform/sjtag_ap/interface/auth
chown system system /sys/devices/platform/sjtag_ap/interface/begin
chown system system /sys/devices/platform/sjtag_ap/interface/dbg_domain
chown system system /sys/devices/platform/sjtag_ap/interface/dbg_itvl
chown system system /sys/devices/platform/sjtag_ap/interface/end
chown system system /sys/devices/platform/sjtag_ap/interface/pubkey
chown system system /sys/devices/platform/sjtag_gsa/interface/access_lvl
chown system system /sys/devices/platform/sjtag_gsa/interface/auth
chown system system /sys/devices/platform/sjtag_gsa/interface/begin
chown system system /sys/devices/platform/sjtag_gsa/interface/dbg_domain
chown system system /sys/devices/platform/sjtag_gsa/interface/dbg_itvl
chown system system /sys/devices/platform/sjtag_gsa/interface/end
chown system system /sys/devices/platform/sjtag_gsa/interface/pubkey
# Bluetooth
on post-fs-data
chown bluetooth system /dev/logbuffer_btlpm
chown bluetooth system /dev/logbuffer_tty16
on property:vendor.debug.ramdump.force_crash=true
write /sys/kernel/pixel_debug/trigger "null"
on property:power.battery_input.suspended=true
write /sys/kernel/debug/google_charger/input_suspend 1
on property:power.battery_input.suspended=false
write /sys/kernel/debug/google_charger/input_suspend 0

View File

@@ -16,36 +16,6 @@ on init
# Disable util-awareness
write /proc/vendor_sched/teo_util_threshold "1024 1024 1024"
chown system system /proc/vendor_sched/groups/bg/set_task_group
chown system system /proc/vendor_sched/groups/cam/set_task_group
chown system system /proc/vendor_sched/groups/fg/set_task_group
chown system system /proc/vendor_sched/groups/nnapi/set_task_group
chown system system /proc/vendor_sched/groups/sys/set_task_group
chown system system /proc/vendor_sched/groups/sys_bg/set_task_group
chown system system /proc/vendor_sched/groups/ta/set_task_group
chown system system /proc/vendor_sched/groups/rt/set_task_group
chown system system /proc/vendor_sched/groups/sf/set_task_group
chown system system /proc/vendor_sched/groups/dex2oat/set_task_group
chown system system /proc/vendor_sched/groups/cam_power/set_task_group
chown system system /proc/vendor_sched/groups/ota/set_task_group
chown system system /proc/vendor_sched/groups/bg/set_proc_group
chown system system /proc/vendor_sched/groups/cam/set_proc_group
chown system system /proc/vendor_sched/groups/fg/set_proc_group
chown system system /proc/vendor_sched/groups/nnapi/set_proc_group
chown system system /proc/vendor_sched/groups/sys/set_proc_group
chown system system /proc/vendor_sched/groups/sys_bg/set_proc_group
chown system system /proc/vendor_sched/groups/ta/set_proc_group
chown system system /proc/vendor_sched/groups/rt/set_proc_group
chown system system /proc/vendor_sched/groups/sf/set_proc_group
chown system system /proc/vendor_sched/groups/dex2oat/set_proc_group
chown system system /proc/vendor_sched/groups/cam_power/set_proc_group
chown system system /proc/vendor_sched/groups/ota/set_proc_group
chown system system /proc/vendor_sched/prefer_idle_set
chown system system /proc/vendor_sched/prefer_idle_clear
chown system system /proc/vendor_sched/pmu_poll_enable
chown system system /proc/vendor_sched/pmu_poll_time
chown system system /proc/vendor_sched/uclamp_fork_reset_clear
chown system system /proc/vendor_sched/uclamp_fork_reset_set
chown system system /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/lcpi_threshold
chown system system /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/spc_threshold
chown system system /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/limit_frequency
@@ -67,116 +37,8 @@ on init
chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu6_memlat@17000010/memlat_cpuidle_state_aware
chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/memlat_cpuidle_state_aware
chmod 0220 /proc/vendor_sched/groups/bg/set_task_group
chmod 0220 /proc/vendor_sched/groups/cam/set_task_group
chmod 0220 /proc/vendor_sched/groups/fg/set_task_group
chmod 0220 /proc/vendor_sched/groups/nnapi/set_task_group
chmod 0220 /proc/vendor_sched/groups/sys/set_task_group
chmod 0220 /proc/vendor_sched/groups/sys_bg/set_task_group
chmod 0220 /proc/vendor_sched/groups/ta/set_task_group
chmod 0220 /proc/vendor_sched/groups/rt/set_task_group
chmod 0220 /proc/vendor_sched/groups/sf/set_task_group
chmod 0220 /proc/vendor_sched/groups/dex2oat/set_task_group
chmod 0220 /proc/vendor_sched/groups/cam_power/set_task_group
chmod 0220 /proc/vendor_sched/groups/ota/set_task_group
chmod 0220 /proc/vendor_sched/groups/bg/set_proc_group
chmod 0220 /proc/vendor_sched/groups/cam/set_proc_group
chmod 0220 /proc/vendor_sched/groups/fg/set_proc_group
chmod 0220 /proc/vendor_sched/groups/nnapi/set_proc_group
chmod 0220 /proc/vendor_sched/groups/sys/set_proc_group
chmod 0220 /proc/vendor_sched/groups/sys_bg/set_proc_group
chmod 0220 /proc/vendor_sched/groups/ta/set_proc_group
chmod 0220 /proc/vendor_sched/groups/rt/set_proc_group
chmod 0220 /proc/vendor_sched/groups/sf/set_proc_group
chmod 0220 /proc/vendor_sched/groups/dex2oat/set_proc_group
chmod 0220 /proc/vendor_sched/groups/cam_power/set_proc_group
chmod 0220 /proc/vendor_sched/groups/ota/set_proc_group
chmod 0220 /proc/vendor_sched/prefer_idle_set
chmod 0220 /proc/vendor_sched/prefer_idle_clear
chmod 0660 /proc/vendor_sched/pmu_poll_enable
chmod 0220 /proc/vendor_sched/pmu_poll_time
chmod 0220 /proc/vendor_sched/uclamp_fork_reset_clear
chmod 0220 /proc/vendor_sched/uclamp_fork_reset_set
start vendor.keymaster-3-0
# Change permission of sched qos nodes
chown system system /proc/vendor_sched/sched_qos/adpf_set
chown system system /proc/vendor_sched/sched_qos/adpf_clear
chown system system /proc/vendor_sched/sched_qos/auto_uclamp_max_set
chown system system /proc/vendor_sched/sched_qos/auto_uclamp_max_clear
chown system system /proc/vendor_sched/sched_qos/boost_prio_set
chown system system /proc/vendor_sched/sched_qos/boost_prio_clear
chown system system /proc/vendor_sched/sched_qos/preempt_wakeup_set
chown system system /proc/vendor_sched/sched_qos/preempt_wakeup_clear
chown system system /proc/vendor_sched/sched_qos/prefer_fit_set
chown system system /proc/vendor_sched/sched_qos/prefer_fit_clear
chown system system /proc/vendor_sched/sched_qos/prefer_high_cap_set
chown system system /proc/vendor_sched/sched_qos/prefer_high_cap_clear
chown system system /proc/vendor_sched/sched_qos/prefer_idle_set
chown system system /proc/vendor_sched/sched_qos/prefer_idle_clear
chown system system /proc/vendor_sched/sched_qos/rampup_multiplier_set
chown system system /proc/vendor_sched/sched_qos/rampup_multiplier_clear
chmod 0220 /proc/vendor_sched/sched_qos/adpf_set
chmod 0220 /proc/vendor_sched/sched_qos/adpf_clear
chmod 0220 /proc/vendor_sched/sched_qos/auto_uclamp_max_set
chmod 0220 /proc/vendor_sched/sched_qos/auto_uclamp_max_clear
chmod 0220 /proc/vendor_sched/sched_qos/boost_prio_set
chmod 0220 /proc/vendor_sched/sched_qos/boost_prio_clear
chmod 0220 /proc/vendor_sched/sched_qos/preempt_wakeup_set
chmod 0220 /proc/vendor_sched/sched_qos/preempt_wakeup_clear
chmod 0220 /proc/vendor_sched/sched_qos/prefer_fit_set
chmod 0220 /proc/vendor_sched/sched_qos/prefer_fit_clear
chmod 0220 /proc/vendor_sched/sched_qos/prefer_high_cap_set
chmod 0220 /proc/vendor_sched/sched_qos/prefer_high_cap_clear
chmod 0220 /proc/vendor_sched/sched_qos/prefer_idle_set
chmod 0220 /proc/vendor_sched/sched_qos/prefer_idle_clear
chmod 0220 /proc/vendor_sched/sched_qos/rampup_multiplier_set
chmod 0220 /proc/vendor_sched/sched_qos/rampup_multiplier_clear
# Enable sched_qos for some groups
write /proc/vendor_sched/groups/ta/qos_adpf_enable 1
write /proc/vendor_sched/groups/ta/qos_auto_uclamp_max_enable 1
write /proc/vendor_sched/groups/ta/qos_boost_prio_enable 1
write /proc/vendor_sched/groups/ta/qos_preempt_wakeup_enable 1
write /proc/vendor_sched/groups/ta/qos_prefer_fit_enable 1
write /proc/vendor_sched/groups/ta/qos_prefer_high_cap_enable 1
write /proc/vendor_sched/groups/ta/qos_prefer_idle_enable 1
write /proc/vendor_sched/groups/ta/qos_rampup_multiplier_enable 1
write /proc/vendor_sched/groups/fg/qos_adpf_enable 1
write /proc/vendor_sched/groups/fg/qos_auto_uclamp_max_enable 1
write /proc/vendor_sched/groups/fg/qos_boost_prio_enable 1
write /proc/vendor_sched/groups/fg/qos_preempt_wakeup_enable 1
write /proc/vendor_sched/groups/fg/qos_prefer_fit_enable 1
write /proc/vendor_sched/groups/fg/qos_prefer_high_cap_enable 1
write /proc/vendor_sched/groups/fg/qos_prefer_idle_enable 1
write /proc/vendor_sched/groups/fg/qos_rampup_multiplier_enable 1
write /proc/vendor_sched/groups/fg_wi/qos_adpf_enable 1
write /proc/vendor_sched/groups/fg_wi/qos_auto_uclamp_max_enable 1
write /proc/vendor_sched/groups/fg_wi/qos_boost_prio_enable 1
write /proc/vendor_sched/groups/fg_wi/qos_preempt_wakeup_enable 1
write /proc/vendor_sched/groups/fg_wi/qos_prefer_fit_enable 1
write /proc/vendor_sched/groups/fg_wi/qos_prefer_high_cap_enable 1
write /proc/vendor_sched/groups/fg_wi/qos_prefer_idle_enable 1
write /proc/vendor_sched/groups/fg_wi/qos_rampup_multiplier_enable 1
write /proc/vendor_sched/groups/cam/qos_adpf_enable 1
write /proc/vendor_sched/groups/cam/qos_auto_uclamp_max_enable 1
write /proc/vendor_sched/groups/cam/qos_prefer_fit_enable 1
write /proc/vendor_sched/groups/cam/qos_prefer_high_cap_enable 1
write /proc/vendor_sched/groups/cam/qos_prefer_idle_enable 1
write /proc/vendor_sched/groups/cam/qos_rampup_multiplier_enable 1
write /proc/vendor_sched/groups/cam_power/qos_adpf_enable 1
write /proc/vendor_sched/groups/cam_power/qos_auto_uclamp_max_enable 1
write /proc/vendor_sched/groups/cam_power/qos_prefer_fit_enable 1
write /proc/vendor_sched/groups/cam_power/qos_prefer_high_cap_enable 1
write /proc/vendor_sched/groups/cam_power/qos_prefer_idle_enable 1
write /proc/vendor_sched/groups/cam_power/qos_rampup_multiplier_enable 1
write /proc/vendor_sched/groups/rt/qos_adpf_enable 1
write /proc/vendor_sched/groups/rt/qos_rampup_multiplier_enable 1
write /proc/vendor_sched/groups/sf/qos_adpf_enable 1
write /proc/vendor_sched/groups/sf/qos_rampup_multiplier_enable 1
# ZRAM setup
write /sys/block/zram0/comp_algorithm lz77eh
write /proc/sys/vm/page-cluster 0
@@ -242,15 +104,6 @@ on init
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu6_memlat@17000010/memlat_cpuidle_state_aware 2
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/memlat_cpuidle_state_aware 2
# RT uclamp setting
write /proc/sys/kernel/sched_util_clamp_min_rt_default 0
# change permissions and default values for camera-daemon cpu controller
chown system system /dev/cpuctl/camera-daemon/cpu.uclamp.min
chown system system /dev/cpuctl/camera-daemon/cpu.uclamp.max
chown root root /dev/cpuctl/camera-daemon/cpu.uclamp.latency_sensitive
chown system system /dev/cpuctl/camera-daemon/cgroup.procs
mkdir /dev/cpuset/camera-daemon-high-group
write /dev/cpuset/camera-daemon-high-group/cpus 0-7
write /dev/cpuset/camera-daemon-high-group/mems 0
@@ -269,11 +122,6 @@ on init
chown system system /dev/cpuset/camera-daemon-mid-high-group/tasks
chmod 0664 /dev/cpuset/camera-daemon-mid-high-group/tasks
write /proc/vendor_sched/groups/cam/prefer_idle 1
write /proc/vendor_sched/groups/cam/uclamp_min 1
chown system system /dev/cpuset/cgroup.procs
# nanohub sensor
chmod 0664 /dev/nanohub
chmod 0664 /dev/nanohub_comms
@@ -389,10 +237,6 @@ on init
# Power Stats HAL
chown system system /dev/bbd_pwrstat
# Add a boost for NNAPI HAL
write /proc/vendor_sched/groups/nnapi/prefer_idle 0
write /proc/vendor_sched/groups/nnapi/uclamp_min 512
# Add memlat governor settings
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/polling_interval 10
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu1_memlat@17000010/polling_interval 10
@@ -767,33 +611,13 @@ on property:sys.boot_completed=1
# Setup final cpuset
write /dev/cpuset/top-app/cpus ${persist.device_config.vendor_system_native.top-app_cpuset:-0-7}
write /dev/cpuset/foreground/cpus ${persist.device_config.vendor_system_native.foreground_cpuset:-0-3,4-5}
write /dev/cpuset/foreground_window/cpus ${persist.device_config.vendor_system_native.foreground_window_cpuset:-0-3,4-5}
write /dev/cpuset/background/cpus ${persist.device_config.vendor_system_native.background_cpuset:-0-3}
write /dev/cpuset/system-background/cpus ${persist.device_config.vendor_system_native.system-background_cpuset:-0-3}
write /dev/cpuset/restricted/cpus ${persist.device_config.vendor_system_native.restricted_cpuset:-0-3}
write /dev/cpuset/camera-daemon/cpus ${persist.device_config.vendor_system_native.camera-daemon_cpuset:-0-7}
setprop vendor.powerhal.init 1
# Setup scheduler parameters
write /proc/vendor_sched/min_granularity_ns 1000000
write /proc/vendor_sched/latency_ns 8000000
write /proc/vendor_sched/max_load_balance_interval 1
write /proc/vendor_sched/enable_hrtick 1
# Setup final cpu.uclamp
write /proc/vendor_sched/groups/ta/uclamp_min 1
write /proc/vendor_sched/groups/fg/uclamp_min 0
write /proc/vendor_sched/groups/sys/prefer_idle 0
# Set ug group
write /proc/vendor_sched/groups/bg/ug 0
write /proc/vendor_sched/groups/sys_bg/ug 0
write /proc/vendor_sched/groups/ota/ug 0
write /proc/vendor_sched/groups/dex2oat/ug 1
write /proc/vendor_sched/groups/ta/ug 1
# Set bg group throttle
write /proc/vendor_sched/ug_bg_group_throttle ${persist.device_config.vendor_system_native.ug_bg_group_throttle:-308}
# Set uclamp.max for some groups, which could indicate cpu importance used in scheduling
write /proc/vendor_sched/groups/bg/uclamp_max 512
write /proc/vendor_sched/groups/sys_bg/uclamp_max 512
@@ -812,24 +636,6 @@ on property:sys.boot_completed=1
write /sys/devices/system/cpu/cpufreq/policy6/sched_pixel/limit_frequency 2507000
write /proc/vendor_sched/pmu_poll_time 10
# Disable PMU freq limit
write /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/pmu_limit_enable 1
write /sys/devices/system/cpu/cpufreq/policy4/sched_pixel/pmu_limit_enable 1
write /sys/devices/system/cpu/cpufreq/policy6/sched_pixel/pmu_limit_enable 1
write /proc/vendor_sched/pmu_poll_enable 0
# Setup cpu.shares to throttle background groups (bg ~ 5% sysbg ~ 5% dex2oat ~2.5%)
write /dev/cpuctl/background/cpu.shares 1024
write /dev/cpuctl/system-background/cpu.shares 1024
write /dev/cpuctl/dex2oat/cpu.shares 512
write /dev/cpuctl/system/cpu.shares 20480
# We only have system and background groups holding tasks and the groups below are empty
write /dev/cpuctl/camera-daemon/cpu.shares 20480
write /dev/cpuctl/foreground/cpu.shares 20480
write /dev/cpuctl/nnapi-hal/cpu.shares 20480
write /dev/cpuctl/rt/cpu.shares 20480
write /dev/cpuctl/top-app/cpu.shares 20480
# gvotables for dumpstate
chown system system /sys/kernel/debug/gvotables
@@ -873,6 +679,7 @@ service init_display /vendor/bin/init.display.sh
group root system
disabled
oneshot
file /dev/kmsg w
# bugreport is triggered by holding down volume down, volume up and power
service bugreport /system/bin/dumpstate -d -p -z
@@ -1008,6 +815,8 @@ on property:persist.device_config.vendor_system_native.top-app_cpuset=*
write /dev/cpuset/top-app/cpus ${persist.device_config.vendor_system_native.top-app_cpuset:-0-7}
on property:persist.device_config.vendor_system_native.foreground_cpuset=*
write /dev/cpuset/foreground/cpus ${persist.device_config.vendor_system_native.foreground_cpuset:-0-3,4-5}
on property:persist.device_config.vendor_system_native.foreground_window_cpuset=*
write /dev/cpuset/foreground/cpus ${persist.device_config.vendor_system_native.foreground_window_cpuset:-0-3,4-5}
on property:persist.device_config.vendor_system_native.background_cpuset=*
write /dev/cpuset/background/cpus ${persist.device_config.vendor_system_native.background_cpuset:-0-3}
on property:persist.device_config.vendor_system_native.system-background_cpuset=*
@@ -1020,3 +829,14 @@ on property:persist.device_config.vendor_system_native.camera-daemon_cpuset=*
# Set esim property for LPA
on property:persist.vendor.modem.esim_profiles_exist=*
setprop persist.modem.esim_profiles_exist ${persist.vendor.modem.esim_profiles_exist}
# Battery health
on property:persist.vendor.pulsar.opt_out=1
write /sys/class/power_supply/battery/aacp_opt_out 1
on property:persist.vendor.pulsar.opt_out=0
write /sys/class/power_supply/battery/aacp_opt_out 0
# NFC
on post-fs-data
mkdir /data/vendor/nfc 0770 nfc nfc

View File

@@ -75,7 +75,7 @@ on early-boot
mkdir /config/usb_gadget/g1/functions/uvc.0
write /config/usb_gadget/g1/functions/uvc.0/function_name "Android Webcam"
write /config/usb_gadget/g1/functions/uvc.0/streaming_maxpacket 3072
# write /config/usb_gadget/g1/functions/uvc.0/streaming_maxburst 5
write /config/usb_gadget/g1/functions/uvc.0/streaming_maxburst 1
# write /config/usb_gadget/g1/functions/uvc.0/streaming_interval 2
# setup control params
mkdir /config/usb_gadget/g1/functions/uvc.0/control/header/h

View File

@@ -14,9 +14,6 @@
# limitations under the License.
#
ifneq ($(BOARD_WITHOUT_RADIO),true)
-include vendor/google_devices/gs101/proprietary/telephony/device-vendor.mk
endif
include device/google/gs101/device.mk
ifneq ($(BOARD_WITHOUT_RADIO),true)

221
device.mk
View File

@@ -26,7 +26,7 @@ include device/google/gs-common/thermal/thermal_hal/device.mk
include device/google/gs-common/pixel_metrics/pixel_metrics.mk
include device/google/gs-common/performance/perf.mk
include device/google/gs-common/power/power.mk
include device/google/gs-common/display/dump.mk
include device/google/gs-common/display/dump_exynos_display.mk
include device/google/gs101/dumpstate/item.mk
include device/google/gs-common/radio/dump.mk
include device/google/gs-common/gear/dumpstate/aidl.mk
@@ -35,13 +35,11 @@ include device/google/gs-common/gps/dump/log.mk
include device/google/gs-common/widevine/widevine.mk
include device/google/gs-common/sota_app/factoryota.mk
include device/google/gs-common/misc_writer/misc_writer.mk
include device/google/gs-common/gyotaku_app/gyotaku.mk
include device/google/gs-common/bootctrl/bootctrl_aidl.mk
include device/google/gs-common/betterbug/betterbug.mk
ifneq ($(filter oriole raven bluejay, $(TARGET_PRODUCT)),)
include device/google/gs-common/bcmbt/dump/dumplog.mk
endif
include device/google/gs-common/bcmbt/dump/dumplog.mk
include device/google/gs-common/fingerprint/fingerprint.mk
include device/google/gs-common/nfc/nfc.mk
TARGET_BOARD_PLATFORM := gs101
DEVICE_IS_64BIT_ONLY ?= $(if $(filter %_64,$(TARGET_PRODUCT)),true,false)
@@ -57,71 +55,24 @@ AB_OTA_POSTINSTALL_CONFIG += \
POSTINSTALL_OPTIONAL_system=true
# Set Vendor SPL to match platform
VENDOR_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH)
VENDOR_SECURITY_PATCH := 2025-08-05
# Set boot SPL
BOOT_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH)
BOOT_SECURITY_PATCH := 2025-08-05
PRODUCT_SOONG_NAMESPACES += \
hardware/google/av \
hardware/google/gchips \
hardware/google/graphics/common \
hardware/google/gchips/gralloc4 \
hardware/google/graphics/gs101 \
hardware/google/interfaces \
hardware/google/pixel \
device/google/gs101 \
device/google/gs101/powerstats \
vendor/google_devices/common/chre/host/hal \
vendor/google/whitechapel/tools \
vendor/google/camera \
vendor/google/interfaces \
vendor/google_nos/host/android \
vendor/google_nos/test/system-test-harness
LOCAL_KERNEL := $(TARGET_KERNEL_DIR)/Image.lz4
device/google/gs101/powerstats
# OEM Unlock reporting
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
ro.oem_unlock_supported=1
ifneq ($(BOARD_WITHOUT_RADIO),true)
# Include vendor telephony soong namespace
PRODUCT_SOONG_NAMESPACES += \
vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY)
endif
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
#Set IKE logs to verbose for WFC
PRODUCT_PROPERTY_OVERRIDES += log.tag.IKE=VERBOSE
#Set Shannon IMS logs to debug
PRODUCT_PROPERTY_OVERRIDES += log.tag.SHANNON_IMS=DEBUG
#Set Shannon QNS logs to debug
PRODUCT_PROPERTY_OVERRIDES += log.tag.ShannonQNS=DEBUG
PRODUCT_PROPERTY_OVERRIDES += log.tag.ShannonQNS-ims=DEBUG
PRODUCT_PROPERTY_OVERRIDES += log.tag.ShannonQNS-emergency=DEBUG
PRODUCT_PROPERTY_OVERRIDES += log.tag.ShannonQNS-mms=DEBUG
PRODUCT_PROPERTY_OVERRIDES += log.tag.ShannonQNS-xcap=DEBUG
PRODUCT_PROPERTY_OVERRIDES += log.tag.ShannonQNS-HC=DEBUG
# Modem userdebug
include device/google/gs101/modem/userdebug.mk
endif
include device/google/gs101/modem/user.mk
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
# b/36703476: Set default log size to 1M
PRODUCT_PROPERTY_OVERRIDES += \
ro.logd.size=1M
# b/114766334: persist all logs by default rotating on 30 files of 1MiB
PRODUCT_PROPERTY_OVERRIDES += \
logd.logpersistd=logcatd \
logd.logpersistd.size=30
endif
# From system.property
PRODUCT_PROPERTY_OVERRIDES += \
ro.telephony.default_network=27 \
@@ -184,7 +135,6 @@ USE_LASSEN_OEMHOOK := true
# The "power-anomaly-sitril" is added into PRODUCT_SOONG_NAMESPACES when
# $(USE_LASSEN_OEMHOOK) is true and $(BOARD_WITHOUT_RADIO) is not true.
ifneq ($(BOARD_WITHOUT_RADIO),true)
PRODUCT_SOONG_NAMESPACES += vendor/google/tools/power-anomaly-sitril
$(call soong_config_set,sitril,use_lassen_oemhook_with_radio,true)
endif
@@ -209,9 +159,6 @@ USE_SWIFTSHADER := false
# HWUI
TARGET_USES_VULKAN = true
PRODUCT_SOONG_NAMESPACES += \
vendor/arm/mali/gs101
# Used in gfx_tools when defining tests with composer2 interface for gs101 devices
$(call soong_config_set,gfx_tools,use_hwc2,true)
@@ -257,8 +204,8 @@ PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.vulkan.version-1_3.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \
frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.xml \
frameworks/native/data/etc/android.software.vulkan.deqp.level-2024-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \
frameworks/native/data/etc/android.software.opengles.deqp.level-2024-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml
frameworks/native/data/etc/android.software.vulkan.deqp.level-2025-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \
frameworks/native/data/etc/android.software.opengles.deqp.level-2025-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml
ifeq ($(USE_SWIFTSHADER),true)
PRODUCT_VENDOR_PROPERTIES += \
@@ -314,18 +261,12 @@ PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE := true
# Init files
PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel \
device/google/gs101/conf/init.gs101.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.gs101.usb.rc \
device/google/gs101/conf/ueventd.gs101.rc:$(TARGET_COPY_OUT_VENDOR)/etc/ueventd.rc
PRODUCT_COPY_FILES += \
device/google/gs101/conf/init.gs101.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.gs101.rc
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_COPY_FILES += \
device/google/gs101/conf/init.debug.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.debug.rc
endif
ifneq (,$(filter 5.%, $(TARGET_LINUX_KERNEL_VERSION)))
PRODUCT_COPY_FILES += \
device/google/gs101/storage/5.10/init.gs101.storage.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.gs101.storage.rc
@@ -372,14 +313,6 @@ PRODUCT_PACKAGES += \
messaging
# CHRE
## tools
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_PACKAGES += \
chre_power_test_client \
chre_test_client \
chre_aidl_hal_client
endif
## HAL
include device/google/gs-common/chre/hal.mk
PRODUCT_COPY_FILES += \
@@ -398,13 +331,8 @@ PRODUCT_PACKAGES += \
checkpoint_gc
# Vendor verbose logging default property
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.verbose_logging_enabled=true
else
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.verbose_logging_enabled=false
endif
# CP Logging properties
PRODUCT_PROPERTY_OVERRIDES += \
@@ -416,13 +344,8 @@ PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.sys.modem.logging.enable=true
# Enable silent CP crash handling
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.ril.crash_handling_mode=1
else
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.ril.crash_handling_mode=2
endif
# Add support dual SIM mode
PRODUCT_PROPERTY_OVERRIDES += \
@@ -476,12 +399,6 @@ PRODUCT_PACKAGES += \
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml
# default usb debug functions
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.usb.usbradio.config=dm
endif
# Power HAL
PRODUCT_COPY_FILES += \
device/google/gs101/task_profiles.json:$(TARGET_COPY_OUT_VENDOR)/etc/task_profiles.json
@@ -570,12 +487,6 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
ConnectivityOverlay
PRODUCT_PACKAGES_ENG += \
f2fs_io \
check_f2fs \
f2fs.fibmap \
dump.f2fs
# Storage dump
include device/google/gs-common/storage/storage.mk
@@ -664,10 +575,6 @@ PRODUCT_PACKAGES += \
libdisplaycolor \
hwcomposer.$(TARGET_BOARD_PLATFORM)
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_PACKAGES += displaycolor_service
endif
PRODUCT_PROPERTY_OVERRIDES += \
debug.sf.disable_backpressure=0 \
debug.sf.enable_gl_backpressure=1
@@ -741,11 +648,6 @@ PRODUCT_PACKAGES += wpa_supplicant.conf
WIFI_PRIV_CMD_UPDATE_MBO_CELL_STATUS := enabled
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_PACKAGES += wpa_cli
PRODUCT_PACKAGES += hostapd_cli
endif
####################################
## VIDEO
####################################
@@ -814,15 +716,9 @@ ifeq (,$(filter tangor citron,$(subst _, ,$(TARGET_PRODUCT))))
include device/google/gs-common/gps/brcm/device.mk
PRODUCT_COPY_FILES += \
device/google/gs101/location/gps.cer:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.cer
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_COPY_FILES += \
device/google/gs101/location/lhd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \
device/google/gs101/location/scd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf
else
PRODUCT_COPY_FILES += \
device/google/gs101/location/lhd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \
device/google/gs101/location/scd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf
endif
PRODUCT_COPY_FILES += \
device/google/gs101/location/lhd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \
device/google/gs101/location/scd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf
endif
# Trusty (KM, GK, Storage)
$(call inherit-product, system/core/trusty/trusty-storage.mk)
@@ -831,11 +727,6 @@ $(call inherit-product, system/core/trusty/trusty-base.mk)
# Trusty dump
include device/google/gs-common/trusty/trusty.mk
# Trusty unit test tool
PRODUCT_PACKAGES_ENG += \
trusty-ut-ctrl \
tipc-test
include device/google/gs101/trusty_metricsd/trusty_metricsd.mk
PRODUCT_PACKAGES += \
@@ -847,15 +738,9 @@ PRODUCT_PROPERTY_OVERRIDES += \
ro.frp.pst=/dev/block/by-name/frp
# System props to enable Bluetooth Quality Report (BQR) feature
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_PRODUCT_PROPERTIES += \
persist.bluetooth.bqr.event_mask=262174 \
persist.bluetooth.bqr.min_interval_ms=500
else
PRODUCT_PRODUCT_PROPERTIES += \
persist.bluetooth.bqr.event_mask=30 \
persist.bluetooth.bqr.min_interval_ms=500
endif
# Enable Bluetooth AutoOn feature
PRODUCT_PRODUCT_PROPERTIES += \
@@ -891,12 +776,6 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
Iwlan
#Iwlan test app for eng builds
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_PACKAGES += \
IwlanTestApp
endif
PRODUCT_PACKAGES += \
whitelist \
libstagefright_hdcp \
@@ -910,16 +789,8 @@ PRODUCT_PACKAGES += \
vts.bin
ifneq ($(BOARD_WITHOUT_RADIO),true)
# This will be called only if IMSService is building with source code for dev branches.
$(call inherit-product-if-exists, vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY)/shannon-ims/device-vendor.mk)
PRODUCT_PACKAGES += ShannonIms
$(call inherit-product-if-exists, vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY)/shannon-iwlan/device-vendor.mk)
PRODUCT_PACKAGES_ENG += \
preinstalled-packages-product-gs101-device-debug.xml
PRODUCT_PACKAGES += ShannonRcs
endif
@@ -935,22 +806,12 @@ USE_RADIO_HAL_1_6 := true
# Support SecureElement HAL for HIDL
USE_SE_HIDL := true
#$(call inherit-product, vendor/google_devices/telephony/common/device-vendor.mk)
#$(call inherit-product, vendor/google_devices/gs101/proprietary/device-vendor.mk)
ifneq ($(BOARD_WITHOUT_RADIO),true)
$(call inherit-product-if-exists, vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY)/common/device-vendor.mk)
endif
ifeq ($(DEVICE_IS_64BIT_ONLY),true)
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk)
else
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
endif
#$(call inherit-product, hardware/google_devices/exynos5/exynos5.mk)
#$(call inherit-product-if-exists, hardware/google_devices/gs101/gs101.mk)
#$(call inherit-product-if-exists, vendor/google_devices/common/exynos-vendor.mk)
#$(call inherit-product-if-exists, hardware/broadcom/wlan/bcmdhd/firmware/bcm4375/device-bcm.mk)
include device/google/gs-common/sensors/sensors.mk
$(call soong_config_set,usf,target_soc,gs101)
@@ -985,13 +846,6 @@ PRODUCT_COPY_FILES += \
PRODUCT_COPY_FILES += \
device/google/gs101/radio/gnss_blanking.csv:$(TARGET_COPY_OUT_VENDOR)/etc/modem/gnss_blanking.csv
# Vibrator Diag
PRODUCT_PACKAGES_ENG += \
diag-vibrator \
diag-vibrator-cs40l25a \
diag-vibrator-drv2624 \
$(NULL)
PRODUCT_PACKAGES += \
android.hardware.health-service.gs101 \
android.hardware.health-service.gs101_recovery \
@@ -1001,9 +855,6 @@ PRODUCT_PACKAGES += \
include device/google/gs-common/audio/hidl_gs101.mk
## AoC soong
PRODUCT_SOONG_NAMESPACES += \
vendor/google/whitechapel/aoc
$(call soong_config_set,aoc,target_soc,$(TARGET_BOARD_PLATFORM))
$(call soong_config_set,aoc,target_product,$(TARGET_PRODUCT))
@@ -1025,22 +876,6 @@ PRODUCT_PROPERTY_OVERRIDES += \
PRODUCT_PACKAGES += vndservicemanager
PRODUCT_PACKAGES += vndservice
# TinyTools, debug tool and cs35l41 speaker calibration tool for Audio
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_PACKAGES += \
tinyplay \
tinycap \
tinymix \
tinypcminfo \
tinyhostless \
cplay \
aoc_hal \
aoc_tuning_inft \
crus_sp_cal \
mahal_test \
ma_aoc_tuning_test
endif
PRODUCT_PACKAGES += \
google.hardware.media.c2@1.0-service \
libgc2_store \
@@ -1050,6 +885,9 @@ PRODUCT_PACKAGES += \
libgc2_cwl \
libgc2_utils
## Start packet router
include device/google/gs-common/telephony/pktrouter.mk
# Thermal HAL
PRODUCT_PROPERTY_OVERRIDES += persist.vendor.enable.thermal.genl=true
@@ -1057,16 +895,7 @@ PRODUCT_PROPERTY_OVERRIDES += persist.vendor.enable.thermal.genl=true
include device/google/gs-common/edgetpu/edgetpu.mk
# Config variables for TPU chip on device.
$(call soong_config_set,edgetpu_config,chip,abrolhos)
# Include the edgetpu targets defined the namespaces below into the final image.
PRODUCT_SOONG_NAMESPACES += \
vendor/google_devices/gs101/proprietary/gchips/tpu/metrics \
vendor/google_devices/gs101/proprietary/gchips/tpu/tflite_delegate \
vendor/google_devices/gs101/proprietary/gchips/tpu/darwinn_logging_service \
vendor/google_devices/gs101/proprietary/gchips/tpu/nnapi_stable_aidl \
vendor/google_devices/gs101/proprietary/gchips/tpu/aidl \
vendor/google_devices/gs101/proprietary/gchips/tpu/hal \
vendor/google_devices/gs101/proprietary/gchips/tpu/tachyon/tachyon_apis \
vendor/google_devices/gs101/proprietary/gchips/tpu/tachyon/service
# TPU firmware
PRODUCT_PACKAGES += edgetpu-abrolhos.fw
@@ -1126,29 +955,11 @@ endif
# Wifi ext
include hardware/google/pixel/wifi_ext/device.mk
# Battery Stats Viewer
PRODUCT_PACKAGES_ENG += BatteryStatsViewer
# Install product specific framework compatibility matrix
# (TODO: b/169535506) This includes the FCM for system_ext and product partition.
# It must be split into the FCM of each partition.
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs101/device_framework_matrix_product.xml
# Preopt SystemUI
ifneq ($(RELEASE_SYSTEMUI_USE_SPEED_PROFILE), true)
PRODUCT_DEXPREOPT_SPEED_APPS += SystemUIGoogle # For internal
PRODUCT_DEXPREOPT_SPEED_APPS += SystemUI # For AOSP
endif
# Set on-device compilation mode for SystemUI.
ifeq ($(RELEASE_SYSTEMUI_USE_SPEED_PROFILE), true)
PRODUCT_PROPERTY_OVERRIDES += \
dalvik.vm.systemuicompilerfilter=speed-profile
else
PRODUCT_PROPERTY_OVERRIDES += \
dalvik.vm.systemuicompilerfilter=speed
endif
# Keymaster configuration
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.device_id_attestation.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_id_attestation.xml \

View File

@@ -78,7 +78,7 @@
</hal>
<hal format="aidl" optional="true">
<name>com.google.hardware.pixel.display</name>
<version>13</version>
<version>13-15</version>
<interface>
<name>IDisplay</name>
<instance>default</instance>

View File

@@ -1,10 +0,0 @@
aaronding@google.com
rurumihong@google.com
adamshih@google.com
wilsonsung@google.com
lucaswei@google.com
cyanhsieh@google.com
rogerliao@google.com
cyuanjen@google.com
robinpeng@google.com
pattjin@google.com

View File

@@ -5,7 +5,7 @@
#
# PixelParts
include packages/apps/PixelParts/device.mk
#include packages/apps/PixelParts/device.mk
# UDFPS
TARGET_HAS_UDFPS += true

View File

@@ -1,15 +0,0 @@
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "//device/google/gs101:device_google_gs101_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: [
"//device/google/gs101:device_google_gs101_license",
],
}
runtime_resource_overlay {
name: "FactoryOverlayFrameworkRes",
product_specific: true,
}

View File

@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Pixel specific factory overlays -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.frameworkres.overlay.factory">
<application android:hasCode="false" />
<overlay
android:targetPackage="android"
android:isStatic="true"
android:priority="2"/>
</manifest>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -1,15 +0,0 @@
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "//device/google/gs101:device_google_gs101_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: [
"//device/google/gs101:device_google_gs101_license",
],
}
runtime_resource_overlay {
name: "FactoryOverlayLauncher3",
product_specific: true,
}

View File

@@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Pixel specific factory overlays -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.launcher3.overlay.factory">
<application android:hasCode="false" />
<overlay
android:targetPackage="com.android.launcher3"
android:targetName="favorites"
android:isStatic="true"
android:priority="2"/>
</manifest>

View File

@@ -1,71 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<favorites xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3">
<!-- Hotseat (We use the screen as the position of the item in the hotseat) -->
<!-- Dialer, android test tool, label barcode, battery charge tool, barcode scanner -->
<resolve
launcher:container="-101"
launcher:screen="0"
launcher:x="0"
launcher:y="0" >
<favorite launcher:uri="#Intent;action=android.intent.action.DIAL;end" />
<favorite launcher:uri="tel:123" />
<favorite launcher:uri="#Intent;action=android.intent.action.CALL_BUTTON;end" />
</resolve>
<resolve
launcher:container="-101"
launcher:screen="1"
launcher:x="1"
launcher:y="0" >
<favorite
launcher:packageName="com.google_npi.androidtesttool"
launcher:className="com.google_npi.androidtesttool.MainActivity" />
</resolve>
<resolve
launcher:container="-101"
launcher:screen="2"
launcher:x="2"
launcher:y="0" >
<favorite
launcher:packageName="com.google_cte.labelbarcode"
launcher:className="com.google_cte.labelbarcode.LabelBarcodeMainActivity" />
</resolve>
<resolve
launcher:container="-101"
launcher:screen="3"
launcher:x="3"
launcher:y="0" >
<favorite
launcher:packageName="com.google.batterychargetool"
launcher:className="com.google.batterychargetool.MainActivity" />
</resolve>
<resolve
launcher:container="-101"
launcher:screen="4"
launcher:x="4"
launcher:y="0" >
<favorite
launcher:packageName="com.google_cte.barcodescanner"
launcher:className="com.google_cte.barcodescanner.MainActivity" />
</resolve>
</favorites>

View File

@@ -1,15 +0,0 @@
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "//device/google/gs101:device_google_gs101_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: [
"//device/google/gs101:device_google_gs101_license",
],
}
runtime_resource_overlay {
name: "FactoryOverlaySettings",
product_specific: true,
}

View File

@@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Pixel specific factory overlays -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.providers.settings.overlay.factory">
<application android:hasCode="false" />
<overlay
android:targetPackage="com.android.providers.settings"
android:targetName="resources"
android:isStatic="true"
android:priority="2"/>
</manifest>

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
* Copyright (c) 2009, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<resources>
<integer name="def_lockscreen_sounds_enabled">0</integer>
<bool name="def_lockscreen_disabled">true</bool>
<bool name="def_dtmf_tones_enabled">false</bool>
<bool name="def_sound_effects_enabled">false</bool>
<bool name="def_charging_sounds_enabled">false</bool>
<string name="def_immersive_mode_confirmations" translatable="false">confirmed</string>
</resources>

View File

@@ -1,82 +0,0 @@
#
# Copyright 2020 The Android Open-Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
$(call inherit-product, device/google/gs101/aosp_common.mk)
$(call inherit-product-if-exists, vendor/google_devices/gs101/factory/pixel/device-factory.mk)
PRODUCT_PROPERTY_OVERRIDES += service.adb.root=1 \
ro.vendor.factory=1 \
ro.adb.secure=0
# Factory Libraries of Audio
PRODUCT_PACKAGES += audioroute libaudioroutelite
# Enable fatp by default for factory builds
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
persist.vendor.camera.fatp.enable=1
# Disable camera related features for factory builds
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.camera.partial_result_count=1 \
vendor.camera.debug.bypass_face_ssd_processor=1 \
vendor.camera.debug.enable_face_detection=0 \
vendor.camera.debug.force_dpm_on=0 \
vendor.camera.debug.force_eis_on=0 \
vendor.camera.debug.force_eaf_on=0 \
vendor.camera.debug.force_local_tone_mapping_on=0 \
vendor.camera.debug.force_mesh_warp_on=0 \
vendor.camera.debug.force_rectiface_node_on=0 \
vendor.camera.debug.force_steadiface_on=0 \
vendor.camera.debug.force_tnr_on=0 \
vendor.camera.debug.local_tone_mapping_controller_v1.mode=0 \
vendor.camera.debug.force_segmentation_node_on=0 \
vendor.camera.debug.enable_saliency=0
# Disable ScreenDecorations for factory builds
PRODUCT_PROPERTY_OVERRIDES += \
debug.disable_screen_decorations=true
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_idle_timer_ms=80
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_touch_timer_ms=200
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_display_power_timer_ms=1000
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.use_content_detection_for_refresh_rate=true
# factory should always has SELinux permissive
BOARD_BOOTCONFIG += androidboot.selinux=permissive
BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
# Disable Bluetooth as default in factory build
DEVICE_PACKAGE_OVERLAYS += device/google/gs101/overlay-factory
PRODUCT_COPY_FILES += \
device/google/gs101/conf/init.factory.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.factory.rc
# Add factory-friendly changes
PRODUCT_PACKAGES += \
FactoryOverlaySettings \
FactoryOverlayLauncher3 \
FactoryOverlayFrameworkRes
# Disable DebugFS restrictions in factory builds
PRODUCT_SET_DEBUGFS_RESTRICTIONS := false
# PixelLogger for RF testing
PRODUCT_PACKAGES_ENG += \
PixelLogger
# Tool for installing Widevine keybox
PRODUCT_PACKAGES_ENG += \
WvInstallKeybox

View File

@@ -1,10 +0,0 @@
<compatibility-matrix version="1.0" type="framework">
<hal format="hidl" optional="true">
<name>android.hardware.biometrics.fingerprint</name>
<version>2.1-3</version>
<interface>
<name>IBiometricsFingerprint</name>
<instance>default</instance>
</interface>
</hal>
</compatibility-matrix>

View File

@@ -1,15 +0,0 @@
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "device_google_gs101_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["device_google_gs101_license"],
}
sh_binary {
name: "fingerprint.extension.sh",
init_rc: ["init.fingerprint.extension.rc"],
src: "fingerprint.extension.sh",
system_ext_specific: true,
}

View File

@@ -1,14 +0,0 @@
# Fingerprint extension feature
ifneq (,$(filter aosp% factory%, $(TARGET_PRODUCT)))
# Skip if device is AOSP or factory build
else
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
$(call soong_config_set,fp_hal_feature,report_bug_support,true)
BOARD_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/fingerprint-extension/vendor/
SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/fingerprint-extension/system_ext/public/
SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/fingerprint-extension/system_ext/private/
PRODUCT_PACKAGES += \
fps_ext_bug_lib \
fingerprint.extension.sh
endif
endif

View File

@@ -1,63 +0,0 @@
#!/system/bin/sh
# BetterBug required fields
am='am start -a com.google.android.apps.betterbug.intent.FILE_BUG_DEEPLINK --ez EXTRA_DEEPLINK true '
issueTitle=' --es EXTRA_ISSUE_TITLE '
additionalComment=' --es EXTRA_ADDITIONAL_COMMENT '
componentId=' --el EXTRA_COMPONENT_ID '
requireBugReport=' --ez EXTRA_REQUIRE_BUGREPORT '
bugAssign=' --es EXTRA_BUG_ASSIGNEE '
ccGroup=' --es EXTRA_CC '
# BetterBug title
kAuthTitle="UDFPS Fingerprint authentication has high failed rate"
kLockoutTitle="UDFPS Fingerprint has too many lockout counts"
kLatencyTitle="UDFPS Fingerprint took long to unlock device"
# BetterBug context comment
kAuthComment="This bug is auto created by fingerprint HAL to track fingerprint authentication"
kLockoutComment="This bug is auto created by fingerprint HAL to track fingerprint lockout"
kLatencyComment="This bug is auto created by fingerprint HAL to track fingerprint latency"
# BetterBug assign & CC owner
kBugAssign='udfps_data_study@google.com'
kCcGroup='eddielan@google.com'
kComponentId='817555'
# Command to send intent to BetterBug
commonCommand="$componentId ${kComponentId//\ /\\ }
$requireBugReport true
$bugAssign ${kBugAssign//\ /\\ }
$ccGroup ${kCcGroup//\ /\\ }"
authCommand="$am $issueTitle ${kAuthTitle//\ /\\ }
$additionalComment ${kAuthComment//\ /\\ }"
lockoutCommand="$am $issueTitle ${kLockoutTitle//\ /\\ }
$additionalComment ${kLockoutComment//\ /\\ }"
latencyCommand="$am $issueTitle ${kLatencyTitle//\ /\\ }
$additionalComment ${kLatencyComment//\ /\\ }"
# Type of bug being triggered
# 1. Latency
# 2. Lockout
# 3. Finerprint authentication(FRR)
bug_type="$1"
send=1
if [ "$bug_type" == "latency" ]; then
intentCommand="$latencyCommand $commonCommand"
elif [ "$bug_type" == "lockout" ]; then
intentCommand="$lockoutCommand $commonCommand"
elif [ "$bug_type" == "auth" ]; then
intentCommand="$authCommand $commonCommand"
else
send=0
echo "Unknown bug_type $bug_type"
fi
if [ $send -eq 1 ]
then
eval $intentCommand
fi
# Exit
exit 0

View File

@@ -1,19 +0,0 @@
# init-fingerprint-extension-sh is to send intent command to app
# for tracking fingerprint issue.
service fingerprint-extension-bug-latency /system_ext/bin/fingerprint.extension.sh latency
group shell
user shell
disabled
oneshot
service fingerprint-extension-bug-lockout /system_ext/bin/fingerprint.extension.sh lockout
group shell
user shell
disabled
oneshot
service fingerprint-extension-bug-auth /system_ext/bin/fingerprint.extension.sh auth
group shell
user shell
disabled
oneshot

View File

@@ -1,28 +0,0 @@
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "device_google_gs101_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["device_google_gs101_license"],
}
cc_binary {
srcs: [
"fp_test.cpp"
],
include_dirs: [
"device/google/gs101/fingerprint/fpc1540/fp_tool"
],
name: "fp_test",
shared_libs: [
"liblog",
"libdl",
"libutils",
"libcutils",
"libhidlbase",
"android.hardware.biometrics.fingerprint@2.1"
],
proprietary:true,
}

View File

@@ -1,200 +0,0 @@
#include <stdint.h>
#include <stdio.h>
#include <log/log.h>
#include "fp_test.h"
#include <cutils/properties.h>
#define TAG "[FP_TEST] "
#define LOGI(format,...) ALOGI(TAG format,##__VA_ARGS__)
#define LOGD(format,...) ALOGD(TAG format,##__VA_ARGS__)
#define LOGE(format,...) ALOGE(TAG format,##__VA_ARGS__)
#define CLOGI(format,...) printf(TAG format,##__VA_ARGS__)
#define CLOGD(format,...) printf(TAG format,##__VA_ARGS__)
#define CLOGE(format,...) printf(TAG format,##__VA_ARGS__)
#define LOGI_BOTH(format,...) { \
ALOGI(TAG format,##__VA_ARGS__) \
prinft(TAG format, ##__VA_ARGS__) \
} \
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
#define STRING_SIZE 32
#define FPS_SRV_PROP "fps_hal"
#define FPS_SRV_FULL_PROP "init.svc.fps_hal"
#define FPS_SRV_STATUS_PROP "vendor.fp.status"
enum ErrorType {
OK,
ERROR
};
static const char* const cmdUsage[] = {
"-------fp_test tool usage--------",
"fp_test -e: Enable FPS service",
"fp_test -d: Disable FPS service",
"fp_test -i: Idle Mode",
"fp_test -n: Navigation Mode",
"fp_test -a: Authentication Mode",
"---------------------------------",
};
void toolUsage(void) {
int numCmdUsage = ARRAY_SIZE(cmdUsage);
for(int i = 0; i< numCmdUsage; i++)
CLOGI("%s\n",cmdUsage[i]);
}
int checkParameter(int num, char **strArray)
{
int ret = 0;
char parameter[STRING_SIZE] = {0,};
if (num != 2 || (strlen(strArray[1]) > STRING_SIZE)) {
return -ERROR;
}
strcpy(parameter, strArray[1]);
if (!strncmp(parameter, "-a", sizeof("-a"))) {
CLOGI("Start Authentication Mode!\n");
LOGI("Start Authentication Mode!\n");
ret = 'a';
} else if (!strncmp(parameter, "-n", sizeof("-n"))) {
CLOGI("Start Navigation Mode!\n");
LOGI("Start Navigation Mode!\n");
ret = 'n';
} else if (!strncmp(parameter, "-i", sizeof("-i"))) {
CLOGI("Start Idle Mode!\n");
LOGI("Start Idle Mode!\n");
ret = 'n';
} else if (!strncmp(parameter, "-e", sizeof("-e"))) {
CLOGI("Start enabling FPS service!\n");
LOGI("Start enabling FPS service!\n");
ret = 'e';
} else if (!strncmp(parameter, "-d", sizeof("-d"))) {
CLOGI("Start disabling FPS service!\n");
LOGI("Start disabling FPS service!\n");
ret = 'd';
} else {
ret = -ERROR;
}
return ret;
}
int enable_disable_fps(bool set)
{
int ret = 0;
// Set property to enable/disable fingerprint service
if (set == true) {
ret = property_set("ctl.start", FPS_SRV_PROP);
} else {
ret = property_set("ctl.stop", FPS_SRV_PROP);
}
if (ret != 0) {
CLOGE("Failed to %s FPS service\n", set? "enable" : "disable");
LOGE("Failed to %s FPS service\n", set? "enable" : "disable");
return -ERROR;
}
return ret;
}
int run_auth_cmd() {
RequestStatus hidlRet;
uint64_t operationId = 0;
uint32_t gid = 0;
char tempbuf[PROPERTY_VALUE_MAX];
property_get(FPS_SRV_FULL_PROP, tempbuf, 0);
LOGE("%s : current fp service status is %s!\n",__func__, tempbuf);
if (!strncmp(tempbuf, "stopped", strlen("stopped"))) {
return -ERROR;
}
sp<IBiometricsFingerprint> service = IBiometricsFingerprint::getService();
if (service == nullptr) {
CLOGE("%s : Fail to get FingerprintService!\n",__func__);
LOGE("%s : Fail to get FingerprintService!\n",__func__);
return -ERROR;
}
hidlRet = service->authenticate(operationId, gid);
if (hidlRet == RequestStatus::SYS_OK) {
return OK;
} else {
return -ERROR;
}
}
int run_cancel_cmd() {
RequestStatus hidlRet;
char tempbuf[PROPERTY_VALUE_MAX];
property_get(FPS_SRV_FULL_PROP, tempbuf, 0);
LOGE("%s : current fp service status is %s!\n",__func__, tempbuf);
if (!strncmp(tempbuf, "stopped", strlen("stopped"))) {
return -ERROR;
}
sp<IBiometricsFingerprint> service = IBiometricsFingerprint::getService();
if (service == nullptr) {
CLOGE("%s : Fail to get FingerprintService!\n",__func__);
LOGE("%s : Fail to get FingerprintService!\n",__func__);
return -ERROR;
}
hidlRet = service->cancel();
if (hidlRet == RequestStatus::SYS_OK) {
return OK;
} else {
return -ERROR;
}
}
int main(int argc, char *argv[])
{
int input=0;
int32_t ret = 0;
LOGI("%s",__func__);
input = checkParameter(argc, argv);
if (input == -ERROR){
LOGE("Invalid Parameter\n");
CLOGE("Invalid Parameter\n");
toolUsage();
return -ERROR;
}
switch (input) {
case 'e':
CLOGI("%s: Enable fingerprint service\n",__func__);
LOGI("%s: Enable fingerprint service\n",__func__);
ret = enable_disable_fps(true);
break;
case 'd':
CLOGI("%s: Disable fingerprint service\n",__func__);
LOGI("%s: Disable fingerprint service\n",__func__);
ret = enable_disable_fps(false);
break;
case 'a':
ret = run_auth_cmd();
break;
// For the rear fingerprint module, calling cancel() will go to the
// navigation mode by default.
// For other device not enabling naivgation feature, default mode will
// be "Idle" by invoking cancel().
case 'n':
case 'i':
default:
ret = run_cancel_cmd();
break;
}
if (ret != OK)
CLOGE("FP HIDL fail to excute cmd '%c'\n", input);
else
CLOGI("FP HIDL excute cmd '%c' successfully\n", input);
return ret;
}

View File

@@ -1,16 +0,0 @@
#ifndef FP_TEST
#define FP_TEST
#include <android/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprint.h>
#include <android/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprintClientCallback.h>
using android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint;
using android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprintClientCallback;
using android::hardware::biometrics::fingerprint::V2_1::RequestStatus;
using android::sp;
int main(int argc, char *argv[]);
void toolUsage(void);
#endif //FP_TEST

View File

@@ -1,18 +0,0 @@
# ----------------------------
# Add feature flags below
# ----------------------------
FPC_CONFIG_BUILD_VERSION=33_aidl
FPC_CONFIG_GOOGLE_CUSTOMIZE=1
FPC_CONFIG_MAX_NR_TEMPLATES=5
FPC_CONFIG_NAVIGATION=1
FPC_CONFIG_SENSE_TOUCH_CALIBRATION_PATH=/data/fpc/calibration_sense_touch.dat
FPC_CONFIG_SENSORTEST=1
FPC_CONFIG_TA_FS=1
FPC_DEFECTIVE_PIXEL_LIST_SIZE=5000
FPC_HAL_SHARED_LIB=1
FPC_SENSOR_SDK_LOG_LEVEL=3
FPC_TEE_RUNTIME=TRUSTY
LIBFPC_NAME=libfpc1541_S_nav_debug.a
FPC_CONFIG_DEBUG=1
FPC_CONFIG_ENGINEERING=1
FPC_CONFIG_PRODUCT_DEFAULT=FPC_PRODUCT_TYPE1541_S

View File

@@ -1,20 +0,0 @@
# ----------------------------
# Add feature flags below
# ----------------------------
FPC_CONFIG_BUILD_VERSION=33
FPC_CONFIG_CAPACITIVE=1
FPC_CONFIG_MAX_NR_TEMPLATES=5
FPC_CONFIG_NAVIGATION=0
FPC_CONFIG_SENSE_TOUCH_CALIBRATION_PATH=/data/fpc/calibration_sense_touch.dat
FPC_CONFIG_SENSORTEST=1
FPC_CONFIG_TA_FS=1
FPC_DEFECTIVE_PIXEL_LIST_SIZE=5000
FPC_SENSOR_SDK_LOG_LEVEL=3
FPC_TEE_RUNTIME=TRUSTY
LIBFPC_NAME=libfpc1541_S_nav_debug.a
FPC_CONFIG_DEBUG=1
FPC_CONFIG_ENGINEERING=1
FPC_CONFIG_PRODUCT_DEFAULT=FPC_PRODUCT_TYPE1541_S
# Google configuration
GOOGLE_CONFIG_FP_STATUS=1

View File

@@ -1,30 +0,0 @@
# Factory build, use HIDL hal & extension so that we can use Test tool
ifneq ( ,$(findstring factory, $(TARGET_PRODUCT)))
include device/google/gs101/fingerprint/fpc1540/sw33/fingerprint_hidl_config_factory.mk
PRODUCT_PACKAGES += \
android.hardware.biometrics.fingerprint@2.1-service.fpc \
fpc_tee_test\
SensorTestTool \
ImageTool \
ImageCollection \
fp_test \
PRODUCT_PACKAGES += \
com.fingerprints.extension.xml \
com.fingerprints.extension \
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
else
# Non facotry build, use fingerprint AIDL version
include device/google/gs101/fingerprint/fpc1540/sw33/fingerprint_aidl_config.mk
PRODUCT_PACKAGES += \
android.hardware.biometrics.fingerprint-service.fpc \
fingerprint.fpc \
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
endif

View File

@@ -1,26 +0,0 @@
# ----------------------------
# Add feature flags below
# ----------------------------
FPC_BUILD_ID='ff334fee0631b7d5e424e22d18287f4f'
FPC_CONFIG_BUILD_VERSION=35
FPC_CONFIG_GOOGLE_CUSTOMIZE=1
FPC_CONFIG_MAX_NR_TEMPLATES=5
FPC_CONFIG_SENSE_TOUCH_CALIBRATION_PATH=/data/fpc/calibration_sense_touch.dat
FPC_CONFIG_SENSORTEST=1
FPC_CONFIG_TA_FS=1
FPC_DEFECTIVE_PIXEL_LIST_SIZE=5000
FPC_HAL_SHARED_LIB=1
FPC_SENSOR_SDK_LOG_LEVEL=3
FPC_TEE_RUNTIME=TRUSTY
LIBFPC_NAME=libfpcmulti_debug.a
FPC_CONFIG_DEBUG=1
FPC_CONFIG_ENGINEERING=1
FPC_CONFIG_GOOGLE_CUSTOMIZE=1
GOOGLE_CONFIG_PERFORMANCE=1
# Enable Suez
$(call soong_config_set,fp_hal_feature,biometric_suez_support,true)
# Must add below method to each project's device.mk to show sensorLocation
#$(call soong_config_set,fp_hal_feature,pixel_product, project_XX)

View File

@@ -1,20 +0,0 @@
# ----------------------------
# Add feature flags below
# ----------------------------
FPC_BUILD_ID='ff334fee0631b7d5e424e22d18287f4f'
FPC_CONFIG_BUILD_VERSION=35
FPC_CONFIG_GOOGLE_CUSTOMIZE=1
FPC_CONFIG_CAPACITIVE=1
FPC_CONFIG_MAX_NR_TEMPLATES=5
FPC_CONFIG_SENSE_TOUCH_CALIBRATION_PATH=/data/fpc/calibration_sense_touch.dat
FPC_CONFIG_SENSORTEST=1
FPC_CONFIG_TA_FS=1
FPC_DEFECTIVE_PIXEL_LIST_SIZE=5000
FPC_SENSOR_SDK_LOG_LEVEL=3
FPC_TEE_RUNTIME=TRUSTY
LIBFPC_NAME=libfpcmulti_debug.a
FPC_CONFIG_DEBUG=1
FPC_CONFIG_ENGINEERING=1
# Google config
GOOGLE_CONFIG_FP_STATUS=1

View File

@@ -1,30 +0,0 @@
# Factory build, use HIDL hal & extension so that we can use Test tool
ifneq ( ,$(findstring factory, $(TARGET_PRODUCT)))
include device/google/gs101/fingerprint/fpc1540/sw35/fingerprint_hidl_config_factory.mk
PRODUCT_PACKAGES += \
android.hardware.biometrics.fingerprint@2.1-service.fpc \
fpc_tee_test\
SensorTestTool \
ImageTool \
ImageCollection \
fp_test \
PRODUCT_PACKAGES += \
com.fingerprints.extension.xml \
com.fingerprints.extension \
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
else
# Non facotry build, use fingerprint AIDL version
include device/google/gs101/fingerprint/fpc1540/sw35/fingerprint_aidl_config.mk
PRODUCT_PACKAGES += \
android.hardware.biometrics.fingerprint-service.fpc35 \
fingerprint.fpc \
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
endif

View File

@@ -1,28 +0,0 @@
# ----------------------------
# Add feature flags below
# ----------------------------
FPC_CONFIG_BUILD_VERSION=42
FPC_CONFIG_GOOGLE_CUSTOMIZE=1
FPC_CONFIG_HAL_SHARED_LIB=1
FPC_CONFIG_MAX_NR_TEMPLATES=5
FPC_CONFIG_NO_TU=0
FPC_CONFIG_SENSE_TOUCH_CALIBRATION_PATH=/data/fpc/calibration_sense_touch.dat
FPC_CONFIG_SENSORTEST=1
FPC_CONFIG_TA_FS=1
FPC_DEFECTIVE_PIXEL_LIST_SIZE=5000
FPC_OTP_DECODE_ERRORS_IGNORE=1
FPC_SENSOR_SDK_LOG_LEVEL=3
FPC_TEE_RUNTIME=TRUSTY
LIBFPC_NAME=libfpcmulti_debug.a
FPC_CONFIG_DEBUG=1
FPC_CONFIG_ENGINEERING=1
FPC_CONFIG_GOOGLE_RELEASE=1
FPC_CONFIG_TRUSTY_CLEAN_TA=1
GOOGLE_CONFIG_PERFORMANCE=1
# Enable Suez
$(call soong_config_set,fp_hal_feature,biometric_suez_support,true)
# Must add below method to each project's device.mk to show sensorLocation
#$(call soong_config_set,fp_hal_feature,pixel_product, project_XX)

View File

@@ -1,18 +0,0 @@
# ----------------------------
# Add feature flags below
# ----------------------------
FPC_CONFIG_BUILD_VERSION=42
FPC_CONFIG_GOOGLE_CUSTOMIZE=1
FPC_CONFIG_MAX_NR_TEMPLATES=5
FPC_CONFIG_NO_TU=0
FPC_CONFIG_SENSE_TOUCH_CALIBRATION_PATH=/data/fpc/calibration_sense_touch.dat
FPC_CONFIG_SENSORTEST=1
FPC_CONFIG_TA_FS=1
FPC_DEFECTIVE_PIXEL_LIST_SIZE=5000
FPC_OTP_DECODE_ERRORS_IGNORE=1
FPC_SENSOR_SDK_LOG_LEVEL=3
FPC_TEE_RUNTIME=TRUSTY
LIBFPC_NAME=libfpcmulti_debug.a
FPC_CONFIG_DEBUG=1
FPC_CONFIG_ENGINEERING=1

View File

@@ -1,30 +0,0 @@
# Factory build, use HIDL hal & extension so that we can use Test tool
ifneq ( ,$(findstring factory, $(TARGET_PRODUCT)))
include device/google/gs101/fingerprint/fpc1540/sw42/fingerprint_hidl_config_factory.mk
PRODUCT_PACKAGES += \
android.hardware.biometrics.fingerprint@2.1-service.fpc \
fpc_tee_test\
SensorTestTool \
ImageTool \
ImageCollection \
fp_test \
PRODUCT_PACKAGES += \
com.fingerprints.extension.xml \
com.fingerprints.extension \
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
else
# Non facotry build, use fingerprint AIDL version
include device/google/gs101/fingerprint/fpc1540/sw42/fingerprint_aidl_config.mk
PRODUCT_PACKAGES += \
android.hardware.biometrics.fingerprint-service.fpc42 \
fingerprint.fpc \
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
endif

View File

@@ -1,24 +0,0 @@
#
# Copyright (C) 2018 The Android Open-Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
on property:sys.boot_completed=1 && property:persist.vendor.limit.wlc.current=1
write /sys/class/power_supply/dc/current_max 75000
on property:sys.boot_completed=1 && property:persist.vendor.limit.wlc.current=0
write /sys/class/power_supply/dc/current_max 1100000
on property:vendor.disable.wlc=1
write /sys/class/power_supply/wireless/online 0

View File

@@ -1,34 +0,0 @@
LheName=bbd
LheRsmResetTimeoutMS=10000
GpioNStdbyPath=/sys/devices/platform/10940000.spi/spi_master/spi5/spi5.0/nstandby
LhePatch=/vendor/firmware/SensorHub.patch
Lhe477xDebugFlags=RPC:FACILITY=65535-dKP+CUST+LHE:STDOUT_PUTS:STDOUT_LOG
LheConsole=/data/vendor/gps/LheConsole
LogEnabled=true
Log=JAVA
LogDirectory=/sdcard/gps/broadcom/storage
LheBbdPacket=/dev/ttyBCM
LheBbdControl=/dev/bbd_control
# LheBbdSensor=/dev/bbd_sensor
LheFailSafe=/data/vendor/gps/logs/esw-crash-dump.txt
LogLevel=*:I
NvStorageDir=/data/vendor/gps/
# Enable BBD debugging at these stages:
# LheDriverDebugFlags=PATCH_BBD:LHE_BBD:FSC_BBD
LheAutoBaudDelayMS=10
TrafficLogEnabled=false
SecondaryConfigPath=/data/vendor/gps/overlay/lhd_overlay.conf
SkipSensorWakeLock=true
LoggerWakeLockEnable=false
PpsEnable=true

View File

@@ -1,6 +0,0 @@
LogEnabled=true
Log=JAVA
LogDirectory=/sdcard/gps/broadcom/storage
NvStorageDir=/data/vendor/gps/
TcpConnectionTimeout=20
SecondaryConfigPath=/data/vendor/gps/overlay/scd_overlay.conf

View File

@@ -1,4 +0,0 @@
ifneq ($(BOARD_WITHOUT_RADIO),true)
PRODUCT_PACKAGES += vcd
endif
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs101/sepolicy/modem/userdebug/

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
* Copyright (c) 2009, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<resources>
<!-- Don't enable BT until user wants it -->
<bool name="def_bluetooth_on">false</bool>
</resources>

View File

@@ -1,7 +0,0 @@
<resources>
<string-array name="logger_entries">
<item>shannondm</item>
<item>cnss_diag</item>
<item>brcm_gps</item>
</string-array>
</resources>

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="config_logger_default_value" translatable="false">shannondm</string>
<string name="config_cfg_default_value" translatable="false">Built-in Mask #1</string>
<!-- default config file for cnss_diag logger -->
<string name="config_cfg_default_value_cnss_diag" translatable="false">cnss_diag.conf</string>
<!-- config file to enable brcm gps logger -->
<bool name="config_brcm_gps_enabled" translatable="false">true</bool>
</resources>

View File

@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="config_message_no_message">
<item></item>
</string-array>
<string-array name="config_message_audio_warning">
<item>This will collect audio from your voice calls. Would you like to proceed?</item>
</string-array>
<string-array name="config_message_possible_audio_warning">
<item>This may collect audio from your voice calls. Would you like to proceed?</item>
<item>Pixel_Default.nprf</item>
<item>Built-in Mask #0</item>
<item>Built-in Mask #1</item>
<item>Built-in Mask #2</item>
<item>Built-in Mask #3</item>
</string-array>
<string name="config_privacy_warning_title">Privacy Warning</string>
<string name="default_config_selection_message">You are loading a user defined logging config. This may collect audio from your voice calls. Would you like to proceed?</string>
</resources>

View File

@@ -31,6 +31,16 @@
<!-- B y-intercept --> <item>-0.349361641294833436</item>
</string-array>
<!-- The fixed keyboard vibration strength in [0,1], or -1 to indicate the strength not fixed
and should depend on the touch feedback intensity user setting -->
<item name="config_keyboardHapticFeedbackFixedAmplitude" type="dimen">0.62</item>
<!-- Indicating if keyboard vibration settings supported or not. -->
<bool name="config_keyboardVibrationSettingsSupported">true</bool>
<!-- Indicating if ringtone vibration settings supported or not. -->
<bool name="config_ringtoneVibrationSettingsSupported">true</bool>
<!-- List of comma separated package names for which we the system will not show crash, ANR,
etc. dialogs. -->
<string translatable="false" name="config_appsNotReportingCrashes">com.google.android.euicc</string>

View File

@@ -229,12 +229,6 @@
<item>"/system_ext/priv-app/SystemUI/SystemUI.apk"</item>
</string-array>
<!-- Bytes that the PinnerService will pin for Home app -->
<integer name="config_pinnerHomePinBytes">6291456</integer>
<!-- Bytes that the PinnerService will pin for WebView -->
<integer name="config_pinnerWebviewPinBytes">20971520</integer>
<!-- The default intensity level for alarm vibrations. See
Settings.System.ALARM_VIBRATION_INTENSITY more details on the constant values and
meanings. -->
@@ -303,4 +297,8 @@
<!-- Pre-scale volume at volume step 3 for Absolute Volume -->
<fraction name="config_prescaleAbsoluteVolume_index3">100%</fraction>
</resources>
<!-- Whether to enable usb state update via udc sysfs. -->
<bool name="config_enableUdcSysfsUsbStateUpdate">true</bool>
</resources>

View File

@@ -1,42 +0,0 @@
//
// Copyright (C) 2017 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "//device/google/gs101:device_google_gs101_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: [
"//device/google/gs101:device_google_gs101_license",
],
}
cc_binary {
name: "pixelstats-vendor",
init_rc: ["pixelstats-vendor.gs101.rc"],
srcs: [
"service.cpp",
],
shared_libs: [
"libbase",
"liblog",
"libutils",
"libpixelstats",
],
proprietary: true,
static_libs: ["chre_client"],
header_libs: ["chre_api"],
}

View File

@@ -1,10 +0,0 @@
on property:sys.boot_completed=1
chown system system /sys/class/power_supply/maxfg/fg_learning_events
start vendor.pixelstats_vendor
on post-fs-data
chown system system /sys/kernel/metrics/irq/stats_reset
service vendor.pixelstats_vendor /vendor/bin/pixelstats-vendor
class hal
user system
group system context_hub readproc
disabled

View File

@@ -1,104 +0,0 @@
/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#define LOG_TAG "pixelstats"
#include <android-base/logging.h>
#include <pixelstats/SysfsCollector.h>
#include <pixelstats/UeventListener.h>
#include <thread>
using android::hardware::google::pixel::SysfsCollector;
using android::hardware::google::pixel::UeventListener;
#define BLOCK_STATS_LENGTH 17
#define UFSHC_PATH(filename) "/dev/sys/block/bootdevice/" #filename
#define UFS_ERR_PATH(err_type) UFSHC_PATH(err_stats/) #err_type
const struct SysfsCollector::SysfsPaths sysfs_paths = {
.SlowioReadCntPath = UFSHC_PATH(slowio_read_cnt),
.SlowioWriteCntPath = UFSHC_PATH(slowio_write_cnt),
.SlowioUnmapCntPath = UFSHC_PATH(slowio_unmap_cnt),
.SlowioSyncCntPath = UFSHC_PATH(slowio_sync_cnt),
.CycleCountBinsPath = "/sys/class/power_supply/battery/cycle_counts",
.UFSLifetimeA = UFSHC_PATH(health_descriptor/life_time_estimation_a),
.UFSLifetimeB = UFSHC_PATH(health_descriptor/life_time_estimation_b),
.UFSLifetimeC = UFSHC_PATH(health_descriptor/life_time_estimation_c),
.F2fsStatsPath = "/sys/fs/f2fs/",
.ImpedancePath = "/sys/devices/platform/audiometrics/speaker_impedance",
.CodecPath = "/sys/devices/platform/audiometrics/codec_state",
.EEPROMPath = "/dev/battery_history",
.MitigationPath = "/sys/devices/virtual/pmic/mitigation",
.SpeakerTemperaturePath = "/sys/devices/platform/audiometrics/speaker_temp",
.SpeakerExcursionPath = "/sys/devices/platform/audiometrics/speaker_excursion",
.SpeakerHeartBeatPath = "/sys/devices/platform/audiometrics/speaker_heartbeat",
.ResumeLatencyMetricsPath = "/sys/kernel/metrics/resume_latency/resume_latency_metrics",
.LongIRQMetricsPath = "/sys/kernel/metrics/irq/long_irq_metrics",
.StormIRQMetricsPath = "/sys/kernel/metrics/irq/storm_irq_metrics",
.IRQStatsResetPath = "/sys/kernel/metrics/irq/stats_reset",
.UFSErrStatsPath = {
UFS_ERR_PATH(pa_err_count),
UFS_ERR_PATH(dl_err_count),
UFS_ERR_PATH(nl_err_count),
UFS_ERR_PATH(tl_err_count),
UFS_ERR_PATH(dme_err_count),
UFS_ERR_PATH(fatal_err_count),
UFS_ERR_PATH(auto_hibern8_err_count)
},
.AmsRatePath = "/sys/devices/platform/audiometrics/ams_rate_read_once",
.TempResidencyAndResetPaths = {
{
"/sys/kernel/metrics/thermal/tr_by_group/tmu/stats",
"/sys/kernel/metrics/thermal/tr_by_group/tmu/stats_reset"
},
{
"/sys/kernel/metrics/thermal/tr_by_group/spmic/stats",
"/sys/kernel/metrics/thermal/tr_by_group/spmic/stats_reset"
}
},
.GMSRPath = {
"/sys/class/power_supply/maxfg/gmsr",
"/sys/class/power_supply/maxfg_base/gmsr",
},
.FGModelLoadingPath = {
"/sys/class/power_supply/maxfg/m5_model_state"
},
.FGLogBufferPath = {
"/dev/logbuffer_maxfg_monitor",
"/dev/logbuffer_max77779fg_monitor",
"/dev/logbuffer_maxfg_base_monitor",
"/dev/logbuffer_maxfg_secondary_monitor"
}
};
const struct UeventListener::UeventPaths ueventPaths = {
.AudioUevent = "/devices/virtual/amcs/amcs",
.TypeCPartnerUevent = "PRODUCT_TYPE=",
.FwUpdatePath = ""
};
int main() {
LOG(INFO) << "starting PixelStats";
UeventListener ueventListener(ueventPaths);
std::thread listenThread(&UeventListener::ListenForever, &ueventListener);
listenThread.detach();
SysfsCollector collector(sysfs_paths);
collector.collect(); // This blocks forever.
return 0;
}

View File

@@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2023 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- System packages to preinstall on gs101 debug devices, per user type.
Documentation at frameworks/base/data/etc/preinstalled-packages-platform.xml
-->
<config>
<!-- Battery Stats Viewer (BatteryStatsViewer) -->
<install-in-user-type package="com.android.frameworks.core.batterystatsviewer">
<install-in user-type="FULL" />
<install-in user-type="PROFILE" />
<do-not-install-in user-type="android.os.usertype.profile.CLONE" />
<do-not-install-in user-type="android.os.usertype.profile.PRIVATE" />
</install-in-user-type>
</config>

View File

@@ -1,5 +0,0 @@
# People who can approve changes for submission
etancohen@google.com
arabawy@google.com
kumachang@google.com
satk@google.com

View File

@@ -1 +0,0 @@
type pktrouter_device, dev_type;

View File

@@ -1,4 +0,0 @@
# WFC
/vendor/bin/wfc-pkt-router u:object_r:pktrouter_exec:s0
/dev/umts_wfc[01] u:object_r:pktrouter_device:s0

View File

@@ -1,7 +0,0 @@
allow netutils_wrapper pktrouter:fd use;
allow netutils_wrapper pktrouter:fifo_file write;
allow netutils_wrapper pktrouter:netlink_route_socket { read write };
allow netutils_wrapper pktrouter:packet_socket { read write };
allow netutils_wrapper pktrouter:rawip_socket { read write };
allow netutils_wrapper pktrouter:udp_socket { read write };
allow netutils_wrapper pktrouter_device:chr_file rw_file_perms;

View File

@@ -1,14 +0,0 @@
type pktrouter, domain;
type pktrouter_exec, vendor_file_type, exec_type, file_type;
init_daemon_domain(pktrouter)
net_domain(pktrouter)
domain_auto_trans(pktrouter, netutils_wrapper_exec, netutils_wrapper);
allow pktrouter pktrouter_device:chr_file rw_file_perms;
allow pktrouter radio_device:chr_file r_file_perms;
allow pktrouter self:netlink_route_socket nlmsg_write;
allow pktrouter self:packet_socket { bind create read write getattr shutdown};
allow pktrouter self:capability net_raw;
get_prop(pktrouter, vendor_ims_prop);

View File

@@ -1 +0,0 @@
vendor_internal_prop(vendor_ims_prop)

View File

@@ -1,3 +0,0 @@
# for ims service
vendor.pktrouter u:object_r:vendor_ims_prop:s0

View File

@@ -1 +0,0 @@
set_prop(vendor_init, vendor_ims_prop)

View File

@@ -1,12 +1,12 @@
battery_mitigation sysfs file b/364446534
bluetooth audio_config_prop file b/379226761
bluetooth audio_config_prop file b/379245675
chre vendor_data_file dir b/301948771
dump_display sysfs file b/340722772
dump_modem sscoredump_vendor_data_coredump_file dir b/366115873
dump_modem sscoredump_vendor_data_logcat_file dir b/366115873
fsck modem_block_device blk_file b/397548310
hal_camera_default aconfig_storage_metadata_file dir b/383013727
hal_contexthub_default hal_bluetooth_service service_manager b/396573314
hal_drm_widevine system_userdir_file dir b/401397837
hal_power_default hal_power_default capability b/240632824
hal_sensors_default sysfs file b/340723303
incidentd debugfs_wakeup_sources file b/282626428
@@ -19,12 +19,14 @@ kernel tmpfs chr_file b/315907959
modem_svc_sit hal_radioext_default process b/372348067
pixelstats_vendor block_device dir b/369537606
pixelstats_vendor block_device dir b/369735407
platform_app bluetooth_lea_mode_prop file b/402594680
platform_app vendor_fw_file dir b/372122654
platform_app vendor_rild_prop file b/372122654
priv_app audio_config_prop file b/379226710
priv_app audio_config_prop file b/379246066
radio audio_config_prop file b/379227275
ramdump ramdump capability b/369538457
ramdump_app default_prop file b/386149238
rfsd vendor_cbd_prop file b/317734418
shell sysfs_net file b/329380904
ssr_detector_app default_prop file b/350831964
@@ -47,4 +49,6 @@ vendor_init default_prop property_service b/366115458
vendor_init default_prop property_service b/366116214
vendor_init default_prop property_service b/369735133
vendor_init default_prop property_service b/369735170
zygote aconfig_storage_metadata_file dir b/383949055
zygote media_config_prop file b/394433509
zygote zygote capability b/379591519

View File

@@ -9,7 +9,6 @@ type vendor_dmd_log_file, file_type, data_file_type;
type vendor_rfsd_log_file, file_type, data_file_type;
type vendor_dump_log_file, file_type, data_file_type;
type vendor_rild_log_file, file_type, data_file_type;
type vendor_sced_log_file, file_type, data_file_type;
type vendor_telephony_log_file, file_type, data_file_type;
# app data files

View File

@@ -136,7 +136,6 @@
/(vendor|system/vendor)/bin/cbd u:object_r:cbd_exec:s0
/(vendor|system/vendor)/bin/hw/rild_exynos u:object_r:rild_exec:s0
/(vendor|system/vendor)/bin/rfsd u:object_r:rfsd_exec:s0
/(vendor|system/vendor)/bin/sced u:object_r:sced_exec:s0
/(vendor|system/vendor)/bin/bipchmgr u:object_r:bipchmgr_exec:s0
#
@@ -148,7 +147,6 @@
/data/vendor/log/rfsd(/.*)? u:object_r:vendor_rfsd_log_file:s0
/data/vendor/log/dump(/.*)? u:object_r:vendor_dump_log_file:s0
/data/vendor/log/rild(/.*)? u:object_r:vendor_rild_log_file:s0
/data/vendor/log/sced(/.*)? u:object_r:vendor_sced_log_file:s0
/persist/sensorcal\.json u:object_r:sensors_cal_file:s0
@@ -360,6 +358,7 @@
/dev/bigocean u:object_r:video_device:s0
# Fingerprint
/dev/fth_fd u:object_r:fingerprint_device:s0
/dev/goodix_fp u:object_r:fingerprint_device:s0
/data/vendor/fingerprint(/.*)? u:object_r:fingerprint_vendor_data_file:s0

View File

@@ -33,6 +33,10 @@ genfscon sysfs /devices/platform/google,dock/power_supply/dock
genfscon sysfs /devices/platform/10d50000.hsi2c u:object_r:sysfs_batteryinfo:s0
genfscon sysfs /class/power_supply/wireless/device/version u:object_r:sysfs_batteryinfo:s0
genfscon sysfs /class/power_supply/wireless/device/status u:object_r:sysfs_batteryinfo:s0
genfscon sysfs /class/power_supply/wireless/device/fw_rev u:object_r:sysfs_batteryinfo:s0
# Slider
genfscon sysfs /devices/platform/10d10000.hsi2c/i2c-0/0-003c u:object_r:sysfs_wlc:s0
genfscon sysfs /devices/platform/10d10000.hsi2c/i2c-0/0-003c/power_supply u:object_r:sysfs_batteryinfo:s0
@@ -128,6 +132,9 @@ genfscon sysfs /devices/platform/sound-aoc/wakeup
genfscon sysfs /devices/platform/1c2c0000.drmdsim/1c2c0000.drmdsim.0/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/1c2d0000.drmdsim/1c2d0000.drmdsim.0/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/odm/odm:fps_touch_handler/power/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/odm/odm:fps_touch_handler/wakeup u:object_r:sysfs_wakeup:s0
# Input
genfscon sysfs /devices/platform/11110000.usb/11110000.dwc3/xhci-hcd-exynos.4.auto/usb2/2-1 u:object_r:sysfs_uhid:s0
genfscon sysfs /devices/platform/11110000.usb/11110000.dwc3/xhci-hcd-exynos.5.auto/usb2/2-1 u:object_r:sysfs_uhid:s0
@@ -345,3 +352,6 @@ genfscon sysfs /devices/platform/25f40000.etm u:object_r:sysfs_devices_cs_etm
# BootControl
genfscon sysfs /kernel/boot_control/blow_ar u:object_r:sysfs_bootctl:s0
# USB
genfscon sysfs /devices/platform/11110000.usb/11110000.dwc3/udc/11110000.dwc3/state u:object_r:sysfs_udc:s0

View File

@@ -30,3 +30,4 @@ get_prop(hal_usb_impl, vendor_usb_config_prop);
# For monitoring usb sysfs attributes
allow hal_usb_impl sysfs_wakeup:dir search;
allow hal_usb_impl sysfs_wakeup:file r_file_perms;
allow hal_usb_impl sysfs_udc:file r_file_perms;

View File

@@ -8,3 +8,5 @@ allow init-display-sh vendor_toolbox_exec:file execute_no_trans;
dontaudit init-display-sh proc_cmdline:file r_file_perms;
# Allow modprobe to log to kmsg.
allow init-display-sh kmsg_device:chr_file w_file_perms;

View File

@@ -45,7 +45,5 @@ allow modem_svc_sit modem_img_file:file r_file_perms;
allow modem_svc_sit modem_img_file:lnk_file r_file_perms;
# Allow modem_svc_sit to access socket for UMI
userdebug_or_eng(`
allow modem_svc_sit radio_vendor_data_file:sock_file { create unlink };
')
allow modem_svc_sit radio_vendor_data_file:sock_file { create unlink write};

View File

@@ -1,23 +0,0 @@
type sced, domain;
type sced_exec, vendor_file_type, exec_type, file_type;
init_daemon_domain(sced)
userdebug_or_eng(`
typeattribute sced vendor_executes_system_violators;
hwbinder_use(sced)
binder_call(sced, dmd)
binder_call(sced, vendor_telephony_app)
get_prop(sced, hwservicemanager_prop)
allow sced self:packet_socket create_socket_perms_no_ioctl;
allow sced self:capability net_raw;
allow sced shell_exec:file rx_file_perms;
allow sced tcpdump_exec:file rx_file_perms;
allow sced vendor_shell_exec:file x_file_perms;
allow sced vendor_slog_file:dir create_dir_perms;
allow sced vendor_slog_file:file create_file_perms;
allow sced hidl_base_hwservice:hwservice_manager add;
allow sced hal_vendor_oem_hwservice:hwservice_manager { add find };
')

View File

@@ -1,5 +1,4 @@
com.google.hardware.pixel.display.IDisplay/default u:object_r:hal_pixel_display_service:s0
hardware.qorvo.uwb.IUwbVendor/default u:object_r:hal_uwb_vendor_service:s0
android.hardware.drm.IDrmFactory/widevine u:object_r:hal_drm_service:s0
vendor.google.wireless_charger.IWirelessCharger/default u:object_r:hal_wireless_charger_service:s0
rlsservice u:object_r:rls_service:s0

View File

@@ -12,7 +12,6 @@ allow vendor_telephony_app vendor_slog_file:file create_file_perms;
allow vendor_telephony_app app_api_service:service_manager find;
allow vendor_telephony_app hal_vendor_oem_hwservice:hwservice_manager find;
binder_call(vendor_telephony_app, dmd)
binder_call(vendor_telephony_app, sced)
userdebug_or_eng(`
# Silent Logging

View File

@@ -462,13 +462,13 @@
]
},
{
"Name": "ResetUclampGrp",
"Name": "SCHED_QOS_NONE",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/uclamp_fork_reset_set",
"FilePath": "/proc/vendor_sched/sched_qos/sched_qos_none",
"Value": "<pid>",
"LogFailures": "false"
}
@@ -476,18 +476,73 @@
]
},
{
"Name": "NoResetUclampGrp",
"Name": "SCHED_QOS_POWER_EFFICIENCY",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/uclamp_fork_reset_clear",
"FilePath": "/proc/vendor_sched/sched_qos/sched_qos_power_efficiency",
"Value": "<pid>",
"LogFailures": "false"
}
}
]
},
{
"Name": "SCHED_QOS_SENSITIVE_EXTREME",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/sched_qos/sched_qos_sensitive_extreme",
"Value": "<pid>",
"LogFailures": "false"
}
}
]
},
{
"Name": "SCHED_QOS_SENSITIVE_HIGH",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/sched_qos/sched_qos_sensitive_high",
"Value": "<pid>",
"LogFailures": "false"
}
}
]
},
{
"Name": "SCHED_QOS_SENSITIVE_STANDARD",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/sched_qos/sched_qos_sensitive_standard",
"Value": "<pid>",
"LogFailures": "false"
}
}
]
},
{
"Name": "HighestCfsPrioScheduling",
"Actions": [
{
"Name": "SetSchedulerPolicy",
"Params":
{
"Policy": "SCHED_OTHER",
"Nice": "-20"
}
}
]
}
],
@@ -500,33 +555,9 @@
"Name": "OtaProfiles",
"Profiles": [ "OtaPerformance", "ServiceCapacityLow", "LowIoPriority", "TimerSlackHigh" ]
},
{
"Name": "SCHED_QOS_SENSITIVE_EXTREME_SET",
"Profiles": [ "AdpfSet", "PreferIdleSet", "PreferFitSet", "BoostPrioSet", "PreemptWakeupSet" ]
},
{
"Name": "SCHED_QOS_SENSITIVE_EXTREME_CLEAR",
"Profiles": [ "AdpfClear", "PreferIdleClear", "PreferFitClear", "BoostPrioClear", "PreemptWakeupClear" ]
},
{
"Name": "SCHED_QOS_SENSITIVE_STANDARD_SET",
"Profiles": [ "AdpfSet", "PreferIdleSet", "PreferFitSet" ]
},
{
"Name": "SCHED_QOS_SENSITIVE_STANDARD_CLEAR",
"Profiles": [ "AdpfClear", "PreferIdleClear", "PreferFitClear" ]
},
{
"Name": "SCHED_QOS_POWER_EFFICIENCY_SET",
"Profiles": [ "AutoUclampMaxSet" ]
},
{
"Name": "SCHED_QOS_POWER_EFFICIENCY_CLEAR",
"Profiles": [ "AutoUclampMaxClear" ]
},
{
"Name": "InputPolicy",
"Profiles": [ "MaxPerformance", "SCHED_QOS_SENSITIVE_EXTREME_SET" ]
"Profiles": [ "MaxPerformance", "SCHED_QOS_SENSITIVE_EXTREME" ]
}
]
}

View File

@@ -1,5 +0,0 @@
PRODUCT_PACKAGES += wfc-pkt-router
PRODUCT_PROPERTY_OVERRIDES += vendor.pktrouter=1
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs101/sepolicy/telephony/pktrouter
PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \
$(TARGET_COPY_OUT_SYSTEM)/bin/oem-iptables-init.sh

View File

@@ -1,4 +1 @@
ifneq ($(wildcard vendor/samsung_slsi/telephony/),)
PRODUCT_COPY_FILES += vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY)/common/device/samsung/init.radio.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.radio.sh
endif
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs101/sepolicy/telephony/user/

View File

@@ -1,6 +1,3 @@
# Trusty Metrics Daemon
PRODUCT_SOONG_NAMESPACES += \
vendor/google/trusty/common
PRODUCT_PACKAGES += trusty_metricsd
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs101/sepolicy/trusty_metricsd

View File

@@ -32,7 +32,6 @@ cc_binary {
srcs: [
"service.cpp",
"Usb.cpp",
"UsbDataSessionMonitor.cpp",
],
shared_libs: [
"libbase",
@@ -56,18 +55,13 @@ cc_binary {
],
static_libs: [
"libpixelusb",
"libpixelusb-datasession",
"libpixelstats",
"libthermalutils",
"android.hardware.usb.flags-aconfig-c-lib",
"android.hardware.usb.flags-aconfig-cc-lib",
],
export_shared_lib_headers: [
"android.frameworks.stats-V2-ndk",
"pixelatoms-cpp",
],
}
cc_aconfig_library {
name: "android.hardware.usb.flags-aconfig-c-lib",
vendor: true,
aconfig_declarations: "android.hardware.usb.flags-aconfig",
}

View File

@@ -90,11 +90,11 @@ constexpr char kUdcUeventRegex[] =
constexpr char kUdcStatePath[] =
"/sys/devices/platform/11110000.usb/11110000.dwc3/udc/11110000.dwc3/state";
constexpr char kHost1UeventRegex[] =
"/devices/platform/11110000.usb/11110000.dwc3/xhci-hcd-exynos.[0-9].auto/usb2/2-0:1.0";
constexpr char kHost1StatePath[] = "/sys/bus/usb/devices/usb2/2-0:1.0/usb2-port1/state";
"/devices/platform/11110000.usb/11110000.dwc3/xhci-hcd-exynos.[0-9].auto/usb1/1-0:1.0";
constexpr char kHost1StatePath[] = "/sys/bus/usb/devices/usb1/1-0:1.0/usb1-port1/state";
constexpr char kHost2UeventRegex[] =
"/devices/platform/11110000.usb/11110000.dwc3/xhci-hcd-exynos.[0-9].auto/usb3/3-0:1.0";
constexpr char kHost2StatePath[] = "/sys/bus/usb/devices/usb3/3-0:1.0/usb3-port1/state";
"/devices/platform/11110000.usb/11110000.dwc3/xhci-hcd-exynos.[0-9].auto/usb2/2-0:1.0";
constexpr char kHost2StatePath[] = "/sys/bus/usb/devices/usb2/2-0:1.0/usb2-port1/state";
constexpr char kDataRolePath[] = "/sys/devices/platform/11110000.usb/new_data_role";
constexpr int kSamplingIntervalSec = 5;
void queryVersionHelper(android::hardware::usb::Usb *usb,
@@ -533,9 +533,9 @@ Usb::Usb()
mRoleSwitchLock(PTHREAD_MUTEX_INITIALIZER),
mPartnerLock(PTHREAD_MUTEX_INITIALIZER),
mPartnerUp(false),
mUsbDataSessionMonitor(kUdcUeventRegex, kUdcStatePath, kHost1UeventRegex, kHost1StatePath,
kHost2UeventRegex, kHost2StatePath, kDataRolePath,
std::bind(&updatePortStatus, this)),
mUsbDataSessionMonitor(new UsbDataSessionMonitor(kUdcUeventRegex, kUdcStatePath,
kHost1UeventRegex, kHost1StatePath, kHost2UeventRegex,
kHost2StatePath, kDataRolePath, std::bind(&updatePortStatus, this))),
mOverheat(ZoneInfo(TemperatureType::USB_PORT, kThermalZoneForTrip,
ThrottlingSeverity::CRITICAL),
{ZoneInfo(TemperatureType::UNKNOWN, kThermalZoneForTempReadPrimary,
@@ -930,7 +930,7 @@ void queryUsbDataSession(android::hardware::usb::Usb *usb,
std::vector<PortStatus> *currentPortStatus) {
std::vector<ComplianceWarning> warnings;
usb->mUsbDataSessionMonitor.getComplianceWarnings(
usb->mUsbDataSessionMonitor->getComplianceWarnings(
(*currentPortStatus)[0].currentDataRole, &warnings);
(*currentPortStatus)[0].complianceWarnings.insert(
(*currentPortStatus)[0].complianceWarnings.end(),

View File

@@ -19,9 +19,9 @@
#include <android-base/file.h>
#include <aidl/android/hardware/usb/BnUsb.h>
#include <aidl/android/hardware/usb/BnUsbCallback.h>
#include <pixelusb/UsbDataSessionMonitor.h>
#include <pixelusb/UsbOverheatEvent.h>
#include <utils/Log.h>
#include <UsbDataSessionMonitor.h>
#define UEVENT_MSG_LEN 2048
// The type-c stack waits for 4.5 - 5.5 secs before declaring a port non-pd.
@@ -39,6 +39,7 @@ using ::aidl::android::hardware::usb::IUsbCallback;
using ::aidl::android::hardware::usb::PortRole;
using ::android::base::ReadFileToString;
using ::android::base::WriteStringToFile;
using ::android::hardware::google::pixel::usb::UsbDataSessionMonitor;
using ::android::hardware::google::pixel::usb::UsbOverheatEvent;
using ::android::hardware::google::pixel::usb::ZoneInfo;
using ::android::hardware::thermal::V2_0::TemperatureType;
@@ -87,7 +88,7 @@ struct Usb : public BnUsb {
bool mPartnerUp;
// Report usb data session event and data incompliance warnings
UsbDataSessionMonitor mUsbDataSessionMonitor;
std::unique_ptr<UsbDataSessionMonitor> mUsbDataSessionMonitor;
// Usb Overheat object for push suez event
UsbOverheatEvent mOverheat;
// Temperature when connected

View File

@@ -1,508 +0,0 @@
/*
* Copyright (C) 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#define LOG_TAG "android.hardware.usb.aidl-service.UsbDataSessionMonitor"
#include "UsbDataSessionMonitor.h"
#include <aidl/android/frameworks/stats/IStats.h>
#include <android-base/file.h>
#include <android-base/logging.h>
#include <android_hardware_usb_flags.h>
#include <cutils/uevent.h>
#include <pixelstats/StatsHelper.h>
#include <pixelusb/CommonUtils.h>
#include <sys/epoll.h>
#include <sys/timerfd.h>
#include <utils/Log.h>
#include <regex>
namespace usb_flags = android::hardware::usb::flags;
using aidl::android::frameworks::stats::IStats;
using android::base::ReadFileToString;
using android::hardware::google::pixel::getStatsService;
using android::hardware::google::pixel::reportUsbDataSessionEvent;
using android::hardware::google::pixel::PixelAtoms::VendorUsbDataSessionEvent;
using android::hardware::google::pixel::usb::addEpollFd;
using android::hardware::google::pixel::usb::BuildVendorUsbDataSessionEvent;
namespace aidl {
namespace android {
namespace hardware {
namespace usb {
#define UEVENT_MSG_LEN 2048
#define USB_STATE_MAX_LEN 20
#define DATA_ROLE_MAX_LEN 10
#define WARNING_SURFACE_DELAY_SEC 5
#define ENUM_FAIL_DEFAULT_COUNT_THRESHOLD 3
#define DEVICE_FLAKY_CONNECTION_CONFIGURED_COUNT_THRESHOLD 5
constexpr char kUdcConfigfsPath[] = "/config/usb_gadget/g1/UDC";
constexpr char kNotAttachedState[] = "not attached\n";
constexpr char kAttachedState[] = "attached\n";
constexpr char kPoweredState[] = "powered\n";
constexpr char kDefaultState[] = "default\n";
constexpr char kAddressedState[] = "addressed\n";
constexpr char kConfiguredState[] = "configured\n";
constexpr char kSuspendedState[] = "suspended\n";
const std::set<std::string> kValidStates = {kNotAttachedState, kAttachedState, kPoweredState,
kDefaultState, kAddressedState, kConfiguredState,
kSuspendedState};
static int addEpollFile(const int &epollFd, const std::string &filePath, unique_fd &fileFd) {
struct epoll_event ev;
unique_fd fd(open(filePath.c_str(), O_RDONLY));
if (fd.get() == -1) {
ALOGI("Cannot open %s", filePath.c_str());
return -1;
}
ev.data.fd = fd.get();
ev.events = EPOLLPRI;
if (epoll_ctl(epollFd, EPOLL_CTL_ADD, fd.get(), &ev) != 0) {
ALOGE("epoll_ctl failed; errno=%d", errno);
return -1;
}
fileFd = std::move(fd);
ALOGI("epoll registered %s", filePath.c_str());
return 0;
}
static void removeEpollFile(const int &epollFd, const std::string &filePath, unique_fd &fileFd) {
epoll_ctl(epollFd, EPOLL_CTL_DEL, fileFd.get(), NULL);
fileFd.release();
ALOGI("epoll unregistered %s", filePath.c_str());
}
UsbDataSessionMonitor::UsbDataSessionMonitor(
const std::string &deviceUeventRegex, const std::string &deviceStatePath,
const std::string &host1UeventRegex, const std::string &host1StatePath,
const std::string &host2UeventRegex, const std::string &host2StatePath,
const std::string &dataRolePath, std::function<void()> updatePortStatusCb) {
struct epoll_event ev;
std::string udc;
unique_fd epollFd(epoll_create(8));
if (epollFd.get() == -1) {
ALOGE("epoll_create failed; errno=%d", errno);
abort();
}
unique_fd ueventFd(uevent_open_socket(64 * 1024, true));
if (ueventFd.get() == -1) {
ALOGE("uevent_open_socket failed");
abort();
}
fcntl(ueventFd, F_SETFL, O_NONBLOCK);
if (addEpollFd(epollFd, ueventFd))
abort();
unique_fd timerFd(timerfd_create(CLOCK_BOOTTIME, TFD_NONBLOCK));
if (timerFd.get() == -1) {
ALOGE("create timerFd failed");
abort();
}
if (addEpollFd(epollFd, timerFd))
abort();
if (addEpollFile(epollFd.get(), dataRolePath, mDataRoleFd) != 0) {
ALOGE("monitor data role failed");
abort();
}
/*
* The device state file could be absent depending on the current data role
* and driver architecture. It's ok for addEpollFile to fail here, the file
* will be monitored later when its presence is detected by uevent.
*/
mDeviceState.filePath = deviceStatePath;
mDeviceState.ueventRegex = deviceUeventRegex;
addEpollFile(epollFd.get(), mDeviceState.filePath, mDeviceState.fd);
mHost1State.filePath = host1StatePath;
mHost1State.ueventRegex = host1UeventRegex;
addEpollFile(epollFd.get(), mHost1State.filePath, mHost1State.fd);
mHost2State.filePath = host2StatePath;
mHost2State.ueventRegex = host2UeventRegex;
addEpollFile(epollFd.get(), mHost2State.filePath, mHost2State.fd);
mEpollFd = std::move(epollFd);
mUeventFd = std::move(ueventFd);
mTimerFd = std::move(timerFd);
mUpdatePortStatusCb = updatePortStatusCb;
if (ReadFileToString(kUdcConfigfsPath, &udc) && !udc.empty())
mUdcBind = true;
else
mUdcBind = false;
if (pthread_create(&mMonitor, NULL, this->monitorThread, this)) {
ALOGE("pthread creation failed %d", errno);
abort();
}
ALOGI("feature flag enable_report_usb_data_compliance_warning: %d",
usb_flags::enable_report_usb_data_compliance_warning());
}
UsbDataSessionMonitor::~UsbDataSessionMonitor() {}
void UsbDataSessionMonitor::reportUsbDataSessionMetrics() {
std::vector<VendorUsbDataSessionEvent> events;
if (mDataRole == PortDataRole::DEVICE) {
VendorUsbDataSessionEvent event;
BuildVendorUsbDataSessionEvent(false /* is_host */, boot_clock::now(), mDataSessionStart,
&mDeviceState.states, &mDeviceState.timestamps, &event);
events.push_back(event);
} else if (mDataRole == PortDataRole::HOST) {
bool empty = true;
for (auto e : {&mHost1State, &mHost2State}) {
/*
* Host port will at least get an not_attached event after enablement,
* skip upload if no additional state is added.
*/
if (e->states.size() > 1) {
VendorUsbDataSessionEvent event;
BuildVendorUsbDataSessionEvent(true /* is_host */, boot_clock::now(),
mDataSessionStart, &e->states, &e->timestamps,
&event);
events.push_back(event);
empty = false;
}
}
// All host ports have no state update, upload an event to reflect it
if (empty) {
VendorUsbDataSessionEvent event;
BuildVendorUsbDataSessionEvent(true /* is_host */, boot_clock::now(), mDataSessionStart,
&mHost1State.states, &mHost1State.timestamps, &event);
events.push_back(event);
}
} else {
return;
}
const std::shared_ptr<IStats> stats_client = getStatsService();
if (!stats_client) {
ALOGE("Unable to get AIDL Stats service");
return;
}
for (auto &event : events) {
reportUsbDataSessionEvent(stats_client, event);
}
}
void UsbDataSessionMonitor::getComplianceWarnings(const PortDataRole &role,
std::vector<ComplianceWarning> *warnings) {
if (!usb_flags::enable_report_usb_data_compliance_warning())
return;
if (role != mDataRole || role == PortDataRole::NONE)
return;
for (auto w : mWarningSet) {
warnings->push_back(w);
}
}
void UsbDataSessionMonitor::notifyComplianceWarning() {
if (!usb_flags::enable_report_usb_data_compliance_warning())
return;
if (mUpdatePortStatusCb)
mUpdatePortStatusCb();
}
void UsbDataSessionMonitor::evaluateComplianceWarning() {
std::set<ComplianceWarning> newWarningSet;
int elapsedTimeSec;
elapsedTimeSec =
std::chrono::duration_cast<std::chrono::seconds>(boot_clock::now() - mDataSessionStart)
.count();
if (elapsedTimeSec >= WARNING_SURFACE_DELAY_SEC) {
if (mDataRole == PortDataRole::DEVICE && mUdcBind) {
int configuredCount = std::count(mDeviceState.states.begin(),
mDeviceState.states.end(), kConfiguredState);
int defaultCount =
std::count(mDeviceState.states.begin(), mDeviceState.states.end(), kDefaultState);
if (configuredCount == 0 && defaultCount > ENUM_FAIL_DEFAULT_COUNT_THRESHOLD)
newWarningSet.insert(ComplianceWarning::ENUMERATION_FAIL);
if (configuredCount > DEVICE_FLAKY_CONNECTION_CONFIGURED_COUNT_THRESHOLD)
newWarningSet.insert(ComplianceWarning::FLAKY_CONNECTION);
} else if (mDataRole == PortDataRole::HOST) {
int host1StateCount = mHost1State.states.size();
int host1ConfiguredCount =
std::count(mHost1State.states.begin(), mHost1State.states.end(), kConfiguredState);
int host1DefaultCount =
std::count(mHost1State.states.begin(), mHost1State.states.end(), kDefaultState);
int host2StateCount = mHost2State.states.size();
int host2ConfiguredCount =
std::count(mHost2State.states.begin(), mHost2State.states.end(), kConfiguredState);
int host2DefaultCount =
std::count(mHost2State.states.begin(), mHost2State.states.end(), kDefaultState);
if (host1ConfiguredCount == 0 && host2ConfiguredCount == 0 &&
(host1DefaultCount > ENUM_FAIL_DEFAULT_COUNT_THRESHOLD ||
host2DefaultCount > ENUM_FAIL_DEFAULT_COUNT_THRESHOLD))
newWarningSet.insert(ComplianceWarning::ENUMERATION_FAIL);
if (host1StateCount == 1 && mHost1State.states.front() == kNotAttachedState &&
host2StateCount == 1 && mHost2State.states.front() == kNotAttachedState)
newWarningSet.insert(ComplianceWarning::MISSING_DATA_LINES);
}
}
if (newWarningSet != mWarningSet) {
std::string newWarningString;
for (auto e : newWarningSet) {
newWarningString += toString(e) + " ";
}
ALOGI("Usb data compliance warning changed to: %s", newWarningString.c_str());
mWarningSet = newWarningSet;
notifyComplianceWarning();
}
}
void UsbDataSessionMonitor::clearDeviceStateEvents(struct usbDeviceState *deviceState) {
deviceState->states.clear();
deviceState->timestamps.clear();
}
void UsbDataSessionMonitor::handleDeviceStateEvent(struct usbDeviceState *deviceState) {
int n;
char state[USB_STATE_MAX_LEN] = {0};
lseek(deviceState->fd.get(), 0, SEEK_SET);
n = read(deviceState->fd.get(), &state, USB_STATE_MAX_LEN);
if (kValidStates.find(state) == kValidStates.end()) {
ALOGE("Invalid state %s", state);
return;
}
ALOGI("Update USB device state: %s", state);
deviceState->states.push_back(state);
deviceState->timestamps.push_back(boot_clock::now());
evaluateComplianceWarning();
}
void UsbDataSessionMonitor::setupNewSession() {
mWarningSet.clear();
mDataSessionStart = boot_clock::now();
if (mDataRole == PortDataRole::DEVICE) {
clearDeviceStateEvents(&mDeviceState);
} else if (mDataRole == PortDataRole::HOST) {
clearDeviceStateEvents(&mHost1State);
clearDeviceStateEvents(&mHost2State);
}
if (mDataRole != PortDataRole::NONE) {
struct itimerspec delay = itimerspec();
delay.it_value.tv_sec = WARNING_SURFACE_DELAY_SEC;
int ret = timerfd_settime(mTimerFd.get(), 0, &delay, NULL);
if (ret < 0)
ALOGE("timerfd_settime failed err:%d", errno);
}
}
void UsbDataSessionMonitor::handleDataRoleEvent() {
int n;
PortDataRole newDataRole;
char role[DATA_ROLE_MAX_LEN] = {0};
lseek(mDataRoleFd.get(), 0, SEEK_SET);
n = read(mDataRoleFd.get(), &role, DATA_ROLE_MAX_LEN);
ALOGI("Update USB data role %s", role);
if (!std::strcmp(role, "host")) {
newDataRole = PortDataRole::HOST;
} else if (!std::strcmp(role, "device")) {
newDataRole = PortDataRole::DEVICE;
} else {
newDataRole = PortDataRole::NONE;
}
if (newDataRole != mDataRole) {
// Upload metrics for the last data session that has ended
if (mDataRole == PortDataRole::HOST || (mDataRole == PortDataRole::DEVICE && mUdcBind)) {
reportUsbDataSessionMetrics();
}
mDataRole = newDataRole;
setupNewSession();
}
}
void UsbDataSessionMonitor::updateUdcBindStatus(const std::string &devname) {
std::string function;
bool newUdcBind;
/*
* /sys/class/udc/<udc>/function prints out name of currently running USB gadget driver
* Ref: https://www.kernel.org/doc/Documentation/ABI/stable/sysfs-class-udc
* Empty name string means the udc device is not bound and gadget is pulldown.
*/
if (!ReadFileToString("/sys" + devname + "/function", &function))
return;
if (function == "")
newUdcBind = false;
else
newUdcBind = true;
if (newUdcBind == mUdcBind)
return;
if (mDataRole == PortDataRole::DEVICE) {
if (mUdcBind && !newUdcBind) {
/*
* Gadget soft pulldown: report metrics as the end of a data session and
* re-evaluate compliance warnings to clear existing warnings if any.
*/
reportUsbDataSessionMetrics();
evaluateComplianceWarning();
} else if (!mUdcBind && newUdcBind) {
// Gadget soft pullup: reset and start accounting for a new data session.
setupNewSession();
}
}
ALOGI("Udc bind status changes from %b to %b", mUdcBind, newUdcBind);
mUdcBind = newUdcBind;
}
void UsbDataSessionMonitor::handleUevent() {
char msg[UEVENT_MSG_LEN + 2];
char *cp;
int n;
n = uevent_kernel_multicast_recv(mUeventFd.get(), msg, UEVENT_MSG_LEN);
if (n <= 0)
return;
if (n >= UEVENT_MSG_LEN)
return;
msg[n] = '\0';
msg[n + 1] = '\0';
cp = msg;
while (*cp) {
for (auto e : {&mHost1State, &mHost2State}) {
if (std::regex_search(cp, std::regex(e->ueventRegex))) {
if (!strncmp(cp, "bind@", strlen("bind@"))) {
addEpollFile(mEpollFd.get(), e->filePath, e->fd);
} else if (!strncmp(cp, "unbind@", strlen("unbind@"))) {
removeEpollFile(mEpollFd.get(), e->filePath, e->fd);
}
}
}
// TODO: support bind@ unbind@ to detect dynamically allocated udc device
if (std::regex_search(cp, std::regex(mDeviceState.ueventRegex))) {
if (!strncmp(cp, "change@", strlen("change@"))) {
char *devname = cp + strlen("change@");
/*
* Udc device emits a KOBJ_CHANGE event on configfs driver bind and unbind.
* TODO: upstream udc driver emits KOBJ_CHANGE event BEFORE unbind is actually
* executed. Add a short delay to get the correct state while working on a fix
* upstream.
*/
usleep(50000);
updateUdcBindStatus(devname);
}
}
/* advance to after the next \0 */
while (*cp++) {
}
}
}
void UsbDataSessionMonitor::handleTimerEvent() {
int byteRead;
uint64_t numExpiration;
byteRead = read(mTimerFd.get(), &numExpiration, sizeof(numExpiration));
if (byteRead != sizeof(numExpiration)) {
ALOGE("incorrect read size");
}
if (numExpiration != 1) {
ALOGE("incorrect expiration count");
}
evaluateComplianceWarning();
}
void *UsbDataSessionMonitor::monitorThread(void *param) {
UsbDataSessionMonitor *monitor = (UsbDataSessionMonitor *)param;
struct epoll_event events[64];
int nevents = 0;
while (true) {
nevents = epoll_wait(monitor->mEpollFd.get(), events, 64, -1);
if (nevents == -1) {
if (errno == EINTR)
continue;
ALOGE("usb epoll_wait failed; errno=%d", errno);
break;
}
for (int n = 0; n < nevents; ++n) {
if (events[n].data.fd == monitor->mUeventFd.get()) {
monitor->handleUevent();
} else if (events[n].data.fd == monitor->mTimerFd.get()) {
monitor->handleTimerEvent();
} else if (events[n].data.fd == monitor->mDataRoleFd.get()) {
monitor->handleDataRoleEvent();
} else if (events[n].data.fd == monitor->mDeviceState.fd.get()) {
monitor->handleDeviceStateEvent(&monitor->mDeviceState);
} else if (events[n].data.fd == monitor->mHost1State.fd.get()) {
monitor->handleDeviceStateEvent(&monitor->mHost1State);
} else if (events[n].data.fd == monitor->mHost2State.fd.get()) {
monitor->handleDeviceStateEvent(&monitor->mHost2State);
}
}
}
return NULL;
}
} // namespace usb
} // namespace hardware
} // namespace android
} // namespace aidl

View File

@@ -1,117 +0,0 @@
/*
* Copyright (C) 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <aidl/android/hardware/usb/ComplianceWarning.h>
#include <aidl/android/hardware/usb/PortDataRole.h>
#include <android-base/chrono_utils.h>
#include <android-base/unique_fd.h>
#include <set>
#include <string>
#include <vector>
namespace aidl {
namespace android {
namespace hardware {
namespace usb {
using ::aidl::android::hardware::usb::ComplianceWarning;
using ::aidl::android::hardware::usb::PortDataRole;
using ::android::base::boot_clock;
using ::android::base::unique_fd;
/*
* UsbDataSessionMonitor monitors the usb device state sysfs of 3 different usb devices
* including device mode (udc), host mode high-speed port and host mode super-speed port. It
* reports Suez metrics for each data session and also provides API to query the compliance
* warnings detected in the current usb data session.
*/
class UsbDataSessionMonitor {
public:
/*
* The host mode high-speed port and super-speed port can be assigned to either host1 or
* host2 without affecting functionality.
*
* UeventRegex: name regex of the device that's being monitored. The regex is matched against
* uevent to detect dynamic creation/deletion/change of the device.
* StatePath: usb device state sysfs path of the device, monitored by epoll.
* dataRolePath: path to the usb data role sysfs, monitored by epoll.
* updatePortStatusCb: the callback is invoked when the compliance warings changes.
*/
UsbDataSessionMonitor(const std::string &deviceUeventRegex, const std::string &deviceStatePath,
const std::string &host1UeventRegex, const std::string &host1StatePath,
const std::string &host2UeventRegex, const std::string &host2StatePath,
const std::string &dataRolePath,
std::function<void()> updatePortStatusCb);
~UsbDataSessionMonitor();
// Returns the compliance warnings detected in the current data session.
void getComplianceWarnings(const PortDataRole &role, std::vector<ComplianceWarning> *warnings);
private:
struct usbDeviceState {
unique_fd fd;
std::string filePath;
std::string ueventRegex;
// Usb device states reported by state sysfs
std::vector<std::string> states;
// Timestamps of when the usb device states were captured
std::vector<boot_clock::time_point> timestamps;
};
static void *monitorThread(void *param);
void handleUevent();
void handleTimerEvent();
void handleDataRoleEvent();
void handleDeviceStateEvent(struct usbDeviceState *deviceState);
void clearDeviceStateEvents(struct usbDeviceState *deviceState);
void setupNewSession();
void reportUsbDataSessionMetrics();
void evaluateComplianceWarning();
void notifyComplianceWarning();
void updateUdcBindStatus(const std::string &devname);
pthread_t mMonitor;
unique_fd mEpollFd;
unique_fd mUeventFd;
unique_fd mTimerFd;
unique_fd mDataRoleFd;
struct usbDeviceState mDeviceState;
struct usbDeviceState mHost1State;
struct usbDeviceState mHost2State;
std::set<ComplianceWarning> mWarningSet;
// Callback function to notify the caller when there's a change in compliance warnings.
std::function<void()> mUpdatePortStatusCb;
/*
* Cache relevant info for a USB data session when one starts, including
* the data role and the time when the session starts.
*/
PortDataRole mDataRole;
boot_clock::time_point mDataSessionStart;
/*
* In gadget mode: this indicates whether the udc device is bound to the configfs driver, which
* is done by userspace writing the udc device name to /config/usb_gadget/g1/UDC. When unbound,
* the gadget is in soft pulldown state and is expected not to enumerate. During gadget
* function switch, the udc device usually go through unbind and bind.
*/
bool mUdcBind;
};
} // namespace usb
} // namespace hardware
} // namespace android
} // namespace aidl

View File

@@ -1 +0,0 @@
restricted_channels=0xffff

View File

@@ -1 +0,0 @@
restricted_channels=0xffff

View File

@@ -1 +0,0 @@
restricted_channels=0xffff

View File

@@ -1 +0,0 @@
restricted_channels=0xffff

View File

@@ -1 +0,0 @@
restricted_channels=0xffff

View File

@@ -1,34 +0,0 @@
ant0.ch5.prf16.tx_power=0
ant0.ch5.prf16.pg_delay=0
ant0.ch5.prf64.tx_power=0
ant0.ch5.prf64.pg_delay=0
ant0.ch9.prf16.tx_power=0x2A2A2A2A
ant0.ch9.prf16.pg_delay=0x20
ant0.ch9.prf64.tx_power=0x2A2A2A2A
ant0.ch9.prf64.pg_delay=0x20
ant1.ch5.prf16.tx_power=0
ant1.ch5.prf16.pg_delay=0
ant1.ch5.prf64.tx_power=0
ant1.ch5.prf64.pg_delay=0
ant1.ch9.prf16.tx_power=0x2A2A2A2A
ant1.ch9.prf16.pg_delay=0x20
ant1.ch9.prf64.tx_power=0x2A2A2A2A
ant1.ch9.prf64.pg_delay=0x20
ant2.ch5.prf16.tx_power=0
ant2.ch5.prf16.pg_delay=0
ant2.ch5.prf64.tx_power=0
ant2.ch5.prf64.pg_delay=0
ant2.ch9.prf16.tx_power=0x2A2A2A2A
ant2.ch9.prf16.pg_delay=0x20
ant2.ch9.prf64.tx_power=0x2A2A2A2A
ant2.ch9.prf64.pg_delay=0x20
ant3.ch5.prf16.tx_power=0
ant3.ch5.prf16.pg_delay=0
ant3.ch5.prf64.tx_power=0
ant3.ch5.prf64.pg_delay=0
ant3.ch9.prf16.tx_power=0x2A2A2A2A
ant3.ch9.prf16.pg_delay=0x20
ant3.ch9.prf64.tx_power=0x2A2A2A2A
ant3.ch9.prf64.pg_delay=0x20
alternate_pulse_shape=0x01
restricted_channels=0x20

View File

@@ -1 +0,0 @@
restricted_channels=0xffff

View File

@@ -1 +0,0 @@
restricted_channels=0xffff

View File

@@ -1 +0,0 @@
restricted_channels=0xffff

View File

@@ -1 +0,0 @@
restricted_channels=0xffff

View File

@@ -1 +0,0 @@
restricted_channels=0xffff

View File

@@ -1 +0,0 @@
restricted_channels=0xffff

View File

@@ -1 +0,0 @@
restricted_channels=0xffff

View File

@@ -1 +0,0 @@
restricted_channels=0xffff

View File

@@ -1 +0,0 @@
restricted_channels=0xffff

View File

@@ -1,2 +0,0 @@
alternate_pulse_shape=0x01
restricted_channels=0x20

Some files were not shown because too many files have changed in this diff Show More