[HTC Desire 526] BigCountry907:
Were Almost There

We still need to patch the image.

Or update our rawprogram0.xml to patch the zeros.

Don't worry.....this is easy.

All the work is getting the partition.xml

Now we will use msp.py

bigcountry907@bigcountry907-G551JW:~/Desktop/526-Completed/Build-Target$ python msp.py

CREATED log_msp.txt

msp.py is running from CWD: /home/bigcountry907/Desktop/526-Completed/Build-Target

Usage: Mass Storage Programmer - destructively writes data to disks!!

Display this info	python msp.py
Wipe partition info (-w)	sudo python msp.py -r wipe_rawprogram_PHY0.xml -d /dev/sdb

Write a device (-r)	sudo python msp.py -r rawprogram0.xml -d /dev/sdb
Create a singleimage.bin (-r)	sudo python msp.py -r rawprogram0.xml -d 0
singleimage.bin stored to c:\temp (-r)	sudo python msp.py -r rawprogram0.xml -d 0 -t c:\temp
Create an 8GB singleimage.bin (-r)	sudo python msp.py -r rawprogram0.xml -d 16777216

no prompts (-n) i.e. automation	sudo python msp.py -n -r rawprogram.xml -d /dev/sdb
Interactively choose files (-i)	sudo python msp.py -i -r rawprogram.xml -d /dev/sdb
Specify files from rawprogram.xml (-f)	sudo python msp.py -f sbl1.mbn,sbl2.mbn -r rawprogram.xml -d /dev/sdb
Search this path for files (-s)	sudo python msp.py -s c:\windows,d:\ -r rawprogram.xml -d /dev/sdb

Patch a device (-p)	sudo python msp.py -p patch0.xml -d /dev/sdb
Patch files to singleimage (-p)	sudo python msp.py -p patch0.xml -d singleimage.bin
PRE-PATCH images for an 8GB disk (-p)	sudo python msp.py -p patch0.xml -d 16777216

ALL IN ONE STEP	sudo python msp.py -r rawprogram0.xml -p patch0.xml -d /dev/sdb

******************************************************************************
Usage: Mass Storage Programmer - destructively writes data to disks!!
******************************************************************************

------------------------------------------------------------------------------
Remember - DON'T FORGET SUDO
Remember - DON'T FORGET SUDO
Remember - DON'T FORGET SUDO
------------------------------------------------------------------------------

--------------------------------Partitions Detected--------------------------------------
/dev/sda 931.51 GB	sectors:1953525168 <--- Not likely an SD card, careful!
/dev/sdb 447.13 GB	sectors:937703088 <--- Not likely an SD card, careful!
------------------------------------------------------------------------------

msp.py exiting - Only showed options and drives detected - Log is log_msp.txt

bigcountry907@bigcountry907-G551JW:~/Desktop/526-Completed/Build-Target$

We are going to run this command.

PRE-PATCH images for an 8GB disk (-p)	sudo python msp.py -p patch0.xml -d 15269888

Our Command will be.

sudo python msp.py -p patch0.xml -d 15269888

Plug in a usb adapter with a sd card or your sd card.

8gb card obviously.

Now you can see the sd card.

--------------------------------Partitions Detected--------------------------------------
/dev/sda 931.51 GB	sectors:1953525168 <--- Not likely an SD card, careful!
/dev/sdb 447.13 GB	sectors:937703088 <--- Not likely an SD card, careful!
/dev/sdc 7.42 GB	sectors:15564800
------------------------------------------------------------------------------

msp.py exiting - Only showed options and drives detected - Log is log_msp.txt

Lets patch then flash the image.

Run

sudo python msp.py -p patch0.xml -d 15269888

Now you can see it give us this output.

It has patched the image.

Looking for 'patch0.xml'
----------------------------------------
Searching '/home/bigcountry907/Desktop/526-Completed/Build-Target'

**Found patch0.xml (6251 bytes)
----------------------
MinDiskSizeInSectors= 0
DiskSizeInSectors = 15269888
_ _ _
| | | | (_)
_ __ __ _| |_ ___| |__ _ _ __ __ _
| '_ \ / _` | __|/ __| '_ \| | '_ \ / _` |
| |_) | (_| | |_| (__| | | | | | | | (_| |
| .__/ \__,_|\__|\___|_| |_|_|_| |_|\__, |
| | __/ |
|_| |___/

------------------------------------------------------------------------------
PATCH: (gpt_main0.bin) Update last partition 65 'userdata' with actual size in Primary Header.

Looking for 'gpt_main0.bin'
----------------------------------------
Searching '/home/bigcountry907/Desktop/526-Completed/Build-Target'

**Found gpt_main0.bin (17408 bytes)
Opened gpt_main0.bin, cwd=/home/bigcountry907/Desktop/526-Completed/Build-Target
moving to sector 18 (byte location 9216)
success was able to read len(bytes_read)=512
At sector 18 (0x2400) file_sector_offset 40 (0x28) in gpt_main0.bin with 15269854 (0xE8FFDE)
Patch value:15269854
DE FF E8 00 00 00 00 00 (little endian)
committing patch of length 512 bytes
CLOSED 'gpt_main0.bin'
You're on LINUX! I'm performing a SYNC for you
DONE

------------------------------------------------------------------------------
PATCH: (gpt_backup0.bin) Update last partition 65 'userdata' with actual size in Backup Header.

Looking for 'gpt_backup0.bin'
----------------------------------------
Searching '/home/bigcountry907/Desktop/526-Completed/Build-Target'

**Found gpt_backup0.bin (16896 bytes)
Opened gpt_backup0.bin, cwd=/home/bigcountry907/Desktop/526-Completed/Build-Target
moving to sector 16 (byte location 8192)
success was able to read len(bytes_read)=512
At sector 16 (0x2000) file_sector_offset 40 (0x28) in gpt_backup0.bin with 15269854 (0xE8FFDE)
Patch value:15269854
DE FF E8 00 00 00 00 00 (little endian)
committing patch of length 512 bytes
CLOSED 'gpt_backup0.bin'
You're on LINUX! I'm performing a SYNC for you
DONE

------------------------------------------------------------------------------
PATCH: (gpt_main0.bin) Update Primary Header with LastUseableLBA.

Looking for 'gpt_main0.bin'
----------------------------------------
Searching '/home/bigcountry907/Desktop/526-Completed/Build-Target'

**Found gpt_main0.bin (17408 bytes)
Opened gpt_main0.bin, cwd=/home/bigcountry907/Desktop/526-Completed/Build-Target
moving to sector 1 (byte location 512)
success was able to read len(bytes_read)=512
At sector 1 (0x200) file_sector_offset 48 (0x30) in gpt_main0.bin with 15269854 (0xE8FFDE)
Patch value:15269854
DE FF E8 00 00 00 00 00 (little endian)
committing patch of length 512 bytes
CLOSED 'gpt_main0.bin'
You're on LINUX! I'm performing a SYNC for you
DONE

------------------------------------------------------------------------------
PATCH: (gpt_backup0.bin) Update Backup Header with LastUseableLBA.

Looking for 'gpt_backup0.bin'
----------------------------------------
Searching '/home/bigcountry907/Desktop/526-Completed/Build-Target'

**Found gpt_backup0.bin (16896 bytes)
Opened gpt_backup0.bin, cwd=/home/bigcountry907/Desktop/526-Completed/Build-Target
moving to sector 32 (byte location 16384)
success was able to read len(bytes_read)=512
At sector 32 (0x4000) file_sector_offset 48 (0x30) in gpt_backup0.bin with 15269854 (0xE8FFDE)
Patch value:15269854
DE FF E8 00 00 00 00 00 (little endian)
committing patch of length 512 bytes
CLOSED 'gpt_backup0.bin'
You're on LINUX! I'm performing a SYNC for you
DONE

------------------------------------------------------------------------------
PATCH: (gpt_main0.bin) Update Primary Header with BackupGPT Header Location.

Looking for 'gpt_main0.bin'
----------------------------------------
Searching '/home/bigcountry907/Desktop/526-Completed/Build-Target'

**Found gpt_main0.bin (17408 bytes)
Opened gpt_main0.bin, cwd=/home/bigcountry907/Desktop/526-Completed/Build-Target
moving to sector 1 (byte location 512)
success was able to read len(bytes_read)=512
At sector 1 (0x200) file_sector_offset 32 (0x20) in gpt_main0.bin with 15269887 (0xE8FFFF)
Patch value:15269887
FF FF E8 00 00 00 00 00 (little endian)
committing patch of length 512 bytes
CLOSED 'gpt_main0.bin'
You're on LINUX! I'm performing a SYNC for you
DONE

------------------------------------------------------------------------------
PATCH: (gpt_backup0.bin) Update Backup Header with CurrentLBA.

Looking for 'gpt_backup0.bin'
----------------------------------------
Searching '/home/bigcountry907/Desktop/526-Completed/Build-Target'

**Found gpt_backup0.bin (16896 bytes)
Opened gpt_backup0.bin, cwd=/home/bigcountry907/Desktop/526-Completed/Build-Target
moving to sector 32 (byte location 16384)
success was able to read len(bytes_read)=512
At sector 32 (0x4000) file_sector_offset 24 (0x18) in gpt_backup0.bin with 15269887 (0xE8FFFF)
Patch value:15269887
FF FF E8 00 00 00 00 00 (little endian)
committing patch of length 512 bytes
CLOSED 'gpt_backup0.bin'
You're on LINUX! I'm performing a SYNC for you
DONE

------------------------------------------------------------------------------
PATCH: (gpt_backup0.bin) Update Backup Header with Partition Array Location.

Looking for 'gpt_backup0.bin'
----------------------------------------
Searching '/home/bigcountry907/Desktop/526-Completed/Build-Target'

**Found gpt_backup0.bin (16896 bytes)
Opened gpt_backup0.bin, cwd=/home/bigcountry907/Desktop/526-Completed/Build-Target
moving to sector 32 (byte location 16384)
success was able to read len(bytes_read)=512
At sector 32 (0x4000) file_sector_offset 72 (0x48) in gpt_backup0.bin with 15269855 (0xE8FFDF)
Patch value:15269855
DF FF E8 00 00 00 00 00 (little endian)
committing patch of length 512 bytes
CLOSED 'gpt_backup0.bin'
You're on LINUX! I'm performing a SYNC for you
DONE

------------------------------------------------------------------------------
PATCH: (gpt_main0.bin) Update Primary Header with CRC of Partition Array.

Looking for 'gpt_main0.bin'
----------------------------------------
Searching '/home/bigcountry907/Desktop/526-Completed/Build-Target'

**Found gpt_main0.bin (17408 bytes)
Opened gpt_main0.bin, cwd=/home/bigcountry907/Desktop/526-Completed/Build-Target
CRC32(2,8704) requested
moving to sector 2 (byte location 1024)
Move Successful
Trying to read 8704 bytes in gpt_main0.bin
CRC32=0x287DF49F
moving to sector 1 (byte location 512)
success was able to read len(bytes_read)=512
At sector 1 (0x200) file_sector_offset 88 (0x58) in gpt_main0.bin with 679343263 (0x287DF49F)
Patch value:679343263
9F F4 7D 28 (little endian)
committing patch of length 512 bytes
CLOSED 'gpt_main0.bin'
You're on LINUX! I'm performing a SYNC for you
DONE

------------------------------------------------------------------------------
PATCH: (gpt_backup0.bin) Update Backup Header with CRC of Partition Array.

Looking for 'gpt_backup0.bin'
----------------------------------------
Searching '/home/bigcountry907/Desktop/526-Completed/Build-Target'

**Found gpt_backup0.bin (16896 bytes)
Opened gpt_backup0.bin, cwd=/home/bigcountry907/Desktop/526-Completed/Build-Target
CRC32(0,8704) requested
moving to sector 0 (byte location 0)
Move Successful
Trying to read 8704 bytes in gpt_backup0.bin
CRC32=0x287DF49F
moving to sector 32 (byte location 16384)
success was able to read len(bytes_read)=512
At sector 32 (0x4000) file_sector_offset 88 (0x58) in gpt_backup0.bin with 679343263 (0x287DF49F)
Patch value:679343263
9F F4 7D 28 (little endian)
committing patch of length 512 bytes
CLOSED 'gpt_backup0.bin'
You're on LINUX! I'm performing a SYNC for you
DONE

------------------------------------------------------------------------------
PATCH: (gpt_main0.bin) Zero Out Header CRC in Primary Header.

Looking for 'gpt_main0.bin'
----------------------------------------
Searching '/home/bigcountry907/Desktop/526-Completed/Build-Target'

**Found gpt_main0.bin (17408 bytes)
Opened gpt_main0.bin, cwd=/home/bigcountry907/Desktop/526-Completed/Build-Target
moving to sector 1 (byte location 512)
success was able to read len(bytes_read)=512
At sector 1 (0x200) file_sector_offset 16 (0x10) in gpt_main0.bin with 0 (0x0)
Patch value:0
00 00 00 00 (little endian)
committing patch of length 512 bytes
CLOSED 'gpt_main0.bin'
You're on LINUX! I'm performing a SYNC for you
DONE

------------------------------------------------------------------------------
PATCH: (gpt_main0.bin) Update Primary Header with CRC of Primary Header.

Looking for 'gpt_main0.bin'
----------------------------------------
Searching '/home/bigcountry907/Desktop/526-Completed/Build-Target'

**Found gpt_main0.bin (17408 bytes)
Opened gpt_main0.bin, cwd=/home/bigcountry907/Desktop/526-Completed/Build-Target
CRC32(1,92) requested
moving to sector 1 (byte location 512)
Move Successful
Trying to read 92 bytes in gpt_main0.bin
CRC32=0x8BF010FF
moving to sector 1 (byte location 512)
success was able to read len(bytes_read)=512
At sector 1 (0x200) file_sector_offset 16 (0x10) in gpt_main0.bin with 2347766015 (0x8BF010FF)
Patch value:2347766015
FF 10 F0 8B (little endian)
committing patch of length 512 bytes
CLOSED 'gpt_main0.bin'
You're on LINUX! I'm performing a SYNC for you
DONE

------------------------------------------------------------------------------
PATCH: (gpt_backup0.bin) Zero Out Header CRC in Backup Header.

Looking for 'gpt_backup0.bin'
----------------------------------------
Searching '/home/bigcountry907/Desktop/526-Completed/Build-Target'

**Found gpt_backup0.bin (16896 bytes)
Opened gpt_backup0.bin, cwd=/home/bigcountry907/Desktop/526-Completed/Build-Target
moving to sector 32 (byte location 16384)
success was able to read len(bytes_read)=512
At sector 32 (0x4000) file_sector_offset 16 (0x10) in gpt_backup0.bin with 0 (0x0)
Patch value:0
00 00 00 00 (little endian)
committing patch of length 512 bytes
CLOSED 'gpt_backup0.bin'
You're on LINUX! I'm performing a SYNC for you
DONE

------------------------------------------------------------------------------
PATCH: (gpt_backup0.bin) Update Backup Header with CRC of Backup Header.

Looking for 'gpt_backup0.bin'
----------------------------------------
Searching '/home/bigcountry907/Desktop/526-Completed/Build-Target'

**Found gpt_backup0.bin (16896 bytes)
Opened gpt_backup0.bin, cwd=/home/bigcountry907/Desktop/526-Completed/Build-Target
CRC32(32,92) requested
moving to sector 32 (byte location 16384)
Move Successful
Trying to read 92 bytes in gpt_backup0.bin
CRC32=0x4C58EE2B
moving to sector 32 (byte location 16384)
success was able to read len(bytes_read)=512
At sector 32 (0x4000) file_sector_offset 16 (0x10) in gpt_backup0.bin with 1280896555 (0x4C58EE2B)
Patch value:1280896555
2B EE 58 4C (little endian)
committing patch of length 512 bytes
CLOSED 'gpt_backup0.bin'
You're on LINUX! I'm performing a SYNC for you
DONE

Done patching

msp.py exiting SUCCESSFULLY- Log is log_msp.txt

WERE READY TO FLASH.

FIRST WE WILL FLASH A SD CARD.