• 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

Bassmaster_lvn

New member
Jan 7, 2022
4
0
Minsk
where there is a will, there is a way.. download the firmware said in topic.. for your device.
flash it from update mode.. if you dont have the command update.exe mode, I will upload a copy and all you have to do is add the images you downloaded into the images directory and click the restare.bat file and wait..

I personally custom a script that will auto flash everything back as if it was first bought.. that might help you..
just let me know.


EDIT: OOPSIE: I mean the stock firmware.. Download that for your device.. Not the Lineage ones..
you can do the lineage ones after you restore your device..
OK, the standard firmware has already been downloaded. Update.exe returns an error.
 

Attachments

  • 2022-01-09_025524.jpg
    2022-01-09_025524.jpg
    94.1 KB · Views: 39

goapy

Member
Dec 30, 2021
15
2
OK, the standard firmware has already been downloaded. Update.exe returns an error.

How did your device fail? Was it after installing this lineage release?

What are you using for "standard firmware". Is it the files within wade-qt.20210326-factory.zip, or another source?

I did this not too long ago, but I didn't keep any notes. I vaguely remember using commands like the following (using the files from wade-qt.20210326-factory.zip):

Code:
update mwrite dtb.img mem dtb normal
update partition _aml_dtb dtb.img
update bulkcmd "disk_initial 0"
update partition dtbo dtbo.img
update partition recovery recovery.img
update partition super super.img
update partition vbmeta vbmeta.img

I think I got an rb error for boot.img and bootloader.img, but the existing partitions must have been okay, or else I was able to use fastboot by then to flash those partitions. Note that I hadn't used update before, so I was unfamiliar with its usage.
 
Last edited:

Bassmaster_lvn

New member
Jan 7, 2022
4
0
Minsk
I can't help but notice the Cyrillic. Is the dynalink a popular device in Russia?

How did your device fail? Was it after installing this lineage release?

What are you using for "standard firmware". Is it the files within wade-qt.20210326-factory.zip, or another source?

I did this not too long ago, but I didn't keep any notes. I vaguely remember using commands like the following (using the files from wade-qt.20210326-factory.zip):

update mwrite dtb.img mem dtb normal update partition dtbo dtbo.img update partition recovery recovery.img update partition super super.img update partition vbmeta vbmeta.img I may have also used (but I'm not sure): update bulkcmd "disk_initial 0"

I think I got an rb error for boot.img and bootloader.img, but the existing partitions must have been okay, or else I was able to use fastboot by then to flash those partitions. Note that I hadn't used update before, so I was unfamiliar with its usage.
Yes, I use wade-qt.20210326-factory.zip . Most likely I accidentally started flashing the firmware from adt-3 ((
 

Attachments

  • 2022-01-09_025524.jpg
    2022-01-09_025524.jpg
    272.5 KB · Views: 22
Last edited:

Eliminater74

Recognized Developer
What's the most direct and efficient way to "use burn mode to unlock by hand"?

And is that mode of unlocking what is happening when the user debug build for the tivo stream 4k (ts4k) unlocks the bootloader after being burned via the USB Burning Tool (as described in a previous post here).

As an aside, the bootloader on the ts4k is unlocked after burning the user debug build via the USB Burning Tool.

However, much care has to be used in unchecking both of the erase options in the tool, or else subsequent use of burn mode will be lost!

But if such care is exercised, the bootloader on the ts4k can be repeatedly unlocked simply by burning the user debug build as described above.

e.g.:
Burn the user debug build: bootloader unlocked
Allow OTA after burning the user debug build: locked
Burn the user debug build again: unlocked.

and so on, ad infinitum.

I'm curious about the mechanism by which this is happening. Is this sort of lock/unlock sequence an effect of using burn mode, or simply the nature of the distinction between the userdebug and user builds themselves?

It doesn't seem like it could be merely the builds?

Adding the ts4k to the list of compatible devices for this lineage release may be worthwhile at some point, given that tivo seems to be bailing on android/google tv while moving to its own embedded OS for smart tvs. Plus, the ts4k is still using version 9 of atv, so this lineage release may be an especially good repurposing of the ts4k.
I have the TiVo Stream 4k as well. and I flashed that so called user debug build.. problem is this, when you
goto setting it up so you can turn debugging on, it updates it self then locks everything down again.

So I never had a chance to really test it.. but I will say, the TiVo is fast with that DDR4..

I think I have way to many Android TV Boxes.. I retired from Development on Phones and got bored, so moved into Android TV Boxes as well as Routers.. Plus Love using TiViMate for my TV Viewing Pressures.. :p
 

goapy

Member
Dec 30, 2021
15
2
I have the TiVo Stream 4k as well. and I flashed that so called user debug build.. problem is this, when you
goto setting it up so you can turn debugging on, it updates it self then locks everything down again.

So I never had a chance to really test it.. but I will say, the TiVo is fast with that DDR4..

I think I have way to many Android TV Boxes.. I retired from Development on Phones and got bored, so moved into Android TV Boxes as well as Routers.. Plus Love using TiViMate for my TV Viewing Pressures.. :p

Usb debugging and root are already on in the userdebug build. So, if you have usb connected, you can open settings via the adb shell before you setup a wifi connection during the initial setup wizard:

Code:
adb shell am start -a android.settings.SETTINGS

And then following a process similar to this one from earlier in this thread, the ota update can be bypassed. At least for a while anyway.

What I was wondering in my prior post though is whether or not the unlock obtained (by flashing the userdebug build) could be used for an alternative build like the lineage release that is the subject of this thread?
 
Last edited:

xam1988

Senior Member
Apr 28, 2013
56
10
Kiev
where there is a will, there is a way.. download the firmware said in topic.. for your device.
flash it from update mode.. if you dont have the command update.exe mode, I will upload a copy and all you have to do is add the images you downloaded into the images directory and click the restare.bat file ...
Hi, I have the same problem whis onn ((

Only this:

G12A:BL:0253b8:61aa2d;FEAT:F2F939B2:32060;POC:F;RCY:0;EMMC:0;READ:0;CHK:1F;READ:0;CHK:1F;READ:0;CHK:1F;SD?:20000;USB:8;

If you can help, plese
 

Eliminater74

Recognized Developer
Userdebug builds are a real thing, not some sketchy so-called sort of thing. Userdebug is the type of build fingerprint that is seen in all of the FCC docs when a new device is submitted.

Usb debugging and root are already on in the userdebug build. So, if you have usb connected, you can open settings via the adb shell before you setup a wifi connection during the initial setup wizard:

Code:
adb shell am start -a android.settings.SETTINGS

And then following a process similar to this one from earlier in this thread, the ota update can be bypassed. At least for a while anyway.

What I was wondering in my prior post though is what the SoC and uboot know about this userdebug build, or userdebug builds in general. Do they automatically unlock the bootloader for any userdebug build, but not for a user build? Or do these particular builds (both user and userdebug) set bootloader lock/unlock status as they boot for the first time, and therefore the unlock obtained (by flashing the userdebug build) could be used for an alternative build like the lineage release that is the subject of this thread?
ill try again when I get time.. I know I have built bootloaders in the past for other amlogic devices.. and yes they worked.. compiling a bootloader is so confusing too.. but once you get the hng of it. its pretty easy. asuming I can get done what you said.. if I can find the bootloader board code for that device.. maybe change out the bootloader.. but as far as I know, even with that userdebug edition, the bootloader is still locked and cant overwrite it.. but ill look into it once again soon.. just done have the time right now.


Edit, the lock and unlock is handled by the bootloader, and even with that userdebug edition, you have to uncheck the erase bootloader and flash.. yes have password.bin file. but it wont allow overwriting bootloader.

I htink the only dif is, userdebug is not signed privet and might be sighed with public test keys. making it
east to test things. I guess. as I said.. when I boot it would download update.. ill bypass INET connection and see what I can do. with it.
 

goapy

Member
Dec 30, 2021
15
2
as far as I know, even with that userdebug edition, the bootloader is still locked and cant overwrite it.

When you say "the bootloader is still locked and cant overwrite it", do you mean uboot (the bootloader board code in ddr_enc.usb)? Which is distinct from "unlocking the bootloader" with fastboot commands in order to allow flashing?


Edit, the lock and unlock is handled by the bootloader, and even with that userdebug edition, you have to uncheck the erase bootloader and flash.. yes have password.bin file. but it wont allow overwriting bootloader.

If erase bootloader and flash are not unchecked, USB mode changes to GX-CHIP (from worldcup) and then USB burn mode access is lost, at least with the included password.bin. What causes this to happen? Something must be overwritten, what is it?

If the change from worldcup to GX-CHIP is because "the bootloader board" code is overwritten (when those two tool options are not unchecked), then the secure image must contain new bootloader board code, correct?

Do you remember offhand in which version of the firmware they disabled oem unlock (unlocking the bootloader to allow flashing)? Do you have a copy of the firmware for the last version that allowed this?
 
Last edited:

Big Dumb Object

Senior Member
May 22, 2020
50
20
And I would like to annoy you again with another noobish question (sorry): are any of these boxes equipped with HDMI surge protection? I have heard that the HDMI ports of cheap set-top boxes sometimes die because of the economy on extra diodes, and that the third-party solutions do not quite protect against this.
 

npjohnson

Recognized Developer
And I would like to annoy you again with another noobish question (sorry): are any of these boxes equipped with HDMI surge protection? I have heard that the HDMI ports of cheap set-top boxes sometimes die because of the economy on extra diodes, and that the third-party solutions do not quite protect against this.
I don't think so?
 

Eliminater74

Recognized Developer
When you say "the bootloader is still locked and cant overwrite it", do you mean uboot (the bootloader board code in ddr_enc.usb)? Which is distinct from "unlocking the bootloader" with fastboot commands in order to allow flashing?




If erase bootloader and flash are not unchecked, USB mode changes to GX-CHIP (from worldcup) and then USB burn mode access is lost, at least with the included password.bin. What causes this to happen? Something must be overwritten, what is it?

If the change from worldcup to GX-CHIP is because "the bootloader board" code is overwritten (when those two tool options are not unchecked), then the secure image must contain new bootloader board code, correct?

Do you remember offhand in which version of the firmware they disabled oem unlock (unlocking the bootloader to allow flashing)? Do you have a copy of the firmware for the last version that allowed this?

I will have to look into this later on, DOnt know off hand. I been busy working on a TWRP for this ONN Device.
which I have working for the most part.. Just cant get system and vendor to mount.
but everything else mounts. I know system is dm-2 as well as dm-4 and vendor is dm-3 as well as dm-5

but will not mount no matter what I do. so i been racking my brain trying to figure that out.

and Just so we dont hijack this mans thread, just send me PM aka DM, on here or telegram, same username on telegram.. because I truly think we are just a bit off main subject here. Other then if we can get TiVo Stream 4k unlocked, then I am pretty sure we could get lineage on that too.. there isnt to much of a dif between s905x2 and s905y2 the y2 mainly used for small set boxes. But truth, that TiVo DDR4 RAM is fricken fast... for a cheap Box, that thing is super fast.. but the current software that is comes with isnt well designed. alot of funtions have been crippled..
 

mr.acarlton

Member
Mar 30, 2011
14
0
OnePlus 8
Noob here. Having trouble with the install.
I believe I have the Onn unlocked ok and have the new Recovery img loaded.
When I try to push the new OS down using ADB I get this:

E: failed to verify whole-file signature
Update package verification took 38.9 s (result 1).
E:Signature verification failed
E: error 21

Install from ADB completed with status 2.
Installation aborted.


When I restart the device, it just loads the stock OS as if nothing happened.

I'm using the latest Lineage zip file on the downloads page for the Onn device.
Onn device has Firmware 1.01.32
Version 10
Android security patch level August5. 2021
Build onn-user 10 QT 20210902 release-keys

Any idea what I'm doing wrong?
i get the same
 

Top Liked Posts

  • There are no posts matching your filters.
  • 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.
    1
    I used USB Burning mode to flash the images with Amlogic Updater tool..
    just couldnt get dtb to flash only dtb0............ But still it reset it and flashed..

    but yes new firmware stops everything from working.........

    If you were able to restore the factory firmware using usb mode, then the bootloader shouldn't be locked.

    I found a version of the Amlogic USB update tool (update.exe) and was able to recover my device to the 20210326 factory firmware. The bootloader is still unlocked, so all is good with this device. I don't know why I had trouble the first time.
    1
    Could it be that you found a clue for OMX problem?
    I have a few ideas to try once home from holidays.

    I'm hoping 12 just fixes it, but I bricked my Deadpool hard. So. Limited atm. Lol
    1
    please tell me if there is support afr for onn. box?
    afr?

    Adaptive framerate? No. It doesn't have android 12, nor support it yet.
    1
    I would like to try the script/mod for my own curiosity. I am an intermediate adb-fastboot user. But it will be a great learning experience.

    Are you going to create a thread to maintain this mod or post it on Github?

    Thanks... 👍
    its not really a mod. its just a helper script for the devices listed in thread..
    In other words, you download the stock rom that the OP displays link too.
    and unzip it, and add the contents to stock_image directory

    then run restore_stock_askey_adt3.bat and wait.. it will do everything needed to get your box back to stock, as if you just bought it and took it home.


    Another good thing about this, using USB Burn Mode, you pretty much cant brick your device and if you do, you can still restore it. As long as you dont completely flash some messed up bootloader from another device or something.. you can restore it with no problem.. pretty much zero chance of bricking..
  • 18
    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
    10
    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
    This is is exactly what I've been waating to do just didn't want to go through the tedious parrt of figuring out the keymap remapping scheme . Could you share your changes or point me in the right direction? Also can I get some clarification on DRM is it working or not working ? The OP is a little confusing. If I understand correctly it is not working but only because od broken HW omx not bootloader unlock so it's just a bug not a limitation. Or is that incorrect? (I'll help with development btw, synced tree last night . Gonna dive in tonight)
    Netflix and Amazon Prime 4k work with Magisk on stock, safetynet ctsProfile does fail but looks like it doesn't matter like OP said.

    For remap I placed the attached folder in /data/adb/modules