ubidump icon indicating copy to clipboard operation
ubidump copied to clipboard

feature request: is it possible to add hardlink unpacking

Open carver-ua opened this issue 2 years ago • 0 comments

Hello, i am using ubidump.py - for unpacking UBI, all OK, super tools. but one device used hardlink, and it is lost. when I extracted files. therefore, when a new UBI is created, it grows in size. how difficult it is to fix/add ? Thanks.

ubidump.py old.ubi  --dumptree | grep "inum=00707"
 0 BRANCH: ref=[061:0x16458] len=  63 -- key=00695:2:0ac5ac7a ->  [061:0x16458-0x16497] DIRENT: key=00695:2:0ac5ac7a, inum=00707, type=0:reg -- b'mke2fs'
 6 BRANCH: ref=[062:0x0c490] len=  69 -- key=00695:2:0e26a803 ->  [062:0x0c490-0x0c4d5] DIRENT: key=00695:2:0e26a803, inum=00707, type=0:reg -- b'mkfs.ext4dev'
 0 BRANCH: ref=[062:0x0f370] len=  66 -- key=00695:2:19e760aa ->  [062:0x0f370-0x0f3b2] DIRENT: key=00695:2:19e760aa, inum=00707, type=0:reg -- b'mkfs.ext2'
 1 BRANCH: ref=[062:0x0c448] len=  66 -- key=00695:2:19e7615a ->  [062:0x0c448-0x0c48a] DIRENT: key=00695:2:19e7615a, inum=00707, type=0:reg -- b'mkfs.ext3'
 2 BRANCH: ref=[062:0x14140] len=  66 -- key=00695:2:19e7620a ->  [062:0x14140-0x14182] DIRENT: key=00695:2:19e7620a, inum=00707, type=0:reg -- b'mkfs.ext4'

ubidump.py old.ubi --listfiles | grep 95176
-rwxr-xr-x  5 0     0          95176 2021-08-12 10:22:28 sbin/mke2fs
-rwxr-xr-x  5 0     0          95176 2021-08-12 10:22:28 sbin/mkfs.ext4dev
-rwxr-xr-x  5 0     0          95176 2021-08-12 10:22:28 sbin/mkfs.ext2
-rwxr-xr-x  5 0     0          95176 2021-08-12 10:22:28 sbin/mkfs.ext3
-rwxr-xr-x  5 0     0          95176 2021-08-12 10:22:28 sbin/mkfs.ext4

ls -lih | grep 93K
38155996 -rwxr-xr-x 1 root root  93K Aug 12  2021 mke2fs
38156044 -rwxr-xr-x 1 root root  93K Aug 12  2021 mkfs.ext2
38156045 -rwxr-xr-x 1 root root  93K Aug 12  2021 mkfs.ext3
38156046 -rwxr-xr-x 1 root root  93K Aug 12  2021 mkfs.ext4
38156002 -rwxr-xr-x 1 root root  93K Aug 12  2021 mkfs.ext4dev

carver-ua avatar Oct 13 '21 17:10 carver-ua