98 Commits
vic ... bka

Author SHA1 Message Date
b3f0f5f582 gs201: Initialize for Evolution X 11.x
Change-Id: Iffb170290bb1742a5dc0d2809a61543d9230443f
Signed-off-by: AnierinB <anierin@evolution-x.org>
2025-09-26 04:50:40 +00:00
Nolen Johnson
4f4ee5c69a gs201: Don't include modem components for BOARD_WITHOUT_RADIO
* Useless on tangorpro, just makes noise and denials.

Change-Id: Iaa21a293e174002de7ffe1b0bce1fff4a881e83e
(cherry picked from commit 1111067994012853f4b622d99ab42b952295cd96)
2025-09-21 19:42:22 +00:00
Michael Bestas
ae1ddbb77b gs201: 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:25 +03:00
Michael Bestas
0bb452b6c1 gs201: Bump SPL to 2025-08-05
Change-Id: I079629bc2b5bb728dac7fdab902ce53ffa336810
2025-08-13 03:36:51 +00:00
LuK1337
080a9c0b0b gs201: Remove vendor/lineage device framework matrix inclusion
See: I78da6340f38b93fdc4c3694cb8f431f387d16c0d
Change-Id: I0b9f527de50ca02082be9b92375559f4893b2688
2025-08-11 16:17:35 -04:00
Michael Bestas
44b1f00e56 gs201: Remove dependency to gs101
Change-Id: Ib7613419cbfd0afa51b46fe6c7466b376c419884
2025-06-26 10:18:16 +03:00
Michael Bestas
6c7ba3f3b4 gs201: Selectively update overlays from BP2A
Change-Id: Icfa723318c46e0674772b7138e2e83b387908a29
2025-06-26 10:18:16 +03:00
Michael Bestas
240bca8703 gs201: sepolicy: Remove duplicate service label
This is defined in gs-common

Change-Id: Ib90caea46da6cc9e191efe8f04b783bba9e2691a
2025-06-26 10:18:16 +03:00
Michael Bestas
0b2a55a753 gs201: sepolicy: Update tracking denials bug map from BP2A
Change-Id: Ibdfb2fa34bc43399f944ef73f6687d8e5051a2ef
2025-06-26 10:18:16 +03:00
Michael Bestas
91d9ef719c gs201: Remove non-existent vendor includes
Change-Id: I1bc76430d30259984f4eb91907be61ef39646c27
2025-06-26 10:18:16 +03:00
Michael Bestas
ae655b64ad gs201: Remove factory configuration
Change-Id: Ib46639b684db8f0bbd42be9ffd518e62277d63f0
2025-06-26 10:18:16 +03:00
Michael Bestas
7f5ee2c2bd gs201: Remove SystemUI dexpreopt speed compile flags
They are already defined in vendor

Change-Id: I27097e32091d0066fc3da1a1b786e5a6ae11bc86
2025-06-26 10:18:16 +03:00
Michael Bestas
66cd589315 gs201: Include missing NFC sepolicy
Change-Id: Ic93f74e25694f19cfc23a86203c17e6f1d9be0ea
2025-06-26 10:18:16 +03:00
Michael Bestas
7c08fc8f4a gs201: Include missing bt dump sepolicy
Change-Id: I7e16eba76b87db4c8fc45d9401ce4f2c143b6478
2025-06-26 10:18:16 +03:00
Michael Bestas
90b28f3220 gs201: Move wfc-pkt-router to gs-common
Change-Id: I922b28e1bd8dc0baece89428c0032eabde5c13dc
2025-06-26 10:18:16 +03:00
Michael Bestas
fc4584b3c0 gs201: Remove unused fingerprint configuration
Change-Id: Ifd79557c81280f9e93076bc1e6824c650ea12ed7
2025-06-26 10:18:16 +03:00
Michael Bestas
d51e6c4d8e gs201: Remove userdebug/eng configuration
Change-Id: Ie1e8b6bbebdfac97f8bc382e41c70cc8a32caf07
2025-06-26 10:18:16 +03:00
Michael Bestas
1f8a183293 gs201: Remove AOSP gerrit configuration
Change-Id: I3bf3987b08a710ddf278cae5243946fae70fce6a
2025-06-23 20:13:20 +03:00
Michael Bestas
3bb2507ba1 gs201: Remove CleanSpec.mk
Change-Id: I6af355cfbfd5fc388ca25cd25cea9df9e74c41c3
2025-06-23 20:07:25 +03:00
Michael Bestas
753a2de323 gs201: Bump SPL to 2025-06-05
Change-Id: I8d3f5a9479d0fddd6fa79baa3e573f00ad125e9c
2025-06-23 20:07:08 +03:00
Michael Bestas
524d623907 gs201: Update task_profiles.json from BP2A
Change-Id: I5303433e19e6e53afc0635d9a00b7467e00391cd
2025-06-23 20:06:42 +03:00
Michael Bestas
eeba278d9d gs201: Update init scripts from BP2A
Change-Id: I9e36e0faec4860fe714c0151b3cb7f373cbcf0ea
2025-06-23 20:06:37 +03:00
Michael Bestas
6fa5514f8e gs201: Update FCM for 16
Change-Id: If85ec83e37e9d983903aed4c6f809664fd2b293e
2025-06-23 20:06:32 +03:00
Michael Bestas
fa40a12ed9 gs201: Remove pixelstats-vendor
This does not build with the current hardware/google/pixel dependencies
so make it prebuilt.

Change-Id: Ifcbf49fb482164bd72ad0e1f05fa2d48ca2fbc98
2025-06-23 20:06:25 +03:00
Michael Bestas
59ea5d1657 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
# eA9fAKCEH6U0VsfJnZu7EsJrm3Jf2R/79QCfS2R7cLBCbgZRnRF9NdZFLFSCmag=
# =LJEp
# -----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 (7) and others
# Via Android Build Coastguard Worker (8) and others
* tag 'aml_tz6_351400020':
  Add udc sysfs to udc_sysfs fs context
  Remove unnecessary dontaudit rule
  Update SELinux error
  Update SELinux error
  RamdumpService: Fix the SELinux errors from introducing Firebase Analytics.
  init-display-sh: Don't audit writing to kmsg
  Remove sced sepolicy rule
  gs201: update selinux to allow UMI on user build
  Update SELinux error
  sepolicy: gs201: add genfscon wireless into sysfs_batteryinfo
  Update SELinux error
  Update SELinux error
  Update SELinux error.
  Revert "Remove hal_camera_default aconfig_storage_metadata_file ..."
  Remove hal_camera_default aconfig_storage_metadata_file bugmap
  Update SELinux error
  gs201: Add selinux permission for fth
  Update SELinux error

Change-Id: I5e1ace4f2a3d2cde00d9d851f943f679cc12906a
2025-06-23 05:20:37 +03:00
Michael Bestas
dfc9c90494 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
# eEq+AJ9f00+1KaHwE68DPPHxM3RV+ULPOgCfVHXxoRqjXdLP0Jqjgh7m6pJw8zc=
# =Zpxs
# -----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 (10) and others
* tag 'aml_tz6_351400020': (25 commits)
  Enable usb state update via udc sysfs
  usb: support device state monitoring with internal hub enabled
  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 WIFI_FEATURE_HOSTAPD_11AX
  pixelstats: gs201: remove firmware update path
  init-display-sh: Allow writing to kmsg
  To ensure that gs201's init_dpm.sh is only built for gs201 devices.
  Revert "Disable memcg"
  Remove ResetUclamp profiles
  Update IDisplay to V13-V14
  display-dump: make display dump project-specific
  Refactor: Use googleDeviceConfig namespace in gs201 BoardConfig
  ...

Change-Id: Ib75db71bade3a1fb0a8b2b8914b34f900b9aa8fd
2025-06-23 05:20:34 +03:00
Chirayu Desai
1c6f22d547 Freeze SPL to 2025-05-05
Change-Id: I3dfa3c342582d14c1b5b89061c8a58a72dc6cbcd
2025-06-03 22:55:51 +03:00
Android Build Coastguard Worker
dca6e8d7af Snap for 13025264 from 427a3262f1 to mainline-tzdata6-release
Change-Id: Id849352971342e311dde27b992a0c216fa16358a
2025-02-06 14:21:02 -08:00
Android Build Coastguard Worker
195dfe09b7 Snap for 13025264 from bf70a639cd to mainline-tzdata6-release
Change-Id: I230c9284a7316cbe1ba2af8ee08448c345d68857
2025-02-06 14:21:01 -08:00
Roy Luo
427a3262f1 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 Cheetah
Flag: android.hardware.usb.flags.enable_udc_sysfs_usb_state_update
Change-Id: I0eac6b46677c786b505a4bd1c4f63385062bc132
2025-02-06 10:27:37 -08:00
Roy Luo
bf70a639cd Enable usb state update via udc sysfs
Bug: 339241080
Test: tested on Cheetah
Flag: android.hardware.usb.flags.enable_udc_sysfs_usb_state_update
Change-Id: I59f3409791ea1d3ded1e8a3bdd2fcafeaa7f9a43
2025-02-06 10:27:37 -08:00
Roy Luo
a65353e33b usb: support device state monitoring with internal hub enabled
When internal hub is enabled, monitor the downstream ports of the
internal hub. Switch back to the root hub once the hub is disabled.

Bug: 388367091
Bug: 377782468
Test: test on t6pro
Flag: EXEMPT bug fix
Change-Id: I6ac7f411d5d58d719e05402a7d7e5f2543fe2062
2025-02-05 20:25:53 -08:00
Roy Luo
c9aaa3a747 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 cheetah
Flag: EXEMPT trivial bug fix
Change-Id: Iaf87b2698a52656790b839f4090d69fcc226053a
2025-02-05 20:25:53 -08:00
Roy Luo
3073fb95af usb: migrate UsbDataSessionMonitor to libpixelusb
Use the libpixelusb version of UsbDataSessionMonitor.

Bug: 388367091
Test: test on cheetah
Flag: EXEMPT CP
Change-Id: I93b74fc9bb63c260e900ee5af73e66fb1559142d
2025-02-05 20:25:53 -08:00
Nina Chen
768c29c450 Remove unnecessary dontaudit rule
Bug: 393978045
Flag: EXEMPT bugfix
Change-Id: I183b9ddd7ed94b9094ae5b2e662d3725185d36dd
2025-02-03 19:30:32 +08:00
Masha Chizhova
27d2945360 Use 2025-03-01 deqp level for GLES
Bug: 392805030
Flag: EXEMPT version updates
Change-Id: I08f0af75ac8b57222deff8ef88960082e6b6631e
2025-02-03 11:03:45 +00:00
Nina Chen
aea9d5c165 Update SELinux error
Test: SELinuxUncheckedDenialBootTest
Bug: 393978045
Flag: EXEMPT bugfix
Change-Id: Ia4d6c8c4bed73a687e7d1f0e35ead3b457810dea
2025-02-02 23:31:44 -08:00
Nina Chen
fee2572957 Update SELinux error
Test: SELinuxUncheckedDenialBootTest
Bug: 393956479
Flag: EXEMPT bugfix
Change-Id: I4c6257c1e1816f992053654f29c55ddecdbadb4c
2025-02-02 19:32:08 -08:00
Masha Chizhova
de3388502d Use 2025-03-01 deqp levels for Vulkan
Bug: 392805030
Flag: EXEMPT version updates
Change-Id: I2363141207673fb6f3a245f40065ab2938cc38c8
2025-01-31 11:39:43 +00:00
Priyanka Advani (xWF)
effb0f85b2 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: I4d09a125db5b5fdcdb1c22d27da510f8d8945870
2025-01-30 10:53:10 -08:00
Masha Chizhova
07898b75d8 Use 2025-03-01 deqp levels for GLES and Vulkan
Bug: 392805030
Flag: EXEMPT version updates
Change-Id: I9b717e9785c7cf7d9fc05dd54d52a60109853bd9
2025-01-29 18:21:49 +00:00
Piotr Klasa
9668f01a21 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: I1a02046901f33f3a45f5dfda1568275503ae9c22
2025-01-23 03:36:23 -08:00
Piotr Klasa
ef8acb1d89 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: Iaa850d2793ec0fd3131f9c27af4d7448a4ea90eb
2025-01-21 01:27:04 -08:00
Enzo Liao
b3796e625d RamdumpService: Fix the SELinux errors from introducing Firebase Analytics.
Fix it by ag/31334770 and remove the tracking bug number.

Bug: 386148928
Flag: EXEMPT bugfix
Change-Id: Ia3dcc3eca550b8317101bbf1d0b3ddbaa8afb234
2025-01-21 14:15:57 +08:00
Yi-Yo Chiang
4f8e58d6c3 init-display-sh: Don't audit writing to kmsg am: 50f433731d am: bea0f029c2
Original change: https://android-review.googlesource.com/c/device/google/gs201-sepolicy/+/3444145

Change-Id: If45f455ca30ddcdf3a474605fd7da1b181926a4a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-01-20 21:43:42 -08:00
Yi-Yo Chiang
d1e8b04c5d init-display-sh: Allow writing to kmsg am: 840c1c9e2f am: 51bcffcce8
Original change: https://android-review.googlesource.com/c/device/google/gs201/+/3442472

Change-Id: I50a3ad723fdd55964c69d7f70b4f5a449865d04c
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
bea0f029c2 init-display-sh: Don't audit writing to kmsg am: 50f433731d
Original change: https://android-review.googlesource.com/c/device/google/gs201-sepolicy/+/3444145

Change-Id: Ia1f1d860681badbbfd801f8f91be8da80eadac37
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
51bcffcce8 init-display-sh: Allow writing to kmsg am: 840c1c9e2f
Original change: https://android-review.googlesource.com/c/device/google/gs201/+/3442472

Change-Id: I87201721e71343f2a7a09edbc2748127e15539cf
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
50f433731d 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: Iaf1157a925e480ec3c8cdd00573f3d0a4ead355b
2025-01-20 01:37:20 -08:00
Piotr Klasa
987a1e0a99 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: I4b5ac2fb09533a87cf8dda9f2364d1fe8ab9acc9
2025-01-16 01:38:28 -08:00
Terry Huang
bf2b686059 Remove sced sepolicy rule
Bug: 381778782
Test: gts pass
Flag: EXEMPT bugfix

Change-Id: I523174b443f027ee112b153d5df566389815d43c
2025-01-14 23:40:42 -08:00
Hsiu-Chang Chen
4dd8c64713 Enable WIFI_FEATURE_HOSTAPD_11AX
In the past, the WIFI_FEATURE_HOSTAPD_11AX flag was ineffective.
Because hostapd takes the value of CONFIG_IEEE80211AX to enable
11ax mode on hotspot, the unset flag WIFI_FEATURE_HOSTAPD_11AX
went unnoticed.

However, after wpa_supplicant migrated from Android.mk to Android.bp,
it correctly evaluates WIFI_FEATURE_HOSTAPD_11AX to determine 11ax hotspot support. We need to set WIFI_FEATURE_HOSTAPD_11AX as true to
re-enable the 11ax mode on hotspot.

Bug: 389824755
Test: Hotspot is enabled in 11ax mode
Flag: EXEMPT bugfix
Change-Id: I635575b77a5f149605eaeb22046fbabe71955952
2025-01-13 23:26:45 -08:00
Xiaofan Jiang
68280fd949 gs201: 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: Id344d2e7537710461c6b3ca3e2b9f2489d695882
2025-01-10 11:37:06 -08:00
Nina Chen
a2bd3ad6ce Update SELinux error
Test: SELinuxUncheckedDenialBootTest
Flag: EXEMPT bugfix
Bug: 388949662
Bug: 388949536
Change-Id: I6e5624ddd51d195e49e28cecf0f18123c66c31c5
2025-01-09 19:26:14 -08:00
Spade Lee
e2813a4407 pixelstats: gs201: remove firmware update path
Bug: 386187651
Test: local test pass
Flag: EXEMPT refactor
Change-Id: I725b2c87cfff8b81915fa094678f7a56669cf095
Signed-off-by: Spade Lee <spadelee@google.com>
2025-01-09 12:16:04 -08:00
Yi-Yo Chiang
840c1c9e2f 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: I142a20b0af9008956ad2325caef70e85b1463f41
2025-01-09 18:42:20 +08:00
Nelson Li
ad503a0216 To ensure that gs201's init_dpm.sh is only built for gs201 devices.
After confirmation, devices where `USES_DEVICE_GOOGLE_GS201` is true
will ultimately include device/google/gs201/device.mk. Therefore,
setting PRODUCT_SOONG_NAMESPACES in this file can prevent misuse by
other devices.

Flag: EXEMPT refactor

Bug: 385999805
Test: lunch gs201 products; m -j init_dpm.sh
Change-Id: Ic4283242786222bbf734cea7d91f6d230e12b6f6
2025-01-08 19:37:51 -08:00
T.J. Mercier
912edf74cd Revert "Disable memcg"
This reverts commit e00a9b2099.

This is being temporarily reverted as part of a data-collection
experiment. We expect to reapply this before the final 25Q2 TOT snap.

Bug: 384577842
Flag: NONE Beta experiment: go/android-memcgv2-exp
Change-Id: I6b40e7c0e7de45011659a6d55f078904e569e5f3
2025-01-08 08:30:05 -08:00
Rick Yiu
bfd81c6907 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: I025a31b3303acc409b74e3f33ce589f68ae2385e
2025-01-06 19:16:18 -08:00
Android Build Coastguard Worker
4212b33b57 Snap for 12872597 from 56f1333908 to mainline-tzdata6-release
Change-Id: Id436fcb059b920e5431d10f3cd2952064a0e4071
2025-01-06 04:35:10 -08:00
Android Build Coastguard Worker
96bf97205d Snap for 12872597 from 341185cc5f to mainline-tzdata6-release
Change-Id: I2af416766cf19c67adc297e4b8200dbbcc04dfd2
2025-01-06 04:35:08 -08:00
Chris Lu
341185cc5f 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: Ieffe2c96ce2225560815158a8e89975e19f16499
2024-12-30 14:43:02 -08:00
YiKai Peng
56f1333908 sepolicy: gs201: add genfscon wireless into sysfs_batteryinfo
Bug: 377264254
Flag: EXEMPT bugfix
Test: ABTD
Change-Id: I4ec2350e7129e7630e6d6629a7f81820e679008e
Signed-off-by: YiKai Peng <kenpeng@google.com>
2024-12-30 06:56:39 -08:00
Hung-Yeh Lee
ff2584a9ac 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: I838f95abc934644063fd0c46e8106af4dbb105f8
2024-12-29 18:31:41 -08:00
Wilson Sung
6e58ad004d Update SELinux error
Test: SELinuxUncheckedDenialBootTest
Bug: 386303831
Flag: EXEMPT update sepolicy
Change-Id: I069f1df8349426695f850b5814da2a4455d83550
2024-12-26 23:22:50 -08:00
Wilson Sung
4206d28824 Update SELinux error
Test: SELinuxUncheckedDenialBootTest
Bug: 386148928
Flag: EXEMPT update sepolicy
Change-Id: I5366a1f150a6afa072494469112c5689be4438d8
2024-12-26 00:32:33 -08:00
Nelson Li
a0676aa9d8 Refactor: Use googleDeviceConfig namespace in gs201 BoardConfig
Replaces the `CitadelProvision` Soong config namespace with the more
generic `googleDeviceConfig` in
device/google/gs201/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: If4b3428b391762e65fbf6631f7bd60e02d73b250
2024-12-26 03:05:38 +00:00
Nina Chen
01b373e61f Update SELinux error.
Test: SELinuxUncheckedDenialBootTest
Bug: 385858933
Bug: 385858800

Bug: 385829048
Flag: EXEMPT bugfix
Change-Id: Ibbe27e7ab4239b0ae55b109a3e98bf78c1a95f64
2024-12-24 19:11:22 -08:00
Jack Wu
7270e65cfd 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: I366adec774866a9561067e1a3e42f9c794d3ccb8
Signed-off-by: Jack Wu <wjack@google.com>
2024-12-20 18:00:10 +08:00
Timmy Li
e93699de2a 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: I59f7b9e2dcbdb0ed9f6690bc1b53b0360c6a835f
2024-12-16 16:34:50 -08:00
timmyli
4f5612fc46 Remove hal_camera_default aconfig_storage_metadata_file bugmap
Bug: 383013727
Test: compiles manual test
Flag: EXEMPT refactor
Change-Id: Ib9de507763ea1c81b540e71d1ba85f7282977a3b
2024-12-16 10:14:00 -08:00
Paulsu Su
c74b1a6c60 Set initial value for foreground_window group
For multi-window foreground app group.

Bug: 200769420 
Change-Id: I2d9cd9d90e9011593c53facf5fd47a4414e3f1cf
Test: build pass
Flag: NONE vendor init file does not support flag
2024-12-16 04:23:58 -08:00
Xin Li
66cffc4aed [automerger skipped] Merge 24Q4 into AOSP main am: 7374ccc1b6 -s ours am: 368b6badea -s ours
am skip reason: Merged-In Ie4637b1295975c716f50333ad6635b9694a624b8 with SHA-1 3f3827410c is already in history

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

Change-Id: Ida4cbb613342231560f067b00b85d9d02738d7b8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-13 21:59:52 -08:00
Xin Li
97d8618f09 [automerger skipped] Merge 24Q4 into AOSP main am: aa57c8b0a1 -s ours am: b9794b0ff5 -s ours
am skip reason: Merged-In Ia05fc4592ebe3946a52e10e435bc8f8cef7becc9 with SHA-1 f0733782af is already in history

Original change: https://android-review.googlesource.com/c/device/google/gs201/+/3393979

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

Original change: https://android-review.googlesource.com/c/device/google/gs201/+/3413859

Change-Id: Ic88d188bd516b34760f2e99b19b068efb1e3ffae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-13 19:15:21 -08:00
Xin Li
368b6badea [automerger skipped] Merge 24Q4 into AOSP main am: 7374ccc1b6 -s ours
am skip reason: Merged-In Ie4637b1295975c716f50333ad6635b9694a624b8 with SHA-1 3f3827410c is already in history

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

Change-Id: I3074b59ac818c3797b3aa6f0c3b9bd480d1f2083
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-13 18:54:16 -08:00
Xin Li
7374ccc1b6 Merge 24Q4 into AOSP main
Bug: 370570306
Merged-In: Ie4637b1295975c716f50333ad6635b9694a624b8
Change-Id: Ic42c8b9e19f5a7e40b4c4814ffe1a2d7dbae79e8
2024-12-13 11:15:09 -08:00
Xin Li
aa57c8b0a1 Merge 24Q4 into AOSP main
Bug: 370570306
Merged-In: Ia05fc4592ebe3946a52e10e435bc8f8cef7becc9
Change-Id: I5e5c73eceaec0ce6c3cfca299ed43ede43b8f3e6
2024-12-13 11:15:09 -08:00
Nina Chen
e66afa8cd6 Update SELinux error
Test: SELinuxUncheckedDenialBootTest
Flag: EXEMPT sepolicy
Bug: 383949172
Change-Id: I93bce4c72d2190fc6636102c2167099e167dc354
2024-12-12 22:40:56 -08:00
chenkris
a8fbbdb7d7 gs201: 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: I0516b20ea21a4aed33026b9af4a3dae6bc8defd4
2024-12-12 18:36:53 -08:00
Piotr Klasa
8cca4af88c 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: I018b7b564bcc533212d2ada0dda85678c41feead
2024-12-12 04:08:53 -08:00
Chungkai Mei
dc10f550c0 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-11 16:48:30 -08:00
Daniel Lowe
796a10b440 [Pixel VPN] Apply reviewed default permissions
Pregrantting below permissions:
READ_PHONE_STATE

Flag: EXEMPT add permission pregranted in b/337725984
Bug: 373686360
Test: presubmit, manual install
Change-Id: I2f2cf9e1bd2e60dd04afac8fdf6d1c7f5f654778
2024-12-11 10:39:17 -08:00
Nina Chen
e41a25055a Update SELinux error
Test: SELinuxUncheckedDenialBootTest
Bug: 383438008
Flag: EXEMPT sepolicy
Change-Id: Ia2eb5910086ad0ee92d655ab39948eb47d262158
2024-12-11 05:34:14 +00:00
Android Build Coastguard Worker
3c5610d585 Snap for 12605939 from e4f334fece to mainline-tzdata6-release
Change-Id: If3f789fe5171d38182e89c9254ab0cbdeccf289b
2024-11-05 10:09:32 +00:00
Android Build Coastguard Worker
6c34dea406 Snap for 12605939 from 1b64d05d93 to mainline-tzdata6-release
Change-Id: I7b88a32568d0a86b55d56952018be45559a9c3db
2024-11-05 10:09:31 +00:00
Android Build Coastguard Worker
f40749fe0c Snap for 12462067 from 315cc63557 to mainline-tzdata6-release
Change-Id: I1ef08fafd820c3221745054f607c425680c7651f
2024-10-07 08:57:18 +00:00
Android Build Coastguard Worker
c2450863dc Snap for 12462067 from 3ab1329966 to mainline-tzdata6-release
Change-Id: I11a3fd4fec6c615e01f9351c9e55c7bf3560a3ad
2024-10-07 08:57:16 +00:00
Android Build Coastguard Worker
7853e15706 Snap for 12238800 from e8d359e8d4 to mainline-tzdata6-release
Change-Id: Ie7a274a3208a45ef9a7e8dc6910abb54a975e29c
2024-08-16 12:56:26 +00:00
Android Build Coastguard Worker
0670c69551 Snap for 12238800 from c62a6b812d to mainline-tzdata6-release
Change-Id: Idca54777e0319242a224f5a81c78829c2f932f2c
2024-08-16 12:56:21 +00:00
Android Build Coastguard Worker
0387ab94cc Snap for 12034474 from 548222aa57 to mainline-tzdata6-release
Change-Id: Ib42eda317e8bb65db26490377286702450d5e9c3
2024-07-01 08:33:47 +00:00
Android Build Coastguard Worker
f1f1a8c498 Snap for 12034474 from 0f55bf0d03 to mainline-tzdata6-release
Change-Id: I78d9973f44dca136bfd9bc7e3c3f4d64dd526330
2024-07-01 08:33:43 +00:00
Android Build Coastguard Worker
a5483f39e7 Snap for 11947112 from cab0d60115 to mainline-tzdata6-release
Change-Id: I39398276c1c4e0bab3001363d826399291a9276c
2024-06-10 10:12:40 +00:00
Android Build Coastguard Worker
f6b60f0f6c Snap for 11919022 from d279e5fbfd to mainline-tzdata6-release
Change-Id: Ic8975c28e71c354f6c6e11e6f736dab015f8079d
2024-06-03 15:30:39 +00:00
Android Build Coastguard Worker
cf193ea99b Snap for 11919022 from 2a0c178a14 to mainline-tzdata6-release
Change-Id: I875b206a81db43a50f559ef7564682d689f74fd2
2024-06-03 15:30:38 +00:00
Android Build Coastguard Worker
d62a99d8d0 Snap for 11607654 from 269f1640d8 to mainline-tzdata6-release
Change-Id: Ia5d81a5c22ae3f4c13631b5de3986e17888162e8
2024-03-21 12:27:17 +00:00
Android Build Coastguard Worker
e9054b9e04 Snap for 11607654 from 66f9bd483b to mainline-tzdata6-release
Change-Id: Ib41142a442665ca09b03eb2abf1ade8146a32798
2024-03-21 12:27:16 +00:00
Android Build Coastguard Worker
1c9c31db95 Snap for 11595244 from b579c61002 to mainline-tzdata6-release
Change-Id: Iaf6be624e5594731eab910e2a716dea4ca9f0bcf
2024-03-19 17:12:50 +00:00
64 changed files with 201 additions and 2225 deletions

View File

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

View File

@@ -22,7 +22,7 @@ TARGET_SOC := gs201
TARGET_SOC_NAME := google
USES_DEVICE_GOOGLE_GS201 := true
$(call soong_config_set,CitadelProvision,target_soc,gs201)
$(call soong_config_set,googleDeviceConfig,target_soc,gs201)
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-2a
@@ -46,7 +46,6 @@ TARGET_2ND_CPU_VARIANT_RUNTIME := cortex-a53
BOARD_KERNEL_CMDLINE += dyndbg=\"func alloc_contig_dump_pages +p\"
BOARD_KERNEL_CMDLINE += earlycon=exynos4210,0x10A00000 console=ttySAC0,115200 androidboot.console=ttySAC0 printk.devkmsg=on
BOARD_KERNEL_CMDLINE += cma_sysfs.experimental=Y
BOARD_KERNEL_CMDLINE += cgroup_disable=memory
BOARD_KERNEL_CMDLINE += rcupdate.rcu_expedited=1 rcu_nocbs=all rcutree.enable_rcu_lazy
BOARD_KERNEL_CMDLINE += stack_depot_disable=off page_pinner=on
BOARD_KERNEL_CMDLINE += swiotlb=1024
@@ -237,12 +236,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
@@ -439,8 +432,5 @@ BOARD_KERNEL_CMDLINE += log_buf_len=1024K
# Protected VM firmware
BOARD_PVMFWIMAGE_PARTITION_SIZE := 0x00100000
# pick up library for cleaning digital car keys on factory reset
-include vendor/google_devices/gs-common/proprietary/BoardConfigVendor.mk
include device/google/gs201/BoardConfigLineage.mk
include device/google/gs201/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/gs201/android.hardware.security.rkp-service.citadel.xml
ifneq ($(BOARD_WITHOUT_RADIO),true)
DEVICE_MANIFEST_FILE += device/google/gs201/manifest_radio_ds.xml

View File

@@ -1,85 +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)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.usb.gadget-service)
$(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.rc)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.usb-servic.xml)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.usb.gadget-servic.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.gs201)
$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/etc/init/android.hardware.power.stats@1.0-service.gs201.rc)
$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.power.stats@1.0-service.gs201.xml)
# 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)

2
OWNERS
View File

@@ -1,2 +0,0 @@
# 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/telephony_vendor.mk)
endif
#$(call inherit-product, device/google/gs201/device.mk)
#$(call inherit-product-if-exists, vendor/google_devices/gs201/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,15 +0,0 @@
#!/vendor/bin/sh
# This script sets up `ro.vendor.sjtag_ap_is_unlocked` for the non-fused
# device. For a fused device, this property should be set by
# betterbug->ss-restart-detector when PD is acquired.
SJTAG_STATUS=0x$(cat /sys/devices/platform/sjtag_ap/interface/status)
SOFT_LOCK_BIT=4
AUTH_PASS_BIT=8
# Unlocked or locked but auth passed.
if test "$((SJTAG_STATUS & (1 << SOFT_LOCK_BIT)))" = 0 -o \
"$((SJTAG_STATUS & (1 << AUTH_PASS_BIT)))" != 0 ; then
setprop ro.vendor.sjtag_ap_is_unlocked true
fi

View File

@@ -1,60 +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
# HSUM separated main user from the SYSTEM user, granting write permissions
# for write only SJTAG sysfs files
chmod 220 /sys/devices/platform/sjtag_ap/interface/auth
chmod 220 /sys/devices/platform/sjtag_ap/interface/begin
chmod 220 /sys/devices/platform/sjtag_ap/interface/end
chmod 220 /sys/devices/platform/sjtag_gsa/interface/auth
chmod 220 /sys/devices/platform/sjtag_gsa/interface/begin
chmod 220 /sys/devices/platform/sjtag_gsa/interface/end
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
# Bluetooth
on post-fs-data
chown bluetooth system /dev/logbuffer_btlpm
chown bluetooth system /dev/logbuffer_btpower
chown bluetooth system /dev/logbuffer_tty18
# pKVM performance is different on A0 and B0 chips.
# Add extra tag to metrics collected on A0 to separate the results.
on property:ro.revision=PROTO1.0
setprop debug.hypervisor.metrics_tag "hwrev_a0"
on property:ro.revision=PROTO1.1
setprop debug.hypervisor.metrics_tag "hwrev_a0"
on property:ro.revision=EVT1.0
setprop debug.hypervisor.metrics_tag "hwrev_a0"
service vendor.check_ap_pd_auth_sh /vendor/bin/init.check_ap_pd_auth.sh
class main
user root
group root system
oneshot
# Enable etm/etm2dram when ramdump is enabled, and ap-sjtag is unlocked.
on property:ro.boot.ramdump=enabled && property:ro.vendor.sjtag_ap_is_unlocked=true
write /sys/devices/platform/exynos-etm/etm_on 1
write /sys/devices/platform/etm2dram/arm 1

View File

@@ -19,36 +19,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
@@ -70,116 +40,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-4-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
@@ -245,15 +107,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
@@ -272,11 +125,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
@@ -372,10 +220,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
@@ -752,33 +596,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
@@ -797,12 +621,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
# Make devices on the critical path for suspend/resume asynchronous
write /sys/devices/platform/acpm_mfd_bus@18110000/i2c-21/21-002f/power/async "enabled"
write /sys/devices/platform/acpm_mfd_bus@18110000/i2c-21/power/async "enabled"
@@ -818,18 +636,6 @@ on property:sys.boot_completed=1
write /sys/devices/platform/18062080.pd-hsi0/power/async "enabled"
write /sys/devices/platform/14460000.pinctrl/power/async "enabled"
# 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
@@ -920,6 +726,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
@@ -1085,6 +892,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=*
@@ -1093,3 +902,14 @@ on property:persist.device_config.vendor_system_native.restricted_cpuset=*
write /dev/cpuset/restricted/cpus ${persist.device_config.vendor_system_native.restricted_cpuset:-0-3}
on property:persist.device_config.vendor_system_native.camera-daemon_cpuset=*
write /dev/cpuset/camera-daemon/cpus ${persist.device_config.vendor_system_native.camera-daemon_cpuset:-0-7}
# 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/gs201/proprietary/telephony/device-vendor.mk
endif
include device/google/gs201/device.mk
ifneq ($(BOARD_WITHOUT_RADIO),true)

218
device.mk
View File

@@ -19,13 +19,15 @@ include device/google/gs-common/gs_watchdogd/watchdog.mk
include device/google/gs-common/ramdump_and_coredump/ramdump_and_coredump.mk
include device/google/gs-common/soc/soc.mk
include device/google/gs-common/soc/freq.mk
include device/google/gs-common/modem/modem.mk
ifneq ($(BOARD_WITHOUT_RADIO),true)
include device/google/gs-common/modem/modem.mk
endif
include device/google/gs-common/aoc/aoc.mk
include device/google/gs-common/thermal/dump/thermal.mk
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/display/dump.mk
include device/google/gs-common/display/dump_exynos_display.mk
include device/google/gs-common/camera/dump.mk
include device/google/gs-common/gxp/gxp.mk
include device/google/gs-common/gps/dump/log.mk
@@ -35,13 +37,13 @@ include device/google/gs-common/gear/dumpstate/aidl.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 cheetah felix panther, $(TARGET_PRODUCT)),)
ifneq ($(filter %_cheetah %_felix %_panther, $(TARGET_PRODUCT)),)
include device/google/gs-common/bcmbt/dump/dumplog.mk
endif
include device/google/gs-common/fingerprint/fingerprint.mk
include device/google/gs-common/nfc/nfc.mk
TARGET_BOARD_PLATFORM := gs201
@@ -52,10 +54,10 @@ 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
# TODO(b/207450311): Remove this flag once implemented
USE_PIXEL_GRALLOC := false
@@ -65,22 +67,10 @@ endif
PRODUCT_SOONG_NAMESPACES += \
hardware/google/av \
hardware/google/gchips \
hardware/google/gchips/gralloc4 \
hardware/google/graphics/common \
hardware/google/graphics/gs201 \
hardware/google/interfaces \
hardware/google/pixel \
device/google/gs201 \
device/google/gs201/powerstats \
vendor/google_devices/common/chre/host/hal \
vendor/google/whitechapel/tools \
vendor/google/interfaces \
vendor/google_nos/host/android \
vendor/google_nos/test/system-test-harness \
vendor/google/camera
LOCAL_KERNEL := $(TARGET_KERNEL_DIR)/Image.lz4
device/google/gs201/powerstats
ifeq ($(RELEASE_AVF_ENABLE_LLPVM_CHANGES),true)
# Set the environment variable to enable the Secretkeeper HAL service.
@@ -91,41 +81,6 @@ endif
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/gs201/modem/userdebug.mk
endif
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 \
@@ -212,7 +167,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
@@ -248,9 +202,6 @@ else
TARGET_USES_VULKAN = true
endif
PRODUCT_SOONG_NAMESPACES += \
vendor/arm/mali/valhall
$(call soong_config_set,pixel_mali,soc,$(TARGET_BOARD_PLATFORM))
include device/google/gs-common/gpu/gpu.mk
@@ -283,8 +234,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_PACKAGES += \
@@ -345,16 +296,12 @@ DEVICE_PACKAGE_OVERLAYS += device/google/gs201/overlay
# This device is shipped with 33 (Android T)
PRODUCT_SHIPPING_API_LEVEL := 33
# RKP VINTF
-include vendor/google_nos/host/android/hals/keymaster/aidl/strongbox/RemotelyProvisionedComponent-citadel.mk
# Enforce the Product interface
PRODUCT_PRODUCT_VNDK_VERSION := current
PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE := true
# Init files
PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel \
device/google/gs201/conf/init.gs201.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.gs201.usb.rc \
device/google/gs201/conf/ueventd.gs201.rc:$(TARGET_COPY_OUT_VENDOR)/etc/ueventd.rc
@@ -369,12 +316,6 @@ PRODUCT_COPY_FILES += \
device/google/gs201/storage/6.1/init.gs201.storage.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.gs201.storage.rc
endif
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_COPY_FILES += \
device/google/gs201/conf/init.debug.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.debug.rc \
device/google/gs201/conf/init.check_ap_pd_auth.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.check_ap_pd_auth.sh
endif
# Recovery files
PRODUCT_COPY_FILES += \
device/google/gs201/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.gs201.rc
@@ -405,14 +346,6 @@ PRODUCT_HOST_PACKAGES += \
mkdtimg
# 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 += \
@@ -436,13 +369,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
# RPMB TA
PRODUCT_PACKAGES += \
@@ -491,13 +419,6 @@ PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.telephony.euicc.mep.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/android.hardware.telephony.euicc.mep.xml
endif
# default usb debug functions
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.usb.usbradio.config=dm
endif
PRODUCT_COPY_FILES += \
device/google/gs201/task_profiles.json:$(TARGET_COPY_OUT_VENDOR)/etc/task_profiles.json
@@ -604,12 +525,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
@@ -635,9 +550,6 @@ ifeq (,$(filter true, $(BOARD_WITHOUT_DTLS)))
include device/google/gs-common/dauntless/gsc.mk
endif
PRODUCT_PACKAGES_ENG += \
WvInstallKeybox
# Copy Camera HFD Setfiles
#PRODUCT_COPY_FILES += \
device/google/gs201/firmware/camera/libhfd/default_configuration.hfd.cfg.json:$(TARGET_COPY_OUT_VENDOR)/firmware/default_configuration.hfd.cfg.json \
@@ -689,10 +601,6 @@ PRODUCT_PROPERTY_OVERRIDES += \
debug.slsi_platform=1 \
debug.hwc.winupdate=1
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 \
@@ -767,11 +675,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
####################################
@@ -842,21 +745,11 @@ $(call inherit-product, system/core/trusty/trusty-base.mk)
# Trusty dump
include device/google/gs-common/trusty/trusty.mk
# Trusty unit test and code coverage tool
PRODUCT_PACKAGES_ENG += \
trusty-ut-ctrl \
tipc-test \
trusty_stats_test \
trusty-coverage-controller \
# Trusty Secure DPU Daemon
PRODUCT_PACKAGES += \
securedpud.slider
# Trusty Metrics Daemon
PRODUCT_SOONG_NAMESPACES += \
vendor/google/trusty/common
PRODUCT_PACKAGES += \
trusty_metricsd
@@ -870,15 +763,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
#VNDK
PRODUCT_PACKAGES += \
@@ -914,12 +801,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 \
@@ -933,14 +814,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
PRODUCT_PACKAGES_ENG += \
preinstalled-packages-product-gs201-device-debug.xml
PRODUCT_PACKAGES += ShannonRcs
endif
@@ -960,12 +835,7 @@ USE_SE_HIDL := true
# Using Early Send Device Info
USE_EARLY_SEND_DEVICE_INFO := true
#$(call inherit-product, vendor/google_devices/telephony/common/device-vendor.mk)
#$(call inherit-product, vendor/google_devices/gs201/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)
# modem logging binary/configs
PRODUCT_PACKAGES += modem_logging_control
@@ -978,13 +848,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 += \
@@ -1001,10 +866,7 @@ endif
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk)
#$(call inherit-product, hardware/google_devices/exynos5/exynos5.mk)
#$(call inherit-product-if-exists, hardware/google_devices/gs201/gs201.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,gs201)
@@ -1022,13 +884,6 @@ PRODUCT_COPY_FILES += \
device/google/$(TARGET_BOARD_PLATFORM)/radio/config/Pixel_stability.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/modem/Pixel_stability.cfg \
device/google/$(TARGET_BOARD_PLATFORM)/radio/config/Pixel_stability.nprf:$(TARGET_COPY_OUT_VENDOR)/etc/modem/Pixel_stability.nprf \
# Vibrator Diag
PRODUCT_PACKAGES_ENG += \
diag-vibrator \
diag-vibrator-cs40l25a \
diag-vibrator-drv2624 \
$(NULL)
PRODUCT_PACKAGES += \
android.hardware.health-service.gs201 \
android.hardware.health-service.gs201_recovery \
@@ -1038,9 +893,6 @@ PRODUCT_PACKAGES += \
include device/google/gs-common/audio/hidl_gs201.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))
@@ -1065,22 +917,6 @@ endif
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 \
mahal_test \
ma_aoc_tuning_test \
crus_sp_cal
endif
PRODUCT_PACKAGES += \
google.hardware.media.c2@1.0-service \
libgc2_store \
@@ -1091,7 +927,7 @@ PRODUCT_PACKAGES += \
libgc2_utils
## Start packet router
include device/google/gs101/telephony/pktrouter.mk
include device/google/gs-common/telephony/pktrouter.mk
# Thermal HAL
PRODUCT_PROPERTY_OVERRIDES += persist.vendor.enable.thermal.genl=true
@@ -1100,16 +936,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,janeiro)
# Include the edgetpu targets defined the namespaces below into the final image.
PRODUCT_SOONG_NAMESPACES += \
vendor/google_devices/gs201/proprietary/gchips/tpu/metrics \
vendor/google_devices/gs201/proprietary/gchips/tpu/tflite_delegate \
vendor/google_devices/gs201/proprietary/gchips/tpu/darwinn_logging_service \
vendor/google_devices/gs201/proprietary/gchips/tpu/nnapi_stable_aidl \
vendor/google_devices/gs201/proprietary/gchips/tpu/aidl \
vendor/google_devices/gs201/proprietary/gchips/tpu/hal \
vendor/google_devices/gs201/proprietary/gchips/tpu/tachyon/tachyon_apis \
vendor/google_devices/gs201/proprietary/gchips/tpu/tachyon/service
# TPU firmware
PRODUCT_PACKAGES += edgetpu-janeiro.fw
@@ -1163,8 +990,6 @@ USES_RADIOEXT_V1_5 = true
# Wifi ext
include hardware/google/pixel/wifi_ext/device.mk
# Battery Stats Viewer
PRODUCT_PACKAGES_ENG += BatteryStatsViewer
include device/google/gs201/dumpstate/item.mk
# Install product specific framework compatibility matrix
@@ -1172,21 +997,6 @@ include device/google/gs201/dumpstate/item.mk
# It must be split into the FCM of each partition.
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs201/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
# Keymint 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

@@ -1,6 +1,10 @@
[
{
"repository": "device_google_gs101",
"target_path": "device/google/gs101"
"repository": "device_google_gs-common",
"target_path": "device/google/gs-common"
},
{
"repository": "packages_apps_PixelParts",
"target_path": "packages/apps/PixelParts"
}
]

View File

@@ -5,4 +5,4 @@
#
# PixelParts
include packages/apps/PixelParts/device.mk
#include packages/apps/PixelParts/device.mk

View File

@@ -1,25 +0,0 @@
//
// Copyright (C) 2022 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 {
default_applicable_licenses: ["Android-Apache-2.0"],
}
sh_binary {
name: "factory_post_boot",
src: "factory_post_boot.sh",
vendor: true,
sub_dir: "factory",
}

View File

@@ -1,4 +0,0 @@
#!/vendor/bin/sh
# Add adbd to nnapi vendor cgroup. (b/222226268)
echo `pidof adbd` > /proc/vendor_sched/set_task_group_nnapi

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/gs201:device_google_gs201_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: [
"//device/google/gs201:device_google_gs201_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/gs201:device_google_gs201_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: [
"//device/google/gs201:device_google_gs201_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,41 +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, Capacity, ELabel, Language, Barcode -->
<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="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/gs201:device_google_gs201_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: [
"//device/google/gs201:device_google_gs201_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,85 +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/gs201/aosp_common.mk)
$(call inherit-product-if-exists, vendor/google_devices/gs201/factory/pixel/device-factory.mk)
PRODUCT_PROPERTY_OVERRIDES += service.adb.root=1 \
ro.vendor.factory=1
# 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 += \
vendor.camera.debug.bypass_face_ssd_processor=1 \
vendor.camera.debug.csi_ebuf_enable=0 \
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_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.force_segmentation_node_on=0 \
vendor.camera.debug.enable_saliency=0 \
vendor.camera.debug.force_local_tone_mapping_on=0 \
vendor.camera.debug.local_tone_mapping_controller_v1.mode=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 DebugFS restrictions in factory builds
PRODUCT_SET_DEBUGFS_RESTRICTIONS := false
# Disable Bluetooth as default in factory build
DEVICE_PACKAGE_OVERLAYS += device/google/gs201/overlay-factory
PRODUCT_COPY_FILES += \
device/google/gs201/conf/init.factory.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.factory.rc
BOARD_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/factory_boost
# Add factory-friendly changes
PRODUCT_PACKAGES += \
FactoryOverlaySettings \
FactoryOverlayLauncher3 \
FactoryOverlayFrameworkRes \
factory_post_boot
# To prevent rebooting due to crashing services
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
init.svc_debug.no_fatal.zygote=true \
persist.device_config.configuration.disable_rescue_party=true
# PixelLogger for RF testing
PRODUCT_PACKAGES_ENG += \
PixelLogger \

View File

@@ -1,18 +0,0 @@
# ----------------------------
# Add feature flags below
# ----------------------------
FPC_CONFIG_BUILD_VERSION=33
FPC_CONFIG_CAPACITIVE=1
FPC_CONFIG_MAX_NR_TEMPLATES=5
FPC_CONFIG_SENSE_TOUCH_CALIBRATION_PATH=/data/fpc/calibration_sense_touch.dat
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_PRODUCT_DEFAULT=FPC_PRODUCT_TYPE1541_S
#
# File included from device/<manufacture>/<>/<device>.mk
# Packages to include into the build

View File

@@ -1,21 +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
#
# File included from device/<manufacture>/<>/<device>.mk
# Packages to include into the build

View File

@@ -1,27 +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_gs201_license"],
}
cc_binary {
srcs: [
"fp_test.cpp"
],
local_include_dirs: ["."],
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,8 +0,0 @@
# Fingerprint
include device/google/gs201/fingerprint/fpc1540/fingerprint_config.mk
PRODUCT_PACKAGES += \
android.hardware.biometrics.fingerprint@2.1-service.fpc \
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml

View File

@@ -1,10 +0,0 @@
# Fingerprint
include device/google/gs201/fingerprint/fpc1540/fingerprint_config_factory.mk
PRODUCT_PACKAGES += \
fpc_tee_test\
SensorTestTool \
PRODUCT_PACKAGES += \
com.fingerprints.extension.xml \
com.fingerprints.extension \

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,3 +0,0 @@
ifneq ($(BOARD_WITHOUT_RADIO),true)
PRODUCT_PACKAGES += vcd
endif

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

@@ -241,12 +241,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. -->
@@ -315,4 +309,12 @@
<!-- 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>
<!-- Whether to enable APDU sender optimization i.e. a logical channel is opened and
kept open for multiple APDU commands within one session.-->
<bool name="euicc_optimize_apdu_sender">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/gs201:device_google_gs201_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: [
"//device/google/gs201:device_google_gs201_license",
],
}
cc_binary {
name: "pixelstats-vendor",
init_rc: ["pixelstats-vendor.gs201.rc"],
srcs: [
"service.cpp",
],
shared_libs: [
"libbase",
"liblog",
"libutils",
"libpixelstats",
],
proprietary: true,
static_libs: ["chre_client"],
header_libs: ["chre_api"],
}

View File

@@ -1,11 +0,0 @@
on property:sys.boot_completed=1
chown system system /sys/class/power_supply/maxfg_base/fg_learning_events
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,125 +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>
#include <pixelstats/SysfsCollector.h>
#include <pixelstats/UeventListener.h>
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",
.MitigationDurationPath = "/sys/devices/virtual/pmic/mitigation/irq_dur_cnt",
.BrownoutReasonProp = "vendor.brownout_reason",
.BrownoutLogPath = "/data/vendor/mitigation/lastmeal.txt",
.SpeakerTemperaturePath = "/sys/devices/platform/audiometrics/speaker_temp",
.SpeakerExcursionPath = "/sys/devices/platform/audiometrics/speaker_excursion",
.SpeakerHeartBeatPath = "/sys/devices/platform/audiometrics/speaker_heartbeat",
.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)
},
.BlockStatsLength = BLOCK_STATS_LENGTH,
.AmsRatePath = "/sys/devices/platform/audiometrics/ams_rate_read_once",
.MitigationPath = "/sys/devices/virtual/pmic/mitigation",
.ThermalStatsPaths = {
"/sys/devices/platform/100a0000.BIG/trip_counter",
"/sys/devices/platform/100a0000.MID/trip_counter",
"/sys/devices/platform/100a0000.LITTLE/trip_counter",
"/sys/devices/platform/100b0000.G3D/trip_counter",
"/sys/devices/platform/100b0000.TPU/trip_counter",
"/sys/devices/platform/100b0000.AUR/trip_counter",
},
.CCARatePath = "/sys/devices/platform/audiometrics/cca_count_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"
}
},
.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",
.ModemPcieLinkStatsPath = "/sys/devices/platform/11920000.pcie/link_stats",
.WifiPcieLinkStatsPath = "/sys/devices/platform/14520000.pcie/link_stats",
.GMSRPath = {
"/sys/class/power_supply/maxfg/gmsr",
"/sys/class/power_supply/maxfg_base/gmsr",
},
.FGModelLoadingPath = {
"/sys/class/power_supply/maxfg/m5_model_state",
"/sys/class/power_supply/maxfg_base/m5_model_state"
},
.FGLogBufferPath = {
"/dev/logbuffer_maxfg_monitor",
"/dev/logbuffer_max77779fg_monitor",
"/dev/logbuffer_maxfg_base_monitor",
"/dev/logbuffer_maxfg_secondary_monitor"
},
.TotalCallCountPath = "/sys/devices/platform/audiometrics/call_count"
};
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,37 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2022 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 gs201 debug devices, per user type.
Documentation at frameworks/base/data/etc/preinstalled-packages-platform.xml
-->
<config>
<!-- Battery Stats Viewer -->
<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>
<!-- RCS (Rich Communication Services)
TODO(b/259401601): Check if this should be preinstalled for SYSTEM user -->
<install-in-user-type package="com.google.android.sample.rcsclient">
<install-in user-type="SYSTEM" />
<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

@@ -4,7 +4,12 @@ dump_display sysfs file b/350831939
dump_modem sscoredump_vendor_data_coredump_file dir b/361726277
dump_modem sscoredump_vendor_data_logcat_file dir b/361726277
dumpstate unlabeled file b/350832009
hal_audio_default hal_audio_default binder b/395745737
hal_bluetooth_synabtlinux device chr_file b/386303831
hal_camera_default aconfig_storage_metadata_file dir b/383013727
hal_contexthub_default hal_bluetooth_service service_manager b/396573096
hal_drm_widevine system_userdir_file dir b/393956479
hal_drm_widevine widevine_sys_vendor_prop file b/393956479
hal_face_default traced_producer_socket sock_file b/305600808
hal_power_default hal_power_default capability b/237492146
hal_sensors_default property_socket sock_file b/373755350
@@ -12,15 +17,22 @@ hal_sensors_default sysfs file b/336451433
incidentd debugfs_wakeup_sources file b/282626428
incidentd incidentd anon_inode b/282626428
init init capability b/379206608
init-display-sh kmsg_device chr_file b/388949662
insmod-sh insmod-sh key b/336451874
insmod-sh kmsg_device chr_file b/388949536
insmod-sh vendor_edgetpu_debugfs dir b/385858933
kernel dm_device blk_file b/319403445
kernel kernel capability b/336451113
kernel tmpfs chr_file b/321731318
pixelstats_vendor block_device dir b/369540701
pixelstats_vendor chre_socket sock_file b/400298488
platform_app bluetooth_lea_mode_prop file b/402595629
platform_app vendor_fw_file dir b/377811773
platform_app vendor_rild_prop file b/377811773
priv_app audio_config_prop file b/379246129
priv_app metadata_file dir b/383438008
ramdump ramdump capability b/369475655
ramdump_app default_prop file b/386148928
rfsd vendor_cbd_prop file b/317734397
shell sysfs_net file b/329380891
ssr_detector_app default_prop file b/359428005
@@ -37,4 +49,5 @@ vendor_init default_prop file b/329381126
vendor_init default_prop property_service b/315104803
vendor_init default_prop property_service b/359427666
vendor_init default_prop property_service b/359428317
zygote aconfig_storage_metadata_file dir b/383949172
zygote zygote capability b/379206941

View File

@@ -1,7 +1,6 @@
# Binaries
/vendor/bin/dmd u:object_r:dmd_exec:s0
/vendor/bin/modem_logging_control u:object_r:modem_logging_control_exec:s0
/vendor/bin/sced u:object_r:sced_exec:s0
/vendor/bin/vcd u:object_r:vcd_exec:s0
/vendor/bin/chre u:object_r:chre_exec:s0
/vendor/bin/cbd u:object_r:cbd_exec:s0
@@ -82,6 +81,7 @@
/dev/janeiro u:object_r:edgetpu_device:s0
/dev/bigocean u:object_r:video_device:s0
/dev/goodix_fp u:object_r:fingerprint_device:s0
/dev/fth_fd u:object_r:fingerprint_device:s0
/dev/ispolin_ranging u:object_r:rls_device:s0
/dev/watchdog0 u:object_r:watchdog_device:s0
/dev/mali0 u:object_r:gpu_device:s0

View File

@@ -212,6 +212,10 @@ genfscon sysfs /devices/platform/google,battery/power_supply/battery
genfscon sysfs /devices/platform/google,cpm u:object_r:sysfs_batteryinfo:s0
genfscon sysfs /devices/platform/google,charger u:object_r:sysfs_batteryinfo:s0
genfscon sysfs /devices/platform/10d60000.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
genfscon sysfs /devices/pseudo_0/adapter0/host1/target1:0:0/1:0:0:0/block/sde u:object_r:sysfs_devices_block:s0
# P22 battery
@@ -275,6 +279,9 @@ genfscon sysfs /devices/platform/odm/odm:btbcm/wakeup
genfscon sysfs /devices/platform/sound-aoc/wakeup u:object_r:sysfs_wakeup:s0
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
#SecureElement
genfscon sysfs /devices/platform/181c0000.spi/spi_master/spi17/spi17.0/st33spi u:object_r:sysfs_st33spi:s0
@@ -353,3 +360,6 @@ genfscon sysfs /devices/platform/10940000.spi/spi_master/spi5/spi5.0/nstandby
# WLC
genfscon sysfs /devices/platform/10da0000.hsi2c/i2c-15/15-003c u:object_r:sysfs_wlc:s0
# USB
genfscon sysfs /devices/platform/11210000.usb/11210000.dwc3/udc/11210000.dwc3/state u:object_r:sysfs_udc:s0

View File

@@ -33,3 +33,4 @@ allow hal_usb_impl usb_device:dir r_dir_perms;
# 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

@@ -52,6 +52,4 @@ 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;
userdebug_or_eng(`
init_daemon_domain(sced)
typeattribute sced vendor_executes_system_violators;
hwbinder_use(sced)
binder_call(sced, dmd)
binder_call(sced, vendor_telephony_silentlogging_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,6 +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
vendor.google.wireless_charger.IWirelessCharger/default u:object_r:hal_wireless_charger_service:s0
rlsservice u:object_r:rls_service:s0

View File

@@ -10,7 +10,6 @@ allow vendor_telephony_silentlogging_app vendor_slog_file:file create_file_perms
allow vendor_telephony_silentlogging_app app_api_service:service_manager find;
allow vendor_telephony_silentlogging_app hal_vendor_oem_hwservice:hwservice_manager find;
binder_call(vendor_telephony_silentlogging_app, dmd)
binder_call(vendor_telephony_silentlogging_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

@@ -34,7 +34,6 @@ cc_binary {
srcs: [
"service.cpp",
"Usb.cpp",
"UsbDataSessionMonitor.cpp",
],
shared_libs: [
"libbase",
@@ -60,18 +59,13 @@ cc_binary {
],
static_libs: [
"libpixelusb-aidl",
"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

@@ -101,11 +101,17 @@ constexpr char kUdcUeventRegex[] =
constexpr char kUdcStatePath[] =
"/sys/devices/platform/11210000.usb/11210000.dwc3/udc/11210000.dwc3/state";
constexpr char kHost1UeventRegex[] =
"/devices/platform/11210000.usb/11210000.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/11210000.usb/11210000.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/11210000.usb/11210000.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/11210000.usb/11210000.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 kHubHost1UeventRegex[] =
"/devices/platform/11210000.usb/11210000.dwc3/xhci-hcd-exynos.[0-9].auto/usb1/1-1/1-1:1.0";
constexpr char kHubHost1StatePath[] = "/sys/bus/usb/devices/usb1/1-1/1-1:1.0/1-1-port1/state";
constexpr char kHubHost2UeventRegex[] =
"/devices/platform/11210000.usb/11210000.dwc3/xhci-hcd-exynos.[0-9].auto/usb1/1-1/1-1:1.0";
constexpr char kHubHost2StatePath[] = "/sys/bus/usb/devices/usb1/1-1/1-1:1.0/1-1-port2/state";
constexpr char kDataRolePath[] = "/sys/devices/platform/11210000.usb/new_data_role";
constexpr int kSamplingIntervalSec = 5;
@@ -474,6 +480,12 @@ bool switchMode(const string &portName, const PortRole &in_role, struct Usb *usb
return roleSwitch;
}
void updatePortStatus(android::hardware::usb::Usb *usb) {
std::vector<PortStatus> currentPortStatus;
queryVersionHelper(usb, &currentPortStatus);
}
static int getInternalHubUniqueId() {
string internalHubDevnum;
int devnum = 0, internalHubUniqueId = -1;
@@ -483,10 +495,9 @@ static int getInternalHubUniqueId() {
return internalHubUniqueId;
}
static Status tuneInternalHub(const char *devname, void* client_data) {
static Status tuneInternalHub(const char *devname, android::hardware::usb::Usb *usb) {
uint16_t vendorId, productId;
struct usb_device *device;
::aidl::android::hardware::usb::Usb *usb;
int value, index;
device = usb_device_open(devname);
@@ -495,7 +506,6 @@ static Status tuneInternalHub(const char *devname, void* client_data) {
return Status::ERROR;
}
usb = (::aidl::android::hardware::usb::Usb *)client_data;
value = usb->mUsbHubVendorCmdValue;
index = usb->mUsbHubVendorCmdIndex;
@@ -518,20 +528,46 @@ static Status tuneInternalHub(const char *devname, void* client_data) {
}
static int usbDeviceRemoved(const char *devname, void* client_data) {
string pogoEnableHub;
::aidl::android::hardware::usb::Usb *usb;
usb = (::aidl::android::hardware::usb::Usb *)client_data;
if (usb->mIntHubEnabled == true && ReadFileToString(kPogoEnableHub, &pogoEnableHub)
&& Trim(pogoEnableHub) == "0") {
ALOGI("Internal hub disabled");
usb->mIntHubEnabled = false;
usb->mUsbDataSessionMonitor.reset(new UsbDataSessionMonitor(kUdcUeventRegex, kUdcStatePath,
kHost1UeventRegex, kHost1StatePath, kHost2UeventRegex,
kHost2StatePath, kDataRolePath,
std::bind(&updatePortStatus, usb)));
}
return 0;
}
static int usbDeviceAdded(const char *devname, void* client_data) {
string pogoEnableHub;
int uniqueId = 0;
::aidl::android::hardware::usb::Usb *usb;
usb = (::aidl::android::hardware::usb::Usb *)client_data;
// Enable hub tuning when the pogo dock is connected.
if (ReadFileToString(kPogoEnableHub, &pogoEnableHub) && Trim(pogoEnableHub) == "1") {
// If enable_hub is set to 1, the internal hub is the first enumearted device on bus 1 and
// port 1.
uniqueId = usb_device_get_unique_id_from_name(devname);
if (uniqueId == getInternalHubUniqueId())
tuneInternalHub(devname, client_data);
if (uniqueId == getInternalHubUniqueId()) {
ALOGI("Internal hub enabled");
usb->mIntHubEnabled = true;
tuneInternalHub(devname, usb);
usb->mUsbDataSessionMonitor.reset(new UsbDataSessionMonitor(kUdcUeventRegex,
kUdcStatePath, kHubHost1UeventRegex,
kHubHost1StatePath, kHubHost2UeventRegex,
kHubHost2StatePath, kDataRolePath,
std::bind(&updatePortStatus, usb)));
}
}
return 0;
@@ -554,20 +590,14 @@ void *usbHostWork(void *param) {
return NULL;
}
void updatePortStatus(android::hardware::usb::Usb *usb) {
std::vector<PortStatus> currentPortStatus;
queryVersionHelper(usb, &currentPortStatus);
}
Usb::Usb()
: mLock(PTHREAD_MUTEX_INITIALIZER),
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,
@@ -977,7 +1007,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;
@@ -91,7 +92,8 @@ struct Usb : public BnUsb {
bool mPartnerUp;
// Report usb data session event and data incompliance warnings
UsbDataSessionMonitor mUsbDataSessionMonitor;
std::unique_ptr<UsbDataSessionMonitor> mUsbDataSessionMonitor;
bool mIntHubEnabled;
// 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