Miyoo Mini¶

Links¶
Emulators, Ports and Applications¶
System¶
- Firmware:
- Toolchain:
- Frontends:
Hardware¶
- Official store in Aliexpress
- UART mod:
- Teardown
- 3D Print:
- Spare parts
Firmware's rootfs mounting¶
- Download the file used to update the console firmware from official site.
- Locate inside the ZIP the
.imgfile. In the case of the 2022-04-19 update the file is located inThe firmware0419directory and is namedmyoo283_fw.img. -
Open the file with an hex editor to read the beginning of it which contains information in text form with the blocks inside the image and where they are flashed on the NAND. In particular we are interested in the section describing the
rootfspartition which contains the following information:1 2 3 4 5 6
# File Partition: rootfs mxp r.info rootfs sf probe 0 sf erase ${sf_part_start} ${sf_part_size} fatload mmc 0 0x21000000 $(SdUpgradeImage) 0x1ae000 0x22b000 sf write 0x21000000 ${sf_part_start} 0x1AE000 -
According to the U-boot
fatloadcommand documentation, the last two parameters in hexadecimal are the size and the position of the rootfs partition inside the.imgfile. -
Create a directory (for example
mnt) and run the following command to mount the firmware rootfs in it:1sudo mount -o loop,sizelimit=0x1ae000,offset=0x22b000,ro,noexec miyoo283_fw.img mnt
Using the same method you can also mount the miservice and customer partitions:
1 2 | |
Cheatsheets¶
Interesting firmware directories/files¶
| Directory | Content |
|---|---|
/mnt/SDCARD |
SD mounting point |
/customer/main |
Main frontend startup script. It is the one that invokes .tmp_update/updater in case it exists which is the starting point of UIs like Onion or MiniUI |
/sys/devices/gpiochip0/gpio/gpio59/value |
Flag indicating if the machine is being charged |
/sys/class/pwm/pwmchip0/pwm0/duty_cycle |
Screen brightness (from 0 to 100) |
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors |
Available governors for processor (userspace, powersave, ondemand, performance) |
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor |
Current governor |
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies |
Available frequencies for processor (400000, 600000, 800000, 1000000, 1100000, 1200000) |
/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq |
Minimum frequency for processor |
/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq |
Maximum frecuency for processor |
/sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq |
Current frecuency |
/appconfigs/system.json |
System general settings (corresponds to Settings menu) |
Interesting OnionUI directories/files¶
| Directory | Content |
|---|---|
/mnt/SDCARD/Saves/CurrentProfile/saves/playActivity.db |
Play Activity database. To reset the statistics, you can simply delete the file |
/mnt/SDCARD/Saves/CurrentProfile/saves/PlayActivityBackup/ |
Directory containing backups of the previous playActivity.db file. Apparently this directory is not purged, so you will have to do it by hand from time to time. |
/mnt/SDCARD/Roms/recentlist.json |
Recent list |
/mnt/SDCARD/.tmp_update/romScreens/ |
Screenshots |
/mnt/SDCARD/.tmp_update/.disableMenu |
Disables the Game Switcher associated with the Menu key |
GPIOs¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | |
Keys¶
| Key | GPIO | SDL value | SDL descriptor |
|---|---|---|---|
| Up | 1 | 273 | SDLK_UP |
| Down | 69 | 274 | SDLK_DOWN |
| Left | 70 | 276 | SDLK_LEFT |
| Right | 5 | 275 | SDLK_RIGHT |
| Menu | 12 | 27 | SDLK_ESCAPE |
| A | 8 | 32 | SDLK_SPACE |
| B | 6 | 306 | SDLK_LCTRL |
| X | 9 | 304 | SDLK_LSHIFT |
| Y | 7 | 308 | SDLK_LALT |
| Select | 11 | 305 | SDLK_RCTRL |
| Start | 10 | 13 | SDLK_RETURN |
| L1 | 13 | 101 | SDLK_e |
| L2 | 14 | 9 | SDLK_TAB |
| R1 | 90 | 116 | SDLK_t |
| R2 | 47 | 8 | SDLK_BACKSPACE |
Framebuffer¶
1 2 3 4 5 6 7 8 9 | |
The frambuffer (/dev/fb0) contains 3 images (640x1440) and is rotated 180º. Each pixel occupies 4 bytes encoded in the following order: BBGGRRAA where AA (alpha) is always FF.