• 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

lmore377

Member
Jul 2, 2016
32
5
I didn't know that was a command but it worked. I'll let you know how it goes once it finishes sideloading.
Still stuck on the lineage os boot animation. I'm thinking maybe there's just something wrong with my box (I've been messing with it before all of this) so I might pick up another tomorrow and try it with that.

Edit: I just realized I've been talking to you thru reddit lol. I'm lmore3 on there.
 
Last edited:

npjohnson

Recognized Developer
Still stuck on the lineage os boot animation. I'm thinking maybe there's just something wrong with my box (I've been messing with it before all of this) so I might pick up another tomorrow and try it with that.

Edit: I just realized I've been talking to you thru reddit lol. I'm lmore3 on there.
Lol, reddit chat will be easier to debug, I'll hit you up there tomorrow.
 

BlacKn1ght

New member
Apr 19, 2016
1
0
Hello, I've unlocked the bootloader for flashing, however when I try to flash the DTB image I get an error:

$ fastboot flash dtb lineage-18.1-20210802-dtb-dopinder.img Sending 'dtb' (81 KB) OKAY [ 0.003s] Writing 'dtb' FAILED (remote: 'No such file or directory') fastboot: error: Command failed

Is there anything that I'm doing wrong? The DTBO image flashes fine though.
 

MDMAchine

Member
Jul 14, 2010
36
25
LG V20
Google Pixel 4a 5G
Same issue as above when flashing dtb.

Code:
fastboot flash dtb /Users/mdmachine/Desktop/Onn\ 4k\ TV/DTB/lineage-18.1-20210802-dtb-dopinder.img
ERROR: Couldn't create a device interface iterator: (e00002bd)
ERROR: Couldn't create a device interface iterator: (e00002bd)
target reported max download size of 536870912 bytes
sending 'dtb' (81 KB)...
OKAY [  0.005s]
writing 'dtb'...
FAILED (remote: No such file or directory)
finished. total time: 0.007s

If I move along into lineage recovery, obviously I cant do anything.
And after a reset it's back to stock recovery.
 
  • Like
Reactions: BlacKn1ght

TR3275

Member
Apr 8, 2015
12
0
Android Wear
AT&T LG G5
Which features from Google TV was included in the LineageOS build? The one feature I wish the Android TV that Google TV has is the multiple profile support. I want to set up my Onn. 4K box with a kids profile. So far my options have been limited.
 
Mar 16, 2015
48
37
Be careful guys, just bricked one of mine by doing adb reboot bootloader, then flashing dtb and dtbo.
Should note the instructions say to use fastboot but dtb won't flash unless in bootloader.
Now my Onn 4K only boots to the Amlogic flash mode which only the USB Burning Tool can use,
I'd need a full system dump ".img" of the device to unbrick it.
If any of you can make one if you have root working I'd greatly appreciate it!
 

lmore377

Member
Jul 2, 2016
32
5
Be careful guys, just bricked one of mine by doing adb reboot bootloader, then flashing dtb and dtbo.
Should note the instructions say to use fastboot but dtb won't flash unless in bootloader.
Now my Onn 4K only boots to the Amlogic flash mode which only the USB Burning Tool can use,
I'd need a full system dump ".img" of the device to unbrick it.
If any of you can make one if you have root working I'd greatly appreciate it!
Do you have soldering experience and a serial adapter or arduino? If you do, you can stop the box from going to burn mode and get fastboot again so you can flash the factory image. I'll walk you through it.
 

MDMAchine

Member
Jul 14, 2010
36
25
LG V20
Google Pixel 4a 5G
Be careful guys, just bricked one of mine by doing adb reboot bootloader, then flashing dtb and dtbo.
Should note the instructions say to use fastboot but dtb won't flash unless in bootloader.
Now my Onn 4K only boots to the Amlogic flash mode which only the USB Burning Tool can use,
I'd need a full system dump ".img" of the device to unbrick it.
If any of you can make one if you have root working I'd greatly appreciate it!
Too late lol....
 

lmore377

Member
Jul 2, 2016
32
5
If your box still shows the bootlogo it can be unbricked. There is no image available that can be flashed through burn mode but if you can open up the box and solder some wires to a serial adapter you can interrupt uboot before it goes into burn mode and make it go into fastboot mode instead and you can flash the factory images in the main post. I'll make a tutorial in a bit.
 
  • Like
Reactions: criscodecookies

npjohnson

Recognized Developer
Are you planning to support other amlogic boards like s912 tx92??
No. Different generation of chip.
Be careful guys, just bricked one of mine by doing adb reboot bootloader, then flashing dtb and dtbo.
Should note the instructions say to use fastboot but dtb won't flash unless in bootloader.
Now my Onn 4K only boots to the Amlogic flash mode which only the USB Burning Tool can use,
I'd need a full system dump ".img" of the device to unbrick it.
If any of you can make one if you have root working I'd greatly appreciate it!


If your box still shows the bootlogo it can be unbricked. There is no image available that can be flashed through burn mode but if you can open up the box and solder some wires to a serial adapter you can interrupt uboot before it goes into burn mode and make it go into fastboot mode instead and you can flash the factory images in the main post. I'll make a tutorial in a bit.
I've crossed out the links in the OP - further investigation is needed.

but there is a full factory image with DTB linked in the FAQ.

Install this driver: https://drive.google.com/file/d/1q3Hwrmx-YCrw9U5JGtI2Ocn06zPkjrEG/view?usp=sharing

Download the amlogic `update` tool http://openlinux2.amlogic.com/download/A113/Tool/flash-tool-v4.7/flash-tool/tools/windows/ and run `update.exe bulkcmd fastboot` - then you can flash the factory image as usual.

Sorry about this, AML DTB's are... weird compared to other devices.
 
Last edited:

lmore377

Member
Jul 2, 2016
32
5
1. Open up the case and take out the PCB. You can do this however you want but it seems like the easiest way to do it is with two plastic cards. Be careful along the edge where the button is because you can snap off the plastic bit and it'll be a lot harder to push the button.

2. Solder a USB to Serial adapter with the following pinout (except for VCC)

PXL_20210804_004224874.MP~2.jpg


3. Plug the adapter into your computer and open up a terminal program

4. Hold down control + C on your keyboard while plugging the box into your computer with micro USB. A lot of text should fly by then you should be met with 'g12a_u212_v1#'

5. Type fastboot and hit enter. Download the factory image if you haven't already. Before anything, do 'fastboot flash dtb dtb.img' then finally you can run flash_all.sh or just flash them all manually.

Edit: or just do what the post above says lol. That one didn't show up until I posted this.
 
Mar 16, 2015
48
37

I was aware of the risks of flashing an unofficial ROM and knew there was no way to enter recovery using the remote like with the Mi Box.

1. Open up the case and take out the PCB. You can do this however you want but it seems like the easiest way to do it is with two plastic cards. Be careful along the edge where the button is because you can snap off the plastic bit and it'll be a lot harder to push the button.

2. Solder a USB to Serial adapter with the following pinout (except for VCC)

View attachment 5377401

3. Plug the adapter into your computer and open up a terminal program

4. Hold down control + C on your keyboard while plugging the box into your computer with micro USB. A lot of text should fly by then you should be met with 'g12a_u212_v1#'

5. Type fastboot and hit enter. Download the factory image if you haven't already. Before anything, do 'fastboot flash dtb dtb.img' then finally you can run flash_all.sh or just flash them all manually.

Edit: or just do what the post above says lol. That one didn't show up until I posted this.

No. Different generation of chip.





I've crossed out the links in the OP - further investigation is needed.

but there is a full factory image with DTB linked in the FAQ.

Download the amlogic `update` tool http://openlinux2.amlogic.com/download/A113/Tool/flash-tool-v4.7/flash-tool/tools/windows/ and run `update.exe bulkcmd fastboot` - then you can flash the factory image as usual.

Sorry about this, AML DTB's are... weird compared to other devices.

It's great to see there's multiple solutions/options especially so quickly, thank you both!
I can confirm the amlogic update command worked and flashing the factory image has it running again.
At least now the chances for a true brick are minimal given these options.
 

JMBN.

New member
Aug 4, 2021
1
0
Thsnks for the effort.
How come you guys decided to include Google launcher with ads rather than one of the alternatives with no ads?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 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
    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 😊
    2
    Will this ROM ever get fixed? Honestly all it needs to be just about perfect is for video playback to work smoothly and the on screen keyboard to work. Not asking for an ETA, just wondering if these are issues planned to be resolved sometime.
    2
    facepalm. I totally overlooked the fact that you are using the onn tv box , i have the dynalink (wade) so the remote is a little different. i was too lazy to drive to walmart and dynalink is on amazon. how did you determine what scancode each key was? thats all i need to figure out. and finally... anyone know where i can buy a remote that is the same layout and button count as the one with the onn box that is actually blutooth not some stupid usb dongle on 2.4ghtz? just curious. i'm almost thinking of just gettting the onn box and returning it without the remote and see if they take it lol
    Dyanlink's remote isn't 2.4ghz - it's IR. the box has a receiver in it. Check dmesg for info. That's why it works in recovery so easily.

    I have the dopinder and have successfully booted up into lineage, seems like it's working but I'm stuck on the connect the remote screen. I hold the back and home button and the remote starts flashing with a green light, but it never connects to the device. Am I missing something? I've tried my best to search this post for other people having a similar issue but have come up empty. Anyone able to help me solve this? Should I just try reflashing or doing another factory reset?

    Some how I got it to work, so never mind about that. I just held the two buttons and once it started flashing I set the remote down next to dopinder and ran to another room for something and when I got back it was connected.
    It can be a little finniky.
    On a Dopinder, would I be able to unlock the bootloader and then sideload magisk to root on stock without first installing lineageOS and reverting to stock?
    yeah that works fine.
    Is there any way to enable wireless debugging on the dopinder? I really don't want to have to move it to my PC every time I want to sideload an APK.

    Also, another quick question. I have a Chromecast Ultra that has the brick with an ethernet port. It works just fine with the Chromecast Ultra, but when I plugged it into the dopinder it doesn't detect that there's an Ethernet plugged into it. I forgot to check if it even worked with the stock image, so I wasn't sure if it was lineage or the device itself.

    I couldn't find an answer to either of these questions within this thread so, hopefully I'm not being repetitive.
    you can do it the old fassioned way via adb with adb root.
    is there a way to boot directly to bootlader on wade with a button hold or something? i cant get my remote or any remote to pair after i flashed factory image and i think its cuz i did it in fastbootd not bootloader but now i cant get back and have no adb access...
    normally I'd say fastbootd in recovery, but if you flashed stock recovery no fastbootd. That sucks. I would say your best bet is to get UART hooked up on the board itself (it's all marked on the board), and then interrupt u-boot and run `fastboot`, should drop you to bootloader mode.
    Do I absolutely need a powered USB hub to do this? If so, can you guys help me figure out which USB hub to buy, please? Can I not just use the button on the side of the unit to select something from the menu and hold down the button to press "return"?

    I want to try and load the default ROM onto my Onn UHD box from Walmart.

    I have a pair of these micro-OTG splitter things. I have a MacBook that I can connect to the device and use ADB.

    Can I do everything over ADB instead? Like send the data and use ADB commands like

    ./adb shell input text "what you want to type in"
    ./adb shell input keyevent 66

    to issue commands like "up arrow" and "down arrow", etc?

    Is this possible?
    yeah you can https://stackoverflow.com/questions/7789826/adb-shell-input-events
    Did you mean to link to something? Or are you referring to this thread that we're both on right now?

    Because I've been following this thread for many days now. Here's a description of my success in getting LineageOS running properly. But now I want to go back to stock and just get Magisk running instead.
    Easy, flash factory image, then boot lineageos recovery and flash magisk. Done.
  • 9
    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 Official 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
    4
    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