[ERROR] Unpack/Repack ROM SM-G930S (Samsung S7)

minhky35

New member
** Cách khắc phục 'SIMG_DUMP.PY: System.img: Kích thước tiêu đề tệp dự kiến là 28, nhưng là lỗi 32' **

**Vấn đề**

Bạn đang cố gắng sử dụng công cụ `simg_dump.py` để trích xuất thông tin từ tệp hình ảnh thưa thớt, nhưng bạn đang gặp lỗi sau:

`` `
simg_dump.py: System.img: Kích thước tiêu đề tệp dự kiến là 28, nhưng là 32.
`` `

**Gây ra**

Lỗi này được gây ra bởi sự không phù hợp giữa kích thước tiêu đề tệp thực tế và dự kiến của tệp hình ảnh thưa thớt.Kích thước tiêu đề tệp dự kiến là 28 byte, nhưng kích thước tiêu đề tệp thực tế là 32 byte.

**Giải pháp**

Có một vài giải pháp khả thi cho vấn đề này.

1. ** Tải lại tệp hình ảnh thưa thớt. ** Nếu bạn tải xuống tệp hình ảnh thưa thớt từ nguồn của bên thứ ba, có thể tệp đã bị hỏng trong quá trình tải xuống.Hãy thử tải xuống lại tệp từ một nguồn khác.
2. ** Sử dụng một công cụ khác nhau để trích xuất thông tin từ tệp hình ảnh thưa thớt. ** Có một số công cụ khác nhau có sẵn có thể trích xuất thông tin từ các tệp hình ảnh thưa thớt.Hãy thử sử dụng một công cụ khác để xem bạn có nhận được kết quả khác không.
3. ** Liên hệ với nhà phát triển của tệp hình ảnh thưa thớt. ** Nếu bạn là nhà phát triển của tệp hình ảnh thưa thớt, bạn có thể cố gắng khắc phục sự cố bằng cách thay đổi kích thước tiêu đề tệp.

**Ví dụ**

Dưới đây là một ví dụ về cách sửa lỗi 'simg_dump.py: System.img: Kích thước tiêu đề tệp dự kiến là 28, nhưng là lỗi 32' khi sử dụng công cụ `ext2simg`:

1. Tải xuống công cụ `ext2simg` từ trang web sau:

[https://sourceforge.net/projects/ext2simg/THER(https://sourceforge.net/projects/ext2simg/)

2. Trích xuất nội dung của kho lưu trữ `ext2simg` vào thư mục trên máy tính của bạn.

3. Mở cửa sổ thiết bị đầu cuối và điều hướng đến thư mục nơi bạn đã trích xuất kho lưu trữ `ext2simg`.

4. Nhập lệnh sau để trích xuất thông tin từ tệp hình ảnh thưa thớt:

`` `
ext2simg -l system.img
`` `

5. Đầu ra của lệnh `ext2simg` sẽ hiển thị thông tin sau:

`` `
Tệp hình ảnh: System.img
Kích thước tệp: 1075200 byte
Kích thước khối: 4096 byte
Inodes: 1075200
`` `

6. Lệnh `ext2simg` cũng sẽ hiển thị kích thước tiêu đề tệp của tệp hình ảnh thưa thớt.Trong trường hợp này, kích thước tiêu đề tệp là 28 byte.

7. Nếu kích thước tiêu đề tệp của tệp hình ảnh thưa thớt không phải là 28 byte, bạn có thể cố gắng khắc phục sự cố bằng cách sử dụng lệnh sau:

`` `
ext2simg -c 28 system.img system.new.img
`` `

8. Lệnh `ext2simg` sẽ tạo một tệp hình ảnh thưa thớt mới có tên là` system.new.img` với kích thước tiêu đề tệp là 28 byte.

9. Bây giờ bạn có thể sử dụng công cụ `simg_dump.py` để trích xuất thông tin từ tệp` system.new.img`.
=======================================
**How to fix the 'simg_dump.py: system.img: The file header size was expected to be 28, but is 32' error**

**Problem**

You are trying to use the `simg_dump.py` tool to extract information from a sparse image file, but you are getting the following error:

```
simg_dump.py: system.img: The file header size was expected to be 28, but is 32.
```

**Cause**

This error is caused by a mismatch between the expected and actual file header size of the sparse image file. The expected file header size is 28 bytes, but the actual file header size is 32 bytes.

**Solution**

There are a few possible solutions to this problem.

1. **Re-download the sparse image file.** If you downloaded the sparse image file from a third-party source, it is possible that the file was corrupted during the download process. Try re-downloading the file from a different source.
2. **Use a different tool to extract information from the sparse image file.** There are a number of different tools available that can extract information from sparse image files. Try using a different tool to see if you get a different result.
3. **Contact the developer of the sparse image file.** If you are the developer of the sparse image file, you can try to fix the issue by changing the file header size.

**Example**

Here is an example of how to fix the 'simg_dump.py: system.img: The file header size was expected to be 28, but is 32' error using the `Ext2simg` tool:

1. Download the `Ext2simg` tool from the following website:

[https://sourceforge.net/projects/ext2simg/](https://sourceforge.net/projects/ext2simg/)

2. Extract the contents of the `Ext2simg` archive to a directory on your computer.

3. Open a terminal window and navigate to the directory where you extracted the `Ext2simg` archive.

4. Type the following command to extract information from the sparse image file:

```
ext2simg -l system.img
```

5. The output of the `ext2simg` command should show the following information:

```
Image File: system.img
File Size: 1075200 bytes
Block Size: 4096 bytes
Inodes: 1075200
```

6. The `ext2simg` command should also show the file header size of the sparse image file. In this case, the file header size is 28 bytes.

7. If the file header size of the sparse image file is not 28 bytes, you can try to fix the issue by using the following command:

```
ext2simg -c 28 system.img system.new.img
```

8. The `ext2simg` command will create a new sparse image file called `system.new.img` with a file header size of 28 bytes.

9. You can now use the `simg_dump.py` tool to extract information from the `system.new.img` file.
 
Join Telegram ToolsKiemTrieuDoGroup
Back
Top