Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/system/bin/sh
- clear
- selection=
- until [ "$selection" = "0" ]; do
- echo ""
- echo "SGH-T759 NAND BACKUP & TOOLS v2.5 "
- echo ""
- echo "Scripted By: Geofferey Eakins"
- echo ""
- echo "Main Menu"
- echo "1 - Make me GOD (or SU)"
- echo "2 - Create Backup Directory"
- echo "3 - Create ODIN Package Directory"
- echo "4 - Backup /system"
- echo "5 - Backup /data"
- echo "6 - Backup /efs"
- echo "7 - Backup /cache"
- echo "8 - AIO (backs up EVERYTHING)"
- echo "9 - Create ODIN package"
- echo "10 - AIO + ODIN"
- echo ""
- echo "Other Options"
- echo "clean - (Deletes Backup Directory!!!)"
- echo "wipe - Factory Reset (will reboot)"
- echo "mount - Mounts /system in RW mode"
- echo "unlock - Displays carrier unlock code (EXPERIMENTAL)"
- echo ""
- echo "Q - Quit Backup Program"
- echo ""
- echo -n "Make your choice: "
- read selection
- echo ""
- case $selection in
- 1 ) echo "This option will force the script to terminate" ; echo "Just re-run script and you will have required privledges" ; echo "" ; echo "Press ENTER key to continue..." ; read enterkey ; clear ; su ;;
- 2 ) mkdir /sdcard/NAND ; echo "/sdcard/NAND directory created..." ; echo "" ; echo "Press ENTER key to continue..." ; read enterkey ; clear ;;
- 3 ) mkdir /sdcard/ODIN ; echo "/sdcard/ODIN directory created..." ; echo "Press ENTER key to continue..." ; read enterkey ; clear ;;
- 4 ) echo "Backing up SYSTEM..." ; dd if=/dev/block/stl9 of=/sdcard/NAND/factoryfs.rfs bs=4096 ; echo "done" ; echo "" ; echo "Press ENTER key to continue..." ; read enterkey ; clear ;;
- 5 ) echo "Backing up DATA..." ; dd if=/dev/block/stl10 of=/sdcard/NAND/dbdata.rfs bs=4096 ; echo "done" ; echo "" ; echo "Press ENTER key to continue..." ; read enterkey ; clear ;;
- 6 ) echo "Backing up EFS..." ; dd if=/dev/block/stl3 of=/sdcard/NAND/efs.rfs bs=4096 ; echo "done" ; echo "" ; echo "Press ENTER key to continue..." ; read enterkey clear ;;
- 7 ) echo "Backing up CACHE..." ; dd if=/dev/block/stl11 of=/sdcard/NAND/cache.rfs bs=4096 ; echo "done" ; echo "" ; echo "Press ENTER key to continue..." ; read enterkey ; clear ;;
- 8 ) echo "Backing up SYSTEM..." ; sleep 1 ; dd if=/dev/block/stl9 of=/sdcard/NAND/factoryfs.rfs bs=4096 ; sleep 1 ; echo "done" ; sleep 1 ; echo "Backing up DATA..." ; sleep 1 ; dd if=/dev/block/stl10 of=/sdcard/NAND/dbdata.rfs bs=4096 ; echo "done" ; sleep 1 ; echo "Backing up EFS..." ; dd if=/dev/block/stl3 of=/sdcard/NAND/efs.rfs bs=4096 ; sleep 1 ; echo "done" ; sleep 1 ; echo "Backing up CACHE..." ; sleep 1 ; dd if=/dev/block/stl11 of=/sdcard/NAND/cache.rfs bs=4096 ; sleep 1 ; echo "done" ; echo "" ; echo "Press ENTER key to continue..." ; read enterkey ; clear ;;
- 9 ) echo "Creating ODIN package. This may take a while..." ; sleep 1 ; cd /sdcard/NAND ; tar -cvf SGH-T759-ODIN.tar factoryfs.rfs dbdata.rfs efs.rfs cache.rfs ; mv /sdcard/NAND/SGH-T759-ODIN.tar /sdcard/ODIN/SGH-T759-$(date +'%m%d%Y%H%M').tar ; echo "" ; echo "Press ENTER key to continue..." ; read enterkey clear ;;
- 10 ) echo "Backing up SYSTEM..." ; sleep 1 ; dd if=/dev/block/stl9 of=/sdcard/NAND/factoryfs.rfs bs=4096 ; sleep 1 ; echo "done" ; sleep 1 ; echo "Backing up DATA..." ; sleep 1 ; dd if=/dev/block/stl10 of=/sdcard/NAND/dbdata.rfs bs=4096 ; echo "done" ; sleep 1 ; echo "Backing up EFS..." ; dd if=/dev/block/stl3 of=/sdcard/NAND/efs.rfs bs=4096 ; sleep 1 ; echo "done" ; sleep 1 ; echo "Backing up CACHE..." ; sleep 1 ; dd if=/dev/block/stl11 of=/sdcard/NAND/cache.rfs bs=4096 ; sleep 1 ; echo "done" ; sleep 1 ; echo "Creating ODIN package. This may take a while..." ; sleep 1 ; cd /sdcard/NAND ; tar -cvf SGH-T759-ODIN.tar factoryfs.rfs dbdata.rfs efs.rfs cache.rfs ; mv /sdcard/NAND/SGH-T759-ODIN.tar /sdcard/ODIN/SGH-T759-$(date +'%m%d%Y%H%M').tar ; echo "all done" ; echo"" ; echo "Press ENTER key to continue..." ; read enterkey ; clear ;;
- clean ) echo "/sdcard/NAND directory deleted..." ; cd /sdcard ; rm -r NAND ; echo "" ; echo "Press ENTER key to continue..." ; read enterkey ; clear ;;
- mount ) echo "Mounting /system in RW mode..." ; sleep 1 ; mount -o remount,rw -t rfs /dev/block/stl9 /system ; echo "" ;echo "Press ENTER key to continue..." ; read enterkey ; clear ;;
- wipe ) wipe data ; sleep 1 ; echo "Factory reset complete... Will reboot NOW!" ; echo "" ; echo "Press ENTER key to continue..." ; read enterkey ; clear ; reboot ;;
- unlock ) echo "Unlock code is 8 digits & should display on line 2." ; echo "Write it down, insert a foreign SIM & phone will" ; echo "request unlock code." ; sleep 1 ; echo"" ; echo "Code on line 2:" ; strings -n 8 /efs/root/afs/settings/nv_data.bin ; echo"" ; echo "Press ENTER key to continue...." ; read enterkey ; clear ;;
- Q ) echo "Goodbye! Hope I helped. :-)" ; sleep 5 ; clear ; exit ;;
- q ) echo "Goodbye! Hope I helped. :-)" ; sleep 5 ; clear ; exit ;;
- * ) echo "INVALID Selection! Please enter 1-10, clean or 0" ; echo "" ; echo "Press ENTER key to continue..." ; read enterkey ; clear ;;
- esac
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement