Commit Graph

155 Commits

Author SHA1 Message Date
LuK1337
6460f75bb9 sm6150-common: init: Add formattable flag for /data fstab entry
Otherwise it results in broken data wipe in recovery.

Change-Id: I42bde849dc872f1d4d282c8bda3a87703c0eeebe
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-05-09 13:48:10 +00:00
Pranav Vashi
c4338f2280 sm6150-common: rootdir: Set up read ahead values properly
* QCOM sets up for dm-0, dm-1 and dm-2 on boot via init.qcom.rc and for sda* via post boot script.
* Also set watermark_scale_factor and watermark_boost_factor basis QCOM recommendation.
* Reduce swappiness to 60.
* Modify configure_read_ahead_kb_values to set nr_requests value.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-05-09 13:48:10 +00:00
Pranav Vashi
1a99a64259 sm6150-common: Setup zram with post-boot script
* This way zram size can be optimized.

Change-Id: Ida4fca8aab88ab5af3dcba166e98cf722bab6614
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-05-09 12:59:14 +00:00
Pranav Vashi
38fd4cd494 sm6150-common: rootdir: Configure buffered background throttling
Change-Id: I13b0677e2654ad40ee966b58b7b4427202af5f79
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-05-09 12:58:21 +00:00
Pranav Vashi
716efc3989 sm6150-common: sepolicy: Allow parts to set haptic intensity
Change-Id: I94774ccf021eb7713b41fc9d5ad6bb6979ca5d95
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-05-09 12:57:52 +00:00
Pranav Vashi
bd4a67d192 sm6150-common: rootdir: Switch to lmkd
Change-Id: Iaa4ac06f35710231f53adff488c211404bf0cd43
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-05-09 12:55:55 +00:00
Pranav Vashi
774f4d6eef sm6150-common: Disable zram writeback
* Disabled on many devices with reports to lagginess in long term and random reboot in some instances.

Change-Id: I73985159766da08cd35b0288db29cfafc7db62b0
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-05-09 12:55:22 +00:00
basamaryan
bc0dc1d83f sm6150-common: rootdir: Remove /data/vendor/dolby on upgrade
This is required after switching to the OnePlus Dolby Atmos stack

Based on:
09e0c6ad23
346519f7f2

Change-Id: I2ac8f83899a0866975aa6cbce26da9670b16843d
Co-authored-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Co-authored-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-05-09 12:44:29 +00:00
timocapa
15474f8b61 sm6150-common: fstab: Fix fsmgr flag for F2FS Compression
- Without this, F2FS Compression would not work as this flag will be passed to recovery at format-time.

Change-Id: I29082d680320cebda6d3c1457318555bb33ba1b7
Signed-off-by: timocapa <timo.capa@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-05-09 12:43:52 +00:00
Panchajanya1999
253f618f87 sm6150-common: fstab: Support F2FS compressions and garbage collector
Partially based on Pixel 6 fstab[1] and personal
recommendations.
F2FS Compression requires kernel support too.

[1]: https://android.googlesource.com/device/google/gs101/+/refs/heads/android12-d1-s4-release/conf/fstab.gs101#20

Change-Id: I319fa4033911e89160308535b626c978d7269805
Signed-off-by: Panchajanya1999 <panchajanya@azure-dev.live>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-05-09 12:43:52 +00:00
Cyber Knight
ad56131883 sm6150-common: Mount EROFS at init for /system
- We don't use EXT4 for /system anymore hence let's mount it appropriately.

Change-Id: Ida90e4be8e36ca5778a4ca7d483ca3586b1f95e3
Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-05-09 12:43:52 +00:00
Cyber Knight
fcbaa25ffd sm6150-common: Switch to EROFS for relevant partitions
- EROFS offers much more compressed partition sizes compared to the likes of ext4 albeit being read-only.
- We have switched to EROFS for /system, /system_ext, /product, /odm and /vendor.
- This patch was inspired by [1].

[1]: 2b52a00408

Change-Id: I438f6b88ede93fe7e5d581439ba630b5c5440a48
Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-05-09 12:43:52 +00:00
feiyuchen
a44403ef4a sm6150-common: rootdir: Add "system" group to Audio HAL
needed for using EdgeTpu.
Due to this code goes to AOSP, please see CL details and test result in
b/289097511#comment24.

Bug: 289097511
Change-Id: Ie0969309346cd85b4bb8ac71860a529710c73345
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-05-09 12:24:43 +00:00
Andy Hung
bc2c53f49c sm6150-common: rootdir: Optimize for Spatial Audio
Add CAP_SYS_NICE.
Allow util_clamp_min for Spatializer Effect worker thread.
Reduce glitches caused by core migration.
Reduce power consumption as Spatializer Effect is DSP compute bound.
This change only affects Spatial Audio Effect processing.

Test: instrumented
Test: adb shell 'uclampset -a -p $(pgrep -of
android.hardware.audio.service)'
Test: adb shell cat "/proc/$(adb shell pgrep -of
android.hardware.audio.service)/status"
Test: adb shell 'ps -Tl -p $(pgrep -of android.hardware.audio.service)'
Bug: 181148259
Bug: 260918856
Bug: 261228892
Bug: 261686532
Bug: 262803152
Merged-In: I59ea99e8a1720f61954747f6c29e14cfea9a0f56
Change-Id: I59ea99e8a1720f61954747f6c29e14cfea9a0f56

Change-Id: I21697423e8c20b34040c5a6641126918b0d75bb5
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-05-09 12:24:43 +00:00
Andy Hung
34020d9682 sm6150-common: rootdir: Enable RT priority inheritance
Test: instrumented
Bug: 181148259
Bug: 260918856
Merged-In: If56e449a9c6f1a49e372591893d8714534574e3a
Change-Id: If56e449a9c6f1a49e372591893d8714534574e3a
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-05-09 12:24:43 +00:00
emilchung
d90e41c1b4 sm6150-common: rootdir: add context_hub into audio hal group
While implementing the capo nanoapp for audio configuration, we met
some chre socket connected error due to the access group denied.

Add context_hub group for audio hal to connect chre socket.

go/capo-algo

Bug: 141128522
Bug: 149069556
Test: FULL build with audio hal part and local prebuilts nanoapp.
Test: Audio HAL communicates normally with CHRE socket.
Change-Id: Iea84411682f4c3e08f8b37a5b21818b0e9b04983
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-05-09 12:24:43 +00:00
Martin Liu
2b0f37ef3c sm6150-common: decrease swappiness to 60
This tweak also aligns the policy with P23.

Test: boots with correct settings
Bug: 299975853
Change-Id: I0ed7088ddf2ff2fa0feca2197e5cc03c7f5c6778
Signed-off-by: Martin Liu <liumartin@google.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-05-09 12:24:43 +00:00
Yumi Yukimura
2f52ae50ef sm6150-common: rootdir: Set ro.boot.hardware.revision property
* The value would be shown on Settings > About phone > Model > Hardware version.

Change-Id: I3a9707597ba01690bdf992e77d7d59d67213bca9
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-05-09 12:24:43 +00:00
Yumi Yukimura
cdd98bc410 sm6150-common: Switch to common QTI USB init scripts
Change-Id: I42864edf1cf554815fa24b12892afd21835d13c7
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-05-09 12:24:43 +00:00
Sebastiano Barezzi
31c2bcd4ca sm6150-common: rootdir: Move from Android.mk
Change-Id: I84413356ca330dd266534f933fe86d2897e9be7e
2024-08-06 14:24:18 +05:30
basamaryan
664dde7f2c sm6150-common: rootdir: Add missing 'vendor.' prefix to cnss-daemon
Missed in 1a7135d93a

Change-Id: I0a47df69637674379ef5e3bd4a95b228e200e269
2024-08-06 12:46:08 +05:30
Sebastiano Barezzi
9a0eaa69db sm6150-common: Partially revert "Move to QTI health AIDL service"
https://github.com/LineageOS/android_system_core/blob/lineage-21.0/init/init.cpp#L1099

This partially reverts commit 53d51eceb1.

Change-Id: I284f80f364e9057a8373a015f0acaee3ef9e395d
2024-07-03 01:49:09 +05:30
Paul Crowley
527f330c63 sm6150-common: Remove wait_for_keymaster and all references
No longer needed now init listens for property changes on a
separate thread.

Bug: 186580823
Test: Cuttlefish boots successfully
Change-Id: Ief3a546d2154231d18957c2f703bd128966d7288
2024-06-24 20:26:46 +05:30
basamaryan
ea5b035f38 sm6150-common: rootdir: Set missing permissions for goodix and fortsense
Change-Id: I9101f164566deff0062fec976f4ddad8ae5c799f
2024-06-22 17:27:09 +05:30
palaych
87c9d011e8 sm6150-common: init: Set permissions for double tap to wake node
Change-Id: I0244ace82cee4b76a93d36624fe94cc78547860e
2024-06-22 17:27:09 +05:30
Sebastiano Barezzi
ce784237a1 sm6150-common: rootdir: Drop debugfs stuff
Missed in I45e6f20c886d467a215c9466f3a09965ff897d7e

Change-Id: I9ec52e8969b20be027e5693637e65eddb99169c9
2024-04-10 13:26:47 -04:00
Prabhanjan Kandula
2efa487655 sm6150-common: rootdir: Avoid delay for vblank disable from DRM
Set drm_vblank_offdelay parameter to -1, to make DRM
issue the vblank disable immediately with out delay.
By defailt  the DRM framework has a delay of 5 secs
timeout before issuing the vblank disable.

Change-Id: Idc1dfe6a6994f2ac2d3c60ae8fd5a4e883b675d9
2024-04-10 13:26:47 -04:00
Suren Baghdasaryan
4395b79e9f sm6150-common: Replace writepid with task_profiles command for cgroup migration
writepid command usage to join a cgroup has been deprecated in favor
of a more flexible approach using task_profiles. This way cgroup path
is not hardcoded and cgroup changes can be easily made. Replace
writepid with task_profiles command to migrate between cgroups.

Bug: 191283136
Test: build and boot
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ibb56d2379c42e5ed4b2f15c1b04d5fb163b48678
2024-04-10 13:26:46 -04:00
Suren Baghdasaryan
32aba0f3bb sm6150-common: Replace direct pid writes with setting task profiles for audio interfaces
For easy transition from SchedTune to UtilClamp, direct access to these
cgroups should be abstracted by using task profiles. Replace writepid
commands with new task_profiles command.

Bug: 155419956
Test: change .rc file and confirm task profile is applied
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ide373c283359cf4b73af4cb0813d8c0306942595
2024-04-10 13:26:46 -04:00
Rick Yiu
d8e35a1cd3 sm6150-common: Remove some camera-daemon commands
Those commands have moved to init.rc.

Bug: 170507876
Bug: 171740453
Test: build pass
Change-Id: Icfe520e7f7367461607cc8fb5e524d9699e79124
2024-04-10 13:26:46 -04:00
Bruno Martins
53d51eceb1 sm6150-common: Move to QTI health AIDL service
The health AIDL HAL service provides functionalities of charger,
therefore system charger at /system/bin/charger is deprecated.
On top of that, QTI health AIDL HAL service enables suspend by
default, the equivalent of setting ro.charger.enable_suspend
for legacy charger.

Change-Id: I59c23e7974cea1174b0161f31a535fa3afa1e5c9
2024-04-10 13:26:46 -04:00
basamaryan
a0cab74d88 sm6150-common: rootdir: Fix PowerOffAlarm
* As seen on sweet MIUI V14.0.7.0.TKFMIXM

Change-Id: I5d4e6f515d52290463d4f46882ec771fba7049b1
2023-11-06 03:52:06 -05:00
Arian
10425fe8d7 sm6150-common: rootdir: Add metadata to recovery.fstab
This is necessary for it to be formatted on factory reset

Change-Id: Id859d8ab16c64a1a174aa11ed73379f2c5d7f370
2023-08-21 14:44:52 +02:00
LuK1337
c919ac7971 sm6150-common: rootdir: Set no_sehash_xattr on /mnt/vendor/persist
Change-Id: I070b1e41978aa80eb64b536ab635e9f38a2413c3
2023-08-20 18:47:33 +02:00
Michael Bestas
630f539308 sm6150-common: Build Lineage Health HAL
Change-Id: I70cc903a03ac9fa3303bb8fa039c9de4806449bf
2023-08-20 18:47:33 +02:00
Michael Bestas
4bc7f3e65f sm6150-common: ueventd: Remove all permissions from /sys/devices/soc0/serial_number
Change-Id: I688347cfe59f56e4de2e4bf3c3324ca465f7a897
2023-08-20 18:47:33 +02:00
Michael Bestas
07d61f1855 sm6150-common: Implement xtra-daemon control via property
Default to false if the property is not set.
Device init scripts will need to be adapted to restart
loc_launcher service when property change is detected.

Change-Id: Icbda789cd2a9a3391f437af2c07fc5127f2f09ab
2023-08-20 18:47:33 +02:00
basamaryan
8a68a965a3 sm6150-common: rootdir: Add sdcard1 and usbotg mount to recovery.fstab
Change-Id: Iaed4a828990a40eef1f13150c135d65ff9be1e25
2023-08-20 18:47:33 +02:00
raghavt20
43a2d997bf sm6150-common: rootdir: Remove vbmeta_system from fstab
Change-Id: I58f63641293e92a916bfcf64b9c8056f81416d19
Signed-off-by: raghavt20 <raghavt20@aospa.co>
2023-08-20 18:47:33 +02:00
Arian
e31a6e10d3 sm6150-common: rootdir: Check persist
Change-Id: Ifc66f4ff386ef3fd01eb10ebe7d105ff9f18127b
2023-08-20 18:46:58 +02:00
Arian
21d67b2b71 sm6150-common: rootdir: Drop zram from fstab.default and fstab.emmc
Change-Id: I54b163080471679be0f4b58e0e49d0a48b597cd8
2023-08-20 18:46:58 +02:00
Arian
650cb7d952 sm6150-common: rootdir: Add odm to fstab
Change-Id: I978f2549da6f213ca765577bf8f0a9ac6f8394cc
2023-08-20 18:46:58 +02:00
Arian
da59885981 sm6150-common: rootdir: Import dynamic non-ab fstabs from LA.UM.9.1.r1-13500-SMxxx0.QSSI13.0
Change-Id: Ib54d1fa04bbc57ec432c0e21cc90d04051321564
2023-08-20 18:46:58 +02:00
Arian
dc321889fb sm6150-common: rootdir: Don't specify fstab path unnecessarily
Change-Id: Ide70285090048630a89dc5ae425f9b548c072d0a
2023-08-20 18:46:58 +02:00
Arian
19e23767df Revert "sm6150-common: Force restorecon for /mnt/vendor/persist"
This reverts commit a13246a7fc.

This causes dac_override denials, set no_sehash_xattr on persist
in fstab instead to fix the issue.

Change-Id: I75f824d5b2beca5f7c3835045a7f568736e148f0
2023-06-05 11:38:04 +02:00
Gagan Malvi
0d51b5d042 sm6150-common: rootdir: Set up fingerprint nodes for phoenix.
Change-Id: If73a8a3dd917b625fbed863f81816ec11989e9f7
Signed-off-by: Gagan Malvi <malvi@aospa.co>
2023-06-05 11:38:04 +02:00
danielml
84cbd43575 Revert "sm6150-common: parts: Enable doze_status on screen off"
* Manually setting the doze status before entering the low-power mode
  makes the doze mode not to be set correctly on sweet.

* The doze status is automatically set when entering the low-power mode

This reverts commit 10f101e143.

Change-Id: I4dfee2ffb351b9bc426268e437a26f9eaefec319
2023-06-05 11:38:04 +02:00
Georg Veichtlbauer
016949aaa4 sm6150-common: Remove max ZRAM compression streams setting
Kernels >4.7 will create a comp stream for each online CPU
and ignore /sys/block/max_compression_streams. This has been
backported to many 4.4 kernels as well.

Any device running a kernel with the upstream commit can safely remove
the parameter.

Upstream commit: 43209ea2d1

Change-Id: Ibb29b54a31f0fb5bd941d7709d15d571dd77ebf5
2023-06-05 11:38:04 +02:00
Alexander Koskovich
587bd40505 sm6150-common: init: Don't mount TraceFS twice.
* AOSP already mounts TraceFS in system init, so mounting it twice
   causes SEPolicy denials. See the comments in this change.

   https://android-review.googlesource.com/c/platform/system/sepolicy/+/1294195

Change-Id: Ic5d9ac2dbd36e404a93a8d48aa0ea933fd7fa701
2023-06-05 11:38:04 +02:00
Noonlord
b670e7124d sm6150-common: rootdir: Setup file permissions for fpc
* These are used by courbet/surya/sweet

Change-Id: I605f305ab30fdbc3dd0a3afc6375cd039e5e8117
2023-01-17 07:01:07 +00:00