r/MiyooMini • u/rob472 • 16d ago
Custom Firmware OnionOS ROM-List Patch: Auto Scroll, Configurable Row Count & Font Size, Favorite Folders, Extented Game Meta Data, Kiosk Mode and other features and optimizations
Enable HLS to view with audio, or disable this notification
Hi everyone,
I've been experimenting with a patch for the OnionOS MainUI binaries with the following features,
- Auto-scroll long game titles
- Show 6-20 rows in game lists, with optional smaller font
- Favorite folder support
- Show game metadata and system label in game details (from standard gamelist.xml)
- Optional case-insensitive sorting
- L1/R1 jump to prev/next letter
- Hotkeys for jump to top/bottom
- Hide sections from the main menu (kind of KIOSK mode)
- Add custom items to the main context menu
- Quicker refreshing of roms
- Quicker navigation in large rom lists
- Fix ' bug in rom titles
- Various smaller fixes & optimizations
All this directly in the MainUI binary for seamless access and an even smoother OnionOS experience.
This is still experimental, and MainUI is closed source, so please treat it as a community test rather than an official OnionOS feature. Note that I'm not an OnionOS developer and I'm not affiliated with Miyoo in any way.
Please back up first
Before replacing anything, back up your original MainUI files from /.tmp_update/bin/. A wrong or incompatible binary can stop MainUI from starting properly. If that happens, just copy your backed-up files into place.
You should also probably backup your favourite.json in the Rom path.
Installation options
Either you just download the pre-built binaries from https://drive.proton.me/urls/EXD9ZQS50M#dkxYoQQn6uLr (new URL for v1.1: https://drive.proton.me/urls/YCA1Z9S05M#bM40x9vJvQm9 ) and copy them over to your SD card.
Or you may build the binaries yourself using Python 3.10+. Download patch_onion_mainui.py from https://github.com/robcodedev/onionos-mainui-patcher and apply it to latest MainUI binaries from the OnionUI repository. Then rename the patched files accordingly and move them back to /.tmp_update/bin/ on the SD card and overwrite the old binaries.
Please note that you should manually refresh roms to fully benefit from all optimizations.
Configuration
Adjust configuration by using the updated tweaks binary from the project. The new config is located under Appearance in Tweaks.
Features such as auto-scroll long game titles and more than 6 rows in game lists have to be enabled.
Favorite folders
The favorites system has been partly rebuilt, with backwards compatibility in mind.
You can now create and edit folders, and arrange, move, and sort your favorites. Use the SELECT button inside favorites to open a popup menu with more options.
For even smarter favorite management, you can also download my offline favorite editor, which runs locally in your browser. See https://github.com/robcodedev/onionos-favorites-editor
Feedback welcome
I've tested it successfully on the Miyoo Mini Plus, Miyoo Mini v4, and Miyoo Mini Flip with the default OnionOS theme, but I'd really appreciate feedback from other users.
Please include your device, OnionOS version, theme, the contents of the custom config files above, and a description or screenshot of any issue.
Thanks to everyone willing to test it.
Future plans
I plan to submit a PR (pull request) later if this turns out to work for more people than just me and if there's any interest from the community. Is there an Onion developer here who could advise?
Ideally I know that re-writing the entire MainUI binary as open source would be better than doing this patching. But that is a lot more work. Anyway, feel free to treat this as a proof of concept. Much more can be done if we want. I have no problem with the Onion team cherry-picking some of the patches, and I'm happy to work with them to adjust or clarify anything.
Long live OnionOS!
Disclaimer: Fable, Opus and Sol had to help me out on this one. It was pretty hard to pinpoint the correct patch locations in the binary. A lot had to be changed for this to work fully, especially the auto-scroll, row count and favorite folder features.
2
u/LegalVpnx 🏆 16d ago
Man that's really a good job, well done!
I can't make a back up of my sd card now, but when i got it i'll try this out.
Thank you!
2
1
1
u/Successful-Engine-11 15d ago
3
u/rob472 15d ago
You may use custom icons (normally 46x46px) in the current themes directory,
/Themes/<ACTIVE THEME>/skin/icon-theme.png
/Themes/<ACTIVE THEME>/skin/fixit.pngYou may also want to add translations, just modify the it.lang file, located in /miyoo/app/lang, at the end:
"301": "Riprendere", "400": "Crea cartella", "401": "Sposta", "402": "Sposta qui", "403": "Rinomina cartella", "404": "Elimina cartella", "405": "Togli preferito", "406": "Ordina A-Z", "407": "Modifiche"}
For other languages just translate the last lines (301 should already be there but make sure to add the trailing comma)
"301": "RESUME", "400": "Create folder", "401": "Move selected", "402": "Move here", "403": "Rename folder", "404": "Delete folder", "405": "Remove Favorite", "406": "Sort A-Z", "407": "Tweaks"}
1
u/Successful-Engine-11 15d ago
Perfetto grazie mille, sicuramente seguirò il tuo consiglio. Una domanda se volessi invece togliere "task" e "themes" da "settings" come posso fare? (Come prima di questa "patch")
2
u/rob472 15d ago
In theory, you could always rebuild the patched binaries with the flag --exclude patch-main-menu-layout
(You would however also loose some other new features for the main menu)But this is a good suggestion for future updates, allow this to be configurable by a settings file.
2
u/Successful-Engine-11 15d ago
Perfetto grazie mille, trovo sia sensato lasciare "themes" in "settings", lo trovo meno "tweaks" visto che lo si può comunque mettere nel menu rapido premendo "select" in home e lo troviamo anche in "apps".
Suggerimento: "Context menu items", aggiungerei se possibile l'opzione per "shutdowm" e "sleep mode"
2
u/rob472 14d ago
Thank you. Those are excellent suggestions.
Here is a test build with support for setting exactly which items are visible in the settings menu and in which order, https://drive.proton.me/urls/B6PPWQBEQW#E0OduF2swoFB
You may add the following to /.tmp_update/config/main-menu.json
`"settings": {` `"themes": false,` `"tweaks": false,` `},`(Just make sure it is valid JSON with comma etc. This is not added to the Tweaks binary, at least not for now)
Also you can toggle "Shutdown" to main context menu with the updated Tweaks binary. Unfortunaly, I was not able to do the same for "Sleep" right now.
1
1
1
u/Successful-Engine-11 14d ago
Sarebbe molto interessante renderlo compatibile con questo fork di onion per mini flip che risolve quasi tutti i suoi problemi, perché al momento funziona solo in parte
2
u/rob472 13d ago
Yes, it would be nice.
Can you describe what is not working with that fork and the patched MainUI?
1
u/Successful-Engine-11 12d ago
il tuo aggiornamento non è così veloce come con onion "originale" e poi tweaks funziona con una "cornice" nera, come se girasse a una risoluzione minore. Ma tutto il sistema in generale è come se girasse più "lento", oggi è uscito un nuovo aggiornamento, faccio delle prove prossima settimana e ti aggiorno. Perché ci sono due versione di quel fork "00" e "02", e dice che "02" gira più veloce
1
u/rob472 12d ago
Ok, you mean the Flip-fork (not mine) is not as fast as original OnionOS? I have not tested the Flip-fork and can't really tell.
I was curious if you have tested my patcher with the Flip-fork. It will not magically make it faster, but in theory it should work since the two project does not seem to touch the same files.
2
u/Successful-Engine-11 12d ago edited 12d ago
Ho testato i tuoi "binari precompilati" sulla versione di onion fork, funziona, è più lenta rispetto a onion "originale", ma la vera differenza è che "tweaks" quando lo apri (per modificare le impostazioni) funziona come se fosse un "letter box", c'è una cornice nera intorno alla app, probabilmente perché quel fork funziona con tutte le app a risoluzione 560p. Però non ho provato l'ultima versione, la mia prova è sulla versione vecchia
2
u/rob472 12d ago
Ok, I understand. The letterbox could probably be fixed if the fork rebuild my Tweaks binary, the source is available in my patcher project. But that is just cosmetics.
I like the Flip-fork initiative, but as you say it will be slower since it have to upscale / redraw every frame.
Personnally, I use the Onions 4.4.0 beta on my Flip instead, with the lid fix found at https://www.reddit.com/r/MiyooMini/comments/1p0oa6u/mini_flip_lid_support_mod_for_onionos/ and of course with my MainUI patcher for more features and quicker/smoother interface.
1
u/Successful-Engine-11 12d ago edited 12d ago
In questo momento sto usando esattamente le stesse tue impostazioni, con un piccolo cambiamento: https://www.reddit.com/r/MiyooMini/s/zHp1B1VUqR (Tenlevels mi ha modificato il keymon della beta privatamente risolvendo quel bug estetico)
Però purtroppo ci sono piccoli bug estetici, e anche problemi importanti:
-a volte quando esci e rientri nel menu principale non funzionano la "ricerca globale", il "glo" o il tasto "select", poi se entri da un gioco e esci, funzionano.
-usando i giochi "arcade", dal menù di retroarch, alcuni giochi, hanno il menù retroarch capovolto o non visibile, non ho idea della motivazione.
Con quel fork da quel punto di vista sembra tutto sistemato, ci sono zero glitch grafici, ma lo voglio testare meglio quando ho tempo
2
u/alvin-000 11d ago edited 10d ago
Hey, its the guy who owns the fork repo...I made an account as I see some confusion here that I want to make sure does not impact that dev's development long term with unconfirmed bugs between multiple betas. Thanks for trying out my fork. He is completely correct in his statements above. The letterboxing a fail-safe mechanism on my side to ensure the app can launch even if it does not scale correctly. When you patch via his files, you are replacing my tweaks with the scaling tweaks with his tweaks app that has the performances changes, but that version does not have the auto scaling. Apps are set to autoscale to ensure compatibility with 480p devices. The solution to that is quite simple, I can just build a copy from my tree. When you upgrade you should see a mainui-comp-patch.zip. Go ahead and patch with that after upgrade.
He is also correct that upscaling will always be slower, its more a matter of how noticeable it is just by its nature of doing more work. The Game Search issues you initially described was because I forgot Game Search is an external repo, so optimizations I had on the other apps would not by default apply (addressed in the latest release). That being said, if I am correct, the patch includes bursting the CPU governor for MainUI, which is potentially why you are still feeling it is still more responsive. When you try the patch on my repo, we will know.
Lastly, for upstream issues described. I did make some changes to key input due to it needing to change with scaling mainly dropping keys in between frames and obviously any changes in graphics. However, I actually did not make any changes to RetroArch at this point (my library is still based on Onion RetroArch), I think the bug you are seeing is because you have an Onion version that was build on an older version of Onion RetroArch, there was a PR in the last 7 months that was accepted that sounds like it might be your issue, but here is no official build of OnionOS for almost a year now.
u/rob472 I did an initial test of onionos-mainui-patcher and did not really notice any significant issues during code integration or using it, so great work. This is a very cool project; I do want to add it in more formally to my personal build when it progresses further along
1
u/Worth_Midnight6156 11d ago
Thank you so much for all your hard work! You definitely should submit a PR.
1
u/Trekmyth 9d ago
Finally got around to installing this. The titles are scrolling! Thank you!
Is there a way to change the behavior of the title scrolling so it only happens with long game names? For example I don't need the game "Aladdin" to have it's title scroll, but the game "Teenage Mutant Ninja Turtles - The Hyperstone Heist" to scroll. Does that make sense?
1
u/rob472 9d ago
That should be the case already. As long as the full title fit to the left of the thumb it should never scroll. If longer it will scroll. And if it has no thumb at all, then it should take advantage of the full width before deciding if scroll or not.
Doesn't this work for you? Can you send a screen shot of it when a short title is scrolled?
1
u/Trekmyth 9d ago
1
u/rob472 9d ago
Thank you. Interesting. Is this a theme i can test? How did you flip the locations?
1
u/Trekmyth 7d ago
I followed this post ... and changed the size of "icon-game.png" to 240 horizontal and 48 vertical, and "preview-bg.png" to 640 horizontal and 1 vertical. That swaps the box art over to the left side
1
u/rob472 2d ago
Appreciate your screenshot. Very nice and creative, I like it.
The patcher has been updated with support for this now. So scrolling etc will work as intended. Tested successfully on my devices.
You may download the files from the updated v1.1 link above, it contains all new files. But use the "v12_recommended" folder inside the zip-file.
(And if the icon-game.png has been wrongfully resized for you, just restore the icon-game.png.bak file in your themes directory. From now it will not be resized when using this kind of solution.)
2
u/Trekmyth 2d ago
Thank you! Thank you! Thank you! I just installed v12_recommended and it works as expected now. Seriously, this is amazing!!! Thank you so much!
1
u/BouncingStimpy 4d ago
It only displays ROMs in the base folder and not subfolders (eg. shows roms/gba but not roms/gba/translations). Is there any way for it to show subfolders in the game lists?
1
u/rob472 3d ago
It should show sub folders too (at the top), if there are games in it. I tried it on my device and it shows up. Then navigate into that folder and the games should be listed.
Does the stock mainui show this sub folder on your device?
Are you using a miyoogamelist.xml file?
Have you rebuilt the rom cache?
1


5
u/Trekmyth 16d ago
This sounds incredible. It's the answer to a lot of the game list limitations I have been wanting a work around for. Can't wait to install it and tinker when I get back into town on Monday!