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

Status
Not open for further replies.
Search This thread

dirtcat

Member
Aug 17, 2021
18
3
Both YES.
To watch YouTube freely, check out NewPipe first. To block ads on rooted device I can advise AdAway, but there are plenty of other root-less alternatives that work by running a local VPN.


Start by checking out the official documentation HERE.
I'm concerned about not being able to navigate through YouTube with the remote control. I will try NewPipe but I'm hoping that the rooted AdAway actually blocks YouTube ads - I'm really not sure that it will.

As for Magisk documentation, XDA recently published this article on the process. It would be nice to know if somebody has already done the work on this specific Onn Android TV device. If not, it looks like I'm just going to have to give it a go.
 

dirtcat

Member
Aug 17, 2021
18
3
Does anybody have a link to the factory OS/image/whatever for this device?

I want to "start fresh" and see if I can get Magisk working on the stock image.
 

Online Gravy

Senior Member
May 25, 2018
88
22
Folks - it looks like to truly root this Onn device I need to install Magisk. I need some help installing this! Can anybody guide me?

Also, two questions:

- I guess if I've gotten as far as installing this Lineage OS, then the bootloader is unlocked, right?
- If the bootloader is unlocked ... then can I use the stock OS that came with this device and root it with Magisk ... and use Netflix like normal and install an ad blocker? My goal is to be able to watch YouTube without ads!
The YouTube apps ad delivery system is extremely complex, you can't bock in app ads without using a a modded client like YouTube vanced. Vanced doesn't work for Android tv, however, there are alternatives like Smart YouTube TV and its successor Smart YouTube Next
 
  • Love
Reactions: dirtcat

Big Dumb Object

Senior Member
May 22, 2020
223
99
Let me ask a question that may be a little off-topic here, but has its addressees right here for sure.
In the same repo with builds for Amlogic boxes, there are also LOS17 builds for Nvidia Shield TV (foster) (the most up-to-date around). Since I really prefer the full (non-TV) android and hoping for it for the dopinder someday, for now I could give a try with Shield TV, and would like to understand if your builds for foster are also TV-flavored or not. (Thanks)
 

npjohnson

Recognized Developer
Let me ask a question that may be a little off-topic here, but has its addressees right here for sure.
In the same repo with builds for Amlogic boxes, there are also LOS17 builds for Nvidia Shield TV (foster) (the most up-to-date around). Since I really prefer the full (non-TV) android and hoping for it for the dopinder someday, for now I could give a try with Shield TV, and would like to understand if your builds for foster are also TV-flavored or not. (Thanks)
they're beta, not at all for release - but I do both foster and foster_tab builds.
 

npjohnson

Recognized Developer
That would be just wonderful, looking forward to it! And maybe it makes sense to order dopinder right now counting on the same approach? (I'm following this thread to make a purchase if the tablet version comes out.)
I mean, I probably won't be doing them, but I can tell you with confidence, it's like a 2 line change.
 

Big Dumb Object

Senior Member
May 22, 2020
223
99
I mean, I probably won't be doing them, but I can tell you with confidence, it's like a 2 line change.
In some cases, users are offered to make a build themselves with a choice of their preferred flavor. For me It would be very convenient to be able to download a prebuilt ROM, but even if you totally reject such a dualism, please consider the option of adding TV/Tablet selection to the building guide if possible.
 

npjohnson

Recognized Developer
Does anybody have a link to the factory OS/image/whatever for this device?

I want to "start fresh" and see if I can get Magisk working on the stock image.
In the OP, under FAQ
Anyone else not seeing oem unlock after latest update?
Weird, I see it.
The YouTube apps ad delivery system is extremely complex, you can't bock in app ads without using a a modded client like YouTube vanced. Vanced doesn't work for Android tv, however, there are alternatives like Smart YouTube TV and its successor Smart YouTube Next
Yeah it can be weird.
 

criscodecookies

Senior Member
Mar 16, 2015
57
97
Does anybody have a link to the factory OS/image/whatever for this device?

I want to "start fresh" and see if I can get Magisk working on the stock image.

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.
 
Last edited:

albinoman887

Inactive Recognized Developer
Dec 14, 2010
3,937
16,339
Snohomish, WA
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.
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)
 

npjohnson

Recognized Developer
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)
yeah, bug, not limitation.
 

criscodecookies

Senior Member
Mar 16, 2015
57
97
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
 

Attachments

  • onntvremap.zip
    2.3 KB · Views: 428
Last edited:

albinoman887

Inactive Recognized Developer
Dec 14, 2010
3,937
16,339
Snohomish, WA
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

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
 

criscodecookies

Senior Member
Mar 16, 2015
57
97
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
adb shell getevent, then press buttons and note the line which has 'c' in the 3rd parameter ex. /dev/input/event4: 0004 0004 000c0042
then cat /proc/bus/input/devices (which may need root) to get vendor and product of the input device:
Code:
I: Bus=0005 Vendor=0957 Product=0005 Version=0011
N: Name="Onn-Remote"
P: Phys=
S: Sysfs=/devices/virtual/misc/uhid/0005:0957:0005.0001/input/input4
 
  • Like
Reactions: ferbulous and deega

Hig13

Member
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.
 
Last edited:

albinoman887

Inactive Recognized Developer
Dec 14, 2010
3,937
16,339
Snohomish, WA
adb shell getevent, then press buttons and note the line which has 'c' in the 3rd parameter ex. /dev/input/event4: 0004 0004 000c0042
then cat /proc/bus/input/devices (which may need root) to get vendor and product of the input device:
Code:
I: Bus=0005 Vendor=0957 Product=0005 Version=0011
N: Name="Onn-Remote"
P: Phys=
S: Sysfs=/devices/virtual/misc/uhid/0005:0957:0005.0001/input/input4
Thanks man! got it done . now the fun part, coming up with my own actions for the buttons in button mapper. thanks again
 

epiphone324

New member
Sep 12, 2010
2
1
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?
 
  • Like
Reactions: dirtcat
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 29
    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 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:

    Official Builds:

    Disclaimer: My unofficial builds have full Android TV Google Apps and some other goodies included. OTA's roll roughly once a month. Support not guaranteed or implied.

    Unofficial Builds:
    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:
    EDIT: The development boards don't boot on LineageOS 19.1 at the moment for some reason, we're looking into it.

    If you don't follow these instructions, or use 3rd party add-ons (like Magisk) please don't expect support here.

    Known Bugs:
    • Recent apps/Multitasking menu doesn't launch.
    • (sabrina only) The remote firmware sometimes gets hung up, you can reboot to solve this issue.
    • (dopinder/sabrina) L1 is currently broken, this is what is holding up official builds for these devices.
    Notes:
    • GApps are baked in on Unofficial builds - 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.
    • 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.
    • On the unofficial OTA is provided the same way officials would have them.
    • Find any more on an official build? Report them according to this guide.
    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! Play Store has it for you. Unless you're on dopinder or sabrina, but that will be fixed soon hopefully.

    • 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?

      Maybe - the only sure fire way it Magisk, as our boot loader is unlocked and can't be relocked safely.

    • 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
    • bgcngm
    • stricted
    • webgeek1234
    • deadman96385
    • trautamaki
    • luca020400
    • aleasto
    14
    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!
    7
    deadpool an wade are official again, hopefully we got it all right this time around.

    onto dopinder and Sabrina. Hoping to get those shipped soon.
    6
    wade and deadpool are official now!
    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.