althafvly / AmlogicKitchen

Android firmware kitchen for amlogic devices
137 stars 55 forks source link

Windows pack block size is 0 during repack and not 4k #4

Closed dister520 closed 2 years ago

dister520 commented 2 years ago

Repack of .img block of 4K Is not seen. Linux appears to be ok but super. Partition is not created on Linux due to type field and super_type.txt missing.

althafvly commented 2 years ago

Can you explain in bit more details?. which script, platform and firmware are you using ?

dister520 commented 2 years ago

Apologies breaking up the comments.

Packing system_ext_a loaded 82 fs_config entries Creating filesystem with parameters: Size: 123547648 Block size: 4096 Blocks per group: 32768 Inodes per group: 7552 Inode size: 256 Journal blocks: 0 Label: system_ext_a Blocks: 30163 Block groups: 1 Reserved block group size: 7 Created filesystem with 90/7552 inodes and 28429/30163 blocks resize2fs 1.42.12 (29-Aug-2014) Resizing the filesystem on level2\system_ext_a.img to 28432 (4k) blocks. The filesystem on level2\system_ext_a.img is now 28432 (0k) blocks long.

Packing vendor_a loaded 1034 fs_config entries Creating filesystem with parameters: Size: 296427520 Block size: 4096 Blocks per group: 32768 Inodes per group: 6032 Inode size: 256 Journal blocks: 0 Label: vendor_a Blocks: 72370 Block groups: 3 Reserved block group size: 23 Created filesystem with 1033/18096 inodes and 68003/72370 blocks resize2fs 1.42.12 (29-Aug-2014) Resizing the filesystem on level2\vendor_a.img to 68011 (4k) blocks. The filesystem on level2\vendor_a.img is now 68011 (0k) blocks long.

Packing product_a loaded 129 fs_config entries Creating filesystem with parameters: Size: 145985536 Block size: 4096 Blocks per group: 32768 Inodes per group: 4464 Inode size: 256 Journal blocks: 0 Label: product_a Blocks: 35641 Block groups: 2 Reserved block group size: 15 Created filesystem with 137/8928 inodes and 33633/35641 blocks resize2fs 1.42.12 (29-Aug-2014) Resizing the filesystem on level2\product_a.img to 33637 (4k) blocks. The filesystem on level2\product_a.img is now 33637 (0k) blocks long.

Packing odm_a loaded 21 fs_config entries Creating filesystem with parameters: Size: 1048576 Block size: 4096 Blocks per group: 32768 Inodes per group: 64 Inode size: 256 Journal blocks: 0 Label: odm_a Blocks: 256 Block groups: 1 Reserved block group size: 7 Created filesystem with 29/64 inodes and 193/256 blocks resize2fs 1.42.12 (29-Aug-2014) Resizing the filesystem on level2\odm_a.img to 193 (4k) blocks. The filesystem on level2\odm_a.img is now 193 (0k) blocks long.

Packing super lpmake I 05-23 14:46:51 371 17192 builder.cpp:1093] [liblp]Partition system_a will resize from 0 bytes to 1083949056 bytes lpmake I 05-23 14:46:51 371 17192 builder.cpp:1093] [liblp]Partition system_ext_a will resize from 0 bytes to 116457472 bytes lpmake I 05-23 14:46:51 371 17192 builder.cpp:1093] [liblp]Partition vendor_a will resize from 0 bytes to 278573056 bytes lpmake I 05-23 14:46:51 371 17192 builder.cpp:1093] [liblp]Partition product_a will resize from 0 bytes to 137777152 bytes lpmake I 05-23 14:46:51 371 17192 builder.cpp:1093] [liblp]Partition odm_a will resize from 0 bytes to 790528 bytes Invalid sparse file format at header magic Invalid sparse file format at header magic Invalid sparse file format at header magic Invalid sparse file format at header magic Invalid sparse file format at header magic

althafvly commented 2 years ago

Can you tell what's wrong in this?. It's packing super image. Super image contains odm,system,system_ext and vendor partition. There's no error in this, these are warnings you can ignore

dister520 commented 2 years ago

Yes please note before it packs super there is resizing of the individual partition. These partitions are to be 4K. After resizing it makes them 0k. As an example

Resizing the filesystem on level2\odm_a.img to 193 (4k) blocks. The filesystem on level2\odm_a.img is now 193 (0k) blocks long. If this was done on A linux machine 0k would be seen as 4k

althafvly commented 2 years ago

This is done in both linux and windows version of this script. warning was hidden in windows.

dister520 commented 2 years ago

The warning in Linux says it repacked with 4K block and the above log shows warning it repacked in 0k block. There would be a discrepancy between Linux fs and windows fs.

althafvly commented 2 years ago

That warning is present in both linux and windows. I just reverted it old state to avoid anymore confusion. You can use the latest changes and check