yashsingh1/xdaforums huggingface dataset:
[Google TV General] matrix200200:
So, what is the procedure to upgrade from 19.1 to this new version?

Can I keep the apps and settings, or do I have to start from scratch?
[Google TV General] npjohnson:
There are upgrade guides on both the unofficial and official wiki
[Google TV General] matrix200200:
Upgrade LineageOS on dopinder | Odd Solutions Wiki

wiki.oddsolutions.us

That one?
[Google TV General] npjohnson:
yes - dopinder won't have one as it hasn't "officially" shipped but wade's works fine.
[Google TV General] matrix200200:
Well, as long as unofficial build works, I don't care.

I don't need support for official streaming apps so don't care for DRM.

As long as vlc works, I am good.

Wondering whether I should choose the build from yesterday or the from a week ago.
[Google TV General] kennkanniff:
Thank you.

Bluetooth and DRM are still broken on Sabrina.

Here is a logcat when bluetooth breaks for what its worth.

01-20 17:25:00.823 13647 13647 I crash_dump32: type=1400 audit(0.0:1371): avc: d - Pastebin.com

Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

pastebin.com

Hope to see M5 support soon.
[Google TV General] npjohnson:
fun.

As for M5, it's a DTB issue I can't figure out - it just won't boot.

No idea why.
[Google TV General] otttvbox502:
Latest Build 1-18 on Wade.

the device still will not resume after power button push.

If you press the power button once the screen will turn blank.

If you press the power button at any time (up to 1 hour) the box will resume from exactly where you her at.

If you press the power button to resume after 2 hours, the device will not resume.

I have tried to set no sleep option in developer area and that does nothing.

I have tried to turn off wifi before i press the power button to inter blank screen mode and still after 2 hours will not resume.

I say blank screen because i don't believe device is in sleep. I believe hdmi output is disabled. upon pushing power button again with 1 hour the screen comes on and you are exactly wear you left off, so, i don't believe it is in sleep just screen off, green light off on box.

I ha another tv box in past that had upgrade and device would fall into a deep sleep if left untouched to save battery.

Is it possible that this is what is happening???

I am not sure how to root device to run logcats.?
[Google TV General] treypop:
The apps that I have tried and don't work for me because of DRM issues are Sling TV, Tubi, and Hulu. Was really hoping this was fixed in LineageOS 20
[Google TV General] jacob12345:
I have the same issue on my wade, I went from stock to the 0113 unofficial build. but my observation is different from yours, mine is that every 4 or 5 turning it on and off, the device will not wake up by Bluetooth remote on the 5th or 6th time turning on, what I mean is that it could be not related to time, it appears to me more like as if the system decides whether to go to deep sleep on the exact moment you turn it off.

I also found when the device went into this unwakable situation, you can still wake it up with IR, just remove the battery of your dynalink remote and put it back, now the remote is in IR mode, point remote straight at the box and it will wake up normally(indecator on the remote will flash, meaning it's firing IR), this deep sleep feature is also observed in stock firmware, however the difference is that in stock, box will kill Bluetooth when entering deep sleep, allowing remote to automatically switch to IR mode, which allows user to wake device with success.
[Google TV General] jacob12345:
I've also found a way to get around with this, there's an automation app on playstore called automate, and you can create a flow and use the " keep CPU awake "block and let it run in the background, so far it does work for me, device can always get waked up by Bluetooth remote, no need IR
[Google TV General] npjohnson:
Official builds of 20 for deadpool/wade will ship within a week!
[Google TV General] talksickisil:
Nice. I bought a hisense google tv and it’s annoying the hell out of me that even with moving apps to usb I “run out of space” with a 256 gb flash drive attached. I love the idea of google tv built in to the tv in theory. In practice, it doesn’t add up. I’m still using wade.
[Google TV General] CrysisLTU:
Just a heads up - dopinder dtbo download link in the wiki install page is 404
[Google TV General] itchydroid:
You can use the dtbo and dtb img files inside the zip file of the rom files.
[Google TV General] darkknight7:
Updated to official builds on wade. Netflix works, but YouTubeTV does not. Video flashes pixelation for a second and then the device reboots, it has done this the first 3 times I've tried video. This last time it was a minute or 2 before it rebooted, video still not showing, just random color/pixelation.

ETA:I was on unofficial 20 before, formatted partition prior to installing official build.
[Google TV General] S1ngl3-x:
[Wade]

First time upgrading official LOS build. Do I really need to flash new recovery as the wiki says? Because this thread description mentions that "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." . This sounds to me like firmware will be updated anyway. So that only "adb sideload rom.zip" will be required and I could skip "fastboot flash recovery new_recovery.img".

I am using this amazing free Wade everyday so I want to double check twice before upgrading.

Sorry if this is obvious and thank you for your answers.
[Google TV General] npjohnson:
Recovery is not firmware - you must flash it.
[Google TV General] xperanto:
Wade upgraded to Official 20.

Netflix, Prime and Disney+ working.

(If some Apps don`t work, try different versions, e.g. Disney 2.16.0-rc3-2301180 didn`t work, but 2.15.3-rc5-22121300 did).

As altready mentioned, the only caveat is still the wrong assigned Buttons of the IR-Remote in Recovery.

@npjohnson: if interested, i can provide the NEC-hex codes of the IR.

Thank you all for your for your work and efforts to make LOS run on all these devices!
[Google TV General] _Fidor_:
Could You confirm that USB 3.0 ports are working at all - providing power to connected device ? In BananaPi M5 they are offline so not dongle works. Maybe its similar case w/ C4 ?
[Google TV General] truefriendcz:
Yes the USB ports work. Keyboard and mouse work perfectly. Including keyboard+mouse in one set with USB dongle (https://www.amazon.com/Dupadstory-Wireless-Keyboard-Rechargeable-Raspberry/dp/B07GPPRYD9). External HDD also works. Only USB dongle Bluetooth+Wifi (https://www.hardkernel.com/shop/wifi-module-5bk/) does not work.
[Google TV General] npjohnson:
You'll need to build yourself with the relevant drivers.
[Google TV General] npjohnson:
this is helpful, so it's specifically m5, radxa0 and odroic4 are fine.
[Google TV General] dysoct:
OMG i'm facing the same issue but still on LOS for as long as I remember. Thanks for the workaround advice. it's working perfectly now! Been thinking about returning to stock Rom because of this but not anymore. No more using third party remote lol. Hope @npjohnson can look into this when possible 💪
[Google TV General] _Fidor_:
More data:

If I:

1. flash aml_install_package.img to the M5 and reboot to recovery

2. do adb push of original u-boot bootloader from BananaPI M5 official android 9.0 image to /tmp dir

3. do dd if=/tmp/aml_sdc_burn.UBOOT of=/dev/block/bootloader

4. reboot the device

Nothing changes. Device boots to recovery as usual. But if I add this step:

5. dd if=/dev/zero of=/dev/block/env count=16 (which i believe forces the reset whole uboot env. due to CRC mismatch)

6. reboot the device

... then

1. USB works - I can see keyboard in dmesg (USB is powered even in bootloader) :)

2. Device does not boot due to wrong env (Waiting for root device ...)

I'm attaching:

Environments for LOS (before removal) and factory defaults of u-boot from 9.0 image:

LOS boot env

LOS boot env. GitHub Gist: instantly share code, notes, and snippets.

gist.github.com

BananaPi boot env

BananaPi boot env. GitHub Gist: instantly share code, notes, and snippets.

gist.github.com

Bootloader console output with LOS env and w/ BananaPi env:

m5 env boot

m5 env boot. GitHub Gist: instantly share code, notes, and snippets.

gist.github.com

LOS env boot

LOS env boot. GitHub Gist: instantly share code, notes, and snippets.

gist.github.com
[Google TV General] truefriendcz:
Could you please recommend some instructions (step by step) how I can do it?
[Google TV General] npjohnson:
The wiki details building it.

Adding drivers is up to you.
[Google TV General] npjohnson:
Thanks for debugging.
[Google TV General] Functioner:
There is a difference in the value of the otg_device variable. I mentioned the idea of trying to change the value of this variable a few months ago. I don't know if anyone tried doing so. I looked for my M5 device, but I can't find it.
[Google TV General] _Fidor_:
I've managed to get USB working in recovery with the following change (not sure if this is done by the book):

linux/ # ./aml-flash-tool.sh aml_install_package.img
linux/ # adb shell
m5:/ # dd if=/dev/block/env of=/tmp/env_m5.img
m5:/ # exit
linux/ # adb pull /tmp/env_m5.img
linux/ # fw_setenv -c fw_env.config preboot "run bcb_cmd; run factory_reset_poweroff_protect;run upgrade_check;run init_display;run storeargs;run recovery_key;bcb uboot-command;usb start;run recovery_from_flash;"
linux/ # adb push env_m5.img /tmp/
linux/ # adb push aml_sdc_burn.UBOOT /tmp/
linux/ # adb shell
m5:/ # dd if=/tmp/env_m5.img of=/dev/block/env
m5:/ # dd if=/tmp/aml_sdc_burn.UBOOT of=/dev/block/bootloader

So with original (from BananaPi 9.0 image) bootloader and "usb start;" added in "reboot" environment variable it seems to be working. I cant test original bootloader as it seems to overwrite env variables on boot. I'll try to test this approach with LOS "upgrade" image next week to see if it works with LineageOS as well.
[Google TV General] Functioner:
Which recovery? LOS recovery?

As shown in the hex image in my prior post, the LOS boot images have a cmdline string for the otg_device variable in the header of the boot images. This value will override the env setting (for the otg_device variable) during kernel bootup.

A very simple check would just be to patch the cmdline header (as described in my prior post) for the otg_device variable in the LOS recovery boot image, and then try to boot it (w/o any other changes). It seems that no one wants to try doing this.

I'll try to find my m5 device again this weekend.
[Google TV General] _Fidor_:
Yes - LOS recovery has USB working with changes mentioned above 🙂
[Google TV General] ali387:
Hi,

Is this for YOC?

I am in Android recovery to apply setting to bypass google setup wizard

When I try ADB it does not list any attached devices:

C:\Users\Admin>adb devices
List of devices attached

Android recovery shows these four choices:

Reboot system now

Enter fastboot

Wipe data/factory reset

Power off

Has anyone successfully used the above steps?
[Google TV General] Functioner:
I found my bpi-m5. Should have more information soon.
[Google TV General] npjohnson:
Noted, can now fix this.
[Google TV General] npjohnson:
No and that won't work.

Stock recovery doesn't allow anything like that. You need (to build) and use a custom recovery.
[Google TV General] Functioner:
Great! I'll stop investigating the m5 then, now that you can fix it.
[Google TV General] CollieBabaX:
Hi, same issues here with my M5.

I read the posts in the thread but I did not understand much, I have no coding skills.

Do I have to do something or do I have to wait for a new version of LOS recovery?

Thanks
[Google TV General] ali387:
Thanks for the clarification. Appreciate it.
[Google TV General] npjohnson:
Just wait.
[Google TV General] Functioner:
The google account requirement in the oobe setup wizard can be bypassed on the YOC device (the new, 2023 onn device with the s905y4-b SoC) in real time as the setup wizard is running (if the uart is connected) via the uart shell to the os.

But that only gets past the setup wizard. The google tv launcher requires a google account, so an alternative launcher would still need to be installed via adb (also enabled over the uart shell to the os).
[Google TV General] Functioner:
Waiting is probably not the best idea. Instead, just be surprised if it happens.
[Google TV General] CollieBabaX:
:( can someone explain me what to do to solve it by myself?
[Google TV General] Functioner:
I'm working on it right now. Just dug my m5 device out of storage yesterday. I'll post my findings later today, since I went to the trouble of doing the work, even If another fix is imminent.
[Google TV General] CollieBabaX:
Great!

Thank you very much for your work.🙏
[Google TV General] npjohnson:
It looks like otg_device just needs to be removed from cline on m5?

If you can test that and verify I can fix same day.
[Google TV General] ali387:
Thanks for this expert pointer.

I opened this new device and wired it (followed your instruction from another post) for UART.

As the setup wizard is running I get this output on UART console (using putty on windows 11)

Starting kernel ...

uboot time: 4627160 us
boot 64bit kernel
[ 0.000000@0] Booting Linux on physical CPU 0x0000000000 [0x411fd040]
[ 0.000000@0] Linux version 5.4.180-android12-9-g8996e30f82ab (jiangruifeng@rd25) (Android (6443078 based on r383902) clang version 11.0.1 (https://android.googlesource.com/toolchain/llvm-project b397f81060ce6d701042b782172ed13bee898b79), LLD 11.0.1 (/buildbot/tmp/tmp6_m7QH b397f81060ce6d701042b782172ed13bee898b79)) #1 repo:master SMP PREEMPT Fri Mar 31 12:01:45 CST 2023
[ 0.000000@0] Machine model: Amlogic
[ 0.000000@0] earlycon: aml-uart0 at MMIO 0x00000000fe07a000 (options '')
[ 0.000000@0] printk: bootconsole [aml-uart0] enabled
[ 0.000000@0] 08400000 - 08500000, 1024 KB, ramoops@0x07400000
[ 0.000000@0] 05000000 - 08400000, 53248 KB, linux,secmon
[ 0.000000@0] 7f800000 - 80000000, 8192 KB, linux,meson-fb
[ 0.000000@0] 79c00000 - 7f800000, 94208 KB, linux,ion-dev
[ 0.000000@0] 74800000 - 77c00000, 53248 KB, linux,ion-fb
[ 0.000000@0] 50800000 - 74800000, 589824 KB, linux,codec_mm_cma
[ 0.000000@0] 4f400000 - 50800000, 20480 KB, linux,vdin1_cma
read_ao no reg:0x11
write_ao no reg:0x11[cec_get_wakeup_info1]: info=0x0
read_ao no reg:0x12
write_ao no reg:0x12[cec_get_wakeup_info2]: info=0x0

I am unable to enter any commands inside UART session.

I could try interrupting the boot process but then setup will not be running.

When you get a chance please let me know if I need do something different.

Also one question: Do all 2023 YOC onn devices come with s905y4-b SOC? I was under the impression that they came with s905Y4 soc not the B variant.

Thanks for any additional insghts and help you can provide.
[Google TV General] Functioner:
Very sorry, I forgot that the console is not enabled by default on YOC. The way I was able to use it is by enabling it via the magisk image.

If you unlock the bootloader, and flash the magisk image to vendor_boot as described in the other thread, then you'll see the console prompt. This will of course still work before the device is even setup.
[Google TV General] Functioner:
No, I was wrong about the otg_device value having anything to do with it. That value only effects the host/device status of the usb-c port on the m5, not the four other ports attached to the onboard hub on the m5.

I was able to get lineage running on my m5, and it runs well. The two primary issues I had getting it running were:

1. The super_empty.img image posted here does not produce discoverable dynamic partitions. Lineage recovery can't find them in order to write to the dynamic partitions. I edited super_empty.img (adding 1000 hex padding in two locations), and then it worked.

2. The stock bootloader on the m5, since it runs android 9, defaults to booting in system_as_root mode. I made an edit to the environment variable "storeboot" so that the test for system_as_root mode (done via the u-boot command "get_system_as_root_mode" does not set bootargs to run as system_as_root.

Once I did those two things, the m5 booted the official lineage build right up. Occasionally a usb peripheral might not be detected, but just unplugging it and plugging it back in solved the problem.

A bluetooth remote from another android tv device works perfectly (although some other remotes didn't) with the bpi-m5 rt8822cs gpio wi-fi/bt board.

I've attached the edited super_empty.img.
[Google TV General] npjohnson:
While I appreciate you getting it running, we need to diff what the Android o U-Boot is doing.

Need to dump env from both and compare.
[Google TV General] Functioner:
I'm not sure that I understand. Neither the unofficial or official builds include a bootloader replacement, so I'm assuming that these builds are intended to run with the original bootloader for the m5.

This is the default value for the storeboot variable on the m5:

storeboot=boot_cooling;get_system_as_root_mode;echo system_mode: ${system_mode};if test ${system_mode} = 1; then setenv bootargs ${bootargs} ro rootwait skip_initramfs;else setenv bootargs ${bootargs} ${fs_type};fi;get_valid_slot;get_avb_mode;echo active_slot: ${active_slot};if test ${active_slot} != normal; then setenv bootargs ${bootargs} androidboot.slot_suffix=${active_slot};fi;if test ${avb2} = 0; then if test ${active_slot} = _a; then setenv bootargs ${bootargs} root=/dev/mmcblk0p23;else if test ${active_slot} = _b; then setenv bootargs ${bootargs} root=/dev/mmcblk0p24;fi;fi;fi;if imgread kernel ${boot_part} ${loadaddr}; then bootm ${loadaddr}; fi;run storeargs; run update;

The lineage recovery could be configured to edit the environment to flip the system_as_root test, but there is still the matter of the bootloader having been built with that value as the default. A replacement bootloader (with the system_as_root default changed) would be the most direct fix.
[Google TV General] npjohnson:
Literally both the official and unofficial upgrade images, and OTAs include a U-Boot (bootloader) replacement.

I don't know what you're talking about though. I'm aware of how SAR works, but that's not what I'm talking about.

I am talking about the USB Periphial issue.
[Google TV General] _Fidor_:
I've linked both boot loaders ENVs few post above. One from Lineage OS and one from BP 9.0 OS. I've also uploaded them into GitLab ticket here: https://gitlab.com/LineageOS/issues/android/-/issues/6343

To my understanding of u-boot it boils down to "if usb start 0" in one of "if" among u-boot scripts. That's why I suggested updating preboot env. But I'm no expert here.

Am I missing something ? If so - please specify what are You looking for I'll be happy to update.

Please note that there are other issues w/ M5:

- Always boots to recovery (updating bootloader as advised does not help)

- Need an extra step w/ wipe-super super.img in fastboot

Maybe @Functioner is referring to those issues in his posts?
[Google TV General] Functioner:
I missed the "upgrade images". Instead, I followed the build links in the OP, and they led to the following zip archives:

https://mirrorbits.lineageos.org/full/m5/20231022/lineage-20.0-20231022-nightly-m5-signed.zip
https://github.com/ods-releases/m5/releases/download/lineage-20.0-20231010-UNOFFICIAL-m5/lineage-20.0-20231010-UNOFFICIAL-m5.zip

Neither of those zip archives contain a bootloader, best as I can tell. Please correct me if I'm wrong.

I probably didn't experience the issue because of having used the original bootloader with the lineage builds.

I'll install the amlogic format image, and then I will probably experience the USB peripheral issue.
[Google TV General] ali387:
Nice. Thanks. That worked as you said. I have 'Console $' prompt and able to bypass the initial setup.

Used ADB over wifi to add wolf launcher.

As always appreciate your insightful and very helpful knowledge share.
[Google TV General] Functioner:
You're correct. The original factory installed bootloader on my m5 device starts/restarts usb during u-boot for every boot:

BPI: try boot from sd/udisk
card out
(Re)start USB...
USB0: USB3.0 XHCI init start
Register 3000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus 0 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
BPI: try boot from udisk
** Bad device usb 0 **

The bootloader for the m5 lineage os (contained in aml_upgrade_package.img) does not do this. The absence of the usb start/restart sequence during u-boot seems to be the difference in whether or not usb peripherals will work in the recovery os and the userspace os.

The difference in the environment seems to be this:

factory m5 bootloader:

preboot=run bcb_cmd; run boot_from_sd_udisk;run factory_reset_poweroff_protect;run upgrade_check;run init_display;run storeargs;bcb uboot-command;run switch_bootmode;

bootloader contained in aml_upgrade_package.img:

preboot=run bcb_cmd; run factory_reset_poweroff_protect;run upgrade_check;run init_display;run storeargs;run recovery_key;bcb uboot-command;run switch_bootmode;

The difference is that the factory bootloader runs the "boot_from_sd_udisk" environment variable, which in turn may also run the "boot_from_sdcard" and/or "boot_from_udisk" environment variables. The running of these three variables causes the usb status (and the micro sd card slot status) to be checked, effectively starting/re-starting those devices.

boot_from_sd_udisk=echo BPI: try boot from sd/udisk;if mmcinfo; then run boot_from_sdcard;fi;if usb start 0; then run boot_from_udisk;fi;
boot_from_sdcard=echo BPI: try boot from sdcard;if fatload mmc 0 ${loadaddr} ${boot_scripts}; then source ${loadaddr}; fi;
boot_from_udisk=echo BPI: try boot from udisk;if fatload usb 0 ${loadaddr} ${boot_scripts}; then source ${loadaddr}; fi;

A workaround could be just to add a usb reset/start to some other variable that is run by the preboot variable.

The "upgrade_check" variable works for this purpose.

"upgrade_check" variable values:

upgrade_check=echo upgrade_step=${upgrade_step}; if itest ${upgrade_step} == 3; then run init_display; run storeargs; run update;else fi;

upgrade_check variable modified to include usb reset:

upgrade_check=usb reset; echo upgrade_step=${upgrade_step}; if itest ${upgrade_step} == 3; then run init_display; run storeargs; run update;else fi;

This change can be made over a burn mode connection using the amlogic command line update utility:

update mwrite upgrade_check-edit.bin mem 0x1080000 normal
update bulkcmd "env import -t 0x1080000 0x95"
update bulkcmd saveenv
update bulkcmd reboot

Even after this change, I found it sometimes to be necessary to unplug/replug my usb keyboard after the recovery or userspace os had fully booted, in order for the usb keyboard to be recognized properly.
[Google TV General] npjohnson:
This is fantastic work, thank you I think I can figure the rest out from here.
[Google TV General] _Fidor_:
As already said - outstanding work :) But I think there is small typo/missing steps. At least to my understanding. Please correct me if I'm wrong:

1. One must enter bootloader mode from burn mode (most likely obvious to more experience users)

2. One must load default values before import env import (otherwise whole env gets reset)

I can confirm that w/ steps below (performed once in AML burn mode) I'm getting USB running in recovery:

./update write /tmp/m5/blank/DDR.USB 0xfffa0000 0x10000
./update run 0xfffa0000
./update bl2_boot /tmp/m5/blank/DDR.USB
./update bulkcmd "env default -a"
./update mwrite /tmp/m5/blank/upgrade_check-edit.bin mem 0x1080000 normal
./update bulkcmd "env import -t 0x1080000 0x95"
./update bulkcmd saveenv
./update bulkcmd reboot

Where /tmp/m5/blank/DDR.USB file is a file extracted from aml_install_package.img from npjohnson download site.