Commit graph

136 commits

Author SHA1 Message Date
45c1db8716
sdm710-common: Fix adb on LOS Recovery 2024-11-23 16:23:43 +02:00
Yumi Yukimura
5a4fd4769b sdm710-common: Build QTI Thermal 2.0 HAL
Revert 699b06a
Change-Id: Iae471a16a0284cd24a598bac1a3ea0736faceb9f
2024-04-12 09:12:40 +03:00
Ivan Vecera
6552a4f8b7
sdm710-common: rootdir: Do not try to install prebuilt apps
We do not have AdrenoTest.apk or SWE_Browser.apk so it does not make
sense to try to install them.

Change-Id: I0615e2e50526f960d5a6c221798ab5ebd1162d7b
2024-02-10 21:19:19 +02:00
Chenyang Zhong
16ac982064
sdm710-common: rootdir: Switch to lz4 for zram
5.4 kernel defaults to lzo-rle for zram. lzo-rle added run-length
encoding for lzo, which is beneficial to the use case of zram that
often has long runs of zero bytes. However, according to my testing
results, lzo-rle still has lower decompression throughput and higher
access latency compared to lz4. lzo-rle beats lz4 in compression
ratio, but most Xiaomi SM8350 devices have either 8GB or 12GB of RAM
where memory pressure hardly happens. Therefore, lz4's higher throughput
and lower latency is more preferable.

Now that I added LZ4_FAST_DEC_LOOP to the kernel lz4 module from
upstream lz4 1.9.x release, the decompression speed has increased
by another 10%, which leads further ahead lzo-rle.

Test setup:
- Disable swap on zram if it is enabled
  $ swapoff /dev/block/zram0
- If you want to change the comp_algorithm after zram has been
  initialized, reset zram first.
  $ echo 1 > /sys/block/zram0/reset
- Set the comp_algorithm. For example, for lz4
  $ echo lz4 > /sys/block/zram0/comp_algorithm
- Set up zram size
  $ echo 4294967296 > /sys/block/zram0/disksize
- Make the swap
  $ mkswap /dev/block/zram0
- Pre-fill zram with 1GB of real-word zram data dumped previously under
  memory pressure. For example,
  $ dd if=/sdcard/zram.test of=/dev/block/zram0 bs=1m count=1000

Random 4k read:
$ fio --readonly --name=randread --direct=1 --rw=randread --ioengine=psync \
  --randrepeat=0 --numjobs=4 --iodepth=1 --group_reporting=1 \
  --filename=/dev/block/zram0 --bs=4K --size=1000M

lzo-rle: read: IOPS=1547k, BW=6042MiB/s (6336MB/s)(4000MiB/662msec)
lz4: read: IOPS=1646k, BW=6431MiB/s (6743MB/s)(4000MiB/622msec)
lz4 fast dec: read: IOPS=1775k, BW=6932MiB/s (7269MB/s)(4000MiB/577msec)

Sequencial 4k read:
$ fio --readonly --name=zram_seqread --direct=1 --rw=read --ioengine=psync \
  --numjobs=4 --iodepth=1 --group_reporting=1 --filename=/dev/block/zram0 \
  --bs=4K --size=1000M

lzo-rle: read: IOPS=1816k, BW=7092MiB/s (7437MB/s)(4000MiB/564msec)
lz4: read: IOPS=1907k, BW=7449MiB/s (7811MB/s)(4000MiB/537msec)
lz4 fast dec: read: IOPS=2004k, BW=7828MiB/s (8208MB/s)(4000MiB/511msec)

Compression ratio from /sys/block/zram0/mm_stat
lzo-rle: 1048576000 -> 81969152
lz4: 1048576000 -> 86200320

zstd was also considered. It offers really nice compression ratio,
1048576000 -> 59899904, but the throughput and latency are so much
worse than lz4 and lzo-rle. It is probably more suitable for traditional
desktop/server swap setup with less aggressive swappiness value. It can
also help alleviate high memory pressure situation by compressing the
RAM to smaller size.
2024-02-10 21:14:20 +02:00
alanndz
07f15593bf
sdm710-common: rootdir: Report max frequency to miHoYo games
* Reference: 016179b5c5

Signed-off-by: alanndz <alanndz@qmail.id>
Signed-off-by: Sageofd6path <mail2anirban95@gmail.com>
Signed-off-by: firebird11 <hbgassel@gmail.com>
Signed-off-by: Jabiyeff <cebiyevanar@gmail.com>
Signed-off-by: alternoegraha <noegrahachan@gmail.com>
2024-02-10 21:08:27 +02:00
oshmoun
9b31e5251a
sdm710-common: fstab: add encryptable flag for external sdcards
* Starting from Android P, it is possible to use FBE in combination with adoptable storage.

Change-Id: If12c183b20f1c8197f5282d45e94eea26637e3f1
2023-11-28 10:38:09 +02:00
Hridya Valsaraju
8803ff0740
sdm710-common: Set PRODUCT_SET_DEBUGFS_RESTRICTIONS
Starting with Android R launched devices, debugfs cannot be mounted in
production builds. In order to avoid accidental debugfs dependencies
from creeping in during development with userdebug/eng builds, the
build flag PRODUCT_SET_DEBUGFS_RESTRICTIONS can be set by vendors to
enforce additional debugfs restrictions for userdebug/eng builds. The
same flag will be used to enable sepolicy neveallow statements to
prevent new permissions added for debugfs access.

Test: build, boot
Bug: 184381659
Change-Id: I45e6f20c886d467a215c9466f3a09965ff897d7e
2023-11-25 20:35:07 +02:00
Amit Kushwaha
c20eba7afa
sdm710-common: init.qcom.rc: Removing unused setprop persist.camera.gyro.disable
Addressing error :
 avc:  denied  { set } for property=persist.camera.gyro.disable pid=377 uid=0 gid=0
 scontext=u:r:vendor_init:s0 tcontext=u:object_r:default_prop:s0
 tclass=property_service permissive=0\x0a

CRs-Fixed: 2662429

Change-Id: Ibd0ed4646d52d67248ea33940c4463ecdbdefc36
2023-11-25 20:34:13 +02:00
ManshuTyagi
d9a4ac54df
sdm710-common: init: Fix trace error * E cutils-trace: Error opening trace file: No such file or directory 2023-11-21 23:41:07 +02:00
Randall Huang
20869d2170
sdm710-common: fstab: data=journal,commit=1 for /metadata
Since Ext4 doesn't implement "-o sync", it commits metadata at every 5 secs.
This may cause /metadata corruption.

Bug: 162883014
Change-Id: Icd38754bad1b1529d01165ea8c703c214d20bb4b
2023-11-21 20:10:25 +02:00
b2a12a6340
sdm710-common: Update fstab, change logdump path 2023-11-21 20:03:48 +02:00
5d41efd453
sdm710-common: Drop KProfiles
This reverts commit f8e389999a.
2023-11-02 11:21:05 +02:00
TheStrechh
da66a65c9e
sdm710-common: fstab: add recovery label
* KeyError: '/recovery'
2023-10-29 14:57:50 +02:00
Demon000
63c205630e
sdm710-common: init: Add /boot to fstab
Build process errors out without this.

Traceback (most recent call last):
  File "build/make/tools/releasetools/ota_from_target_files", line 2455, in <module>
    main(sys.argv[1:])
  File "build/make/tools/releasetools/ota_from_target_files", line 2429, in main
    output_file=args[1])
  File "build/make/tools/releasetools/ota_from_target_files", line 1103, in WriteFullOTAPackage
    common.CheckSize(boot_img.data, "boot.img", target_info)
  File "/home/aicp-dev/rom/lineage-17.1/build/make/tools/releasetools/common.py", line 1190, in CheckSize
    p = info_dict["fstab"][mount_point]
KeyError: '/boot'

- also reformat and fix some fstab intendation

Change-Id: I30a396ea62e6e48420c0dd41533c156e90032929
2023-10-27 22:30:21 +03:00
Cyzi7777
e1cc9860f7
sdm710-common: Use fstab.qcom for TARGET_RECOVERY_FSTAB 2023-10-27 22:30:21 +03:00
me-cafebabe
29f1905334
sdm710-common: Use logdump as metadata partition and mount at the first stage
* logdump seems to be only contain factory logs which is of 2017 and useless for us.
* It's required for DSU
2023-10-27 22:30:21 +03:00
me-cafebabe
ef2362021f
sdm710-common: Add system_ext product odm partitions 2023-10-27 22:30:20 +03:00
me-cafebabe
ade32dd8dd
sdm710-common: Setup Retrofit Dynamic Partitions 2023-10-27 22:30:18 +03:00
Michael Bestas
28095d1e8a
sdm710-common: ueventd: Remove all permissions from /sys/devices/soc0/serial_number
Change-Id: I688347cfe59f56e4de2e4bf3c3324ca465f7a897
2023-08-15 13:26:52 +03:00
minaripenguin
d59925262e
sdm710-common: rootdir: Pin msm_irqbalance to system-background
Signed-off-by: minaripenguin <minaripenguin@users.noreply.github.com>
2023-06-28 20:23:22 +03:00
Edwin Moquete
90893a90f4 sdm710-common: rootdir: Kang runtime cpuset from crosshatch
Change-Id: Icb4c39fb1f316effde856e1e10e6c19e391fab7d
2023-06-25 23:53:54 +03:00
Arian
23ce77d849 sdm710-common: rootdir: Kang governor settings from crosshatch
Change-Id: Ie6534dcb14bec74105841b2289e29728ee50a3a5
2023-06-25 23:53:54 +03:00
Suren Baghdasaryan
48171eb52c sdm710-common: rootdir: Replace writepid with task_profiles
- 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.

Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Signed-off-by: Karan Parashar <whyredfire@gmail.com>
Change-Id: I0cdf63daa4eb043488a6d0eceb492af36df8882d
2023-06-24 15:13:20 +03:00
Ultra119
baa19dc45f sdm710-common: rootdir: Try vendor.hwcomposer 2.3 too
[    4.526015] init: Command 'start vendor.hwcomposer-2-1' action=post-fs (/vendor/etc/init/hw/init.qcom.rc:85) took 0ms and failed: service vendor.hwcomposer-2-1 not found
2023-06-24 15:13:20 +03:00
Ultra119
bc4a87e62a sdm710-common: rootdir: Cleanup 2023-06-24 15:13:20 +03:00
boedhack99
a54676415e sdm710-common: rootdir: Remove useless nqnfcinfo service
- non-existing

- init: Could not start service 'nqnfcinfo' as part of class
'late_start': Cannot find '/system/vendor/bin/nqnfcinfo': No such file
or directory

Change-Id: I2ded3327ba721f629b7f5ea31d6861fed0e7c6c4
2023-06-24 15:13:20 +03:00
UtsavBalar1231
4da2677223 sdm710-common: rootdir: Add vendor prefix to rmt_storage
* As per the init.qcom.rc service defination has vendor prefix
* This Fixes:
I init    : Command 'start rmt_storage' action=boot (/vendor/etc/init/hw/init.target.rc:161) took 0ms and failed: service rmt_storage not found

Signed-off-by: pri0818 <priyanshusinghal0818@gmail.com>
2023-06-24 15:13:20 +03:00
lupesoltec
7171800754 sdm710-common: rootdir: Remove command 'rm /data/vendor/perfd/default_values'
We don't have this file on the device

* init: Command 'rm /data/vendor/perfd/default_values'
action=post-fs-data (/vendor/etc/init/hw/init.qcom.rc:303) took 1ms and
failed: unlink() failed: No such file or directory

Signed-off-by: lupesoltec <dev@lupesoltec.com.br>
2023-06-24 15:13:20 +03:00
Arturo
83d7e13934 sdm710-common: rootdir: Remove non-existant shmbus
Fixes:
init: Command 'rm /data/vendor/radio/shmbus' action=post-fs-data
(/vendor/etc/init/hw/init.qcom.rc:278) took 0ms and failed: unlink()
failed: No such file or directory

Signed-off-by: Arturo <rtsanonynousperson@gmail.com>
2023-06-24 15:13:20 +03:00
Dede Dindin Qudsy
3e9f3507ee sdm710-common: rootdir: Rename /persist to /mnt/vendor/persist
* Since /persist is just link to /mnt/vendor/persist

* It fixes:
init: Command 'chown root system /persist' action=post-fs-data (/vendor/etc/init/hw/init.qcom.rc:285) took 0ms and failed: lchown() failed: Read-only file system
init: Command 'chmod 0771 /persist' action=post-fs-data (/vendor/etc/init/hw/init.qcom.rc:286) took 0ms and failed: fchmodat() failed: Read-only file system

Signed-off-by: Dede Dindin Qudsy <xtrymind@gmail.com>
2023-06-24 15:13:20 +03:00
pbteja100
9dab9da13d sdm710-common: rootdir: Mount cgroup
init: Command 'mkdir /acct/uid' action=early-init (/system/etc/init/hw/init.rc:30) took 1ms and failed: mkdir() failed on /acct/uid: Read-only file system
2023-06-24 15:13:20 +03:00
Ultra119
74e35f760a sdm710-common: Rootdir: Remove unexported property triggers
[    1.807676] init: /vendor/etc/init/hw/init.qcom.rc: 562: ParseTriggers() failed: unexported property trigger found: init.svc.wpa_supplicant
[    1.807736] init: /vendor/etc/init/hw/init.qcom.rc: 571: ParseTriggers() failed: unexported property trigger found: ro.bluetooth.ftm_enabled
[    1.807826] init: /vendor/etc/init/hw/init.qcom.rc: 598: ParseTriggers() failed: unexported property trigger found: persist.env.fastdorm.enabled
[    1.807940] init: /vendor/etc/init/hw/init.qcom.rc: 663: ParseTriggers() failed: unexported property trigger found: ro.data.large_tcp_window_size
[    1.808160] init: /vendor/etc/init/hw/init.qcom.rc: 809: ParseTriggers() failed: unexported property trigger found: crypto.driver.load
[    1.808191] init: /vendor/etc/init/hw/init.qcom.rc: 819: ParseTriggers() failed: unexported property trigger found: drmdiag.load
[    1.808209] init: /vendor/etc/init/hw/init.qcom.rc: 822: ParseTriggers() failed: unexported property trigger found: drmdiag.load
[    1.808357] init: /vendor/etc/init/hw/init.qcom.rc: 906: ParseTriggers() failed: unexported property trigger found: persist.ims.regmanager.mode
[    1.808381] init: /vendor/etc/init/hw/init.qcom.rc: 909: ParseTriggers() failed: unexported property trigger found: ro.data.large_tcp_window_size
[    1.808484] init: /vendor/etc/init/hw/init.qcom.rc: 956: ParseTriggers() failed: unexported property trigger found: persist.usb.hvdcp.detect
[    1.808504] init: /vendor/etc/init/hw/init.qcom.rc: 959: ParseTriggers() failed: unexported property trigger found: persist.usb.hvdcp.detect
[    1.808693] init: /vendor/etc/init/hw/init.qcom.rc: 1072: ParseTriggers() failed: unexported property trigger found: ro.logdumpd.enabled
2023-06-24 15:13:20 +03:00
Ultra119
5491ffacd3 sdm710-common: init: Reset default schedtune boost value on boot 2023-06-24 15:13:20 +03:00
Ultra119
ebdfcc0f22 sdm710-common: rootdir: Boost performance during bootup
* inspired from google pixels
 * speeds up boot by ~1-2s
2023-06-24 15:13:20 +03:00
Danny Trunk
084ba656ad
sdm710-common: Move ueventd.qcom.rc to /vendor/etc.
This is the preferred location as of Android 12.

Change-Id: Ia7f2b995b870e3c857638c3149ebd18f144b5a95
2023-06-21 14:24:45 +03:00
Cyber Knight
f8e389999a
sdm710-common: Build KProfiles
- Inherit KProfiles.
- Address sepolicy.
- Define sysfs_kprofiles as a domain.
- Fix permission of nodes relevant to KProfiles at boot.

Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
2023-06-21 14:24:45 +03:00
srfarias
a82e5132bb
sdm710-common: add nodes to hide Magisk in banking apps
Some banking apps read the file /proc/net/unix to
find out whether things like Magisk are installed/running.

To prevent that, chmod it 440.
This file isn't needed by any other process when boot is finished.

I've tested this and banking apps that did not work before
and recognized Magisk being installed now don't recognize
that and work just fine.

Signed-off-by: aswin7469 <aswinas@pixysos.com>
Signed-off-by: firebird11 <hbgassel@gmail.com>
Signed-off-by: Master <mhmdeveloperofficial@gmail.com>
Change-Id: I8f4c3ce55fe206786018ffba5e3301c52158a844
2023-06-17 17:03:59 +03:00
Vishalcj17
0565d0dda2
sdm710-common: Change permissions for /dev/diag. * Logs spam with error '-13' which basically translates to access denied/invalid permission.
* Fix this by giving system read and write access.

Before in log:
  Diag_Lib:  Diag_LSM_Init: Failed to open handle to diag driver, error = 13
2023-06-17 17:03:57 +03:00
Fagyi
a76efdd916
sdm710-common: rootdir: add data/vendor/time
QC-time-servicesDaemon:Open File: /data/vendor/time/ats_3
QC-time-servicesDaemon:Unable to open filefor read
QC-time-servicesDaemon:genoff_post_init:Error in accessing storage
2023-06-17 17:03:48 +03:00
Daniel Jacob Chittoor
6c04c44704
sdm710-common: rootdir: Enable suspend to RAM
Improves idle drain considerably.

Change-Id: Iacef170a0f58ec74e6d82b89b3ae5ef60026ed07
Signed-off-by: helliscloser <mrumais@gmail.com>
Signed-off-by: onettboots <blackcocopet@gmail.com>
Signed-off-by: Sageofd6path <mail2anirban95@gmail.com>
2023-06-17 17:03:46 +03:00
theangelofdead01
12a4b9a046
sdm710-common: init: Remove some data cache
fix some string issues on dirty flash update ROM zips

Signed-off-by: saikiran2001 <bjsaikiran@gmail.com>
Signed-off-by: aswin7469 <aswinas@pixysos.com>
Signed-off-by: onettboots <blackcocopet@gmail.com>
Signed-off-by: SageOfD6Path <mail2anirban95@gmail.com>
2023-06-17 17:03:46 +03:00
Arne Coucheron
6c176bb614
sdm710-common: ueventd: Change radio0 permissions to 0644
Since we no longer run FM2 app as system app, we need to change
permissions on /dev/radio0 to avoid failure reading the node when
the FM2 app is run as a platform app.

Change-Id: I172444c2cd08e0113ce07bc4dd629b7bd7c715bb
2023-06-17 17:03:45 +03:00
SVB
ee5418266b
sdm710-common: rootdir: Allow all filesystems for USB-OTG
Change-Id: Ie9cef57485c337c39bae559a71582b4c66127d85
2023-06-17 17:03:44 +03:00
DarkJoker360
8519ba629a
sdm710-common: rootdir: Stop bootanimation service after boot
* Some users reported bootanimation lags and freezes
  after a while. Looking from logs it fails to exit
  once boot is completed. Stopping bootanimation
  service, as workaround, is preventing this issue.

Signed-off-by: improbir <ghosh_probir@yahoo.com>
Signed-off-by: kssrao13882 <kssrao13882@gmail.com>
2023-06-17 17:03:44 +03:00
Nolen Johnson
2c8e7fc2b0
sdm710-common: Remove usage of ro.data.large_tcp_window_size
* Not needed for us.

Change-Id: Ieee6bbbb858c0ee86769cded081fd82f3b9744ef
2023-06-17 17:03:43 +03:00
Murthy Nidadavolu
2c01dc7390
sdm710-common: init.qcom.rc: Removed deprecated drmdiag entry
Eliminate drmdiagapp entries in init scripts. This app was deprecated
hence these entries were causing boot time degradation.

Change-Id: Ia8b14ef200a17b37c393f3e62c7be8849d575c71
2023-06-17 17:03:43 +03:00
Ayishwarya Narasimhan
39aee1a675
sdm710-common: init.qcom.rc: Remove unused property
Remove persist.ims.regmanager.mode
property along with the service
which is unused

Change-Id: I6875dadffa2770d2f4ce19f44ec9b24b08523cc6
2023-06-17 17:03:43 +03:00
9e18e17685
sdm710-common: rootdir: Fixes for power_supply/input_suspend 2023-06-17 17:03:41 +03:00
49e1379986
sdm710-common:init: Add vendor prefix for shell 2023-06-17 17:03:41 +03:00
Ultra119
81ef9dbdc4
Revert "sdm710-common: Nuke AVB from system"
This reverts commit 721db48fac4f308632bc2f1562ec091ddf1c0cca.
2023-06-17 17:03:38 +03:00