[AT&T Samsung Galaxy Note I717] darkspr1te:
Actual scripts

This is the brixfix.sh script

# This is to dump shv-e160l firmware to the phone using only system files and backups of params imei etc
# Written By darkspr1te with the help of dev's from xda forums, Scotty, Adam ,E:V:A and more
# This is a early stage version, watch for bugs
# please change the of=/dev/sdb to match you device, check in dmesg and double check
# use fdisk -l /dev/sd? to check for partitons

echo "read this file first before using brixfix"
cat brixfix.sh
exit

#First Public Beta V0.1
#25/10/2012
#Many Thanks
#darkspr1te
# This is the current partition table as viewed from ubuntu
#
#
#
#Disk /dev/sdb: 15.8 GB, 15758000128 bytes
#1 heads, 32 sectors/track, 961792 cylinders, total 30777344 sectors
#Units = sectors of 1 * 512 = 512 bytes
#Sector size (logical/physical): 512 bytes / 512 bytes
#I/O size (minimum/optimal): 512 bytes / 512 bytes
#Disk identifier: 0x00000000

# Device Boot Start End Blocks Id System
#/dev/sdb1 1 204800 102400 92 Unknown
#/dev/sdb2 * 204801 205800 500 4d QNX4.x
#/dev/sdb3 205801 208800 1500 51 OnTrack DM6 Aux1
#/dev/sdb4 208801 30777343 15284271+ 5 Extended
#/dev/sdb5 212992 213991 500 47 Unknown
#/dev/sdb6 221184 225279 2048 45 Unknown
#/dev/sdb7 229376 234375 2500 4c Unknown
#/dev/sdb8 237568 258047 10240 48 Unknown
#/dev/sdb9 262144 263143 500 46 Unknown
#/dev/sdb10 270336 271335 500 5d Unknown
#/dev/sdb11 278528 279527 500 91 Unknown
#/dev/sdb12 286720 307199 10240 93 Amoeba
#/dev/sdb13 311296 511999 100352 c W95 FAT32 (LBA)
#/dev/sdb14 516096 522239 3072 4a Unknown
#/dev/sdb15 524288 530431 3072 4b Unknown
#/dev/sdb16 532480 538623 3072 58 Unknown
#/dev/sdb17 540672 741375 100352 8f Unknown
#/dev/sdb18 745472 751615 3072 59 Unknown
#/dev/sdb19 753664 759807 3072 5a Unknown
#/dev/sdb20 761856 767999 3072 5b Unknown
#/dev/sdb21 770048 790527 10240 ab Darwin boot
#/dev/sdb22 794624 815103 10240 60 Unknown
#/dev/sdb23 819200 839679 10240 94 Amoeba BBT
#/dev/sdb24 843776 3911679 1533952 a5 FreeBSD
#/dev/sdb25 3915776 8114175 2099200 a6 OpenBSD
#/dev/sdb26 8118272 8736767 309248 a8 Darwin UFS
#/dev/sdb27 8740864 9005055 132096 a9 NetBSD
#/dev/sdb28 9011200 10035199 512000 95 Unknown
#/dev/sdb29 10035200 30777343 10371072 90 Unknown

set -x

#The following Two lines write back the MBR to sector 0 and EBF to sector 208801
# This is required to restore your partiton table so the the iROM code can find the loaders
dd if=partition0.bin of=/dev/sdb seek=0 count=1 bs=512
dd if=partition0.bin of=/dev/sdb skip=1 seek=208801 count=22 bs=512

#SMD_HDR partition is unknown to me at this time , leave commented out with the #
# dd if=smd_hdr.mbn of=/dev/sdb of=/dev/sdb seek=1 count=102400 bs=512

#This next few lines are bootloader repair, all files reuired to get basic ODIN mode only
#If you know what is currupt then only flash that file
#otherwise remove the hash # in front off dd up until end of bootloader section
##

dd if=SHV-E160L/sbl1.mbn of=/dev/sdb seek=204801 count=500 bs=512
dd if=SHV-E160L/sbl2.mbn of=/dev/sdb seek=205801 count=1500 bs=512
dd if=SHV-E160L/rpm.mbn of=/dev/sdb seek=212992 count=500 bs=512
dd if=SHV-E160L/sbl3.mbn of=/dev/sdb seek=221184 count=2048 bs=512
dd if=SHV-E160L/aboot.mbn of=/dev/sdb seek=229376 count=2500 bs=512
# boot.img only needed if it's damaged on the device, for base ODIN/LOKE interaction you only need sbl1,2,3,rpm,tz files.
# dd if=SHV-E160L/boot.img of=/dev/sdb seek=237568 count=10240 bs=512
dd if=SHV-E160L/tz.mbn of=/dev/sdb seek=262144 count=500 bs=512

### End of bootloaders

#do not use the options past here- development only --YOU HAVE BEEN WARNED --
exit
# dd if=SSD of=/dev/sdb seek=270336 count=500 bs=512
# dd if=shv-e160l.pit of=/dev/sdb seek=278528 count=500 bs=512
# dd if=param.lfs of=/dev/sdb seek=286720 count=10240 bs=512
# dd if=patch/amss.bin of=/dev/sdb seek=311296 count=100352 bs=512
# dd if=efs.img of=/dev/sdb seek=516096 count=3072 bs=512
# dd if=MSM_STG2 of=/dev/sdb seek=524288 count=3072 bs=512
# dd if=MSM_FSG of=/dev/sdb seek=532480 count=3072 bs=512
# dd if=patch/mdm.bin of=/dev/sdb seek=540672 count=100352 bs=512
# dd if=efsclear1.bin of=/dev/sdb seek=745472 count=3072 bs=512
# dd if=efsclear2.bin of=/dev/sdb seek=753664 count=3072 bs=512
# dd if=M9K_FSG of=/dev/sdb seek=761856 count=3072 bs=512
# dd if=enc.img.ext4 of=/dev/sdb seek=770048 count=10240 bs=512
# dd if=patch/recovery.img of=/dev/sdb seek=794624 count=10240 bs=512
# dd if=patch/system.img.ext4 of=/dev/sdb seek=843776 count=1533952 bs=512
# dd if=patch/cache.img.ext4 of=/dev/sdb seek=8118272 count=309248 bs=512
set +x

And this is the baseband fix script

# SHV-E160L 'baseband unknown' repair file
# Only possible with the help of XDA forum members, Mostly E:V:A for the Baseband fix, he reminded me that I have two
# chains of trust in this SoC based device, one for the AP (application Processor) and one for the CP (Communication Processor)
# Tested Only ON SHV-E160L device but may work for other Qualcomm devices, replace the loaders with the correct ones for you device
# Samsung partition only, HTC has differing partition information
# see brixfix.sh for more info
# there are many reasons why you may have the baseband unknown failure, this fix is for a particular error on my SHV-E160L
# that i have tried to document on
# http://xdaforums.com/showthread.php?t=1914359
# please be aware of the dangers beefore using this file
# if you have your own recovery option installed and it supports ADB the you dont need to install the included recovery option
# *#06# does not seem to work in this device
# see shv-e160l-dial-codes.txt for alternatives
# included are ODIN recovery flash, Recovery mode flash update, dialer code, boot chain, adb for linux & windows
# please make sure you have all the other required files.

# WARNINGS
# This script can brick a device beyond software access repair, JTAG would be required or you need to find the EMMCBOOT resistor and short the low
# side to ground

mkdir backup

# for windows use md backup
# md backup

#back-up script
echo "Backing up Bootloaders"
echo
echo " if any of the following fail with errors do no reboot your device, correct the error and re-execute"
echo
adb shell dd if=/dev/block/mmcblk0p2 of=/sdcard/sbl1.mbn bs=512
adb pull /sdcard/sbl1.mbn backup/sbl1.mbn
adb shell dd if=/dev/block/mmcblk0p3 of=/sdcard/sbl2.mbn bs=512
adb pull /sdcard/sbl2.mbn backup/sbl2.mbn
adb shell dd if=/dev/block/mmcblk0p5 of=/sdcard/rpm.mbn bs=512
adb pull /sdcard/rpm.mbn backup/rpm.mbn
adb shell dd if=/dev/block/mmcblk0p6 of=/sdcard/sbl3.mbn bs=512
adb pull /sdcard/sbl3.mbn backup/sbl3.mbn
adb shell dd if=/dev/block/mmcblk0p7 of=/sdcard/aboot.mbn bs=512
adb pull /sdcard/aboot.mbn backup/aboot.mbn
adb shell dd if=/dev/block/mmcblk0p9 of=/sdcard/tz.mbn bs=512
adb pull /sdcard/sbl1.mbn backup/tz.mbn

#push bootloaders to device
echo "Copying bootloaders to device - /sdcard/"
echo
echo
adb push SHV-E160L/sbl1.mbn /sdcard/sbl1.mbn
adb push SHV-E160L/sbl2.mbn /sdcard/sbl2.mbn
adb push SHV-E160L/rpm.mbn /sdcard/rpm.mbn
adb push SHV-E160L/sbl3.mbn /sdcard/sbl3.mbn
# dont restore aboot.mbn but it's listed here for completeness
# adb push SHV-E160L/aboot.mbn /sdcard/aboot.mbn
adb push SHV-E160L/tz.mbn /sdcard/tz.mbn

# exit here if user not removed the exit code, user must read and understand documentation
# remove the following exit line after you confirmed the above has work without error

#exit

#restore
echo
echo "Copying Bootloaders to MMC"
echo " Restoring Chain of trust"
adb shell dd if=/sdcard/sbl1.mbn of=/dev/block/mmcblk0p2 bs=512
adb shell dd if=/sdcard/sbl2.mbn of=/dev/block/mmcblk0p3 bs=512
adb shell dd if=/sdcard/rpm.mbn of=/dev/block/mmcblk0p5 bs=512
adb shell dd if=/sdcard/sbl3.mbn of=/dev/block/mmcblk0p6 bs=512
# dont restore aboot.mbn but it's listed here for completeness
# adb shell dd if=/sdcard/aboot.mbn of=/dev/block/mmcblk0p7 bs=512
adb shell dd if=/sdcard/tz.mbn of=/dev/block/mmcblk0p9 bs=512

echo
echo "Restore complete, "
echo "if any error occurs please resolve the error and re-execute this script, dont reboot the phone or you could "
echo "end with a bootloop or worse a hang before aboot.mbn (little kernel/download mode loader) is executed and odin mode is activated"
echo "the hang will require JTAG or a hardware mod to reactivate QDload mode, you will then need to run brixfix.sh "