Instructions for installing Garlic OS on your Anbernic RG35XX using macOS. Adapted and expanded from https://pastebin.com/YV1Va5JL, originally written by A GUEST on 2022-12-30. (I wish there were a better way to cite your work — I’m sorry!)
Each step is explained in English with the corresponding terminal command below it. These instructions should work without problem on any modern macOS — with either Intel or Apple Silicon CPUs. Tested on macOS Sonoma 14.5 on both an Intel i9 chip, and an Apple M1 Max chip.
Caution
You will end up formatting the ROMS
partition completely, so it is best to do this before you waste time copying any ROM files over.
-
A relatively recent version of macOS. Apple generally provides support for the 3 most recent macOS releases, and we get new releases every Sept/Oct.
-
You know how to find/launch apps on your Mac. Spotlight is a great built-in tool for this (⌘-space). Third-party software like Alfred, Raycast, or Launchbar are also good tools for this.
-
Download balenaEtcher. The free version is totally fine.
-
Comfortable-enough using Terminal.app (or alternatives).
-
An application which can open
.7z
archives. I can recommend: The Unarchiver (free) or Archiver (paid; this is what I use). -
You have Homebrew installed. (Installation is outside the scope of this tutorial, but it’s pretty fundamental if you do technical things on your Mac.)
- This includes installing the Xcode CLI tools (a much smaller download than the entire Xcode).
I'm starting with a 32 GB SanDisk Ultra MicroSD card, formatted as NTFS. Nothing fancy, but from a reliable brand. Any kind of MicroSD card should be fine, provided that you feel confident in its reliability.
Here's the Amazon.com (US) link (not a referral link). If you want to learn more about which symbols mean which things, this Wired article provides a decent explanation.
Caution
If you ordered a card from Anbernic, it is probably not very reliable. Many people have reported reliability issues with these cards, resulting in data loss. So, heads-up.
-
On your Mac, open Disk Utility.
-
On the left (1) UntitledNTFS is the name of my volume (the same as the one that shows up in Finder). We want to select its parent, which lets us manage the entire SD card. Once we have that selected, we choose Erase from the tool bar (2).
-
After choosing Erase, we will be presented with a dialog box. This box contains a few options, and we want to change them.
Field Selection Name Untitled is fine. We'll be changing this soon anyway. Format Choose MS-DOS (FAT). Scheme Choose Master Boot Record. You should end up with this. If all is well, click the Erase button to begin.
-
Disk Utility will begin reformatting the MicroSD card. When it is done, it should say Operation successful. If so, click the Done button.
If there was an error…
IMPORTANT: If there was an error, we will need to take additional steps to resolve this. Take note of the device ID, which will help us resolve the issue.
These are the error messages we know about:
-
Verify that the volume is formatted as MS-DOS (FAT32).
-
Read through the release notes so that you understand what you’re installing.
-
Just above the comment section are the download links. Download both parts.
RG35XX-MicroSDCardImage.7z.001
RG35XX-MicroSDCardImage.7z.002
-
Decompress the
.7z
files. -
This will result in a new directory called
RG35XX-MicroSDCardImage.7z/
withgarlic.img
inside.
Caution
If you have data you care about on the microSD card, back it up before flashing it with Garlic OS.
-
Launch balenaEtcher.
-
Choose Flash from file, then find and select the
garlic.img
disk image we downloaded previously. -
Under Select target, choose the device which contains your microSD card. (Take note of the device ID under the Location header.)
-
Choose the Flash! button.
-
Let the flashing process run until it completes.
-
Your microSD card volumes will be unmounted after the flashing. Pop your card out, then put it back in so that Finder mounts your new volumes on the desktop.
If you don’t see the drives on the desktop, check your Finder settings (or Finder preferences in older macOS releases).
-
Go to Finder (click on the background, click inside a Finder window, etc.).
-
In the upper-left, find the Finder menu, and choose Settings… (or Preferences… in older macOS releases).
-
Check to see that CDs, DVDs, and iPods is checked.
-
-
If the flashing process named both partitions No Name, then rename the larger partition (≈3.38 GB) as ROMS and the smaller partition (≈10.4 MB) as MISC. This can be done in Finder the same way as renaming any other file.
-
Back up the
BIOS/
andCFW/
folders from the ROMS partition. You will need to restore them after the partition resizing.
-
Install
gdisk
using Homebrew.brew install --cask gdisk
-
Use
diskutil
(installed by default on macOS) to view the list of mounted drives and look for the microSD card path. I have several external hard drives, and mine was/dev/disk11
with 4 partitions.TIP: If you paid attention to the Location column in balenaEtcher when you were selecting a disk target, this will be the same location.
diskutil list
/dev/disk11 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *31.9 GB disk11 1: Microsoft Basic Data MISC 10.5 MB disk11s1 2: Microsoft Basic Data 536.9 MB disk11s2 3: Microsoft Basic Data 53.5 MB disk11s3 4: Microsoft Basic Data ROMS 3.4 GB disk11s4
-
Launch
gdisk
usingsudo
. You will likely need to enter your password to authenticate.NOTE:
sudo
grants administrative permissions to your user, as if to say "super user, do this." If you don’t usesudo
it will launch, but it will fail on some of the later steps.sudo gdisk
-
gdisk
will ask for your device ID. We’ve already found this twice. 😉GPT fdisk (gdisk) version 1.0.9 Type device filename, or press <Enter> to exit:
My value was
/dev/disk11
. Yours may be different.Warning: Devices opened with shared lock will not have their partition table automatically reloaded! Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT. Command (? for help):
-
Enter the print command to verify we have loaded the right disk.
p
Disk /dev/disk11: 62333952 sectors, 29.7 GiB Sector size (logical): 512 bytes Disk identifier (GUID): 8F10075C-0512-4DBA-944E-1ADF2C17F4C0 Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 34, last usable sector is 7812466 Partitions will be aligned on 2048-sector boundaries Total free space is 16350 sectors (8.0 MiB) Number Start (sector) End (sector) Size Code Name 1 16384 36863 10.0 MiB 0700 MISC 2 36864 1085439 512.0 MiB 0700 SYSTEM 3 1085440 1189887 51.0 MiB 0700 CONFIG 4 1189888 7812466 3.2 GiB 0700 ROMS Command (? for help):
Your values may be different. The important bits are these 4 partitions, with these approximate sizes.
-
We need a command that is only available in expert mode.
x
Expert command (? for help):
-
Move backup data structures to end of disk.
e
Relocating backup data structures to the end of the disk Expert command (? for help):
-
Exit expert mode and return to main menu.
m
Command (? for help):
-
Delete the
ROMS
partition from the GPT table by entering delete mode.d
Partition number (1-4):
-
For me the
ROMS
partition was 4. Verify yours from the initial print command, but it should also be 4.4
Command (? for help):
-
Enter print command again to verify that we have deleted the correct partition.
NOTE: Remember nothing takes affect until we save and quit, so if there is a mistake, just quit without saving (q) and start again.
p
Disk /dev/disk11: 62333952 sectors, 29.7 GiB Sector size (logical): 512 bytes Disk identifier (GUID): 8F10075C-0512-4DBA-944E-1ADF2C17F4C0 Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 34, last usable sector is 62333918 Partitions will be aligned on 2048-sector boundaries Total free space is 61160381 sectors (29.2 GiB) Number Start (sector) End (sector) Size Code Name 1 16384 36863 10.0 MiB 0700 MISC 2 36864 1085439 512.0 MiB 0700 SYSTEM 3 1085440 1189887 51.0 MiB 0700 CONFIG Command (? for help):
-
Enter create new partition mode.
n
Partition number (4-128, default 4):
-
Choose
4
.4
First sector (34-62333918, default = 1189888) or {+-}size{KMGTP}:
-
When it asks you the for first and last sector, press
enter
on both of these to use the default values.enter
Last sector (1189888-62333918, default = 62332927) or {+-}size{KMGTP}:
enter
Current type is AF00 (Apple HFS/HFS+) Hex code or GUID (L to show codes, Enter = AF00):
-
For the hex code, choose
0700
for Microsoft Basic Data (as the partition is FAT32).0700
Changed type of partition to 'Microsoft basic data' Command (? for help):
-
Enter print command again to verify that we have deleted the correct partition.
NOTE: Remember nothing takes affect until we save and quit, so if there is a mistake, just quit without saving (q) and start again.
p
Disk /dev/disk11: 62333952 sectors, 29.7 GiB Sector size (logical): 512 bytes Disk identifier (GUID): 8F10075C-0512-4DBA-944E-1ADF2C17F4C0 Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 34, last usable sector is 62333918 Partitions will be aligned on 2048-sector boundaries Total free space is 17341 sectors (8.5 MiB) Number Start (sector) End (sector) Size Code Name 1 16384 36863 10.0 MiB 0700 MISC 2 36864 1085439 512.0 MiB 0700 SYSTEM 3 1085440 1189887 51.0 MiB 0700 CONFIG 4 1189888 62332927 29.2 GiB 0700 Microsoft basic data
-
Enter write mode. This will perform the changes to your disk.
CAUTION: This is your last chance to quit without breaking anything. Choose
q
if you have noticed a mistake during the print step.w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!! Do you want to proceed? (Y/N):
…and confirm!
Y
OK; writing new GUID partition table (GPT) to /dev/disk11. Warning: Devices opened with shared lock will not have their partition table automatically reloaded! Warning: The kernel may continue to use old or deleted partitions. You should reboot or remove the drive. The operation has completed successfully.
-
Eject the mounted volumes. You can either:
-
Select them and drag them to the trash can, or…
-
Right-click with a mouse; two-finger tap on a trackpad; or control-click with the keyboard — and then choose Eject from the menu.
-
-
Pop your card out, then put it back in so that Finder mounts your new volumes on the desktop.
NOTE: The size of the
ROMS
volume will still be incorrect until the next step.
-
Open Disk Utility (installed by default on macOS), and find the ROMS partition.
-
Erase the partition. For the name, keep
ROMS
. For the format, choose MS-DOS (FAT). -
Wait for it to complete.
-
Finally re-copy the
BIOS/
andCFW/
folders we backed-up earlier, and any ROM files and/or save files that you want to make available to your device.
You have installed Garlic OS to your Anbernic RG35XX!
Put the microSD card back into the top slot, and power-on the device.
For more fun, check out custom themes/skins, as well as creating a custom boot screen!