134 Commits
vic ... bka

Author SHA1 Message Date
3e8c356403 zuma: Initialize for Evolution X 11.x
Signed-off-by: AnierinB <anierin@evolution-x.org>
2025-09-26 04:50:59 +00:00
Michael Bestas
31b692924b zuma: 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:04 +03:00
Michael Bestas
27f9e5bfcf zuma: Bump SPL to 2025-08-05
Change-Id: I079629bc2b5bb728dac7fdab902ce53ffa336810
2025-08-13 03:38:10 +00:00
LuK1337
e8fafa6d78 zuma: Remove vendor/lineage device framework matrix inclusion
See: I78da6340f38b93fdc4c3694cb8f431f387d16c0d
Change-Id: I0b9f527de50ca02082be9b92375559f4893b2688
2025-08-12 22:37:10 +03:00
Michael Bestas
c52906adfc zuma: Remove dependency to gs101
Change-Id: Ib7613419cbfd0afa51b46fe6c7466b376c419884
2025-06-26 10:20:22 +03:00
Michael Bestas
962b8b904d zuma: sepolicy: Remove duplicate service label
This is defined in gs-common

Change-Id: Ib90caea46da6cc9e191efe8f04b783bba9e2691a
2025-06-26 07:32:33 +03:00
Michael Bestas
8f3b0963c5 zuma: sepolicy: Label missing display node
Change-Id: Ibadee03e8965db70b32103cdb80dc2c099d70a8a
2025-06-26 07:32:28 +03:00
Michael Bestas
d10b40cb68 zuma: sepolicy: Update tracking denials bug map from BP2A
Change-Id: Ibdfb2fa34bc43399f944ef73f6687d8e5051a2ef
2025-06-26 07:32:22 +03:00
Michael Bestas
975279feab zuma: Selectively update overlays from BP2A
Change-Id: Icfa723318c46e0674772b7138e2e83b387908a29
2025-06-26 07:32:06 +03:00
Michael Bestas
d80a00d61c zuma: Remove HIDL audio configuration
Change-Id: I45e4f8521c352fe05b247040be9001b2e0e1ae93
2025-06-26 07:31:13 +03:00
Michael Bestas
3007a1e33c zuma: Remove non-existent vendor includes
Change-Id: I1bc76430d30259984f4eb91907be61ef39646c27
2025-06-26 07:31:06 +03:00
Michael Bestas
18f01e13da zuma: Remove factory configuration
Change-Id: Ib46639b684db8f0bbd42be9ffd518e62277d63f0
2025-06-26 07:30:40 +03:00
Michael Bestas
d03af2c9ae zuma: Include missing NFC sepolicy
Change-Id: Ic93f74e25694f19cfc23a86203c17e6f1d9be0ea
2025-06-26 07:30:33 +03:00
Michael Bestas
906dc11bde zuma: Move wfc-pkt-router to gs-common
Change-Id: I922b28e1bd8dc0baece89428c0032eabde5c13dc
2025-06-26 07:30:27 +03:00
Michael Bestas
2d7985d0a4 zuma: Remove unused fingerprint configuration
Change-Id: Ifd79557c81280f9e93076bc1e6824c650ea12ed7
2025-06-26 07:30:22 +03:00
Michael Bestas
09df7bcbf1 zuma: Remove userdebug/eng configuration
Change-Id: Ie1e8b6bbebdfac97f8bc382e41c70cc8a32caf07
2025-06-26 07:30:11 +03:00
Michael Bestas
1b8387e7e9 zuma: Remove AOSP gerrit configuration
Change-Id: I3bf3987b08a710ddf278cae5243946fae70fce6a
2025-06-26 07:27:55 +03:00
Michael Bestas
6c297354b7 zuma: Remove CleanSpec.mk
Change-Id: I6af355cfbfd5fc388ca25cd25cea9df9e74c41c3
2025-06-26 07:27:46 +03:00
Michael Bestas
0c8c72084f zuma: Bump SPL to 2025-06-05
Change-Id: I8d3f5a9479d0fddd6fa79baa3e573f00ad125e9c
2025-06-26 07:27:30 +03:00
Michael Bestas
ab5177957a zuma: Update task_profiles.json from BP2A
Change-Id: I5303433e19e6e53afc0635d9a00b7467e00391cd
2025-06-26 07:27:09 +03:00
Michael Bestas
2c50db1300 zuma: Update init scripts from BP2A
Change-Id: I9e36e0faec4860fe714c0151b3cb7f373cbcf0ea
2025-06-26 07:27:03 +03:00
Michael Bestas
6fbf59f267 zuma: Update properties from BP2A
Change-Id: I3a1fd777883e84a91f151c403b72acc6048e8715
2025-06-26 07:26:58 +03:00
Michael Bestas
20a727d3f3 zuma: Update FCM for 16
Change-Id: If85ec83e37e9d983903aed4c6f809664fd2b293e
2025-06-26 07:26:51 +03:00
Michael Bestas
5bcaf47360 zuma: Remove pixelstats-vendor
This does not build with the current hardware/google/pixel dependencies
so make it prebuilt.

Change-Id: Ifcbf49fb482164bd72ad0e1f05fa2d48ca2fbc98
2025-06-26 07:26:44 +03:00
Michael Bestas
b214980bfe 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
# eFyZAJ9IQBDv9E9ZB7Ppgj2kGj+Z8a8iZQCbBRcFG3AkrkG3vXd5rPxiL3uBGMs=
# =k2kR
# -----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 (5) and others
# Via Android Build Coastguard Worker (9) and others
* tag 'aml_tz6_351400020':
  Update SELinux error
  Consolidate SELinux for faceauth_rawimage
  RamdumpService: Fix the SELinux errors from introducing Firebase Analytics.
  Update SELinux error
  Update SELinux error
  zuma: update selinux to allow UMI on user build
  Remove sced sepolicy rule
  Update SELinux error
  Update SELinux error.
  Restrict ioctl access for appdomain to gpu_device
  Revert "Remove hal_camera_default aconfig_storage_metadata_file ..."
  Remove hal_camera_default aconfig_storage_metadata_file from bug map
  Update SELinux error
  zuma: Add selinux permission for fth

Change-Id: I4608f407b5123cae5d545e41ce717e9efe0ea7d5
2025-06-23 05:17:12 +03:00
Michael Bestas
38f8a3ecfc 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
# eEkiAJ4n504VudGhEfiOG7u5hXsLy3by4ACeI21Lq6nN0shbpUr8Q2v2tKRYA+Y=
# =ArGI
# -----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 Vilas Bhat (5) and others
# Via Android (Google) Code Review (28) and others
* tag 'aml_tz6_351400020': (34 commits)
  Use 2025-03-01 deqp level for GLES
  init.zuma.rc: Keep down_rate_limit_us set high on late-init
  zuma: adjust performance point of hevc decoder
  Use 2025-03-01 deqp levels for Vulkan
  [AAPM] Enable MTE support for DevicePolicyManager for zuma
  Revert "Use 2025-03-01 deqp levels for GLES and Vulkan"
  init.zuma.rc: Delete governor setup
  Use 2025-03-01 deqp levels for GLES and Vulkan
  move common init perf settings to gs_common
  usb: migrate UsbDataSessionMonitor to libpixelusb
  16KB: zuma: Do not filter out goodix_brl_touch.ko for 16KB mode
  16kb: zuma: Filter out unnecessary modules from 16k mode
  Move the check of 16k folder to BoardConfig-common.mk
  Revert "move common init perf settings to gs_common"
  16KB: Move CopyEfsTest to device/google/gs-common
  Revert "Revert "16KB: zuma: Move copy_efs_file_to_data script to..."
  Revert "16KB: zuma: Move copy_efs_file_to_data script to gs-common"
  16KB: zuma: Move copy_efs_file_to_data script to gs-common
  zuma: remove display_colordata for external display
  audio: fix headtracking permission for spatializer offload playback
  ...

Change-Id: I167ed62c655d898ff6bb5186f2329adebdf8a858
2025-06-23 05:16:48 +03:00
Chirayu Desai
5c49ec3043 Freeze SPL to 2025-05-05
Change-Id: I3dfa3c342582d14c1b5b89061c8a58a72dc6cbcd
2025-06-03 22:53:53 +03:00
Android Build Coastguard Worker
ceb2396a11 Snap for 13025264 from 911468b0ed to mainline-tzdata6-release
Change-Id: I91a3b6d5f31670aa87c652f415fdbfd109b1ff36
2025-02-06 14:22:27 -08:00
Android Build Coastguard Worker
26b6b370b3 Snap for 13025264 from 76b0d07956 to mainline-tzdata6-release
Change-Id: I320ee3b9404e5301cfaba17b2cb22b4c26bf05d6
2025-02-06 14:22:26 -08:00
Treehugger Robot
76b0d07956 Merge "zuma: adjust performance point of hevc decoder" into main 2025-02-04 17:20:46 -08:00
Qais Yousef
30e5b77d96 Merge "init.zuma.rc: Keep down_rate_limit_us set high on late-init" into main 2025-02-04 11:03:42 -08:00
Treehugger Robot
639e9cc673 Merge "Use 2025-03-01 deqp level for GLES" into main 2025-02-04 10:50:11 -08:00
Masha Chizhova
b76a560925 Use 2025-03-01 deqp level for GLES
Bug: 392805030
Flag: EXEMPT version updates
Test: running v2/angle-for-android/angle_deqp_git_main_presubmit_shard_00 - shard_07
https://android-build.corp.google.com/builds/abtd/run/L08100030009328742
https://android-build.corp.google.com/builds/abtd/run/L60400030009311847

Change-Id: I039019c73e24ca94c80ccfc0b511488fa3ca295e
2025-02-04 05:54:12 -08:00
Qais Yousef
1c3de8409a init.zuma.rc: Keep down_rate_limit_us set high on late-init
It helps with boot time and will be reset by powerhint.json as soon as
we are fully booted.

Bug: 393704445
Flag: EXEMPT not supported for init.rc files
Signed-off-by: Qais Yousef <qyousef@google.com>
Change-Id: Ib121ef70f4890139c9964ebb41e6a5d8bd4e91c8
Signed-off-by: Qais Yousef <qyousef@google.com>
2025-02-04 12:50:06 +00:00
Jerry Huang
f121dfca76 zuma: adjust performance point of hevc decoder
adjust hevc decoder 352x288 peroformance point to other codec

Bug: 385249512
Test: CtsMediaDecoderTestCases android.media.decoder.cts.VideoDecoderPerfTest
Flag: EXEMPT bugfix

Change-Id: I96f7172e794d6c18e47705924fbdaa1d20302777
2025-02-04 10:24:55 +00:00
Eran Messeri
b15b4053f4 Merge "[AAPM] Enable MTE support for DevicePolicyManager for zuma" into main 2025-02-03 09:52:40 -08:00
Nina Chen
911468b0ed Update SELinux error
Test: SELinuxUncheckedDenialBootTest
Bug: 393955151
Flag: EXEMPT bugfix
Change-Id: Ic7b9b06967a42644e9ad462deb75d4b5e9f27569
2025-02-02 19:32:03 -08:00
Treehugger Robot
ceb8fb37ad Merge "Use 2025-03-01 deqp levels for Vulkan" into main 2025-01-31 10:43:30 -08:00
Wei Wang
eaffc31cca Merge "init.zuma.rc: Delete governor setup" into main 2025-01-31 09:15:17 -08:00
Masha Chizhova
196a247014 Use 2025-03-01 deqp levels for Vulkan
Bug: 392805030
Flag: EXEMPT version updates

Test: running v2/angle-for-android/angle_deqp_git_main_presubmit_shard_00 - shard_07
https://android-build.corp.google.com/builds/abtd/run/L80300030009248380
https://android-build.corp.google.com/builds/abtd/run/L53700030009247551

Change-Id: I2e68ad25ce5e0f7abf3deb07b15764c5c058a58a
2025-01-31 08:46:22 -08:00
Eran Messeri
c9a34c68d4 [AAPM] Enable MTE support for DevicePolicyManager for zuma
Set the system property that lets the DevicePolicyManager know it can
control Memory Tagging Extension on the device.

With this property set, when the user turns on AAPM, it will turn on
MTE.

This has been enabled for zumapro, now enabling for zuma devices.

Bug: 352420507
Test: Manual
Flag: android.security.aapm_feature_memory_tagging_extension
Change-Id: I14bfdd461076a499457c5a81ed151bfaebbfb2bb
2025-01-30 23:00:17 +00:00
Priyanka Advani (xWF)
63ac282959 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: I606dfb4296d1eb86e4f7497b183ff262a268c8d4
2025-01-30 10:53:05 -08:00
Qais Yousef
050385884f init.zuma.rc: Delete governor setup
It is now set in the common init.rc file.

Bug: 392622882
Flag: EXEMPT not supported for init.rc files
Signed-off-by: Qais Yousef <qyousef@google.com>
Change-Id: I3cdbd40e205d2ae9be49e97c9ef7cc32222852e9
2025-01-29 21:24:10 +00:00
Masha Chizhova
904879f5a4 Use 2025-03-01 deqp levels for GLES and Vulkan
Bug: 392805030
Flag: EXEMPT version updates

Change-Id: I732f9f1e877b51c9d1bb36c677fca1be56240ae9
2025-01-29 18:20:15 +00:00
Roy Luo
1431909327 Merge "usb: migrate UsbDataSessionMonitor to libpixelusb" into main 2025-01-28 14:54:04 -08:00
Piotr Klasa
a65ab24544 Merge "move common init perf settings to gs_common" into main 2025-01-28 03:12:08 -08:00
Vilas Bhat
8e3f985960 [automerger skipped] 16KB: zuma: Do not filter out goodix_brl_touch.ko for 16KB mode am: 05a6015570 am: 76223986fa -s ours
am skip reason: Merged-In I8ba72c8eabb5522873025cf9d80aa03a53fb8cfb with SHA-1 2b06657f62 is already in history

Original change: https://android-review.googlesource.com/c/device/google/zuma/+/3460393

Change-Id: Ide31074235d6a424489087c9015dd79a331399dd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-01-24 12:37:23 -08:00
Juan Yescas
39599f0a8f [automerger skipped] 16kb: zuma: Filter out unnecessary modules from 16k mode am: b9d89057e0 am: c9d947d6e5 -s ours
am skip reason: Merged-In I237fd9cf7ca2f7972fafa08a3df65c0472e1ef03 with SHA-1 a8a6c8ff28 is already in history

Original change: https://android-review.googlesource.com/c/device/google/zuma/+/3460392

Change-Id: I9abc9a34478eb9e75d395525091e9ed68a9c60b0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-01-24 12:37:19 -08:00
Vilas Bhat
76223986fa 16KB: zuma: Do not filter out goodix_brl_touch.ko for 16KB mode am: 05a6015570
Original change: https://android-review.googlesource.com/c/device/google/zuma/+/3460393

Change-Id: I1cbd71a6e00e47940dbc3998c342fa3ff494aeb3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-01-24 12:01:21 -08:00
Juan Yescas
c9d947d6e5 16kb: zuma: Filter out unnecessary modules from 16k mode am: b9d89057e0
Original change: https://android-review.googlesource.com/c/device/google/zuma/+/3460392

Change-Id: Ie2c7e067c526503d0ec6da56a3c78aa6877c8760
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-01-24 12:01:16 -08:00
Ilya Matyukhin
1fd52733f7 Consolidate SELinux for faceauth_rawimage
Per go/pixel-defrag, moves all related configuration from this
board-specific directory to a feature-specific directory:
  "vendor/google_devices/gs-common/proprietary/biometrics/face/" +
  "sepolicy/rawimage_heap"

Bug: 337889186
Bug: 391648492
Test: adb logcat | egrep "avc:\s+denied"
Flag: EXEMPT refactor
Change-Id: I2ee88197fe37ab276f603241520058f6ebee4a14
2025-01-23 19:18:47 +00:00
Piotr Klasa
96585a6498 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: I3485325c7416fbc812eaec7da00e337840125053
2025-01-23 03:36:41 -08:00
Roy Luo
e26b52f20e usb: migrate UsbDataSessionMonitor to libpixelusb
Use the libpixelusb version of UsbDataSessionMonitor.

Bug: 388367091
Test: test on shiba
Flag: EXEMPT CP
Change-Id: I93b74fc9bb63c260e900ee5af73e66fb1559142d
2025-01-23 05:22:58 +00:00
Treehugger Robot
82ca1de8ba Merge "Move the check of 16k folder to BoardConfig-common.mk" into main 2025-01-22 20:16:09 -08:00
Treehugger Robot
1cfb1e876f Merge "16KB: Move CopyEfsTest to device/google/gs-common" into main 2025-01-22 11:34:44 -08:00
Vilas Bhat
05a6015570 16KB: zuma: Do not filter out goodix_brl_touch.ko for 16KB mode
Filtering out this module broke touchscreen functionality for Pixel 8
devices in 16 KB mode.

Bug: 388515914
Flag: EXEMPT bugfix
Test: Built
      (i) aosp_husky-trunk_staging-userdebug
      (ii) aosp_akita-trunk_staging-userdebug
      and tested 4kb and 16kb mode.
Change-Id: I8ba72c8eabb5522873025cf9d80aa03a53fb8cfb
Merged-In: I8ba72c8eabb5522873025cf9d80aa03a53fb8cfb
2025-01-22 17:21:11 +00:00
Juan Yescas
b9d89057e0 16kb: zuma: Filter out unnecessary modules from 16k mode
The 16k mode does not use these modules.

Bug: 378293897
Bug: 379704287
Merged-In: I237fd9cf7ca2f7972fafa08a3df65c0472e1ef03
Change-Id: I237fd9cf7ca2f7972fafa08a3df65c0472e1ef03
Test: Built
      (i) aosp_husky-trunk_staging-userdebug
      (ii) aosp_akita-trunk_staging-userdebug
      and tested 4kb and 16kb mode.
Flag: EXEMPT bugfix
2025-01-22 17:10:09 +00:00
Nina Chen
b000f3b7b5 Move the check of 16k folder to BoardConfig-common.mk
Bug: 391282888
Flag: EXEMPT bugfix
Change-Id: I8d73365d826bc439b9b2f938afbe54cbcb48e380
2025-01-22 15:53:42 +08:00
Piotr Klasa
2f0401baf1 Merge "Revert "move common init perf settings to gs_common"" into main 2025-01-21 01:27:07 -08:00
Enzo Liao
f02227eeb1 RamdumpService: Fix the SELinux errors from introducing Firebase Analytics.
Fix it by ag/31334770 and remove the tracking bug number.

Bug: 385858590
Flag: EXEMPT bugfix
Change-Id: I29717ab8926597c5def1f3cd10a61086d3af63d3
2025-01-21 14:20:53 +08:00
Piotr Klasa
ff3222e2d3 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: I1339466a8ac75666d6c0a40461d9e998e5b23f13
2025-01-20 06:52:37 -08:00
Vilas Bhat
7e848a5830 16KB: Move CopyEfsTest to device/google/gs-common
Bug: 390502355
Test: atest CopyEfsTest for Pixel 8 & 9 targets
Flag: EXEMPT bugfix
Change-Id: I59fff00454aac6e00dcec81427cd5c41efadec1d
2025-01-17 23:57:48 +00:00
Vilas Bhat
3f4f72ea35 Merge "Revert "Revert "16KB: zuma: Move copy_efs_file_to_data script to..."" into main 2025-01-17 11:04:09 -08:00
Vilas Bhat
45d085874d Revert "Revert "16KB: zuma: Move copy_efs_file_to_data script to..."
Revert submission 31345232-revert-31155502-move_copy_efs_script-IXYVMGOHBR

Reason for revert: Re-submitting with fix for breaking target

Reverted changes: /q/submissionid:31345232-revert-31155502-move_copy_efs_script-IXYVMGOHBR

Bug: 383151792
Flag: EXEMPT bugfix
Change-Id: I71d98015c530fe51f9bae2ef2907baa1d3fd657e
2025-01-16 17:09:03 -08:00
Priyanka Advani (xWF)
c0962e9f2b Merge "Revert "16KB: zuma: Move copy_efs_file_to_data script to gs-common"" into main 2025-01-16 16:59:51 -08:00
Priyanka Advani (xWF)
6c5315280f Revert "16KB: zuma: Move copy_efs_file_to_data script to gs-common"
Revert submission 31155502-move_copy_efs_script

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

Reverted changes: /q/submissionid:31155502-move_copy_efs_script

Change-Id: I6f7b4074a82069cc9e0b230e2ccb9379bb35c837
2025-01-16 16:50:35 -08:00
Vilas Bhat
6a640cff4b Merge "16KB: zuma: Move copy_efs_file_to_data script to gs-common" into main 2025-01-16 16:30:54 -08:00
Vilas Bhat
126ea8b775 16KB: zuma: Move copy_efs_file_to_data script to gs-common
Bug: 383151792
Flag: EXEMPT bugfix
Test: Enable16kbTest on Pixel 8 target
      Fingerprint and Phone Calls work in 16 KB mode
Change-Id: I3c4fa84887cbb46c9f171a0f0a31f4d47d5c4c6e
2025-01-16 13:46:53 -08:00
Piotr Klasa
b12377f612 Merge "move common init perf settings to gs_common" into main 2025-01-16 01:38:35 -08:00
Nina Chen
ad7475258e Update SELinux error
Test: SELinuxUncheckedDenialBootTest
Bug: 390293495
Flag: EXEMPT bugfix
Change-Id: Iba04cf0704d2711eb92fa35eba8129e84dbf1d4f
2025-01-15 21:27:57 -08:00
Treehugger Robot
04fcf12ff5 Merge "Remove sced sepolicy rule" into main 2025-01-14 23:40:47 -08:00
Xiaofan Jiang
3f8aadb455 Merge "zuma: update selinux to allow UMI on user build" into main 2025-01-10 11:37:10 -08:00
Weizhung Ding
eabec7960b Merge "zuma: remove display_colordata for external display" into main 2025-01-10 02:15:25 -08:00
Weizhung Ding
f678faaf96 zuma: remove display_colordata for external display
Bug: 376179256
Test: adaptive mode is not enabled for display 2
Flag: EXEMPT bugfix
Change-Id: I2302441ee4ccba755402bf2838425ca1ad235eac
2025-01-10 08:50:08 +00:00
Spade Lee
fdaa11b902 Merge "pixelstats: zuma: remove firmware update path" into main 2025-01-09 22:46:18 -08:00
Treehugger Robot
3bd02cc7c7 Merge "audio: fix headtracking permission for spatializer offload playback" into main 2025-01-09 22:31:10 -08:00
Carter Hsu
26cc2347cd audio: fix headtracking permission for spatializer offload playback
Bug: 381405995
Test: manual

Flag: EXEMPT bugfix

Change-Id: I08d52b7f4988e9cdeb38f1d0fbbbf1baa54268ed
Signed-off-by: Carter Hsu <carterhsu@google.com>
2025-01-09 21:37:09 -08:00
Nina Chen
5159a671f2 Update SELinux error
Test: SELinuxUncheckedDenialBootTest
Flag: EXEMPT bugfix
Bug: 388949246
Change-Id: I35755091bde97e167173375033134a78c6eb6c69
2025-01-09 19:26:00 -08:00
Xiaofan Jiang
6fb9c00880 zuma: 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: Id238114b40a3cb70efab1d8c88bda070b054d991
2025-01-10 03:16:04 +00:00
Spade Lee
7bd1512b8e pixelstats: zuma: remove firmware update path
Bug: 386187651
Test: local test pass
Flag: EXEMPT refactor
Change-Id: I8ea918db227992681435fa3d72a58abebc7937a2
Signed-off-by: Spade Lee <spadelee@google.com>
2025-01-09 12:15:55 -08:00
Piotr Klasa
4bd134b83d 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: I595d69d9fa241489e1a4b7fe407d6f74f8c62039
2025-01-09 08:58:18 -08:00
Terry Huang
6523ef55d8 Remove sced sepolicy rule
Bug: 381778782
Test: gts pass
Flag: EXEMPT bugfix

Change-Id: Ia252d9743577a0475940ff4191d337f68474989e
2025-01-09 09:11:40 +08:00
Steven Moreland
fceae7300f Merge "16KB: zuma: Do not filter out goodix_brl_touch.ko for 16KB mode" into main 2025-01-08 13:38:39 -08:00
Vilas Bhat
2b06657f62 16KB: zuma: Do not filter out goodix_brl_touch.ko for 16KB mode
Filtering out this module broke touchscreen functionality for Pixel 8
devices in 16 KB mode.

Bug: 388515914
Flag: EXEMPT bugfix
Test: Boot to 16KB mode using 16KB dev option and verify touchscreen
      functionality.
Change-Id: I8ba72c8eabb5522873025cf9d80aa03a53fb8cfb
2025-01-08 19:06:40 +00:00
Jiaming Liu
6c8d907660 Merge "[AE] Add system property to enable AE on Settings" into main 2025-01-08 09:20:08 -08:00
T.J. Mercier
8d8e1c7a52 Merge "Leave memcg enabled" into main 2025-01-08 08:30:16 -08:00
Rick Yiu
4043e592c8 Merge "Remove ResetUclamp profiles" into main 2025-01-06 19:16:23 -08:00
Android Build Coastguard Worker
ab95e0148e Snap for 12872597 from 417ef69506 to mainline-tzdata6-release
Change-Id: Ife96f810a815e35cda53005492cda00e3afb4696
2025-01-06 04:37:51 -08:00
Android Build Coastguard Worker
d8054dfc30 Snap for 12872597 from a1382dde25 to mainline-tzdata6-release
Change-Id: I74f6356cf8e42a4a2708fc6c289b7445e8d17112
2025-01-06 04:37:47 -08:00
Treehugger Robot
a1382dde25 Merge "Update IDisplay to V13-V14" into main 2024-12-30 14:30:51 -08:00
Hung-Yeh Lee
86e03169b4 Merge "display-dump: make display dump project-specific" into main 2024-12-29 18:31:49 -08:00
T.J. Mercier
bc2bb6cbf9 Leave memcg enabled
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: Ica5b237583f596fec8b8cb754a9ea5720f1c4ff6
2024-12-27 22:01:20 +00:00
Wilson Sung
417ef69506 Update SELinux error
Test: SELinuxUncheckedDenialBootTest
Bug: 386149375
Flag: EXEMPT update sepolicy
Change-Id: I1be4fa4b29e0e28b61c7ff1444169ab1d20fe5d5
2024-12-26 23:22:47 -08:00
Nina Chen
bdfee8a704 Update SELinux error.
Test: SELinuxUncheckedDenialBootTest
Bug: 385858590
Bug: 385858993

Bug: 385829048
Flag: EXEMPT bugfix
Change-Id: I946909b9bc1aec1728c9999d25bdccfe70443fd9
2024-12-24 19:11:28 -08:00
Chris Lu
92701b07fc 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: Ie0caca924696b90f855ef46023d53040adcde93a
2024-12-23 22:55:02 -08:00
Liz Prucka
d20b253d18 Merge "Restrict ioctl access for appdomain to gpu_device" into main 2024-12-23 09:09:24 -08:00
Rick Yiu
8221e61ddd 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: I91c9a45dc6fdfeb00a6d75e752f5895c03864a7e
2024-12-21 15:33:19 +00:00
Jack Wu
0c88c7620a 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: I9d36e6fcb25ee9f12b4fd2962207b1f4b592c2b3
Signed-off-by: Jack Wu <wjack@google.com>
2024-12-20 18:03:37 +08:00
Liz Prucka
b2f00a1549 Restrict ioctl access for appdomain to gpu_device
Add a list of Mali-specific ioctls (ioctl_defines).
Define categories for these ioctls (ioctl_macros).
This list was gathered by the ARM GPU team.

All defined ioctls are granted access. Deprecated
ioctls and ioctls intended for GPU development are
logged to estimate the impact of their removal.

During testing, no logging was observed during the
launch of the top 100 apps. It is unlikely that such
logging would spam the device's log.

Bug: 384720119
Test: Csuite test of top 100 apps
Flag: EXEMPT uses build system flag: RELEASE_PIXEL_MALI_SEPOLICY_ENABLED
Change-Id: I49f7ffade42e1039e13601a81d814d33dfbc3e5a
2024-12-19 12:03:02 -08:00
Jiaming Liu
8fb22043f3 [AE] Add system property to enable AE on Settings
Add system property to enable AE split on Settings for devices
supporting display port.

Bug: 372200182
Test: Manual
Flag: com.android.window.flags.activity_embedding_support_for_connected_displays
Change-Id: I5678e9606be3a91a5bf91e5bd00ed09c2e538124
2024-12-18 04:33:47 +00:00
Rios Kao
deeb36e5e9 Merge "zuma: recorder selinux configuration" into main 2024-12-17 01:36:58 -08:00
Timmy Li
29cd1c7a2d Revert "Remove hal_camera_default aconfig_storage_metadata_file ..."
Revert submission 30893287-hal_camera_default_ aconfig_storage_metadata_file

Reason for revert: b/384580942

Reverted changes: /q/submissionid:30893287-hal_camera_default_+aconfig_storage_metadata_file

Change-Id: I8bed2f61c7fc0ee6f0fb8cfc15bdb435d30dc70d
2024-12-16 16:32:22 -08:00
Paulsu Su
9af98c8d86 Merge "Set initial value for foreground_window group" into main 2024-12-16 04:24:06 -08:00
timmyli
d077655445 Remove hal_camera_default aconfig_storage_metadata_file from bug map
Bug: 383013471
Test: manual test to see no avc denial
Flag: EXEMPT bug fix
Change-Id: I1958da80539ae17ab48c3aa9f70f7ea3707ea2db
2024-12-15 19:44:03 -08:00
Xin Li
037487ca08 [automerger skipped] Merge 24Q4 into AOSP main am: 61061b74ae -s ours am: 2543f5b16d -s ours
am skip reason: Merged-In I38afa16f8f85e6aea31ddd5367c2e2d4a3249ced with SHA-1 1a173d6997 is already in history

Original change: https://android-review.googlesource.com/c/device/google/zuma/+/3391984

Change-Id: Iabf8df4e7c1a5c05033d6da866f7357ac362c838
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-13 21:08:21 -08:00
Xin Li
d25f090a34 [automerger skipped] Merge 24Q4 into AOSP main am: c5a0418122 -s ours am: 46f147f372 -s ours
am skip reason: Merged-In I1c2fb12e09ffe8083d6b14b0ee5aa957e031ddf3 with SHA-1 f03cc7ce1c is already in history

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

Change-Id: I5dc79c2c48b24078aae4f34b5c0a68aa493500cd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-13 19:45:16 -08:00
Xin Li
2543f5b16d [automerger skipped] Merge 24Q4 into AOSP main am: 61061b74ae -s ours
am skip reason: Merged-In I38afa16f8f85e6aea31ddd5367c2e2d4a3249ced with SHA-1 1a173d6997 is already in history

Original change: https://android-review.googlesource.com/c/device/google/zuma/+/3413724

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

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

Change-Id: I8b8c13745cfbffbf29411e410fef24fa284aa070
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-13 18:42:00 -08:00
Xin Li
61061b74ae Merge 24Q4 into AOSP main
Bug: 370570306
Merged-In: I38afa16f8f85e6aea31ddd5367c2e2d4a3249ced
Change-Id: I94bb03744bc0fbe5e8706aae30c366266ae770de
2024-12-13 11:15:10 -08:00
Xin Li
c5a0418122 Merge 24Q4 into AOSP main
Bug: 370570306
Merged-In: I1c2fb12e09ffe8083d6b14b0ee5aa957e031ddf3
Change-Id: I1f96c1fc29847035394513fad852d1bacbc43296
2024-12-13 11:15:10 -08:00
Nina Chen
e408d5681e Update SELinux error
Test: SELinuxUncheckedDenialBootTest
Flag: EXEMPT sepolicy
Bug: 383949325
Change-Id: I3392bafe7873812b2e7df6ecec5725097eb085ab
2024-12-12 22:40:45 -08:00
Paulsu Su
4d63a708a3 Set initial value for foreground_window group
For multi-window foreground app group.

Bug: 200769420
Change-Id: I2b65feb4732e33b27155dcfaf0b64a38b1b01026
Test: build pass
Flag: NONE vendor init file does not support flag
2024-12-12 22:14:22 -08:00
Piotr Klasa
8cff6f64fa Merge "Move all vendor_sched parameters and permissions to init.pixel.perf.rc" into main 2024-12-12 04:08:58 -08:00
chenkris
9ea8cdc64f zuma: 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: Iec9de84c8faa6790f9f27c5875b5a822a02fcee9
2024-12-12 00:15:56 -08:00
Chungkai Mei
2716f03d7d set input to 100 explicitly in task_profile
instead of using ADPF, let's use task_profile to boost input tasks'
priroity

Bug: 378761104
Flag: EXEMPT new task_profile behavior
Change-Id: Ice311b1abcf3d629917e16f1490d4cb63fd83796
Signed-off-by: Chungkai Mei <chungkai@google.com>
2024-12-12 05:54:44 +00:00
Rios Kao
0ec0752893 zuma: recorder selinux configuration
note:
      Access Hal property permission.

Test: end-to-end test
Bug: 383647553
Flag: EXEMPT porting existed feature.

Change-Id: I6ac6ea5f573c45e999d81c08aa512b902527d5ef
2024-12-11 19:43:10 -08:00
Daniel Lowe
d822ead370 Merge "[Pixel VPN] Apply reviewed default permissions" into main 2024-12-11 10:38:55 -08:00
Piotr Klasa
3e803739bb 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: Ifbea91bce20e046a6e1b92295814a27e99f41dbe
2024-12-11 15:29:57 +01:00
Daniel Lowe
a0b5342eff [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 on test device.
Change-Id: If6c3dfb1a29451d7b11a3ff10ec18b4c412056ed
2024-12-09 02:47:29 +00:00
Hung-Yeh Lee
0bab5d4ca8 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: I3eedbd7bd2ad4574f6ac23ef509d57ebda4fb79d
2024-12-04 14:58:22 +08:00
Android Build Coastguard Worker
f7c611fb96 Snap for 12605939 from 6f1672a387 to mainline-tzdata6-release
Change-Id: Ibd6a5a3dd066bbb595d83274102c77edfd2762a0
2024-11-05 10:12:52 +00:00
Android Build Coastguard Worker
05f094f8f8 Snap for 12605939 from 8873769456 to mainline-tzdata6-release
Change-Id: Ibfae41063bec17e41ebfdc21a6c867b684e9ab74
2024-11-05 10:12:48 +00:00
Android Build Coastguard Worker
5dae66b79e Snap for 12462067 from ce7cdaa39f to mainline-tzdata6-release
Change-Id: Ibcaab6adad8beea9982ba11a162b8929162e290e
2024-10-07 09:03:23 +00:00
Android Build Coastguard Worker
d6d70e5696 Snap for 12462067 from 72b12b913c to mainline-tzdata6-release
Change-Id: I0bf0391b7be24bbcbd14acfd8dc6e9e8046fe732
2024-10-07 09:03:20 +00:00
Android Build Coastguard Worker
e7c77043b5 Snap for 12238800 from 390674b749 to mainline-tzdata6-release
Change-Id: I9e44575c50a85bd07da801880715a28f5eb45e46
2024-08-16 13:02:53 +00:00
Android Build Coastguard Worker
4e275d5264 Snap for 12238800 from 3725da4142 to mainline-tzdata6-release
Change-Id: I08b14da0e96cafaa8d26f574d7c6bbea34fe3286
2024-08-16 13:02:53 +00:00
Android Build Coastguard Worker
6ef0665975 Snap for 12034474 from a44d754cfa to mainline-tzdata6-release
Change-Id: I55fafdb470df5970b25d122f5a93b7adb196c81d
2024-07-01 08:38:37 +00:00
Android Build Coastguard Worker
a547a6fcf1 Snap for 12034474 from 2fa3c6b55d to mainline-tzdata6-release
Change-Id: Ic93ac2ce74d764000c2a1840e53cd203edde8f14
2024-07-01 08:38:35 +00:00
Android Build Coastguard Worker
a7cb6a266f Snap for 11947112 from 667f2a4670 to mainline-tzdata6-release
Change-Id: I94356064035f9ba0cc70b386b5e826d316e1e1fc
2024-06-10 10:14:00 +00:00
Android Build Coastguard Worker
c4f18159a7 Snap for 11947112 from 4ade1a2615 to mainline-tzdata6-release
Change-Id: Ib0d9dbd0b27b29916ee1448c06a4d6b9de655f5d
2024-06-10 10:13:59 +00:00
Android Build Coastguard Worker
02e10c2506 Snap for 11919022 from 79e1531622 to mainline-tzdata6-release
Change-Id: I21925366a2af76b48de9a4a92bb4e26bbb3c8938
2024-06-03 15:32:05 +00:00
Android Build Coastguard Worker
45eb025190 Snap for 11919022 from e0129184f3 to mainline-tzdata6-release
Change-Id: Idc4d4252c1d000416000f291e09a43d4799685fb
2024-06-03 15:32:05 +00:00
Android Build Coastguard Worker
e23649f40c Snap for 11607654 from 6ad6fb5edb to mainline-tzdata6-release
Change-Id: Ifb954813e906558e695ec24b2b1ca87c62106800
2024-03-21 12:28:27 +00:00
Android Build Coastguard Worker
260ab26cc2 Snap for 11595244 from 45dbae1b7a to mainline-tzdata6-release
Change-Id: I5ee30e30db8178ef64e0d8743eb37c9c6d2d8589
2024-03-19 17:14:03 +00:00
76 changed files with 362 additions and 2347 deletions

View File

@@ -41,14 +41,3 @@ sh_binary {
vendor: true,
sub_dir: "hw",
}
// Filesystem: Copy efs/efs_backup/modem_userdata to /data partition
// so that they can be accessed under 16K mode. By default, these partitions
// are 4K F2FS , which can't be mounted under 16K mode.
// (b/293313353)
sh_binary {
name: "copy_efs_files_to_data",
src: "copy_efs_files_to_data.sh",
vendor: true,
}

View File

@@ -14,8 +14,6 @@
# limitations under the License.
#
ifneq ($(wildcard $(TARGET_KERNEL_DIR)/16kb/),)
ifeq ($(TARGET_BOOTS_16K),true)
# Configures the 16kb kernel directory.
TARGET_KERNEL_DIR := $(TARGET_KERNEL_DIR)/16kb
@@ -48,5 +46,3 @@ BOARD_KERNEL_MODULES_LOAD_16K := $(foreach module,$(BOARD_KERNEL_MODULES_16K),$(
BOARD_16K_OTA_USE_INCREMENTAL := true
BOARD_16K_OTA_MOVE_VENDOR := true
endif
endif

View File

@@ -17,7 +17,9 @@ include build/make/target/board/BoardConfigMainlineCommon.mk
include build/make/target/board/BoardConfigPixelCommon.mk
# Include settings for 16k developer option, if enabled
ifneq ($(wildcard $(TARGET_KERNEL_DIR)/16kb/),)
include device/google/zuma/BoardConfig-16k-common.mk
endif
# HACK : To fix up after bring up multimedia devices.
TARGET_SOC := zuma
@@ -33,7 +35,6 @@ TARGET_CPU_VARIANT := cortex-a55
BOARD_KERNEL_CMDLINE += earlycon=exynos4210,0x10870000 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 += swiotlb=1024
BOARD_KERNEL_CMDLINE += cgroup.memory=nokmem
@@ -44,17 +45,6 @@ ifeq (,$(filter %_fullmte,$(TARGET_PRODUCT)))
BOARD_KERNEL_CMDLINE += kasan=off
endif
# Enable a limited subset of MTE for "normal" (non-_fullmte) eng builds.
# Don't touch any settings for _fullmte builds. They are set somewhere else.
ifeq (,$(filter %_fullmte,$(TARGET_PRODUCT)))
ifeq ($(TARGET_BUILD_VARIANT),eng)
BOARD_KERNEL_CMDLINE += bootloader.pixel.MTE_FORCE_ON
ifeq ($(filter memtag_heap,$(SANITIZE_TARGET)),)
SANITIZE_TARGET := $(strip $(SANITIZE_TARGET) memtag_heap)
endif
endif
endif
BOARD_BOOTCONFIG += androidboot.boot_devices=13200000.ufs
TARGET_NO_BOOTLOADER := true
@@ -261,12 +251,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
@@ -456,7 +440,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/zuma/BoardConfigLineage.mk
include device/google/zuma/BoardConfigEvolution.mk

10
BoardConfigEvolution.mk Normal file
View File

@@ -0,0 +1,10 @@
#
# Copyright (C) 2024 The Evolution X Project
# SPDX-License-Identifier: Apache-2.0
#
BUILD_BROKEN_DUP_RULES := true
DISABLE_ARTIFACT_PATH_REQUIREMENTS := true
SPOOF_FIRST_API_LEVEL_32 := true

View File

@@ -5,7 +5,6 @@
#
# Manifests
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += vendor/lineage/config/device_framework_matrix.xml
DEVICE_MANIFEST_FILE += \
device/google/zuma/android.hardware.security.rkp-service.citadel.xml \
device/google/zuma/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)
# Update to USB HAL 1.3
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.usb@1.2-service.slider)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.usb@1.2-service.slider.rc)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.usb@1.2-service.slider.xml)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.usb@1.3-service.slider)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.usb@1.3-service.slider.rc)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.usb@1.3-service.slider.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.zuma)
$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/etc/init/android.hardware.power.stats@1.0-service.zuma.rc)
$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.power.stats@1.0-service.zuma.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)

View File

@@ -1,38 +0,0 @@
// Copyright (C) 2024 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: ["device_google_zuma_license"],
}
java_test_host {
name: "CopyEfsTest",
// Include all test java files
srcs: ["src/**/*.java"],
static_libs: [
"junit",
"platform-test-annotations",
"truth",
],
libs: [
"tradefed",
"compatibility-host-util",
"compatibility-tradefed",
],
test_suites: [
"device-tests",
"device-pixel-tests"
],
test_config: "AndroidTest.xml",
}

View File

@@ -1,40 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2024 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.
-->
<configuration description="Runs 16K developer option test.">
<option name="test-suite-tag" value="apct"/>
<target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer">
<option name="force-root" value="true" />
</target_preparer>
<test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
<option name="jar" value="CopyEfsTest.jar" />
</test>
<target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
<!-- Unlock screen -->
<option name="run-command" value="input keyevent KEYCODE_WAKEUP" />
<!-- Dismiss keyguard, in case it's set as "Swipe to unlock" -->
<option name="run-command" value="wm dismiss-keyguard" />
<!-- Collapse notifications -->
<option name="run-command" value="cmd statusbar collapse" />
<!-- dismiss all system dialogs before launch test -->
<option name="run-command" value="am broadcast -a android.intent.action.CLOSE_SYSTEM_DIALOGS" />
</target_preparer>
</configuration>

View File

@@ -1,130 +0,0 @@
/*
* Copyright (C) 2024 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 com.android.test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;
import org.junit.Before;
import org.junit.After;
import android.platform.test.annotations.AppModeFull;
import com.android.tradefed.device.DeviceNotAvailableException;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;
import com.android.tradefed.testtype.junit4.DeviceTestRunOptions;
import com.android.tradefed.util.CommandResult;
import com.android.tradefed.util.RunUtil;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.BufferedReader;
import java.io.StringReader;
@RunWith(DeviceJUnit4ClassRunner.class)
public class CopyEfsTest extends BaseHostJUnit4Test {
@Before
public void setUp() throws Exception {
getDevice().enableAdbRoot();
getDevice().executeShellCommand("rm -rf /data/local/tmp/efs_test");
getDevice().executeShellCommand("mkdir -p /data/local/tmp/efs_test/mnt");
getDevice().executeShellCommand("mkdir -p /data/local/tmp/efs_test/dump");
}
@Test
@AppModeFull
public void copyEfsTest() throws Exception {
assumeTrue(getDevice().executeShellCommand("getconf PAGESIZE").trim().equals("4096"));
testDumpF2FS("efs");
testDumpF2FS("efs_backup");
testDumpF2FS("modem_userdata");
testDumpF2FS("persist");
}
private CommandResult RunAndCheckAdbCmd(String cmd) throws DeviceNotAvailableException {
CommandResult r = getDevice().executeShellV2Command(cmd);
assertEquals("Failed to run " + cmd, Integer.valueOf(0), r.getExitCode());
return r;
}
// Remove timestamps because ls on device does not support --time-style.
// Format is [permissions] [links] [uid] [gid] [size] time [name/symlink]
// time may vary greatly in formatting
// symlinks will be of the form a -> b
// So we can check for -> in the second to last spot to determine what position the timestamp ends at
// Remove totals because on disk block usage may change depending on filesystem
private String removeTimestamps(String input) {
StringBuilder output = new StringBuilder();
for (String line : input.split("\n")) {
String[] tokens = line.split("(?<![\\\\])\s+");
if (tokens[0].equals("total"))
continue;
if (tokens.length < 3) {
output.append(line + "\n");
continue;
}
int name_offset = 1;
if (tokens[tokens.length - 2].equals("->"))
name_offset = 3;
for (int i=0; i<tokens.length; i++) {
if (i >= 5 && i < tokens.length - name_offset)
continue;
if (i != 0)
output.append(" ");
output.append(tokens[i]);
}
output.append("\n");
}
return output.toString();
}
private void testDumpF2FS(String name) throws Exception {
RunAndCheckAdbCmd(String.format("cp /dev/block/by-name/%s /data/local/tmp/efs_test/%s.img", name, name));
// The device was mounted r/w. To get a clean image, we run fsck, and then mount to allow mount time fixes to happen.
// We can then dump and mount read only to ensure the contents should be the same.
RunAndCheckAdbCmd(String.format("fsck.f2fs -f /data/local/tmp/efs_test/%s.img", name));
RunAndCheckAdbCmd(String.format("mount /data/local/tmp/efs_test/%s.img /data/local/tmp/efs_test/mnt", name));
RunAndCheckAdbCmd("umount /data/local/tmp/efs_test/mnt");
RunAndCheckAdbCmd(String.format("dump.f2fs -rfPLo /data/local/tmp/efs_test/dump /data/local/tmp/efs_test/%s.img", name));
RunAndCheckAdbCmd(String.format("mount -r /data/local/tmp/efs_test/%s.img /data/local/tmp/efs_test/mnt", name));
CommandResult r = RunAndCheckAdbCmd("diff -rq --no-dereference /data/local/tmp/efs_test/mnt /data/local/tmp/efs_test/dump");
assertEquals(r.getStdout(), "");
String ls_cmd = "cd /data/local/tmp/efs_test/%s;ls -AlnR .";
CommandResult mnt_ls = RunAndCheckAdbCmd(String.format(ls_cmd, "mnt"));
CommandResult dump_ls = RunAndCheckAdbCmd(String.format(ls_cmd, "dump"));
assertEquals(removeTimestamps(mnt_ls.getStdout()), removeTimestamps(dump_ls.getStdout()));
getDevice().executeShellCommand("umount /data/local/tmp/efs_test/mnt");
getDevice().executeShellCommand("rm -rf /data/local/tmp/efs_test/dump/*");
getDevice().executeShellCommand("rm /data/local/tmp/efs_test/" + name + ".img");
}
@After
public void tearDown() throws Exception {
getDevice().executeShellCommand("umount /data/local/tmp/efs_test/mnt");
getDevice().executeShellCommand("rm -rf /data/local/tmp/efs_test");
}
}

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

@@ -42,7 +42,6 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_vendor.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_vendor.mk)
#$(call inherit-product, device/google/zuma/device.mk)
#$(call inherit-product-if-exists, vendor/google_devices/zuma/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,52 +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
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_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"
# A0 chips require pKVM for a hardware issue workaround. Set pKVM to 'enabled'
# in /misc partition on first boot to signal to tests that this device should
# not be booted with pKVM disabled.
service vendor.force_pkvm /vendor/bin/misc_writer --set-enable-pkvm
disabled
oneshot
on property:persist.sys.device_provisioned=1 && property:ro.revision=PROTO1.0
start vendor.force_pkvm
on property:persist.sys.device_provisioned=1 && property:ro.revision=PROTO1.1
start vendor.force_pkvm
on property:persist.sys.device_provisioned=1 && property:ro.revision=EVT1.0
start vendor.force_pkvm

View File

@@ -1,16 +0,0 @@
# MTE in -eng build: litle and mid cores in Sync mode
# Big core in Asymm mode to work around a performance issue (b/266613799)
on init
# Per-core mode overrides.
# Little Cores: sync
write /sys/devices/system/cpu/cpu0/mte_tcf_preferred sync
write /sys/devices/system/cpu/cpu1/mte_tcf_preferred sync
write /sys/devices/system/cpu/cpu2/mte_tcf_preferred sync
write /sys/devices/system/cpu/cpu3/mte_tcf_preferred sync
# Mid Cores: sync
write /sys/devices/system/cpu/cpu4/mte_tcf_preferred sync
write /sys/devices/system/cpu/cpu5/mte_tcf_preferred sync
write /sys/devices/system/cpu/cpu6/mte_tcf_preferred sync
write /sys/devices/system/cpu/cpu7/mte_tcf_preferred sync
# Big Core: asymm
write /sys/devices/system/cpu/cpu8/mte_tcf_preferred asymm

View File

@@ -16,36 +16,6 @@ on init
# Disable util-awareness for mids and bigs
write /proc/vendor_sched/teo_util_threshold "2 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
@@ -69,116 +39,8 @@ on init
chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/memlat_cpuidle_state_aware
chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu8_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 /proc/sys/vm/page-cluster 0
@@ -224,15 +86,6 @@ on init
write /proc/vendor_sched/groups/sys/uclamp_min 221
write /proc/vendor_sched/groups/sys/prefer_idle 1
# governor setting
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor sched_pixel
write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/up_rate_limit_us 500
write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/down_rate_limit_scale_pow 2
write /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor sched_pixel
write /sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/up_rate_limit_us 500
write /sys/devices/system/cpu/cpu8/cpufreq/scaling_governor sched_pixel
write /sys/devices/system/cpu/cpu8/cpufreq/sched_pixel/up_rate_limit_us 500
# memlat cpuidle awareness setting
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/memlat_cpuidle_state_aware 2
@@ -245,15 +98,6 @@ on init
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/memlat_cpuidle_state_aware 2
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu8_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-8
write /dev/cpuset/camera-daemon-high-group/mems 0
@@ -272,11 +116,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
@@ -363,10 +202,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
@@ -519,7 +354,7 @@ on post-fs-data
chmod 0660 /dev/ispolin_ranging
# Audio dump and debug
mkdir /data/vendor/audio 0770 audio audio
mkdir /data/vendor/audio 0770 system audio
# Create the directories for Darwinn HAL.
mkdir /data/vendor/hal_neuralnetworks_darwinn 0770 system system
@@ -703,6 +538,7 @@ on fs
chown system system /sys/devices/platform/exynos-drm/primary-panel/op_hz
chown system system /sys/devices/platform/exynos-drm/primary-panel/refresh_ctrl
chown system system /sys/devices/platform/exynos-drm/primary-panel/power_state
chown system system /sys/devices/platform/exynos-drm/displayport/drm-displayport/hdcp_negotiation
chown system system /sys/module/drm/parameters/vblankoffdelay
chown system system /sys/module/drm/parameters/debug
chown system system /sys/class/dqe0/atc/ambient_light
@@ -835,33 +671,13 @@ on property:sys.boot_completed=1
# Setup final cpuset
write /dev/cpuset/top-app/cpus 0-8
write /dev/cpuset/foreground/cpus 0-7
write /dev/cpuset/foreground_window/cpus 0-7
write /dev/cpuset/background/cpus 0-3
write /dev/cpuset/system-background/cpus 0-3
write /dev/cpuset/restricted/cpus 0-3
write /dev/cpuset/camera-daemon/cpus 0-8
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/auto_uclamp_max "130 130 130 130 512 512 512 512 670"
write /proc/vendor_sched/groups/bg/uclamp_max 130
@@ -885,12 +701,6 @@ on property:sys.boot_completed=1
write /sys/devices/system/cpu/cpufreq/policy8/sched_pixel/limit_frequency 2363000
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/policy8/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/fixedregulator@0/regulator/regulator.2/power/async "enabled"
write /sys/devices/platform/fixedregulator@0/power/async "enabled"
@@ -898,18 +708,6 @@ on property:sys.boot_completed=1
write /sys/devices/platform/10840000.pinctrl/power/async "enabled"
write /sys/devices/platform/13060000.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
@@ -937,9 +735,6 @@ on property:sys.boot_completed=1
# Enable SICD
write /sys/devices/system/cpu/cpupm/cpupm/sicd 1
# To be removed after InputDispatche and InputReader become ADPF
write /proc/vendor_sched/prefer_idle_task_name "InputDispatcher,InputReader"
on property:sys.boot_completed=1 && property:persist.sys.device_provisioned=1
write /sys/class/power_supply/battery/first_usage_date 0
@@ -1177,3 +972,14 @@ on property:persist.device_config.runtime_native_boot.mode_override=asymm
write /sys/devices/system/cpu/cpu6/mte_tcf_preferred asymm
write /sys/devices/system/cpu/cpu7/mte_tcf_preferred asymm
write /sys/devices/system/cpu/cpu8/mte_tcf_preferred asymm
# 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

@@ -1,40 +0,0 @@
#!/vendor/bin/sh
CHECKPOINT_DIR=/data/vendor/copied
export BIN_DIR=/vendor/bin
$BIN_DIR/mkdir -p $CHECKPOINT_DIR
function copy_files_to_data()
{
block_device=$1
partition_name=$(basename $1)
mount_point=$2
tmpdir=$CHECKPOINT_DIR/$partition_name.img
build_checkpoint=$CHECKPOINT_DIR/$partition_name
if [ ! -e $build_checkpoint ]; then
$BIN_DIR/rm -rf $tmpdir
$BIN_DIR/mkdir -p $tmpdir
$BIN_DIR/dump.f2fs -rfPLo $tmpdir $block_device
if [ $? -ne 0 ]; then
echo "Failed to $BIN_DIR/dump.f2fs -rfPLo $tmpdir $block_device"
return
fi
$BIN_DIR/mv $tmpdir $build_checkpoint
if [ $? -ne 0 ]; then
echo "mv $tmpdir $build_checkpoint"
return
fi
$BIN_DIR/fsync `dirname $build_checkpoint`
fi
echo "Successfully copied $mount_point to $build_checkpoint"
}
copy_files_to_data "/dev/block/by-name/efs" "/mnt/vendor/efs"
copy_files_to_data "/dev/block/by-name/efs_backup" "/mnt/vendor/efs_backup"
copy_files_to_data "/dev/block/by-name/modem_userdata" "/mnt/vendor/modem_userdata"
copy_files_to_data "/dev/block/by-name/persist" "/mnt/vendor/persist"
$BIN_DIR/fsync /data/vendor/copied

View File

@@ -14,7 +14,6 @@
# limitations under the License.
#
-include vendor/google_devices/zuma/proprietary/telephony/device-vendor.mk
include device/google/zuma/device.mk
# Telephony
@@ -47,26 +46,3 @@ PRODUCT_PRODUCT_PROPERTIES += \
# Trigger fsck on upgrade (305658663)
PRODUCT_PRODUCT_PROPERTIES += \
ro.preventative_fsck = 1
# Indicate that the bootloader supports the MTE developer option switch
# (MISC_MEMTAG_MODE_MEMTAG_ONCE), with the exception of _fullmte products and
# eng products that force enable MTE
ifeq (,$(filter %_fullmte,$(TARGET_PRODUCT)))
ifeq (,$(filter eng,$(TARGET_BUILD_VARIANT)))
PRODUCT_PRODUCT_PROPERTIES += ro.arm64.memtag.bootctl_supported=1
# N.B. persist properties in product Makefiles aren't actually persisted to the data
# partition, so they will actually go away if we remove them here, or if the user
# flashes from a normal build to a fullmte build.
PRODUCT_PRODUCT_PROPERTIES += persist.arm64.memtag.app.com.android.se=off
PRODUCT_PRODUCT_PROPERTIES += persist.arm64.memtag.app.com.google.android.bluetooth=off
PRODUCT_PRODUCT_PROPERTIES += persist.arm64.memtag.app.com.android.nfc=off
PRODUCT_PRODUCT_PROPERTIES += persist.arm64.memtag.system_server=off
endif
endif
ifeq (,$(filter %_fullmte,$(TARGET_PRODUCT)))
ifneq (,$(filter eng,$(TARGET_BUILD_VARIANT)))
PRODUCT_COPY_FILES += \
device/google/zuma/conf/init.eng.memtag.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.eng.memtag.rc
endif
endif

245
device.mk
View File

@@ -31,7 +31,7 @@ include device/google/gs-common/pixel_metrics/pixel_metrics.mk
include device/google/gs-common/soc/freq.mk
include device/google/gs-common/gps/dump/log.mk
include device/google/gs-common/bcmbt/dump/dumplog.mk
include device/google/gs-common/display/dump.mk
include device/google/gs-common/display/dump_exynos_display.mk
include device/google/gs-common/display_logbuffer/dump.mk
include device/google/gs-common/gxp/gxp.mk
include device/google/gs-common/camera/dump.mk
@@ -41,10 +41,12 @@ include device/google/gs-common/umfw_stat/umfw_stat.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
include device/google/gs-common/recorder/recorder.mk
include device/google/gs-common/fingerprint/fingerprint.mk
include device/google/gs-common/nfc/nfc.mk
include device/google/gs-common/16kb/16kb.mk
include device/google/zuma/dumpstate/item.mk
@@ -58,10 +60,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
@@ -71,24 +73,10 @@ endif
PRODUCT_SOONG_NAMESPACES += \
hardware/google/av \
hardware/google/gchips \
hardware/google/gchips/gralloc4 \
hardware/google/graphics/common \
hardware/google/graphics/zuma \
hardware/google/graphics/zuma/libhwc2.1 \
hardware/google/interfaces \
hardware/google/pixel \
device/google/zuma \
device/google/zuma/powerstats \
vendor/google_devices/common/chre/host/hal \
vendor/google_devices/zuma/proprietary/debugpolicy \
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/zuma/powerstats
# Set the environment variable to switch the Keymint HAL service to Rust
TRUSTY_KEYMINT_IMPL := rust
@@ -102,43 +90,6 @@ endif
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
ro.oem_unlock_supported=1
# Include vendor telephony soong namespace
PRODUCT_SOONG_NAMESPACES += \
vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY)
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/zuma/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
# change to 60 files for zuma
PRODUCT_PROPERTY_OVERRIDES += \
logd.logpersistd=logcatd \
logd.logpersistd.size=60
PRODUCT_PRODUCT_PROPERTIES += \
ro.logcat.compress=true
endif
# From system.property
PRODUCT_PROPERTY_OVERRIDES += \
ro.telephony.default_network=27 \
@@ -212,13 +163,12 @@ PRODUCT_PROPERTY_OVERRIDES += \
PRODUCT_PROPERTY_OVERRIDES += \
telephony.active_modems.max_count=2
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.usb.displayport.enabled=1
else
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.usb.displayport.enabled=1
endif
# Enable Settings 2-pane optimization for devices supporting display ports.
PRODUCT_SYSTEM_PROPERTIES += \
persist.settings.large_screen_opt_for_dp.enabled=true
PRODUCT_PROPERTY_OVERRIDES += \
persist.sys.hdcp_checking=drm-only
@@ -228,7 +178,6 @@ USE_LASSEN_OEMHOOK := true
# $(USE_LASSEN_OEMHOOK) is true and $(BOARD_WITHOUT_RADIO) is not true.
ifneq ($(BOARD_WITHOUT_RADIO),true)
$(call soong_config_set,sitril,use_lassen_oemhook_with_radio,true)
PRODUCT_SOONG_NAMESPACES += vendor/google/tools/power-anomaly-sitril
endif
# Use for GRIL
@@ -241,8 +190,6 @@ endif
ifeq ($(USES_GOOGLE_DIALER_CARRIER_SETTINGS),true)
USE_GOOGLE_DIALER := true
USE_GOOGLE_CARRIER_SETTINGS := true
# GoogleDialer in PDK build with "USES_GOOGLE_DIALER_CARRIER_SETTINGS=true"
PRODUCT_SOONG_NAMESPACES += vendor/google_devices/zuma/proprietary/GoogleDialer
endif
ifeq ($(USES_GOOGLE_PREBUILT_MODEM_SVC),true)
@@ -261,16 +208,6 @@ USE_SWIFTSHADER := false
# HWUI
TARGET_USES_VULKAN = true
# "vendor/arm" doesn't exist in PDK build
ifeq (,$(realpath $(TOPDIR)vendor/arm/mali/valhall/Android.bp))
PRODUCT_SOONG_NAMESPACES += \
vendor/google_devices/zuma/prebuilts/firmware/gpu \
vendor/google_devices/zuma/prebuilts/gpu
else
PRODUCT_SOONG_NAMESPACES += \
vendor/arm/mali/valhall
endif
$(call soong_config_set,pixel_mali,soc,$(TARGET_BOARD_PLATFORM))
$(call soong_config_set,arm_gralloc,soc,$(TARGET_BOARD_PLATFORM))
@@ -320,8 +257,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
#endif
@@ -368,16 +305,12 @@ DEVICE_PACKAGE_OVERLAYS += device/google/zuma/overlay
# This device is shipped with 34 (Android U)
PRODUCT_SHIPPING_API_LEVEL := 34
# 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/zuma/conf/init.zuma.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zuma.usb.rc \
device/google/zuma/conf/ueventd.zuma.rc:$(TARGET_COPY_OUT_VENDOR)/etc/ueventd.rc
@@ -390,20 +323,12 @@ PRODUCT_COPY_FILES += \
device/google/zuma/conf/init.efs.16k.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.efs.rc \
device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.efs.from_data:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.efs.from_data \
PRODUCT_PACKAGES += copy_efs_files_to_data
PRODUCT_PACKAGES += fsck.f2fs.vendor
else
PRODUCT_COPY_FILES += \
device/google/zuma/conf/init.efs.4k.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.efs.rc
endif
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_COPY_FILES += \
device/google/zuma/conf/init.debug.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.debug.rc
PRODUCT_COPY_FILES += \
device/google/zuma/conf/init.freq.userdebug.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.freq.userdebug.rc
endif
ifneq (,$(filter 5.%, $(TARGET_LINUX_KERNEL_VERSION)))
PRODUCT_COPY_FILES += \
device/google/zuma/storage/5.15/init.zuma.storage.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zuma.storage.rc
@@ -452,14 +377,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 += \
@@ -480,13 +397,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
# Vendor modem extensive logging default property
PRODUCT_PROPERTY_OVERRIDES += \
@@ -502,13 +414,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 += \
@@ -551,12 +458,6 @@ PRODUCT_PACKAGES += \
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml
# default usb debug functions
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.usb.usbradio.config=dm
endif
# adpf 16ms update rate
PRODUCT_PRODUCT_PROPERTIES += \
vendor.powerhal.adpf.rate=16666666
@@ -654,12 +555,6 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
ConnectivityOverlay
PRODUCT_PACKAGES_ENG += \
f2fs_io \
check_f2fs \
f2fs.fibmap \
dump.f2fs
# Storage health HAL
PRODUCT_PACKAGES += \
android.hardware.health.storage-service.default
@@ -682,9 +577,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/zuma/firmware/camera/libhfd/default_configuration.hfd.cfg.json:$(TARGET_COPY_OUT_VENDOR)/firmware/default_configuration.hfd.cfg.json \
@@ -728,10 +620,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 \
@@ -747,8 +635,8 @@ PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.earlyGl.sf.duration=16600000
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.earlyGl.app.duration=16600000
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.frame_rate_multiple_threshold=120
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.treat_170m_as_sRGB=1
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.hwc_hotplug_error_via_neg_vsync=1
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.hwc_hdcp_via_neg_vsync=1
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.hdcp_negotiation=1
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.hdcp_support=1
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.enable_layer_caching=true
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_idle_timer_ms?=80
@@ -774,8 +662,7 @@ PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.display_update_imminent
PRODUCT_PROPERTY_OVERRIDES += \
persist.sys.sf.native_mode=2
PRODUCT_COPY_FILES += \
device/google/zuma/display/display_colordata_cal0.pb:$(TARGET_COPY_OUT_VENDOR)/etc/display_colordata_cal0.pb \
device/google/zuma/display/display_colordata_cal2.pb:$(TARGET_COPY_OUT_VENDOR)/etc/display_colordata_cal2.pb
device/google/zuma/display/display_colordata_cal0.pb:$(TARGET_COPY_OUT_VENDOR)/etc/display_colordata_cal0.pb
# limit DPP downscale ratio
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.hwc.dpp.downscale=4
@@ -804,18 +691,11 @@ 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
####################################
# Video
PRODUCT_SOONG_NAMESPACES += vendor/google/media/bigwave
$(call soong_config_set,bigw,soc,$(TARGET_BOARD_PLATFORM))
PRODUCT_PACKAGES += \
@@ -891,17 +771,7 @@ endif
$(call inherit-product, system/core/trusty/trusty-storage.mk)
$(call inherit-product, system/core/trusty/trusty-base.mk)
# Trusty unit test tool and code coverage tool
PRODUCT_PACKAGES_ENG += \
trusty-ut-ctrl \
tipc-test \
trusty_stats_test \
trusty-coverage-controller \
# Trusty Metrics Daemon
PRODUCT_SOONG_NAMESPACES += \
vendor/google/trusty/common
PRODUCT_PACKAGES += \
trusty_metricsd
@@ -915,15 +785,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 += \
@@ -955,12 +819,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 \
@@ -973,9 +831,6 @@ PRODUCT_PACKAGES += \
calliope_iva.bin \
vts.bin
# 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 += ShannonRcs
@@ -995,18 +850,8 @@ USE_RADIO_HAL_2_1 := 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/zuma/proprietary/device-vendor.mk)
ifneq ($(BOARD_WITHOUT_RADIO),true)
$(call inherit-product-if-exists, vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY)/common/device-vendor.mk)
endif
$(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/zuma/zuma.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,zuma)
@@ -1027,13 +872,8 @@ include device/google/gs-common/modem/modem_svc_sit/shared_modem_platform.mk
PRODUCT_PACKAGES += modem_ml_svc_sit
# modem ML models configs
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_COPY_FILES += \
device/google/zuma/modem_ml/modem_ml_models_userdebug.conf:$(TARGET_COPY_OUT_VENDOR)/etc/modem_ml_models.conf
else
PRODUCT_COPY_FILES += \
device/google/zuma/modem_ml/modem_ml_models_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/modem_ml_models.conf
endif
# modem logging binary/configs
PRODUCT_PACKAGES += modem_logging_control
@@ -1075,29 +915,15 @@ PRODUCT_PACKAGES += \
endif
# Vibrator Diag
PRODUCT_PACKAGES_ENG += \
diag-vibrator \
diag-vibrator-cs40l25a \
diag-vibrator-drv2624 \
$(NULL)
PRODUCT_PACKAGES += \
android.hardware.health-service.zuma \
android.hardware.health-service.zuma_recovery \
# Audio
# Audio HAL Server & Default Implementations
ifeq ($(USE_AUDIO_HAL_AIDL),true)
include device/google/gs-common/audio/aidl.mk
else
include device/google/gs-common/audio/hidl_zuma.mk
endif
## 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))
@@ -1118,22 +944,6 @@ PRODUCT_PROPERTY_OVERRIDES += \
PRODUCT_PACKAGES += vndservicemanager
PRODUCT_PACKAGES += vndservice
## TinyTools, debug tool and cs35l41 speaker calibration tool for Audio
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_PACKAGES += \
tinyplay \
tinycap \
tinymix \
tinypcminfo \
tinyhostless \
cplay \
aoc_hal \
aoc_tuning_inft \
mahal_test \
ma_aoc_tuning_test \
crus_sp_cal
endif
PRODUCT_PACKAGES += \
google.hardware.media.c2@1.0-service \
libgc2_store \
@@ -1144,7 +954,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
@@ -1153,16 +963,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,rio)
# Include the edgetpu targets defined the namespaces below into the final image.
PRODUCT_SOONG_NAMESPACES += \
vendor/google_devices/zuma/proprietary/gchips/tpu/metrics \
vendor/google_devices/zuma/proprietary/gchips/tpu/tflite_delegate \
vendor/google_devices/zuma/proprietary/gchips/tpu/darwinn_logging_service \
vendor/google_devices/zuma/proprietary/gchips/tpu/nnapi_stable_aidl \
vendor/google_devices/zuma/proprietary/gchips/tpu/aidl \
vendor/google_devices/zuma/proprietary/gchips/tpu/hal \
vendor/google_devices/zuma/proprietary/gchips/tpu/tachyon/tachyon_apis \
vendor/google_devices/zuma/proprietary/gchips/tpu/tachyon/service
# TPU firmware
PRODUCT_PACKAGES += edgetpu-rio.fw
@@ -1220,9 +1021,6 @@ USES_RADIOEXT_V1_6 = true
# Wifi ext
include hardware/google/pixel/wifi_ext/device.mk
# Battery Stats Viewer
PRODUCT_PACKAGES_ENG += BatteryStatsViewer
# Install product specific framework compatibility matrix
# (TODO: b/169535506) This includes the FCM for system_ext and product partition.
# It must be split into the FCM of each partition.
@@ -1243,11 +1041,8 @@ PRODUCT_PROPERTY_OVERRIDES += \
# Hardware Info Collection
include hardware/google/pixel/HardwareInfo/HardwareInfo.mk
# UFS: the script is used to select the corresponding firmware to run FFU.
PRODUCT_PACKAGES_ENG += ufs_firmware_update.sh
# RIL extension service
ifeq (,$(filter aosp_% factory_%,$(TARGET_PRODUCT)))
ifeq (,$(filter aosp_%,$(TARGET_PRODUCT)))
include device/google/gs-common/pixel_ril/ril.mk
endif

View File

@@ -114,7 +114,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>

Binary file not shown.

View File

@@ -1,9 +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

View File

@@ -1,4 +1,2 @@
PRODUCT_PACKAGES += dump_wlan.sh \
dump_power
PRODUCT_PACKAGES_ENG += dump_gsa.sh

10
evolution.dependencies Normal file
View File

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

11
evolution_common.mk Normal file
View File

@@ -0,0 +1,11 @@
#
# Copyright (C) 2024 The Evolution X Project
#
# SPDX-License-Identifier: Apache-2.0
#
# PixelParts
#include packages/apps/PixelParts/device.mk
# UDFPS
TARGET_HAS_UDFPS += true

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/zuma:device_google_zuma_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: [
"//device/google/zuma:device_google_zuma_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,33 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2023, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Type of the tap sensor. Empty if tap is not supported. False to disable the tap sensor -->
<string name="config_dozeTapSensorType" translatable="false">false</string>
<!-- Control whether the pickup gesture is enabled by default. This value will be used
during initialization when the setting is still null. -->
<bool name="config_dozePickupGestureEnabled">false</bool>
<!-- Is the lock-screen disabled for new users by default -->
<bool name="config_disableLockscreenByDefault">true</bool>
</resources>

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/zuma:device_google_zuma_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: [
"//device/google/zuma:device_google_zuma_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/zuma:device_google_zuma_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: [
"//device/google/zuma:device_google_zuma_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,97 +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/zuma/aosp_common.mk)
$(call inherit-product-if-exists, vendor/google_devices/zuma/factory/pixel/device-factory.mk)
PRODUCT_PROPERTY_OVERRIDES += service.adb.root=1 \
vendor.disable.thermal.control=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 += \
persist.vendor.camera.af.ignore_gyro=1 \
persist.vendor.camera.multicam.framesync=0 \
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 \
vendor.camera.debug.enable_scene_detection=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
# Disable dimming in factory
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.display.0.brightness.dimming.usage=2
# 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/zuma/overlay-factory
PRODUCT_COPY_FILES += \
device/google/zuma/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_DEBUG += \
PixelLogger \
# ModemDiagnosticSystem for desense tool
PRODUCT_PACKAGES += \
ModemDiagnosticSystem \

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,8 +0,0 @@
# Fingerprint
include device/google/zuma/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/zuma/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,6 +0,0 @@
[
{
"repository": "android_device_google_gs101",
"target_path": "device/google/gs101"
}
]

View File

@@ -37,8 +37,8 @@
<Limit name="measured-frame-rate-1920x1088" range="409-411" /> <!-- v90%=1.0 -->
</MediaCodec>
<MediaCodec name="c2.exynos.hevc.decoder" type="video/hevc" update="true">
<!-- measured 90%:529-530 med:529 N=2 -->
<Limit name="measured-frame-rate-352x288" range="1150-1250" /> <!-- v90%=1.0 -->
<!-- b/385249512 -->
<Limit name="measured-frame-rate-352x288" range="420-521" /> <!-- v90%=1.0 -->
<!-- measured 90%:528-530 med:529 N=2 -->
<Limit name="measured-frame-rate-640x360" range="528-529" /> <!-- v90%=1.0 -->
<!-- measured 90%:546-549 med:546 N=2 -->
@@ -51,8 +51,8 @@
<Limit name="measured-frame-rate-3840x2160" range="159-159" /> <!-- v90%=1.0 -->
</MediaCodec>
<MediaCodec name="c2.exynos.hevc.decoder.secure" type="video/hevc" update="true">
<!-- measured 90%:529-530 med:529 N=2 -->
<Limit name="measured-frame-rate-352x288" range="1150-1250" /> <!-- v90%=1.0 -->
<!-- b/385249512 -->
<Limit name="measured-frame-rate-352x288" range="420-521" /> <!-- v90%=1.0 -->
<!-- measured 90%:528-530 med:529 N=2 -->
<Limit name="measured-frame-rate-640x360" range="528-529" /> <!-- v90%=1.0 -->
<!-- measured 90%:546-549 med:546 N=2 -->

View File

@@ -1 +0,0 @@
PRODUCT_PACKAGES += vcd

View File

@@ -1,4 +0,0 @@
#name,version,ml_type,compute_enable,compute_timer,train_enable,train_timer,monitor_enable_monitor_timer,execution_type,execution_timer
fr2_bps_ml_model,0,LEGACY,true,0,false,0,false,0,SYNCHRONOUS_REGULAR,5000
sample_linear_reg,0,LEGACY,false,0,false,0,false,0,SYNCHRONOUS_REGULAR,5000
sample_fully_conn,88,LEGACY,false,0,false,0,false,0,SYNCHRONOUS_REGULAR,5000

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,38 @@
<!-- 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>
<!-- External display peak refresh rate for the given device. Change this value if you want to
prevent the framework from using higher refresh rates, even if display modes with higher
refresh rates are available from hardware composer. Only has an effect if this value and
config_externalDisplayPeakWidth and config_externalDisplayPeakHeight are non-zero. -->
<integer name="config_externalDisplayPeakRefreshRate">61</integer>
<!-- External display peak width for the given device. Change this value if you want
to prevent the framework from using higher resolution, even if display modes with higher
resolutions are available from hardware composer. Only has an effect if this value and
config_externalDisplayPeakRefreshRate and config_externalDisplayPeakHeight are non-zero.-->
<integer name="config_externalDisplayPeakWidth">1920</integer>
<!-- External display peak height for the given device. Change this value if you want
to prevent the framework from using higher resolution, even if display modes with higher
resolutions are available from hardware composer. Only has an effect if this value and
config_externalDisplayPeakRefreshRate and config_externalDisplayPeakWidth are non-zero. -->
<integer name="config_externalDisplayPeakHeight">1080</integer>
<!-- Enable synchronization of the displays refresh rates by applying the default low refresh
rate. -->
<bool name="config_refreshRateSynchronizationEnabled">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

@@ -25,6 +25,7 @@
<!-- Defines the actions shown in advanced reboot submenu -->
<string-array name="config_restartActionsList">
<item>restart</item>
<item>restart_systemui</item>
<item>restart_recovery</item>
<item>restart_fastboot</item>
<item>restart_bootloader</item>

View File

@@ -244,12 +244,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. -->
@@ -316,4 +310,8 @@
<!-- Whether to enable usb state update via udc sysfs. -->
<bool name="config_enableUdcSysfsUsbStateUpdate">true</bool>
<!-- Whether desktop mode is supported on the current device -->
<bool name="config_isDesktopModeSupported">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/zuma:device_google_zuma_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: [
"//device/google/zuma:device_google_zuma_license",
],
}
cc_binary {
name: "pixelstats-vendor",
init_rc: ["pixelstats-vendor.zuma.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,171 +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 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)
},
.AmsRatePath = "/sys/devices/platform/audiometrics/ams_rate_read_once",
.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",
},
.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",
.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"
}
},
.ModemPcieLinkStatsPath = "/sys/devices/platform/12100000.pcie/link_stats",
.WifiPcieLinkStatsPath = "/sys/devices/platform/13120000.pcie/link_stats",
.DisplayStatsPaths = {
"/sys/devices/platform/exynos-drm/primary-panel/error_count_te",
"/sys/devices/platform/exynos-drm/primary-panel/error_count_unknown",
"/sys/devices/platform/exynos-drm/secondary-panel/error_count_te",
"/sys/devices/platform/exynos-drm/secondary-panel/error_count_unknown",
},
.PDMStatePath = "/sys/devices/platform/audiometrics/pdm_state",
.WavesPath = "/sys/devices/platform/audiometrics/waves",
.AdaptedInfoCountPath = "/sys/devices/platform/audiometrics/adapted_info_active_count",
.AdaptedInfoDurationPath = "/sys/devices/platform/audiometrics/adapted_info_active_duration",
.CCARatePath = "/sys/devices/platform/audiometrics/cca_count_read_once",
.PcmLatencyPath = "/sys/devices/platform/audiometrics/pcm_latency",
.PcmCountPath = "/sys/devices/platform/audiometrics/pcm_count",
.TotalCallCountPath = "/sys/devices/platform/audiometrics/call_count",
.OffloadEffectsIdPath = "/sys/devices/platform/audiometrics/offload_effects_id",
.OffloadEffectsDurationPath = "/sys/devices/platform/audiometrics/offload_effects_duration",
.BluetoothAudioUsagePath = "/sys/devices/platform/audiometrics/bt_usage",
.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"
},
.DisplayPortStatsPaths = {
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/link_negotiation_failures",
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/edid_read_failures",
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/dpcd_read_failures",
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/edid_invalid_failures",
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/sink_count_invalid_failures",
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/link_unstable_failures",
},
.DisplayPortDSCStatsPaths = {
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/fec_dsc_supported",
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/fec_dsc_not_supported",
},
.DisplayPortMaxResolutionStatsPaths = {
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_other",
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_1366_768",
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_1440_900",
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_1600_900",
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_1920_1080",
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_2560_1080",
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_2560_1440",
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_3440_1440",
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_3840_2160",
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_5120_2880",
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/max_res_7680_4320",
},
.HDCPStatsPaths = {
"/sys/devices/platform/hdcp/hdcp2_success_count",
"/sys/devices/platform/hdcp/hdcp2_fallback_count",
"/sys/devices/platform/hdcp/hdcp2_fail_count",
"/sys/devices/platform/hdcp/hdcp1_success_count",
"/sys/devices/platform/hdcp/hdcp1_fail_count",
"/sys/devices/platform/hdcp/hdcp0_count",
},
.SpeakerVersionPath = "/sys/devices/platform/audiometrics/speaker_version"
};
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

@@ -3,7 +3,6 @@
/vendor/bin/bipchmgr u:object_r:bipchmgr_exec:s0
/vendor/bin/vcd u:object_r:vcd_exec:s0
/vendor/bin/dmd u:object_r:dmd_exec:s0
/vendor/bin/sced u:object_r:sced_exec:s0
/vendor/bin/rfsd u:object_r:rfsd_exec:s0
/vendor/bin/modem_logging_control u:object_r:modem_logging_control_exec:s0
/vendor/bin/modem_ml_svc_sit u:object_r:modem_ml_svc_sit_exec:s0

View File

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

View File

@@ -1,23 +0,0 @@
type sced, domain;
type sced_exec, vendor_file_type, exec_type, file_type;
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

@@ -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

@@ -5,13 +5,18 @@ dump_modem sscoredump_vendor_data_logcat_file dir b/361725982
dumpstate app_zygote process b/288049050
edgetpu_vendor_server shell_data_file dir b/369475225
edgetpu_vendor_server shell_data_file dir b/369475363
hal_bluetooth_btlinux proc file b/390293495
hal_bluetooth_btlinux vendor_default_prop property_service b/350832030
hal_camera_default aconfig_storage_metadata_file dir b/383013471
hal_contexthub_default hal_bluetooth_service service_manager b/396572958
hal_drm_widevine system_userdir_file dir b/393955151
hal_radioext_default radio_vendor_data_file file b/312590044
incidentd debugfs_wakeup_sources file b/288049561
incidentd incidentd anon_inode b/288049561
init init capability b/379207041
insmod-sh insmod-sh key b/274374722
insmod-sh kmsg_device chr_file b/388949246
insmod-sh vendor_edgetpu_debugfs dir b/385858993
kernel dm_device blk_file b/319403445
modem_svc_sit hal_radioext_default process b/364446415
modem_svc_sit modem_ml_svc_sit file b/360060606
@@ -19,12 +24,16 @@ modem_svc_sit modem_ml_svc_sit file b/360060992
mtectrl unlabeled dir b/264483752
pixelstats_vendor block_device dir b/369540673
pixelstats_vendor block_device dir b/369540836
pixelstats_vendor chre_socket sock_file b/400297422
platform_app radio_vendor_data_file dir b/380756119
platform_app vendor_fw_file dir b/372121912
platform_app vendor_rild_prop file b/372121912
priv_app audio_config_prop file b/379246064
radio audio_config_prop file b/379245771
ramdump ramdump capability b/369475700
ramdump_app default_prop file b/386149375
shell idmap_exec file b/398697849
shell qemu_sf_lcd_density_prop file b/398697849
shell sysfs_net file b/330081782
ssr_detector_app default_prop file b/340722729
system_server sysfs_batteryinfo file b/294967729
@@ -39,4 +48,5 @@ vendor_init default_prop file b/323087490
vendor_init default_prop property_service b/315104235
vendor_init default_prop property_service b/359428180
vendor_init vendor_volte_mif_off property_service b/316816642
zygote aconfig_storage_metadata_file dir b/383949325
zygote zygote capability b/379207101

View File

@@ -54,4 +54,3 @@ type sysfs_ospm, sysfs_type, fs_type;
# GSA
type sysfs_gsa_log, sysfs_type, fs_type;
type sysfs_faceauth_rawimage_heap, sysfs_type, fs_type;

View File

@@ -102,6 +102,7 @@ is_flag_disabled(RELEASE_AVF_ENABLE_DEVICE_ASSIGNMENT, `
/dev/gxp u:object_r:gxp_device:s0
/dev/mali0 u:object_r:gpu_device:s0
/dev/goodix_fp u:object_r:fingerprint_device:s0
/dev/fth_fd u:object_r:fingerprint_device:s0
/dev/logbuffer_tcpm u:object_r:logbuffer_device:s0
/dev/logbuffer_usbpd u:object_r:logbuffer_device:s0
/dev/logbuffer_ssoc u:object_r:logbuffer_device:s0

View File

@@ -94,6 +94,7 @@ genfscon sysfs /devices/platform/19440000.drmdsim/19440000.drmdsim.0/backlight/p
genfscon sysfs /devices/platform/19440000.drmdsim/19440000.drmdsim.0/error_count_te u:object_r:sysfs_display:s0
genfscon sysfs /devices/platform/19440000.drmdsim/19440000.drmdsim.0/error_count_unknown u:object_r:sysfs_display:s0
genfscon sysfs /devices/platform/110f0000.drmdp/drm-displayport/dp_hotplug_error_code u:object_r:sysfs_display:s0
genfscon sysfs /devices/platform/110f0000.drmdp/drm-displayport/hdcp_negotiation u:object_r:sysfs_display:s0
genfscon sysfs /devices/platform/110f0000.drmdp/drm-displayport-stats/link_negotiation_failures u:object_r:sysfs_display:s0
genfscon sysfs /devices/platform/110f0000.drmdp/drm-displayport-stats/edid_read_failures u:object_r:sysfs_display:s0
genfscon sysfs /devices/platform/110f0000.drmdp/drm-displayport-stats/dpcd_read_failures u:object_r:sysfs_display:s0
@@ -290,6 +291,8 @@ genfscon sysfs /devices/platform/odm/odm:btbcm/wakeup
genfscon sysfs /devices/platform/19440000.drmdsim/19440000.drmdsim.0/wakeup/ u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/19450000.drmdsim/19450000.drmdsim.0/wakeup/ u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/110f0000.drmdp/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
# Trusty
genfscon sysfs /module/trusty_virtio/parameters/use_high_wq u:object_r:sysfs_trusty:s0
@@ -334,9 +337,6 @@ genfscon sysfs /devices/platform/17000000.aoc/control/udfps_get_osc_freq
genfscon sysfs /devices/platform/17000000.aoc/control/udfps_get_disp_freq u:object_r:sysfs_aoc_udfps:s0
genfscon sysfs /devices/platform/17000000.aoc/notify_timeout_aoc_status u:object_r:sysfs_aoc_notifytimeout:s0
# Faceauth
genfscon sysfs /sys/kernel/vendor_mm/gcma_heap/trusty:faceauth_rawimage_heap/max_usage_kb u:object_r:sysfs_faceauth_rawimage_heap:s0
# Bluetooth
genfscon sysfs /devices/platform/155d0000.serial/uart_dbg u:object_r:sysfs_bt_uart:s0

10
sepolicy/vendor/gpu.te vendored Normal file
View File

@@ -0,0 +1,10 @@
# Policy to enable only production gpu ioctls.
is_flag_enabled(RELEASE_PIXEL_MALI_SEPOLICY_ENABLED, `
# Allow gpu ioctls used in production.
allowxperm appdomain gpu_device:chr_file ioctl { unpriv_gpu_ioctls instrumentation_gpu_ioctls };
# Audit gpu ioctl commands which have been deprecated,
# or are intended for development of the GPU.
auditallow appdomain gpu_device:chr_file ioctl;
allowxperm appdomain gpu_device:chr_file ioctl { debug_gpu_ioctls deprecated_gpu_ioctls };
auditallowxperm appdomain gpu_device:chr_file ioctl { debug_gpu_ioctls deprecated_gpu_ioctls };
')

73
sepolicy/vendor/ioctl_defines vendored Normal file
View File

@@ -0,0 +1,73 @@
define(`KBASE_IOCTL_VERSION_CHECK_JM', `0x8000')
define(`KBASE_IOCTL_SET_FLAGS', `0x8001')
define(`KBASE_IOCTL_JOB_SUBMIT', `0x8002')
define(`KBASE_IOCTL_GET_GPUPROPS', `0x8003')
define(`KBASE_IOCTL_POST_TERM', `0x8004')
define(`KBASE_IOCTL_MEM_ALLOC', `0x8005')
define(`KBASE_IOCTL_MEM_QUERY', `0x8006')
define(`KBASE_IOCTL_MEM_FREE', `0x8007')
define(`KBASE_IOCTL_HWCNT_READER_SETUP', `0x8008')
define(`KBASE_IOCTL_DISJOINT_QUERY', `0x800c')
define(`KBASE_IOCTL_GET_DDK_VERSION', `0x800d')
define(`KBASE_IOCTL_MEM_JIT_INIT', `0x800e')
define(`KBASE_IOCTL_MEM_SYNC', `0x800f')
define(`KBASE_IOCTL_MEM_FIND_CPU_OFFSET', `0x8010')
define(`KBASE_IOCTL_GET_CONTEXT_ID', `0x8011')
define(`KBASE_IOCTL_TLSTREAM_ACQUIRE', `0x8012')
define(`KBASE_IOCTL_TLSTREAM_FLUSH', `0x8013')
define(`KBASE_IOCTL_MEM_COMMIT', `0x8014')
define(`KBASE_IOCTL_MEM_ALIAS', `0x8015')
define(`KBASE_IOCTL_MEM_IMPORT', `0x8016')
define(`KBASE_IOCTL_MEM_FLAGS_CHANGE', `0x8017')
define(`KBASE_IOCTL_STREAM_CREATE', `0x8018')
define(`KBASE_IOCTL_FENCE_VALIDATE', `0x8019')
define(`KBASE_IOCTL_MEM_PROFILE_ADD', `0x801b')
define(`KBASE_IOCTL_SOFT_EVENT_UPDATE', `0x801c')
define(`KBASE_IOCTL_STICKY_RESOURCE_MAP', `0x801d')
define(`KBASE_IOCTL_STICKY_RESOURCE_UNMAP', `0x801e')
define(`KBASE_IOCTL_MEM_FIND_GPU_START_AND_OFFSET', `0x801f')
define(`KBASE_IOCTL_HWCNT_SET', `0x8020')
define(`KBASE_IOCTL_CINSTR_GWT_START', `0x8021')
define(`KBASE_IOCTL_CINSTR_GWT_STOP', `0x8022')
define(`KBASE_IOCTL_CINSTR_GWT_DUMP', `0x8023')
define(`KBASE_IOCTL_CS_QUEUE_REGISTER', `0x8024')
define(`KBASE_IOCTL_CS_QUEUE_KICK', `0x8025')
define(`KBASE_IOCTL_MEM_EXEC_INIT', `0x8026')
define(`KBASE_IOCTL_CS_QUEUE_BIND', `0x8027')
define(`KBASE_IOCTL_CS_QUEUE_REGISTER_EX', `0x8028')
define(`KBASE_IOCTL_CS_QUEUE_TERMINATE', `0x8029')
define(`KBASE_IOCTL_CS_QUEUE_GROUP_CREATE_1_6', `0x802a')
define(`KBASE_IOCTL_CS_QUEUE_GROUP_TERMINATE', `0x802b')
define(`KBASE_IOCTL_CS_EVENT_SIGNAL', `0x802c')
define(`KBASE_IOCTL_KCPU_QUEUE_CREATE', `0x802d')
define(`KBASE_IOCTL_KCPU_QUEUE_DELETE', `0x802e')
define(`KBASE_IOCTL_KCPU_QUEUE_ENQUEUE', `0x802f')
define(`KBASE_IOCTL_CS_TILER_HEAP_INIT', `0x8030')
define(`KBASE_IOCTL_CS_TILER_HEAP_TERM', `0x8031')
define(`KBASE_IOCTL_GET_CPU_GPU_TIMEINFO', `0x8032')
define(`KBASE_IOCTL_CS_GET_GLB_IFACE', `0x8033')
define(`KBASE_IOCTL_VERSION_CHECK_CSF', `0x8034')
define(`KBASE_IOCTL_CS_CPU_QUEUE_DUMP', `0x8035')
define(`KBASE_IOCTL_CONTEXT_PRIORITY_CHECK', `0x8036')
define(`KBASE_IOCTL_SET_LIMITED_CORE_COUNT', `0x8037')
define(`KBASE_IOCTL_KINSTR_PRFCNT_ENUM_INFO', `0x8038')
define(`KBASE_IOCTL_KINSTR_PRFCNT_SETUP', `0x8039')
define(`KBASE_IOCTL_CS_QUEUE_GROUP_CREATE', `0x803a')
define(`KBASE_IOCTL_MEM_ALLOC_EX', `0x803b')
define(`KBASE_IOCTL_READ_USER_PAGE', `0x803c')
define(`KBASE_IOCTL_QUEUE_GROUP_CLEAR_FAULTS', `0x803d')
define(`KBASE_IOCTL_APC_REQUEST', `0x8042')
define(`KBASE_IOCTL_BUFFER_LIVENESS_UPDATE', `0x8043')
define(`KBASE_HWCNT_READER_GET_HWVER', `0xBE00')
define(`KBASE_HWCNT_READER_GET_BUFFER_SIZE', `0xBE01')
define(`KBASE_HWCNT_READER_DUMP', `0xBE10')
define(`KBASE_HWCNT_READER_CLEAR', `0xBE11')
define(`KBASE_HWCNT_READER_GET_BUFFER', `0xBE20')
define(`KBASE_HWCNT_READER_PUT_BUFFER', `0xBE21')
define(`KBASE_HWCNT_READER_SET_INTERVAL', `0xBE30')
define(`KBASE_HWCNT_READER_ENABLE_EVENT', `0xBE40')
define(`KBASE_HWCNT_READER_DISABLE_EVENT', `0xBE41')
define(`KBASE_HWCNT_READER_GET_API_VERSION', `0xBEFF')
define(`KBASE_IOCTL_KINSTR_PRFCNT_CMD', `0xBF00')
define(`KBASE_IOCTL_KINSTR_PRFCNT_GET_SAMPLE', `0xBF01')
define(`KBASE_IOCTL_KINSTR_PRFCNT_PUT_SAMPLE', `0xBF10')

83
sepolicy/vendor/ioctl_macros vendored Normal file
View File

@@ -0,0 +1,83 @@
define(`unpriv_gpu_ioctls', `{
KBASE_IOCTL_VERSION_CHECK_JM
KBASE_IOCTL_SET_FLAGS
KBASE_IOCTL_JOB_SUBMIT
KBASE_IOCTL_GET_GPUPROPS
KBASE_IOCTL_POST_TERM
KBASE_IOCTL_MEM_ALLOC
KBASE_IOCTL_MEM_QUERY
KBASE_IOCTL_MEM_FREE
KBASE_IOCTL_DISJOINT_QUERY
KBASE_IOCTL_GET_DDK_VERSION
KBASE_IOCTL_MEM_JIT_INIT
KBASE_IOCTL_MEM_SYNC
KBASE_IOCTL_MEM_FIND_CPU_OFFSET
KBASE_IOCTL_GET_CONTEXT_ID
KBASE_IOCTL_MEM_COMMIT
KBASE_IOCTL_MEM_ALIAS
KBASE_IOCTL_MEM_IMPORT
KBASE_IOCTL_MEM_FLAGS_CHANGE
KBASE_IOCTL_STREAM_CREATE
KBASE_IOCTL_FENCE_VALIDATE
KBASE_IOCTL_MEM_PROFILE_ADD
KBASE_IOCTL_SOFT_EVENT_UPDATE
KBASE_IOCTL_STICKY_RESOURCE_MAP
KBASE_IOCTL_STICKY_RESOURCE_UNMAP
KBASE_IOCTL_MEM_FIND_GPU_START_AND_OFFSET
KBASE_IOCTL_CS_QUEUE_REGISTER
KBASE_IOCTL_CS_QUEUE_KICK
KBASE_IOCTL_MEM_EXEC_INIT
KBASE_IOCTL_CS_QUEUE_BIND
KBASE_IOCTL_CS_QUEUE_REGISTER_EX
KBASE_IOCTL_CS_QUEUE_TERMINATE
KBASE_IOCTL_CS_QUEUE_GROUP_TERMINATE
KBASE_IOCTL_CS_EVENT_SIGNAL
KBASE_IOCTL_KCPU_QUEUE_CREATE
KBASE_IOCTL_KCPU_QUEUE_DELETE
KBASE_IOCTL_KCPU_QUEUE_ENQUEUE
KBASE_IOCTL_CS_TILER_HEAP_INIT
KBASE_IOCTL_CS_TILER_HEAP_TERM
KBASE_IOCTL_GET_CPU_GPU_TIMEINFO
KBASE_IOCTL_CS_GET_GLB_IFACE
KBASE_IOCTL_VERSION_CHECK_CSF
KBASE_IOCTL_CS_CPU_QUEUE_DUMP
KBASE_IOCTL_CONTEXT_PRIORITY_CHECK
KBASE_IOCTL_SET_LIMITED_CORE_COUNT
KBASE_IOCTL_CS_QUEUE_GROUP_CREATE
KBASE_IOCTL_MEM_ALLOC_EX
KBASE_IOCTL_READ_USER_PAGE
KBASE_IOCTL_QUEUE_GROUP_CLEAR_FAULTS
KBASE_IOCTL_APC_REQUEST
KBASE_IOCTL_BUFFER_LIVENESS_UPDATE
}')
define(`instrumentation_gpu_ioctls', `{
KBASE_IOCTL_KINSTR_PRFCNT_ENUM_INFO
KBASE_IOCTL_KINSTR_PRFCNT_SETUP
KBASE_IOCTL_TLSTREAM_ACQUIRE
KBASE_IOCTL_TLSTREAM_FLUSH
KBASE_IOCTL_KINSTR_PRFCNT_CMD
KBASE_IOCTL_KINSTR_PRFCNT_GET_SAMPLE
KBASE_IOCTL_KINSTR_PRFCNT_PUT_SAMPLE
}')
define(`debug_gpu_ioctls', `{
KBASE_IOCTL_HWCNT_SET
KBASE_IOCTL_CINSTR_GWT_START
KBASE_IOCTL_CINSTR_GWT_STOP
KBASE_IOCTL_CINSTR_GWT_DUMP
}')
define(`deprecated_gpu_ioctls', `{
KBASE_HWCNT_READER_GET_HWVER
KBASE_HWCNT_READER_GET_BUFFER_SIZE
KBASE_HWCNT_READER_DUMP
KBASE_HWCNT_READER_CLEAR
KBASE_HWCNT_READER_GET_BUFFER
KBASE_HWCNT_READER_PUT_BUFFER
KBASE_HWCNT_READER_SET_INTERVAL
KBASE_HWCNT_READER_ENABLE_EVENT
KBASE_HWCNT_READER_DISABLE_EVENT
KBASE_HWCNT_READER_GET_API_VERSION
KBASE_IOCTL_CS_QUEUE_GROUP_CREATE_1_6
}')

View File

@@ -1,5 +1,3 @@
com.google.hardware.pixel.display.IDisplay/default u:object_r:hal_pixel_display_service:s0
vendor.google.wireless_charger.IWirelessCharger/default u:object_r:hal_wireless_charger_service:s0
arm.mali.platform.ICompression/default u:object_r:arm_mali_platform_service:s0

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",
@@ -59,18 +58,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

@@ -521,9 +521,9 @@ Usb::Usb()
mRoleSwitchLock(PTHREAD_MUTEX_INITIALIZER),
mPartnerLock(PTHREAD_MUTEX_INITIALIZER),
mPartnerUp(false),
mUsbDataSessionMonitor(kUdcUeventRegex, kUdcStatePath, kHost1UeventRegex, kHost1StatePath,
kHost2UeventRegex, kHost2StatePath, kDataRolePath,
std::bind(&updatePortStatus, this)),
mUsbDataSessionMonitor(new UsbDataSessionMonitor(kUdcUeventRegex, kUdcStatePath,
kHost1UeventRegex, kHost1StatePath, kHost2UeventRegex,
kHost2StatePath, kDataRolePath, std::bind(&updatePortStatus, this))),
mOverheat(ZoneInfo(TemperatureType::USB_PORT, kThermalZoneForTrip,
ThrottlingSeverity::CRITICAL),
{ZoneInfo(TemperatureType::UNKNOWN, kThermalZoneForTempReadPrimary,
@@ -1075,7 +1075,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,10 +19,10 @@
#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 <sys/eventfd.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.
@@ -50,6 +50,7 @@ using ::aidl::android::hardware::usb::PortRole;
using ::android::base::ReadFileToString;
using ::android::base::WriteStringToFile;
using ::android::base::unique_fd;
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;
@@ -123,7 +124,7 @@ struct Usb : public BnUsb {
bool mPartnerUp;
// Report usb data session event and data incompliance warnings
UsbDataSessionMonitor mUsbDataSessionMonitor;
std::unique_ptr<UsbDataSessionMonitor> mUsbDataSessionMonitor;
// Usb Overheat object for push suez event
UsbOverheatEvent mOverheat;
// Temperature when connected

View File

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

View File

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