Wednesday, May 4, 2016

PartitioningTool.py fails on 1 kb partition

This is my partition table as generated by gdisk

Logical sector size: 512 bytes
Disk identifier (GUID): 98101B32-BBE2-4BF2-A06E-2BB33D000C20
Partition table holds up to 32 entries
First usable sector is 34, last usable sector is 15269854
Partitions will be aligned on 2-sector boundaries
Total free space is 313196 sectors (152.9 MiB)

Code:

#        Name        Start (sector)        End (sector)        Size        Size (Sectors)        Partition GUID Code
1        modem        131072        262143        64 MB        131072        EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
2        sbl1        262144        263167        512KiB        1024        DEA0BA2C-CBDD-4805-B4F9-F428251C3E98
3        sbl1bak        263168        264191        512KiB        1024        DEA0BA2C-CBDD-4805-B4F9-F428251C3E98
4        aboot        264192        266239        1024KiB        2048        400FFDCD-22E0-47E7-9A23-F16ED9382388
5        abootbak        266240        268287        1024KiB        2048        400FFDCD-22E0-47E7-9A23-F16ED9382388
6        rpm        268288        269311        512KiB        1024        098DF793-D712-413D-9D4E-89D711772228
7        rpmbak        269312        270335        512KiB        1024        098DF793-D712-413D-9D4E-89D711772228
8        tz        270336        271871        768KiB        1536        A053AA7F-40B8-4B1C-BA08-2F68AC71A4F4
9        tzbak        271872        273407        768KiB        1536        A053AA7F-40B8-4B1C-BA08-2F68AC71A4F4
10        pad        273408        275455        1024KiB        2048        EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
11        modemst1        275456        278527        1.5MiB        3072        EBBEADAF-22C9-E33B-8F5D-0E81686A68CB
12        modemst2        278528        281599        1.5MiB        3072        0A288B1F-22C9-E33B-8F5D-0E81686A68CB
13        misc        281600        283647        1024KiB        2048        82ACC91F-357C-4A68-9C8F-689E1B1A23A1
14        fsc        283648        283649        1024Bytes        2        57B90A16-22C9-E33B-8F5D-0E81686A68CB
15        ssd        283650        283665        8KiB        16        2C86E742-745E-4FDD-BFD8-B6A7AC638772
16        splash        283666        304145        10MiB        20480        20117F86-E985-4357-B9EE-374BC1D8487D
17        DDR        393216        393279        32KiB        64        20A0C19C-286A-42FA-9CE7-F64C3226A794
18        fsg        393280        396351        1.5MiB        3072        638FF8E2-22C9-E33B-8F5D-0E81686A68CB
19        sec        396352        396383        16KiB        32        303E6AC3-AF15-4C54-9E9B-D9A8FBECF401
20        boot        396384        461919        32MiB        65536        20117F86-E985-4357-B9EE-374BC1D8487D
21        system        461920        4557919        2GB        4096000        97D7B011-54DA-4835-B3C4-917AD6E73D74
22        persist        4557920        4623455        32MiB        65536        6C95E238-E343-4BA8-B489-8681ED22AD0B
23        apedata        4623456        4688991        32MiB        65536        6C95E238-E343-4BA8-B489-8681ED22AD0B
24        cache        4688992        5213279        256MiB        524288        5594C694-C871-4B5F-90B1-690A6F68E0F7
25        recovery        5213280        5278815        32MiB        65536        9D72D4E4-9958-42DA-AC26-BEA7A90B0434
26        devinfo        5278816        5280863        1024KiB        2048        1B81E7E6-F50D-419B-A739-2AEEF8DA3335
27        keystore        5373952        5374975        512KiB        1024        DE7D4029-0F5B-41C8-AE7E-F6C023A02B33
28        oem        5374976        5506047        64MiB        131072        7DB6AC55-ECB5-4E02-80DA-4D335B973332
29        config        5506048        5507071        512KiB        1024        91B72D4D-71E0-4CBF-9B8E-236381CFF17A
30        userdata        5507072        15269854        4.7GiB        9762783        1B81E7E6-F50D-419B-A739-2AEEF8DA3335

My version of the tool is this
Code:

!/usr/bin/python
#===========================================================================
   
#  This script parses "partition.xml" and creates numerous output files
#  specifically, partition.bin, rawprogram.xml

# REFERENCES

#  $Header: //source/qcom/qct/core/pkg/bootloaders/rel/1.2/boot_images/core/storage/tools/jsdcc/partition_load_pt/PartitioningTool.py#2 $
#  $DateTime: 2012/01/12 16:00:13 $
#  $Author: coresvc $

# when          who    what, where, why
# --------      ---    -------------------------------------------------------
# 2011-03-22    ah      rawprogram for GPT for 'grow' partition, since mjsdload.cmm couldn't handle big number
# 2011-03-22    ah      Corrected final disk size patch (off by 1 sector), corrected GPT labels (uni-code)
# 2011-03-18    ah      Fixed default bug for DISK_SIGNATURE, align_wpb -> align
# 2011-03-16    ah      New DISK_SIGNATURE tag added for MBR partitions, Split partition0.bin into
#                      MBR0.bin and EBR0.bin, Corrected bug in backup GPT DISK patching
# 2011-03-10    ah      Removes loadpt.cmm, splits partition0.bin to MBR0.bin, EBR0.bin
# 2011-03-09    ah      Much more error checking, cleaner, adds "align_wpb" tag
# 2011-02-14    ah      Added patching of DISK for GPT
# 2011-02-02    ah      Allow MBR Type to be specified as "4C" or "0x4C"
# 2011-25-01    ah      Outputs "patch.xml" as well, allows more optimal partition alignment
# 2010-12-01    ah      Matching QPST, all EXT partitions 64MB aligned (configurable actually)
#                      More error checking, Removed CHS option, GPT output is 2 files (primary and backup)
# 2010-10-26    ah      better error checking, corrected typo on physical_partition for > 0
# 2010-10-25    ah      adds GPT, CFILE output, various other features
# 2010-10-08    ah      released to remove compile errors of missing PERL script modules

I am purposely trying to keep my fsc partition to 1kb. I can make the change in my xml file to 2kb and the tool will continue. If I leave it at 1kb it will error out. Anyone else have this issue?


from xda-developers http://ift.tt/1QSyqvo
via IFTTT

No comments:

Post a Comment