A collection of tools used to revive and experiment with Samsung GT-I9300 eMMC chips (VTU00M).
This project is experimental in its nature and I take absolutely no responsiblity for anything that might happen to your device.
Caution: You will lose your EFS partition, but there's not much to do about it.
Prerequesities (for Debian stretch, should work on other apt-based distributions as well):
$ sudo apt install python3 python3-libusb1 libusb-1.0-0 gcc-arm-none-eabi binutils-arm-none-eabi
$ make -C shellcode
exploit/sboot_exploit.py --shellcode shellcode/write_fw.bin -e FWDUMP
,
where FWDUMP is the firmware dump obtained in step #1.lsusb
).exploit/sboot_exploit.py --shellcode shellcode/change_boot_partition_size.bin
This is the preferred method, as your device will no longer suffer from the eMMC bug.
dd if=mmcram.bin of=0xf7.bin bs=4K skip=64 count=32
.exploit/sboot_exploit.py --shellcode shellcode/dump_fw.bin -o 0xf7.bin
.This will unbrick your device, but your device will still suffer from the eMMC bug; the brick might happen again in the future. It's much better to obtain firmware 0xF7.
Boot into download mode, and run exploit/sboot_exploit.py --shellcode shellcode/dump_fw_bootrom.bin -o 0xf1.bin
.
If your device can boot into download mode normally, you have some version of sboot installed on your device. The shellcode should theoretically work on any sboot version, but it is only guaranteed to work on sboot XXELLA. If it doesn't work, it might need some adaptations for your sboot version; be advised that some reverse engineering skill is required. If you don't know which sboot version you have, dump sboot from your eMMC.
If your device cannot boot into download mode (i.e. it's entirely dead - you see nothing), you first need a charged battery. Then, proceed to prepare a recovery SD card with sboot XXELLA. Once it's ready, just insert the SD card to your device, insert the battery, press power+volume down+home buttons for approx. 2-3 seconds, release all of them and press the volume up button once. Plug in the device over USB to your computer and it should be visible under lsusb
. You might see some funky stuff on the phone's screen -- just ignore it.
Prerequisites: obtain the firmware I9300XXELLA_I9300OXAELLA_BTU.zip. Extract the zip file, then extract the tar.md5 file inside (which is just a tar), and grab sboot.bin. This is the relevant sboot version. Copy it inside the sdcard folder.
Then run the following commands (replace DEV with the sdcard device on your computer, e.g. /dev/sdc. Be careful!):
$ cd sdcard
$ ./create_recovery_sdcard.py -o recovery_sdcard.bin -s sboot.bin
$ dd if=recovery_sdcard.bin of=DEV
$ sync
In case you ever need to obtain sboot from your device (in case eMMC's boot partition is still intact), you can use exploit/sboot_exploit.py --dump -o SBOOT
, and the exploit will dump sboot to a file named SBOOT
. It actually dumps a 1MB chunk starting at address 0x43e00000, so the binary's loading address is 0x43e00000.
The exploit/
folder contains the sboot exploit in order to run code in the sboot environment.
The shellcode/
folder contains a collection of sboot shellcodes for interaction with the eMMC.