yashsingh1/xdaforums huggingface dataset:
[Google TV General] AusX10:
I'm stuck at the remote pairing screen on Banana Pi M5. Is there a way to get past it?

I'm able to pair devices through the Google TV app but it just keeps asking me to hold back and home... From what I've read, just pairing through the app should get me past this.

USB ports don't seem to work so I can't use a keyboard.

Read back a bit. I see M5 is currently broken. That's what I get for only reading the wiki.

FWIW I tried to install the 1117 build and get the "recovery: Could not read the partition table." error when I sideload the system image. Same result after manually flashing dtb, dtbo, recovery and super images via fastboot.

The only way I got to the OS booting/remote pairing was by flashing the aml_upgrade_package.img to see what would happen. I take it this is not intended for M5.
[Google TV General] Functioner:
Since you have it installed that much, you may be able to get usb peripherals working just by adding "usb start" or "usb reset" to some u-boot environment variable that gets executed at every boot, as described towards the end of this post.

Or, this post explains how I installed to the m5 from start to finish, and this post explains the usb peripheral issue on the m5.
[Google TV General] Functioner:
The partition table error is due to the provided super_empty.img.

That's why I've provided a replacement super_empty.img in this post.

Aside from the usb peripheral issue and the super issue, the other issues are also explained in the links referenced in my prior post.

All of the issues are relatively minor and the build runs well once you get past them.
[Google TV General] AusX10:
As it was already in this state, I flashed your super-edit then sideloaded the system image. This worked, but I can't get it to boot to system. It just keeps booting to recovery, even from bootloader/fastboot... hmm

As for the uboot env edit to fix USB. I wasn't able to get the amlogic command line stuff working in ubuntu (23). I tried older versions but the package repos don't seem to exist any more.

I've been using the usb burning utility in windows. It doesn't seem to have any cli capabilities. Might be the cause of my boot issue

I connected to the serial port to see what was going on but there doesn't seem to be a way to pause uboot.

Might just have to leave this as I'm way out of my depth. Thanks for the pointers
[Google TV General] Functioner:
Is there any chance that your device is still running the booloader from aml_install_package.img rather than the bootloader included with aml_upgrade_package.img?

The version of the bootloader inlcuded in aml_install_package.img is different than the version in aml_upgrade_package.img. The preboot variable in aml_install_package.img is coded to boot to recovery every time.

Try flashing the bootloader from aml_upgrade_package.img.
[Google TV General] Functioner:
The khadas versions should work.

There is also a cli utility for windows, update.exe. The khadas version should work, or there is a copy linked to this post.

Interrupting u-boot autoboot via the serial port should work on all versions of u-boot, including the factory version installed on the m5, and both of the lineage versions* contained in the amlogic format img files.

*Edit: I'm not sure if interrupting u-boot autoboot will work on the lineage version of the bootloader (in aml_install_package.img) that has the preboot variable coded to boot to recovery every time. The forced boot to recovery may occur before the option to interrupt autoboot would normally be executed.

A fixed build might eventually come. The workarounds provided in the meantime are a little difficult to implement, so don't be too hard on yourself. Hopefully a fixed build won't use amlogic format image files, and include the bootloader in the update zip files. The determination that an amlogic format image file was necessary was probably a result of the malformed super partition image not working otherwise. If a correctly formatted super_empty.img is used, the amlogic format method of installation is unnecessary for the m5.
[Google TV General] Functioner:
Since "Hit Enter or space or Ctrl+C key to stop autoboot" is being echoed to the console, you should be able to interrupt autoboot using the mentioned keyboard keys. The time interval to interrupt autoboot might be brief, so press the keys ahead of the notice being displayed.

Perhaps keyboard input isn't being recognized at all. Check that rx is wired correctly. If you're using minicom on linux for your comm program, make sure that you don't have hardware flow control enabled. Disable it if necessary via Ctrl-A O, Serial port setup.

Keyboard input won't work if hardware flow control is enabled.
[Google TV General] Big Dumb Object:
Okay, for the first time I unpacked one of the dopiders from my shelf to try an unofficial ROM, and immediately encountered a nuisance. When I boot into the Lineage Recovery, the GUI appears for only a brief moment, after which the screen goes black, forcing me to continue blindly via CLI. This is enough to complete installation, but doesn't allow to install unsigned add-ons such as Lygisk, when buttons are involved.

What is the solution?
[Google TV General] Big Dumb Object:
By the way, I learned how to control recovery via adb CLI from my previous experience with Xiaomi Pad 5, where the custom recovery also refuses to render GUI, displaying same black screen due to a known issue with dynamic FPS support. Maybe it's something like that with dopinder too?
[Google TV General] AusX10:
Wow, I must need new eyes. I read it twice and missed that entirely.
[Google TV General] Big Dumb Object:
What a disappointment!

I figured out how to confirm the installation of unsigned add-on blindly (when sideload gets stuck at 0% — press power button shortly and then one more time longer) and finalize installation by making /system writable with OverlayFS. But all in vain, because even with all the necessary files placed in /system/addon.d, Lygisk cannot keep root after OTA update on my dopinder, even though it's not an A/B device. Furthermore, mSurvival doesn't effective either.

What's wrong with this TV box?

Edit: OverlayFS doesn't seem to provide an actual ability to change /system – I need another solution. And I still don't quite understand why Lygisk is blocked from putting its files in /system/addon.d and how to circumvent that.
[Google TV General] Big Dumb Object:
I got it!

Lygisk can't place its files in /system/addon.d just because there is no free space in the partition. After I removed /system/fonts/NotoSansCJK-Regular.ttc and /system/fonts/NotoSerifCJK-Regular.ttc (nothing personal, fellow Chinese, but these fonts are just useless to me), Lygisk was able to finalize installation properly, and then successfully preserved root after the next OTA. It also allowed me to firmly DeGoogle unofficial builds with Systemless Debloater. But unfortunately, there is one drawback: the mentioned fonts are restored back with every OTA, so the described procedure must be repeated manually before each ROM update.

Hence my big request: could you please allocate at least 30MB of free space in /system in all your builds (ideally also in the official ones) to make the permanent root possible again like in the good old days?
[Google TV General] npjohnson:
uhhh, Magisk puts it's addon.d in system/addon.d still? How does it work on stock ROMs at all on dynamic devices then?

That's confusing.

Also, on all official builds I already reserve space: `BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 40000000` - 40 MB reserved.

Unofficials don't and I'm not sure we have enough free space to do so.... Maybe I could do like 8mb?

I'll look into it. thx for the concise explanation.
[Google TV General] Big Dumb Object:
Not Magisk – Lygysk! This is a special Magisk fork that targets archaic devices without dynamic partitions, but still running a modern LineageOS which recovery does not support /data decryption (that's why Lygisk). In short, this is the rooting tool designed specifically for devices like ours, where putting files in /system/addon.d is still a valid and effective way to save root after OTA.

It's so ironic how the attempt to properly overcome one limitation of unofficial builds (i.e. baked-in GApps) ran into another limitation of their. In my case, the installation of Lygisk required 26.5MB of free space in /system to be exact. So 8MB is a bit short.
[Google TV General] npjohnson:
but uh, these are dynamic partition devices.

But uhhhh 26 mb? What is it installing? that's kind of a large amount on devices that are this tight.
[Google TV General] Big Dumb Object:
My bad: devices without A/B partitions, I meant (lost in terminology between "dynamic" and "seamless"). But the answer to your query remains the same: Lygisk is just not tailored for stock ROMs, but for LOS and its branches.

The survival script and all files required for root re-installation after OTA. Normally these files are stored in /data, but Lineage Recovery can't decrypt it like TWRP, so this is the workaround.

26.5MB I got by simply subtracting the free space before and after Lygisk installation. I'm not sure if OS has managed this space effectively, because the entire /system/addon.d only takes 16MB at total.
[Google TV General] npjohnson:
Mm. Thx
[Google TV General] npjohnson:
DM'd you.
[Google TV General] apropper:
Hi, the newest update seems to have broken HDMI CEC. Normally I have to toggle HDMI control to get it working but now I can toggle all four settings in system/inputs and nothing happens. My sound bar still works, it's just that I can't control the volume with the remote, only the volume on the box (I'm on wade).

Please look into this. Thank you. 🙂
[Google TV General] npjohnson:
Please confirm that the last build actually works in its respect, it will help me narrow it down a lot
[Google TV General] apropper:
****, I was behind two versions when I updated. How do I downgrade? Is it the same as just flashing a build normally?
[Google TV General] npjohnson:
Should be, I allow downgrade in recovery.
[Google TV General] apropper:
Ok, can confirm CEC broke with 1123. It was working just fine with 1116.
[Google TV General] Big Dumb Object:
And again me from my thorny Magisk journey. After finding the way to install Lygisk, I immediately got the next problem by trying to extend it with LSPosed. With this module, almost every system boot takes eternity, so I can take a break to grab a coffee and watch hourly news while my dopinder lets me to the home screen. After disabling the module, everything goes back to normal.

I know inquiries regarding Xposed are not welcome, but this seems like a very device-specific issue (been using Xposed on all my android devices for years, but never seen such long boots before), so I captured a couple logcats with LSPosed ON/OFF on the fresh and clean setup , and would love it if you can take a time to peek into them, because I'm really stumped now.
[Google TV General] npjohnson:
Sadly I don't touch any sort of the framework modifier stuff, it just introduces too many variables to even be debuggable in my opinion, others are a bit more versed and good at it, I'm not going to be any help in that realm sadly.

Plus, my background is largely in the native side, not frameworks/java, so, sorry :/
[Google TV General] Big Dumb Object:
Well, it looks like this time I can't unravel this knot myself – I need help. Do you know of anyone else who is involved in maintenance of these devices and could take a look at my logcats? I only see funny lines like ActivityManager: Slow operation: 251116ms so far, now at startProcess there, but nothing concrete.
[Google TV General] npjohnson:
Sorry, most of the lineage guys kind of share my stance on the framework injection stuff, you'll have to work with the team that creates those components.
[Google TV General] Big Dumb Object:
Well, I contacted the developers of LSPosed, and here's the response: "this is bacause the device does not have enough memory, and the system keep trying gc. it cannot be fixed from our side."

Does it seem to be relevant? And if so, is there anything that could be done from your side?
[Google TV General] npjohnson:
ah, and I can't fix that from side :/

That's just what it is.
[Google TV General] Big Dumb Object:
So buying Radxa Zero or ODROID C4 with 4GB of RAM is the only way out for me if I would like to stay on LineageOS and if Banana Pi is still broken, right?
[Google TV General] npjohnson:
Or help me fix M5, afaik people have kind of identified what is wrong but haven't made any fixes source side to remediate it.
[Google TV General] Big Dumb Object:
Hey, this is my chance to get even with you and say "No, I'm sorry, I can't".

In fact, I'm just a typical user who can only waste money on various garbage and then whine to you, developers, that my garbage doesn't work the way I imagined it would.

By the way, does Android provides any utility that could be run at boot process via ADB to monitor memory usage? (Just for confirmation.)
[Google TV General] npjohnson:
haha - got me there.

To be frank, I think it's just as simple as making some changes to the u-boot env but no one has pointed me at exactly _what_ I need to change there.

If someone wants to diff the env's from working BL to ours and narrow it down that'd help.

And GNU `free` command does so.
[Google TV General] Big Dumb Object:
No, it's definitely not about RAM. It's just that LSPosed devs are very passionate about closing issues under any pretext.
[Google TV General] npjohnson:
It would make sense, we are tight on RAM. if they use like, 500mb, we're out of mem.
[Google TV General] Big Dumb Object:
I opened a new issue with clarification that the boot process only utilizes 2/3 of RAM at maximum, and got much more detailed answer based on my logs:

"lmkd has triggered many times, and systemui has been paused for tens of minutes for gc and then crashed, and leads to slow boot. this is indeed memory issue. there may be enough memory, but that does not mean the system thinks tmit is enough.

also kswapd takes most cpu to try to deal with the memory issue. if the system thinks it has enough memory, kswapd wont take that much of cpu."

Couldn't that be your department after all?
[Google TV General] npjohnson:
Sadly we configure LMKD to be reflective of the ADT3 stock builds, which was by far the most peformant set of values.

You can play with LMKD tuning by the levels via properties found here https://source.android.com/docs/core/perf/lmkd

If you find a combination that works you may just need to set those by hand.

But we follow the platform recommendation for ATV devices with the specs we have.
[Google TV General] Big Dumb Object:
Thank you so much! With your tips and primitive Magisk boot script with resetprop command, the problem is now solved and my dopinder boots up with LSPosed just barely slower than usual.

However, your platform recommendation don't seem so recommended actually. According to the docs you provided, ro.lmk.use_minfree_levels=true instead of false is obsolete, whereas ro.config.low_ram=true is not used by you at all. However, these two settings are the ones that led me to success. (Perhaps even one of them would be sufficient, but I started with both at once and immediately got a positive result).
[Google TV General] npjohnson:
Platform reccs are for mobile devices.

ATV ODMs are instructed to look at the yukawa and ADT3 configurations.

Which don't set low_ram (I have actually yet to see an ATV set this, likely because the SCUDO disable stuff it carries) and as for minfree levels, interesting.

Looking now that appears to be a way ADT3 varies from mobile.

I'll look into it.

If your issue is solved by that one, we could potentially deviate on that one, but not low_ram (that carries with it a ton of other stuff).
[Google TV General] Mr Smile:
Please excuse, if this is a very dumb question, that has already been answered elsewhere.

I've read the FAQ and after that most of this thread but now I'm more uncertain what to do than before.

Me and my family are long term LOS phone users since CM10 but due to the lack of functioning and convenient alternatives, we have been using FireTV sticks in our living room for several years to consume Netflix, Disney+ and Amazon Prime (currently and for the next few years still on a 1080p TV, because we also like 3D movies).

With the FireTV UI getting worse and worse I was happy to see, that there are officially LOS supported Android TV devices now. Unfortunately, I missed the selling of the ADT and Dynalink boxes. Netflix on Banana Pi M5 seems to be broken at the moment and Radxa Zero is missing some drm keys for Netflix playback.

So whats the goto Hardware (available in or at least shippable to europe) at the moment to consume Netflix/Disney/Prime on LOS? ODROID C4 could be ok, but I didn't find any reports for Netflix running or not running on it. I'm willing to pay as much money as necessary to get away from the ad polluted FireTV UI to an officially supported LOS device without Amazon or Google stuff on it!

Thanks for your advice!
[Google TV General] Big Dumb Object:
Today I performed additional tests, and it seems that ro.config.low_ram=true is the one that saves my device.

In fact, it makes sense, because according to docs, "on low-memory devices, the system should tolerate higher memory pressure as a normal mode of operation", whereas initially my dopinder started killing crucial processes already at 2/3 of used RAM.

I'd wait for the new Dynalink (already teazered on the official site).

ODROID C4 could be OK only if you (or someone else) helps npjohnson to fix it.
[Google TV General] npjohnson:
yeah, sadly won't be setting that flag (at least on ATV builds, someone could make a case to add it to mobile builds).
[Google TV General] SuperUser008:
I finally had time for this. I did the same and it worked for my device as well. Thanks!
[Google TV General] Big Dumb Object:
Did you miss me with my challenges? After all, I have another one!

As you might notice, English is not my native language, so having multiple keyboard layouts is essential for me. Additionally, I am using a third-party remote with build-in QWERTY keyboard as my primary input method with TV box. Unfortunately, this ROM doesn't allow to merge both these things together, preventing user from selecting more than one layout in the Settings > System > Keyboard > Physical keyboard (unlike the regular LOS).

Is it possible to fix this limitation, so that I don't have to use External Keyboard Helper paid app as a clumsy crutch?
[Google TV General] npjohnson:
Ah, so this is actually an Android TV issue that we've brought up to the Android TV team before - sadly we don't have the manpower to fix this one, as it's kind of inherent to how they have ATV stuff work (limited default applications and default input devices).

I'd file a bug on the android tracker - try to get some attention on it so Google fixes it.
[Google TV General] Big Dumb Object:
In the stock ROMs of some set-top boxes a full-featured Settings interface from AOSP is available. Maybe the same thing could be done here by simply borrowing Settings interface from the basic LineageOS? This would remove so many limitations!
[Google TV General] npjohnson:
Those are more often than not, both horrid UX and buggy - the apps aren't intended to live side by side and the default settings app shows many things we don't have/don't want/would break things.

Not a great idea.

LineageOS tried it back on cm-13.0 and it was _horrid_.
[Google TV General] ChriMo:
My interest is similar like Mr Smile: a Custom ROM Android TV device, easily flashable, available in Europe which is (very) fast for FHD/1080p.

My current personal interest/requirements for the Custom ROM:

- without GApps or at least no active Google Services/connection during usage;

- access of local network shares to play in Kodi, VLC, etc. ;

- Apps for YouTube working (Ad-free, no Login, custom settings managed locall), currently I use SmartTube since it supports captions;

Regarding the new Dynalink teazered on the official site https://dynalink.life/ you mean this one? (link Coming Soon is not working):
[Google TV General] Big Dumb Object:
Indeed. Besides, there is already review on YouTube.

If the story of previous gen repeats itself, npjohnson and his associates will never manage to make Onn 2023 official, and the new Dynalink will be the only LineageOS TV box for next year. But if you don't care about DRM – you can get Radxa Zero that has more hardware juice and full-fledged Android builds available.
[Google TV General] ChriMo:
Sad to read even niche manufacturers seem to not care about the Custom ROM needs.

While I do not care much about DRM, the device should be easy to use and keep (for others) meaning standard remote and easy to clean.

Not sure if Radxa Zero, I also heard about the Banana Pi, can be bought preconfigured with casing and remote (for accessible costs). Seems more like a geek device - I myself watch most of the things on a PC/Laptop.
[Google TV General] Big Dumb Object:
It's just the LineageOS devs prefer models of reference Google design, which are very few in number. Meanwhile, а huge share of the market is occupied by Chinese TV boxes like Ugoos or Tanix , and you can flash them unhindered if you only have a suitable ROM. But that's already off topic.

Just add some compatible case/heatsink from Raspberry Pi Zero and move on!
[Google TV General] Big Dumb Object:
Oh, and I was mistaken that day. The problem mentioned is for Banana Pi, so ODROID C4 might be really OK. Please excuse me.
[Google TV General] Big Dumb Object:
Is it just me or addon.d feature is broken in your unofficial builds?

I tried to finetune the Lygisk survivability with an addon.d script made to free up space by automatically rm /system/fonts/NotoSansCJK-Regular.ttc and rm /system/fonts/NotoSerifCJK-Regular.ttc. But whatever I tried was in vain, and then I noticed that after every ROM dirty-flash, all other scripts in addon.d directory ( including /system/addon.d/50-lineage.sh ), appear as empty files in my file manager. Then I tried to adb pull them, but they remain just as empty on my desktop too. This all feels very strange...
[Google TV General] npjohnson:
Known issue, kinda of architectural, not going to solve on 20, but 21 fixes it.
[Google TV General] Big Dumb Object:
Is it described somewhere? I want to know more about the hole that swallowed up two nights of my life.

So my wonderful script won't work in principle? And what about Radxa Zero – is it also affected? The more time I spend with dopinder, the more I want to replace it with something else. (I think you can understand me more than anyone else.)
[Google TV General] npjohnson:
Yeah, dopinder isn't exactly a high end device lol.

Its that by the way lineage does space reservations, when you include GMS no space is reserved on partitions, so the restore fails.

I plan to recalculate the values for 21.
[Google TV General] Big Dumb Object:
So what about Radxa Zero — does it affected by the same "architectural" issue?

And based on your words above, it can be assumed that any official device without GApps avoids this problem, but I'd like to hear confirmation before go shopping.
[Google TV General] npjohnson:
Yes and yes.
[Google TV General] Big Dumb Object:
Then another question (please sorry).

Radxa Zero doesn't have even a single physical button, so it's going to be hard for me to wriggle out this time when it comes to installing unsigned add-ons if I find myself without a GUI in Lineage Recovery again (see my posts #712, #713 and #715 ). Do you have any thoughts on why Lineage Recovery is only showing me a black screen? Maybe it has something to do with my screen resolution 2560x1440?
[Google TV General] npjohnson:
Have you tried it on a 1080p monitor?
[Google TV General] Big Dumb Object:
Today I took my dopinder to the room with FHD TV, powered it up and then rebooted into recovery – GUI still not rendered. Dunno if anything would be different if the initial installation was done in 1080p from the first steps.
[Google TV General] npjohnson:
We just fixed that, update to latest.
[Google TV General] Big Dumb Object:
Copy that! Looking forward to the build being available (now on 20231213).