sekaiacg / erofs-utils

Other
90 stars 30 forks source link

does not unpack some images #4

Closed blackeangel closed 1 year ago

blackeangel commented 1 year ago

does not unpack some images, get errors err=-95[Operation not supported on transport endpoint] type=FILE dataLayout=COMPRESSION_LEGACY name=/bin/CameraDaemon err=-95[Operation not supported on transport endpoint] type=FILE dataLayout=COMPRESSION_LEGACY name=/bin/activity_recognition_service err=-95[Operation not supported on transport endpoint] type=FILE dataLayout=COMPRESSION_LEGACY name=/bin/aptouch_daemon err=-95[Operation not supported on transport endpoint] type=FILE dataLayout=COMPRESSION_LEGACY name=/bin/atcmdserver err=-95[Operation not supported on transport endpoint] type=FILE dataLayout=COMPRESSION_LEGACY name=/bin/awk err=-95[Operation not supported on transport endpoint] type=FILE dataLayout=COMPRESSION_LEGACY name=/bin/bcc err=-95[Operation not supported on transport endpoint] type=FILE dataLayout=COMPRESSION_LEGACY name=/bin/cplay err=-95[Operation not supported on transport endpoint] type=FILE dataLayout=COMPRESSION_LEGACY name=/bin/cs-set err=-95[Operation not supported on transport endpoint] type=FILE dataLayout=COMPRESSION_LEGACY name=/bin/diagserver err=-95[Operation not supported on transport endpoint] type=FILE dataLayout=COMPRESSION_LEGACY name=/bin/fusion_daemon err=-95[Operation not supported on transport endpoint] type=FILE dataLayout=COMPRESSION_LEGACY name=/bin/glgps47531 err=-95[Operation not supported on transport endpoint] type=FILE dataLayout=COMPRESSION_LEGACY name=/bin/glgps4774 Huawei EMUI 9

sekaiacg commented 1 year ago

It may be that the file system of the output directory does not support certain operations, and the output directory does not use the fuse/sdcardfs file system.

blackeangel commented 1 year ago

It may be that the file system of the output directory does not support certain operations, and the output directory does not use the fuse/sdcardfs file system.

I unpack vendor.img erofs in the ext4 file system. When unpacking it says:

Extract: Starting...
Extract: fs_config|file_contexts  saving...
Extract: fs_config|files_context  done.
Extract: [ 100.00% ]
Extract: An exception occurred while fetching, the info has been saved!
Extract: The operation took: 0.773 second(s)

and saved in a file. What are these exceptions?

Many images unpack normally, but some images have this situation. exception.log

sekaiacg commented 1 year ago

It may be that the file system of the output directory does not support certain operations, and the output directory does not use the fuse/sdcardfs file system.

I unpack vendor.img erofs in the ext4 file system. When unpacking it says:

Extract: Starting...
Extract: fs_config|file_contexts  saving...
Extract: fs_config|files_context  done.
Extract: [ 100.00% ]
Extract: An exception occurred while fetching, the info has been saved!
Extract: The operation took: 0.773 second(s)

and saved in a file. What are these exceptions?

Many images unpack normally, but some images have this situation. exception.log

No permission to access vendor.img.

blackeangel commented 1 year ago

It may be that the file system of the output directory does not support certain operations, and the output directory does not use the fuse/sdcardfs file system.

I unpack vendor.img erofs in the ext4 file system. When unpacking it says:

Extract: Starting...
Extract: fs_config|file_contexts  saving...
Extract: fs_config|files_context  done.
Extract: [ 100.00% ]
Extract: An exception occurred while fetching, the info has been saved!
Extract: The operation took: 0.773 second(s)

and saved in a file. What are these exceptions? Many images unpack normally, but some images have this situation. exception.log

No permission to access vendor.img.

Sorry, try again vendor.img

sekaiacg commented 1 year ago

I'm very sorry, I can't read data even with the erofs driver of the 6.1 kernel. This image file is not supported by the erofs driver or it uses an unopen source erofs driver.

But it does not rule out that the image file is damaged

[191930.330110] ---[ end trace 0000000000000000 ]---
[191930.330111] RIP: 0010:__memmove+0x1b0/0x1c0
[191930.330114] Code: 66 44 8b 1e 66 44 8b 54 16 fe 66 44 89 1f 66 44 89 54 17 fe eb 0c 48 83 fa 01 72 06 44 8a 1e 44 88 1f c3 cc cc cc cc 48 89 d1 <f3> a4 c3 cc cc cc cc 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90
[191930.330116] RSP: 0018:ffffa9b4a5863b88 EFLAGS: 00010286
[191930.330119] RAX: ffff9cb539cfddc4 RBX: ffff9cb539cfddc4 RCX: ffffffffffffe570
[191930.330120] RDX: fffffffffffff56e RSI: ffffa9b480ab0000 RDI: ffff9cb539cfedc2
[191930.330122] RBP: ffff9cb539cfde08 R08: ffffa9b480ab0000 R09: ffffa9b480aafff0
[191930.330124] R10: ffffa9b480aaf000 R11: ffffa9b480aaf000 R12: 00000000000000f5
[191930.330126] R13: ffffa9b480aaf000 R14: ffff9cb539cfddc4 R15: ffff9cb539cfd332
[191930.330127] FS:  0000000000000000(0000) GS:ffff9cbabd6c0000(0000) knlGS:0000000000000000
[191930.330130] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[191930.330131] CR2: ffffa9b4809ff000 CR3: 00000006d8a10006 CR4: 00000000003706e0
[191930.330134] note: kworker/u25:4[2836699] exited with irqs disabled
[191930.330142] note: kworker/u25:4[2836699] exited with preempt_count 2
[191930.378464] BUG: unable to handle page fault for address: ffffa9b480a2c000
[191930.378483] #PF: supervisor read access in kernel mode
[191930.378485] #PF: error_code(0x0000) - not-present page
[191930.378487] PGD 100000067 P4D 100000067 PUD 1001e6067 PMD 107e17067 PTE 0
[191930.378491] Oops: 0000 [#3] PREEMPT SMP PTI
[191930.378494] CPU: 4 PID: 2830641 Comm: kworker/u25:3 Tainted: P S   UD    OE      6.2.10-arch1-1 #1 3b64a9154b84a23b8badf9e10678249884a952c6
[191930.378496] Hardware name: LENOVO 20MF000DUS/20MF000DUS, BIOS N2EET61W (1.43 ) 12/20/2022
[191930.378498] Workqueue: erofs_unzipd z_erofs_decompressqueue_work [erofs]
[191930.378530] RIP: 0010:__memmove+0x1b0/0x1c0
[191930.378533] Code: 66 44 8b 1e 66 44 8b 54 16 fe 66 44 89 1f 66 44 89 54 17 fe eb 0c 48 83 fa 01 72 06 44 8a 1e 44 88 1f c3 cc cc cc cc 48 89 d1 <f3> a4 c3 cc cc cc cc 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90
[191930.378535] RSP: 0018:ffffa9b487bdbb88 EFLAGS: 00010286
[191930.378537] RAX: ffff9cba580c8f36 RBX: ffff9cba580c8f36 RCX: ffffffffffffe403
[191930.378538] RDX: fffffffffffff401 RSI: ffffa9b480a2c000 RDI: ffff9cba580c9f34
[191930.378539] RBP: ffff9cba580c8fb8 R08: ffffa9b480a2c000 R09: ffffa9b480a2bff0
[191930.378541] R10: ffffa9b480a2b000 R11: ffffa9b480a2b000 R12: 00000000000000f1
[191930.378543] R13: ffffa9b480a2b000 R14: ffff9cba580c8f36 R15: ffff9cba580c8337
[191930.378544] FS:  0000000000000000(0000) GS:ffff9cbabd700000(0000) knlGS:0000000000000000
[191930.378547] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[191930.378549] CR2: ffffa9b480a2c000 CR3: 00000006d8a10001 CR4: 00000000003706e0
[191930.378551] Call Trace:
[191930.378553]  <TASK>
[191930.378555]  LZ4_decompress_safe_partial+0x2a6/0x480
[191930.378561]  z_erofs_lz4_decompress+0x4bb/0x730 [erofs 7eae4c3c565eae097b0161c618b0184c3d0a7e2b]
[191930.378588]  z_erofs_decompress_queue+0x47a/0xd70 [erofs 7eae4c3c565eae097b0161c618b0184c3d0a7e2b]
[191930.378599]  z_erofs_decompressqueue_work+0x35/0x70 [erofs 7eae4c3c565eae097b0161c618b0184c3d0a7e2b]
[191930.378606]  process_one_work+0x1c5/0x3c0
[191930.378610]  worker_thread+0x51/0x390
[191930.378613]  ? __pfx_worker_thread+0x10/0x10
[191930.378615]  kthread+0xdb/0x110
[191930.378617]  ? __pfx_kthread+0x10/0x10
[191930.378619]  ret_from_fork+0x29/0x50
[191930.378624]  </TASK>
blackeangel commented 1 year ago

that is, it is not possible to unpack it from the word at all? And so I wanted to get data from it, even without the rules of the file system ...

blackeangel commented 1 year ago

I'm very sorry, I can't read data even with the erofs driver of the 6.1 kernel. This image file is not supported by the erofs driver or it uses an unopen source erofs driver.

But it does not rule out that the image file is damaged

[191930.330110] ---[ end trace 0000000000000000 ]---
[191930.330111] RIP: 0010:__memmove+0x1b0/0x1c0
[191930.330114] Code: 66 44 8b 1e 66 44 8b 54 16 fe 66 44 89 1f 66 44 89 54 17 fe eb 0c 48 83 fa 01 72 06 44 8a 1e 44 88 1f c3 cc cc cc cc 48 89 d1 <f3> a4 c3 cc cc cc cc 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90
[191930.330116] RSP: 0018:ffffa9b4a5863b88 EFLAGS: 00010286
[191930.330119] RAX: ffff9cb539cfddc4 RBX: ffff9cb539cfddc4 RCX: ffffffffffffe570
[191930.330120] RDX: fffffffffffff56e RSI: ffffa9b480ab0000 RDI: ffff9cb539cfedc2
[191930.330122] RBP: ffff9cb539cfde08 R08: ffffa9b480ab0000 R09: ffffa9b480aafff0
[191930.330124] R10: ffffa9b480aaf000 R11: ffffa9b480aaf000 R12: 00000000000000f5
[191930.330126] R13: ffffa9b480aaf000 R14: ffff9cb539cfddc4 R15: ffff9cb539cfd332
[191930.330127] FS:  0000000000000000(0000) GS:ffff9cbabd6c0000(0000) knlGS:0000000000000000
[191930.330130] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[191930.330131] CR2: ffffa9b4809ff000 CR3: 00000006d8a10006 CR4: 00000000003706e0
[191930.330134] note: kworker/u25:4[2836699] exited with irqs disabled
[191930.330142] note: kworker/u25:4[2836699] exited with preempt_count 2
[191930.378464] BUG: unable to handle page fault for address: ffffa9b480a2c000
[191930.378483] #PF: supervisor read access in kernel mode
[191930.378485] #PF: error_code(0x0000) - not-present page
[191930.378487] PGD 100000067 P4D 100000067 PUD 1001e6067 PMD 107e17067 PTE 0
[191930.378491] Oops: 0000 [#3] PREEMPT SMP PTI
[191930.378494] CPU: 4 PID: 2830641 Comm: kworker/u25:3 Tainted: P S   UD    OE      6.2.10-arch1-1 #1 3b64a9154b84a23b8badf9e10678249884a952c6
[191930.378496] Hardware name: LENOVO 20MF000DUS/20MF000DUS, BIOS N2EET61W (1.43 ) 12/20/2022
[191930.378498] Workqueue: erofs_unzipd z_erofs_decompressqueue_work [erofs]
[191930.378530] RIP: 0010:__memmove+0x1b0/0x1c0
[191930.378533] Code: 66 44 8b 1e 66 44 8b 54 16 fe 66 44 89 1f 66 44 89 54 17 fe eb 0c 48 83 fa 01 72 06 44 8a 1e 44 88 1f c3 cc cc cc cc 48 89 d1 <f3> a4 c3 cc cc cc cc 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90
[191930.378535] RSP: 0018:ffffa9b487bdbb88 EFLAGS: 00010286
[191930.378537] RAX: ffff9cba580c8f36 RBX: ffff9cba580c8f36 RCX: ffffffffffffe403
[191930.378538] RDX: fffffffffffff401 RSI: ffffa9b480a2c000 RDI: ffff9cba580c9f34
[191930.378539] RBP: ffff9cba580c8fb8 R08: ffffa9b480a2c000 R09: ffffa9b480a2bff0
[191930.378541] R10: ffffa9b480a2b000 R11: ffffa9b480a2b000 R12: 00000000000000f1
[191930.378543] R13: ffffa9b480a2b000 R14: ffff9cba580c8f36 R15: ffff9cba580c8337
[191930.378544] FS:  0000000000000000(0000) GS:ffff9cbabd700000(0000) knlGS:0000000000000000
[191930.378547] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[191930.378549] CR2: ffffa9b480a2c000 CR3: 00000006d8a10001 CR4: 00000000003706e0
[191930.378551] Call Trace:
[191930.378553]  <TASK>
[191930.378555]  LZ4_decompress_safe_partial+0x2a6/0x480
[191930.378561]  z_erofs_lz4_decompress+0x4bb/0x730 [erofs 7eae4c3c565eae097b0161c618b0184c3d0a7e2b]
[191930.378588]  z_erofs_decompress_queue+0x47a/0xd70 [erofs 7eae4c3c565eae097b0161c618b0184c3d0a7e2b]
[191930.378599]  z_erofs_decompressqueue_work+0x35/0x70 [erofs 7eae4c3c565eae097b0161c618b0184c3d0a7e2b]
[191930.378606]  process_one_work+0x1c5/0x3c0
[191930.378610]  worker_thread+0x51/0x390
[191930.378613]  ? __pfx_worker_thread+0x10/0x10
[191930.378615]  kthread+0xdb/0x110
[191930.378617]  ? __pfx_kthread+0x10/0x10
[191930.378619]  ret_from_fork+0x29/0x50
[191930.378624]  </TASK>

There are too many false images. After all, fsck.erofs does not understand them either. You can mount it, but there is simply no access to some files, nothing can be opened or copied.