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

Search This thread

goapy

Senior Member
Dec 30, 2021
134
34
thats good, but doesnt the current build you have installed overwrite the recovery you have? so if i ever wanted to update to a newer version of 19.1, i would have to reboot to bootloader, boot into 18.1 recovery.img and then flash it?
Well, if you use the 18.1 recovery to sideload 19.1, that sideloaded installation ends with the 19.1 recovery on the device.

I don't see any reason why you couldn't immediately flash the 18.1 recovery again after that if you want to test these builds, if you're worried about the 19.1 recovery.
 

RDS5

Senior Member
Well, if you use the 18.1 recovery to sideload 19.1, that sideloaded installation ends with the 19.1 recovery on the device.

I don't see any reason why you couldn't immediately flash the 18.1 recovery again after that if you want to test these builds, if you're worried about the 19.1 recovery.
doesnt the actual os overwrite the recovery partition with its own recovery? so if i were to flash 18.1 recovery again it would overwrite it with 19.1? or am i getting this the wrong way, and only the stock os does that.
ill flash it right now anyways and check it out.
 

RDS5

Senior Member
nevermind its stuck on the androidtv logo. ill do a factory reset (if i even can, since it didnt want to fastboot-boot into the 18.1 recovery after flashing 19.1) and if that still doesnt work ill go back to stock, go to 18.1 and just wait for official release.
the xda releases arent worth the trouble currently, and they wont be up until the recovery boots.
 

goapy

Senior Member
Dec 30, 2021
134
34
doesnt the actual os overwrite the recovery partition with its own recovery?

I don't think that the running system ever updates the recovery partition unless it's applying an ota.

nevermind its stuck on the androidtv logo. ill do a factory reset (if i even can, since it didnt want to fastboot-boot into the 18.1 recovery after flashing 19.1) and if that still doesnt work ill go back to stock, go to 18.1 and just wait for official release.

If you've just finished sideloading 19.1, you can run;

adb reboot bootloader

To flash the 18.1 recovery, or even the stock recovery.

While you're in that same bootloader fastboot session, it wouldn't hurt to also run;

fastboot erase data
fastboot erase cache

Which is the equivalent of a factory reset. You needn't ever reboot to the recovery again.

The bootloader's support for burn mode stays constant regardless of which build is present on the device (18.1/19.1/factory)

So whenever you're stuck, you can do the steps like at the end of this post to resolve the issue.
 
Last edited:

jwchen119

Senior Member
May 12, 2013
210
287
Tainan
no sadly, i tried to use mouse toggle and it wouldnt work.
i wish there was some kind of mouse toggle alternative, it would be a gigantic save.
does anyone know of alternative apps? ive only tried the free one but the paid one only supports a handful of devices.
Have you tried tvQuickActions on Play store yet?
I can triggered the mouse toggle to work with it's feature on stock ROM.
 

#2!

Senior Member
Dec 4, 2008
108
5
Diddy Kong County
I wasn't able to revert back to stock from Lineage using the factory zip files, for whatever reason it would bootloop the Onn logo. However holding the box side button allowed opening the stock recovery and from there was able to enter bootloader, boot Lineage recovery and flash the stock OTA zip modifying it to remove the first line (newer build check) in updater-script. This required an OTG Y adapter and powered USB hub for keyboard and USB stick.

I can also confirm Magisk v23 works well on Lineage and Stock after simply flashing the zip (rename .apk to .zip) using Lineage recovery. Was able to create a simple module to replace /vendor/usr/keylayout/Vendor_0957_Product_0005.kl with TV, Channel Up/Down, Netflix etc to numpad keys which can then be remapped using an app like Button Mapper.
Thanks!! I had the same issue bootloop with the factory zip file. The stock OTA zip you posted worked for me without any modification. Just opened stock recovery with the button, selected ADB sideload and sideloaded that zip file. No adapter or hub needed.
 

espchl

Member
May 21, 2022
10
0
Hey,
I flashed my Sabrina with 19.1 today, following the instructions.
Something went wrong, the device did not boot to os and got stuck at the android tv logo.
I was able to enter fastboot and was able to enter the recovery,. But no boot to os.
I manually flashed the 18.1 recovery via fastboot (stupid enough) and are now stuck at the android tv animation. The device can't enter recovery now. It's also not possible to use fastboot.

Is there anything I can do to unbrick my device? I appreciate any help!
I tried to use "update bulkcmd fastboot" but without a working fastboot, its not possible to flash the recovery again :)

Thanks in advance!
 

kennkanniff

Senior Member
May 6, 2013
181
279
Hey,
I flashed my Sabrina with 19.1 today, following the instructions.
Something went wrong, the device did not boot to os and got stuck at the android tv logo.
I was able to enter fastboot and was able to enter the recovery,. But no boot to os.
I manually flashed the 18.1 recovery via fastboot (stupid enough) and are now stuck at the android tv animation. The device can't enter recovery now. It's also not possible to use fastboot.

Is there anything I can do to unbrick my device? I appreciate any help!
I tried to use "update bulkcmd fastboot" but without a working fastboot, its not possible to flash the recovery again :)

Thanks in advance!
Try this:
Code:
update partition recovery path/to/lineageos-18.1-recovery.img
 

kennkanniff

Senior Member
May 6, 2013
181
279
Thank you. Seemed to work without error.
Sadly I'm still not able to enter fastbootd.

Is it somehow possible to flash to stock and start from scratch?
Thanks
You should be able to use the exploit now. If that does not work you should try the custom exploit in post #782. No expert just sharing my experience.
 

retyre

Senior Member
Jan 14, 2011
304
317
Central FL
You should be able to use the exploit now. If that does not work you should try the custom exploit in post #782. No expert just sharing my experience.
Not sure that will work since he/she cannot boot into the OS.

@espchl: What you should do is put back the 19.1 (not 18.1) recovery:
Code:
sudo ./update partition recovery lineage-19.1-20220515-recovery-sabrina.img
and see whether that lets you boot into fastbootd.
 

sjustinas

New member
Nov 3, 2021
2
0
Just flashed the latest build to my wade. Had to flash it using the 18.1 recovery, because the latest recovery would not work (neither via "fastboot flash", nor "fastboot boot" - I would remain at the OEM's bootloader screen).

Auto frame rate works great with Jellyfin and SmartTubeNext! (when enabled in both Android's and respective
apps' settings).

However, I've hit a couple of minor issues so far:
  • My TV is constantly in HDR mode, even when in the launcher or watching SDR content. This was also the case with Dynalink's stock software, however I was be able to remedy this by choosing the "Auto" (rather than "On") HDR mode in Droid Settings. Lineage, of course, has no Droid Settings. Any way to resolve this?
  • The launcher seems to crash when I tap the Apps icon (see video). In reality, the screen also goes completely black for a second before the launcher re-opens. One can access the apps through the favorites bar, or via Settings -> Apps, but it is slightly annoying. Version of "com.google.android.tvlauncher" is 3.5.3-434707177-f (the latest via Play Store).
    Uninstalling updates to the launcher (effectively reverting to 3.1.2-3668464-f) fixes this.
  • Can't seem to find the option to enable adb over network in the developer settings.

Thanks for your efforts on this!
 
Last edited:

espchl

Member
May 21, 2022
10
0
You should be able to use the exploit now. If that does not work you should try the custom exploit in post #782. No expert just sharing my experience.
Thank you for your help. It's still not working. After using the custom exploit the device is stuck in a bootloop (orange led turning on an off).
@espchl: What you should do is put back the 19.1 (not 18.1) recovery:
Code:
sudo ./update partition recovery lineage-19.1-20220515-recovery-sabrina.img
and see whether that lets you boot into fastbootd.
Thanks. But somehow it's also not working. Seems I'm not able to write to recovery anymore.

It looks like there is some error...

Code:
file size is 0x1800000
AmlUsbTplCmd = download store recovery normal 0x1800000 rettemp = 1 buffer = download store recovery normal 0x1800000
AmlUsbReadStatus retusb = 1
[update]ERR(L306):cmdret=[]
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Additionally, dopinder, wade, and Deadpool all boot now.
    3
    People who brick their Sabrina - here's a gift: https://github.com/npjohnson/sabrina-unlock/blob/main/repair.sh

    This will repair pretty much any Sabrina that is broken.
    3
    Just got a dopinder from Walmart and read through all 48+ pages of this thread -- thanks everyone for all your contributions.

    Before flashing the latest 19.1 LineageOS build, is there anything I should (or shouldn't) do with the device? Should I plug it in and let it update to the latest update (if one is available, depending what build it shipped with)? Or does it really not matter one way or another if I'm going to flash LineageOS?

    Just want to make sure they didn't do something screwy like lock the bootloader and/or disable unlocking, etc.

    Thanks in advance.
    Update to newest build on stock.

    Enable ADB.

    adb reboot bootloader
    fastboot oem 'setenv lock 10101000;save'
    fastboot reboot bootloader
    fastboot flashing unlock
    fastboot flash dtb lineage-dtb.img
    fastboot flash dtbo lineage-dtbo.img
    fastboot flash recovery lineage-recovery.img
    fastboot reboot-bootloader
    fastboot boot lineage-recovery.img

    Use button to select "Factory Reset", "Wipe Data", once complete, "Apply Update", "From ADB"

    Then adb side load /path/to/lineage.zip, click reboot, profit.
    3
    Fun fact - GXL/GXM support is incoming. VIM1/VIM2/ADT-2 to start, but people should be able to use these to bring up dev boards and china boxes with nominal effort.
    2
    Builds still in progress by chance? Just checked and the folder still looks empty here: https://download.ods.ninja/Android/lineage/dopinder/

    I cannot thank you enough for supporting all of these devices! Greatly appreciated!
    Yup, give it 2 days. TVs last
  • 21
    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 19.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:
    • deadpool - Google ADT-3
    • dopinder - Walmart Onn UHD Box
    • sabrina - Chromecast with Google TV - Broken at the moment - working on fixing it.
    • wade - Walmart Dynalink 4K Box
    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:
    • SELinux is permissive, this is only due to a lack of time to put together a decent looking sepolicy for these devices.
    • (sabrina only) The remote firmware sometimes gets hung up, you can reboot to solve this issue.
    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. L1 certificates, and the mechanism that reports is all still exist and work as expected.

    • Can I haz Netflix?

      Yup, but only if your devices stock build supports it.

    • 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. It will likely pass after we finish enforcing SELinux, though.

    • 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
    • bgcngm
    13
    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!
    6
    Note:

    Since the Lineage Android TV Builds for this little box (aka Boxes), are stable for the most part, but seems
    people are bouncing back in forth from Stock to Lineage and back to stock.

    I created a batch file that will auto flash the stock images and wipe data and so on.. pretty much it will
    make your box as it was when you first booted it after taking it home to try it.

    2nd, I also created a batch file that will backup current images.. No need for a fancy recovery or anything like the
    such. it will use the worldcup or what I like to say, USB Burn mode, and backup each and every partition.
    as well as some not so much needed ones like, misc and metadata. (Just for giggles)..

    backups will be copied to backup dir, I also created a separate batch file to restore your backup.


    I am one that hates doing things the long way over and over, so I always create ways to make things simple
    in the future for people.

    This way, you all can test your hearts out all the new lineages and still have your full Stock backup (including data).
    and restore back in forth as you wish.

    I will upload the backup_restore zip package as soon as I can and with @npjohnson permission I will link
    in thread. Otherwise you will have to just DM/PM me and ill link you the location.

    I am just trying to help the many that I seen complain and dont understand how to go back in forth.
    so with this script, it should take care of most on that. No Fancy Recovery needed...

    you will need worldcup driver for Amlogic........ you can find that on your own.

    Also, to get into USB Burn mode, press side button while plugging in USB cable.
    Keep pressing till you see the LOGO or hear the sound from your computer.

    then just run the batch file and wait..

    if its easier for you:

    Run the batch file, it will keep saying waiting for device..
    Just press the side button while plugging in USB, when you see it start, then release button...........
    and wait till finished..

    Only TESTED On Dopinder Boxes, but im sure they are all the same as for the partition layouts.
    5
    I ultimately settled on 1126400000, gives ~1.1GB to the system and accommodates the app adjustments I've been making for my builds without tripping OpenGApps' space check for TV stock
    this ended up being _wayyyyy_ to much, as this is the full value of the partition vs just the space to reserve, both will work, but we want to split it amongst partitions. One of our guys recalculated it and got it working.

    Should be good to build now from breakfast/extract-files (or syncing the muppets).

    Only thing left is hardware OMX. Hopefully we can figure it out!
    4
    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