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

Search This thread

instylz

Member
Jan 19, 2007
29
10
NJ
Can anyone tell if the discussed devices have any problems with chargers more powerful than recommended 1000mA?
The power supply for dopinder is piece of garbage, but nowadays it's not too easy to find a high-quality replacement with equal power, so I would like to power it with 2.4A, but still afraid to burn something.
Not sure why nobody replied to this. It's completely safe. Your device will downregulate it's charge to match what it was designed to accept.
 
  • Love
Reactions: Big Dumb Object

goapy

Senior Member
Dec 30, 2021
133
34
After reading #853, and @kennkanniff 's advice, I was able to upload 18.1 recovery again without error. Going to order a usb-c adapter, to boot ubuntu and try to dd the factory recovery.

Code:
./update partition recovery lineage-18.1-20220324-recovery-sabrina.img

Flashed recovery without errors.

You can flash any recovery partition image with the update utility. You can use it instead of dd to flash the factory recovery.

Had to use the Exploit from here to be able to flash again. But maybe just bad luck.

Even after flashing 18.1 again, still stuck at bootloop and no working fastboot.

Yeah! Thanks for your help. Seemed to work, but still bootloop and not able to enter fastboot.

With the exploit that you reference above, you can also use the update utility to start bootloader fastboot directly.

./update bulkcmd fastboot

You could try erasing the data and cache partitions (using bootloader fastboot) to see if the 18.1 recovery (that is already flashed) will then be able to load. That has worked for me before.

Or, describe the state that your device was in before things went wrong. Did it have a previous version of los or the factory os installed?
 
Last edited:

espchl

Member
May 21, 2022
10
0
thanks for your help @goapy

You can flash any recovery partition image with the update utility. You can use it instead of dd to flash the factory recovery.
That makes sense. Good to know.
With the exploit that you reference above, you can also use the update utility to start bootloader fastboot directly.

./update bulkcmd fastboot

You could try erasing the data and cache partitions (using bootloader fastboot) to see if the 18.1 recovery (that is already flashed) will then be able to load. That has worked for me before.
When in USB Burnmode, I get errors while trying to use fastboot;
Code:
./update bulkcmd fastboot
AmlUsbBulkCmd[fastboot]
[AmlUsbRom]Inf:bulkInReply failed:
ERR: AmlUsbBulkCmd failed!

when in bootloader-mode(?) (holding button while powering device), the fastboot command just times out:
Code:
./update bulkcmd fastboot
AmlUsbBulkCmd[fastboot]
AM_REQ_BULK_CMD_Handler ret=-110,blkcmd=fastboot error_msg=error sending control message: Connection timed out
[AmlUsbRom]Err:rettemp = 0 buffer = [fastboot]
ERR: AmlUsbBulkCmd failed!


Or, describe the state that your device was in before things went wrong. Did it have a previous version of los or the factory os installed?
Device was new out of box (MFG 09/2020) with factory os installed.

Edit:
Is it somehow possible, to flash the factory image with "update" and start from scratch?

Edit2:
Oh dear, I'm sorry... After reading the instructions again, I realized that I missed
Code:
fastboot oem unlock
.
 
Last edited:

goapy

Senior Member
Dec 30, 2021
133
34
When in USB Burnmode, I get errors while trying to use fastboot;
Code:
./update bulkcmd fastboot
AmlUsbBulkCmd[fastboot]
[AmlUsbRom]Inf:bulkInReply failed:
ERR: AmlUsbBulkCmd failed!
That is the expected normal response when "./update bulkcmd fastboot" is executed successfully, the "failed!" notice notwithstanding.

After executing the above, you should immediately be able to use bootloader fastboot, without doing anything else at all whatsoever. You just use it right then, after the result above is displayed, without touching the device or rebooting.

Edit2:
Oh dear, I'm sorry... After reading the instructions again, I realized that I missed
Code:
fastboot oem unlock
.
That part of the instructions is sort of a generic instruction that doesn't really apply to sabrina or any of the supported devices.

The device may have already been unlocked if you previously ran the original exploit script. You can check it at any time with;
fastboot getvar unlocked
or
fastboot getvar all
 

espchl

Member
May 21, 2022
10
0
That is the expected normal response when "./update bulkcmd fastboot" is executed successfully, the "failed!" notice notwithstanding.

After executing the above, you should immediately be able to use bootloader fastboot, without doing anything else at all whatsoever. You just use it right then, after the result above is displayed, without touching the device or rebooting.
Even though it's not possible to execute any fastboot commads. You talk about executing them through "bulkcmd fastboot" right?
All I get is this same error. For example:
Code:
./update bulkcmd  fastboot getvar unlocked
AmlUsbBulkCmd[unlocked]
[AmlUsbRom]Inf:bulkInReply failed:
ERR: AmlUsbBulkCmd failed!
The same goes for using the fastboot commands in quotation marks.

Using fastboot on my computer doesn't detect the device at all.


The device may have already been unlocked if you previously ran the original exploit script. You can check it at any time with;
fastboot getvar unlocked
or
fastboot getvar all
Thank you. Yes. I'm pretty sure the exploit worked and the device was successfully unlocked. I flashed Lineage 19.1 using adb through Lineage recovery.

It's maybe time to stop flooding this thread and open a new one...

That part of the instructions is sort of a generic instruction that doesn't really apply to sabrina or any of the supported devices.
Aight. Thatnks for clarification.
 

goapy

Senior Member
Dec 30, 2021
133
34
Even though it's not possible to execute any fastboot commads. You talk about executing them through "bulkcmd fastboot" right?
No, the fastboot commands are not executed through the update utility.

They are executed using the fastboot binary directly.

What executing "./update bulkcmd fastboot" does is change the usb connection from using the worldcup drivers to using the fastboot/adb drivers.

You're done with update then, and then you run the fastboot binary directly.

If using the fastboot binary directly doesn't work, and you're sure that you have the fastboot/adb (android) driver installed, sometimes it takes a second execution of "./update bulkcmd fastboot" to make it work.

If the fastboot binary won't run directly even after one or two executions of "./update bulkcmd fastboot", then I'm at a loss and have no other ideas, except to say that you can use the update utility to do pretty much everything that bootloader fastboot can do. So, not much is lost if you can't access bootloader fastboot but can access burn mode and use the update utility.
 
Last edited:

Wagmans

Senior Member
Nov 9, 2013
68
7
Thanks! It's too bad that usb burning mode is increasingly being disabled in new model devices. The askey ASK-STI6220 (S905X4) doesn't have it. The uboot menu is missing "update - Enter v2 usbburning mode". They've replaced it with a distinct version of fastboot (different than bootloader fastboot and fastbootd). Even masking the rom brings up only this mini version of fastboot. And it is no where near as capable as usb burning mode.
I've had one of these Fios Stream TV Gen2 sitting around for a while- now that Coreelec supports S905x4 devices I'm wondering if you've gotten anywhere with it? You should at least be able to boot off a USB flashdrive- I'm not even talking about rooting it. I can't even figure out how to get into recovery mode reliably.
 

goapy

Senior Member
Dec 30, 2021
133
34
I've had one of these Fios Stream TV Gen2 sitting around for a while- now that Coreelec supports S905x4 devices I'm wondering if you've gotten anywhere with it? You should at least be able to boot off a USB flashdrive- I'm not even talking about rooting it. I can't even figure out how to get into recovery mode reliably.
This should probably be discussed in a different thread. But to answer briefly, the post to which you responded was merely about modern amlogic SoCs (such as the X4, Y4 and others) replacing "v2 usbburning mode" with "Amlogic DNL protocol". Askey's sti6220d315 (verizon stream tv v2) is one device to which this applies. I describe this slightly more thoroughly in this thread.

Whatever "factory" mode may be used to recover a device is separate and apart from other amlogic features.

The sti6220d315's bootloader is readily unlocked, and the device does not use secure boot or an encrypted bootloader. The button on the top of the device will force an adnl (Amlogic DNL protocol) connection if the usb c port is connected to a host computer, or will reboot to recovery if the usb c port is not connected to a host computer. Note that the usb a port can only be used for peripherals, not for a slave connection.

Overall, running an alternate os on the sti6220d315 should be possible and straightforward, but I haven't done it yet.
 

TabascoJoe

Senior Member
Jul 20, 2007
121
10
Latest 19.1 image and recovery are working...
It was a lot of trial and error (dont ask)
but after an hour the dopinder is working
ty
 

TabascoJoe

Senior Member
Jul 20, 2007
121
10
how?
im on wade and ive been waiting for a way to get 19.1 working with its recovery, since i dont wanna fiddle with the 18.1 recovery.
how did you manage to do it? unless its device specific...
I think it is...
The instructions talked about flashing dtb and the dtbo partition, so I did that...
Other than that, dont ask... a lot of reboots and reflashes to get to the recovery, but finally it worked
Proof attached
proof1.png
proof2.png
 

curryrice71

Member
Sep 14, 2008
6
0
I'm trying this on my Walmart ONN 4K box/dopinder. I got to this point in the steps:

Run sudo ./update bulkcmd fastboot and enter your sudo password.

I'm not sure it works though, I get this:

[update]No [WorldCup Device] device after scan
[update]ERR(L1095):can not find device

I ran the steps exactly up to that point. It's not bricked and I can reboot back into Android TV. It's running 1.01.35 firmware. Is the firmware too new?

Since the output from the update bulkcmd fastboot command didn't look right I just stopped at that point.

Right before that step it says to go into burn mode. Does 'adb reboot bootloader' put it in burn mode or do i need to hold down the button or something when i power it on?

Thanks in advance for any advice.
 

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