• 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

npjohnson

Recognized Developer
It's alarming! If the Walmart has declared war on this thread, we may soon be left with no cheap options for purchase. Can you clarify the release date of the nasty update? Apparently, all Dynalinks (and possibly Onns) manufactured later that date can be left in the store with calm. (But confirmation still needed.)
Again, please stop spreading this, I just updated mine, and it is still unlockable
 
  • Like
Reactions: BTK19 and vandyman

UnionBlvd

Senior Member
Aug 12, 2012
89
22
Okay, so if you can flash things, the bootloader is already unlocked, and as I suspected, that's not the worry.

Self built lineage wouldn't boot until about a month ago, as selinux policy wasn't done.
I could flash things prior to the latest Dynalink OTA - I cannot flash anything now. I'm setting up my PC with the burn mode tools as we speak, will report back.
 

UnionBlvd

Senior Member
Aug 12, 2012
89
22
I keep hearing that "Unlocking is disabled" - can someone please send me the failure command of them trying to do so?
FAILED (remote: 'unlock_ability is 0, can not unlock')
fastboot: error: Command failed

This is after booting into the libusb-WorldCup mode, then using the Amlogic bootloader console to init fastboot, then issuing fastboot flashing unlock.

After some trial and error I got the burn tool to recognize my device (had to use version 2.1.7.1, the latest version would not work) - but it looks like it's meant for installing complete .img packages, how can I unlock the device with this without bricking it?
 

npjohnson

Recognized Developer
FAILED (remote: 'unlock_ability is 0, can not unlock')
fastboot: error: Command failed

This is after booting into the libusb-WorldCup mode, then using the Amlogic bootloader console to init fastboot, then issuing fastboot flashing unlock.

After some trial and error I got the burn tool to recognize my device (had to use version 2.1.7.1, the latest version would not work) - but it looks like it's meant for installing complete .img packages, how can I unlock the device with this without bricking it?
Did they put a toggle in Dev Settings?

Try this from bootloader mode
fastboot oem 'setenv lock 10101000;save'
fastboot reboot bootloader
fastboot flashing unlock
 
  • Like
Reactions: UnionBlvd

UnionBlvd

Senior Member
Aug 12, 2012
89
22
Did they put a toggle in Dev Settings?

Try this from bootloader mode
fastboot oem 'setenv lock 10101000;save'
fastboot reboot bootloader
fastboot flashing unlock
That did the trick (y) strangely I could not get the Lineage recovery to stick at first, even after rebooting to confirm the data wipe I kept getting back to the stock recovery. Only by going into stock recovery, then fastboot, then flashing the Lineage recovery was I able to get the Lineage recovery going.

Successfully sideloaded the 11/18 build and all looks good so far.
 

npjohnson

Recognized Developer
That did the trick (y) strangely I could not get the Lineage recovery to stick at first, even after rebooting to confirm the data wipe I kept getting back to the stock recovery. Only by going into stock recovery, then fastboot, then flashing the Lineage recovery was I able to get the Lineage recovery going.

Successfully sideloaded the 11/18 build and all looks good so far.
Okay, so this is fun, I know exactly what they did here, and it's not intentional, I reported a bug to the underlying ODM sometime ago, and have had no response, looks like they fixed part of it!

I'll end up posting a write-up on our work blog at some point. I'll link it here, but for now, that method will work to unlock all of these boxes except for Sabrina.
 

retyre

Senior Member
Jan 14, 2011
295
309
Central FL
well that's a kick in the balls. why don't you just tell me santa doesn't exist while you're at it 🤷😊
The biggest challenge with TWRP is encryption. If you're willing to remove encryption on your device (I'm not sure a $20 TV dongle is deserving of encryption, TBH), . BTW, removing encryption will require a factory reset (of course, backup your apps+data with Swift Backup and copy everything from /sdcard to USB or PC before reset; you will have to set up your device from scratch, though).

If you're ready to do the above, post here and we can take this to PM.
 

Averix

Senior Member
Jun 18, 2010
231
125
Kahului
That did the trick (y) strangely I could not get the Lineage recovery to stick at first, even after rebooting to confirm the data wipe I kept getting back to the stock recovery. Only by going into stock recovery, then fastboot, then flashing the Lineage recovery was I able to get the Lineage recovery going.

Successfully sideloaded the 11/18 build and all looks good so far.
Ok, I've tried this and about everything else on here. I seem to have gotten the ONN unlocked, I can fastboot and flash the lineage recovery image. No matter what order I do it in or using the stock recovery first, I cannot get the lineage recovery to stick. When I boot off of an external lineage recovery file, it appears, but not sure that gets me anywhere without an OTG hub and keyboard. Any advice?
EDIT: Nevermind. Followed this sequence that was way earlier in this thread. Worked to get things up and running!
#after unlocking and re-enabling USB debug
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
 
Last edited:

hp420

Senior Member
Jul 31, 2011
2,570
1,430
Gainesville, Fl
Google Nexus 4
T-Mobile LG G2
The biggest challenge with TWRP is encryption. If you're willing to remove encryption on your device (I'm not sure a $20 TV dongle is deserving of encryption, TBH), . BTW, removing encryption will require a factory reset (of course, backup your apps+data with Swift Backup and copy everything from /sdcard to USB or PC before reset; you will have to set up your device from scratch, though).

If you're ready to do the above, post here and we can take this to PM.
i don't have a setup capable of a build environment unfortunately...but thank you for offering to help!! 😊
 

retyre

Senior Member
Jan 14, 2011
295
309
Central FL
i don't have a setup capable of a build environment unfortunately...but thank you for offering to help!! 😊
No one's telling you to build, yo:

tw.jpg


Well, one can only offer.
 
  • Like
Reactions: hp420

zaxiby

New member
Oct 4, 2017
2
1
Referring to an ONN. firmware *0902.
Does installing LineageOS allow me to regain write privileges to external usb storage? I'm not talking about the adopted storage trick. I want to write to a sd card for DVR purposes. After rooting with Magisk I'm able to write to the card (and anywhere else) through ADB. FX explorer complains about no support for the "Android Storage Access Framework".
Yeah I'm aware that external write privileges were stolen after the last update and if there's a work around, damned if I can find it. No offence to the LineageOS fans, but otherwise I'm happy with stock.
 

hp420

Senior Member
Jul 31, 2011
2,570
1,430
Gainesville, Fl
Google Nexus 4
T-Mobile LG G2
No one's telling you to build, yo:

View attachment 5473225

Well, one can only offer.
well now we're talking!!! ☺️ i can ditch all my stuff and start from scratch on the fly, no big deal. everything's just a couple apps since storage is so lacking. i don't even need any of the good widevine stuff for netflix, hulu, etc. drop me a pm with some details please, and i'll fire this sucker up.

thank you!!!
 

Averix

Senior Member
Jun 18, 2010
231
125
Kahului
Random question. Is there anyway to skip the Google sign in during set up? We used to be able to do that on older Android TV versions, but at some point Google started forcing users to log in. I'm wondering if there's something in this build that can be set or changed to disable that and go back to an account less setup.
 

npjohnson

Recognized Developer
Random question. Is there anyway to skip the Google sign in during set up? We used to be able to do that on older Android TV versions, but at some point Google started forcing users to log in. I'm wondering if there's something in this build that can be set or changed to disable that and go back to an account less setup.
not if you use GApps sadly.
 

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..
  • 17
    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