Extract PIT Files from Samsung Devices

All Samsung devices have a Download or Odin mode for installing a firmware, firmware components, kernels, or custom recoveries. If the required preparations are meet before flashing, things go successfully most of the time. However, there are some cases where the procedure ends up with an error and you get a FAIL! message in Odin.

One of the commonest forms of the errors encountered in Odin while flashing stock firmware is the “Invalid Ext4 image” and “Get PIT for mapping“ issue.

<ID:0/003> Added!!
<ID:0/003> Odin v.3 engine (ID:3)..
<ID:0/003> File analysis..
<ID:0/003> Set PIT file..
<ID:0/003> DO NOT TURN OFF TARGET!!
<ID:0/003> Get PIT for mapping..

Android devices use the EXT4 storage structure which defines the allocation of available storage space to system partitions. The PIT (Partition Information Table) contains the map of storage allocations for different system partitions. Since Samsung releases different variants of the same device depending on storage capacity, carrier, and region/country, the PIT structure on them differs from each other.

When you flash firmware, Odin starts looking for the partition information table. If the PIT is detected, the installation will finish uninterrupted, but if the PIT is not detected or it’s corrupted for some reason, you might get “Get PIT for mapping” error.

To fix this problem, you will have to provide the appropriate PIT in Odin to install the firmware successfully. The safest way is to dump and backup the PIT the device is currently using.

Root is required to successfully perform these commands.

Extracting PIT Using Terminal Emulator

  • Install the Terminal Emulator app from the Google Play store

  • Install the BusyBox app. Launch the app and then tap the Install option.

  • Now open Terminal Emulator (grant permission when prompted) and type:

dd if=/dev/block/mmcblk0 of=/sdcard/out.pit bs=8 count=580 skip=2176
  • Now browse your phone’s storage to find the backed up PIT file and save it for future use.

Extracting PIT Using ADB/SSH

  • To use ADB commands, you will have to install the Android SDK Platform-tools on your computer.

  • Make sure USB Debugging is enabled on your device's Settings > Developer option.

  • Connect your Samsung device to the PC using the USB cable, open a terminal and type the adb commands below. (If you are connecting via SSH skip these adb commands)

adb devices
adb shell
  • Now call su and grant root permission on your device, then type the dd command to dump the PIT to a file:
su
dd if=/dev/block/mmcblk0 of=/sdcard/out.pit bs=8 count=580 skip=2176
{{ message }}

{{ 'Comments are closed.' | trans }}