Advertisement
Guest User

Untitled

a guest
Aug 14th, 2013
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Change this paths to you own
  4. nvflash=/usr/bin/nvflash
  5. fastboot=/usr/lib/nvflash/fastboot.bin
  6.  
  7.  
  8. mkdir work
  9. cd work
  10. $nvflash --bl $fastboot --sync || exit 1
  11. echo -n "Making a backup .."
  12. for i in $(seq 2 6)
  13. do
  14. $nvflash -r -q --read $i part$i.img || exit 1
  15. done
  16. echo " Done"
  17.  
  18. read -p "Press [Enter] key when device rebooted to new recovery mode ..."
  19. echo -n "Creating new layout .."
  20. dd if=part2.img bs=1 count=4080 of=original.bct
  21. ln -s $fastboot bootloader.bin
  22. $nvflash --bl bootloader.bin --bct original.bct --setbct --configfile ../linux.cfg --create --verifypart -1 --go|| exit 1
  23. echo " Done"
  24.  
  25. read -p "Press [Enter] key when device rebooted to new recovery mode ..."
  26. echo "Restoring backup .."
  27. $nvflash --bl $fastboot --sync || exit 1
  28. $nvflash -r -q --rawdevicewrite 0 1536 part2.img
  29. $nvflash -r -q --rawdevicewrite 1792 1024 part4.img
  30. $nvflash -r -q --download 5 part5.img
  31. $nvflash -r -q --download 6 part6.img
  32. echo " Done"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement