• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [Virgin Mobile] [DEV] partition info & comparison (sprint vs virgin), chameleon, some EFS/IMEI info, brick backups

spammydavis

Newbie
Sep 11, 2013
10
7
SPH-L710 is the hardware base used for both Sprint and Virgin Galaxy SIII's. These models do not have a sim card slot. Other carrier's have SIII's but have a different hardware model. This post only deals with Sprint vs. Virgin.


This info is spread over several threads (here and at xda), plus some of it I could not find (especially can't find Virgin specific info since no one seems to like this variant). I can post links here if you want, but I will post only a couple that I can remember right now.

EFS:
our thread
http://androidforums.com/virgin-mob...0032-howto-comprehensive-imei-efs-backup.html

EFS pro
[TOOL] Updated! 04/09/13 - EFS Professional v2.0.70 - With Qualcomm NV Tools! - xda-developers

Partition table suff:
pit magic
[APP] Updated: 31/10/12 - PIT Magic v1.3.10 - Samsung PIT Creator, Editor, Analyzer! - xda-developers
grande reference
[DEV][REF] El Grande Partition Table Reference - xda-developers
our thread
http://androidforums.com/virgin-mob...229-dev-vm-sgs3-mount-point-list-finally.html

Virgin has an extra partition called "carrier". This partition has something to do with chameleon. It has a sql database and some canned legal info. I believe the legal info gets displayed if you open up the Virgin "my account" app.
 
  • Like
Reactions: upconvert
This works for me in recovery with adb shell (I'm using a CWM version):
open up adb shell and type:
Code:
parted /dev/block/mmcblk0 u s print
parted is a partition utility. You can run it with only the first parameter and be put into a parted prompt environment.

Or run it command line style with several options as parameters.

the "u s" sets its units to "sectors" and print will print the partition table. Default units are "human readable" like MB, kb, GB. But this form is not so great for seeing exact sizes.

The thing is on my phone and possibly others' the stock partition info has some errors. I just type "Ignore". Type "Fix" at your own risk. This is what parted will say:
Code:
~ # parted /dev/block/mmcblk0 print
parted /dev/block/mmcblk0 print
Error: The backup GPT table is not at the end of the disk, as it should be.
This might mean that another operating system believes the disk is smaller.
Fix, by moving the backup to the end (and removing the old backup)?
Fix/Ignore/Cancel? i
i
i
Warning: Not all of the space available to /dev/block/mmcblk0 appears to be
used, you can fix the GPT to use all of the space (an extra 12239 blocks) or
continue with the current setting?
Fix/Ignore? i
i
i
Model: MMC MAG4FB (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name      Flags
 1      4194kB  67.1MB  62.9MB               modem
 2      67.1MB  67.2MB  131kB                sbl1
...
 
  • Like
Reactions: upconvert
Upvote 0
Now, the parition tables. They exist outside of the paritions.

From what I know, there are 3 parition tables. The PIT, GPT, and SGPT. SGPT is secondary GPT at the "end of the disk". The errors that parted is giving have to do with this.
The PIT has extra info and I believe it is not standard to android or linux. There is a tool called "PIT magic" that allows you to examine it.

here is the way to extract the pit, and gpt:
Code:
adb shell:
dd if=/dev/block/mmcblk0 of=/sdcard/virgin.pit bs=8 count=481 skip=2176
dd if=/dev/block/mmcblk0 of=/sdcard/gpt.bin bs=8 count=2176
You can also extract the pit with EFS professional.

on PC:
pull the pit file in adb and open up Pit Magic:
Code:
----------------------------------------------------------
PIT Magic v1.3.10 Copyright
 
  • Like
Reactions: upconvert
Upvote 0
The partial explanation of these paritions can be found in various threads. I like this one becuase it has a spreadsheet:
[DEV][REF] El Grande Partition Table Reference - xda-developers

Of note are partitions 11,12,13, and 21
This is where the "NV items are stored". Actually from what I know, they use to be stored in a file on the EFS partition, but now they are not stored there. Instead partitions 12,13 and 21 contain the "NV ITEMS".
This is important info because NV items are where the secure phone info is stored like your ESN, AAA, HA passwords etc.
MODEMST1 - Modem Storage 1 (NV data)
MODEMST2- Modem Storage 2 (NV data)
backup - NV data backup partition
FSG - Modem Storage "Golden Copy"

FOTA ... "Firmware Over The Air" (partition 19 on Virgin GSIII)
If you look at the edify scripts from samsung updates they have things like:
Code:
ui_print("Update sbl2 ota");
assert(write_backup_sbl2("/dev/block/mmcblk0p3", "/dev/block/mmcblk0p19"));
assert(package_extract_file("sbl2.mbn", "/dev/block/mmcblk0p3"));
assert(erase_backup_fota("/dev/block/mmcblk0p19"));
ui_print("Package sbl2 Done.");
ui_print("Update sbl3 ota");
assert(write_backup_sbl3("/dev/block/mmcblk0p4", "/dev/block/mmcblk0p19"));
assert(package_extract_file("sbl3.mbn", "/dev/block/mmcblk0p4"));
assert(erase_backup_fota("/dev/block/mmcblk0p19"));
ui_print("Package sbl3 Done.");
ui_print("Update aboot ota");
assert(write_backup_aboot("/dev/block/mmcblk0p5", "/dev/block/mmcblk0p19"));
assert(package_extract_file("aboot.mbn", "/dev/block/mmcblk0p5"));
assert(erase_backup_fota("/dev/block/mmcblk0p19"));
ui_print("Package aboot Done.");


from the above, they are using the fota partition as a temp backup space. i.e. no important data is held there.


All the ext4 paritions...these contain file systems. So does the modem partition (aka NON-HLOS.bin). Modem parttion is fat, not ext4.
in recovery:
mkdir /x
mount /dev/block/mmcblk0p1 /x
~ # ls /x
ls /x
image
~ # ls /x/image
ls /x/image
dsps.b00 modem.mdt modem_f1.b21 modem_f2.b06 modem_f2.mdt tzapps.b01
...
umount /x
mount /dev/block/mmcblk0p20 /x
~ # ls /x
ls /x
chameleon.xml lost+found properties.db-journal
data properties.db
...
umount /x


So this is the reason that some Kies images are smaller than the ones you might extract with dd.
dd works on partition size. File systems don't have to take up the whole partition.

Therefore for example NON-HLOS.bin dumps using dd have extra info in it that is not relevant.
It doesn't hurt anything. This is just an explanation of filesystem vs. partition size.
 
  • Like
Reactions: upconvert
Upvote 0
Backing up all "non nandroid" partitions.

If you want to back up all partitions here is one way. Check our thread on the subject as well:
http://androidforums.com/virgin-mob...229-dev-vm-sgs3-mount-point-list-finally.html

Here is the basic script to run in adb shell recovery:
The other way is using efs professional. It is a windows program that will extract/restore any partitions you want, plus some other features.

Code:
/external_sd/virgin # cat scr/bu2.scr
cat scr/bu2.scr
#!/system/bin/sh

TMP=.
BB=./busybox

$BB dd if=/dev/block/platform/msm_sdcc.1/by-name/aboot of=$TMP/aboot.mbn;
$BB dd if=/dev/block/platform/msm_sdcc.1/by-name/backup of=$TMP/backup.raw;
$BB dd if=/dev/block/platform/msm_sdcc.1/by-name/carrier of=$TMP/carrier.img.ext4;
$BB dd if=/dev/block/platform/msm_sdcc.1/by-name/efs of=$TMP/efs.img.ext4;
$BB dd if=/dev/block/platform/msm_sdcc.1/by-name/fota of=$TMP/fota.raw;
$BB dd if=/dev/block/platform/msm_sdcc.1/by-name/fsg of=$TMP/fsg.raw;
$BB dd if=/dev/block/platform/msm_sdcc.1/by-name/grow of=$TMP/grow.raw;
$BB dd if=/dev/block/platform/msm_sdcc.1/by-name/modem of=$TMP/non-hlos.bin;
$BB dd if=/dev/block/platform/msm_sdcc.1/by-name/modemst1 of=$TMP/nvrebuild1.bin;
$BB dd if=/dev/block/platform/msm_sdcc.1/by-name/modemst2 of=$TMP/nvrebuild2.bin;
$BB dd if=/dev/block/platform/msm_sdcc.1/by-name/pad of=$TMP/pad.raw;
$BB dd if=/dev/block/platform/msm_sdcc.1/by-name/param of=$TMP/param.raw;
$BB dd if=/dev/block/platform/msm_sdcc.1/by-name/persist of=$TMP/persist.img.ext4;
$BB dd if=/dev/block/platform/msm_sdcc.1/by-name/rpm of=$TMP/rpm.mbn;
$BB dd if=/dev/block/platform/msm_sdcc.1/by-name/sbl1 of=$TMP/sbl1.mbn;
$BB dd if=/dev/block/platform/msm_sdcc.1/by-name/sbl2 of=$TMP/sbl2.mbn;
$BB dd if=/dev/block/platform/msm_sdcc.1/by-name/sbl3 of=$TMP/sbl3.mbn;
$BB dd if=/dev/block/platform/msm_sdcc.1/by-name/ssd of=$TMP/ssd.raw;
$BB dd if=/dev/block/platform/msm_sdcc.1/by-name/tz of=$TMP/tz.mbn;


md5sum *raw *ext4 *bin *mbn > files.md5
I have busybox in the dir that I am executing. You might get away with just stock dd, so then replace the BB=... line with:
BB=

If you want to restore them, I won't post that. You can figure it out, but suffice to say, don't flash things you are not sure of.
sbl1,2,3,tz,aboot,rpm are part of the boot process ... don't flash.
nvrebuild1,2,efs,backup,fsg are part of the secure data (like ESN)...don't flash, but good to have around.
carrier is virgin specific...not sure how essential it is, but good to have a backup.


This single post explains some of the secure data info and backup procedure:
http://forum.xda-developers.com/showpost.php?p=30679476&postcount=5732

particularly:
"What these show is modemst1 backs up to fsg part, modemst2 goes to backup. These must be important partitions if they are duplicated/backed up. The other key part here is sets param_header.nvdata_backup to 1, nvdata being the important bits that contain imei among other things."

That post is for Verizon (also works w/ sprint), and the partition numbers are in the wrong place, so the zip "Synergy_Backup_HWKeys_signed.zip " wont backup what you think.
Because he uses partitions by number in the zip scripts, not name.
That zip also backups up a directory called: /data/misc/radio/

of course there is also our thread on secure data backup:
http://androidforums.com/virgin-mob...0032-howto-comprehensive-imei-efs-backup.html
 
  • Like
Reactions: upconvert
Upvote 0
Now another thing you might want to do is back up the first 70MB of your internal memory.

This is what you do:
Code:
busybox dd if=/dev/block/mmcblk0 of=/sdcard/backup.bin bs=1M count=70
save it for a rainy day.

it will save your partition info and some boot info.

The reason for this is, you can flash this to an external sd card and boot download mode.
If bootloader bricked.

Haven't tried it...yet. But I have a motherboard waiting for it. (not the one in my phone thankfully). I'm waiting for a 16MB micro-sd. Apparently you have to flash this to a micro-sd that is the same size as your internal memory. But you can just back it up "in case" even if you don't have a card like that.

According to this thread:
Fixing a bootloader-bricked Galaxy S3 using an SD card (Qualcomm SGS3 variants) - xda-developers
[GUIDE]Unbrick a Hard Bricked SPRINT Galaxy S3 (Without JTAG) - xda-developers
 
  • Like
Reactions: upconvert
Upvote 0
A simple one line command: "adb shell ls -l /dev/block/platform/msm_sdcc.1/by-name" will get you all the partition names and their corresponding mount links on any D2 based galaxy S3...

Always good to verify that you're flashing things to the right place (including CWM scripts). Some S3 variants are known to have different mount points.
 
Upvote 0
A simple one line command: "adb shell ls -l /dev/block/platform/msm_sdcc.1/by-name" will get you all the partition names and their corresponding mount links on any D2 based galaxy S3...

Always good to verify that you're flashing things to the right place (including CWM scripts). Some S3 variants are known to have different mount points.
Most o the devices have ......./by-num , which leads to a guessing game.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones