127 Commits

Author SHA1 Message Date
Brock5555
2abc0a364d
sm6250-common: rootdir: Enable qcrild & data services on boot
Fixes lag on getting network service after boot.

Change-Id: I0f7cd9df2a103070b3569a610cc391c54f6e3048
2021-09-09 18:46:10 +02:00
Volodymyr Zhdanov
de4430798e
sm6250-common: rootdir: Override hwcomposer service
* CAF ¯\_(ツ)_/¯
* See https://source.codeaurora.org/quic/la/platform/hardware/interfaces/commit/?id=73a427f95e231a46c2274d51abfec21bd2d316f1

Change-Id: Iae755d16e5d5f70d372112bcbbac8e71d8df1124
2021-09-09 18:46:10 +02:00
Volodymyr Zhdanov
b6f59d3316
sm6250-common: rootdir: Don't enable a2dp offload from rootdir
* this breaks a2dp toggle

Change-Id: I20335149e99a48c7ff8219f94d7a6280e49d7f58
2021-09-09 18:46:09 +02:00
Volodymyr Zhdanov
836bc2c0a3
sm6250-common: rootdir: Remove service for unused wigignpt
Change-Id: I08c9e6e30aee9b606982e10b0a78515475cd3597
2021-09-09 18:46:09 +02:00
Randall Huang
835a05445a
sm6250-common: Enable ZRAM-writeback job
This patch enables zram-writeback job. It will run idle marking
at 60m since the device is boot. After that, it will do first
writeback after 3hour to sweep initiallized cold pages out.
After that, it periodically write out every 24hour.

Bug: 117682284
Bug: 127185055
Test: confirm with manual testing

Signed-off-by: Randall Huang <huangrandall@google.com>
Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I6b8f537faf2ffff1a93170aad763f2be4dcaba42
2021-09-09 18:46:09 +02:00
Albert I
23d6c382f2
sm6250-common: fstab: Handle avb= fs_mgr flags correctly
Specifying avb=<vbmeta-partition> is only necessary for first entry of
partition groups that use same vbmeta partition. The following entry can have
<vbmeta-parititon> part omitted.

Test: None
Link: https://source.android.com/devices/architecture/kernel/mounting-partitions-early#fstab-entries
Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I5a42fd3de72c400acfae56d6a1e1b85c22a79537
2021-09-09 18:46:09 +02:00
Albert I
b09005f206
sm6250-common: Configure zRAM using fstab
* "32-bit overflow" CAF mentioned in the function wrapper inside post-boot
  script sounds very bs, since if it's 64-bit it won't be affected anyways

* We do the setup using fstab instead to allow setting up more flags such
  as setting up backing device and compression streams; as such kanged from
  Pixels

* zRAM size = 50% physical memory size to satisfy what CAF really wants

* Use LZ4 compression even for regular devices

Signed-off-by: Albert I <kras@raphielgang.org>
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Change-Id: Ia6efb3d28e56fb026d9b28fc6633b2eac77dfa47
2021-09-09 18:46:08 +02:00
Alexander Winkowski
0d8f538cbf
sm6250-common: Add encryption props
* miatoll devices were launched with API level 29.

Link: https://source.android.com/security/encryption/metadata
Change-Id: I21a4e3760ca7b992f32df48f0ca5595d67f4a15b
2021-09-09 18:46:08 +02:00
Alexander Winkowski
8f749ee764
sm6250-common: Import keymaster 4.1
Change-Id: Icf63153b7d3f3e68adfed1c7f9cc3af21eda6d61
2021-09-09 18:46:08 +02:00
Alexander Winkowski
f1b745f78f
sm6250-common: fstab: Enable new encryption flags
* From mojito-user 11 RKQ1.201022.002 V12.5.2.0.RKGMIXM release-keys

Change-Id: I63c3e85ec90af17b3c9b40acd30d1458da7eac0a
2021-09-09 18:46:08 +02:00
Alexander Winkowski
e9ddd276cb
sm6250-common: fstab: Add UFS sysfs path
Change-Id: I3b0a34c75ca391f84830640d3c2adab717040a42
2021-09-09 18:46:07 +02:00
Demon000
0adcfcde85
sm6250-common: rootdir: 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'

Change-Id: I30a396ea62e6e48420c0dd41533c156e90032929
2021-09-09 18:46:07 +02:00
Adam Shih
5cf344ba4d
sm6250-common: rootdir: Remove sdcard legacy support
[    1.667218] audit: type=1400 audit(1804301.953:5): avc:  denied  { write } for  pid=507 comm="init" name="/" dev="tmpfs" ino=17273 scontext=u:r:vendor_init:s0 tcontext=u:object_r:tmpfs:s0 tclass=dir permissive=0
[    1.667362] init: Command 'symlink /sdcard /mnt/sdcard' action=vendor.skip.init=0 && init (/vendor/etc/init/hw/init.sm8150.rc:87) took 1ms and failed: symlink() failed: Permission denied
[    1.669181] init: Command 'symlink /sdcard /storage/sdcard0' action=vendor.skip.init=0 && init (/vendor/etc/init/hw/init.sm8150.rc:88) took 1ms and failed: symlink() failed: Read-only file system

Bug: 131295392
Test: modify rc file, push to device and find error log gone
Change-Id: I24b6f5ac58159a1172a286eb680ded326c7319f9
(cherry picked from commit b1a63f1a7a99fb6c5a526c73426cab0bbf29a352)
Signed-off-by: Jason(HeWei) Sung <jasonsung@google.com>
2021-09-09 18:46:07 +02:00
orgesified
95a05c717d
sm6250-common: rootdir: Remove useless mkdir commands
init    : Command 'mkdir /firmware 0771 system system' action=early-init (/vendor/etc/init/hw/init.target.rc:31) took 0ms and failed: Not a directory on /firmware
init    : Command 'mkdir /bt_firmware 0771 system system' action=early-init (/vendor/etc/init/hw/init.target.rc:32) took 0ms and failed: Not a directory on /bt_firmware
init    : Command 'mkdir /dsp 0771 media media' action=early-init (/vendor/etc/init/hw/init.target.rc:33) took 0ms and failed: Not a directory on /dsp

Signed-off-by: orgesified <me@orgesified.ml>
Change-Id: I129f6fd9210076fffa1912e3dd6dcec32bd5acf6
2021-09-09 18:46:06 +02:00
Ethan Chen
09ab0b4905
sm6250-common: rootdir: Remove bogus tombstone directory directives
* /data/tombstones and /data/vendor/tombstones are both created by
  the system's init.rc.
* Creating /tombstones at the root isn't allowed since the root is
  a ramdisk and mounted read-only.

Change-Id: I04586994280ae48f36542f56e1cace422943376b
2021-09-09 18:46:06 +02:00
Alexander Winkowski
94c1f3209c
sm6250-common: rootdir: Configure cpusets on init
This should be done earlier:
libprocessgroup: Failed to open /dev/cpuset/camera-daemon/tasks: No such file or directory: No such file or directory
libprocessgroup: Failed to apply CameraServiceCapacity task profile: No such file or directory

Change-Id: I9edbdad2e764667a4624b181e0426f14ed9be616
2021-09-09 18:46:06 +02:00
Alexander Winkowski
df538ecabc
sm6250-common: rootdir: Update USB controller configuration
* For USB init scripts from vendor/qcom/opensource/usb/etc

Change-Id: Ia77c3271cc5f81230c6028b6340fdecf21412532
2021-09-09 18:46:06 +02:00
UtsavBalar1231
cd444b3f63
sm6250-common: rootdir: Cleanup Xiaomi's derp
E ueventd : /vendor/ueventd.rc: 418: Invalid section keyword found

Change-Id: I418720d35c74bd2d96ef0f68a590900a06bf7a32
2021-09-09 18:46:05 +02:00
UtsavBalar1231
e9af1ad77a
sm6250-common: rootdir: Properly label /sys/kernel/qvr_external_sensor/fd
E ueventd : /vendor/ueventd.rc: 175: /sys/ lines must have 5 entries

Change-Id: Ib614f778f734da76b3fbe07615f9323058c8631e
2021-09-09 18:46:05 +02:00
Alexander Winkowski
77999ac063
sm6250-common: Clean up rootdir
* Remove unused/duplicated parts
* Make changes to do without other scripts

Co-authored-by: Demon000 <demonsingur@gmail.com>
Change-Id: I8e758337488dc19ecb47ec1b583fba33ef05882d
2021-09-09 18:46:05 +02:00
Alexander Winkowski
4a2375f2bc
sm6250-common: rootdir: Import rootdir files
* From curtana-user 11 RKQ1.200826.002 V12.0.4.0.RJWMIXM release-keys

Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Change-Id: Ibcf71853e6d45b4ca6948f5267f2af26bf8b812a
2021-09-09 18:46:05 +02:00
Demon000
0b5ac18f5f
sm6250-common: Slim up filesystem configuration
Remove deprecated symlink directories, and remove
services that are not present in our system or vendor.

Change-Id: Ia07d472657f1303bf3ee1b8da36ac43ecc218d17
2021-09-09 18:46:05 +02:00
David Ng
e5bcbf6389
sm6250-common: Add common config.fs AID/fs configuration file
Common config.fs/$TARGET_FS_CONFIG_GEN AID/fs configuration
file for all chipset inheriting from base.mk.

Since legacy device-specific android_filesystem_config.h and
config.fs do not co-exist, temporarily include config.fs only
if legacy file is absent.  Once all legacy, device-specific
files have been deleted, config.fs can be made unconditional.

Change-Id: Ie100d0cd9db808b82d99be7139f0709390c7f3a2
2021-09-09 18:46:04 +02:00
Lokesh Gidra
f7ff168a1d
sm6250-common: Use 4GB dalvik-heap config
Change-Id: I086d4a5c09634c3c7bd51ec5d08dcaa1551511b4
2021-09-09 18:46:04 +02:00
Bowgo Tsai
b02c31e6de
sm6250-common: Adding GSI keys
Bug: 112293933
Test: build and checks the keys are installed into ramdisk
Change-Id: I216f3900e9511e0929418af050ff964898d0aea1
2021-09-09 18:46:04 +02:00
Jiyong Park
27d0288422
sm6250-common: Add updatable_apex.mk
The product abstracts configs that need to be set to support updating of
APEXes.

Bug: 130418467
Test: m
Test: adb shell getprop ro.apex.updatable in Pixel 2 and 3
Test: adb shell /system/apex/com.android.apex.cts.shim.apex exists.
Change-Id: Id5aa944ceba6a6846308f1c18a08af8b3bb38589
2021-09-09 18:46:04 +02:00
Daniel Rosenberg
51d80eea83
sm6250-common: Enable casefolding support on userdata
This enables casefolding, which is required for removal of sdcardfs.

Test: Wipe data and boot. lsattr /data/media, check for +F
Bug: 138322712
Change-Id: I020aa6bb9c121e7bda83c07bc9fb37dcfa26702c
2021-09-09 18:46:04 +02:00
Danny Baumann
9efa3201da
sm6250-common: overlay-lineage: Enable call recording
Change-Id: I1b4478b330b13cf5d0fe1ed0d40f43e4b3825f33
2021-09-09 18:46:03 +02:00
Sebastiano Barezzi
f8dbf9cedf
sm6250-common: overlay-lineage: Snap: Enable camera API v2
Change-Id: I3b3bb8a9485883f577b6fb47affa3345e55a6f30
2021-09-09 18:46:03 +02:00
Sebastiano Barezzi
8da899036a
sm6250-common: Initial lineage-sdk overlays
Change-Id: I2aaa0c06b23b40aac120c325ce15fb0992463520
2021-09-09 18:46:03 +02:00
kdrag0n
5da641c4ce
sm6250-common: overlay: Don't pin camera app in memory
The default camera app can be *huge* in some cases, e.g. when the app in
question is Google Camera. The system will only pin up to the first 80
MiB of the APK file, as well as the first 80 MiB of its odex. There are
several problems with this:

  - We could easily end up with 160 MiB of camera app files pinned,
    which is a tall order with the usable RAM that we have
  - The data that gets pinned may not even be the most critical data for
    launching the camera

Let's disable pinning of the camera app to save precious RAM on this
device.

Change-Id: Ic2f9edd811879e3f18876a508273a9544d8a23e0
2021-09-09 18:46:03 +02:00
Jesse Chan
b132da2af9
sm6250-common: overlay: configure SQLite to operate in MEMORY mode
This change yields considerable SQLite performance gains. It
should be generally safe as this device has irremovable battery.

Some OEMs have been doing this for years.

Change-Id: I541709fc771d4b501b56b8555e5e8a04486d0293
2021-09-09 18:46:02 +02:00
Jody Yuantoro
72d90a6218
sm6250-common: overlay: Set navigation gestures as default
Change-Id: I6b321cc0eff8869ce78cac843ddadfb73abe41f2
2021-09-09 18:46:02 +02:00
Sebastiano Barezzi
46e33f7d4a
sm6250-common: Import CarrierConfig from CAF
* From LA.UM.9.12.r1-10300-SMxx50.0

Change-Id: Iac0ff2be55bb3b8a942e450010bf90776a6c5733
2021-09-09 18:46:02 +02:00
Sebastiano Barezzi
a2f4c15be9
sm6250-common: Initial AOSP overlay
[dereference23: Take values from curtana-user 11 RKQ1.200826.002 V12.0.4.0.RJWMIXM release-keys]
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Change-Id: I4153efdbd5ac95a32607d8aba1b6bbbdb02765c0
2021-09-09 18:46:02 +02:00
Anton Hansson
9ba5b04e9e
sm6250-common: Enforce RRO for all resource overlays
Bug: 118823052
Test: make
Change-Id: I579d09480c7a482543ea616dd5c493d825bb98b1
2021-09-09 18:46:01 +02:00
Sebastiano Barezzi
11d02d6e69
sm6250-common: Don't build full super image
Change-Id: I39e86181c3b57f614b61b339f0114100477862de
2021-09-09 18:46:01 +02:00
Demon000
f56698ed12
sm6250-common: Add miatoll to guard
Change-Id: Iea179e6d66a2f4d5cf7bea95fb493e2f15eb7b68
2021-09-09 18:46:01 +02:00
Volodymyr Zhdanov
99341ccae3
sm6250-common: Create EGL symlinks
Change-Id: Ia64d2c99e325eac217bb9065baa74f903b367a8e
2021-09-09 18:46:01 +02:00
Demon000
39c08b25c0
sm6250-common: Create wlan firmware symlinks
Change-Id: I0a6411de1559c73899c3a1b0e9247b2a69b94d7a
2021-09-09 18:46:01 +02:00
Bruno Martins
fa6e11d307
sm6250-common: Create RFS symlinks
Change-Id: Ica1d4a9893f526ab98c5ef07e18d51dbf74c8e93
2021-09-09 18:46:00 +02:00
Ameya Thakur
c0bbe5c117
sm6250-common: Generate non-hlos image mount points for A/B builds
On builds where A/B support is enabled the system image acts as the
rootfs. In this case we can no longer create the non-hlos image mount
points at run time as we used to. We now create them as part of the
build itself.

Change-Id: I30d98f7c50fca3ce7117b9b8d87150655bb5b440
2021-09-09 18:46:00 +02:00
Demon000
355171ab53
sm6250-common: Add root makefile
Change-Id: I5e301c7e5441be2b1745f9c5b137168dad49bdcb
2021-09-09 18:46:00 +02:00
Demon000
3e433303bf
sm6250-common: Inherit proprietary blobs
Change-Id: Ib182c1a70449097e332c1233c7909fc419b65091
2021-09-09 18:46:00 +02:00
Alexander Winkowski
cfc53b22ad
sm6250-common: Initial proprietary files list
Co-authored-by: Demon000 <demonsingur@gmail.com>
Co-authored-by: Volodymyr Zhdanov <wight554@gmail.com>
Change-Id: I6b303f4a276d67b1264877d290041b6b6a9d27d4
2021-09-09 18:46:00 +02:00
Shivaprasad Hongal
5c18a2d726
sm6250-common: avb: Compile recovery image as a chain partition
Add AVB flags to compile recovery image
as a chained partition. This is required
for safe OTA when multislot support is
not present.

Change-Id: I1115eba4038e6fcaa61440846a25861366996ed4
Signed-off-by: Volodymyr Zhdanov <wight554@gmail.com>
2021-09-09 18:45:59 +02:00
Nolen Johnson
8b15fb7dae
sm6250-common: Simplify AVB flag logic
* AVB's `--flags 3` argument builds a disabled VBMeta with
  disabled hashtree, so no need to set both flags individually.

Change-Id: Ibe9ee322a5af58f13e76d53e18dee49451fe8838
2021-09-09 18:45:59 +02:00
Christian Oder
c9394889aa
sm6250-common: Build disabled VBMeta image
Partitions that use vbmeta_system can be found by looking at
avb flag in fstab from boot ramdisk.

--flags 2 makes the verification function of avb always return a
positive result.

--set_hashtree_disabled_flag builds the vbmeta images with the
HASHTREE_DISABLED bit set and as a result they don't need to manually
disable dm-verity via e.g. 'adb disable-verity'.

The rest of the configuration is taken from
https://source.android.com/devices/tech/ota/dynamic_partitions/implement#avb-configuration-changes

Change-Id: I381feef8f6fefc8449ca50d85d704b67bcc8a77e
2021-09-09 18:45:59 +02:00
Demon000
aab5ab4811
sm6250-common: Include qcom sepolicy
Change-Id: Iaf54a187cda5e6921b791031fa2132a91a62d184
2021-09-09 18:45:59 +02:00
Demon000
86f966abab
sm6250-common: Define security patch level
Can be found by checking the value of ro.vendor.build.security_patch
on stock.

Change-Id: I1d4a8bb4a5b6fdb4d1213fab0ea5e19eb7904ff7
2021-09-09 18:45:59 +02:00