yashsingh1/xdaforums huggingface dataset:
[Google TV General] kennkanniff:
I still have one device that is stuck with bad recovery that was on unrooted stock. I cannot connect to the device over ADB and am unable to enable wireless ADB because it is unrooted.

Is there a 'run_command(...);' that boots straigth to bootloader? I can compile u-boot myself.
[Google TV General] retyre:
Try:

run_command("mmc dev 1; setenv lock 10100000; save; reboot bootloader", 0);
[Google TV General] kennkanniff:
Already tried that. Does not work. Thanks though.
[Google TV General] :
Why is this the case? Is this inability particular to the version of the factory build that you have installed? Where is the failure? Are the dev options not available, or does adb over usb just not connect?

Since your device is exploitable and unlocked, have you considered installing fred's boot-from-usb ubuntu build?

Fred's ubuntu build preceded the unlock method release, and at the time of its release would have been of no use for a situation like yours because any attempt to modify the emmc system from the temporarily usb-booted system would cause avb to fail.

But since your device is unlocked and exploitable, you could use the temporarily usb-booted ubuntu system to dd a factory recovery image back to the emmc, and avb wouldn't be an issue. Fred's method also enables aml v2 factory burn via the reset button, which could give you another vector to write the recovery partition using the update utility via burn mode. The same methods could also be used to write a magisk-patched boot image to the boot partition.

Using an update command with burn mode may also provide a method to instantaneously boot to bootloader fastboot, without even rebooting the device.

The only issue you may run into when trying to do this is that the bootloader version may be stale relative to the bootloader that is currently installed on your device, so the bootloader used, or fred's method of disabling anti-rollback detection may need to be adjusted to take into account the bootloader version currently installed on your device. Also check if the temporary system uses its own environment.
[Google TV General] npjohnson:
Replace "reboot bootloader" with "fastboot"
[Google TV General] npjohnson:
This would also work.
[Google TV General] :
The entire panoply of u-boot console commands is available via the exploit? But I suppose "update" would not work, because burn mode is disabled?

Has the current factory u-boot source (post-exploit) been posted somewhere? I have a suspicion that it has been hard-coded to ignore whatever value the lock variable may have.
[Google TV General] npjohnson:
We patched our U-Boot to allow burn mode, so you could totally use update.

You just need to directly boot into burn mode, which is actually easy, if you go into our U-Boot source and revert the AML burn V2 commit, when you run the exploit it will auto boot you into burn mode
[Google TV General] juhzuri:
Spoiler content hidden.
[Google TV General] :
I don't understand. How did you "tell the device to reboot to recovery via the OS"?

If you had just sideloaded 19.1 successfully, the recovery partition on the device would have contained the 19.1 recovery, which boots just fine if it is present with the entirety of the rest of the 19.1 OS.

So, which OS did you have installed when you told "the device to reboot to recovery"? And how exactly did you "tell it" to do so?

I don't understand what you were trying to accomplish by doing what you describe above.

dopinder is a vastly different device than sabrina when it comes to being stuck in a recovery bootloop, or any other sort of problem.

With dopinder, you're only a reset button press away from burn mode, which can be used to immediately load bootloader fastboot. You'd just have to hold the button until the usb connection is established, assuming that you have the worldcup drivers installed.

I did this several times last night while testing 19.1. Each time involved only a minute or so of downtime.
[Google TV General] juhzuri:
lineage-19.1-20220513-UNOFFICIAL-dopinder.zip was what I sideloaded and was confirmed running at the time and the device was rebooted to recovery via "Advanced reboot" options in the power menu.

I had not read this full 800+ message thread, I probably had a mix up is all then.

Edit: Rebooted device to recovery (via adb this time) and the device didn't come online, just like before. Found a linux version of the AML utils (as you suggested to use). Was able to interrupt boot with the button and when the device was seen in dmesg I fired off update bulkcmd fastboot >>> fastboot flash recovery recovery.img >>> fastboot boot boot.img and have a working recovery now. Spoilered my previous post.
[Google TV General] :
I may not have checked that exact sequence. I thought you meant that you couldn't even get to the screen where you could select "Advanced reboot", in the first instance.

I'll check it again. I'm sure all of this will be sorted out before official release. At least the build itself seems to run well enough. The OP states that "OTA is provided the same way officials would have them", but I'm not sure exactly what that means, or how the recovery might apply an OTA update, or if it can be disabled.
[Google TV General] npjohnson:
We have an Updater app that is I configure to point at my server.
[Google TV General] Zainullahk1234:
could you try to make a version for mi box s

as the chromecast with google tv has support from google while mi box s is not getting any updates
[Google TV General] XxBigBuckxX:
Yes this worked for me to just needed to use amlogictools , sideloaded it with the 18 version / then reset it while holding the button on the side used the tools to run update bulkcmd fastboot >>>> then fastboot flash recovery lineage-19.1-20220515-recovery-dopinder.img >>>> then fastboot boot lineage-19.1-20220515-recovery-dopinder.img and just factory reset. Booted up just fine
[Google TV General] endera:
Radxa Zero ?
[Google TV General] pddc:
@npjohnson What I intended to write was, I can get ethernet up on stock dopinder 10, but as soon as it's updated with lineage 18.1 the same gear no longer comes up.
[Google TV General] kennkanniff:
I fixed my device by using fred's exploit to put device in USB burn mode and flashing a working 18.1 recovery using the the update tool found in the bin directory. Thanks allot for all your help.
[Google TV General] npjohnson:
Yup it's a devboard
[Google TV General] npjohnson:
Nope. Not unless someone wants to come up and get it working/support it.
[Google TV General] Four2zero:
Has anyone able to install a mouse toggle for this device. certain apps are broken due to it. Just wondering ?
[Google TV General] RDS5:
ive noticed how theres new builds available. i tried booting the recovery (15th may) but it didnt boot (same thing as before).

@goapy said that one of his wouldnt boot the recovery either (were both on wade) but what could the issue here be?

i know that 19.1 would probably work if i flashed it from 18.1 recovery, but if for whatever reason it tries to reboot to recovery, id be in for a hell of a time, since it would stay stuck on the android tv screen.

any chance of fixing the recovery?
[Google TV General] RDS5:
no sadly, i tried to use mouse toggle and it wouldnt work.

i wish there was some kind of mouse toggle alternative, it would be a gigantic save.

does anyone know of alternative apps? ive only tried the free one but the paid one only supports a handful of devices.
[Google TV General] :
I haven't tried 20220515 yet, but it seems that all of the supported devices, not just dopinder, have had problems with the 19.1 recovery while in one state or another.

@kennkanniff's problems with sabrina started with the installation of the 19.1 recovery and were resolved by flashing the 18.1 recovery.

The current builds, apart from the recovery, seem fine or even good on all of the supported devices.
[Google TV General] RDS5:
thats good, but doesnt the current build you have installed overwrite the recovery you have? so if i ever wanted to update to a newer version of 19.1, i would have to reboot to bootloader, boot into 18.1 recovery.img and then flash it?
[Google TV General] :
Well, if you use the 18.1 recovery to sideload 19.1, that sideloaded installation ends with the 19.1 recovery on the device.

I don't see any reason why you couldn't immediately flash the 18.1 recovery again after that if you want to test these builds, if you're worried about the 19.1 recovery.
[Google TV General] RDS5:
doesnt the actual os overwrite the recovery partition with its own recovery? so if i were to flash 18.1 recovery again it would overwrite it with 19.1? or am i getting this the wrong way, and only the stock os does that.

ill flash it right now anyways and check it out.
[Google TV General] RDS5:
nevermind its stuck on the androidtv logo. ill do a factory reset (if i even can, since it didnt want to fastboot-boot into the 18.1 recovery after flashing 19.1) and if that still doesnt work ill go back to stock, go to 18.1 and just wait for official release.

the xda releases arent worth the trouble currently, and they wont be up until the recovery boots.
[Google TV General] :
I don't think that the running system ever updates the recovery partition unless it's applying an ota.

If you've just finished sideloading 19.1, you can run;

adb reboot bootloader

To flash the 18.1 recovery, or even the stock recovery.

While you're in that same bootloader fastboot session, it wouldn't hurt to also run;

fastboot erase data

fastboot erase cache

Which is the equivalent of a factory reset. You needn't ever reboot to the recovery again.

The bootloader's support for burn mode stays constant regardless of which build is present on the device (18.1/19.1/factory)

So whenever you're stuck, you can do the steps like at the end of this post to resolve the issue.
[Google TV General] jwchen119:
Have you tried tvQuickActions on Play store yet?

I can triggered the mouse toggle to work with it's feature on stock ROM.
[Google TV General] kennkanniff:
Just received an Banana Pi-M5 and I would definitely appreciated a guide for that device.
[Google TV General] npjohnson:
I am working on wiki instructions for them now. End of the month they should be up.
[Google TV General] endera:
How are the installation steps on Radxa Zero?
[Google TV General] npjohnson:
Coming soon
[Google TV General] #2!:
Thanks!! I had the same issue bootloop with the factory zip file. The stock OTA zip you posted worked for me without any modification. Just opened stock recovery with the button, selected ADB sideload and sideloaded that zip file. No adapter or hub needed.
[Google TV General] espchl:
Hey,

I flashed my Sabrina with 19.1 today, following the instructions.

Something went wrong, the device did not boot to os and got stuck at the android tv logo.

I was able to enter fastboot and was able to enter the recovery,. But no boot to os.

I manually flashed the 18.1 recovery via fastboot (stupid enough) and are now stuck at the android tv animation. The device can't enter recovery now. It's also not possible to use fastboot.

Is there anything I can do to unbrick my device? I appreciate any help!

I tried to use "update bulkcmd fastboot" but without a working fastboot, its not possible to flash the recovery again :)

Thanks in advance!
[Google TV General] kennkanniff:
Try this:

update partition recovery path/to/lineageos-18.1-recovery.img
[Google TV General] espchl:
Thank you. Seemed to work without error.

Sadly I'm still not able to enter fastbootd.

Is it somehow possible to flash to stock and start from scratch?

Thanks
[Google TV General] kennkanniff:
You should be able to use the exploit now. If that does not work you should try the custom exploit in post #782. No expert just sharing my experience.
[Google TV General] retyre:
Not sure that will work since he/she cannot boot into the OS.

@espchl: What you should do is put back the 19.1 (not 18.1) recovery:

sudo ./update partition recovery lineage-19.1-20220515-recovery-sabrina.img

and see whether that lets you boot into fastbootd.
[Google TV General] sjustinas:
Just flashed the latest build to my wade. Had to flash it using the 18.1 recovery, because the latest recovery would not work (neither via "fastboot flash", nor "fastboot boot" - I would remain at the OEM's bootloader screen).

Auto frame rate works great with Jellyfin and SmartTubeNext! (when enabled in both Android's and respective

apps' settings).

However, I've hit a couple of minor issues so far:

My TV is constantly in HDR mode, even when in the launcher or watching SDR content. This was also the case with Dynalink's stock software, however I was be able to remedy this by choosing the "Auto" (rather than "On") HDR mode in Droid Settings. Lineage, of course, has no Droid Settings. Any way to resolve this?

The launcher seems to crash when I tap the Apps icon (see video). In reality, the screen also goes completely black for a second before the launcher re-opens. One can access the apps through the favorites bar, or via Settings -> Apps, but it is slightly annoying. Version of "com.google.android.tvlauncher" is 3.5.3-434707177-f (the latest via Play Store).

Uninstalling updates to the launcher (effectively reverting to 3.1.2-3668464-f) fixes this.

Can't seem to find the option to enable adb over network in the developer settings.

Thanks for your efforts on this!
[Google TV General] iyah123:
Can you share if it's emmc or uSD boot ?
[Google TV General] npjohnson:
Emmc only
[Google TV General] espchl:
Thank you for your help. It's still not working. After using the custom exploit the device is stuck in a bootloop (orange led turning on an off).

Thanks. But somehow it's also not working. Seems I'm not able to write to recovery anymore.

It looks like there is some error...

file size is 0x1800000
AmlUsbTplCmd = download store recovery normal 0x1800000 rettemp = 1 buffer = download store recovery normal 0x1800000
AmlUsbReadStatus retusb = 1
[update]ERR(L306):cmdret=[]
[Google TV General] iyah123:
Thx.

A few more questions ...

Does chromecasting work ?

Has anyone tested using a usb-c to 3.5mm adapter to capture audio output ?

As you may have figured, am looking for a cheaper chromecast, but audio only, to turn passive/active speakers into smart speakers.

Thx
[Google TV General] npjohnson:
most likely it does.

And that might work - not sure if HAL supports that case - worth trying tho.
[Google TV General] iyah123:
So anyone have this working on a radxa zero ?

The radxa team instructions for their older atv uses AML, but uses it on an img file.

Here if I unzip the file, there are 50 subfiles I have no idea what to do with.

Btw the older (18.1) img file link on radxa's website didn't work (said it flashed fine). Get the ATV logo, then t just hangs. So am waitign instructions to try this one.
[Google TV General] Big Dumb Object:
Can anyone tell if the discussed devices have any problems with chargers more powerful than recommended 1000mA?

The power supply for dopinder is piece of garbage, but nowadays it's not too easy to find a high-quality replacement with equal power, so I would like to power it with 2.4A, but still afraid to burn something.
[Google TV General] instylz:
Any ETA on dopinder being fixed with 19.1?
[Google TV General] npjohnson:
When either:

- One of the people who has dopinder, other devs included, fixes it

or

- My life calms down, I test COVID negative, my power stops blinking on and off (thanks, Duke Energy), and I can make it to Walmart to buy my 3rd dopinder (they keep just dying)

so, yeah. right now kinda sucks lol.
[Google TV General] Four2zero:
Anyone know if this will work with X96 X4 Pro ?
[Google TV General] endera:
I am still waiting. (Radxa Zero )
[Google TV General] Big Dumb Object:
Hardly, since this project is aimed at devices of reference Goolgle design and some dev-boards. Pay attention to slimBOXtv and atvXperience instead.
[Google TV General] npjohnson:
Flash this https://download.ods.ninja/Android/firmware/radxa0/

Or wait for instructions to be posted on the wiki when I have time.
[Google TV General] :
It's probably a recovery bootloop that still can be fixed. Try the method mentioned in the quote of post #853. The author of that post previously ran the custom exploit but still ultimately was able to fix his device.

As long as you at least still have access to usb download mode, you have a lot of power over the device and can keep trying things until it is fixed.
[Google TV General] retyre:
In post #873, you were able to write back the 18.1 recovery without error. If that worked without error, there's no reason it won't work with the 19.1 recovery (as I wrote in post #875).

In burn mode, things do not always work on the first try. If it errors out, unplug and keep trying until it works.
[Google TV General] :
Why do you think that flashing the 19.1 recovery will resolve the problem?

@kennkanniff's recovery bootloop problem started with, and was probably caused by, the 19.1 recovery. And it was only resolved by flashing the 18.1 recovery. Why do you think that the inverse will be true for @espchl?

I've had 19.1 recovery problems on all of my devices. 1 sabrina, 2 wade, 2 dopinder, and 1 deadpool.

I don't go near recovery during an installation now. I flash the builds using just bootloader fastboot, That way, reboot mode is never set to recovery. Of course, that requires converting the builds from brotli/dat format to standard img format, including a super image containing all of the mapped dynamic partitions.
[Google TV General] :
Creating a single "usb burning tool" image for android 10+ builds is tricky. What tools did you use?
[Google TV General] npjohnson:
Not really? We build them fully inline in the android build environment.
[Google TV General] kennkanniff:
Build for M5 flashes fine but is stuck at bootlogo. I ordered an USB serial cable so I can help debug.

@espchl I was able to fix my sabrina by flashing 18.1 recovery in USB burn mode with the update tool.
[Google TV General] :
I have a uart header installed on all of my devices, including sabrina.

The uart log provided no useful information when trying to understand the 19.1 recovery issue.

The last thing shown in the log was "Starting kernel ...", and then nothing (in perpetuity) until the device was manually rebooted.

Although it may not have been set to log level, because a successful boot would have just followed with the uart console starting.
[Google TV General] endera:
the link is not working
[Google TV General] espchl:
Thank you for your help. After reading #853, and @kennkanniff 's advice, I was able to upload 18.1 recovery again without error. So it's no trash at this time :)

Going to order a usb-c adapter, to boot ubuntu and try to dd the factory recovery.

./update partition recovery lineage-18.1-20220324-recovery-sabrina.img
file size is 0x1800000
AmlUsbTplCmd = download store recovery normal 0x1800000 rettemp = 1 buffer = download store recovery normal 0x1800000
AmlUsbReadStatus retusb = 1
Downloading....
[update]Cost time 2Sec
[update]Transfer size 0x1800000B(24MB)
AmlUsbBulkCmd[download get_status]
[AmlUsbRom]Inf:bulkInReply success
[update]mwrite success

Flashed recovery without errors.

Thanks. I don't know why, but it wasn't possible anymore. Had to use the Exploit from here to be able to flash again. But maybe just bad luck.

Even after flashing 18.1 again, still stuck at bootloop and no working fastboot.

Yeah! Thanks for your help. Seemed to work, but still bootloop and not able to enter fastboot.

Thanks all for your help! Will keep trying.
[Google TV General] npjohnson:
Try again
[Google TV General] instylz:
Not sure why nobody replied to this. It's completely safe. Your device will downregulate it's charge to match what it was designed to accept.
[Google TV General] kennkanniff:
You replied... Thanks for the info, good to know.
[Google TV General] Big Dumb Object:
Thank you! I really still waited for any response, but was afraid to force my inquiry too much. Now I can burn upgrade my Onn with more confidence.
[Google TV General] :
You can flash any recovery partition image with the update utility. You can use it instead of dd to flash the factory recovery.

With the exploit that you reference above, you can also use the update utility to start bootloader fastboot directly.

./update bulkcmd fastboot

You could try erasing the data and cache partitions (using bootloader fastboot) to see if the 18.1 recovery (that is already flashed) will then be able to load. That has worked for me before.

Or, describe the state that your device was in before things went wrong. Did it have a previous version of los or the factory os installed?
[Google TV General] espchl:
thanks for your help @goapy

That makes sense. Good to know.

When in USB Burnmode, I get errors while trying to use fastboot;

./update bulkcmd fastboot
AmlUsbBulkCmd[fastboot]
[AmlUsbRom]Inf:bulkInReply failed:
ERR: AmlUsbBulkCmd failed!

when in bootloader-mode(?) (holding button while powering device), the fastboot command just times out:

./update bulkcmd fastboot
AmlUsbBulkCmd[fastboot]
AM_REQ_BULK_CMD_Handler ret=-110,blkcmd=fastboot error_msg=error sending control message: Connection timed out
[AmlUsbRom]Err:rettemp = 0 buffer = [fastboot]
ERR: AmlUsbBulkCmd failed!

Device was new out of box (MFG 09/2020) with factory os installed.

Edit:

Is it somehow possible, to flash the factory image with "update" and start from scratch?

Edit2:

Oh dear, I'm sorry... After reading the instructions again, I realized that I missed

fastboot oem unlock

.
[Google TV General] :
That is the expected normal response when "./update bulkcmd fastboot" is executed successfully, the "failed!" notice notwithstanding.

After executing the above, you should immediately be able to use bootloader fastboot, without doing anything else at all whatsoever. You just use it right then, after the result above is displayed, without touching the device or rebooting.

That part of the instructions is sort of a generic instruction that doesn't really apply to sabrina or any of the supported devices.

The device may have already been unlocked if you previously ran the original exploit script. You can check it at any time with;

fastboot getvar unlocked

or

fastboot getvar all
[Google TV General] espchl:
Even though it's not possible to execute any fastboot commads. You talk about executing them through "bulkcmd fastboot" right?

All I get is this same error. For example:

./update bulkcmd fastboot getvar unlocked
AmlUsbBulkCmd[unlocked]
[AmlUsbRom]Inf:bulkInReply failed:
ERR: AmlUsbBulkCmd failed!

The same goes for using the fastboot commands in quotation marks.

Using fastboot on my computer doesn't detect the device at all.

Thank you. Yes. I'm pretty sure the exploit worked and the device was successfully unlocked. I flashed Lineage 19.1 using adb through Lineage recovery.

It's maybe time to stop flooding this thread and open a new one...

Aight. Thatnks for clarification.
[Google TV General] :
No, the fastboot commands are not executed through the update utility.

They are executed using the fastboot binary directly.

What executing "./update bulkcmd fastboot" does is change the usb connection from using the worldcup drivers to using the fastboot/adb drivers.

You're done with update then, and then you run the fastboot binary directly.

If using the fastboot binary directly doesn't work, and you're sure that you have the fastboot/adb (android) driver installed, sometimes it takes a second execution of "./update bulkcmd fastboot" to make it work.

If the fastboot binary won't run directly even after one or two executions of "./update bulkcmd fastboot", then I'm at a loss and have no other ideas, except to say that you can use the update utility to do pretty much everything that bootloader fastboot can do. So, not much is lost if you can't access bootloader fastboot but can access burn mode and use the update utility.
[Google TV General] Wagmans:
I've had one of these Fios Stream TV Gen2 sitting around for a while- now that Coreelec supports S905x4 devices I'm wondering if you've gotten anywhere with it? You should at least be able to boot off a USB flashdrive- I'm not even talking about rooting it. I can't even figure out how to get into recovery mode reliably.