Commit graph

41 commits

Author SHA1 Message Date
Shirayuki39 c3b528e171 LG8n: BoardConfig: Use appropriate security patch level
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:43:46 +08:00
dmpstr 4d34381fc1 LG8n: Set SELinux as permissive
`"The device knew the system wouldn't boot with an enforcing kernel, so it switched it out for a permissive kernel"`
`- april (fzr850)`
2024-05-24 09:35:44 +08:00
dmpstr f01add7d7e [DNM] LG8n: Make SELinux enforcing 2024-05-24 09:14:45 +08:00
SebaUbuntu 5a2f3338cf LG8n: Reboot to recovery if init fails 2024-05-24 08:51:28 +08:00
aubrey 94b614a667
LG8n: Switch CPU runtime variant to cortex-a76 2024-05-24 08:39:14 +08:00
Shirayuki39 0daf260f2a LG8n: let's restart from scratch, part 1 2024-05-22 20:40:46 +08:00
Dan Pasanen 2410f428e1 X6833B: Reserve additional space on system/system_ext/product
Co-authored-by: Alessandro Astone <ales.astone@gmail.com>
Co-authored-by: Eamon Powell <eamonpowell@outlook.com>
Co-authored-by: LuK1337 <priv.luk@gmail.com>
Co-authored-by: Michael Bestas <mkbestas@lineageos.org>
Co-authored-by: Nolen Johnson <johnsonnolen@gmail.com>
Co-authored-by: razorloves <razorloves@gmail.com>
Change-Id: I0382f5070751ef4d1be0e48bb89c7abb7eba22c6
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-26 09:14:29 +07:00
Woomymy c3de457ad8 X6833B: Switch system, system_ext and product to ext4 on non-gms builds
* Makes gapps installation possible, while keeping vendor and
  vendor_dlkm read-only

Signed-off-by: Woomymy <woomy@woomy.be>
Change-Id: I84eecbf5237d878eff8c368f7ab9bd16b45e46e7
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-26 09:14:29 +07:00
dodyirawan85 ba2741e9eb X6833B: Define tap to wake node
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-26 09:14:11 +07:00
Arian 440e178dcb X6833B: Add power HAL extension and use xiaomi-touch to handle dt2w
Change-Id: I5c65e0df255853eb2b3018a27ceb807c111bc4df
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-26 09:14:11 +07:00
Sebastiano Barezzi 8739c09edc X6833B: Enable vendor RIL service
* We use Mediatek's RIL implementation

Change-Id: I8ca9fcf2afd335ca8f9c7901efa74cddae34708f
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-26 09:14:11 +07:00
dodyirawan85 9b5848a12c X6833B: Configure offline charging
Refs:
436747685d
0951b5b378

Co-authored-by: bengris32 <bengris32@protonmail.ch>
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-26 09:13:59 +07:00
Woomymy f5223e0f35 X6833B: Install all modules to vendor
Signed-off-by: Woomymy <woomy@woomy.be>
Change-Id: Ife7242c9e3e733436739aa94ed2fb359a316177c
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-26 09:13:09 +07:00
bengris32 8551890ccc X6833B: Switch to prebuilt libwifi-hal
* Reference: https://github.com/moto-common/android_device_mediatek_common/tree/master/vendor/wlan

* Perhaps it will help with the Wi-Fi scanning issues,
  and intermittent disconnections we're having. Besides,
  we can't legally use the OSS one anyway.

Change-Id: I9bbf289ad88a12bbdc68ab0abdee410678bf1420
Co-authored-by: electimon <electimon@gmail.com>
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-26 09:11:18 +07:00
dodyirawan85 5a3219062d X6833B: Configure Wi-Fi stack
Refs: c0fb62cdc9

Co-authored-by: bengris32 <bengris32@protonmail.ch>
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-26 09:11:17 +07:00
dodyirawan85 5ca665b1a5 X6833B: Configure Display Stack
* Reference
  cbfb355770
  https://github.com/xiaomi-mt6789-devs/android_device_xiaomi_yunluo/tree/lineage-20 (Lib symlinks)

Co-authored-by: electimon <electimon@gmail.com>
Co-authored-by: bengris32 <bengris32@protonmail.ch>
Co-authored-by: Woomymy <woomy@woomy.be>
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-26 09:03:04 +07:00
dodyirawan85 17b307a980 X6833B: Import device manifest from stock
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-26 08:57:51 +07:00
dodyirawan85 673758727a X6833B: Define screen density
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:45 +07:00
Woomymy 23230d0990 X6833B: Install generated kernel headers from X6833B-kernel
* When generating kernel includes, lineage's generator was using kernel
  source from kernel/infinix/x6833b. Use kernel headers generated by the
  kernel build system instead (kernel-headers.tar.gz) and a Makefile to
  copy them during `make headers_install`.

Signed-off-by: Woomymy <woomy@woomy.be>
Change-Id: I2c3972604822ce89201d8a317292cd045e77c705
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:45 +07:00
dodyirawan85 ac8af3424c X6833B: Allow duplicate and copy prebuilt elf rules
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:45 +07:00
dodyirawan85 e088d86d5d X6833B: Configure odm_dlkm partition
* Also reorder `AB_OTA_PARTITIONS` and `BOARD_MTK_DYNAMIC_PARTITIONS_PARTITION_LIST`  list while we're at it

Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:45 +07:00
Woomymy 163424c5da X6833B: Add system_ext to dynamic partitions
Signed-off-by: Woomymy <woomy@woomy.be>
Change-Id: Ia7fb66843e67e131e0368b2d3c7c678eb5f29994
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:44 +07:00
bengris32 41204d107a X6833B: Build VBMeta image with --set_hashtree_disabled_flag
* This is equivalent to building with --flags 1, which just
  disables hashtree verification. This is enough for the bootloader
  to pass "androidboot.vbmeta.device_state=unlocked androidboot.veritymode=disabled"
  in the kernel command line, which is what we wanted this entire time.

* As explained in an earlier commit, any image with flags 3 will cause
  the bootloader to totally break, which is why we must use flags 1
  instead. Besides, flags 1 does exactly what we want it to now.

* PS: MediaTek fix your stupid bootloader

Change-Id: I7b9e5f7181f1b861bb416329ad90725fd6ec2c39
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:44 +07:00
bengris32 f744f4b3cf X6833B: Re-configure AVB flags to match stock
* We have a very, very broken bootloader. LK is extremely
  fussy about our AVB setup, and if either --flags 3 is set
  (hashtree verification disabled), or the wrong AVB algorithm
  is used, it will cause the bootloader to crash shortly after
  loading the boot image, which can be seen from the bootloader logs:

* [1111] [avb] img_auth_required = 0
  [1116] invalid pubk size
  [1116] avb_slot_verify.c[1116] :[1116] 851[1116] : ERROR: [1116] vbmeta_a[1116] : Public key used to sign data rejected.
  [1370] [AVB20] malloc: heap size not enough
  [1370] avb_util.c[1370] :[1370] 224[1370] : ERROR: [1370] Failed to allocate memory.
  [1370] [avb] boot/recovery vfy time = 270 ms
  [1370] mblock_create mblock start: 0xb0c00000 size: 0x8c00000 name: avb
  [1371] [avb] avb_ret = 1
  [1371] [avb] ret = 0
  [6694] panic (caller 0x4822b7f1): ASSERT at (platform/common/boot/boot_info.c:616): g_boot_info.hdr_loaded

* Re-enable hashtree verification and match the AVB algorithm
  with what MediaTek does on stock. Also create vbmeta images
  for system, product and vendor partitions since that is done
  as well. Use test keys for signing to make our lives easier.

* Also change BOARD_AVB_RECOVERY* to BOARD_AVB_BOOT*, AVB
  recovery flags are no-ops on A/B devices since the recovery
  ramdisk is in the boot image, so we should be enabling
  chained vbmeta for boot instead.

Change-Id: I66c03f819178d00db956095e835e8e304ab1aab7
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:44 +07:00
dodyirawan85 406ee82a5f X6833B: Use ext4 for vendor_dlkm
* Match stock configuration

Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:44 +07:00
Woomymy 2648454f4f X6833B: Build a vendor_dlkm image
* vendor_dlkm contains kernel modules that were previously located to
  /vendor/lib/modules and is updatable separately, making us able to
  test kernel modifications faster

* Reference: https://source.android.com/docs/core/architecture/partitions/vendor-odm-dlkm-partition

Signed-off-by: Woomymy <woomy@woomy.be>
Change-Id: I38f5989d4e5a52bf295add8099f6bf6cb8ea3288
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:44 +07:00
Woomymy a928b14e91 X6833B: Ensure GSI AVB Keys are moved to vendor ramdisk
Signed-off-by: Woomymy <woomy@woomy.be>
Change-Id: I97ee5fcb14d73bfcd406c6d18d54235d89119bdc
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:44 +07:00
Woomymy 34b1f449e1 [TMP] X6833B: Make SELinux Permissive
Signed-off-by: Woomymy <woomy@woomy.be>
Change-Id: I07a8d77555b7d123535b4b1ef9431b3907e92838
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:44 +07:00
Sebastiano Barezzi 0c3cdc7d43 X6833B: Enable full VNDK
Change-Id: I74c5cc17c614672aa24bf84b222c36c657693170
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:44 +07:00
Woomymy 89cdacccaf X6833B: Define vendor security patch level
Signed-off-by: Woomymy <woomy@woomy.be>
Change-Id: I03ff642961ba273413b547b189d8f31c72446237
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:44 +07:00
Jyotiraditya 024aa1485a X6833B: Specify AVB recovery flags
Change-Id: I591687c9b7642685601831a16275f34f05b888a1
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:44 +07:00
Christian Oder 9121d86d51 X6833B: Build disabled VBMeta image
Change-Id: I48e3ff106a2e4e044ed39b86a94f3bc80b93f530
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:44 +07:00
Woomymy bf2a36e7cf X6833B: Add recovery init scripts and required flags
Signed-off-by: Woomymy <woomy@woomy.be>
Change-Id: I6a3b4ba0037d9fec49e8445ed8e615b2d14e8c7f
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:44 +07:00
Woomymy d286f54a21 X6833B: Fix recovery kernel modules instalation
* BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD should contain the
  list of modules loaded with the recovery, but the modules should be
  installed using BOARD_VENDOR_RAMDISK_KERNEL_MODULES

Signed-off-by: Woomymy <woomy@woomy.be>
Change-Id: I72768f8325017e0f5b969a7eb03ccccbf4b7eae0
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:44 +07:00
Woomymy 82ef6c6eac X6833B: Add vendor ramdisk and recovery dlkm configs
Signed-off-by: Woomymy <woomy@woomy.be>
Change-Id: I09cadc101b57511e9441b0ca7349121d2a5521d6
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:44 +07:00
Woomymy dde543333f X6833B: Add partitions configuration
Signed-off-by: Woomymy <woomy@woomy.be>
Change-Id: I9e08db2236376b1132aa3bd8a7abf19aa70ba48c
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:44 +07:00
dodyirawan85 da948b70ac X6833B: Add kernel flags
* Kernel is built separatly and placed in device/infinix/X6833B-kernel

Co-authored-by: Woomymy <woomy@woomy.be>
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:44 +07:00
Woomymy 379954f35c X6833B: Add boot image(s) configuration
Signed-off-by: Woomymy <woomy@woomy.be>
Change-Id: Ic22269332239db8f3bd770f678f92e9e8da20e7a
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:44 +07:00
bengris32 61dec5aeda X6833B: Define Bootloader and Platform flags
Change-Id: I8a4aad74ec90124cc35847c64d4db23f97af7ad7
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:44 +07:00
dodyirawan85 949b047edd X6833B: Define architecture flags
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:35 +07:00
dodyirawan85 80a9d11b09 X6833B: Initial skeleton tree
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
2023-12-13 01:10:17 +07:00