Thursday, February 19, 2015

http://bbs.zoopda.com/forum.php?mod=viewthread&action=printable&tid=337089
http://forums.webosnation.com/archive/index.php?t-327706.html

How to program eMMC images into blank flash with USB only in MSM7630

Ready the files before start
1.Here is the list of files that need to be placed into a single directory before
 starting the programming process.
 amss.mbn          - Main AMSS binary
 dbl.mbn           - Device boot loader
 eNPRG7500.hex     - eMMCPRG HEX binary, rename from MPROG7x30.hex
 emmc_appsboot.mbn - Apps boot loader
 loadpt.cmm        - Used by MSP.exe
 msp.exe           - Mass Storage Porgrammer
 osbl.mbn          - OS boot loader
 partition.bin     - Partition table, used by msp.exe
 partition.mbn     - Dummy file to make QPST happy, copy of partition.bin file is fine
 system.img.ext3   - Linux system image file
 userdata.img.ext3 - Linux user partition
2. power on the Power on the phone with blank flash,The phone will go into emergency download mode, so connect the USB cable to the phone and QPST will detect it, there will have Q/QCP-XXX display in QPST configuration
3.  Enter software download menu
  3.1 Select "options", "settings"
  3.2 Use the dropdown menu to select "MSM7500 (NAND Flash)"
  3.3 Go into the "multi image" tab, select the image location using the "Browse" button.
  3.4 Make sure the emergency host download box the checked and the boot system is set  to "sec boot 2.0"
  3.5 Next, use the "Advanced" button to select the files(dbl.mbn, osbl.mbn) to download
   When all done, close the window and hit Start to start download and wait until the download
   process completes.The phone won't come back up in Diag mode, so you can either let QPST 
   Software Download time out, or you can hit the "Abort" button at this point to continue 
   the process. The phone should enumerate as a USB mass storage device, and you can verify
   this either in Windows Explorer or in Device Manager under "Disk Drives".
4. Program Raw Image files
   4.1 Open a CMD window and change to the image directory.
   4.2 Enter the following commands:
    msp -d
     This will list all of the block devices in the system. Look for the one that reflects, the size of the eMMC card being used (usually 4GB or 8GB) - this will indicate the device that is used for the phone. It should be /dev/sdc or something similar.
    msp -r /dev/sdc partition.bin 0 (use the appropriate device)
           msp -w /dev/sdc loadpt.cmm ./ (use the appropriate device)
      Wait for the programming process to complete. Unplug the USB cable and reconnect it so that Windows recognizes the new partition layout.
 
5. Copy FAT Files
   In Windows Explorer, locate the drive letter for the phone. It should show up as a "Removable Disk". Double-click on the drive letter and click "Yes"  to format the drive ("Quick format" is fine). Make a folder on that drive called "image" and copy amss.mbn, emmc_appsboot.mbn and boot.img into the directory.

6  Reboot the phone
   The phone should boot to the Android UI.
 
7.Mass Storage Download Example

Example flow for reference:

  C:\emmc\1100_finsmoke>msp -d
      '/dev/sdb' -- Not in use
      '/dev/sdc' -- device with size of 7840 MB
      '/dev/sdd' -- Not in use
      '/dev/sde' -- Not in use
      '/dev/sdf' -- Not in use
      '/dev/sdg' -- Not in use
      '/dev/sdh' -- Not in use
      '/dev/sdi' -- Not in use
      '/dev/sdj' -- Not in use
      '/dev/sdk' -- Not in use
    
  C:\emmc\1100_finsmoke>msp -r /dev/sdc partition.bin 0
      Total disk size 16056320 blocks
      Fill in the curr_sec: c9040
      Fill in the curr_sec: e8c80
      Fill in the curr_sec: f86c0
      Fill in the curr_sec: f9f00
      Fill in the curr_sec: fb740
      Fill in the curr_sec: fe680
      Fill in the curr_sec: ffec0
      Fill in the curr_sec: 101700
      lastlast_size: e4e900
      Before writing, stat:
      start_loc: 9, ext_first_sec: c9000
      Write 22be60 to 133700.
      Write 22bc60 to 1016c0.
      Write 22ba60 to ffe80.
      Write 22b860 to fe640.
      Write 22b660 to fb700.
      Write 22b460 to f9ec0.
      Write 22b260 to f8680.
      Write 22b060 to e8c40.
      Write 22ae60 to c9000.
      Reaching the last extended partition. Done.
  
  C:\emmc\1100_finsmoke>msp -w /dev/sdc loadpt.cmm ./
      Writing dbl.mbn, total size 159248
      Finished.
      Writing osbl.mbn, total size 710464
      Finished.
      Writing adsp.mbn, total size 5365072
      Finished.
      Writing system.img.ext3, total size 100999168
      Finished.
      Writing userdata.img.ext3, total size 81920000
      Finished.
"eMMC Partition tools usage for msm7x30/msm8x60"
(A repost from Anyclub...)

In the eMMC boot, there are some changes in eMMC partitioning.


Code:
partition.xml           - Everything begins with this file, which describes the number of 
                          partitions desired, and how many sectors each one should be.
PartitioningTool.py     - translates partition.xml into binary partitions
msp.exe                 - writes binary partitions to SD/eMMC cards using card reader
mjsdload.cmm            - writes binary partitions to SD/eMMC cards using Trace32
msp.py                  - writes binary partitions to a single image file
QPST                    - writes binary partitions to SD/eMMC cards on Target
Helper /Debug Tools:
Code:
parseBinaryPartitionFile.pl     - Decodes MBR partition tables. Run: 
                                  "Perl parseBinaryPartitionFile.pl partition.bin" 
                                  to generate the partition information
parseGPT.pl                     - Decodes GPT partition tables
partition.xml

These are the property entries that can be added in new partiton.xml to specify the configuration.
Code:
<parser_instructions>
  WRITE_PROTECT_BOUNDARY_IN_KB                = 0
  GROW_LAST_PARTITION_TO_FILL_DISK            = false
  ALIGN_ALL_LOGICAL_PARTITIONS_TO_WP_BOUNDARY = false
</parser_instructions>
WRITE_PROTECT_BOUNDARY_IN_KB: Typical boundaries are 64MB, i.e. 65536 KB. This
means that a 256MB eMMC card has 4 write protect boundaries. Any or all of
them can be marked as read-only. Different vendors allow for different sized
boundaries.

GROW_LAST_PARTITION_TO_FILL_DISK: In partition.xml the size of each partition
is specified. If this field is TRUE, then the last partition size is ignored
and set to 0. Then during patching this size is updated such that the last
partition extends to use all remaining space.

ALIGN_ALL_LOGICAL_PARTITIONS_TO_WP_BOUNDARY: To allow total flexibility, it
could be that a partition that is currently writeable might need to be marked
as read-only. This can only happen *if* that partition begins on a write
protect boundary (i.e. 64MB). Thus if this field is TRUE, then all logical
partitions are positioned such that they begin on a write protect boundary.


PartitioningTool.py

Is a new tool used to generate the the partition.xml
When run, it will output following 5 files:

1. emmc_lock_regions.xml

This hold the sector ranges that need to be marked as read-only by the
operating system (this is from readonly="true" in partition.xml) i.e. modem
code and boot images are typically on read-only partitions Typical
Write-Protect boundary is 64MB = 131072 sectors = 0x20000 sectors. The file
below is protecting the very first 64MB region of the card,

Boundary #0
Starting at sector 0
Ending at sector 131071 (for a total of 131072 sectors
)

code:
<?xml version="1.0" ?>
<protect>
  <!-- NOTE: This is an ** Autogenerated file ** -->
  <!-- NOTE: Sector size is 512bytes, WRITE_PROTECT_BOUNDARY_IN_KB=0,   WRITE_PROTECT_BOUNDARY_IN_SECTORS=0 -->
  <!-- NOTE: "num_sectors" in HEX "start_sector" in HEX, i.e. 10 really equals 16 !! -->
  <program boundary_num="0" num_boundaries_covered="1" 
       num_sectors="20000" num_sectors_dec="131072" physical_partition_number="0"  
       start_sector="0"    start_sector_dec="0"/>
  <information WRITE_PROTECT_BOUNDARY_IN_KB="0"/>
</protect>
 2. partition0.bin

This holds the partition tables, i.e. MBR followed by all EBRs. This is the
partition table in binary format. It is copied over to the storage device in a
1 to 1 manner. I.e. how it looks in partition0.bin is exactly how the
partition table will look on the storage device. partition0.bin is a "generic"
file meant to fit on *any* size SD/eMMC card, as a result, there are 0's that
need to be patched,such as EXT partition and last partition size.

3. patch0.xml

Contain the patching instructions to tailor each partition table
"partition0.bin" to a specific SD/eMMC card. I.e. the partition0.bin
partition tables can be applied to any size storage device As a result,
there are empty values (zeros) in the partition tables that must be filled
in with a specific cards sector size

There are two ways to apply this patch:
a) (patch before) When you patch the "zeros" in the partition tables held in the file partition0.bin, and then write it to the card
b) (patch after) When you write partition0.bin to the card (which still has "zeros" in it), and then patch the cards partition tables directly


4. rawprogram0.xml

precise sector details of all partitions and what files (if any) need to
be placed there. In addition to writing partition tables onto a device,
often times it is desired to write one or more files into the partition
area as well, The File has partition name (i.e. label), where it begins
(start_sector) and how big it is (num_partition_sectors). It also
describes what file(s) to write to this partition, as well as any
offsets.

Example:


Code:
<program file_sector_offset="0" filename="partition0.bin" label="MBR" 
       num_partition_sectors="1" physical_partition_number="0" 
       size_in_KB="0.5" start_sector="0"/>

<program file_sector_offset="1" filename="partition0.bin " label="EXT" 
       num_partition_sectors="2"  physical_partition_number="0" 
       size_in_KB="1.0" start_sector="779"/>
The 1st line describes taking the 1st sector from partition0.bin, and writing it to sector 0 of the card.
The 2nd line describes taking the 2nd and 3rd sector from partition0.bin and writing it to sector 779 of the card.
I.e. file_sector_offset = 2 and num_partition_sectors=2

5. loadpt.cmm

This is used by the mjsdload.cmm to flash the image.


msp.exe

This is used to apply the patches

This program will program a memory card (SD/eMMC) attached to the PC as USB mass storage device
Use -d to detect the path of the memory card if you are unsure what to do first

Commands list:

Code:
-h      (Print this help message)                                               Ex. msp -h
-d      (Detect which storage device ID is active)                              Ex. msp -d
-p      (Print partition information)                                           Ex. msp -p /dev/sdb
-pp     (Print partition information - DETAILED)                                Ex. msp -pp /dev/sdb
-x      (Write files as outlined in rawprogram.xml)                             Ex. msp -x rawprogram.xml /dev/sdb
-xx     (Write files as outlined in rawprogram.xml - DETAILED)                  Ex. msp -xx rawprogram.xml /dev/sdb
-s      (Write SINGLE IMAGE "singleimage.bin" as outlined in rawprogram.xml)    Ex. msp -s rawprogram.xml 8192
-v      (Verify file written correctly as outlined in rawprogram.xml)           Ex. msp -v rawprogram.xml boot.img /dev/sdb
-f      (Program single file as outlined in rawprogram.xml)                     Ex. msp -f rawprogram.xml boot.img /dev/sdb
To program the SD/eMMC with msp.exe in mass storage mode:

Code:
STEPS                           Complete example (patch after)
-------------------------------------------------------------
parse partition.xml             python PartitioningTool.py partition.xml 
Detect your device              msp -d
Program your device             msp -x rawprogram0.xml /dev/sdb
Patch your device               msp -xx patch0.xml /dev/sdb


STEPS                           Complete example (patch before)
-------------------------------------------------------------
parse partition.xml             python PartitioningTool.py partition.xml 
Detect your device              msp -d
Patch your files                msp xx  patch0.xml 15758336 (patch the 8GB card offline,this will change the partition0.bin)
Program your device             msp x   rawprogram0.xml /dev/sdb
The msp.py program can also used to patch the files.

For example:
python msp.py patch0.xml 15758336

This will patch the 8GB card offline, and change the partition0.bin.
 How to Install Microsoft .NET Framework 3.5 Offline in Windows 8 and Later without Internet Connection?
1.open Command Prompt as Administrator
Dism /online /enable-feature /featurename:NetFx3 /All /Source:F:\sources\sxs /LimitAccess

Friday, February 13, 2015


attrib -H -S /D /S
That will remove the hidden and system attributes from all the files/folders inside of your current directory.

attrib -r -s -h /S /D
this command will remove attrubutes for all files folders and subfolders:
-read only -system file -is hidden -Processes matching files and all subfolders. -Processes folders as well

just type
attrib -h -r -s /s /d j:*.*
where j is the drive letter... unlocks all the locked stuff in j drive
if u want to make it specific..then go to a specific location using cmd and then type
attrib -h -r -s /s /d "foldername"
it can also be used to lock drives or folders just alter "-" with "+"
attrib +h +r +s /s /d "foldername"

To launch command prompt in administrator mode
  1. Type cmd in Search and hold Crtl+Shift
  2. Type attrib -h -r -s /s /d "location of the drive letter:" \*.*

To make a batch file for its current directory and sub directories:
cd %~dp0
attrib -h -r -s /s /d /l *.*

For example folder named new under E: drive
type the command:
e:\cd new

e:\new\attrib *.* -s -h /s /d
and all the files and folders are un-hidden

Saturday, September 27, 2014

how to create folder without name??

-create new folder or ctrl+shift+N
-highlight the name....and press ctrl+0160
-and press enter.

FIX deadboot / no recovery / no fastboot / formatted while in QPST mode

(REPOST ) I’m not the owner of this tutorials,
REQUIREMENTS -
1. Dead-boot flare but still gets detected in device manager (unknown device or in COM PORTS).
2. USB cable
3. JB / ICS drivers
4. Laptop / PC runnning Windows. I’ve tested this using Windows XP SP3 and Windows 7 32bit SP1.
5. Qualcomm Product Support Tools. Ive tested this using version 2.7 build 399
6. Jelly Bean BP Firmware
7. Jelly Bean img dump
8. Common sense Download links -
QPST 2.7 build 399 – Download
JB drivers – Download
ICS drivers – Download
Jelly Bean BP Firmware – Download (you can also use the one posted in the group) Jelly Bean IMG dump – you can use the one posted in the group (boot.imgrecovery.imgsystem.imguserdata.imgcache.img)
Steps How to Fix –
3 things to do -
a. Install QPST
b. Install drivers
c. Run QPST and reprogram EMMC
Install QPST
1. Extract QPST-2.7.399.rar. Run SETUP.EXE
2. Run SETUP.EXE, press INSTALL when it prmpt to insall additional Visual C++ runtime libraries. Follow the defaults, press NEXT until it is finished with the install.
Install drivers
1. Connect deadboot flare to PC / Laptop.
2. Go to device manager, expand PORTS (COM & LPT). Check if there is an item called Qualcomm HSUSB QDLOADER 9008. If the item is there, you are done with driver install. If it does not exist, proceed to step3.
3. If there is no item under PORTS (COM & LPT), check device manager under OTHER DEVICES > Unknown Device
4. Double click UNKNOWN DEVICE > UPDATE DRIVER > BROWSE MY COMPUTER > browse to the folder where you saved extracted the ICS / JB drivers. It will install the driver, if it prompts for unsigned drivers, press INSTALL ANYWAY.
5. It should now be listed under COM PORTS > Qualcomm HSUSB QDLOADER 9008.
Run QPST and reprogram EMMC (this is where the magic begins)
If you are on Windows 7, make sure you run it under compatibility XP Sp3 and RUN AS ADMINISTRATOR
1. Run EMMC SOFTWARE DOWNLOAD.
2. Press BROWSE, it will detect your phone. Look for the PHONE TAB that says DOWNLOAD. Press OK.
3. Put check mark on PROGRAM BOOTLOADERS, PROGRAM MMC DEVICE, TRUSTED.
4. Under FLASH PROGRAMMER FILENAME, enter MPRG8X25.hex
5. Under BOOT IMAGE, enter 8X25_msimage.mbn
6. Press LOAD XML DEF > navigate to your extracted JB firmware > select rawprogram0 > press OPEN.
7. Press LOAD PATCH DEF > navigate to your extracted JB firmware > select patch0 > press OPEN
8. PRESS DOWNLOAD
9. An warning message may appear, TIME OUT WAITING etc etc or COOKIE NOT RECEIVED. If the error is TIME OUT WAITING, press OK and then press SWITCH DEVICE TO DLOAD. Check the flare, it will show RESET FOR ENTRY QPST.
10. Exit EMMC SOFTWARE DOWNLOAD. Proceed to flash Jelly Bean BP Firmware and then flash Jelly Bean img dump.
11. IF ERROR IS COOKIE NOT RECEIVED, sorry it is still bricked. This will also fix CWM formatted boot partitions. No need for the ENTRY QPST FIX I posted months ago.