• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[UNOFFICIAL] LineageOS 18.1 for Amlogic G12*/SM1 Family Devices

Search This thread

tokoam

Senior Member
Jun 24, 2007
920
167
Plantation
fyi, running a stock ota update on an unlocked bootloader DID NOT relock it. It did replace recovery, but that's to be expected. I guess it would be trivial enough for them to trigger a relock in any future update, but this one didn't do so, at least. I ran the unlock command again just to be sure and when it rebooted my apps were still installed, and I was able to reinstall custom recovery.
how do I install the ota update ? When I do it In Andriod Tv OS it it boots to recovery and tells me failed signature check . How do we install this update ? via posted link . Also I have a silly question when we flash the recovery does it still retain the stock recovery ? . I'm asking cause it looks as if it booted to the stock recovery .
 

npjohnson

Recognized Developer
how do I install the ota update ? When I do it In Andriod Tv OS it it boots to recovery and tells me failed signature check . How do we install this update ? via posted link . Also I have a silly question when we flash the recovery does it still retain the stock recovery ? . I'm asking cause it looks as if it booted to the stock recovery .
The update he linked is the stock OS - you'd need to install it from the stock recovery.
 
  • Like
Reactions: tokoam

hp420

Senior Member
Jul 31, 2011
2,561
1,428
Gainesville, Fl
Google Nexus 4
T-Mobile LG G2
fyi, running a stock ota update on an unlocked bootloader DID NOT relock it. It did replace recovery, but that's to be expected. I guess it would be trivial enough for them to trigger a relock in any future update, but this one didn't do so, at least. I ran the unlock command again just to be sure and when it rebooted my apps were still installed, and I was able to reinstall custom recovery.
It's also worth noting, the update i installed was a TRUE OTA update, not sideloaded. I don't know if that makes a difference or not 🤷 I'm using the factory rom and I was prompted to install an update via popup notification.
 

npjohnson

Recognized Developer
Thanks. Is it already save to compile from source? Should I use TheMuppets or your github for vendor?
The muppets, BUT you will need to pick a few commits:
And because it's dynamic you won't be able to flash Gapps until we calculate their size, you'd either need to bake them in or not use them.
 
Last edited:
  • Like
Reactions: kennkanniff

npjohnson

Recognized Developer
Has anyone been able to disable encryption (say, by flashing the disabler zip)?

You should be able to adb root && adb remount after enabling it in dev settings, then adb shell and edit /vendor/etc/fstab.amlogic to remove the encryption options, reboot, fastboot -w, and boot up.

But idk why you would - it won't make things faster.
 

p0werpl

Member
Aug 30, 2021
46
3
Yes (without encryption). Some graphics issues (the display has weird colors and font), but it's functional.

About your suggestion to edit fstab.amlogic, aren't those partitions forced read-only? Have you been able to remount them rw?

Does wireless adb work in lineage? How?
 
  • Like
Reactions: hp420

p0werpl

Member
Aug 30, 2021
46
3
Finally:
 

Attachments

  • twrp.jpg
    twrp.jpg
    146.7 KB · Views: 95

npjohnson

Recognized Developer
Yes (without encryption). Some graphics issues (the display has weird colors and font), but it's functional.

About your suggestion to edit fstab.amlogic, aren't those partitions forced read-only? Have you been able to remount them rw?

Does wireless adb work in lineage? How?
adb root && adb remount on lineage. on stock yeah, not possible. Nice! I can help with this if you want to add me to your TWRP device tree.

For colors it's pixel type, see the lineage tree.
 

p0werpl

Member
Aug 30, 2021
46
3
adb root && adb remount on lineage. on stock yeah, not possible. Nice! I can help with this if you want to add me to your TWRP device tree.

For colors it's pixel type, see the lineage tree.
I will PM the device tree. I will warn you there isn't much there. I just had enough to build and be able to backup (unencrypted) data using twrp commandline.

The bigger challenge was expanding /vendor (and other individual partitions in /super). Since they are dynamically created from super.img, mounting them rw is only a small part of the challenge. There's no space in vendor.img to make any changes to fstab (even if it can be mounted rw).

So, the first step is to expand the sizes of the individual partitions and then repack them into a super.img. I used this: https://forum.xda-developers.com/t/script-android-10-universal-mount-system-read-write-r-w.4247311/. The issue here is that the script does everything on the device and there isn't enough space on /dev/block/data for the original super.img, the individual (vendor, system, product, and odm) partitions, and the repacked super.img. So, this will need a usb-c otg hub with a flash drive to store the original and repacked super images and only the intermediate files (individual partitions) will need to be stored on /data (for which there's enough space).

After this new super.img (with expanded vendor.img) is fastboot-flashed onto the device, one can remount /vendor rw and edit the fstab to delete the encryption flag. It's then a matter of doing a factory reset, setting everything up, and booting my dirty twrp to do a data backup in commandline.
 

Top Liked Posts

  • 1
    If I build with MicroG baked in I get a black screen after setup. I can't check logs because I can't enable ADB. Any thoughts?
    Yeah, microg doesn't have any handling set up for ATV GMS which is totally different.
    1
    Th
    Surprised no one else replied, but I'm having the same problem on a Dynalink box. OTG cable went completely useless after installing Lineage.
    This is fixed. Next build will do it.
  • 2
    It's been a month and a half since we discussed the possibility of the tablet-flavored (non-TV) release. It seems that the number of complaints has decreased and the basic quality of builds has improved enough to bother you again in this regard: are there any positive changes in this direction, or it is not worth expecting to get a full-featured Android on dopinder? (I'm still following this thread carefully to make a buying decision.)
    Eh, soon, sure.

    I'll look into making a buildable target
    2
    The device is in fastboot mode; your PC is not configured to detect it. You haven't installed fastboot drivers in Windows (https://developer.android.com/studio/run/win-usb), so it's no wonder the device is not being recognized.

    Given how easy it is to boot Linux from a flash drive, it's pretty much an expectation on here that you try this in Linux and not in Windows.
    Windows works fine. Just install the drivers like the wiki details.
    1
    Hey so does this mean I don't need OTG cable for my Onn 4k box then? I can do all of this with just connection to my laptop + adb?
    Yeah, I'll update the wiki soonish
    1
    I haven't even tried lineage as of yet, but this was my 1st encounter of having to loginin/setup to access debugging. Guess I'll find out tomorrow if it's really necessary when booting directly to the stock recovery > booloader. Fingers crossed ;)
    It's not necessary at all, you can boot into bootloader mode and just issue the command
    1
    If anybody has a troubleshooting idea, I'd be happy to give it a try and confirm what does/doesn't work.
    The device is in fastboot mode; your PC is not configured to detect it. You haven't installed fastboot drivers in Windows (https://developer.android.com/studio/run/win-usb), so it's no wonder the device is not being recognized.

    Given how easy it is to boot Linux from a flash drive, it's pretty much an expectation on here that you try this in Linux and not in Windows.
  • 10
    lineage-os-logo.png

    Amlogic G12*/SM1 Family Devices
    Code:
    - Your warranty is now void.
    - You have been warned.
    - Use at your own risk.

    Introduction:
    This is the Unofficial Lineage OS 18.1 thread for the Amlogic G12*/SM1 SoC family of devices.

    Downloads:
    Please follow the install instructions in your device's Wiki page linked below exactly, and make sure your device's firmware matches the required firmware listed:
    We also support a few development boards, but at least (for now, until we have time to write up instructions), you're on your own to figure out the install process and set things up:
    If you don't follow these instructions, or use 3rd party add-ons (like Magisk) please don't expect support here.

    Known Bugs:
    • Hardware backed OMX - Therefore, by proxy, L1 DRM is broken, we're currently trying to fix it, but it's proving tough to figure out. Software OMX fallback is in use for now, though, and works fine on almost all non-DRM videos.
    • SELinux is permissive, this is only due to a lack of time to put together a decent looking sepolicy for the devices,
    • (wade/dopinder only) Side-button doesn't work - On wade, you can use the IR remote to navigate recovery, on dopinder, you'll need an OTG adapter, and a keyboard or controller to attach.
    Notes:
    • GApps are baked in - No, I will not be building without GApps included for this device. These builds are built, packaged, and signed by me, and not affiliated with LineageOS whatsoever. OTA is provided the same way officials would have them.
    • Firmware is shipped in the ROM package for this device, so you'll end up on the newest version of compatible firmware after install. Please don't touch firmware partitions after install.
    FAQ:
    • Does L1 Widevine DRM break when I unlock my bootloader?

      Nope, it works fine, or at least, it will once we fix hardware backed OMX. L1 certificates, and the mechanism that reports is all still exist and work as expected.

    • Can I haz Netflix?

      Not the Android TV one, not until we fix hardware backed OMX, at least - after that it should work fine. For now, you can go sideload the tablet Netflix, it works fine!

    • Is this Android TV or Google TV?

      Android TV, with some of the better components of Google TV.

    • Can I go back to stock and relock the bootloader?

      Yeah, grab the factory image for your device and flash it just like you would for a Pixel device, you can find the factory images here. Don't know it I'd relock though, consider that process largely untested on these device. Especially on sabrina, where you can't necessarily re-unlock should you ever want to.

    • Are these the stock codenames for these devices?

      Astute observation, no, they are not. The ADT-3 is actaully `adt3`, but earlier in production is was `deadpool`, which is much cooler. The Dynalink box internally is extremely similar to the ADT-3, so we coined it `wade` after Wade Wilson, AKA deadpool. The Onn box is in the same family, but different enough to coin it `dopinder`, after, well, go watch Deadpool the movie I guess. sabrina is actually the codename given by Google - no clue as to the reason.

    • Does it pass SafetyNet?

      Nope, SELinux is permissive, among other things. You can probably use Magisk if you really need that, but the good news is, 99% of Android TV apps don't care about SafetyNet, unlike on mobile, where a lot of them do.

    • Does the stock remote work?

      Yup, just like it would on stock, in-remote-microphone and all! If it's an IR remote like wade's, it will even work in recovery!

    • Can we we support higher resolution than 4K, higher FPS, or HDR on non-certified screens?

      Nope.

    • I have a very similar device! Can I install these builds and use them?

      No. Please don't do that. You will brick your device, as we include firmware and bootloader images.

      If you're a developer looking to help port to a new device, contact me.

    Kernel Source: https://github.com/LineageOS/android_kernel_amlogic_linux-4.9

    Contributors:
    • npjohnson
    • stricted
    • webgeek1234
    • deadman96385
    • trautamaki
    • luca020400
    • aleasto
    6
    Yeah, you used the stock recovery. You need to fastboot flash, then fastboot boot recovery, I'll update the docs.

    For dopinder, it's needed right now.

    Found a procedure for dopinder without the need for keyboard/OTG.

    The docs under "Installing a custom recovery using fastboot" state to use "adb reboot fastboot" which doesn't work for booting recovery, needed to do "adb reboot bootloader" instead.

    Full command log (after unlocking bootloader and re-enabling USB debugging) of the install process with just a regular Micro USB to USB A cable:
    Code:
    adb reboot bootloader
    fastboot flash recovery lineage-18.1-20210805-recovery-dopinder.img
    fastboot boot lineage-18.1-20210805-recovery-dopinder.img
    adb reboot sideload
    adb sideload lineage-18.1-20210805-UNOFFICIAL-dopinder.zip
    # if successful then load bootloader and factory reset
    adb reboot bootloader
    fastboot -w
    fastboot reboot

    Successfully booted to LineageOS after this!
    4
    sabrina support is live, enjoy.
    3
    could you all please take this to private message? there's 3 pages of messages from you talking about fixing one user's device. we all keep getting notifications for every message you post 🤷

    thank you 😊
    This is all relevant information that anyone who gets in this situation would benefit from.

    You can turn off the notifications, or set up daily summaries?
    2
    i probably will write up install instructions for the `BananaPi-M5` and `Odroid C4` Soon™
    its a bit more complicated than just booting into recovery and flashing it unfortunately