Android5.0 above using raw ext4fs image to make System.new.dat

Source: Internet
Author: User

the previous period provided a tool for Img2sdat [see blog: http://blog.csdn.net/howellzhu/article/details/42841191]. but the input file used by this tool is sparse ext4fs image Image [see blog: http://blog.csdn.net/howellzhu/article/details/43165507]. Therefore, many students encounter the following error:
__init__valueerror:magic should be 0xed26ff3a it is 0x00000000

Note that most tools under Windows can only make raw ext4fs images, and many students cannot make sparse ext4fs images. So this article provides tools to make system.new.dat directly from raw EXT4FS images, and provides download of Linux and Windows version tools.
Production steps: [Welcome reprint, but please specify the source: Http://http://blog.csdn.net/howellzhu]1. Raw EXT4FS image system.rimg made from the system directory: for example, refer to the Make_ext4fs tool provided by Android under Linux, using the following command:
$ make_ext4fs-t 0-s file_contexts-l 1073741824-a system system.rimg system/
to explain briefly,-T represents setting the timestamp of the Unix file in the mirror, which is set to 0, which represents 1970-1-1. -S stands for file_contexts, which is the SELinux file Selabel, which must be specified; note is uppercase S. -L Indicates the length of the file partition and the size of the image file that was made; here N5 is specified as 1G. -A represents the name of the partition in Android, which represents the system partition; system/represents the authoring source directory.
Through the above steps, get a 1GB file system.rimg. Need to note 2 points: 1) do not use the-s parameter, because the-s parameter will generate sparse image, not suitable for the second step of the tool, 2)-T parameter is android-5.0 to join the parameters, if your MAKE_EXT4FS tool does not support the parameter, please remove after execution;
2. Make System.new.dat with Rimg2sdat tool:[Welcome reprint, but please specify Source: Http://http://blog.csdn.net/howellzhu]
Download the Rimg2sdat tool provided at the end of the blog post and execute:
this will generate 2 files in the current directory: System.new.dat system.transfer.list. Create an empty system.patch.dat on your own.
Appendix: 1. Rimg2sdat.exe Tools under Windows: http://download.csdn.net/detail/howellzhu/84390352. Linxu x86/x64 under the Rimg2sdat tool: http://download.csdn.net/detail/howellzhu/84390873. Make_ext4fs tool under Linux (Support-t parameter): http://download.csdn.net/detail/howellzhu/8434723


Android5.0 above using raw ext4fs image to make System.new.dat

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.