This repository has been archived by the owner. It is now read-only.

not able to flash Galaxy s3 userdata partition #55

Closed
nka11 opened this Issue Oct 5, 2012 · 14 comments

Comments

Projects
None yet
5 participants
@nka11

nka11 commented Oct 5, 2012

OS : linux ubuntu 12.04

Here is the pit :

 heimdall print-pit --verbose --no-reboot
Heimdall v1.4 RC1

Copyright (c) 2010-2012, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Detecting device...
      Manufacturer: "SAMSUNG"
           Product: "Gadget Serial"

            length: 18
      device class: 2
               S/N: 0
           VID:PID: 04E8:685D
         bcdDevice: 021B
   iMan:iProd:iSer: 1:2:0
          nb confs: 1

interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 02.02.01
       endpoint[0].address: 83
           max packet size: 0010
          polling interval: 09

interface[1].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 0A.00.00
       endpoint[0].address: 81
           max packet size: 0200
          polling interval: 00
       endpoint[1].address: 02
           max packet size: 0200
          polling interval: 00
Claiming interface...
Attempt failed. Detaching driver...
Claiming interface again...
Setting up interface...

Checking if protocol is initialised...
ERROR: libusb error -7 whilst receiving packet.
Protocol is not initialised.

Initialising protocol...
Protocol initialisation successful.

Beginning session...
Session begun with device of type: 0.

Downloading device's PIT file...
PIT file download successful.

Entry Count: 16
Unknown 1: 1598902083
Unknown 2: 844251476
Unknown 3: 30797
Unknown 4: 0
Unknown 5: 0
Unknown 6: 0
Unknown 7: 0
Unknown 8: 0


--- Entry #0 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 80
Attributes: 2 (STL Read-Only)
Update Attributes: 1 (FOTA)
Partition Block Size: 0
Partition Block Count: 1734
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: BOOTLOADER
Flash Filename: sboot.bin
FOTA Filename: 


--- Entry #1 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 81
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 1734
Partition Block Count: 312
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: TZSW
Flash Filename: tz.img
FOTA Filename: 


--- Entry #2 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 70
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 34
Partition Block Count: 16
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: PIT
Flash Filename: mx.pit
FOTA Filename: 


--- Entry #3 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 71
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 50
Partition Block Count: 2048
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: MD5HDR
Flash Filename: md5.img
FOTA Filename: 


--- Entry #4 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 1
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 8192
Partition Block Count: 8192
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: BOTA0
Flash Filename: -
FOTA Filename: 


--- Entry #5 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 2
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 16384
Partition Block Count: 8192
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: BOTA1
Flash Filename: -
FOTA Filename: 


--- Entry #6 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 3
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 24576
Partition Block Count: 40960
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: EFS
Flash Filename: efs.img
FOTA Filename: 


--- Entry #7 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 4
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 65536
Partition Block Count: 16384
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: PARAM
Flash Filename: param.bin
FOTA Filename: 


--- Entry #8 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 5
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 81920
Partition Block Count: 16384
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: BOOT
Flash Filename: boot.img
FOTA Filename: 


--- Entry #9 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 6
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 98304
Partition Block Count: 16384
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: RECOVERY
Flash Filename: recovery.img
FOTA Filename: 


--- Entry #10 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 7
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 114688
Partition Block Count: 65536
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: RADIO
Flash Filename: modem.bin
FOTA Filename: 


--- Entry #11 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 8
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 180224
Partition Block Count: 2097152
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: CACHE
Flash Filename: cache.img
FOTA Filename: 


--- Entry #12 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 9
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 2277376
Partition Block Count: 3145728
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: SYSTEM
Flash Filename: system.img
FOTA Filename: 


--- Entry #13 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 10
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 5423104
Partition Block Count: 1146880
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: HIDDEN
Flash Filename: hidden.img
FOTA Filename: 


--- Entry #14 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 11
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 6569984
Partition Block Count: 16384
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: OTA
Flash Filename: -
FOTA Filename: 


--- Entry #15 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 12
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 6586368
Partition Block Count: 0
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: USERDATA
Flash Filename: userdata.img
FOTA Filename: remained

Ending session...

First I tried with the true partition name :

heimdall flash --USERDATA userdata.img --verbose 
Heimdall v1.4 RC1

Copyright (c) 2010-2012, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
      Manufacturer: "SAMSUNG"
           Product: "Gadget Serial"

            length: 18
      device class: 2
               S/N: 0
           VID:PID: 04E8:685D
         bcdDevice: 021B
   iMan:iProd:iSer: 1:2:0
          nb confs: 1

interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 02.02.01
       endpoint[0].address: 83
           max packet size: 0010
          polling interval: 09

interface[1].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 0A.00.00
       endpoint[0].address: 81
           max packet size: 0200
          polling interval: 00
       endpoint[1].address: 02
           max packet size: 0200
          polling interval: 00
Claiming interface...
Attempt failed. Detaching driver...
Claiming interface again...
Setting up interface...

Checking if protocol is initialised...
ERROR: libusb error -7 whilst receiving packet.
Protocol is not initialised.

Initialising protocol...
Protocol initialisation successful.

Beginning session...
Session begun with device of type: 0.

Downloading device's PIT file...
PIT file download successful.

ERROR: Partition "USERDATA" does not exist in the specified PIT.
Ending session...
Rebooting device...
Releasing device interface...
Re-attaching kernel driver...

So, a new try with partition id gives :

heimdall flash --12 userdata.img --verbose 
Heimdall v1.4 RC1

Copyright (c) 2010-2012, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
      Manufacturer: "SAMSUNG"
           Product: "Gadget Serial"

            length: 18
      device class: 2
               S/N: 0
           VID:PID: 04E8:685D
         bcdDevice: 021B
   iMan:iProd:iSer: 1:2:0
          nb confs: 1

interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 02.02.01
       endpoint[0].address: 83
           max packet size: 0010
          polling interval: 09

interface[1].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 0A.00.00
       endpoint[0].address: 81
           max packet size: 0200
          polling interval: 00
       endpoint[1].address: 02
           max packet size: 0200
          polling interval: 00
Claiming interface...
Attempt failed. Detaching driver...
Claiming interface again...
Setting up interface...

Checking if protocol is initialised...
ERROR: libusb error -7 whilst receiving packet.
Protocol is not initialised.

Initialising protocol...
Protocol initialisation successful.

Beginning session...
Session begun with device of type: 0.

Downloading device's PIT file...
PIT file download successful.

ERROR: No partition with identifier "12" exists in the specified PIT.
Ending session...
Rebooting device...
Releasing device interface...
Re-attaching kernel driver...

and i have same result with --userdata option.
I think it's an issue, i hope i gave enough information to debug.

@Benjamin-Dobell

This comment has been minimized.

Show comment
Hide comment
@Benjamin-Dobell

Benjamin-Dobell Oct 5, 2012

Owner

Certainly looks like a bug. I'll get on it!

Thanks for the detailed report :)

Owner

Benjamin-Dobell commented Oct 5, 2012

Certainly looks like a bug. I'll get on it!

Thanks for the detailed report :)

@Benjamin-Dobell

This comment has been minimized.

Show comment
Hide comment
@Benjamin-Dobell

Benjamin-Dobell Oct 5, 2012

Owner

Well that was quick ;)

Heimdall doesn't recognise the partition because it has a block count of zero. Heimdall doesn't try to flash partitions with a size of zero (usually it means it's a junk entry in the PIT file). It's possible that your phone doesn't actually have any room allocated for USERDATA at the moment.

Alternately, maybe the PIT file block counts aren't reliable and Heimdall should just flash them regardless. Whilst that's slightly concerning, it may well be the case.

If you want to give it a try then remove:

entries[i]->GetBlockCount() > 0 && 

from lines 258, 269, 280 and 291 of libpit/Source/libpit.cpp, then recompile both libpit and Heimdall and try flash the USERDATA partition.

Owner

Benjamin-Dobell commented Oct 5, 2012

Well that was quick ;)

Heimdall doesn't recognise the partition because it has a block count of zero. Heimdall doesn't try to flash partitions with a size of zero (usually it means it's a junk entry in the PIT file). It's possible that your phone doesn't actually have any room allocated for USERDATA at the moment.

Alternately, maybe the PIT file block counts aren't reliable and Heimdall should just flash them regardless. Whilst that's slightly concerning, it may well be the case.

If you want to give it a try then remove:

entries[i]->GetBlockCount() > 0 && 

from lines 258, 269, 280 and 291 of libpit/Source/libpit.cpp, then recompile both libpit and Heimdall and try flash the USERDATA partition.

@nka11

This comment has been minimized.

Show comment
Hide comment
@nka11

nka11 Oct 5, 2012

Done, looks good.

Thanks for a so quick resolution. Best regards

nka11 commented Oct 5, 2012

Done, looks good.

Thanks for a so quick resolution. Best regards

@nka11 nka11 closed this Oct 5, 2012

@rjmcguire

This comment has been minimized.

Show comment
Hide comment
@rjmcguire

rjmcguire Oct 5, 2012

Just curios.
What do you think the possible repercussions are if this doesn't work?

On Fri, Oct 5, 2012 at 10:48 AM, Benjamin Dobell
notifications@github.comwrote:

Well that was quick ;)

Heimdall doesn't recognise the partition because it has a block count of
zero. Heimdall doesn't try to flash partitions with a size of zero (usually
it means its a junk entry in the PIT file). It's possible that your phone
doesn't actually have any room allocated for USERDATA at the moment.

Alternately, maybe the PIT file block counts aren't reliable and Heimdall
should just flash them regardless. Whilst that's slightly concerning, it
may well be the case.

If you want to give it a try then remove:

entries[i]->GetBlockCount() > 0 &&

from lines 258, 269, 280 and 291 of libpit/Source/libpit.cpp, then
recompile both libpit and Heimdall and try flash the USERDATA partition.


Reply to this email directly or view it on GitHubhttps://github.com/Benjamin-Dobell/Heimdall/issues/55#issuecomment-9169162.

Rory McGuire ClearFormat - Research and Development UK : 44 870 224 0424 USA : 1 877 842 6286 RSA : 27 21 466 9400 Email: rmcguire@clearformat.com Website: www.clearformat.com

www.clearformat.com: http://fwd.clearformat.com/7QZsx

Just curios.
What do you think the possible repercussions are if this doesn't work?

On Fri, Oct 5, 2012 at 10:48 AM, Benjamin Dobell
notifications@github.comwrote:

Well that was quick ;)

Heimdall doesn't recognise the partition because it has a block count of
zero. Heimdall doesn't try to flash partitions with a size of zero (usually
it means its a junk entry in the PIT file). It's possible that your phone
doesn't actually have any room allocated for USERDATA at the moment.

Alternately, maybe the PIT file block counts aren't reliable and Heimdall
should just flash them regardless. Whilst that's slightly concerning, it
may well be the case.

If you want to give it a try then remove:

entries[i]->GetBlockCount() > 0 &&

from lines 258, 269, 280 and 291 of libpit/Source/libpit.cpp, then
recompile both libpit and Heimdall and try flash the USERDATA partition.


Reply to this email directly or view it on GitHubhttps://github.com/Benjamin-Dobell/Heimdall/issues/55#issuecomment-9169162.

Rory McGuire ClearFormat - Research and Development UK : 44 870 224 0424 USA : 1 877 842 6286 RSA : 27 21 466 9400 Email: rmcguire@clearformat.com Website: www.clearformat.com

www.clearformat.com: http://fwd.clearformat.com/7QZsx

@nka11

This comment has been minimized.

Show comment
Hide comment
@nka11

nka11 Oct 5, 2012

There is no reason for this patch to not work (in fact it works). The possible repercussions may enforce flashing a partition which really has a block count of 0 (And i'm still looking for a user case where it happens and may cause damage).

My stupid question is :

  • Why the samsung pit has such an "error" or did i break that pit with a previous Odin usage....

This phone exisits with 2 internal memory size. Maybe it's a choice the rom designer of vendor to set this value to 0 in order to have the same PIT usable on 16 or 32G version of the device...

just wondering, will make some investigations around..

nka11 commented Oct 5, 2012

There is no reason for this patch to not work (in fact it works). The possible repercussions may enforce flashing a partition which really has a block count of 0 (And i'm still looking for a user case where it happens and may cause damage).

My stupid question is :

  • Why the samsung pit has such an "error" or did i break that pit with a previous Odin usage....

This phone exisits with 2 internal memory size. Maybe it's a choice the rom designer of vendor to set this value to 0 in order to have the same PIT usable on 16 or 32G version of the device...

just wondering, will make some investigations around..

@rjmcguire

This comment has been minimized.

Show comment
Hide comment
@rjmcguire

rjmcguire Oct 5, 2012

I'll check mine, I have only flashed CWM

I'll check mine, I have only flashed CWM

@Benjamin-Dobell

This comment has been minimized.

Show comment
Hide comment
@Benjamin-Dobell

Benjamin-Dobell Oct 5, 2012

Owner

Well I would have expected one of two things to happen:

  1. The flash failed, probably with a failed to confirm end of file transfer sequence error. This basically means the bootloader on the phone refused to flash the partition. I would expect no device damage.
  2. The flash failed silently and the data in the file you tried to flash didn't actually make it on your phone.

Basically if it worked I'll be very surprised ;-)

Owner

Benjamin-Dobell commented Oct 5, 2012

Well I would have expected one of two things to happen:

  1. The flash failed, probably with a failed to confirm end of file transfer sequence error. This basically means the bootloader on the phone refused to flash the partition. I would expect no device damage.
  2. The flash failed silently and the data in the file you tried to flash didn't actually make it on your phone.

Basically if it worked I'll be very surprised ;-)

@nka11

This comment has been minimized.

Show comment
Hide comment
@nka11

nka11 Oct 5, 2012

In fact i'm not sure it completely works, as i can't verify for now the content of the part on the phone.
I need to flash userData for Firefox OS, but it still not boot : http://forum.xda-developers.com/showthread.php?p=32395373#post32395373

I'm sure about that : the process doesn't fail, the verbose mode shows me output about writing files and any existing data on the partition is wiped.

nka11 commented Oct 5, 2012

In fact i'm not sure it completely works, as i can't verify for now the content of the part on the phone.
I need to flash userData for Firefox OS, but it still not boot : http://forum.xda-developers.com/showthread.php?p=32395373#post32395373

I'm sure about that : the process doesn't fail, the verbose mode shows me output about writing files and any existing data on the partition is wiped.

@rjmcguire

This comment has been minimized.

Show comment
Hide comment
@rjmcguire

rjmcguire Oct 5, 2012

Here is my PIT file, its from a GT-I9300

Heimdall v1.4 RC1

Copyright (c) 2010-2012, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
Claiming interface...
Attempt failed. Detaching driver...
Claiming interface again...
Setting up interface...

Checking if protocol is initialised...
Protocol is not initialised.

Initialising protocol...
Protocol initialisation successful.

Beginning session...
Session begun.

Downloading device's PIT file...
PIT file download successful.

Entry Count: 16
Unknown 1: 1598902083
Unknown 2: 844251476
Unknown 3: 30797
Unknown 4: 0
Unknown 5: 0
Unknown 6: 0
Unknown 7: 0
Unknown 8: 0


--- Entry #0 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 80
Attributes: 2 (STL Read-Only)
Update Attributes: 1 (FOTA)
Partition Block Size: 0
Partition Block Count: 1734
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: BOOTLOADER
Flash Filename: sboot.bin
FOTA Filename:


--- Entry #1 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 81
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 1734
Partition Block Count: 312
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: TZSW
Flash Filename: tz.img
FOTA Filename:


--- Entry #2 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 70
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 34
Partition Block Count: 16
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: PIT
Flash Filename: mx.pit
FOTA Filename:


--- Entry #3 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 71
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 50
Partition Block Count: 2048
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: MD5HDR
Flash Filename: md5.img
FOTA Filename:


--- Entry #4 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 1
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 8192
Partition Block Count: 8192
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: BOTA0
Flash Filename: -
FOTA Filename:


--- Entry #5 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 2
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 16384
Partition Block Count: 8192
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: BOTA1
Flash Filename: -
FOTA Filename:


--- Entry #6 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 3
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 24576
Partition Block Count: 40960
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: EFS
Flash Filename: efs.img
FOTA Filename:


--- Entry #7 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 4
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 65536
Partition Block Count: 16384
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: PARAM
Flash Filename: param.bin
FOTA Filename:


--- Entry #8 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 5
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 81920
Partition Block Count: 16384
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: BOOT
Flash Filename: boot.img
FOTA Filename:


--- Entry #9 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 6
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 98304
Partition Block Count: 16384
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: RECOVERY
Flash Filename: recovery.img
FOTA Filename:


--- Entry #10 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 7
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 114688
Partition Block Count: 65536
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: RADIO
Flash Filename: modem.bin
FOTA Filename:


--- Entry #11 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 8
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 180224
Partition Block Count: 2097152
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: CACHE
Flash Filename: cache.img
FOTA Filename:


--- Entry #12 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 9
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 2277376
Partition Block Count: 3145728
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: SYSTEM
Flash Filename: system.img
FOTA Filename:


--- Entry #13 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 10
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 5423104
Partition Block Count: 1146880
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: HIDDEN
Flash Filename: hidden.img
FOTA Filename:


--- Entry #14 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 11
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 6569984
Partition Block Count: 16384
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: OTA
Flash Filename: -
FOTA Filename:


--- Entry #15 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 12
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 6586368
Partition Block Count: 0
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: USERDATA
Flash Filename: userdata.img
FOTA Filename: remained

Ending session...
Releasing device interface...
Re-attaching kernel driver...

On Fri, Oct 5, 2012 at 11:37 AM, nka11 notifications@github.com wrote:

In fact i'm not sure it completely works, as i can't verify for now the
content of the part on the phone.
I need to flash userData for Firefox OS, but it still not boot :
http://forum.xda-developers.com/showthread.php?p=32395373#post32395373

I'm sure about that : the process doesn't fail, the verbose mode shows me
output about writing files and any existing data on the partition is wiped.


Reply to this email directly or view it on GitHubhttps://github.com/Benjamin-Dobell/Heimdall/issues/55#issuecomment-9170276.

Here is my PIT file, its from a GT-I9300

Heimdall v1.4 RC1

Copyright (c) 2010-2012, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
Claiming interface...
Attempt failed. Detaching driver...
Claiming interface again...
Setting up interface...

Checking if protocol is initialised...
Protocol is not initialised.

Initialising protocol...
Protocol initialisation successful.

Beginning session...
Session begun.

Downloading device's PIT file...
PIT file download successful.

Entry Count: 16
Unknown 1: 1598902083
Unknown 2: 844251476
Unknown 3: 30797
Unknown 4: 0
Unknown 5: 0
Unknown 6: 0
Unknown 7: 0
Unknown 8: 0


--- Entry #0 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 80
Attributes: 2 (STL Read-Only)
Update Attributes: 1 (FOTA)
Partition Block Size: 0
Partition Block Count: 1734
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: BOOTLOADER
Flash Filename: sboot.bin
FOTA Filename:


--- Entry #1 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 81
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 1734
Partition Block Count: 312
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: TZSW
Flash Filename: tz.img
FOTA Filename:


--- Entry #2 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 70
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 34
Partition Block Count: 16
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: PIT
Flash Filename: mx.pit
FOTA Filename:


--- Entry #3 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 71
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 50
Partition Block Count: 2048
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: MD5HDR
Flash Filename: md5.img
FOTA Filename:


--- Entry #4 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 1
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 8192
Partition Block Count: 8192
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: BOTA0
Flash Filename: -
FOTA Filename:


--- Entry #5 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 2
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 16384
Partition Block Count: 8192
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: BOTA1
Flash Filename: -
FOTA Filename:


--- Entry #6 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 3
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 24576
Partition Block Count: 40960
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: EFS
Flash Filename: efs.img
FOTA Filename:


--- Entry #7 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 4
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 65536
Partition Block Count: 16384
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: PARAM
Flash Filename: param.bin
FOTA Filename:


--- Entry #8 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 5
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 81920
Partition Block Count: 16384
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: BOOT
Flash Filename: boot.img
FOTA Filename:


--- Entry #9 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 6
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 98304
Partition Block Count: 16384
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: RECOVERY
Flash Filename: recovery.img
FOTA Filename:


--- Entry #10 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 7
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 114688
Partition Block Count: 65536
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: RADIO
Flash Filename: modem.bin
FOTA Filename:


--- Entry #11 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 8
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 180224
Partition Block Count: 2097152
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: CACHE
Flash Filename: cache.img
FOTA Filename:


--- Entry #12 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 9
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 2277376
Partition Block Count: 3145728
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: SYSTEM
Flash Filename: system.img
FOTA Filename:


--- Entry #13 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 10
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 5423104
Partition Block Count: 1146880
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: HIDDEN
Flash Filename: hidden.img
FOTA Filename:


--- Entry #14 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 11
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size: 6569984
Partition Block Count: 16384
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: OTA
Flash Filename: -
FOTA Filename:


--- Entry #15 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 12
Attributes: 5 (Read/Write)
Update Attributes: 5 (FOTA)
Partition Block Size: 6586368
Partition Block Count: 0
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: USERDATA
Flash Filename: userdata.img
FOTA Filename: remained

Ending session...
Releasing device interface...
Re-attaching kernel driver...

On Fri, Oct 5, 2012 at 11:37 AM, nka11 notifications@github.com wrote:

In fact i'm not sure it completely works, as i can't verify for now the
content of the part on the phone.
I need to flash userData for Firefox OS, but it still not boot :
http://forum.xda-developers.com/showthread.php?p=32395373#post32395373

I'm sure about that : the process doesn't fail, the verbose mode shows me
output about writing files and any existing data on the partition is wiped.


Reply to this email directly or view it on GitHubhttps://github.com/Benjamin-Dobell/Heimdall/issues/55#issuecomment-9170276.

@Benjamin-Dobell

This comment has been minimized.

Show comment
Hide comment
@Benjamin-Dobell

Benjamin-Dobell Oct 5, 2012

Owner

Well the FOTA filename for the partition is 'remained'. Perhaps the bootloader interprets 0 to mean whatever space is left over.

For now I'm going to reopen this issue. I don't really want to apply the patch officially until I can confirm that it actually works. I'll do some more investigation with my GT-I9300 when I get home.

Owner

Benjamin-Dobell commented Oct 5, 2012

Well the FOTA filename for the partition is 'remained'. Perhaps the bootloader interprets 0 to mean whatever space is left over.

For now I'm going to reopen this issue. I don't really want to apply the patch officially until I can confirm that it actually works. I'll do some more investigation with my GT-I9300 when I get home.

@nka11

This comment has been minimized.

Show comment
Hide comment
@nka11

nka11 Oct 5, 2012

Here is my proposal (tested and working) :
in libpit.cpp, replace
entries[i]->GetBlockCount() > 0 &&
by
(entries[i]->GetBlockCount() > 0 || strcmp(entries[i]->GetFotaFilename(), "remaining")) &&

nka11 commented Oct 5, 2012

Here is my proposal (tested and working) :
in libpit.cpp, replace
entries[i]->GetBlockCount() > 0 &&
by
(entries[i]->GetBlockCount() > 0 || strcmp(entries[i]->GetFotaFilename(), "remaining")) &&

@michield

This comment has been minimized.

Show comment
Hide comment
@michield

michield Dec 21, 2012

Had the same problem on Galaxy S2, with boot partition not flashing. Can confirm that the change from nka11 (change && to || on 4 lines in libpit.cpp) works. Used Heimdall v1.4 RC1

Had the same problem on Galaxy S2, with boot partition not flashing. Can confirm that the change from nka11 (change && to || on 4 lines in libpit.cpp) works. Used Heimdall v1.4 RC1

@vanviegen

This comment has been minimized.

Show comment
Hide comment
@vanviegen

vanviegen Jan 3, 2013

I used to get 'ERROR: Partition name for "primary-boot" could not be located' when attempting to update the boot loader on my i9100. nka11's patch fixes that.

CAUTION: do not just replace && by || as phpartisan suggested, as that is incorrect and dangerous. Refer to nka11's comment instead.

I used to get 'ERROR: Partition name for "primary-boot" could not be located' when attempting to update the boot loader on my i9100. nka11's patch fixes that.

CAUTION: do not just replace && by || as phpartisan suggested, as that is incorrect and dangerous. Refer to nka11's comment instead.

@Benjamin-Dobell

This comment has been minimized.

Show comment
Hide comment
@Benjamin-Dobell

Benjamin-Dobell Jun 11, 2013

Owner
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.