Commit graph

2778 commits

Author SHA1 Message Date
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
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
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
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