Created
December 6, 2018 06:15
-
-
Save yifanlu/3e815170efd78ab6e75ef2da8ba8c792 to your computer and use it in GitHub Desktop.
PlayStation Classic root shell through UART serial
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# THIS IS NOT FOR REGULAR USERS!!! | |
# You need to solder to the UART port and short the two pads under the PCB near the charger. | |
# Baud rate: 921600 | |
red_led () { | |
SLEEP=1 | |
LOOP=1 | |
if [ x"$1" != x ]; then LOOP=$1; fi | |
if [ x"$2" != x ]; then SLEEP=$2; fi | |
for i in `seq 1 $LOOP`; do | |
echo 1 > /sys/class/leds/red/brightness | |
sleep $SLEEP | |
echo 0 > /sys/class/leds/red/brightness | |
sleep $SLEEP | |
done | |
} | |
if [ ! -f "/tmp/ran" ]; then | |
touch /tmp/ran | |
#mount -o remount,rw / | |
dmesg -n 1 | |
ps -aux > /dev/ttyS0 2>&1 | |
systemctl stop getty.target | |
systemctl stop console-getty.service | |
systemctl stop [email protected] | |
killall agetty | |
/sbin/agetty -a root -8 -L ttyS0 921600 xterm | |
red_led "6" "0.3" | |
fi | |
sleep 60 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment