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

Status
Not open for further replies.
Search This thread

rczrider

Senior Member
May 20, 2015
734
543
Markarth
I still don't have the device to test this my own and very wonder if the Magisk root is preserved during OTA like in the good old days before Android 8.0, or if we want to enjoy the benefits of root, we must be prepared to patch the boot.img manually with every OS update? Has anyone checked?

Are you referring to OTA for LineageOS or OTA for stock (after bootloader unlock and root with Magisk)?

Another user answered for the former, so I'll answer for the latter (for dopinder, the ONN device): yes, with each OTA you will need to re-root with Magisk. This can be done either by flashing the Magisk APK (replace the .apk extension with .zip) by booting (not flashing) Lineage recovery (and requires a micro USB OTG Y cable so you can use a keyboard, as the hardware button won't work), or by extracting boot.img from the factory image zip and patching using Magisk once booted.

AFAIK, the second way doesn't really work right now because (again, AFAIK) no one has captured the OTA file for boot.img to be extracted. You can't set up a new ONN device without completing the setup wizard, which downloads the OTA before completion. Since you can't enable USB debugging (for doing a logcat and capturing the OTA URL) until after setup completes, it would take someone whose device is setup, has not received the OTA, and can do a logcat while the device updates in order to grab the OTA.

That leaves us with the first option of using a micro USB OTG Y-cable and Lineage recovery.

Something I don't know (which perhaps @npjohnson can comment on) is whether a stock OTA can re-lock the bootloader and and either brick the device (due to modifications that were done using root) or at the very least prevent us from unlocking again.
 

Big Dumb Object

Senior Member
May 22, 2020
223
99
Are you referring to OTA for LineageOS or OTA for stock (after bootloader unlock and root with Magisk)?
The first one.
Any LineageOS ROM will have it
Correct me if I'm wrong, but all modern devices with A-only and A/B partition scheme tend to rewrite the volumes that are essential to preserving Magisk during OTA. My Xiaomi Mix 2S (polaris) acts exactly that way, and it is very annoying. Here is a note in the official Magisk guide: https://topjohnwu.github.io/Magisk/ota.html
 

JoshuaDoes

Senior Member
Feb 1, 2015
132
189
23
Chester, South Carolina
joshuadoes.com
The first one.

Correct me if I'm wrong, but all modern devices with A-only and A/B partition scheme tend to rewrite the volumes that are essential to preserving Magisk during OTA. My Xiaomi Mix 2S (polaris) acts exactly that way, and it is very annoying. Here is a note in the official Magisk guide: https://topjohnwu.github.io/Magisk/ota.html
You're right, but that's the purpose of the init.d extension. When Magisk patches a boot image and detects init.d support, it installs its init.d script and magiskboot to the boot image's ramdisk so that access to /data isn't needed to repatch after the OTA. And because Lineage Recovery also has init.d support, it knows to copy out the init.d scripts before replacing the boot image with the new unpatched one.
 

Big Dumb Object

Senior Member
May 22, 2020
223
99
You're right, but that's the purpose of the init.d extension. When Magisk patches a boot image and detects init.d support, it installs its init.d script and magiskboot to the boot image's ramdisk so that access to /data isn't needed to repatch after the OTA. And because Lineage Recovery also has init.d support, it knows to copy out the init.d scripts before replacing the boot image with the new unpatched one.
This is strange and contradicts my own experience, since I only found out about this issue because my polaris (A-only device), which has been running solely on official LineageOS or LOS for MicroG since the first day, inevitably removes root after OTA, while the presence of init.d support is confirmed by AFWall+ firewall app.

So, if anyone has any real success updating the flashed dopinder/sabrina/wade with Magisk — that would be the best answer to my query.
 

JoshuaDoes

Senior Member
Feb 1, 2015
132
189
23
Chester, South Carolina
joshuadoes.com
This is strange and contradicts my own experience, since I only found out about this issue because my polaris (A-only device), which has been running solely on official LineageOS or LOS for MicroG since the first day, inevitably removes root after OTA, while the presence of init.d support is confirmed by AFWall+ firewall app.

So, if anyone has any real success updating the flashed dopinder/sabrina/wade with Magisk — that would be the best answer to my query.
I can't say why that's the case for you, but it should be working on those devices and sounds more like a bug. Regardless, I forgot to directly state it but it does successfully repatch the boot image with Magisk when I run an OTA on my dopinder box (one of the first things I tested when I bought it), both with np's builds as well as my own local builds.
 
  • Like
Reactions: Big Dumb Object

Big Dumb Object

Senior Member
May 22, 2020
223
99
it does successfully repatch the boot image with Magisk when I run an OTA on my dopinder box (one of the first things I tested when I bought it), both with np's builds as well as my own local builds.
Thank you! It seems like a fairly unproblematic device. Can't wait for the work to be finished so I can make the purchase with confidence (want to buy a batch of dopinders at once for all my home screens).
 
  • Like
Reactions: JoshuaDoes

npjohnson

Recognized Developer
So, per device it's different:

deadpool/dopinder/wade: you can't update while you're rooted or have any sort of modification to system, it breaks. Breaks AVB, now. If you just have a magisk patched boot image, that should be fine I think, Magisk has OTA handling.

Sabrina: Don't update anything ever, this device will re-lock itself and probably brick itself if you do, once the exploit is run, you're unlocked and should leave it. As such, you can flash back to stock like the thread details, but beyond that, which will mean you can never unlock again, don't do anything like that.
 

rczrider

Senior Member
May 20, 2015
734
543
Markarth
deadpool/dopinder/wade: you can't update while you're rooted or have any sort of modification to system, it breaks. Breaks AVB, now. If you just have a magisk patched boot image, that should be fine I think, Magisk has OTA handling.
Is this in reference to LineageOS or stock? I assume the former ("breaks AVB") refers to LineageOS, while the latter ("Magisk patched boot image") refers to stock?

Unrelated: thank you for being so active in this thread, and for all the work you and others do to bring LineageOS to those who mostly just ask dumb questions or complain :p
 

npjohnson

Recognized Developer
Is this in reference to LineageOS or stock? I assume the former ("breaks AVB") refers to LineageOS, while the latter ("Magisk patched boot image") refers to stock?

Unrelated: thank you for being so active in this thread, and for all the work you and others do to bring LineageOS to those who mostly just ask dumb questions or complain :p
All of that was in reference to stock.

Lineage can be safely updated after pretty much any modification as it flashes a full OTA, and disables AVB. Will persist magisk through OTAs
 

lessslanted

New member
Nov 28, 2021
1
4
In case this helps anyone, this is how I've been getting USB debugging on without a google account and without updates.

Turn device on...
-connect remote control
-select language
-skip phone setup
-hit settings key on remote "cog-wheel"
-go to "apps" > "see all apps"
-select "update" and force stop
-select "show system apps"
-select "dynamic system updates" and force stop
-select and disable (or force stop):
*(it probably doesn't need to be all of these but I got sick and tired of narrowing it down)
google
google one time init
google partner setup
google play services
google services framework
market feedback agent
second screen setup auth bridge
settings suggestions
setup wizard (force stop)
setupcustomizer

-back out, back out, back out, until...
-setup remote again
-select language again

!!! - Pay attention directly after the next step. If you see anything other than "successfully connected to internet" then you missed something and it's going to download the update - hit settings button and wifi off

-sign in to network (It should say "checking connection" "successfully connected to internet")
-as soon as you see the screen with a black background and "updating apps" message
-hit settings button on remote
-turn off WiFi

Now developer options can be enabled and USB debugging turned on.
 

npjohnson

Recognized Developer
This might be off topic but does anyone know if it’s possible to get the Fire Stick remote microphone to work with any of the listed Android TVs. All the buttons work, but the microphone doesn’t detect any voice or sound
Nope - proprietary software receiver app/Audio HAL tie-ins.
In case this helps anyone, this is how I've been getting USB debugging on without a google account and without updates.

Turn device on...
-connect remote control
-select language
-skip phone setup
-hit settings key on remote "cog-wheel"
-go to "apps" > "see all apps"
-select "update" and force stop
-select "show system apps"
-select "dynamic system updates" and force stop
-select and disable (or force stop):
*(it probably doesn't need to be all of these but I got sick and tired of narrowing it down)
google
google one time init
google partner setup
google play services
google services framework
market feedback agent
second screen setup auth bridge
settings suggestions
setup wizard (force stop)
setupcustomizer

-back out, back out, back out, until...
-setup remote again
-select language again

!!! - Pay attention directly after the next step. If you see anything other than "successfully connected to internet" then you missed something and it's going to download the update - hit settings button and wifi off

-sign in to network (It should say "checking connection" "successfully connected to internet")
-as soon as you see the screen with a black background and "updating apps" message
-hit settings button on remote
-turn off WiFi

Now developer options can be enabled and USB debugging turned on.
Don't do this... You want the update. On dopinder/wade/deadpool you should absolutely take the OTA it recommends before starting.
 
  • Like
Reactions: seriousneo

ferbulous

Senior Member
May 12, 2012
253
22
Hi guys, I'm using walmart onn 4k with sony receiver.
I can use the onn remote to control the receiver volume but it failed to power on/off the receiver (tried all 9 attempts but none worked during power setup)
I had no problems to control both volume/power with my firetv stick 4k.

Is there a way I can configure the remote to learn IR for the power control?
 

UnionBlvd

Senior Member
Aug 12, 2012
90
22
Don't do this... You want the update. On dopinder/wade/deadpool you should absolutely take the OTA it recommends before starting.
Not on wade, at least not anymore. As someone else mentioned, the latest Dynalink update disables unlocking, and even after using the recovery tool to flash the older factory ROM I could no longer unlock mine.
 

npjohnson

Recognized Developer
Not on wade, at least not anymore. As someone else mentioned, the latest Dynalink update disables unlocking, and even after using the recovery tool to flash the older factory ROM I could no longer unlock mine.
I'm really doubtful here.

Especially considering you don't even need to toggle the switch, and you can always use brin mode to unlock by hand... I just really don't believe that.
 

Big Dumb Object

Senior Member
May 22, 2020
223
99
Not on wade, at least not anymore. As someone else mentioned, the latest Dynalink update disables unlocking, and even after using the recovery tool to flash the older factory ROM I could no longer unlock mine.
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.)
 

UnionBlvd

Senior Member
Aug 12, 2012
90
22
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.)
I think the update was released in late Sep, I just got it last week after returning my Dynalink to stock. I had flashed a self-built Lineage image and the device wouldn't boot, flashing it back to stock was the only thing that got it going again.
 
  • Like
Reactions: Big Dumb Object

npjohnson

Recognized Developer
I think the update was released in late Sep, I just got it last week after returning my Dynalink to stock. I had flashed a self-built Lineage image and the device wouldn't boot, flashing it back to stock was the only thing that got it going again
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.
 
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.