GitHub/LineageOS/G12/android_device_amlogic_g12-common.git
2 years agoRevert "g12: Remove androidboot.dynamic_partitions from kernel cmdline"
Jan Altensen [Sat, 18 Jun 2022 05:23:20 +0000 (07:23 +0200)]
Revert "g12: Remove androidboot.dynamic_partitions from kernel cmdline"

This reverts commit 121e182490dfbe7f388b99738d37641dbb7a7b2b.

Reason: Devkits don't set these, and it's harmless on devices
(only Deadpool it seems) who already set it.

Change-Id: I261dfdfc07f5a4dac0285c623e03000e4d1bb1d0

2 years agog12: Move architecture flags to generic variant lineage-19.0
Nolen Johnson [Mon, 10 Jan 2022 01:10:24 +0000 (20:10 -0500)]
g12: Move architecture flags to generic variant

* Some recent native crashes on b4s4 have led me to believe
  that we're all better off doing generic archs, as silent
  crashing code sucks...

* Additionally, we are `cortex-a53` and not `cortex-a53.a57`
  so, remedy that as well.

Change-Id: I5f4b0c3c68baf9f311cb37a6c163b9e7d5a0b57d

2 years agog12: Unset PRODUCT_FULL_TREBLE_OVERRIDE
LuK1337 [Sun, 14 Oct 2018 12:47:55 +0000 (14:47 +0200)]
g12: Unset PRODUCT_FULL_TREBLE_OVERRIDE

* It's not needed since it's automatically set for any devices
  shipped with 26+.

Change-Id: I59e17fe3774af63dbea424be6206b77e0e6050ba

2 years agog12: sepolicy: Use BOARD_VENDOR_SEPOLICY_DIRS
Felix [Tue, 28 May 2019 12:05:51 +0000 (14:05 +0200)]
g12: sepolicy: Use BOARD_VENDOR_SEPOLICY_DIRS

BOARD_SEPOLICY_DIRS is deprecated.

Change-Id: I046282b2a2e8c541726fb29cb0044503322d4be9

2 years agog12: Use default g12_variant_defconfig
Nolen Johnson [Mon, 20 Dec 2021 18:28:08 +0000 (13:28 -0500)]
g12: Use default g12_variant_defconfig

* But allow devices to override it (e.g. sabrina).

Change-Id: Iba3fb6245a744fcb7db47fb015e5e7c69064fe9d

3 years agog12: Reserve space for GApps
Nolen Johnson [Tue, 28 Sep 2021 21:07:00 +0000 (17:07 -0400)]
g12: Reserve space for GApps

* Guard this with WITH_GMS to allow people to
  build GApps inline.

Change-Id: I25802c5f14f1353a8d6f761bb256a6b7dfb63e8b

3 years agog12: Initial sepolicy
Timi Rautamäki [Mon, 27 Sep 2021 20:38:13 +0000 (20:38 +0000)]
g12: Initial sepolicy

Co-authored-by: Nolen Johnson <johnsonnolen@gmail.com>
Change-Id: I596e83fd2c0fabe7b31020cf69267bd43f836dc5

3 years agog12: Remove androidboot.dynamic_partitions from kernel cmdline
Nolen Johnson [Mon, 1 Nov 2021 01:53:08 +0000 (21:53 -0400)]
g12: Remove androidboot.dynamic_partitions from kernel cmdline

* This is duplicated elsewhere, and this isn't the proper
  place to set it.

Change-Id: Idd2a0a2dbf73e5e20dd9839bff3485e5a9e94c1b

3 years agog12: Comply with property isolation
Nolen Johnson [Sun, 31 Oct 2021 03:35:24 +0000 (23:35 -0400)]
g12: Comply with property isolation

* Stock has isolation enabled, and yet has these all in
  /vendor/build.prop? - eh, we can do it correctly.

Change-Id: I547277eae2f0eadf873670bc79778f3401f036ba

3 years agog12: Remove /data/media creation from fs.rc
Nolen Johnson [Fri, 29 Oct 2021 16:33:21 +0000 (12:33 -0400)]
g12: Remove /data/media creation from fs.rc

* Done by platform.

Change-Id: Ia8f3cb91d967c3ec29ab4da50e7c4978ef0d5f43

3 years agog12: remove broadcom firmware files from proprietary-files.txt
Jan Altensen [Thu, 16 Sep 2021 08:38:33 +0000 (10:38 +0200)]
g12: remove broadcom firmware files from proprietary-files.txt

 * this is handled in hardware/amlogic/kernel-modules/dhd-driver/firmware now

Change-Id: Idcae813063960cc800fafbc9eb62ec12a2627804

3 years agog12: Remove non-pinned variant of config_bcm4359c0_ag.txt
Nolen Johnson [Tue, 14 Sep 2021 22:11:41 +0000 (18:11 -0400)]
g12: Remove non-pinned variant of config_bcm4359c0_ag.txt

Change-Id: I68b014de9c482e1ab5c765dd1ad9b241150ab090

3 years agog12: Pin sabrina's Bluetooth/Wi-Fi firmware
Nolen Johnson [Tue, 14 Sep 2021 21:38:11 +0000 (17:38 -0400)]
g12: Pin sabrina's Bluetooth/Wi-Fi firmware

* sabrina sees Bluetooth/Wi-Fi hangs and reboots if
  you don't use the stock firmware.

Change-Id: I3aa6a9cd96c8f3a5084a986e8d783428c9ef3460

3 years agog12: add dummy target for dtb image
Jan Altensen [Tue, 14 Sep 2021 18:09:17 +0000 (20:09 +0200)]
g12: add dummy target for dtb image

Change-Id: Ibb49f125b11622897eb8c802f8580d7521881db9

3 years agog12: fix flashing of DTB/logo images
Jan Altensen [Fri, 10 Sep 2021 06:37:05 +0000 (08:37 +0200)]
g12: fix flashing of DTB/logo images

 * the build system apparently does not like it when `add-radio-file` is called from within build rules when building via `m target-files-package`, manually add it to the radioimage list

Change-Id: I250a5a36305fadb3c36b5d61f3fc68b03bb5ede7

3 years agog12: Correct dtbo mount location in fstab
Nolen Johnson [Fri, 10 Sep 2021 02:14:01 +0000 (22:14 -0400)]
g12: Correct dtbo mount location in fstab

Change-Id: I8afd8d10c9829d11f23f3259c5b55359c33cce4c

3 years agog12: Use software OMX codecs
Aaron Kling [Sun, 4 Jul 2021 00:13:52 +0000 (19:13 -0500)]
g12: Use software OMX codecs

* Hardware OMX codecs crash hard at the moment.

Change-Id: Idf71588311a37031869eeefd110549af40695913

3 years agog12: decommonize remote keylayout
Timi Rautamäki [Tue, 31 Aug 2021 07:19:02 +0000 (07:19 +0000)]
g12: decommonize remote keylayout

Wade's remote has different key mapping, such as assistant and Netflix

Change-Id: Idd60bcf77606dce24e6b2f9ecee788821b2d6898

3 years agog12: Unbork recovery usb configfs
Alessandro Astone [Mon, 30 Aug 2021 12:16:50 +0000 (14:16 +0200)]
g12: Unbork recovery usb configfs

Everything that's useful is a duplucate of recovery's init.rc
Other configs were breaking adb when switching from fastbootd to
recovery.

Change-Id: I141299f897d8af10f40fdc5e7fae088d854f2d3e

3 years agog12: actually add the dtb image to the zip
Jan Altensen [Mon, 16 Aug 2021 16:25:17 +0000 (18:25 +0200)]
g12: actually add the dtb image to the zip

Change-Id: I0a601d0fb747b34c1571e996560316777fb9957c

3 years agog12: dd dtb.img instead of using package_extract_file
Jan Altensen [Tue, 3 Aug 2021 20:11:15 +0000 (22:11 +0200)]
g12: dd dtb.img instead of using package_extract_file

 * for some reason its not getting flashed via package_extract_file

Change-Id: Ia1bd4fa008dd0cde71baea63b48c6636ec85cb82

3 years agog12: Move mounting of factory partition to relevant device trees
Nolen Johnson [Thu, 5 Aug 2021 03:21:46 +0000 (23:21 -0400)]
g12: Move mounting of factory partition to relevant device trees

* Some devices have a factory partition that we can't mount, fun.

Change-Id: Ie354982574fa3ac9d36f676ba329e7e1b66a980a

3 years agoRevert "g12: init-files: fstab: Don't mark firmware partitions as formatable"
Nolen Johnson [Tue, 3 Aug 2021 22:45:50 +0000 (18:45 -0400)]
Revert "g12: init-files: fstab: Don't mark firmware partitions as formatable"

This reverts commit cf91493d196b22e207ecfafc6d8dc2da45685806.

Reason: dopinder/wade want to be able format these, while deadpool doesn't.

Change-Id: I116ce178d2fb6a7c49e0e133c10ce00e82bcb6f5

3 years agoRevert "g12: init-files: ueventd: Provide additional firmware directories"
Jan Altensen [Mon, 2 Aug 2021 14:46:10 +0000 (16:46 +0200)]
Revert "g12: init-files: ueventd: Provide additional firmware directories"

This reverts commit 7ac4ab266c2777c7aeb2838bbfae794a49a0961d.

without this revert:
[    5.962641@3]- Try to load video/h264_enc.bin  ...
[    5.966496@3]- firmware_codec firmware_vdec: Direct firmware load for video/h264_enc.bin failed with error -2
[    5.976168@3]- Error : -2 can't load the video/h264_enc.bin.
[    5.981819@3]- get data from fsys fail.
[    5.985616@3]- invaild file type.
[    5.989361@3]- Try to load video/video_ucode.bin  ...
[    5.993980@3]- firmware_codec firmware_vdec: Direct firmware load for video/video_ucode.bin failed with error -2
[    6.004101@3]- Error : -2 can't load the video/video_ucode.bin.
[    6.009971@3]- get data from fsys fail.
[    6.013797@3]- invaild file type.
[    6.019731@1]- Registered frame rate driver success.

with this revert:
[    5.977339@2]- Try to load video/h264_enc.bin  ...
[    5.982556@2]- load firmware size : 76288, Name : video/h264_enc.bin.
[    5.988188@2]- Try to load video/video_ucode.bin  ...
[    6.003037@2]- load firmware size : 1459200, Name : video/video_ucode.bin.
[    6.012527@2]- Registered frame rate driver success.

Change-Id: I1ffba87da44b391861fe16e0e295cd5a709cd913

3 years agog12: clone kernel to kernel/amlogic/linux-4.9
Timi Rautamäki [Sat, 31 Jul 2021 12:58:08 +0000 (12:58 +0000)]
g12: clone kernel to kernel/amlogic/linux-4.9

Change-Id: Ifa231be880272ab1d41c0e5080faeaee643df974

3 years agog12: fixup lineage.dependencies
Timi Rautamäki [Sat, 31 Jul 2021 10:56:19 +0000 (10:56 +0000)]
g12: fixup lineage.dependencies

Change-Id: Ic2984351b1bbe4881535a1ec6c2eb29b0b36712b

3 years agog12: init-files: ueventd: Provide additional firmware directories
Luca Stefani [Tue, 27 Jul 2021 21:32:54 +0000 (17:32 -0400)]
g12: init-files: ueventd: Provide additional firmware directories

* The correct way to do this is to let the kernel search fail
  and fall back.

Change-Id: Id98377324a45408e4b0d6b4a3a4eba54488f17fb

3 years agog12: Move supplicant service init to wpa_supplicant
Jimmy Chen [Thu, 3 Oct 2019 03:24:23 +0000 (11:24 +0800)]
g12: Move supplicant service init to wpa_supplicant

Bug: 138790309
Test: boot and wifi function is ok
Change-Id: I35cf3e03566443e20799623045eacd423fd7f5c4

3 years agog12: Remove legacy fuse based external device mounts
Luca Stefani [Tue, 27 Jul 2021 21:03:04 +0000 (17:03 -0400)]
g12: Remove legacy fuse based external device mounts

Change-Id: I31cd4f5111d5116cb4534db6567e504c5e783e8c

3 years agog12: init-files: Do not symlink sdcard legacy path
Demon Singur [Fri, 21 Sep 2018 11:11:36 +0000 (11:11 +0000)]
g12: init-files: Do not symlink sdcard legacy path

* Solves the following denial:
  `denied  { write } for  pid=548 comm="init" name="storage" dev="rootfs" ino=15996 scontext=u:r:vendor_init:s0 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0`

Change-Id: If246f497bd8384f0fee81469d8d29dcb528d4d4e

3 years agog12: init-files: Remove non-existant entries
Nolen Johnson [Tue, 27 Jul 2021 20:18:23 +0000 (16:18 -0400)]
g12: init-files: Remove non-existant entries

* Remove module loads that don't exist.
* Remove imports of non-existant init-scripts.
* Remove non-existant service declarations.

Change-Id: I92a3386f85ac322d1c71726609d5a9fa87431d3c

3 years agog12: init-files: Remove uncessary debugging entries
Nolen Johnson [Tue, 27 Jul 2021 20:03:38 +0000 (16:03 -0400)]
g12: init-files: Remove uncessary debugging entries

* AOSP defaults to level 3, so no need to set it ourselves.
* We don't need to set global read on these debugging nodes.
* We ought to be restricting `dmesg` to root for security
  reasons.

Change-Id: Ifa6677d4a4afee5281267ee0a3bfce0b5f4f3daf

3 years agog12: init-files: Format contents and delete blank triggers
Nolen Johnson [Tue, 27 Jul 2021 20:00:49 +0000 (16:00 -0400)]
g12: init-files: Format contents and delete blank triggers

Change-Id: I266b0a34f4e9eb9d2943a933078421f1504294cb

3 years agog12: init-files: fstab: Don't mark firmware partitions as formatable
Luca Stefani [Tue, 27 Jul 2021 19:44:25 +0000 (15:44 -0400)]
g12: init-files: fstab: Don't mark firmware partitions as formatable

* No clue why stock does this, marking these as formatable
  would allow both recovery and init to wipe them, which
  we definitely don't want.

Change-Id: I0511d76d978863bc86aa7f0e8218db3bd4e98a95

3 years agog12: Attempt to mount factory partition
Nolen Johnson [Mon, 26 Jul 2021 22:45:24 +0000 (18:45 -0400)]
g12: Attempt to mount factory partition

* sabrina has a factory partition.

Change-Id: Ia40b71236564bdaee1721c48ad9a2efd677e2b17

3 years agog12: Symlink bootdevice for Lineage Recovery
Marc Bourgoin [Thu, 25 Jun 2020 02:15:33 +0000 (22:15 -0400)]
g12: Symlink bootdevice for Lineage Recovery

* It is needed by OpenGApps install script.

Change-Id: Idb90a6ecaae541e74a9878c1ca93459cc2fdd949

3 years agog12: Import NRDP permission/JSON configuration
Nolen Johnson [Thu, 15 Jul 2021 06:40:07 +0000 (02:40 -0400)]
g12: Import NRDP permission/JSON configuration

* The permission makes the Netflix app appear/install on the Leanback
  Play Store, the JSON's configure playback within the app.
* These are shipped with slight variations on dopinder/wade/sabrina,
  but not deadpool - import them here regardless, as we can all benefit.
* Only commonize ro.vendor.nrdp.validation, as the rest of the properties vary.
* Taken from: sabrina_prod_stable-user-10-QTS2.200918.015-6966301-release-keys

Change-Id: I875982d329b2861674e868c5ef6977c88ce8719c

3 years agog12: Install WifiOverlay into vendor
Aayush Gupta [Sat, 14 Nov 2020 07:12:12 +0000 (12:42 +0530)]
g12: Install WifiOverlay into vendor

* We want these overlays on GSI, therefore install it to
  vendor.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Change-Id: I3107da263fd29f0bc40f495ad84fdf4db0d3c814

3 years agog12: WifiOverlay: Disable WPA2 -> WPA3 upgrade
Quallenauge [Tue, 10 Nov 2020 16:23:28 +0000 (17:23 +0100)]
g12: WifiOverlay: Disable WPA2 -> WPA3 upgrade

* Our device doesn't simply support SAE.

* [npjohnson] Technically our chipset supports it, but it
  doesn't work on stock either, so disable it for now
  at least.

Change-Id: Ibf8b9e363b4677cf2ab9590cc2ea1ba2341e29ca

3 years agog12: Add WifiOverlay
Roshan Pius [Fri, 24 Apr 2020 21:33:28 +0000 (14:33 -0700)]
g12: Add WifiOverlay

* This is the only overlay that doesn't match default values.

Bug: 148617260
Test: Device boots up and connects to wifi networks.
Change-Id: Iec27a6d947a232a42451ef095dc73d1a52327db5

3 years agog12: Remove Bluetooth overlay
deadman96385 [Sat, 3 Jul 2021 03:36:08 +0000 (20:36 -0700)]
g12: Remove Bluetooth overlay

* This is no longer used as of 11 in favor of RRO overlays,
  and in our case, this will be done with component-overrides
  per-device.

Change-Id: I83d12b1776bbdcb4ea5b59c1a05d4883ef8ef880

3 years agog12: Guard prebuilt tee*/keymaster for devices with no OP-TEE
Jan Altensen [Fri, 2 Jul 2021 05:43:16 +0000 (07:43 +0200)]
g12: Guard prebuilt tee*/keymaster for devices with no OP-TEE

* These need to be split out because development
  boards don't have OP-TEE, and even if they could
  kang another device's, we have no functional keys
  or TA files, so it's useless and broken.

* Devices that have no OP-TEE need to set
  `TARGET_HAS_TEE := false` in their lineage_${DEVICE}.mk.

* So that we can successfully encrypt as per the fstab
  entry for `/data`,  build the AOSP keymaster 4.1 service,
  and that uses a VINTF fragment.

Change-Id: I8756ba2d9cd5c53725645185783f9e15b739602c

3 years agog12: Decommonize init.amlogic.wifi_buildin.rc
Nolen Johnson [Thu, 1 Jul 2021 21:09:25 +0000 (17:09 -0400)]
g12: Decommonize init.amlogic.wifi_buildin.rc

* Only deadpool/wade has Broadcom Wi-Fi/Bluetooth,
  dopinder has Realtek, and will need different modules
  and node permissions changed.

Change-Id: I204e5c22a1dc306c9c932a3634f5e6534a438ee5

3 years agog12: Decommonize TA files
Aaron Kling [Thu, 1 Jul 2021 19:37:31 +0000 (14:37 -0500)]
g12: Decommonize TA files

* These are different on all Askey G12A devices.

Change-Id: I4f798d094aacb4270619609c8cf9e0427abf2a95

3 years agog12: Set a dummy BT MAC address
deadman96385 [Thu, 1 Jul 2021 19:13:21 +0000 (12:13 -0700)]
g12: Set a dummy BT MAC address

* BT HAL needs this.

Change-Id: If25c136e9b1a4c3bb0ef0b6b497b94f1e3e079a0

3 years agog12: Decommonize FRP confguration
Nolen Johnson [Wed, 30 Jun 2021 21:47:39 +0000 (17:47 -0400)]
g12: Decommonize FRP confguration

* Only deadpool actually has an FRP partition.

Change-Id: If55b306644cdad368f83d446babf6681447c77e2

3 years agog12: Set USB name in recovery to ro.product.board
Nolen Johnson [Wed, 30 Jun 2021 05:56:36 +0000 (01:56 -0400)]
g12: Set USB name in recovery to ro.product.board

* This sets it per-variant.

Change-Id: I52c596a271f8e70625e3a478f421e949d014358e

3 years agog12: Declare boot/dtbo partition in fstab
Nolen Johnson [Sat, 26 Jun 2021 03:17:53 +0000 (23:17 -0400)]
g12: Declare boot/dtbo partition in fstab

* To appease the build system.

Change-Id: Id2b33ce34433cffa800ad398da694730f61e0e12

3 years agog12: Add dynamic partitions to fstab
Nolen Johnson [Sat, 26 Jun 2021 02:51:25 +0000 (22:51 -0400)]
g12: Add dynamic partitions to fstab

* Build system wants these.

Change-Id: I969d0ddc1820a48913bbf898ea513beeada1760f

3 years agog12: Drop Wi-Fi MultiHAL
Nolen Johnson [Sun, 18 Jul 2021 16:47:09 +0000 (12:47 -0400)]
g12: Drop Wi-Fi MultiHAL

* Requires framework side magic.
* Manifest entries conflict with source built bits.

Change-Id: Ied00042a663728edd61ccb5b0777e3c19f411197

3 years agog12: Build kernel modules inline
Aaron Kling [Fri, 25 Jun 2021 05:01:52 +0000 (01:01 -0400)]
g12: Build kernel modules inline

* Edit tee-supplicant to load modules from the correct
  location.

Change-Id: Iaf409805dbdf6c4b4661c4246c3a54d6453e58f5

3 years agog12: Build logo image
Jan Altensen [Mon, 12 Jul 2021 14:33:16 +0000 (10:33 -0400)]
g12: Build logo image

* Use images from deadpool's Android 12 (ATV) logo.

Change-Id: I0057275f36b1b345d44bc957f358cadb86af4c86

3 years agog12: Also flash logo and bootloader images if available
Jan Altensen [Sat, 3 Jul 2021 00:38:52 +0000 (02:38 +0200)]
g12: Also flash logo and bootloader images if available

Change-Id: Ie14e6f9700fc25d54993272f2222a63a0388fa18

3 years agog12: Flash DTB/DTBO/VBMeta/Super images with releasetools
Tim Zimmermann [Fri, 25 Jun 2021 06:54:26 +0000 (02:54 -0400)]
g12: Flash DTB/DTBO/VBMeta/Super images with releasetools

Co-authored-by: Jan Altensen <info@stricted.net>
Co-authored-by: Tim Zimmermann <tim@linux4.de>
Change-Id: Ieda7bf879fe1fd7ac1f8fcf12183f8a5eda20e43

3 years agog12: Fix dtbo image creation
Jan Altensen [Thu, 24 Jun 2021 17:50:02 +0000 (19:50 +0200)]
g12: Fix dtbo image creation

Change-Id: I30ea3685d70632a55dce49120fd20f14a9b61e87

3 years agog12: Support multiple dtbo's
Jan Altensen [Tue, 22 Jun 2021 17:39:20 +0000 (19:39 +0200)]
g12: Support multiple dtbo's

Change-Id: I60092adb4e25d699115c0b6f5b3c1434300957e3

3 years agog12: Add build task for dtb/dtbo images
Jan Altensen [Sat, 19 Jun 2021 20:20:27 +0000 (22:20 +0200)]
g12: Add build task for dtb/dtbo images

Change-Id: Ia0518fd7de611a0fb190900e7a86f2c8e571e585

3 years agog12: Build dtb/second image and set working boot image offsets
Jan Altensen [Thu, 24 Jun 2021 17:50:02 +0000 (19:50 +0200)]
g12: Build dtb/second image and set working boot image offsets

Change-Id: Iecff2693c55e0b5986353289c9c24fc29f4a88ee

3 years agog12: Silence clang warnings during kernel compile
Arne Coucheron [Tue, 12 Jan 2021 04:45:19 +0000 (05:45 +0100)]
g12: Silence clang warnings during kernel compile

clang-11: warning: argument unused during compilation:
'-fuse-ld=lld' [-Wunused-command-line-argument]

Change-Id: I66a629f3573e3fad8aa085ea115475f02d60a7ea

3 years agog12: Initial Commit
Nolen Johnson [Thu, 17 Jun 2021 04:41:55 +0000 (00:41 -0400)]
g12: Initial Commit

Change-Id: I332674f5c2bb24c4a189690c0d7f60342eb22c2f