[DEV][INFO][PIT] SM-N900P 32 GB PIT File - Sprint Samsung Galaxy Note 3

All right folks, here it is for documentation purposes.
Thanks to JoshBeach for letting me take over his PC and Note 3 long enough to pull this.
PIT Analysis from PIT Magic also attached in text file.

garwynn said:
All right folks, here it is for documentation purposes.
Thanks to JoshBeach for letting me take over his PC and Note 3 long enough to pull this.
PIT Analysis from PIT Magic also attached in text file.
Click to expand...
Click to collapse
Thanks for doing this!

Hi @garwynn and @JoshBeach
Can You help me please?
I extracted already a Pit file from Note 3 N9005 but PIT Magic give me errors, because the command I use is only to 16 GB.
See HERE my problem. I need new parameters bs, count and skip for 32 GB on this cmd:
On Terminal Emulator --> su -c 'dd if=/dev/block/mmcblk0 of=/sdcard/out.pit bs=8 count=481 skip=2176'
Thank You

ValenteL said:
Hi @garwynn and @JoshBeach
Can You help me please?
I extracted already a Pit file from Note 3 N9005 but PIT Magic give me errors, because the command I use is only to 16 GB.
See HERE my problem. I need new parameters bs, count and skip for 32 GB on this cmd:
On Terminal Emulator --> su -c 'dd if=/dev/block/mmcblk0 of=/sdcard/out.pit bs=8 count=481 skip=2176'
Thank You
Click to expand...
Click to collapse
Heimdall will pull it w/o need for dd if you can go that way.
Sent from my LG-LS980 using Tapatalk

garwynn said:
Heimdall will pull it w/o need for dd if you can go that way.
Click to expand...
Click to collapse
I unknown Heimdall. But now I have the good command to Terminal Emulator for 32 Gb:
su -c 'dd if=/dev/block/mmcblk0 of=/sdcard/My-N9005.pit bs=1 skip=17408 count=4244'
Made on N9005, analyzed by PIT Magic is alright. See this THREAD.
PS: This cmd dd is only to devices from 32 GB.
Thank You

Ok.. what is 32 gb pit file supose to do
Sent from my SM-N900P using XDA Premium 4 mobile app

Related

[Q] Is this the right way to extract Modem for Odin?

Hi,
After searching and reading through the forum about extracting the modem from the phone and package it for Odin, there is no specific command for SGII that I can find.
So, please help me confirm if these are the correct steps. I want to backup my modem before flashing a new one through Odin.
--------------------------
adb shell
su
# dd if=/dev/block/mmcblk0p8 of=/sdcard/modem.bin bs=4096
Copy modem.bin to linux
$ tar -H ustar -cvf my_modem.tar modem.bin
$ md5sum -t my_modem.tar >> my_modem.tar
$ mv my_modem.tar my_modem.tar.md5
----------------------------
now, I can use the my_modem.tar.md5 file as a backup if I want to go back to the original modem, right?
Thanks.

[Q] full rom dump?

use to follow darky's tutorial for my i9000 do a system dump then write an odin flashable rom for backup,
but i have no clue what to dump on my i9100??
The most common partitions are:
/dev/block/mmcblk0p5 -> Kernel
/dev/block/mmcblk0p7 -> Cache
/dev/block/mmcblk0p8 -> Modem / Radio / Baseband (w/e you like to call it)
/dev/block/mmcblk0p9 -> System (factoryfs for Odin .tars)
/dev/block/mmcblk0p10 -> (user) data
i tried it, extracted all the files and created the tar but it fails as soon as i start it..
heres the commands i used :
dd if=/dev/block/mmcblk0p9 of=/sdcard/factoryfs.rfs bs=4096
dd if=/dev/block/mmcblk0p7 of=/sdcard/cache.rfs bs=4096
dd if=/dev/block/mmcblk0p5 of=/sdcard/zImage bs=4096
dd if=/dev/block/mmcblk0p8 of=/sdcard/modem.bin bs=4096
Click to expand...
Click to collapse
then
tar -H ustar -c factoryfs.rfs cache.rfs modem.bin zImage > rom.tar
Click to expand...
Click to collapse
and then md5 ... ?? what am i doing wrong?
Yeah, you can't just reflash raw dumps with Odin, unfortunately.
You can use them to restore via dd though.
But this thread might help for Odin flashing: (the re-packing part)
http://forum.xda-developers.com/showthread.php?t=1081239
read a bunch of threads from that link and so on,
i dont have a linux machine at work so i need to take this home and try but i honestly got my doubts, looks too complicated for a noob like me ha!
i need some easy tutorial to follow, i guess i just have to wait till someone actually writes it!
thank for the help though!

T959TLKG2 modem request

Hi,
Can anyone please provide me T959TLKG2 modem for download.
thanks in advance for any help given.
demetris_I said:
Hi,
Can anyone please provide me T959TLKG2 modem for download.
thanks in advance for any help given.
Click to expand...
Click to collapse
I don't think you can rip the modem.
Hi,
Thanks for your reply.
You can rip the modem using root explorer after you rooted the phone.
Browse system with root explorer and find modem.bin copy paste it onto sd card and the post it here
demetris_I said:
Hi,
Thanks for your reply.
You can rip the modem using root explorer after you rooted the phone.
Browse system with root explorer and find modem.bin copy paste it onto sd card and the post it here
Click to expand...
Click to collapse
I just searched EVERY directory, there is no modem.bin to be found. It can't be ripped in anyway with a stock rom.
Are you rooted?
With root, run adb and use:
adb shell
su
cat /dev/block/bml12 > /sdcard/modem.bin
dd if=/dev/block/bml12 of=/sdcard/modem2.bin bs=4096
exit
exit
Then md5 them to see if they are the same but i think cat /dev/block/bml12 > /sdcard/modem.bin will do the trick just fine.
demetris_I said:
Are you rooted?
With root, run adb and use:
adb shell
su
cat /dev/block/bml12 > /sdcard/modem.bin
dd if=/dev/block/bml12 of=/sdcard/modem2.bin bs=4096
exit
exit
Then md5 them to see if they are the same but i think cat /dev/block/bml12 > /sdcard/modem.bin will do the trick just fine.
Click to expand...
Click to collapse
I've got the modem.bin file for you, where can I put it so you can download it
EDIT: N/M I just made a mediafire account... I will post link as soon as I know which is proper file to post for you.
When I md5sum, I'm a little confused... heres what I did..
for one I did
md5sum -t t959_gb_modem.tar >> t959_modem.tar (not a type, did use different filenames)
mv t959_modem.tar t959_modem.tar.md5
This left me with 2 files... one which was the tar modem, 12.8mb,
t959_gb_modem.tar... and the other file was 1kb, t959_modem.tar.md5
The second time I did this...
md5sum -t t959_gb_modem.tar >> t959_gb_modem.tar (same filenames)
mv t959_gb_modem.tar t959_gb_modem.tar.md5
this left me with one file, 12.8mb, t959_gb_modem.tar.md5
I guess what I need to know is which is the proper method to use so the file will flash in ODIN.
As for the tar command, I use tar -H ustar -c modem.bin > t959_gb_modem.tar
thx, Maniac
I dont need odin flashable, just zip/rar it and upload it, thanks
Modem.bin should be 12,0 MB (12.582.912 bytes) when right click and select properties on it
Multiupload would be great.
http://www.multiupload.com/
thanks again
P.s
for odin flashable tar size should be:
Size:12,0 MB (12.585.032 bytes)
Size on disk: 12,0 MB (12.587.008 bytes)
After you have the correct modem.bin
Modem.bin should be 12,0 MB (12.582.912 bytes) when right click and select properties on it
Then to make it odin flashable you need a linux live cd or linux installation on hdd then:
tar -H ustar -c modem.bin > T959TLKG2.tar
MD5 it for a security check:
md5sum –t T959TLKG2.tar >> T959TLKG2.tar
Rename the tar file like this:
mv T959TLKG2.tar T959TLKG2.tar.md5
And you will have:
T959TLKG2.tar.md5
Odin flashable
The file I have is 12.8m so I think
there may be something wrong. But i'm at work now so I can't upload now.
Sent from Samsung Fascinate (XDA Prem)
No problem, and thanks.
Maybe you see what reported 12.288kb which is correct
Thanks for everything, modem found in full dump link by harimgs.
great modem btw

[Q] Extracting boot class path without directory info

I am working on a new tool that will perform various function and one function i am trying to implement is the ability to odex / deodex system files.
The following command will extract the phones bootclasspath and save to a temp file ...
Code:
adb shell echo $BOOTCLASSPATH > tmp.txt
However, it saves the bootclasspath with all the directories to the files intact. For example,....
core.jar shows as /system/framework/core.jar
The whole file string looks like this...
Code:
/system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/sec_edm.jar:/system/framework/seccamera.jar:/system/framework/scrollpause.jar:/system/framework/stayrotation.jar:/system/framework/smartfaceservice.jar:/system/framework/abt-persistence.jar:/system/framework/secocsp.jar:/system/framework/sc.jar
Notice all the directory locations proceeding the actual file? So basically I am trying to find a way to pull the BCP without the directories showing since I am using a batch file to process the command.
I have even tried to remove the info from the text via batch file with the following but it didnt work...
Code:
findstr /V "/system/framework" tmp.txt > tmp2.txt
and a loop to pull just the few first characters....
Code:
[user=279333]@ECHO[/user] off
Set "InputFile=tmp.txt"
Set "OutputFile=tmp2.txt"
setLocal EnableDelayedExpansion > "%OutputFile%"
for /f "usebackq tokens=* delims= " %%a in ("%InputFile%") do (
set s=%%a
>> "%OutputFile%" echo.!s:~18!
)
But what i really need to make everything much simpler is a command to pull the BCP without the directories with them.
Thanks....
never mind....
I got some batch file help......this code scans the txt and pulls out the unwanted info
Code:
[user=279333]@ECHO[/user] OFF &SETLOCAL
FOR /f "delims=" %%a IN (tmp.txt) DO SET "BOOTCLASSPATH=%%a"
SET "BOOTCLASSPATH=%BOOTCLASSPATH:/system/framework/=%"
ECHO %BOOTCLASSPATH% > tmp2.txt
SET /p myvar= < tmp2.txt
Another way to do it is straight on the Android side using the basename utility:
Code:
for f in $BOOTCLASSPATH; do
name=$(basename "$f")
echo $name >> tmp.txt
done
Code above will work on pretty much any Linux OS
CNexus said:
Another way to do it is straight on the Android side using the basename utility:
Code:
for f in $BOOTCLASSPATH; do
name=$(basename "$f")
echo $name >> tmp.txt
done
Code above will work on pretty much any Linux OS
Click to expand...
Click to collapse
Right! Good info!
On another note, still creating some different options for the tool and have ran into an apparent size limitation for both user data and system images when extracted.
When performing the following command...
Code:
adb shell su -c "dd if=/dev/block/mmcblk0p%system% of=/%cardpath%/temp/system.img bs=4096
I am getting an error that says the file is too large. So there must be some 2gb barrier that will not allow an image beyond that file sizeto be extracted. I can see that twrp and similar recoveries split their images into multiple files like system.ext4.win000 - system.ext4.win001. So my question is from a command line, how would one extract these images into multiple files?
Didact74 said:
Right! Good info!
On another note, still creating some different options for the tool and have ran into an apparent size limitation for both user data and system images when extracted.
When performing the following command...
Code:
adb shell su -c "dd if=/dev/block/mmcblk0p%system% of=/%cardpath%/temp/system.img bs=4096
I am getting an error that says the file is too large. So there must be some 2gb barrier that will not allow an image beyond that file sizeto be extracted. I can see that twrp and similar recoveries split their images into multiple files like system.ext4.win000 - system.ext4.win001. So my question is from a command line, how would one extract these images into multiple files?
Click to expand...
Click to collapse
That's an interesting question...I think you can take advantage of dd's "count" and "skip" option to do it
Code:
#Copy first 1.5gb
dd if=/dev/block/mmcblk0p%system% of=/%cardpath%/temp/system.img bs=4096 count=768 #1.5 * 1024 / 2 MB block size
#Copy the remaining 0.5 gb
dd if=/dev/block/mmcblk0p%system% of=/%cardpath%/temp/system.img bs=4096 skip=768 count=256
Not very pretty, but I can't think of another way off the top of my head
What file system is the /%cardpath%/ that you're saving to?
The only downfall I see is that you need to know how large the entire system partition is first to see whether you need to break it up and the remainder to use for seek
--------
Also, I just thought of a sed one liner to do the bootclasspath thing you asked two posts above! Looks much cleaner IMO
Code:
echo $BOOTCLASSPATH | sed -e 's_\/system\/framework\/__g' > parsed.txt
CNexus said:
That's an interesting question...I think you can take advantage of dd's "count" and "skip" option to do it
Code:
#Copy first 1.5gb
dd if=/dev/block/mmcblk0p%system% of=/%cardpath%/temp/system.img bs=4096 count=768 #1.5 * 1024 / 2 MB block size
#Copy the remaining 0.5 gb
dd if=/dev/block/mmcblk0p%system% of=/%cardpath%/temp/system.img bs=4096 skip=768 count=256
Not very pretty, but I can't think of another way off the top of my head
What file system is the /%cardpath%/ that you're saving to?
Click to expand...
Click to collapse
Thats just my variable for the path to the SD card on my phone.
The above commands just result in a single 1mb file.
Can you explain what "count=768" represents?
oh....the file system is exfat
Didact74 said:
Thats just my variable for the path to the SD card on my phone.
The above commands just result in a single 1mb file.
Can you explain what "count=768 #1.5 * 1024 / 2 MB block size" represents?
Click to expand...
Click to collapse
Yes, I know that's the variable but unless it's formatted to some sort of FAT fs, it should copy the entire partition instead of stopping at a certain point.
Whoops, my math was off sorry. The concept is right, but I didn't spend too much time on the actual code
What I mean by that is that you're using bs=4096, which means you're going by 4096 byte chunks = 4 KB
Then you just do some math and calculate how many 4KB chunks are in 1.5GB and set that as the count parameter. So it would be (1.5GB *1024MB/GB ) / 4MB chunks = 384 MB chunks
384 MB chunks * 1024 KB/MB = 393216 KB chunks
So...
Final command would be
Code:
dd if=/dev/block/mmcblk0pXX of=/sdcard/out.img bs=4096 count=393216
And as you can see, it works...(I actually ran out of partition to copy so that's why it's 1.46)
CNexus said:
Yes, I know that's the variable but unless it's formatted to some sort of FAT fs, it should copy the entire partition instead of stopping at a certain point.
Whoops, my math was off sorry. The concept is right, but I didn't spend too much time on the actual code
What I mean by that is that you're using bs=4096, which means you're going by 4096 byte chunks = 4 KB
Then you just do some math and calculate how many 4KB chunks are in 1.5GB and set that as the count parameter. So it would be (1.5GB *1024MB/GB ) / 4MB chunks = 384 MB chunks
384 MB chunks * 1024 KB/MB = 393216 KB chunks
So...
Final command would be
Code:
dd if=/dev/block/mmcblk0pXX of=/sdcard/out.img bs=4096 count=393216
And as you can see, it works...(I actually ran out of partition to copy so that's why it's 1.46)
Click to expand...
Click to collapse
Okay, that makes sense.
File system is exFAT so i dont know why there is a size limit, but there is.
I am testing now to see what happens once the file reaches 1.5gb and how file #2 picks up. So this is what i have...
Code:
adb shell su -c "dd if=/dev/block/mmcblk0p%system% of=/%cardpath%/temp/system.img bs=4096 count=393216"
adb shell su -c "dd if=/dev/block/mmcblk0p%system% of=/%cardpath%/temp/system2.img bs=4096 skip=393216 count=196608"
I am not sure at this point what the last "count=" should be but I am trying 196608. Lastly, I would need to know how to join them into one file one on a local PC.
Will the last image grow to the count limit or will it only use the space needed? If i set it at 196606 will it only use what it needs or will the count force it to use it all?
The second count parameter should actually be 393,216÷3=131,072 (1.5gb / 3 = 0.5gb)
You can find the answer to that right here as I'm feeling lazy.
http://www.linuxquestions.org/linux...ltimedia/splitting_and_merging_files_using_dd
Didact74 said:
Will the last image grow to the count limit or will it only use the space needed? If i set it at 196606 will it only use what it needs or will the count force it to use it all?
Click to expand...
Click to collapse
I just ran a quick test on this and if you overshoot the count size, the last image will stop when it hits the end of the partition. So if there is 0.5gb left, it won't be any larger even if you specify for it to copy 0.8 gb.
CNexus said:
The second count parameter should actually be 393,216÷3=131,072 (1.5gb / 3 = 0.5gb)
You can find the answer to that right here as I'm feeling lazy.
http://www.linuxquestions.org/linux...ltimedia/splitting_and_merging_files_using_dd
I just ran a quick test on this and if you overshoot the count size, the last image will stop when it hits the end of the partition. So if there is 0.5gb left, it won't be any larger even if you specify for it to copy 0.8 gb.
Click to expand...
Click to collapse
Perfect, thank you. I think I have it worked out. Still in the process of learning linux so bare with me. I would like to use the standard dd command to not only copy the partition but save it to the local machine in one step rather than create and then pull.
So right now its this...
adb shell su -c "dd if=/dev/block/mmcblk0p%system% of=/%cardpath%/temp/system.img bs=4096 count=393216"
The dd is all happening in the virtual linux environment on the phone. Is there a way to dd out of the environment in one step? Like this?
adb shell su -c "dd if=/dev/block/mmcblk0p%system% of=**path to drive on local PC** bs=4096 count=393216"
This would copy the partition and save it to the local PC rather than copying it to the phone then pulling it.
Thanks,
Ah yeah, that annoys me too but I've never found a way around it because your device doesn't have a path to your PC's storage, it just knows that it's connected
CNexus said:
Ah yeah, that annoys me too but I've never found a way around it because your device doesn't have a path to your PC's storage, it just knows that it's connected
Click to expand...
Click to collapse
Okay so its a vicious circle ...lol. I can pull the system images in two parts, but rejoining them while still on the card revisits the whole 2gb file size barrier issue. While building, as soon as it hits 2gb, the command errors out.
If I pull the two separate parts from the card and rejoin them on the PC using cygwin there are no issues, everything builds fine.
However, I don't want cygwin to be required to run this tool. So my long winded question here is, what would be the BAT command to join these two files?
The command.........
system1.img+system2.img system.image
........results in a tiny 100kb file so something with that command is not working correctly unless there is a syntax i am missing.
Didact74 said:
Okay so its a vicious circle ...lol. I can pull the system images in two parts, but rejoining them while still on the card revisits the whole 2gb file size barrier issue. While building, as soon as it hits 2gb, the command errors out.
If I pull the two separate parts from the card and rejoin them on the PC using cygwin there are no issues, everything builds fine.
However, I don't want cygwin to be required to run this tool. So my long winded question here is, what would be the BAT command to join these two files?
The command.........
system1.img+system2.img system.image
........results in a tiny 100kb file so something with that command is not working correctly unless there is a syntax i am missing.
Click to expand...
Click to collapse
EDIT********
needed the /b switch
copy /b system1.img+system2.img system.img works great now.
Thanks
Didact74 said:
EDIT********
needed the /b switch
copy /b system1.img+system2.img system.img works great now.
Thanks
Click to expand...
Click to collapse
Ah, good deal.

Pit Files Create

Can someone please help code to complete pit files from g850f to create ?*:good:
adb shell su -c "dd if=/dev/block/mmcblk0 of=/sdcard/mypitfile.pit bs=X skip=X count=X"
3ly51um said:
Can someone please help code to complete pit files from g850f to create ?*:good:
adb shell su -c "dd if=/dev/block/mmcblk0 of=/sdcard/mypitfile.pit bs=X skip=X count=X"
Click to expand...
Click to collapse
Did you get the numbers right ??
I would need the same info here:
http://forum.xda-developers.com/gal...t-efs-rest-t3169643/post62128668#post62128668

Categories

Resources