154 Commits
vic ... bka

Author SHA1 Message Date
Michael Bestas
6c534de061 gs-common: Remove zuma HIDL audio configuration
Change-Id: I72c988fb23b7dece6cbc0b18b28a6b37fee4b896
2025-06-26 06:20:40 +03:00
Michael Bestas
6b78398240 gs-common: Remove RELEASE_PIXEL_AIDL_BATTERY_MITIGATION_HAL guard
This has been enabled since a while, remove the aconfig dependency.

Change-Id: I0282a6b4e7aa9f7b110974837917b19e5afde22b
2025-06-26 06:20:40 +03:00
Michael Bestas
797741c2bf gs-common: Drop pixelsystemservice sepolicy
We don't ship this app and it breaks the build since we are missing
its policies.

Change-Id: I136579fbd7c07de195b66b9f1e6b0fcb4bd3493a
2025-06-26 06:20:40 +03:00
Michael Bestas
02b9cc144c gs-common: Remove non-existent vendor includes
Change-Id: I1bc76430d30259984f4eb91907be61ef39646c27
2025-06-26 06:20:40 +03:00
Michael Bestas
0dbbbc376c gs-common: sepolicy: Import missing rules from BP2A
Change-Id: I70ebc8a2bce09d2590c24fc919b2804cef256568
2025-06-26 06:20:40 +03:00
Michael Bestas
edc3d90511 gs-common: Import wfc-pkt-router configuration from gs101
Change-Id: I929c92f633494ec22b7714d1efc58ccb68c2b861
2025-06-24 02:44:55 +03:00
Michael Bestas
22322941ea gs-common: Remove userdebug/eng configuration
Change-Id: Ie1e8b6bbebdfac97f8bc382e41c70cc8a32caf07
2025-06-23 19:29:31 +03:00
Michael Bestas
dc28234ecd gs-common: Update init scripts from BP2A
Change-Id: Ibb8d3715ec6cb9ebb5d89e116374d468dfcad826
2025-06-23 19:29:30 +03:00
Michael Bestas
eeb40af781 gs-common: Downgrade vendor.google.bluetooth_ext to match BP2A
Change-Id: I9b61349fe5aadd9b473a27c6866707fa8c07e942
2025-06-23 06:11:17 +03:00
Michael Bestas
e42f6f3d8e gs-common: Update FCM for 16
Change-Id: I8ee67a706412502088bec78b261080eb4cea9894
2025-06-23 06:11:14 +03:00
Michael Bestas
50929e081f 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
# eCi5AKCHAzJVFdsm++eJGXcPb6LbaKIGTQCcDiWODLyLOWCK64nt7tfCwTgUFCE=
# =3OQU
# -----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 Jaegeuk Kim (6) and others
# Via Android (Google) Code Review (55) and others
* tag 'aml_tz6_351400020': (74 commits)
  Fix comment
  Adjust the version set in manifest xml and matrix xml
  Add astd sepolicy to gs-common for P26 factory builds
  Allow tachyon service to make binder calls to gca
  display: add drm_atomic_state to debug-build bugreport
  init.pixel-perf.rc: Setup default rampup multiplier and util_est
  Allow write for restorecon
  Dump F2FS disk_map and UFS phy version
  Fix UFS err_stats
  Fix selinux permission denials
  move common init perf settings to gs_common
  Revert "Set up access control rule for aocxd"
  16KB: Move CopyEfsTest to device/google/gs-common
  Revert^2 "Add Bluetooth extension HAL - CCO"
  gs-common: wlc: add tx update permission for hal_googlebattery
  Revert "Add Bluetooth extension HAL - CCO"
  storage: fix userdata_exp.ai partition selinux error
  Revert "move common init perf settings to gs_common"
  insmod-sh: Allow writing to kmsg
  RamdumpService: Fix the SELinux errors from introducing Firebase Analytics.
  ...

 Conflicts:
	display/dump_pixel_display.mk

Change-Id: Iaa05ef7e62a7b8320f320ad4db482998863fe136
2025-06-23 05:14:52 +03:00
Android Build Coastguard Worker
fb8021ba67 Snap for 13025264 from 3f842350d7 to mainline-tzdata6-release
Change-Id: Iea561daccd5edf37d16abe72bd7312abfbdeaad2
2025-02-06 14:21:03 -08:00
Treehugger Robot
3f842350d7 Merge "Fix comment" into main 2025-02-06 09:19:33 -08:00
Charlie Lin
be9f4c732e Merge "Add astd sepolicy to gs-common for P26 factory builds" into main 2025-02-05 20:28:46 -08:00
Jaegeuk Kim
9409c3382e Fix comment
Bug: 378120929
Flag: build.RELEASE_PIXEL_VENDOR_INTELLIGENCE_AID
Change-Id: I20b1fb2eb21d0db63c69d9eb30e89b0a824540f8
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2025-02-05 20:13:18 -08:00
Martin Yan
8e57e75903 Merge "Adjust the version set in manifest xml and matrix xml" into main 2025-02-05 19:40:06 -08:00
Martin Yan
6e31d8db91 Adjust the version set in manifest xml and matrix xml
Bug: 361443653
Test: m and build pass
Flag: EXEMPT, this feature is related to CS which is controlled
      by com.android.bluetooth.flags.channel_sounding_in_stack
Change-Id: I2f2f46cfd15ce0104a6309c8032f7f4ef5ba267a
2025-02-05 09:00:52 +00:00
Treehugger Robot
340cf2f377 Merge "display: add drm_atomic_state to debug-build bugreport" into main 2025-02-04 08:05:49 -08:00
Treehugger Robot
7196fcdb48 Merge changes Ia03cddd6,I8e174e37,I159f5bcf into main
* changes:
  Allow write for restorecon
  Dump F2FS disk_map and UFS phy version
  Fix UFS err_stats
2025-02-03 08:58:52 -08:00
Charlie Lin
7f468a902f Add astd sepolicy to gs-common for P26 factory builds
Bug: 391090956
Bug: 393999182
Flag: EXEMPT bugFix
Test: Compile successful.
Change-Id: Idfcbf96a52326b613684b680676f5213136f2326
2025-02-03 11:13:52 +00:00
Dinesh Yadav
25b66183cf Allow tachyon service to make binder calls to gca
This permission is needed for tachyon service to call callbacks shared by clients of gxp/edgetpu device for tensor G5. As tachyon is present in pixel 6 where google_camera_app is not defined, I need to assign it here.

AVC Error seen when tachyon tries accessing GCA:
01-22 11:40:03.212  6987  6987 W com.google.edge: type=1400 audit(0.0:17): avc:  denied  { call } for  scontext=u:r:edgetpu_tachyon_server:s0 tcontext=u:r:google_camera_app:s0:c145,c256,c512,c768 tclass=binder permissive=0
01-23 07:12:26.424  4166  4166 W com.google.edge: type=1400 audit(0.0:254): avc:  denied  { call } for  scontext=u:r:edgetpu_tachyon_server:s0 tcontext=u:r:debug_camera_app:s0:c67,c257,c512,c768 tclass=binder permissive=0

Bug:391537620
Flag: EXEMPT updates device sepolicy only
Change-Id: I9dd78bd941b0de9057606409fd18632cc76f56b0
2025-02-02 20:02:52 -08:00
Taylor Nelms
7cbab2dea5 display: add drm_atomic_state to debug-build bugreport
AVC Error Log Justification:
[  157.933663] type=1400 audit(1738255720.900:459): avc:  denied  { read } for  comm="dump_pixel_disp" name="state" dev="debugfs" ino=105961 scontext=u:r:dump_pixel_display:s0 tcontext=u:object_r:debugfs:s0 tclass=file permissive=0

Bug: 393355365
Test: `adb bugreport`, check for "DRM State" entry
Flag: EXEMPT bugfix
Change-Id: Ibbf3fe022863644ecc137ab28d3a2409e701e104
Signed-off-by: Taylor Nelms <tknelms@google.com>
2025-01-30 11:50:13 -05:00
Qais Yousef
5201b55858 init.pixel-perf.rc: Setup default rampup multiplier and util_est
Bug: 335874870
Flag: EXEMPT not supported for init.rc files
Signed-off-by: Qais Yousef <qyousef@google.com>
Change-Id: I41f1235e8c6f1ec57af3962c2a6cbc9707444917
2025-01-28 17:45:04 +00:00
Piotr Klasa
5262751145 Merge "move common init perf settings to gs_common" into main 2025-01-28 03:12:07 -08:00
Jaegeuk Kim
b1072785ba Allow write for restorecon
[ 8345.125689] type=1400 audit(1737841652.160:245): avc:  denied  { write } for  comm="kworker/u16:2" path="/dev/block/sda34" dev="tmpfs" ino=1060 scontext=u:r:kernel:s0 tcontext=u:object_r:userdata_exp_block_device:s0 tclass=blk_file permissive=0

Bug: 361093433
Flag: EXEMPT bugfix
Change-Id: Ia03cddd6eebe9b8875bdbd1a8eb3a67f51269032
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2025-01-25 16:27:47 -08:00
Jaegeuk Kim
7bd70d06d7 Dump F2FS disk_map and UFS phy version
[   91.358748] type=1400 audit(1737771651.492:274): avc:  denied  { search } for  comm="dump_storage" name="f2fs" dev="proc" ino=4026532053 scontext=u:r:dump_storage:s0 tcontext=u:object_r:proc_f2fs:s0 tclass=dir permissive=0
[   49.564560] type=1400 audit(1737778106.496:153): avc:  denied  { read } for  comm="dump_storage" name="f2fs" dev="proc" ino=4026532053 scontext=u:r:dump_storage:s0 tcontext=u:object_r:proc_f2fs:s0 tclass=dir permissive=0
[   91.358930] type=1400 audit(1737771651.492:275): avc:  denied  { read } for  comm="dump_storage" name="phy_version" dev="sysfs" ino=109125 scontext=u:r:dump_storage:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
[   91.359249] type=1400 audit(1737771651.492:276): avc:  denied  { read } for  comm="dump_storage" name="phy_release_date" dev="sysfs" ino=109126 scontext=u:r:dump_storage:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

Bug: 392193452
Flag: EXEMPT bugfix
Change-Id: I8e174e378064a94681f74a88ee13b4461527076a
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2025-01-24 20:28:24 -08:00
Jaegeuk Kim
6151bff500 Fix UFS err_stats
Bug: 392193452
Change-Id: I159f5bcfb8de1b33f46ba860b4436d1dfc6907f2
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2025-01-24 20:21:06 -08:00
Treehugger Robot
861f6bcf77 Merge "Revert "Set up access control rule for aocxd"" into main 2025-01-24 02:32:27 -08:00
Jaegeuk Kim
f329ce7a91 Fix selinux permission denials
[    9.280675] type=1400 audit(1737659534.344:11): avc:  denied  { mounton } for  comm="init" path="/data/vendor/intelligence" dev="dm-59" ino=490 scontext=u:r:init:s0 tcontext=u:object_r:intelligence_data_file:s0 tclass=dir permissive=0

Bug: 391452461
Flag: EXEMPT bugfix
Change-Id: I355c61bd2c5bb5af6d463cf84a3fc80093b16550
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2025-01-23 17:15:16 -08:00
Piotr Klasa
924237f464 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: If340ce8e8d3f3493045077470f8aa5560f9b313e
2025-01-23 03:35:46 -08:00
Zheng Pan
728e059b69 Revert "Set up access control rule for aocxd"
Revert submission 31133794-aocx_sepolicy

Reason for revert: http://b/391697603 build break

Reverted changes: /q/submissionid:31133794-aocx_sepolicy

Change-Id: I602d3ba880931a045146f216075f7baca513f0f3
2025-01-22 14:59:23 -08:00
Treehugger Robot
55c62e18d3 Merge "16KB: Move CopyEfsTest to device/google/gs-common" into main 2025-01-22 11:34:44 -08:00
Vilas Bhat
a61947b1c5 16KB: Move CopyEfsTest to device/google/gs-common
Additional changes
1. Android.bp lint/formatting error was resolved.
2. The regex pattern on line 78 in CopyEfsTest.java:
"line.split("(?<![\\\\])\s+")" was updated to
"line.split("(?<![\\\\])\\s+")" to resolve a presubmit error as \s is a
special character in Java.
(see https://errorprone.info/bugpattern/MisleadingEscapedSpace)

Bug: 390502355
Test: atest CopyEfsTest for Pixel 8 & 9 targets
Flag: EXEMPT bugfix
Change-Id: Iebcda9859666ff595b50b8105b7e841591ba3c67
2025-01-22 18:00:37 +00:00
Martin Yan
8d6007f19c Merge "Revert^2 "Add Bluetooth extension HAL - CCO"" into main 2025-01-21 05:30:12 -08:00
Jerry Pai
894727003b Revert^2 "Add Bluetooth extension HAL - CCO"
This reverts commit 3e78c36e5f.

Reason for revert: build break
ERROR: files are incompatible: The following instances are in the device manifest but not specified in framework compatibility matrix: 
    vendor.google.bluetooth_ext.IBluetoothCco/default (@1)

Bug: 361443653
Change-Id: I59f325ad1d8af5fca54cc9bb8a6208c5c8c20939
2025-01-21 01:57:41 -08:00
Piotr Klasa
79b5c54ba8 Merge "Revert "move common init perf settings to gs_common"" into main 2025-01-21 01:27:07 -08:00
Enzo Liao
763de77705 Merge "RamdumpService: Fix the SELinux errors from introducing Firebase Analytics." into main 2025-01-21 00:34:02 -08:00
Martin Yan
d95ffea63b Merge "Revert "Add Bluetooth extension HAL - CCO"" into main 2025-01-20 22:36:41 -08:00
Treehugger Robot
6a42934470 Merge "gs-common: wlc: add tx update permission for hal_googlebattery" into main 2025-01-20 22:28:33 -08:00
Yi-Yo Chiang
2e8de0999f insmod-sh: Allow writing to kmsg am: 51357e0322 am: cbb2324f5d
Original change: https://android-review.googlesource.com/c/device/google/gs-common/+/3444122

Change-Id: Ib9cf4f6ab7267143ff445eaf30f798e55c584cdb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-01-20 21:43:41 -08:00
Yi-Yo Chiang
cbb2324f5d insmod-sh: Allow writing to kmsg am: 51357e0322
Original change: https://android-review.googlesource.com/c/device/google/gs-common/+/3444122

Change-Id: Ifb648b6ba43d4bc57a8846f3ebb1aaf878787bd7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-01-20 21:19:12 -08:00
YiKai Peng
9b6b7e35b9 gs-common: wlc: add tx update permission for hal_googlebattery
Bug: 391056983
Test: trigger tx fwupdate
Flag: vendor.google.wireless_charger.service.flags.enable_service
Change-Id: I66e5fe88d43b8e33e3548d642f7ba89d63c96051
Signed-off-by: YiKai Peng <kenpeng@google.com>
2025-01-20 21:13:46 -08:00
Martin Yan
3e78c36e5f Revert "Add Bluetooth extension HAL - CCO"
This reverts commit b25c089c59.

Reason for revert: For now, adding Cco results in VTS failed, need to modify the version as well. We'll modify both this CL and aidl version in xml after we enable Cco.

Bug: 361443653
Change-Id: Ib4f84c749f626d3274eba4ad63ecca366715d128
2025-01-20 19:15:40 -08:00
Randall Huang
6cda4c1c19 storage: fix userdata_exp.ai partition selinux error
avc:  denied  { write } for  comm="init" name="sda34" dev="tmpfs" ino=1296 scontext=u:r:init:s0 tcontext=u:object_r:userdata_exp_block_device:s0 tclass=blk_file permissive=1

Bug: 361093433
Test: boot without issue
Change-Id: I0c74eb19172f39c44fc2ca61ba0bb8e38c808556
Signed-off-by: Randall Huang <huangrandall@google.com>
2025-01-21 08:58:19 +08:00
Piotr Klasa
d88ced0ff8 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: I9b11900fd61e7f7abae52597aef41f5ab3c8ebd0
2025-01-20 07:00:49 -08:00
Kai Hsieh
5468ea3a18 Merge "Add SEPolicy allowing GIA to communicate with Suez service" into main 2025-01-20 02:32:35 -08:00
Yi-Yo Chiang
51357e0322 insmod-sh: Allow writing to kmsg
modprobe would log errors to /dev/kmsg, need to explicit allow this.

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

Bug: 388717752
Test: DeviceBootTest#SELinuxUncheckedDenialBootTest
Change-Id: I49a3e6a9f76f20151034cb00f772247b0e9c668e
2025-01-20 01:34:42 -08:00
Enzo Liao
dc83bcf6a5 RamdumpService: Fix the SELinux errors from introducing Firebase Analytics.
Fix the SELinux errors from introducing Firebase Analytics (ag/30936923):
01-16 10:44:12.432 W/ScionFrontendAp( 4336): type=1400 audit(0.0:17): avc:  denied  { read } for name="PrebuiltGmsCoreNext_DynamiteLoader.apk" dev="dm-59" ino=7119 scontext=u:r:ramdump_app:s0:c18,c257,c512,c768 tcontext=u:object_r:privapp_data_file:s0:c512,c768 tclass=lnk_file permissive=0 bug=b/385858590 app=com.android.ramdump
01-20 15:41:03.180 10754-10754 W/ScionFrontendAp: type=1400 audit(0.0:342): avc:  denied  { execute } for  path="/data/user_de/10/com.google.android.gms/app_chimera/m/00000067/oat/arm64/PrebuiltGmsCoreNext_DynamiteLoader.odex" dev="dm-54" ino=80602 scontext=u:r:ramdump_app:s0:c13,c257,c522,c768 tcontext=u:object_r:privapp_data_file:s0:c522,c768 tclass=file permissive=0

Bug: 386149375
Flag: EXEMPT bugfix
Change-Id: Ia10a5585ebc8f4e895d4dc6ecf0d8cd4dc727ac8
2025-01-20 17:03:50 +08:00
Bowen Lai
f23d87650d Merge "Set up access control rule for aocxd" into main 2025-01-19 19:15:30 -08:00
Hyungwoo Yang
3d542c3f96 Fix version mismatch in vintf manifest file
vintf manifest version doesn't match with acutal implementation.

Bug: 390520103
Test: atest vts_treble_vintf_vendor_test
Flag: EXEMPT vintf manifest version change

Change-Id: I25f77dcb6e2a344e44560ee9bcd408d650d7ae27
Signed-off-by: Hyungwoo Yang <hyungwooyang@google.com>
2025-01-19 22:21:10 +00:00
Vilas Bhat
fe6e700db0 Merge "Revert "Revert "16KB: Move copy_efs_file_to_data script to gs-co..."" into main 2025-01-17 11:04:09 -08:00
Ocean Chen
c8609b7e8b gs-common: add pixelstats-vendor package and sepolicy
This commit adds the `pixelstats-vendor` package to the build
`BOARD_SEPOLICY_DIRS` to include the corresponding sepolicy rules.

Bug: 374323691
Test: forrest build
Flag: EXEMPT refactor
Change-Id: If85375f9ad3a1cb7f6301f9ad4c94f14ac8dc54e
2025-01-16 23:32:01 -08:00
YiKai Peng
59befd3c7f Merge "gs-common: wlc: update compatibility matrix" into main 2025-01-16 17:51:31 -08:00
Vilas Bhat
0ec2cdae26 Revert "Revert "16KB: Move copy_efs_file_to_data script to gs-co..."
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: I6ae4d5f26325e0cf732792483e056132226633e2
2025-01-16 17:09:09 -08:00
Priyanka Advani (xWF)
58410cd87d Merge "Revert "16KB: Move copy_efs_file_to_data script to gs-common"" into main 2025-01-16 16:59:51 -08:00
Priyanka Advani (xWF)
0594fa2887 Revert "16KB: 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: Iba1b7ffca817e2750481f44c86a38b083b795353
2025-01-16 16:50:41 -08:00
Vilas Bhat
dcadf3aed6 Merge "16KB: Move copy_efs_file_to_data script to gs-common" into main 2025-01-16 16:30:54 -08:00
Vilas Bhat
23425fbc54 16KB: Move copy_efs_file_to_data script to gs-common
There are 4 partitions that are flashed at the factory and use F2FS
fs with 4KB block size:

- /dev/block/by-name/efs
- /dev/block/by-name/efs_backup
- /dev/block/by-name/modem_userdata
- /dev/block/by-name/persist

These partitions can NOT be mounted by 16KB kernels because F2FS
expects BLOCK_SIZE == PAGE_SIZE.

In order for the files in these partitions to be accessible to 16KB
kernels, the dump.f2fs tool is used.

This change will perform these steps at boot time ONLY for 16KB mode.
For every partition (efs/efs_backup/modem_userdata/persist):

1. Use dump.f2fs to copy the content of the partition
   to /data/vendor/copied/<partition name>.img.
2. If the copy was succesfull, rename /data/vendor/copied/<partition
   name>.img to /data/vendor/copied/<partition name>
3. fsync the content of the directory /data/vendor/copied/<partition
   name>.

After the content of the partitions is in /data/vendor/copied,
bind-mount the partitions to the directory /mnt/vendor. See
conf/fstab.efs.from_data.

Note: This change ONLY applies to 16KB kernels. This change does not
modify the original partitions.

Test: Boot test and Enable16kbTest for Pixel 8 & Pixel 9 targets
      Fingerprint and Phone Calls work in 16KB mode
Bug: 383151792
Flag: EXEMPT bugfix
Change-Id: Ib67fd8678f8bd97bd50663657046c28137bd4435
2025-01-16 13:45:48 -08:00
YiKai Peng
ed91971d1a gs-common: wlc: update compatibility matrix
Bug: 375156879
Test: Manual
Flag: EXEMPT HAL interface change
Change-Id: I446505624af157d7e723b7ba0203d51b5529b8d1
Signed-off-by: YiKai Peng <kenpeng@google.com>
2025-01-16 03:07:38 -08:00
Piotr Klasa
cf818e3bc5 Merge "move common init perf settings to gs_common" into main 2025-01-16 01:38:35 -08:00
Bowen Lai
cb1a8297c3 Set up access control rule for aocxd
avc:
12-25 14:34:43.292  root  7005  7005 W binder:7005_1: type=1400 audit(0.0:23): avc:  denied  { call } for  scontext=u:r:aocxd:s0 tcontext=u:r:aocxdallowdomain:s0:c512,c768 tclass=binder permissive=0
11-27 14:56:33.645  1000   422   422 E SELinux : avc:  denied  { find } for pid=7360 uid=10267 name=aocx.IAocx/default scontext=u:r:aocxdallowdomain:s0:c512,c768 tcontext=u:object_r:aocx:s0 tclass=service_manager permissive=0

Test: make -j64
Bug: 385663354
Flag: EXEMPT bugfix
Change-Id: I7888e89710cfb671fb26180f8b2bc3152e1ced89
2025-01-15 23:39:08 -08:00
Kai Hsieh
b7aa4a2742 Add SEPolicy allowing GIA to communicate with Suez service
Attached AVC error log in commit message:
```
[   68.276362] SELinux: avc:  denied  { find } for pid=6775 uid=0 name=android.frameworks.stats.IStats/default scontext=u:r:gia:s0 tcontext=u:object_r:fwk_stats_service:s0 tclass=service_manager permissive=1
[   68.280115] type=1400 audit(1736239951.684:21): avc:  denied  { call } for  comm="binder:6775_3" scontext=u:r:gia:s0 tcontext=u:r:system_server:s0 tclass=binder permissive=1
```

Flag: build.RELEASE_PIXEL_GIA_ENABLED
Test: Manualy, check `dmesg` to make sure that the cooresponding service can be started normally.
Bug: 369965212
Change-Id: I26d4b324f1359b1b895ea8d3fd51c0877098c5ea
Signed-off-by: Kai Hsieh <kaihsieh@google.com>
2025-01-16 10:47:24 +08:00
Piotr Klasa
3e2cacbc1e 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: Ic544aa854962b0d975316113abbe798e34288155
2025-01-14 14:12:13 +00:00
Treehugger Robot
244e746f73 Merge "gs-common: nfc: Add rules for vendor_init" into main 2025-01-14 02:56:09 -08:00
Kai Hsieh
e350d201d3 Merge "Include GIA only on needed, expose GIA permission only if the target service exists" into main 2025-01-13 23:09:38 -08:00
Kai Hsieh
fed627115e Include GIA only on needed, expose GIA permission only if the target service exists
Flag: EXEMPT, bugfix only.
Bug: 388685884
Test: Factory, AOSP and Pixel build success.
Test: Pixel System Service can access GIA features on Pixel device builds.
Test: GIA exists on factory builds.
Change-Id: I12f55f1ce1c717da6d6c45edbb92854f7efa53e5
Signed-off-by: Kai Hsieh <kaihsieh@google.com>
2025-01-13 20:01:49 -08:00
George Chang
30664a1604 gs-common: nfc: Add rules for vendor_init
avc:  denied  { set } for property=persist.vendor.nfc.streset pid=340 uid=0 gid=0 scontext=u:r:vendor_init:s0 tcontext=u:object_r:vendor_nfc_prop:s0 tclass=property_service permissive=1

Bug: 388949600
Bug: 381405365
Flag: EXEMPT update sepolicy
Test: SELinuxUncheckedDenialBootTest
Change-Id: If34f3ea1229ed8025c56ce6a8cf315218ae5a86f
2025-01-13 04:57:54 -08:00
Naresh Kumar Podishetty (xWF)
5997295f8b Merge "Revert "modem: Add kernel metrics log to bugreport"" into main 2025-01-10 00:23:44 -08:00
Naresh Kumar Podishetty (xWF)
677274ccf1 Revert "modem: Add kernel metrics log to bugreport"
This reverts commit 92ce682a8e.

Reason for revert: <Reason for revert: Dorid monitor: Likely culprit for b/388963512  - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.>

Change-Id: I5db1d095aa0960c7445f390b68d7dbe293ecc4b3
2025-01-09 22:12:35 -08:00
Eileen Lai
d3da929dc3 Merge "modem: Add kernel metrics log to bugreport" into main 2025-01-09 20:22:21 -08:00
Eileen Lai
92ce682a8e modem: Add kernel metrics log to bugreport
Test: adb bugreport
Bug: 368510043
Flag: EXEMPT use property flag: persist.vendor.modem.qms.kernel_metrics_collection
Change-Id: I874157f12308194f38f67755abbcf2ba7efe3c7a
2025-01-10 02:49:50 +00:00
Hyungwoo Yang
6b14c86389 Merge "Add sepolicy for Twoshay Notification Service" into main 2025-01-09 10:34:09 -08:00
Treehugger Robot
854d1bb51c Merge "Remove -pedantic" into main 2025-01-08 16:34:23 -08:00
Treehugger Robot
dc14dee43f Merge "thermal: update sepolicy for thermal powercap framework" into main 2025-01-08 14:34:48 -08:00
Aditya Kumar
9ca0a241e2 Remove -pedantic
Bug: b/383382218
Test: m
Flag: TEST_ONLY

Change-Id: I612a5104379d56e4d9d6322cb2645aa8f8100cc6
2025-01-08 14:31:30 -08:00
Brian Norris
83637f6db5 Merge "insmod.sh: Fix 'setprop' syntax" into main 2025-01-08 14:04:49 -08:00
Treehugger Robot
a5d9d5630b Merge "gs-common: nfc: Add rules for hal_nfc_service" into main 2025-01-08 12:45:08 -08:00
Brian Norris
17719c9da4 insmod.sh: Fix 'setprop' syntax
These all require a value.

Bug: 360934165
Test: run `/vendor/bin/insmod.sh` with a missing cfg file
Flag: EXEMPT bugfix
Change-Id: If6b3b95f1eb4fcc21ca9d3f47c174af80ee98187
2025-01-08 10:14:32 -08:00
Treehugger Robot
dda10db0c0 Merge "dump_gps: fix dump fail if gps folder existed" into main 2025-01-08 00:14:16 -08:00
George Chang
dfe9a2d4b5 gs-common: nfc: Add rules for hal_nfc_service
avc:  denied  { set } for property=persist.vendor.nfc.antenna.am_value pid=13816 uid=1027 gid=1027 scontext=u:r:hal_nfc_default:s0 tcontext=u:object_r:vendor_default_prop:s0 tclass=property_service permissive=0
avc:  denied  { set } for property=persist.vendor.nfc.antenna.i_value pid=13816 uid=1027 gid=1027 scontext=u:r:hal_nfc_default:s0 tcontext=u:object_r:vendor_default_prop:s0 tclass=property_service permissive=0
avc:  denied  { set } for property=persist.vendor.nfc.antenna.se1_value pid=13816 uid=1027 gid=1027 scontext=u:r:hal_nfc_default:s0 tcontext=u:object_r:vendor_default_prop:s0 tclass=property_service permissive=0
avc:  denied  { set } for property=persist.vendor.nfc.antenna.se2_value pid=13816 uid=1027 gid=1027 scontext=u:r:hal_nfc_default:s0 tcontext=u:object_r:vendor_default_prop:s0 tclass=property_service permissive=0
avc:  denied  { set } for property=persist.vendor.se.reset pid=14792 uid=1027 gid=1027 scontext=u:r:hal_nfc_default:s0 tcontext=u:object_r:vendor_secure_element_prop:s0 tclass=property_service permissive=0
avc:  denied  { read } for  name="u:object_r:vendor_nfc_antenna_prop:s0" dev="tmpfs" ino=414 scontext=u:r:untrusted_app:s0:c79,c257,c512,c768 tcontext=u:object_r:vendor_nfc_antenna_prop:s0 tclass=file permissive=0 app=com.google.android.apps.internal.nfcassistancetool

Bug: 381405365
Flag: EXEMPT update sepolicy
Test: manual
Change-Id: Ib02cebc625965928286dba7be278f6998ecdabe4
2025-01-08 07:33:39 +00:00
Hyungwoo Yang
f720f9e87e Add sepolicy for Twoshay Notification Service
Test: The notification service is successfully running.
Flag: com.google.android.input.twoshay.flags.enable_notification_service
Bug: 385001604

Change-Id: I8bb8a894ecc88d588e867022a0c61d8d8a5560ca
Signed-off-by: Hyungwoo Yang <hyungwooyang@google.com>
2025-01-08 07:16:16 +00:00
Edwin Tung
8e3e5d6db1 dump_gps: fix dump fail if gps folder existed
Flag: EXEMPT logs collection.
Bug: 387195808
Test: check gps files in dumpstate
Change-Id: I972645e70827de0aad949d607809d655351c121a
2025-01-08 13:58:18 +08:00
Jaegeuk Kim
787e3b81dd Mount rw to get restorecon_recursive working
Bug: 378120929
Test: Boot and check selabel in /data/vendor/intelligence
Flag: EXEMPT bugfix
Change-Id: I0d3d391629248f7014c28b5f74bb95b50626c99d
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2025-01-07 16:42:24 -08:00
Richard Chang
cc790dd80c Merge "dumpstate: add readtracefs group permission for vendor dumpstate service" into main 2025-01-06 22:10:06 -08:00
Android Build Coastguard Worker
87077ce11a Snap for 12872597 from 7bc11b8bba to mainline-tzdata6-release
Change-Id: I15371109b930e9427a27967d1d0699dc52183ff8
2025-01-06 04:35:10 -08:00
Richard Chang
0c57ab86da dumpstate: add readtracefs group permission for vendor dumpstate service
Fix the permission problem when bugreport wants to read pixel trace
node /sys/kernel/tracing/instances/pixel/trace.

Bug: 387943504
Test: adb bugreport
Test: adb shell dumpsys android.hardware.dumpstate.IDumpstateDevice/default dump_memory
Test: system-ui trigger bugreport
Flag: EXEMPT bugfix
Change-Id: I2e666e8a1e40bce83b1f8c1b447e2d64e8912098
2025-01-06 03:27:35 -08:00
Martin Yan
7bc11b8bba Merge "Add Bluetooth extension HAL - CCO" into main 2025-01-06 01:07:53 -08:00
Martin Yan
b25c089c59 Add Bluetooth extension HAL - CCO
Bug: 361443653
Test: build pass
Flag: EXEMPT, this feature is related to CS which is controlled
      by com.android.bluetooth.flags.channel_sounding_in_stack
Change-Id: I92d27664c05ed1c2ec043b9b2efa186ff5405170
2025-01-06 09:04:46 +00:00
Treehugger Robot
9b0da94086 Merge "Add feature recording critical timestamps to track to predump latency." into main 2025-01-05 23:58:06 -08:00
Midas Chien
f2ebdb354d Merge "allow power hal to access display files" into main 2025-01-05 23:12:53 -08:00
Kai Hsieh
a736c0013e Add feature recording critical timestamps to track to predump latency.
Test: Manually, flash and trigger predump and check the timestamp recorded under: /data/vendor/dump_touch/ folder
Bug: 387909187
Flag: EXEMPT log only update
Change-Id: Ib926efecb27e6df02927eba0353a1c18cb04d27d
Signed-off-by: Kai Hsieh <kaihsieh@google.com>
2025-01-05 22:54:40 -08:00
Midas Chien
6a918f2bd3 allow power hal to access display files
avc:  denied  { write } for  name="early_wakeup" dev="sysfs" ino=110609 scontext=u:r:hal_power_default:s0 tcontext=u:object_r:sysfs_display:s0 tclass=file permissive=1
avc:  denied  { open } for path="/sys/devices/platform/sswrp_dpu@ec00000/ee00000.dc9x00/early_wakeup" dev="sysfs" ino=110609 scontext=u:r:hal_power_default:s0 tcontext=u:object_r:sysfs_display:s0
 class=file permissive=1

Bug: 350981178
Test: PowerHAL can access early_wakeup node in enforcing mode
Flag: EXEMPT bugfix
Change-Id: Ic9d619e971059d9b496a9e5c146089a01f6a0431
2025-01-05 20:22:27 -08:00
Eileen Lai
8ada857980 Merge "kernel metrics: add selinux policy for kernel metrics feature" into main 2025-01-05 19:41:56 -08:00
TeYuan Wang
d6d0daa2fa thermal: update sepolicy for thermal powercap framework
Bug: 381132895
Test: check no selinux denied log
Flag: EXEMPT sepolicy change
Change-Id: Id6578c3f3eefdc6dc09fe0d7b469da7c8877d9d2
2025-01-03 23:10:25 -08:00
Cheng Chang
72d5eb8a6e Merge "dump_gps: Support thinmd logs collect" into main 2025-01-03 01:02:14 -08:00
Leonardo Blanger
2d245f83c6 Merge "twoshay: Add AIDL api v4 to compat. matrices and manifest files" into main 2025-01-02 22:36:47 -08:00
Cheng Chang
fe1d00ff58 dump_gps: Support thinmd logs collect
Flag: EXEMPT logs collection.
Bug: 386286230
Test: b/386286230#comment3 bugreport example.
Change-Id: I93d385cd1a03aa55f63520626072d1bf7ccedb86
2025-01-03 04:54:53 +00:00
Eileen Lai
6e56542845 Merge "kernel metrics: add selinux policy about modem_boot_duration for kernel metrics feature" into main 2025-01-02 17:48:40 -08:00
Eileen Lai
ca670f1106 kernel metrics: add selinux policy for kernel metrics feature
Add selinux policy for modem_wakeup_ap, pcie_link_state, pcie_link_duration, pcie_link_stats, pcie_link_updown

Bug: 368510043

01-03 00:28:02.216   952   952 I binder:952_2: type=1400 audit(0.0:1550): avc:  denied  { read } for  name="modem_wakeup_ap" dev="sysfs" ino=146476 scontext=u:r:shared_modem_platform:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 bug=b/369735902
01-03 00:28:02.216   952   952 I binder:952_2: type=1400 audit(0.0:1551): avc:  denied  { open } for  path="/sys/kernel/pixel_metrics/modem/modem_wakeup_ap" dev="sysfs" ino=146476 scontext=u:r:shared_modem_platform:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 bug=b/369735902
01-03 00:28:02.216   952   952 I binder:952_2: type=1400 audit(0.0:1552): avc:  denied  { getattr } for  path="/sys/kernel/pixel_metrics/modem/modem_wakeup_ap" dev="sysfs" ino=146476 scontext=u:r:shared_modem_platform:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 bug=b/369735902

01-03 00:36:43.740   988   988 I binder:988_2: type=1400 audit(0.0:970): avc:  denied  { read } for  name="pcie_link_state" dev="sysfs" ino=153493 scontext=u:r:shared_modem_platform:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 bug=b/369735902
01-03 00:36:43.740   988   988 I binder:988_2: type=1400 audit(0.0:971): avc:  denied  { open } for  path="/sys/kernel/pixel_metrics/modem/pcie_link_state" dev="sysfs" ino=153493 scontext=u:r:shared_modem_platform:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 bug=b/369735902
01-03 00:36:43.740   988   988 I binder:988_2: type=1400 audit(0.0:972): avc:  denied  { getattr } for  path="/sys/kernel/pixel_metrics/modem/pcie_link_state" dev="sysfs" ino=153493 scontext=u:r:shared_modem_platform:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 bug=b/369735902

01-03 00:44:06.248  1001  1001 I binder:1001_2: type=1400 audit(0.0:1045): avc:  denied  { read } for  name="pcie_link_duration" dev="sysfs" ino=153542 scontext=u:r:shared_modem_platform:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 bug=b/369735902
01-03 00:44:06.248  1001  1001 I binder:1001_2: type=1400 audit(0.0:1046): avc:  denied  { open } for  path="/sys/kernel/pixel_metrics/modem/pcie_link_duration" dev="sysfs" ino=153542 scontext=u:r:shared_modem_platform:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 bug=b/369735902
01-03 00:44:06.248  1001  1001 I binder:1001_2: type=1400 audit(0.0:1047): avc:  denied  { getattr } for  path="/sys/kernel/pixel_metrics/modem/pcie_link_duration" dev="sysfs" ino=153542 scontext=u:r:shared_modem_platform:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 bug=b/369735902

01-03 00:49:48.640   966   966 I binder:966_2: type=1400 audit(0.0:1124): avc:  denied  { read } for  name="pcie_link_stats" dev="sysfs" ino=153354 scontext=u:r:shared_modem_platform:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 bug=b/369735902
01-03 00:49:48.640   966   966 I binder:966_2: type=1400 audit(0.0:1125): avc:  denied  { open } for  path="/sys/kernel/pixel_metrics/modem/pcie_link_stats" dev="sysfs" ino=153354 scontext=u:r:shared_modem_platform:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 bug=b/369735902
01-03 00:49:48.640   966   966 I binder:966_2: type=1400 audit(0.0:1126): avc:  denied  { getattr } for  path="/sys/kernel/pixel_metrics/modem/pcie_link_stats" dev="sysfs" ino=153354 scontext=u:r:shared_modem_platform:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 bug=b/369735902

01-03 00:58:31.152   945   945 I binder:945_2: type=1400 audit(0.0:973): avc:  denied  { read } for  name="pcie_link_updown" dev="sysfs" ino=153308 scontext=u:r:shared_modem_platform:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 bug=b/369735902
01-03 00:58:31.152   945   945 I binder:945_2: type=1400 audit(0.0:974): avc:  denied  { open } for  path="/sys/kernel/pixel_metrics/modem/pcie_link_updown" dev="sysfs" ino=153308 scontext=u:r:shared_modem_platform:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 bug=b/369735902
01-03 00:58:31.152   945   945 I binder:945_2: type=1400 audit(0.0:975): avc:  denied  { getattr } for  path="/sys/kernel/pixel_metrics/modem/pcie_link_updown" dev="sysfs" ino=153308 scontext=u:r:shared_modem_platform:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 bug=b/369735902

Flag: EXEMPT update sepolicy
Change-Id: I86908fccb65944a8bbc779b5bae38d08c1776c45
2025-01-02 18:09:35 +00:00
Treehugger Robot
e57feb6c21 Merge "Revert "Set up access control rule for aocxd"" into main 2024-12-30 17:42:21 -08:00
Leonardo Blanger
57c69f455f twoshay: Add AIDL api v4 to compat. matrices and manifest files
Bug: 384567963

Test: atest vts_treble_vintf_vendor_test

Flag: EXEMPT AIDL API version change

Change-Id: I01e1487a324c5d930364ff20fb5120a92db62afc
Signed-off-by: Leonardo Blanger <leoblanger@google.com>
2024-12-30 15:23:38 +08:00
Wilson Sung
132d2f2515 Revert "Set up access control rule for aocxd"
This reverts commit f3564e9b91.

Reason for revert: BB

Change-Id: If529dbe90cdae4cd9266af85de63bb8a4f808977
Fix: 386696682
2024-12-29 19:41:00 -08:00
Hung-Yeh Lee
06d1a53ceb Merge changes from topic "b376426334-dump-display" into main
* changes:
  display-dump: sepolicy for new secondary display dump
  display-dump: sepolicy for legacy secondary display dump
  display-dump: sepolicy for new primary display dump
  display-dump: sepolicy for legacy primary display dump
  display-dump: update project-specific crtc sysfs node
2024-12-29 18:31:49 -08:00
Bowen Lai
09f71b4f37 Merge "Set up access control rule for aocxd" into main 2024-12-26 22:39:47 -08:00
Hung-Yeh Lee
0dcf585cd6 display-dump: sepolicy for new secondary display dump
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: I5186dfa9de755caa5023d159cb3cc1601268aa6a
2024-12-26 22:16:12 -08:00
Hung-Yeh Lee
c980a0a5c1 display-dump: sepolicy for legacy secondary display dump
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: I903eb0d954f18b1501787d1292497696f1886437
2024-12-26 22:15:51 -08:00
Hung-Yeh Lee
19268ffb20 display-dump: sepolicy for new primary display dump
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: I3b1d1f46ddea4882f028d9314cfd174371039925
2024-12-26 22:14:20 -08:00
Hung-Yeh Lee
33f5985af3 display-dump: sepolicy for legacy primary display dump
Create sub-directory for project-specific sepolicy files, and move
legacy sepolicy files to sub-directory.

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: I7de8667b666d7f47c05b147a1f9e7da62ba35e1c
2024-12-26 22:13:48 -08:00
Bowen Lai
f3564e9b91 Set up access control rule for aocxd
Test: make -j64
Bug: 385663354
Flag: EXEMPT bugfix
Change-Id: I1b6584a0643085e9d69c85b27a0ba3667aacf1cf
2024-12-26 04:23:08 +00:00
Jooyung Han
72bec82019 Merge "Move lyric sysconfig to vendor" into main 2024-12-25 17:24:55 -08:00
Treehugger Robot
338f8db4dc Merge "Rename sysfs_gpu_uevent to sysfs_gpu" into main 2024-12-25 02:11:21 -08:00
Wilson Sung
e3c536e772 Rename sysfs_gpu_uevent to sysfs_gpu
Fix: 385248542
Fix: 385248720
Fix: 385248893
Fix: 385248956
Fix: 385808247
Fix: 385978257
Test: make selinux_policy
Flag: EXEMPT bugfix
Change-Id: I8395401e50905bdcabd4858442238570edb916e9
2024-12-25 00:20:24 -08:00
Todd Poynor
cfa4033ecc Merge "Revert "sepolicy: edgetpu: add debugfs contexts"" into main 2024-12-24 05:46:01 -08:00
Pechetty Sravani (xWF)
19b79e1312 Revert "sepolicy: edgetpu: add debugfs contexts"
This reverts commit 4b68ad6e8d.

Reason for revert: <Droidmonitor created revert due to b/385827654.Will be verified through ABTD for standard investigation.>

Change-Id: I0fbdcd276c9e20010b3bfbbcad5203bf276859a4
2024-12-24 01:42:39 -08:00
Robin Peng
c7b8062120 Merge "check_current_prebuilt: Move symlink file into out/pixel" into main 2024-12-23 19:59:52 -08:00
Treehugger Robot
896ea46985 Merge "sepolicy: edgetpu: add debugfs contexts" into main 2024-12-23 19:56:58 -08:00
Jooyung Han
31e885a477 Move lyric sysconfig to vendor
This sysconfig is about the apex (com.google.pixel.camera.hal). So it
should be installed with the apex, not in /product.

Bug: 375357389
Test: SysConfigTest#testVendorApexAllowlist
Change-Id: I551870fcff576527d3fdfff3d17a5e7b0ce198a9
2024-12-24 10:38:36 +09:00
Liz Prucka
327eb5b7eb Merge "Add Mali SELinux build flag for Pixel" into main 2024-12-23 09:09:23 -08:00
Robin Peng
6940a61c92 check_current_prebuilt: Move symlink file into out/pixel
From Android Build System, it's improper to update the source tree during
'lunch'. Move symlink files into out/pixel folder

Bug: 364831620
Flag: EXEMPT export current prebuilt path
Change-Id: I5024788e169abb8f117a289c6a07e7c47527fe60
Signed-off-by: Robin Peng <robinpeng@google.com>
2024-12-20 23:08:43 -08:00
Kai Hsieh
b24840ba97 Merge "Solve SEPolicy issue with the Troubleshooting Wizard" into main 2024-12-20 22:34:57 -08:00
Kai Hsieh
13dcd24c48 Solve SEPolicy issue with the Troubleshooting Wizard
- Allow pixelsystemservice_app to access GIA
- Allow GIA to execute a callback for pixelsystemservice_app

[avc error]
12-09 20:39:51.287   416   416 E SELinux : avc:  denied  { find } for pid=5454 uid=10285 name=com.google.input.gia.core.IGiaService/default scontext=u:r:pixelsystemservice_app:s0:c29,c257,c512,c768 tcontext=u:object_r:hal_gia_service:s0 tclass=service_manager permissive=1
12-09 20:39:51.280  5454  5454 I pool-4-thread-1: type=1400 audit(0.0:19): avc:  denied  { call } for  scontext=u:r:pixelsystemservice_app:s0:c29,c257,c512,c768 tcontext=u:r:gia:s0 tclass=binder permissive=1 app=com.google.android.pixelsystemservice
12-09 20:39:51.280  5454  5454 I pool-4-thread-1: type=1400 audit(0.0:20): avc:  denied  { transfer } for  scontext=u:r:pixelsystemservice_app:s0:c29,c257,c512,c768 tcontext=u:r:gia:s0 tclass=binder permissive=1 app=com.google.android.pixelsystemservice
12-09 20:39:51.280  1341  1341 I binder:1341_3: type=1400 audit(0.0:21): avc:  denied  { call } for  scontext=u:r:gia:s0 tcontext=u:r:pixelsystemservice_app:s0:c29,c257,c512,c768 tclass=binder permissive=1

Flag: EXEMPT, bug-fix only.
Bug: 379991501
Change-Id: I14942cc0df9b9032b2c054fc87d29fc8098aa455
Signed-off-by: Kai Hsieh <kaihsieh@google.com>
2024-12-19 23:39:24 -08:00
Todd Poynor
4b68ad6e8d sepolicy: edgetpu: add debugfs contexts
Add vendor_edgetpu_debugfs contexts for dumpstate dump_tpu.sh access.

Bug: 349699101
Test: adb bugreport, check dumpstate_board.txt
Flag: NONE dumpstate support bundled with device
Change-Id: I42b7eb2391c42323c7da0b544402e9a08b9d56f3
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2024-12-20 01:27:48 +00:00
Chintan Pandya
c5c4f1ef81 Disable redundant trace event for performance reasons
It's been found that every GIA trace events takes about
0.7 us. GIA driver throws 5 trace events for every IRQ
via GIA. Reducing some events would make IRQ handler
flow a but more optimized.

Bug: 380463996
Test: observed the trace and the disabled trace entries
      are not longer present, reducing pressure on runtime
      performance as well as memory pressure on trace buffer.
Flag: EXEMPT, optimize interrupt tracing.

Change-Id: I233d82da7a6eb75344afe3798c9f850a74e5e16b
Signed-off-by: Chintan Pandya <chintanpandya@google.com>
2024-12-19 22:59:37 +00:00
Chintan Pandya
60a9a7b17b Optimize interrupts trace buffer size
Reduce the trace buffer size further

Bug: 383121598
Test: Manually observed the optimized trace settings
Flag: EXEMPT, optimize interrupt tracing.
Change-Id: Id6e02df4d73a97b99a019b210dbd508b115462fc
Signed-off-by: Chintan Pandya <chintanpandya@google.com>
2024-12-19 22:59:37 +00:00
Chintan Pandya
a67610e46e Update irq_gia_google permission
Current permission 666 blocks bugreport use-case be able to
copy interrupt traces into bugreport. Provide required
permissions.

Bug: 376124648
Test: Captured bugreport and traces are visible in that.
Flag: EXEMPT, init rc change to modify permission
Change-Id: Ib03ab97fcd65d18e2420421f8fc997eefd55570f
Signed-off-by: Chintan Pandya <chintanpandya@google.com>
2024-12-19 22:59:25 +00:00
Hung-Yeh Lee
bbe22a1056 display-dump: update project-specific crtc sysfs node
Refactor and rename project-specific dump

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: I7bf470e5784e0fd726c49823b55aae6235aceaec
2024-12-18 21:59:42 -08:00
Liz Prucka
bfa32da350 Add Mali SELinux build flag for Pixel
Created initial Pixel SELinux flag module.
Added Mali release flag to build be built by soong.

Bug: 384720119
Test: make
Change-Id: Iffcae7bc64114b80b2750da8823768a15efff9b3
2024-12-17 23:11:31 +00:00
Richard Chang
e67bff18e9 Merge "sepolicy: update init.te for zram device" into main 2024-12-16 17:34:47 -08:00
Minche Li
a12a209a03 Merge "Updates TTS voice packs in gs-common 202412" into main 2024-12-16 02:34:58 -08:00
Richard Chang
cf29787f8d sepolicy: update init.te for zram device
Sync patch from zuma: ag/21578379, but move to gs-common.

Avc denied log:
avc:  denied  { write } for  comm="init" name="zram0" dev="tmpfs" ino=1306 scontext=u:r:init:s0 tcontext=u:object_r:ram_device:s0 tclass=blk_file permissive=1

Verify on PBuilds:
https://android-build.corp.google.com/abtd/run/L32800030008398424/

Bug: 370643878
Test: Boot and check avc denied logs
Flag: EXEMPT sepolicy
Change-Id: I90ea0b248835fa51fe07cfa23e5f819fd8422c08
2024-12-16 01:32:02 -08:00
Eileen Lai
a8634006fb kernel metrics: add selinux policy about modem_boot_duration for kernel metrics feature
Bug: 368510043

12-13 23:10:00.604   993   993 I binder:993_2: type=1400 audit(0.0:327): avc:  denied  { read } for  name="modem_boot_duration" dev="sysfs" ino=72272 scontext=u:r:shared_modem_platform:s0 tcontext=u:object_r:sysfs_kernel_metrics:s0 tclass=file permissive=1
12-13 23:10:00.604   993   993 I binder:993_2: type=1400 audit(0.0:328): avc:  denied  { open } for  path="/sys/kernel/pixel_metrics/modem/modem_boot_duration" dev="sysfs" ino=72272 scontext=u:r:shared_modem_platform:s0 tcontext=u:object_r:sysfs_kernel_metrics:s0 tclass=file permissive=1
12-13 23:10:00.604   993   993 I binder:993_2: type=1400 audit(0.0:329): avc:  denied  { getattr } for  path="/sys/kernel/pixel_metrics/modem/modem_boot_duration" dev="sysfs" ino=72272 scontext=u:r:shared_modem_platform:s0 tcontext=u:object_r:sysfs_kernel_metrics:s0 tclass=file permissive=1

Flag: EXEMPT update sepolicy

Change-Id: Id50146858f84d3716855b9010e95c7232c6accfa
2024-12-16 07:09:01 +00:00
Xiaofan Jiang
da6c722022 Merge "modem_uart: add modem uart log to bugreport" into main 2024-12-14 00:08:31 -08:00
Xin Li
aa687b7c4c [automerger skipped] Merge 24Q4 into AOSP main am: b61a4f4345 -s ours am: 261899fc1b -s ours
am skip reason: Merged-In I96f429ec3284114868ad220ea308a6920930c065 with SHA-1 421324351c is already in history

Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs-common/+/29954999

Change-Id: I461895b52139d919f3bdc7b4475e117e110cb816
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-13 21:45:19 -08:00
Xin Li
261899fc1b [automerger skipped] Merge 24Q4 into AOSP main am: b61a4f4345 -s ours
am skip reason: Merged-In I96f429ec3284114868ad220ea308a6920930c065 with SHA-1 421324351c is already in history

Original change: https://android-review.googlesource.com/c/device/google/gs-common/+/3413779

Change-Id: Ia0e940e4a7404c36f40cfb677226e1fe508951c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-13 18:51:51 -08:00
Xin Li
b61a4f4345 Merge 24Q4 into AOSP main
Bug: 370570306
Merged-In: I96f429ec3284114868ad220ea308a6920930c065
Change-Id: I8967334343407bc9eab73bb0ade0b939e3aa7873
2024-12-13 11:15:09 -08:00
Kieran Cyphus
d2295d66e6 Merge "pms: Create mk file in gs-common" into main 2024-12-13 00:41:27 -08:00
kierancyphus
9a52810bab pms: Create mk file in gs-common
Bug: 382192979

Test: ran abtd test with both git_main and git_main-without-vendor
Flag: EXEMPT Cannot flag mk file changes
Change-Id: Ic7fc13ad191abb1147f35d8d4bd1fd02dc56e772
2024-12-13 10:27:37 +08:00
mincheli
ae9ffbc0b3 Updates TTS voice packs in gs-common 202412
ag/30871748 updates GoogleTTS.
So preloaded TTS voice packs should be also updated.

And see doc, Preload Google Text-to-Speech (TTS) Voice Packs:
The voice packs are dowloanded follow the steps.

Flag: EXEMPT update preloaded files
Bug: 333626474
Test: build passed and manual test
Change-Id: I982df07d49c4be47e819ebe561d5d53212c40b32
2024-12-13 00:27:55 +00:00
Treehugger Robot
5a51adbdd3 Merge "allow power hal to access vendor_mm files" into main 2024-12-12 15:11:48 -08:00
Martin Liu
437d35e7cb allow power hal to access vendor_mm files
I auditd  : type=1400 audit(0.0:79): avc:  denied  { write } for  comm="NodeLooperThrea" name="vendor_mm" dev="sysfs" ino=56518 scontext=u:r:hal_power_default:s0 tcontext=u:object_r:sysfs_vendor_mm:s0 tclass=dir permissive=0

Bug: 357995885
Test: check avc error
Flag: EXEMPT adding avc rule
Change-Id: I1261aa14f2cd912ede51edc2e1a547d2e182ca46
Signed-off-by: Martin Liu <liumartin@google.com>
2024-12-12 13:38:20 +00:00
Xiaofan Jiang
e319e6c3e4 modem_uart: add modem uart log to bugreport
Bug: 353397822

Flag: NONE, config
Change-Id: I9668f70859796ca4475dfa0456a955ac3a7ada5d
2024-12-11 18:40:52 -08:00
Piotr Klasa
78f0d4c8e6 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: Ia6dedcb49534d6be9007addca0d8d1080f219315
2024-12-11 06:35:06 -08:00
Joe Tessler
737725ba27 Support IAudioExtension AIDL v4 and v5
We unfroze the v4 IAudioExtension AIDL API and modified it in
ag/30424231 and incremented the version to v5 in ag/30702418 to fix the
tests. This broke the -next builds, which expected the previously frozen
version (v4).

This change modifies the compatibility matrix to support both v4 and v5.
This fixes both the local tests and -next builds.

Bug: 378303588
Bug: 383213634
Test: atest vts_treble_vintf_vendor_test
Flag: vendor.google.whitechapel.audio.flags.enable_always_available_display
Change-Id: I467434ccb41ab71dc1b230e64dc09fc0959a8b8a
2024-12-10 04:15:21 +00:00
Joe Tessler
7ee457daf9 Merge "Update IAudioExtension AIDL to v5" into main 2024-12-10 02:56:27 +00:00
Dmitry Skiba
ae00670e9c Merge "Reapply "Add amm experiment."" into main 2024-12-09 23:57:53 +00:00
Dmitry Skiba
c0ac52ad63 Reapply "Add amm experiment."
See go/pixel-perf-amm-experiment for more info.

(This change is a reland of ag/30770395 after fixing issues that caused a revert.)

Bug: 365855872
Test: build/flash; set .Perf__amm_experiment=true, observe auto_migration_margins_enable value changing 1->0; set .Perf__amm_experiment="", observe the value changing 0->1
Flag: NONE controlled by Mendel instead
Change-Id: I833ea7cd104b95abf80f2286e91f96a102d8086a
Signed-off-by: Dmitry Skiba <dskiba@google.com>
2024-12-09 18:20:00 +00:00
Joe Tessler
ae42297f0f Update IAudioExtension AIDL to v5
We unfroze the v4 IAudioExtension AIDL API and modified it in
ag/30424231, meaning we need to increment references AIDL version
elsewhere to take advantage of the new functionality (and to make tests
happy).

We will freeze the IAudioExtension AIDL API as v5 at a later date.

Bug: 378303588
Test: atest vts_treble_vintf_vendor_test
Flag: vendor.google.whitechapel.audio.flags.enable_always_available_display
Change-Id: I94434fcc2802c8759b59a0004aca1be603e7e88e
2024-12-05 04:27:25 +00:00
Android Build Coastguard Worker
0eedc805e0 Snap for 12605939 from 31cb3f5521 to mainline-tzdata6-release
Change-Id: I52e4a8f9924ba01518dc96884db8e3b08e79a935
2024-11-05 10:09:33 +00:00
Android Build Coastguard Worker
fbcc92b639 Snap for 12462067 from 0a9c248adb to mainline-tzdata6-release
Change-Id: Ibd1a88a27aa18f771950e8d76954a90fc6089aba
2024-10-07 08:57:19 +00:00
Android Build Coastguard Worker
ea2ca6992f Snap for 12238800 from 722dbe869c to mainline-tzdata6-release
Change-Id: I7ac66c38bd66baa994d2bb7a82c1d6ec45a9ca0c
2024-08-16 12:56:31 +00:00
Android Build Coastguard Worker
f6954b2ba3 Snap for 12034474 from 9a26ed1a9b to mainline-tzdata6-release
Change-Id: I8a415b43b06cca60caa484fcefd6737c21e5d397
2024-07-01 08:33:47 +00:00
Android Build Coastguard Worker
13811d2a7f Snap for 11947112 from 5f01cd2856 to mainline-tzdata6-release
Change-Id: I15b058571185470de2d5ce987ce7526a95d5623b
2024-06-10 10:12:42 +00:00
Android Build Coastguard Worker
b0c3134c36 Snap for 11919022 from 85ff832530 to mainline-tzdata6-release
Change-Id: I931fa0e3500b9e5d9cdf23dedad04273c22ddfb6
2024-06-03 15:30:40 +00:00
Android Build Coastguard Worker
f95db50ffd Snap for 11607654 from 7a5eea3546 to mainline-tzdata6-release
Change-Id: I815a03e79286bcd252ca78b0bc100f8fb41d9110
2024-03-21 12:27:17 +00:00
195 changed files with 1104 additions and 1369 deletions

22
16kb/16kb.mk Normal file
View File

@@ -0,0 +1,22 @@
#
# Copyright (C) 2025 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.
#
#######################################################################
# WARNING: Any rule defined here automatically gets inherited for
# *BOTH* 4 KB and 16 KB targets where this file is included.
#######################################################################
PRODUCT_PACKAGES += copy_efs_files_to_data

13
16kb/Android.bp Normal file
View File

@@ -0,0 +1,13 @@
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
// 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

@@ -0,0 +1,38 @@
// Copyright (C) 2025 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_gs-common_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

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2025 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

@@ -0,0 +1,130 @@
/*
* Copyright (C) 2025 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");
}
}

View File

@@ -0,0 +1,39 @@
#!/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

@@ -7,16 +7,3 @@ PRODUCT_PACKAGES += dump_aoc \
# If AoC Daemon is not present on this build, load firmware at boot via rc
PRODUCT_COPY_FILES += \
device/google/gs-common/aoc/conf/init.aoc.daemon.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.aoc.rc
ifneq ($(wildcard vendor/google/whitechapel/aoc/aocx/aidl/aocx/framework_compatibility_matrix.xml),)
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += \
vendor/google/whitechapel/aoc/aocx/aidl/aocx/framework_compatibility_matrix.xml
endif
# AoC debug support
PRODUCT_PACKAGES_ENG += \
aocdump \
aocutil \
aoc_audio_cfg \
vp_util \
aocx_tool

View File

@@ -1,3 +0,0 @@
# Load AoC firmware and boot
on property:vendor.all.modules.ready=1
write /sys/devices/platform/19000000.aoc/firmware aoc.bin

View File

@@ -31,11 +31,4 @@ PRODUCT_PROPERTY_OVERRIDES += \
PRODUCT_SYSTEM_EXT_PROPERTIES += \
ro.audio.ihaladaptervendorextension_enabled=true
ifneq (,$(filter userdebug 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)
$(call soong_config_set,aoc_audio_func,aidl_command_interface,true)
endif
$(call soong_config_set,pixel_audio_hal_type,aidl_build,true)

View File

@@ -1,7 +1,7 @@
<compatibility-matrix version="1.0" type="framework">
<hal format="aidl">
<name>vendor.google.whitechapel.audio.extension</name>
<version>4</version>
<version>4-5</version>
<interface>
<name>IAudioExtension</name>
<instance>default</instance>

View File

@@ -27,9 +27,4 @@ PRODUCT_COPY_FILES += \
endif
## TODO(b/271958194): separate for hidl and aidl.
PRODUCT_SOONG_NAMESPACES += \
vendor/google/whitechapel/audio/hal \
vendor/google/whitechapel/audio/interfaces
$(call soong_config_set,aoc_audio_board,platform,$(TARGET_BOARD_PLATFORM))

View File

@@ -1,49 +0,0 @@
DEVICE_MANIFEST_FILE += device/google/gs-common/audio/hidl/manifest.xml
# Audio HAL Server & Default Implementations
PRODUCT_PACKAGES += \
android.hardware.audio.service \
android.hardware.audio@7.1-impl \
android.hardware.audio.effect@7.0-impl \
android.hardware.soundtrigger@2.3-impl \
vendor.google.whitechapel.audio.audioext@4.0-impl \
android.hardware.bluetooth.audio-impl \
#Audio HAL libraries
PRODUCT_PACKAGES += \
audio.primary.$(TARGET_BOARD_PLATFORM) \
audio.platform.aoc \
audio_tunnel_aoc \
aoc_aud_ext \
libaoctuningdecoder \
liboffloadeffect \
audio_bt_aoc \
audio_waves_aoc \
audio_fortemedia_aoc \
audio_bluenote_aoc \
audio_usb_aoc \
audio_cca_aoc \
audio_compensation_aoc \
libamcsextfile \
audio_amcs_ext \
audio.usb.default \
audio.usbv2.default \
audio.bluetooth.default \
audio.r_submix.default \
audio_spk_35l41 \
audio_spk_tas25xx \
audio_hdmi_aoc \
sound_trigger.primary.$(TARGET_BOARD_PLATFORM)
ifeq (,$(filter aosp_%,$(TARGET_PRODUCT)))
# IAudioMetricExt HIDL
PRODUCT_PACKAGES += \
vendor.google.audiometricext@1.0-service-vendor
endif
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/audio/sepolicy/hidl
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/audio/sepolicy/hdmi_audio/drmdp
include device/google/gs-common/audio/common.mk
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/audio/hidl/device_framework_matrix_product.xml

View File

@@ -0,0 +1,3 @@
# Allow access to audio HAL.
binder_call(hal_sensors_default, hal_audio_default)
allow hal_sensors_default hal_audio_ext_service:service_manager find;

View File

@@ -1,19 +1,11 @@
ifeq (,$(filter factory_%,$(TARGET_PRODUCT)))
PRODUCT_PACKAGES += battery_mitigation
endif
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
ifeq (,$(filter factory_%,$(TARGET_PRODUCT)))
PRODUCT_PACKAGES += BrownoutDetection
endif
endif
ifeq ($(RELEASE_PIXEL_AIDL_BATTERY_MITIGATION_HAL), true)
PRODUCT_PROPERTY_OVERRIDES += \
vendor.battery_mitigation.aidl.enable=true
endif
PRODUCT_SOONG_NAMESPACES += device/google/gs-common/battery_mitigation \
vendor/google/battery_mitigation
PRODUCT_SOONG_NAMESPACES += device/google/gs-common/battery_mitigation
PRODUCT_PACKAGES += vendor.google.battery_mitigation-default
PRODUCT_PACKAGES += vendor.google.battery_mitigation.service_static
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/battery_mitigation/compatibility_matrix.xml

View File

@@ -1,10 +1,9 @@
PRODUCT_SOONG_NAMESPACES += vendor/broadcom/bluetooth
PRODUCT_PACKAGES += \
android.hardware.bluetooth-V1-ndk.so \
android.hardware.bluetooth.finder-V1-ndk.so \
android.hardware.bluetooth.ranging-V1-ndk.so \
android.hardware.bluetooth-service.bcmbtlinux \
vendor.google.bluetooth_ext-V1-ndk.so \
vendor.google.bluetooth_ext-V3-ndk.so \
bt_vendor.conf \
android.hardware.bluetooth.prebuilt.xml \
android.hardware.bluetooth_le.prebuilt.xml

View File

@@ -1,7 +1,7 @@
<compatibility-matrix version="1.0" type="framework">
<hal format="aidl" optional="true">
<name>vendor.google.bluetooth_ext</name>
<version>1</version>
<version>1-3</version>
<interface>
<name>IBluetoothFinder</name>
<instance>default</instance>
@@ -26,5 +26,9 @@
<name>IBluetoothEwp</name>
<instance>default</instance>
</interface>
<interface>
<name>IBluetoothCco</name>
<instance>default</instance>
</interface>
</hal>
</compatibility-matrix>

View File

@@ -1,20 +0,0 @@
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
cc_binary {
name: "dump_bcmbt",
srcs: ["dump_bcmbt.cpp"],
cflags: [
"-Wall",
"-Wextra",
"-Werror",
],
shared_libs: [
"libbase",
"libdump",
"liblog",
],
vendor: true,
relative_install_path: "dump",
}

View File

@@ -1,45 +0,0 @@
/*
* 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.
*/
#include <dump/pixel_dump.h>
//#include <android-base/properties.h>
#include <android-base/file.h>
#define BCMBT_ACTIVITY_LOG_DIRECTORY "/data/vendor/bluetooth"
#define BCMBT_SNOOP_LOG_DIRECTORY "/data/vendor/bluetooth"
#define BCMBT_FW_LOG_DIRECTORY "/data/vendor/ssrdump/coredump"
#define BCMBT_SNOOP_LOG_PREFIX "btsnoop_hci_vnd"
#define BCMBT_BACKUP_SNOOP_LOG_PREFIX "backup_btsnoop_hci_vnd"
#define BCMBT_FW_DUMP_LOG_PREFIX "coredump_bt_socdump_"
#define BCMBT_CHRE_DUMP_LOG_PREFIX "coredump_bt_chredump_"
#define BCMBT_HAL_DUMP_LOG_PREFIX "coredump_bt_"
#define BCMBT_ACTIVITY_LOG_PREFIX "bt_activity_"
int main() {
std::string outputDir = concatenatePath(BUGREPORT_PACKING_DIR, "bcmbt");
if (mkdir(outputDir.c_str(), 0777) == -1) {
printf("Unable to create folder: %s\n", outputDir.c_str());
return 0;
}
dumpLogs(BCMBT_SNOOP_LOG_DIRECTORY, outputDir.c_str(), 4,
BCMBT_SNOOP_LOG_PREFIX);
dumpLogs(BCMBT_SNOOP_LOG_DIRECTORY, outputDir.c_str(), 2, BCMBT_BACKUP_SNOOP_LOG_PREFIX);
dumpLogs(BCMBT_FW_LOG_DIRECTORY, outputDir.c_str(), 10, BCMBT_FW_DUMP_LOG_PREFIX);
dumpLogs(BCMBT_FW_LOG_DIRECTORY, outputDir.c_str(), 10, BCMBT_CHRE_DUMP_LOG_PREFIX);
dumpLogs(BCMBT_FW_LOG_DIRECTORY, outputDir.c_str(), 10, BCMBT_HAL_DUMP_LOG_PREFIX);
dumpLogs(BCMBT_ACTIVITY_LOG_DIRECTORY, outputDir.c_str(), 10, BCMBT_ACTIVITY_LOG_PREFIX);
return 0;
}

View File

@@ -1,3 +1 @@
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/bcmbt/dump/sepolicy/
PRODUCT_PACKAGES_ENG += dump_bcmbt

View File

@@ -16,12 +16,13 @@
</hal>
<hal format="aidl">
<name>vendor.google.bluetooth_ext</name>
<version>1</version>
<version>2</version>
<fqname>IBTChannelAvoidance/default</fqname>
<fqname>IBluetoothCcc/default</fqname>
<fqname>IBluetoothEwp/default</fqname>
<fqname>IBluetoothExt/default</fqname>
<fqname>IBluetoothFinder/default</fqname>
<fqname>IBluetoothSar/default</fqname>
<fqname>IBluetoothCco/default</fqname>
</hal>
</manifest>

View File

@@ -5,3 +5,4 @@ vendor.google.bluetooth_ext.IBluetoothCcc/default u:o
vendor.google.bluetooth_ext.IBluetoothEwp/default u:object_r:hal_bluetooth_coexistence_service:s0
vendor.google.bluetooth_ext.IBluetoothExt/default u:object_r:hal_bluetooth_coexistence_service:s0
vendor.google.bluetooth_ext.IBluetoothFinder/default u:object_r:hal_bluetooth_coexistence_service:s0
vendor.google.bluetooth_ext.IBluetoothCco/default u:object_r:hal_bluetooth_coexistence_service:s0

View File

@@ -1,7 +1,6 @@
# When neither AOSP nor factory targets
ifeq (,$(filter aosp_% factory_% lineage_%, $(TARGET_PRODUCT)))
PRODUCT_PACKAGES += BetterBugStub
PRODUCT_PACKAGES_DEBUG += $(RELEASE_PACKAGE_BETTER_BUG)
endif
PRODUCT_PUBLIC_SEPOLICY_DIRS += device/google/gs-common/betterbug/sepolicy/product/public

View File

@@ -1,4 +1,3 @@
PRODUCT_SOONG_NAMESPACES += vendor/google/connectivity/bluetooth/common
PRODUCT_PACKAGES += \
android.hardware.bluetooth-V1-ndk.so \
android.hardware.bluetooth.finder-V1-ndk.so \

View File

@@ -1,20 +0,0 @@
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
cc_binary {
name: "dump_bt",
srcs: ["dump.cpp"],
cflags: [
"-Wall",
"-Wextra",
"-Werror",
],
shared_libs: [
"libbase",
"libdump",
"liblog",
],
vendor: true,
relative_install_path: "dump",
}

View File

@@ -1,44 +0,0 @@
/*
* 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.
*/
#include <dump/pixel_dump.h>
#include <android-base/file.h>
#define PIXELBT_ACTIVITY_LOG_DIRECTORY "/data/vendor/bluetooth"
#define PIXELBT_SNOOP_LOG_DIRECTORY "/data/vendor/bluetooth"
#define PIXELBT_FW_LOG_DIRECTORY "/data/vendor/ssrdump/coredump"
#define PIXELBT_SNOOP_LOG_PREFIX "btsnoop_hci_vnd"
#define PIXELBT_BACKUP_SNOOP_LOG_PREFIX "backup_btsnoop_hci_vnd"
#define PIXELBT_FW_DUMP_LOG_PREFIX "coredump_bt_socdump_"
#define PIXELBT_CHRE_DUMP_LOG_PREFIX "coredump_bt_chredump_"
#define PIXELBT_HAL_DUMP_LOG_PREFIX "coredump_bt_"
#define PIXELBT_ACTIVITY_LOG_PREFIX "bt_activity_"
int main() {
std::string outputDir = concatenatePath(BUGREPORT_PACKING_DIR, "bt");
if (mkdir(outputDir.c_str(), 0777) == -1) {
printf("Unable to create folder: %s\n", outputDir.c_str());
return 0;
}
dumpLogs(PIXELBT_SNOOP_LOG_DIRECTORY, outputDir.c_str(), 4,
PIXELBT_SNOOP_LOG_PREFIX);
dumpLogs(PIXELBT_SNOOP_LOG_DIRECTORY, outputDir.c_str(), 2, PIXELBT_BACKUP_SNOOP_LOG_PREFIX);
dumpLogs(PIXELBT_FW_LOG_DIRECTORY, outputDir.c_str(), 10, PIXELBT_FW_DUMP_LOG_PREFIX);
dumpLogs(PIXELBT_FW_LOG_DIRECTORY, outputDir.c_str(), 10, PIXELBT_CHRE_DUMP_LOG_PREFIX);
dumpLogs(PIXELBT_FW_LOG_DIRECTORY, outputDir.c_str(), 10, PIXELBT_HAL_DUMP_LOG_PREFIX);
dumpLogs(PIXELBT_ACTIVITY_LOG_DIRECTORY, outputDir.c_str(), 10, PIXELBT_ACTIVITY_LOG_PREFIX);
return 0;
}

View File

@@ -1,3 +1 @@
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/bluetooth/dump/sepolicy/
PRODUCT_PACKAGES_DEBUG += dump_bt

View File

@@ -2,23 +2,6 @@ package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
cc_binary {
name: "dump_camera",
srcs: ["dump_camera.cpp"],
cflags: [
"-Wall",
"-Wextra",
"-Werror",
],
shared_libs: [
"libbase",
"libdump",
"liblog",
],
vendor: true,
relative_install_path: "dump",
}
prebuilt_etc {
name: "lyric_preview_dis_xml",
vendor: true,
@@ -58,3 +41,11 @@ prebuilt_etc {
init_rc: ["libg3a_ghawb.rc"],
src: "libg3a_ghawb.rc",
}
prebuilt_etc {
name: "vendor-apex-allowlist-lyric.xml",
src: "vendor-apex-allowlist-lyric.xml",
vendor: true,
sub_dir: "sysconfig",
filename_from_src: true,
}

View File

@@ -1,6 +1,3 @@
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/camera/sepolicy/vendor
PRODUCT_PUBLIC_SEPOLICY_DIRS += device/google/gs-common/camera/sepolicy/product/public
PRODUCT_PRIVATE_SEPOLICY_DIRS += device/google/gs-common/camera/sepolicy/product/private
PRODUCT_PACKAGES_ENG += dump_camera

View File

@@ -1,56 +0,0 @@
/*
* Copyright 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <android-base/file.h>
#include <android-base/properties.h>
#include <dump/pixel_dump.h>
namespace {
constexpr std::string_view kCameraLogDir = "/data/vendor/camera/profiler";
constexpr std::string_view kGraphStateDumpDir = "/data/vendor/camera";
} // namespace
int main() {
if (!::android::base::GetBoolProperty(
"vendor.camera.debug.camera_performance_analyzer.attach_to_bugreport",
true)) {
return 0;
}
const std::string cameraDestDir =
concatenatePath(BUGREPORT_PACKING_DIR, "camera");
if (mkdir(cameraDestDir.c_str(), 0777) == -1) {
printf("Unable to create folder: %s\n", cameraDestDir.c_str());
return 0;
}
// Attach multiple latest sessions (in case the user is running concurrent
// sessions or starts a new session after the one with performance issues).
dumpLogs(kCameraLogDir.data(), cameraDestDir.c_str(), 10, "session-ended-");
dumpLogs(kCameraLogDir.data(), cameraDestDir.c_str(), 10, "multicam-");
dumpLogs(kCameraLogDir.data(), cameraDestDir.c_str(), 5, "high-drop-rate-");
dumpLogs(kCameraLogDir.data(), cameraDestDir.c_str(), 5, "watchdog-");
dumpLogs(kCameraLogDir.data(), cameraDestDir.c_str(), 5, "camera-ended-");
dumpLogs(kCameraLogDir.data(), cameraDestDir.c_str(), 5, "fatal-error-");
dumpLogs(kGraphStateDumpDir.data(), cameraDestDir.c_str(), 5,
"hal_graph_state_");
dumpLogs(kCameraLogDir.data(), cameraDestDir.c_str(), 10,
"fd_state_tracker-");
return 0;
}

View File

@@ -1,6 +1,6 @@
# override default log levels.
on boot
setprop log.tag.GAF E
setprop log.tag.GAF I
# backward-compatible system props.
on property:persist.vendor.camera.af.debug_level=0

View File

@@ -8,49 +8,6 @@ $(call soong_config_set,google3a_config,ghawb_truetone,true)
# Flag controls whether Lyric apex can be located in the dist-directory.
$(call soong_config_set, lyric, dist_lyric_apex, $(RELEASE_PIXEL_DIST_LYRIC_APEX))
# Select GCH backend.
# TODO(b/192681010): This dependency inversion should be removed.
ifneq ($(wildcard vendor/google/services/LyricCameraHAL/src),)
$(call soong_config_set,gch,hwl_library,lyric)
endif
# Use build-time flag to select whether to build from source
# or ingest prebuilt-apex. We would want the development teams
# using release configuration: (trunk-staging) to build from source.
# All shipping releases will switch to prebuilts (trunk+)
# if this condition is not true, then build from source.
# Fallback if the prebuilts directory does not exist, then we must
# build from source no matter what, so we log a warning
ifeq ($(RELEASE_PIXEL_CAMERA_ENABLE_PREBUILT),true)
ifeq ($(wildcard vendor/google/services/LyricCameraHAL/prebuilt),)
$(warning Lyric prebuilt directory is missing, it will be built from source)
BUILD_LYRIC_FROM_SOURCE := true
else
BUILD_LYRIC_FROM_SOURCE := false
endif
else
BUILD_LYRIC_FROM_SOURCE := true
endif # RELEASE_PIXEL_CAMERA_ENABLE_PREBUILT
ifeq ($(BUILD_LYRIC_FROM_SOURCE),true)
PRODUCT_SOONG_NAMESPACES += \
vendor/google/camera \
vendor/google/camera/google_3a/libs_v4 \
vendor/google/camera/rlsservice
# TODO(b/257379485): 3A is incrementally enabling cuttlefish build for native
# code coverage support, temporary require separate namespace for folders that
# can be built successfully.
PRODUCT_SOONG_NAMESPACES += \
vendor/google/camera/common/g3_shared \
vendor/google/camera/google_3a/libs_v4/g3ABase \
vendor/google/camera/google_3a/libs_v4/gABC/native_coverage \
vendor/google/camera/google_3a/libs_v4/gAF \
vendor/google/camera/google_3a/libs_v4/gafd \
vendor/google/camera/google_3a/libs_v4/gHAWB/native_coverage
endif # BUILD_LYRIC_FROM_SOURCE
# Init-time log settings for Google 3A
PRODUCT_PACKAGES += libg3a_standalone_gabc_rc
PRODUCT_PACKAGES += libg3a_standalone_gaf_rc
@@ -58,6 +15,7 @@ PRODUCT_PACKAGES += libg3a_standalone_ghawb_rc
# Vendor APEX which contains the camera HAL
PRODUCT_PACKAGES += com.google.pixel.camera.hal
PRODUCT_PACKAGES += venodr-apex-allowlist-lyric.xml
PRODUCT_PACKAGES += init.camera.set-interrupts-ownership
PRODUCT_PACKAGES += lyric_preview_dis_xml
@@ -69,7 +27,3 @@ DEVICE_MATRIX_FILE += \
# sepolicy dir is added in dump.mk.
# Make doesn't deduplicate sepolicy dirs, so including it here causes build errors.
# Calibration tools for debug builds
PRODUCT_PACKAGES_DEBUG += tarasque_test
PRODUCT_PACKAGES_DEBUG += ProtoCalibGenerator

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This XML file declares the vendor apex package names eligible for installation.
-->
<config>
<allowed-vendor-apex package="com.google.pixel.camera.hal" installerPackage="com.google.android.GoogleCamera" />
</config>

View File

@@ -1,27 +1,32 @@
PIXEL_PREBUILT_SYMLINK_PATH=$(OUT_DIR)/pixel
$(shell rm -rf pixel_current_*)
$(shell rm -rf $(PIXEL_PREBUILT_SYMLINK_PATH)/pixel_current_*)
$(shell mkdir -p $(PIXEL_PREBUILT_SYMLINK_PATH))
# Create symlink for bootloader
$(shell rm -f "pixel_current_bootloader")
ifdef BOOTLOADER_FILE_PATH
$(shell ln -sf ${BOOTLOADER_FILE_PATH} "pixel_current_bootloader")
$(shell ln -sf ../../${BOOTLOADER_FILE_PATH} $(PIXEL_PREBUILT_SYMLINK_PATH)/"pixel_current_bootloader")
else ifdef BOOTLOADER_RADIO_FILE_PATH
$(shell ln -sf ${BOOTLOADER_RADIO_FILE_PATH} "pixel_current_bootloader")
$(shell ln -sf ../../${BOOTLOADER_RADIO_FILE_PATH} $(PIXEL_PREBUILT_SYMLINK_PATH)/"pixel_current_bootloader")
endif
# Create symlink for kernel
$(shell rm -f "pixel_current_kernel")
ifdef TARGET_KERNEL_DIR
$(shell ln -sf ${TARGET_KERNEL_DIR} "pixel_current_kernel")
$(shell ln -sf ../../${TARGET_KERNEL_DIR} $(PIXEL_PREBUILT_SYMLINK_PATH)/"pixel_current_kernel")
endif
# Create symlink for radio
$(shell rm -f "pixel_current_radio")
ifdef RADIO_FILE_PATH
$(shell ln -sf ${RADIO_FILE_PATH} "pixel_current_radio")
$(shell ln -sf ../../${RADIO_FILE_PATH} $(PIXEL_PREBUILT_SYMLINK_PATH)/"pixel_current_radio")
else ifdef BOOTLOADER_RADIO_FILE_PATH
$(shell ln -sf ${BOOTLOADER_RADIO_FILE_PATH} "pixel_current_radio")
$(shell ln -sf ../../${BOOTLOADER_RADIO_FILE_PATH} $(PIXEL_PREBUILT_SYMLINK_PATH)/"pixel_current_radio")
endif
# Create symlink for radiocfg
$(shell rm -f "pixel_current_radiocfg")
ifdef SRC_MDM_CFG_DIR
$(shell ln -sf ${SRC_MDM_CFG_DIR} "pixel_current_radiocfg")
$(shell ln -sf ../../${SRC_MDM_CFG_DIR} $(PIXEL_PREBUILT_SYMLINK_PATH)/"pixel_current_radiocfg")
endif

View File

@@ -1,95 +1,2 @@
# Dauntless
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/dauntless/sepolicy
ifneq ($(wildcard vendor/google_nos),)
PRODUCT_SOONG_NAMESPACES += vendor/google_nos/init/dauntless
PRODUCT_PACKAGES += \
citadeld \
citadel_updater \
android.hardware.weaver-service.citadel \
android.hardware.authsecret-service.citadel \
android.hardware.oemlock-service.citadel \
init_citadel \
android.hardware.strongbox_keystore.xml \
android.hardware.security.keymint-service.citadel \
dump_gsc.sh
# USERDEBUG ONLY: Install test packages
PRODUCT_PACKAGES_ENG += citadel_integration_tests \
pwntest \
nugget_targeted_tests \
CitadelProvision \
nugget_aidl_test_weaver
# Assign default value for RELEASE_GOOGLE_DAUNTLESS_DIR if no trunk flags support
RELEASE_GOOGLE_DAUNTLESS_DIR ?= vendor/google_nos/prebuilts/dauntless
# The production Dauntless firmware will be of flavors evt and d3m2.
# There are also several flavors of pre-release chips. Each flavor
# (production and pre-release) requires the firmware to be signed differently.
DAUNTLESS_FIRMWARE_SIZE := 1048576
# The nearly-production Dauntless chips are "proto1.1"
ifneq (,$(wildcard $(RELEASE_GOOGLE_DAUNTLESS_DIR)/proto11.ec.bin))
ifneq ($(DAUNTLESS_FIRMWARE_SIZE), $(shell stat -c "%s" $(RELEASE_GOOGLE_DAUNTLESS_DIR)/proto11.ec.bin))
$(error GSC firmware size check fail)
endif
PRODUCT_COPY_FILES += \
$(RELEASE_GOOGLE_DAUNTLESS_DIR)/proto11.ec.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/dauntless/proto11.ec.bin
$(call dist-for-goals,droid,$(RELEASE_GOOGLE_DAUNTLESS_DIR)/proto11.ec.bin)
else
$(error GSC firmware not found in $(RELEASE_GOOGLE_DAUNTLESS_DIR))
endif
# The production Dauntless chips are "evt"
ifneq (,$(wildcard $(RELEASE_GOOGLE_DAUNTLESS_DIR)/evt.ec.bin))
ifneq ($(DAUNTLESS_FIRMWARE_SIZE), $(shell stat -c "%s" $(RELEASE_GOOGLE_DAUNTLESS_DIR)/evt.ec.bin))
$(error GSC firmware size check fail)
endif
PRODUCT_COPY_FILES += \
$(RELEASE_GOOGLE_DAUNTLESS_DIR)/evt.ec.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/dauntless/evt.ec.bin
$(call dist-for-goals,droid,$(RELEASE_GOOGLE_DAUNTLESS_DIR)/evt.ec.bin)
else
$(error GSC firmware not found in $(RELEASE_GOOGLE_DAUNTLESS_DIR))
endif
# New 2023 production Dauntless chips are "d3m2"
ifneq (,$(wildcard $(RELEASE_GOOGLE_DAUNTLESS_DIR)/d3m2.ec.bin))
ifneq ($(DAUNTLESS_FIRMWARE_SIZE), $(shell stat -c "%s" $(RELEASE_GOOGLE_DAUNTLESS_DIR)/d3m2.ec.bin))
$(error GSC firmware size check fail)
endif
PRODUCT_COPY_FILES += \
$(RELEASE_GOOGLE_DAUNTLESS_DIR)/d3m2.ec.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/dauntless/d3m2.ec.bin
$(call dist-for-goals,droid,$(RELEASE_GOOGLE_DAUNTLESS_DIR)/d3m2.ec.bin)
else
$(error GSC firmware not found in $(RELEASE_GOOGLE_DAUNTLESS_DIR))
endif
# Intermediate image artifacts are published, but aren't included in /vendor/firmware/dauntless
# in PRODUCT_COPY_FILES
# This is because intermediate images aren't needed on user devices, but the published artifact
# is useful for flashstation purposes.
# proto11 chips need an intermediate image prior to upgrading to newever versions of the firmware
ifneq (,$(wildcard vendor/google_nos/prebuilts/dauntless/intermediate_images/proto11_intermediate.ec.bin))
ifneq ($(DAUNTLESS_FIRMWARE_SIZE), $(shell stat -c "%s" vendor/google_nos/prebuilts/dauntless/intermediate_images/proto11_intermediate.ec.bin))
$(error GSC firmware size check fail)
endif
$(call dist-for-goals,droid,vendor/google_nos/prebuilts/dauntless/intermediate_images/proto11_intermediate.ec.bin)
endif
# evt chips need an intermediate image prior to upgrading to newever versions of the firmware
ifneq (,$(wildcard vendor/google_nos/prebuilts/dauntless/intermediate_images/evt_intermediate.ec.bin))
ifneq ($(DAUNTLESS_FIRMWARE_SIZE), $(shell stat -c "%s" vendor/google_nos/prebuilts/dauntless/intermediate_images/evt_intermediate.ec.bin))
$(error GSC firmware size check fail)
endif
$(call dist-for-goals,droid,vendor/google_nos/prebuilts/dauntless/intermediate_images/evt_intermediate.ec.bin)
endif
# d3m2 chips need an intermediate image prior to upgrading to newever versions of the firmware
ifneq (,$(wildcard vendor/google_nos/prebuilts/dauntless/intermediate_images/d3m2_intermediate.ec.bin))
ifneq ($(DAUNTLESS_FIRMWARE_SIZE), $(shell stat -c "%s" vendor/google_nos/prebuilts/dauntless/intermediate_images/d3m2_intermediate.ec.bin))
$(error GSC firmware size check fail)
endif
$(call dist-for-goals,droid,vendor/google_nos/prebuilts/dauntless/intermediate_images/d3m2_intermediate.ec.bin)
endif
endif # $(wildcard vendor/google_nos)

View File

@@ -2,16 +2,9 @@ package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
sh_binary {
name: "dump_display_userdebug.sh",
src: "dump_display_userdebug.sh",
vendor: true,
sub_dir: "dump",
}
cc_binary {
name: "dump_display",
srcs: ["dump_display.cpp"],
name: "dump_exynos_display",
srcs: ["exynos/dump_display.cpp"],
cflags: [
"-Wall",
"-Wextra",
@@ -26,8 +19,8 @@ cc_binary {
}
cc_binary {
name: "dump_second_display",
srcs: ["dump_second_display.cpp"],
name: "dump_exynos_second_display",
srcs: ["exynos/dump_second_display.cpp"],
cflags: [
"-Wall",
"-Wextra",
@@ -40,3 +33,33 @@ cc_binary {
relative_install_path: "dump",
}
cc_binary {
name: "dump_pixel_display",
srcs: ["pixel/dump_display.cpp"],
cflags: [
"-Wall",
"-Wextra",
"-Werror",
],
shared_libs: [
"libbase",
"libdump",
],
vendor: true,
relative_install_path: "dump",
}
cc_binary {
name: "dump_pixel_second_display",
srcs: ["pixel/dump_second_display.cpp"],
cflags: [
"-Wall",
"-Wextra",
"-Werror",
],
shared_libs: [
"libdump",
],
vendor: true,
relative_install_path: "dump",
}

View File

@@ -1,4 +0,0 @@
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/display/sepolicy
PRODUCT_PACKAGES_ENG += dump_display_userdebug.sh
PRODUCT_PACKAGES += dump_display

View File

@@ -1,26 +0,0 @@
#!/vendor/bin/sh
display_trace_path="/sys/kernel/tracing/instances/pixel-display/trace"
echo "------ Display Trace ($display_trace_path)------"
cat $display_trace_path
echo "------ HWC Fence States ------"
for f in $(ls /data/vendor/log/hwc/*_hwc_fence_state*.txt)
do
echo $f
cat $f
done
echo "------ HWC Error Logs ------"
for f in $(ls /data/vendor/log/hwc/*_hwc_error_log*.txt)
do
echo $f
cat $f
done
echo "------ HWC Debug Dumps ------"
for f in $(ls /data/vendor/log/hwc/*_hwc_debug*.dump)
do
echo $f
cat $f
done

View File

@@ -1,3 +1,3 @@
PRODUCT_PACKAGES += dump_second_display
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/display/sepolicy_second_display
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/display/sepolicy/exynos
PRODUCT_PACKAGES += dump_exynos_display

View File

@@ -0,0 +1,3 @@
PRODUCT_PACKAGES += dump_exynos_second_display
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/display/sepolicy_second_display/exynos

View File

@@ -0,0 +1,3 @@
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/display/sepolicy/pixel
PRODUCT_PACKAGES += dump_pixel_display

View File

@@ -0,0 +1,3 @@
PRODUCT_PACKAGES += dump_pixel_second_display
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/display/sepolicy_second_display/pixel

View File

@@ -18,7 +18,7 @@
int main() {
setbuf(stdout, NULL);
dumpFileContent("DECON-0 counters /sys/class/drm/card0/device/decon0/counters", "/sys/class/drm/card0/device/decon0/counters");
dumpFileContent("DECON-0 counters", "/sys/class/drm/card0/device/decon0/counters");
dumpFileContent("CRTC-0 event log", "/sys/kernel/debug/dri/0/crtc-0/event");
runCommand("libdisplaycolor", "/vendor/bin/dumpsys displaycolor -v");

View File

@@ -16,7 +16,7 @@
#include <dump/pixel_dump.h>
int main() {
dumpFileContent("DECON-1 counters /sys/class/drm/card0/device/decon1/counters", "/sys/class/drm/card0/device/decon1/counters");
dumpFileContent("DECON-1 counters", "/sys/class/drm/card0/device/decon1/counters");
dumpFileContent("CRTC-1 event log", "/sys/kernel/debug/dri/0/crtc-1/event");
dumpFileContent("Secondary panel name", "/sys/class/drm/card0/device/secondary-panel/panel_name");

View File

@@ -0,0 +1,30 @@
/*
* Copyright 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <dump/pixel_dump.h>
#include <android-base/file.h>
int main() {
setbuf(stdout, NULL);
dumpFileContent("CRTC-0 status", "/sys/kernel/debug/dri/0/crtc-0/status");
dumpFileContent("DRM State", "/sys/kernel/debug/dri/0/state");
runCommand("libdisplaycolor", "/vendor/bin/dumpsys displaycolor -v");
dumpFileContent("Primary panel name", "/sys/class/drm/card0/device/primary-panel/panel_name");
dumpFileContent("Primary panel extra info", "/sys/class/drm/card0/device/primary-panel/panel_extinfo");
dumpFileContent("Primary panel power Vreg", "/sys/class/drm/card0/device/primary-panel/panel_pwr_vreg");
dumpFileContent("Primary panel power mode register", "/sys/class/drm/card0/device/primary-panel/power_mode");
return 0;
}

View File

@@ -13,12 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <dump/pixel_dump.h>
int main() {
dumpFileContent("Green LED Brightness", "/sys/class/leds/green/brightness");
dumpFileContent("Green LED Max Brightness", "/sys/class/leds/green/max_brightness");
dumpFileContent("LED Calibration Data", "/mnt/vendor/persist/led/led_calibration_LUT.txt");
dumpFileContent("CRTC-1 status", "/sys/kernel/debug/dri/0/crtc-1/status");
dumpFileContent("Secondary panel name", "/sys/class/drm/card0/device/secondary-panel/panel_name");
dumpFileContent("Secondary panel extra info", "/sys/class/drm/card0/device/secondary-panel/panel_extinfo");
dumpFileContent("Secondary panel power mode register", "/sys/class/drm/card0/device/secondary-panel/power_mode");
return 0;
}

View File

@@ -1,15 +0,0 @@
# Display (dump for bugreport)
pixel_bugreport(dump_display)
allow dump_display sysfs_display:file r_file_perms;
allow dump_display vendor_displaycolor_service:service_manager find;
binder_call(dump_display, hal_graphics_composer_default)
allow dump_display vendor_dumpsys:file execute_no_trans;
allow dump_display vendor_shell_exec:file execute_no_trans;
userdebug_or_eng(`
allow dump_display vendor_dri_debugfs:dir r_dir_perms;
allow dump_display vendor_dri_debugfs:file r_file_perms;
')
vndbinder_use(dump_display)

View File

@@ -1,11 +0,0 @@
# Display eng/userdebug (dump for bugreport)
pixel_bugreport(dump_display_userdebug)
userdebug_or_eng(`
allow dump_display_userdebug vendor_toolbox_exec:file execute_no_trans;
allow dump_display_userdebug vendor_log_file:dir search;
allow dump_display_userdebug vendor_hwc_log_file:dir r_dir_perms;
allow dump_display_userdebug vendor_hwc_log_file:file r_file_perms;
allow dump_display_userdebug debugfs_tracing_instances:dir search;
allow dump_display_userdebug debugfs_tracing_instances:file r_file_perms;
')

View File

@@ -0,0 +1,15 @@
# Display (dump for bugreport)
pixel_bugreport(dump_exynos_display)
allow dump_exynos_display sysfs_display:file r_file_perms;
allow dump_exynos_display vendor_displaycolor_service:service_manager find;
binder_call(dump_exynos_display, hal_graphics_composer_default)
allow dump_exynos_display vendor_dumpsys:file execute_no_trans;
allow dump_exynos_display vendor_shell_exec:file execute_no_trans;
userdebug_or_eng(`
allow dump_exynos_display vendor_dri_debugfs:dir r_dir_perms;
allow dump_exynos_display vendor_dri_debugfs:file r_file_perms;
')
vndbinder_use(dump_exynos_display)

View File

@@ -0,0 +1,11 @@
# Display eng/userdebug (dump for bugreport)
pixel_bugreport(dump_exynos_display_userdebug)
userdebug_or_eng(`
allow dump_exynos_display_userdebug vendor_toolbox_exec:file execute_no_trans;
allow dump_exynos_display_userdebug vendor_log_file:dir search;
allow dump_exynos_display_userdebug vendor_hwc_log_file:dir r_dir_perms;
allow dump_exynos_display_userdebug vendor_hwc_log_file:file r_file_perms;
allow dump_exynos_display_userdebug debugfs_tracing_instances:dir search;
allow dump_exynos_display_userdebug debugfs_tracing_instances:file r_file_perms;
')

View File

@@ -0,0 +1,5 @@
/vendor/bin/dump/dump_display_userdebug\.sh u:object_r:dump_exynos_display_userdebug_exec:s0
/vendor/bin/dump/dump_exynos_display u:object_r:dump_exynos_display_exec:s0
/data/vendor/log/hwc(/.*)? u:object_r:vendor_hwc_log_file:s0

View File

@@ -0,0 +1,3 @@
allow hal_graphics_composer_default dump_exynos_display:fifo_file { append write };
allow hal_graphics_composer_default dump_exynos_display:fd use;

View File

@@ -1,3 +0,0 @@
allow hal_graphics_composer_default dump_display:fifo_file { append write };
allow hal_graphics_composer_default dump_display:fd use;

View File

@@ -0,0 +1,15 @@
# Display (dump for bugreport)
pixel_bugreport(dump_pixel_display)
allow dump_pixel_display sysfs_display:file r_file_perms;
allow dump_pixel_display vendor_displaycolor_service:service_manager find;
binder_call(dump_pixel_display, hal_graphics_composer_default)
allow dump_pixel_display vendor_dumpsys:file execute_no_trans;
allow dump_pixel_display vendor_shell_exec:file execute_no_trans;
userdebug_or_eng(`
allow dump_pixel_display vendor_dri_debugfs:dir r_dir_perms;
allow dump_pixel_display vendor_dri_debugfs:file r_file_perms;
')
vndbinder_use(dump_pixel_display)

View File

@@ -0,0 +1,11 @@
# Display eng/userdebug (dump for bugreport)
pixel_bugreport(dump_pixel_display_userdebug)
userdebug_or_eng(`
allow dump_pixel_display_userdebug vendor_toolbox_exec:file execute_no_trans;
allow dump_pixel_display_userdebug vendor_log_file:dir search;
allow dump_pixel_display_userdebug vendor_hwc_log_file:dir r_dir_perms;
allow dump_pixel_display_userdebug vendor_hwc_log_file:file r_file_perms;
allow dump_pixel_display_userdebug debugfs_tracing_instances:dir search;
allow dump_pixel_display_userdebug debugfs_tracing_instances:file r_file_perms;
')

View File

@@ -0,0 +1,3 @@
type vendor_hwc_log_file, file_type, data_file_type;
type vendor_dri_debugfs, fs_type, debugfs_type;

View File

@@ -1,5 +1,5 @@
/vendor/bin/dump/dump_display_userdebug\.sh u:object_r:dump_display_userdebug_exec:s0
/vendor/bin/dump/dump_display u:object_r:dump_display_exec:s0
/vendor/bin/dump/dump_display_userdebug\.sh u:object_r:dump_pixel_display_userdebug_exec:s0
/vendor/bin/dump/dump_pixel_display u:object_r:dump_pixel_display_exec:s0
/data/vendor/log/hwc(/.*)? u:object_r:vendor_hwc_log_file:s0

View File

@@ -0,0 +1,4 @@
genfscon debugfs /dri/0/crtc- u:object_r:vendor_dri_debugfs:s0
genfscon debugfs /dri/0/state u:object_r:vendor_dri_debugfs:s0
genfscon sysfs /module/drm/parameters/debug u:object_r:sysfs_display:s0

View File

@@ -0,0 +1,3 @@
allow hal_graphics_composer_default dump_pixel_display:fifo_file { append write };
allow hal_graphics_composer_default dump_pixel_display:fd use;

View File

@@ -0,0 +1,2 @@
type vendor_displaycolor_service, vndservice_manager_type;

View File

@@ -0,0 +1,2 @@
displaycolor u:object_r:vendor_displaycolor_service:s0

View File

@@ -1,9 +0,0 @@
pixel_bugreport(dump_second_display)
allow dump_second_display sysfs_display:file r_file_perms;
userdebug_or_eng(`
allow dump_second_display vendor_dri_debugfs:dir r_dir_perms;
allow dump_second_display vendor_dri_debugfs:file r_file_perms;
')

View File

@@ -0,0 +1,9 @@
pixel_bugreport(dump_exynos_second_display)
allow dump_exynos_second_display sysfs_display:file r_file_perms;
userdebug_or_eng(`
allow dump_exynos_second_display vendor_dri_debugfs:dir r_dir_perms;
allow dump_exynos_second_display vendor_dri_debugfs:file r_file_perms;
')

View File

@@ -0,0 +1,2 @@
/vendor/bin/dump/dump_exynos_second_display u:object_r:dump_exynos_second_display_exec:s0

View File

@@ -1,2 +0,0 @@
/vendor/bin/dump/dump_second_display u:object_r:dump_second_display_exec:s0

View File

@@ -0,0 +1,9 @@
pixel_bugreport(dump_pixel_second_display)
allow dump_pixel_second_display sysfs_display:file r_file_perms;
userdebug_or_eng(`
allow dump_pixel_second_display vendor_dri_debugfs:dir r_dir_perms;
allow dump_pixel_second_display vendor_dri_debugfs:file r_file_perms;
')

View File

@@ -0,0 +1,2 @@
/vendor/bin/dump/dump_pixel_second_display u:object_r:dump_pixel_second_display_exec:s0

View File

@@ -24,4 +24,4 @@ get_prop(euiccpixel_app, dck_prop)
# b/265286368 framework UI rendering properties and file access
dontaudit euiccpixel_app default_prop:file { read };
dontaudit euiccpixel_app sysfs_gpu_uevent:file { read open getattr };

View File

@@ -1,2 +0,0 @@
# type for gpu uevent
type sysfs_gpu_uevent, sysfs_type, fs_type;

View File

@@ -1 +0,0 @@
genfscon sysfs /devices/platform/34f00000.gpu0/uevent u:object_r:sysfs_gpu_uevent:s0

View File

@@ -12,5 +12,8 @@ userdebug_or_eng(`
# Allows GCA_Eng & GCA-Next to access the hw_jpeg /dev/video12.
# allow debug_camera_app hw_jpg_device:chr_file rw_file_perms;
# Allows tachyon_service to communicate with GCA-Eng via binder.
binder_call(edgetpu_tachyon_server, debug_camera_app);
')

View File

@@ -11,3 +11,5 @@ allow google_camera_app edgetpu_device:chr_file { read write ioctl };
# Allows GCA to access the hw_jpeg /dev/video12.
#allow google_camera_app hw_jpg_device:chr_file rw_file_perms;
# Allows tachyon service to communicate with google_camera_app via binder.
binder_call(edgetpu_tachyon_server, google_camera_app);

View File

@@ -1,5 +1,5 @@
service vendor.dumpstate-default /vendor/bin/hw/android.hardware.dumpstate-service
class hal
user system
group system shell
group system shell readtracefs
interface aidl android.hardware.dumpstate.IDumpstateDevice/default

View File

@@ -1,6 +1,5 @@
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/gps/brcm/sepolicy
PRODUCT_SOONG_NAMESPACES += vendor/broadcom/gps/bcm47765
ifeq (,$(call soong_config_get,gpssdk,sdkv1))
$(call soong_config_set,gpssdk,sdkv1,false)
endif
@@ -12,6 +11,3 @@ PRODUCT_PACKAGES += \
bcm47765_gps_package \
sitril-gps \
android.hardware.location.gps.prebuilt.xml
PRODUCT_PACKAGES_ENG += \
init.gps_log.rc

View File

@@ -1,20 +0,0 @@
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
cc_binary {
name: "dump_gps",
srcs: ["dump_gps.cpp"],
cflags: [
"-Wall",
"-Wextra",
"-Werror",
],
shared_libs: [
"libbase",
"libdump",
"liblog",
],
vendor: true,
relative_install_path: "dump",
}

View File

@@ -1,145 +0,0 @@
/*
* Copyright 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <android-base/file.h>
#include <android-base/properties.h>
#include <dirent.h>
#include <dump/pixel_dump.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#define GPS_LOG_NUMBER_PROPERTY "persist.vendor.gps.aol.log_num"
#define GPS_LOG_DIRECTORY "/data/vendor/gps/logs"
#define GPS_RESOURCE_DIRECTORY "/data/vendor/gps/resource"
#define GPS_TMP_LOG_DIRECTORY "/data/vendor/gps/logs/.tmp"
#define GPS_LOG_PREFIX "gl-"
#define GPS_MCU_LOG_PREFIX "esw-"
#define GPS_MALLOC_LOG_DIRECTORY "/data/vendor/gps"
#define GPS_MALLOC_LOG_PREFIX "malloc_"
#define GPS_VENDOR_CHIP_INFO "/data/vendor/gps/chip.info"
#define GPS_RAWLOG_PREFIX "rawbin"
#define GPS_MEMDUMP_LOG_PREFIX "memdump_"
static void copyDirectory(const std::string &source,
const std::string &outputDir) {
DIR *dir = opendir(source.c_str());
if (dir == nullptr) {
return;
}
if (mkdir(outputDir.c_str(), 0777) == -1) {
closedir(dir);
return;
}
struct dirent *entry;
while ((entry = readdir(dir)) != nullptr) {
std::string entryName = entry->d_name;
if (entryName == "." || entryName == "..") {
continue;
}
std::string sourcePath = source + "/" + entryName;
std::string destPath = outputDir + "/" + entryName;
struct stat st;
if (stat(sourcePath.c_str(), &st) == 0) {
if (S_ISDIR(st.st_mode))
copyDirectory(sourcePath, destPath);
else
copyFile(sourcePath.c_str(), destPath.c_str());
}
}
closedir(dir);
return;
}
int compareFileExtensions(const struct dirent **a, const struct dirent **b) {
int num_a, num_b;
sscanf((*a)->d_name, "rawbinlog.out.%d", &num_a);
sscanf((*b)->d_name, "rawbinlog.out.%d", &num_b);
return num_a - num_b;
}
void dumpLogsAscending(const char* SrcDir, const char* DestDir, int limit, const char* prefix) {
struct dirent **dirent_list = NULL;
int num_entries = scandir(SrcDir, &dirent_list, 0, (int (*)(const struct dirent **, const struct dirent **)) alphasort);
if (!dirent_list) {
printf("Unable to scan dir: %s.\n", SrcDir);
return;
} else if (num_entries <= 0) {
printf("No file is found.\n");
return;
}
if (access(DestDir, R_OK)) {
printf("Unable to find folder: %s\n", DestDir);
return;
}
qsort(dirent_list, num_entries, sizeof(struct dirent *), (int (*)(const void *, const void *)) compareFileExtensions);
int copiedFiles = 0;
for (int i = 0 ; i < num_entries; i++) {
if (0 != strncmp(dirent_list[i]->d_name, prefix, strlen(prefix))) {
continue;
}
if ((copiedFiles >= limit) && (limit != -1)) {
printf("Skipped %s\n", dirent_list[i]->d_name);
continue;
}
copiedFiles++;
copyFile(concatenatePath(SrcDir, dirent_list[i]->d_name).c_str(), concatenatePath(DestDir, dirent_list[i]->d_name).c_str());
}
while (num_entries--) {
free(dirent_list[num_entries]);
}
free(dirent_list);
return;
}
int main() {
if(!::android::base::GetBoolProperty("vendor.gps.aol.enabled", false)) {
printf("vendor.gps.aol.enabled is false. gps logging is not running.\n");
return 0;
}
int maxFileNum = ::android::base::GetIntProperty(GPS_LOG_NUMBER_PROPERTY, 20);
std::string outputDir = concatenatePath(BUGREPORT_PACKING_DIR, "gps");
if (mkdir(outputDir.c_str(), 0777) == -1) {
printf("Unable to create folder: %s\n", outputDir.c_str());
return 0;
}
dumpLogs(GPS_TMP_LOG_DIRECTORY, outputDir.c_str(), 1, GPS_LOG_PREFIX);
dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), 3, GPS_MCU_LOG_PREFIX);
dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), maxFileNum, GPS_LOG_PREFIX);
dumpLogs(GPS_MALLOC_LOG_DIRECTORY, outputDir.c_str(), 1, GPS_MALLOC_LOG_PREFIX);
if (access(GPS_VENDOR_CHIP_INFO, F_OK) == 0) {
copyFile(GPS_VENDOR_CHIP_INFO, concatenatePath(outputDir.c_str(), "chip.info").c_str());
}
dumpLogsAscending(GPS_LOG_DIRECTORY, outputDir.c_str(), 5, GPS_RAWLOG_PREFIX);
dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), 18, GPS_MEMDUMP_LOG_PREFIX);
copyDirectory(GPS_RESOURCE_DIRECTORY, concatenatePath(outputDir.c_str(), "resource"));
return 0;
}

View File

@@ -1,4 +1 @@
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/gps/dump/sepolicy/
PRODUCT_PACKAGES_ENG += dump_gps

View File

@@ -17,6 +17,10 @@ get_prop(hal_gnss_pixel, vendor_gps_prop)
binder_call(hal_gnss_pixel, hal_contexthub_default)
allow hal_gnss_pixel hal_contexthub_service:service_manager find;
# Allow binder to fwk stats.
binder_call(hal_gnss_pixel, fwk_stats_service)
allow hal_gnss_pixel fwk_stats_service:service_manager find;
# Allow connect to gnss service
allow hal_gnss_pixel vendor_gps_file:dir create_dir_perms;
allow hal_gnss_pixel vendor_gps_file:fifo_file create_file_perms;

View File

@@ -30,4 +30,5 @@ allow hal_aidl_radio_ext sysfs_leds:dir search;
allow hal_aidl_radio_ext sysfs_leds:file rw_file_perms;
# legacy/zuma/vendor
allow hal_aidl_radio_ext sysfs_display:dir search;
allow hal_aidl_radio_ext sysfs_display:file rw_file_perms;

View File

@@ -10,7 +10,6 @@ cc_binary {
"-Wall",
"-Wextra",
"-Werror",
"-pedantic",
],
shared_libs: [
"libdump",

View File

@@ -1,19 +0,0 @@
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
cc_binary {
name: "dump_gxp",
srcs: ["dump_gxp.cpp"],
cflags: [
"-Wall",
"-Wextra",
"-Werror",
],
shared_libs: [
"libbase",
"libdump",
],
vendor: true,
relative_install_path: "dump",
}

View File

@@ -1,37 +0,0 @@
/*
* Copyright 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <dump/pixel_dump.h>
#include <android-base/properties.h>
#include <android-base/file.h>
#define maxGxpDebugDumps 4
int main() {
/* TODO(b/277094681): Set default value to false around device beta milestone. */
/* TODO(b/288368306): Create an android property for enabling/disabling
* bugreport collection for gxp */
std::string outputDir = concatenatePath(BUGREPORT_PACKING_DIR, "gxp_ssrdump");
printf("Creating %s", outputDir.c_str());
if (mkdir(outputDir.c_str(), 0777) == -1) {
printf("Unable to create folder: %s\n", outputDir.c_str());
return 0;
}
dumpLogs("/data/vendor/ssrdump/coredump", outputDir.c_str(), maxGxpDebugDumps, "coredump_gxp_");
dumpLogs("/data/vendor/ssrdump", outputDir.c_str(), maxGxpDebugDumps, "crashinfo_gxp_");
return 0;
}

View File

@@ -6,8 +6,5 @@ PRODUCT_PACKAGES += \
gxp_metrics_logger
# GXP C-API library
PRODUCT_PACKAGES += libgxp
# GXP Debug dump.
PRODUCT_PACKAGES_ENG += dump_gxp
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/gxp/sepolicy

View File

@@ -1,20 +0,0 @@
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
cc_binary {
name: "dump_gyotaku",
srcs: ["dump_gyotaku.cpp"],
cflags: [
"-Wall",
"-Wextra",
"-Werror",
],
shared_libs: [
"libbase",
"libdump",
"liblog",
],
vendor: true,
relative_install_path: "dump",
}

View File

@@ -1,36 +0,0 @@
/*
* Copyright 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.
*/
#include <unistd.h>
#include <dump/pixel_dump.h>
#include <android-base/file.h>
#define GYOTAKU_DIRECTORY "/data/vendor/gyotaku/andlog"
#define GYOTAKU_ANDROID_LOG_PREFIX "android_"
#define GYOTAKU_ODPM_LOG_PREFIX "odpm_"
#define maxFileLogsNumber 30
int main() {
std::string outputDir = concatenatePath(BUGREPORT_PACKING_DIR, "gyotaku");
if (mkdir(outputDir.c_str(), 0700) == -1) {
printf("Unable to create folder: %s\n", outputDir.c_str());
return 0;
}
dumpLogs(GYOTAKU_DIRECTORY, outputDir.c_str(), maxFileLogsNumber, GYOTAKU_ANDROID_LOG_PREFIX);
dumpLogs(GYOTAKU_DIRECTORY, outputDir.c_str(), maxFileLogsNumber, GYOTAKU_ODPM_LOG_PREFIX);
return 0;
}

View File

@@ -1,11 +0,0 @@
pixel_bugreport(dump_gyotaku)
userdebug_or_eng(`
# For access and collecting logs into vendor radio type folder.
allow dump_gyotaku radio_vendor_data_file:dir create_dir_perms;
allow dump_gyotaku radio_vendor_data_file:file create_file_perms;
# For access /data/vendor/ folder.
allow dump_gyotaku gyotaku_vendor_data_file:dir create_dir_perms;
allow dump_gyotaku gyotaku_vendor_data_file:file create_file_perms;
')

View File

@@ -1,5 +0,0 @@
# For /data/vendor use
type gyotaku_vendor_data_file, file_type, data_file_type;
userdebug_or_eng(`
typeattribute gyotaku_vendor_data_file mlstrustedobject;
')

View File

@@ -1,4 +0,0 @@
/data/vendor/gyotaku(/.*)? u:object_r:gyotaku_vendor_data_file:s0
# Pixel dump for Gyotaku
/vendor/bin/dump/dump_gyotaku u:object_r:dump_gyotaku_exec:s0

View File

@@ -1,5 +0,0 @@
userdebug_or_eng(`
# For access /data/vendor/gyotaku folder
allow gyotaku_app gyotaku_vendor_data_file:dir create_dir_perms;
allow gyotaku_app gyotaku_vendor_data_file:file create_file_perms;
')

View File

@@ -1,19 +0,0 @@
# Specific build for fingerprint
type gyotaku_app, domain;
app_domain(gyotaku_app)
net_domain(gyotaku_app)
# For Gyotaku app common use
allow gyotaku_app app_api_service:service_manager find;
allow gyotaku_app privapp_data_file:lnk_file read;
allow gyotaku_app system_app_data_file:dir create_dir_perms;
allow gyotaku_app system_app_data_file:file create_file_perms;
# For getproperty isDebuggable use
get_prop(gyotaku_app, userdebug_or_eng_prop)
# For access /data/vendor/misc fingerprint use.
allow gyotaku_app vendor_misc_data_file:dir search;
allow gyotaku_app vendor_fingerprint_data_file:dir r_dir_perms;
allow gyotaku_app vendor_fingerprint_data_file:file r_file_perms;

View File

@@ -1,2 +0,0 @@
# Gyotaku app
user=system seinfo=platform name=com.google.android.apps.internal.gyotaku domain=gyotaku_app type=system_app_data_file levelFrom=all

View File

@@ -1,14 +0,0 @@
ifneq ($(TARGET_BUILD_VARIANT), user)
ifeq (,$(filter aosp_% lineage_%, $(TARGET_PRODUCT))) # Skip aosp target product
PRODUCT_PACKAGES_DEBUG += \
Gyotaku
BOARD_SEPOLICY_DIRS += device/google/gs-common/gyotaku_app/sepolicy/
# Pixel 5a (barbet) does not support Pixel dump
ifeq (,$(filter barbet%,$(TARGET_PRODUCT)))
PRODUCT_PACKAGES_DEBUG += dump_gyotaku
BOARD_SEPOLICY_DIRS += device/google/gs-common/gyotaku_app/dump
endif
endif
endif

View File

@@ -1,5 +0,0 @@
# Specific build for fingerprint
PRODUCT_PACKAGES_ENG += \
Gyotaku
BOARD_SEPOLICY_DIRS += device/google/gs-common/gyotaku_app/fingerprint

View File

@@ -1,28 +0,0 @@
type gyotaku_app, domain;
userdebug_or_eng(`
app_domain(gyotaku_app)
net_domain(gyotaku_app)
# For Gyotaku app common use
allow gyotaku_app app_api_service:service_manager find;
allow gyotaku_app privapp_data_file:lnk_file read;
allow gyotaku_app system_app_data_file:dir create_dir_perms;
allow gyotaku_app system_app_data_file:file create_file_perms;
# For access /proc/fs/f2fs/* storage use
allow gyotaku_app proc_f2fs:dir search;
allow gyotaku_app proc_f2fs:file r_file_perms;
# For access /proc/stat use
allow gyotaku_app proc_stat:file r_file_perms;
# For getproperty isDebuggable use
get_prop(gyotaku_app, userdebug_or_eng_prop)
# For persistent property use
get_prop(gyotaku_app, logpersistd_logging_prop);
# For access hal_power_stats
hal_client_domain(gyotaku_app, hal_power_stats);
')

View File

@@ -1,2 +0,0 @@
# Gyotaku app
user=system seinfo=platform name=com.google.android.apps.internal.gyotaku domain=gyotaku_app type=system_app_data_file levelFrom=all

View File

@@ -1,11 +1,10 @@
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/input/gia/sepolicy
# When not AOSP target
ifeq (,$(filter aosp_%, $(TARGET_PRODUCT)))
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/input/gia/sepolicy
PRODUCT_PACKAGES += gia
PRODUCT_PACKAGES += com.google.input.gia.giaservicemanager
PRODUCT_PACKAGES += gia
PRODUCT_PACKAGES += com.google.input.gia.giaservicemanager
PRODUCT_SOONG_NAMESPACES += vendor/google/interfaces
PRODUCT_SOONG_NAMESPACES += vendor/google/input/gia/core
PRODUCT_SOONG_NAMESPACES += vendor/google/input/gia/core-servicemanager
DEVICE_MANIFEST_FILE += device/google/gs-common/input/gia/aidl/manifest.xml
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/input/gia/aidl/compatibility_matrix.xml
DEVICE_MANIFEST_FILE += device/google/gs-common/input/gia/aidl/manifest.xml
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/input/gia/aidl/compatibility_matrix.xml
endif

View File

@@ -16,3 +16,7 @@ hal_server_domain(gia, hal_gia)
# allow gia for accessing touch related system file-nodes
allow gia sysfs_touch_gti:dir r_dir_perms;
allow gia sysfs_touch_gti:file rw_file_perms;
# allow gia for collecting device stats
allow gia fwk_stats_service:service_manager find;
binder_call(gia, stats_service_server);

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