├── .gitignore ├── Roms └── APPS │ ├── UNCHAINED │ ├── scripts │ │ └── unchained_change_language.sh │ └── etc │ │ ├── shadow │ │ └── ssh │ │ └── sshd_config │ ├── unchained_connect_wifi.sh │ ├── unchained_export_debug_info.sh │ └── unchained_install_ssh.sh ├── LICENSE.md └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /Roms/APPS/UNCHAINED/scripts/unchained_change_language.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo $0 $* 3 | progdir=`dirname "$0"` 4 | 5 | whoami 6 | 7 | apt-get install -y language-pack-en 8 | dpkg-reconfigure locales 9 | update-locale LANG=en_US.UTF-8 LANGUAGE= LC_MESSAGES= LC_COLLATE= LC_CTYPE= -------------------------------------------------------------------------------- /Roms/APPS/unchained_connect_wifi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo $0 $* 3 | progdir=`dirname "$0"` 4 | log=$progdir/UNCHAINED/wifi_log.txt 5 | 6 | #Connect to your home wifi - day one stock image could only accept 36 chars in ui 7 | ssid=WLAN-747965 8 | password=85839213658870718207 9 | 10 | touch $log 11 | nmcli d wifi connect $ssid password $password > $log 2>&1 12 | 13 | 14 | -------------------------------------------------------------------------------- /Roms/APPS/unchained_export_debug_info.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo $0 $* 3 | progdir=`dirname "$0"` 4 | log=$progdir/UNCHAINED/debug.txt 5 | 6 | touch $log 7 | 8 | #Make sure this script is running as root. 9 | whoami > $log 2>&1 10 | who >> $log 2>&1 11 | $progdir >> $log 2>&1 12 | 13 | cat /etc/default/locale >> $log 2>&1 14 | 15 | uname -a >> $log 2>&1 16 | 17 | $progdir/UNCHAINED/bin/binArm32HFp >> $log 2>&1 18 | $progdir/UNCHAINED/bin/binArm64 >> $log 2>&1 19 | 20 | echo "advanced output for game user" >> $log 2>&1 21 | su game >> $log 2>&1 22 | who >> $log 2>&1 23 | 24 | w >> $log 2>&1 -------------------------------------------------------------------------------- /Roms/APPS/unchained_install_ssh.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo $0 $* 3 | progdir=`dirname "$0"` 4 | log=$progdir/UNCHAINED/install-ssh-log.txt 5 | 6 | touch $log 7 | 8 | #Make sure this script is running as root. 9 | whoami > $log 2>&1 10 | 11 | 12 | apt-get install -y openssh-server >> $log 2>&1 13 | systemctl enable ssh --now >> $log 2>&1 14 | systemctl status ssh >> $log 2>&1 15 | 16 | cp $progdir/UNCHAINED/etc/ssh/sshd_config /etc/ssh/sshd_config 17 | 18 | addgroup --system sshusers >> $log 2>&1 19 | adduser root sshusers >> $log 2>&1 20 | adduser game sshusers >> $log 2>&1 21 | 22 | service ssh restart >> $log 2>&1 23 | 24 | # Update Time 25 | date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z" -------------------------------------------------------------------------------- /Roms/APPS/UNCHAINED/etc/shadow: -------------------------------------------------------------------------------- 1 | root:$1$eaDV9/Gn$vOLy5KM053V1ak4osY4uP.:19459:0:99999:7::: 2 | daemon:*:19458:0:99999:7::: 3 | bin:*:19458:0:99999:7::: 4 | sys:*:19458:0:99999:7::: 5 | sync:*:19458:0:99999:7::: 6 | games:*:19458:0:99999:7::: 7 | man:*:19458:0:99999:7::: 8 | lp:*:19458:0:99999:7::: 9 | mail:*:19458:0:99999:7::: 10 | news:*:19458:0:99999:7::: 11 | uucp:*:19458:0:99999:7::: 12 | proxy:*:19458:0:99999:7::: 13 | www-data:*:19458:0:99999:7::: 14 | backup:*:19458:0:99999:7::: 15 | list:*:19458:0:99999:7::: 16 | irc:*:19458:0:99999:7::: 17 | gnats:*:19458:0:99999:7::: 18 | nobody:*:19458:0:99999:7::: 19 | _apt:*:19458:0:99999:7::: 20 | systemd-network:*:19458:0:99999:7::: 21 | systemd-resolve:*:19458:0:99999:7::: 22 | messagebus:*:19458:0:99999:7::: 23 | dnsmasq:*:19458:0:99999:7::: 24 | game:$6$/WixT86/$dPI.jthqMkTNCLiKvL9c3YWAcSPVgEids/yQHlWUqqDewi96KKRU7GJ1wSUHE75xVBlMUlMdpM48SuZbOjdT3.:19461:0:99999:7::: 25 | usbmux:*:19461:0:99999:7::: 26 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Florian Marsch 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Roms/APPS/UNCHAINED/etc/ssh/sshd_config: -------------------------------------------------------------------------------- 1 | # $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $ 2 | 3 | # This is the sshd server system-wide configuration file. See 4 | # sshd_config(5) for more information. 5 | 6 | # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin 7 | 8 | # The strategy used for options in the default sshd_config shipped with 9 | # OpenSSH is to specify options with their default value where 10 | # possible, but leave them commented. Uncommented options override the 11 | # default value. 12 | 13 | #Port 22 14 | #AddressFamily any 15 | #ListenAddress 0.0.0.0 16 | #ListenAddress :: 17 | 18 | #HostKey /etc/ssh/ssh_host_rsa_key 19 | #HostKey /etc/ssh/ssh_host_ecdsa_key 20 | #HostKey /etc/ssh/ssh_host_ed25519_key 21 | 22 | # Ciphers and keying 23 | #RekeyLimit default none 24 | 25 | # Logging 26 | #SyslogFacility AUTH 27 | #LogLevel INFO 28 | 29 | # Authentication: 30 | 31 | #LoginGraceTime 2m 32 | #PermitRootLogin prohibit-password 33 | #StrictModes yes 34 | #MaxAuthTries 6 35 | #MaxSessions 10 36 | 37 | #PubkeyAuthentication yes 38 | 39 | # Expect .ssh/authorized_keys2 to be disregarded by default in future. 40 | #AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2 41 | 42 | #AuthorizedPrincipalsFile none 43 | 44 | #AuthorizedKeysCommand none 45 | #AuthorizedKeysCommandUser nobody 46 | 47 | # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts 48 | #HostbasedAuthentication no 49 | # Change to yes if you don't trust ~/.ssh/known_hosts for 50 | # HostbasedAuthentication 51 | #IgnoreUserKnownHosts no 52 | # Don't read the user's ~/.rhosts and ~/.shosts files 53 | #IgnoreRhosts yes 54 | 55 | # To disable tunneled clear text passwords, change to no here! 56 | PasswordAuthentication yes 57 | PermitEmptyPasswords yes 58 | 59 | # Change to yes to enable challenge-response passwords (beware issues with 60 | # some PAM modules and threads) 61 | ChallengeResponseAuthentication no 62 | 63 | # Kerberos options 64 | #KerberosAuthentication no 65 | #KerberosOrLocalPasswd yes 66 | #KerberosTicketCleanup yes 67 | #KerberosGetAFSToken no 68 | 69 | # GSSAPI options 70 | #GSSAPIAuthentication no 71 | #GSSAPICleanupCredentials yes 72 | #GSSAPIStrictAcceptorCheck yes 73 | #GSSAPIKeyExchange no 74 | 75 | # Set this to 'yes' to enable PAM authentication, account processing, 76 | # and session processing. If this is enabled, PAM authentication will 77 | # be allowed through the ChallengeResponseAuthentication and 78 | # PasswordAuthentication. Depending on your PAM configuration, 79 | # PAM authentication via ChallengeResponseAuthentication may bypass 80 | # the setting of "PermitRootLogin without-password". 81 | # If you just want the PAM account and session checks to run without 82 | # PAM authentication, then enable this but set PasswordAuthentication 83 | # and ChallengeResponseAuthentication to 'no'. 84 | UsePAM yes 85 | 86 | #AllowAgentForwarding yes 87 | #AllowTcpForwarding yes 88 | #GatewayPorts no 89 | X11Forwarding yes 90 | #X11DisplayOffset 10 91 | #X11UseLocalhost yes 92 | #PermitTTY yes 93 | PrintMotd no 94 | #PrintLastLog yes 95 | #TCPKeepAlive yes 96 | #UseLogin no 97 | #PermitUserEnvironment no 98 | #Compression delayed 99 | #ClientAliveInterval 0 100 | #ClientAliveCountMax 3 101 | #UseDNS no 102 | #PidFile /var/run/sshd.pid 103 | #MaxStartups 10:30:100 104 | #PermitTunnel no 105 | #ChrootDirectory none 106 | #VersionAddendum none 107 | 108 | # no default banner path 109 | #Banner none 110 | 111 | # Allow client to pass locale environment variables 112 | AcceptEnv LANG LC_* 113 | 114 | # override default of no subsystems 115 | Subsystem sftp /usr/lib/openssh/sftp-server 116 | 117 | # Example of overriding settings on a per-user basis 118 | #Match User anoncvs 119 | # X11Forwarding no 120 | # AllowTcpForwarding no 121 | # PermitTTY no 122 | # ForceCommand cvs server 123 | 124 | PasswordAuthentication yes 125 | PermitRootLogin yes 126 | AllowUsers root game 127 | AllowGroups sshusers 128 | StrictModes no -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RG35XX+ Unchained 2 | 3 | ## TL:DR; 4 | Copy this repo into you SD card, put it into your RG35XX+ and activate SSH to get remote access and do whatever you want with root powers. 5 | 6 | - [RG35XX+ Unchained](#rg35xx--unchained) 7 | * [TL:DR;](#tl-dr-) 8 | * [How to SSH on RG35XX+](#how-to-ssh-on-rg35xx-) 9 | + [Connect WiFi](#connect-wifi-optional) 10 | + [Install ssh server](#install-ssh-server) 11 | + [Troubleshout](#troubleshout) 12 | + [Change language via ssh](#change-language-via-ssh) 13 | + [Known issues](#known-issues) 14 | * [Whats next](#whats-next) 15 | * [Motivation](#motivation) 16 | 17 | 18 | ## How to SSH on RG35XX+ 19 | Luckily, executables put into Roms/APPS/ are executed with root access. Just copy this repo onto a SD card and navigate to 20 | > RA Games > Apps 21 | 22 | in your handheld. 23 | 24 | I recommend to use a second empty SD card (TF2) so that the folders are empty and the view is more clean and simple to use. You will need to execute the UNCHAINED scripts only once. 25 | 26 | ### Connect WiFi [optional] 27 | ``` 28 | select unchained_connect_wifi 29 | ``` 30 | This script is not mandatory and only needed for users of the day one version/stock os of RG35XX+, where you can only put 36 characters into the systems WiFi ui. A working internet connection is crucial to activate SSH later. Edit this file and put your WiFi credentials there. Enable WiFi before running. 31 | 32 | ### Install SSH server 33 | ``` 34 | select unchained_install_ssh 35 | ``` 36 | This script requires internet to download new packages. It will download `openssh-server` and copy a proper settings file that allows root login via SSH. Also it updates the system set time, i need to do it weirdly because `ntpdate` is not found. 37 | 38 | Check your systems WiFi ui and use the IP Address displayed there to login to your RG35XX+ via SSH. 39 | ``` 40 | ssh root@192.168.x.x 41 | ``` 42 | 43 | Known credentials: 44 | |Username|Password| 45 | |---|---| 46 | |root|root| 47 | |game|game| 48 | 49 | 50 | ### Troubleshout 51 | ``` 52 | run unchained_export_debug_info 53 | ``` 54 | Troubleshouting is quite hard because a running script cant ouput errors visually. In case you have troubles check the log files (you will find them in the UNCHAINED folder). Make sure you are connected to the internet and that the user running the scripts is root. When executing a script you wont see any output visualy but only the Anbernic Boot Screen or even an entirely black screen. Thats ok. The scripts create logfiles for troubleshooting, please be aware that you need to shutdown the handheld properly to make the device flush its write buffer for SD cards. In case you just eject the sd card too early or while the device is running you might experience write loss and no file is created. 55 | 56 | ### Change language via ssh 57 | 58 | The system language is mandarin/chinese, no mater what you have configured in your ui. To change that please execute 59 | ``` 60 | sh /mnt/sdcard/Roms/APPS/UNCHAINED/scripts/unchained_change_language.sh 61 | ``` 62 | and follow the wizard. reboot afterwards but exiting ssh session and relogin should be enough. 63 | 64 | ### Known issues 65 | the sudo command does not work. as everything is executed as root anyways, i didnt care to fix it :) 66 | 67 | For Step [change language via ssh](#change-language-via-ssh) : If you put the files into TF1 use /mnt/mmc/... instead of /mnt/sdcard/..., which is for TF2. 68 | 69 | Put your Device onto a power plug while using ssh and set display always on, else the display might turn off because of inactivity and you will loose the connection. 70 | 71 | ## Whats nexts 72 | I plan to simplify the scripts, so that they all can run automatically with a single action. I am not an Ubuntu expert, so it might take a while but ultimativelly i want to merge all provided steps into 1. 73 | 74 | - install SSH 75 | - change system language to english 76 | 77 | ## Motivation 78 | I just wanted to write a small tool for the anbernic stock OS to check on the installed ROMS and download respective thumbnails if missing. Unfortunetly i could not make my programm run. I figured that the ARM Cortex-53 is capable of 64 bit commands but on the stock image i only found a 32 bit interpreter. I made my program run in 32 bit mode (Arm32 HF) but the Arm32 toolschain is just pain. Also some libraries i want to use are about to stop ARM32 support. Therefore i wanted to enable 64 Bit compability to make my life easier. 79 | 80 | In addition the Garlic OS 2.0 Bootloader is somehow not working for me. I can imagine that this is true for many users, and for those who dont do unix every day: a drag-and-drop solution with an installation wizard is welcomed. The knowledge i got here, might inspire me to create a drop in UI replacement for the stock OS of anbernics RG35XX+ later. --------------------------------------------------------------------------------