简体   繁体   English

如何计算num_partition_sectors和start_sector以从android rom的system.img创建rawprogram0.xml或rawprogram_unsparse.xml?

[英]How can I calculate num_partition_sectors and start_sector to create rawprogram0.xml or rawprogram_unsparse.xml from system.img of android rom?

I want to understand num_partition_sectors and start_sector to create rawprogram0.xml or rawprogram_unsparse.xml from system.img of android rom QFIL??? 我想了解num_partition_sectors和start_sector,以便从android rom QFIL的system.img创建rawprogram0.xml或rawprogram_unsparse.xml ???

For Example: I have rawprogram0.xml from android ROM QFIL, in which 例如:我有来自android ROM QFIL的rawprogram0.xml,其中

<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="system.img" label="system" num_partition_sectors="262144" physical_partition_number="0" start_sector="1054720" />

and

system.img file size is 128 MB (134,217,728 bytes).

In linux ubuntu, I know how to edit system.img file after mounting in ubuntu and so on. 在linux ubuntu中,我知道在ubuntu中挂载后如何编辑system.img文件。 if I add some apk its size must be increase that's not big deal but problem for me is I do not know how to calculate num_partition_sectors and start_sector to create rawprogram0.xml or rawprogram_unsparse.xml from system.img (anysize)?? 如果我添加一些apk,则必须增加其大小,这没什么大不了的,但是对我来说,问题是我不知道如何计算num_partition_sectors和start_sector以便从system.img(anysize)创建rawprogram0.xml或rawprogram_unsparse.xml吗? I am editing one original android ROM QFIL as per my need??? 我正在根据我的需要编辑一个原始的android ROM QFIL ???

I need your kind help, any linux commands or Program which can calculate num_partition_sectors and start_sector from system.img file or any other way?? 我需要您的帮助,可以从system.img文件或任何其他方式计算num_partition_sectors和start_sector的任何Linux命令或程序?

Please if you give me little explanation and calculation of above example, I am very thankful to you. 如果您对以上示例的解释和计算不多,请多多关照。

size_in_KB = SECTOR_SIZE_IN_BYTES x num_partition_sectors(千字节)----->(字节)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM