[T-Mobile LG G6 Guides, News, & Discussion] Shabby The Dev:
Can Anyone Please Help Me Urgent

Please All Things are done till sha256sum of misc misctest.img

but when I write twrp lafbak back i have those errors

[fwul lglaf]# ./partitions.py --restoremisc twrp-3.2.1-0-h870.img lafbak
Traceback (most recent call last):
File "./partitions.py", line 66, in laf_open_disk
yield fd_num
File "./partitions.py", line 448, in main
write_misc_partition(comm, disk_fd, args.restoremisc, part_offset, part_size, False)
File "./partitions.py", line 332, in write_misc_partition
laf_ioct(comm, fd_num, 0x1261)
File "./partitions.py", line 115, in laf_ioct
comm.call(ioct_cmd)
File "/home/android/lglaf/lglaf.py", line 260, in call
header = self.read(0x20)
File "/home/android/lglaf/lglaf.py", line 240, in read
buff = self._read(need, timeout=timeout)
File "/home/android/lglaf/lglaf.py", line 359, in _read
array = self.usbdev.read(self.ep_in, 2**14, timeout=timeout)
File "/usr/lib/python3.6/site-packages/usb/core.py", line 988, in read
self.__get_timeout(timeout))
File "/usr/lib/python3.6/site-packages/usb/backend/libusb1.py", line 833, in bulk_read
timeout)
File "/usr/lib/python3.6/site-packages/usb/backend/libusb1.py", line 936, in __read
_check(retval)
File "/usr/lib/python3.6/site-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 32] Pipe error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./partitions.py", line 459, in <module>
main()
File "./partitions.py", line 455, in main
wipe_partition(comm, disk_fd, part_offset, part_size, True)
File "/usr/lib/python3.6/contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "./partitions.py", line 70, in laf_open_disk
lglaf.challenge_response(comm, 4)
File "/home/android/lglaf/lglaf.py", line 373, in challenge_response
kilo_header, kilo_response = comm.call(request_kilo)
File "/home/android/lglaf/lglaf.py", line 271, in call
raise RuntimeError("Unexpected response: %r" % header)
RuntimeError: Unexpected response: b'IOCT+\x00\x00\x00a\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\xfd\x00\x00\xb6\xb0\xbc\xab'

and then when i try ./lglaf.py and lsof this is the output of lsof only

lsof 783 root cwd DIR 0,2 1860 2 /
lsof 783 root rtd DIR 0,2 1860 2 /
lsof 783 root txt REG 259,7 356104 822 /system/bin/toybox
lsof 783 root mem REG 259,7 356104 822 /system/bin/toybox
lsof 783 root mem REG 0,12 131072 2867 /dev/__properties__/u:object_r:default_prop:s0
lsof 783 root mem REG 259,7 10120 4494 /system/lib64/libpackagelistparser.so
lsof 783 root mem REG 259,7 915704 4288 /system/lib64/libc++.so
lsof 783 root mem REG 259,7 92320 4535 /system/lib64/libselinux.so
lsof 783 root mem REG 259,7 223328 4456 /system/lib64/libm.so
lsof 783 root mem REG 259,7 68304 4452 /system/lib64/liblog.so
lsof 783 root mem REG 259,7 1007264 4289 /system/lib64/libc.so
lsof 783 root mem REG 259,7 1213424 4304 /system/lib64/libcrypto.so
lsof 783 root mem REG 259,7 125704 4309 /system/lib64/libcutils.so
lsof 783 root mem REG 259,7 112616 4495 /system/lib64/libpcre.so
lsof 783 root mem REG 259,7 14312 4595 /system/lib64/libstdc++.so
lsof 783 root mem REG 0,12 131072 2892 /dev/__properties__/properties_serial
lsof 783 root mem REG 259,7 10184 4481 /system/lib64/libnetd_client.so
lsof 783 root mem REG 0,12 131072 2892 /dev/__properties__/properties_serial
lsof 783 root mem REG 259,7 933408 624 /system/bin/linker64
lsof 783 root 0u CHR 29,0 0t0 15645 /dev/graphics/fb0
lsof 783 root 1w FIFO 0,7 0t0 506 pipe:[506]
lsof 783 root 2u CHR 1,3 0t0 15525 /dev/null
lsof 783 root 3r DIR 0,4 0 1 /proc
lsof 783 root 4r DIR 0,4 0 24640 /proc/783/fd
lsof 783 root 5r REG 0,2 7505 13797 /sbin/res/xhdpi/firmware_update_title.png
lsof 783 root 6r REG 0,2 25053 13794 /sbin/res/xhdpi/firmware_update_notice_usb.png
lsof 783 root 7r REG 0,2 4909 13793 /sbin/res/xhdpi/firmware_update_notice_sd.png
lsof 783 root 8r REG 0,2 14876 13796 /sbin/res/xhdpi/firmware_update_notice_wifi.png
lsof 783 root 9r REG 0,2 5477 13795 /sbin/res/xhdpi/firmware_update_notice_wait.png
lsof 783 root 10r REG 0,2 6551 13781 /sbin/res/xhdpi/firmware_update_logo_00.png
lsof 783 root 11r REG 0,2 6602 13782 /sbin/res/xhdpi/firmware_update_logo_01.png
lsof 783 root 12r REG 0,2 7023 13783 /sbin/res/xhdpi/firmware_update_logo_02.png
lsof 783 root 13r REG 0,2 6819 13784 /sbin/res/xhdpi/firmware_update_logo_03.png
lsof 783 root 14r REG 0,2 6816 13785 /sbin/res/xhdpi/firmware_update_logo_04.png
lsof 783 root 15r REG 0,2 7038 13786 /sbin/res/xhdpi/firmware_update_logo_05.png
lsof 783 root 16r REG 0,2 6832 13787 /sbin/res/xhdpi/firmware_update_logo_06.png
lsof 783 root 17r REG 0,2 7233 13788 /sbin/res/xhdpi/firmware_update_logo_07.png
lsof 783 root 18r REG 0,2 7057 13789 /sbin/res/xhdpi/firmware_update_logo_08.png
lsof 783 root 19r REG 0,2 7319 13790 /sbin/res/xhdpi/firmware_update_logo_09.png
lsof 783 root 20r REG 0,2 6945 13791 /sbin/res/xhdpi/firmware_update_logo_10.png
lsof 783 root 21r REG 0,2 7036 13792 /sbin/res/xhdpi/firmware_update_logo_11.png
lsof 783 root 22r REG 0,2 2297 13799 /sbin/res/xhdpi/logo_usb.png
lsof 783 root 23r REG 0,2 605 13798 /sbin/res/xhdpi/logo_sd.png
lsof 783 root 24r REG 0,2 1595 13801 /sbin/res/xhdpi/logo_wifi.png
lsof 783 root 25r REG 0,2 1158 13800 /sbin/res/xhdpi/logo_wait.png
lsof 783 root 26r REG 0,2 2005 13802 /sbin/res/xhdpi/port_com.png
lsof 783 root 27r REG 0,2 5185 13804 /sbin/res/xhdpi/port_num.png
lsof 783 root 28r REG 0,2 1064 13803 /sbin/res/xhdpi/port_lan.png
lsof 783 root 29u unix 0t0 15730 @laf_ipc
lsof 783 root 30u netlink 0t0 1187 KOBJECT_UEVENT
lsof 783 root 31u unix 0t0 496 @laf_ipc
lsof 783 root 32u 0000 0,8 0t0 13583 anon_inode:[eventpoll]
lsof 783 root 34r CHR 13,65 0t0 15640 /dev/input/event1
lsof 783 root 36r CHR 13,64 0t0 15639 /dev/input/event0
lsof 783 root 37r CHR 13,66 0t0 15517 /dev/input/event2
lsof 783 root 38u CHR 10,41 0t0 15545 /dev/laf
lsof 783 root 39u BLK 8,0 0t59285504 2916 /dev/block/sda
lsof 783 root 40u BLK 8,0 0t57516032 2916 /dev/block/sda
lsof 783 root 41u BLK 8,0 0t60391424 2916 /dev/block/sda
lsof 783 root 42u BLK 8,0 0t0 2916 /dev/block/sda

Kindly please help me out here I don't want to brick my phone

---------- Post added at 09:20 PM ---------- Previous post was at 08:53 PM ----------

HERE is My whole terminal LOG

what is the issue sha256sum is not match but when repeat the process from ./partitions.py --restoremisc twrp-3.2.1-0-h870.img lafbak the sha256sum of twrptest.img is changed but it doesn't match

[android@fwul lglaf]$ [COLOR="DarkOrange"]./partitions.py --restoremisc twrp-3.2.1-0-h870.img lafbak[/COLOR]
Traceback (most recent call last):
File "./partitions.py", line 66, in laf_open_disk
yield fd_num
File "./partitions.py", line 448, in main
write_misc_partition(comm, disk_fd, args.restoremisc, part_offset, part_size, False)
File "./partitions.py", line 335, in write_misc_partition
laf_ioct(comm, fd_num, 0x1261)
File "./partitions.py", line 115, in laf_ioct
comm.call(ioct_cmd)
File "/home/android/lglaf/lglaf.py", line 260, in call
header = self.read(0x20)
File "/home/android/lglaf/lglaf.py", line 240, in read
buff = self._read(need, timeout=timeout)
File "/home/android/lglaf/lglaf.py", line 359, in _read
array = self.usbdev.read(self.ep_in, 2**14, timeout=timeout)
File "/usr/lib/python3.6/site-packages/usb/core.py", line 988, in read
self.__get_timeout(timeout))
File "/usr/lib/python3.6/site-packages/usb/backend/libusb1.py", line 833, in bulk_read
timeout)
File "/usr/lib/python3.6/site-packages/usb/backend/libusb1.py", line 936, in __read
_check(retval)
File "/usr/lib/python3.6/site-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 32] Pipe error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./partitions.py", line 459, in <module>
main()
File "./partitions.py", line 455, in main
wipe_partition(comm, disk_fd, part_offset, part_size, True)
File "/usr/lib/python3.6/contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "./partitions.py", line 70, in laf_open_disk
lglaf.challenge_response(comm, 4)
File "/home/android/lglaf/lglaf.py", line 373, in challenge_response
kilo_header, kilo_response = comm.call(request_kilo)
File "/home/android/lglaf/lglaf.py", line 271, in call
raise RuntimeError("Unexpected response: %r" % header)
RuntimeError: Unexpected response: b'IOCT/\x00\x00\x00a\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x88\xdd\x00\x00\xb6\xb0\xbc\xab'
[android@fwul lglaf]$ [COLOR="darkorange"]./partitions.py --dump twrptest.img lafbak[/COLOR]
[ 29 % ] Traceback (most recent call last):
File "./partitions.py", line 66, in laf_open_disk
yield fd_num
File "./partitions.py", line 438, in main
dump_partition(comm, disk_fd, args.dump, part_offset, part_size, False)
File "./partitions.py", line 193, in dump_partition
data = laf_read(comm, disk_fd, read_offset // BLOCK_SIZE, chunksize)
File "./partitions.py", line 76, in laf_read
header, response = comm.call(read_cmd)
File "/home/android/lglaf/lglaf.py", line 260, in call
header = self.read(0x20)
File "/home/android/lglaf/lglaf.py", line 240, in read
buff = self._read(need, timeout=timeout)
File "/home/android/lglaf/lglaf.py", line 359, in _read
array = self.usbdev.read(self.ep_in, 2**14, timeout=timeout)
File "/usr/lib/python3.6/site-packages/usb/core.py", line 988, in read
self.__get_timeout(timeout))
File "/usr/lib/python3.6/site-packages/usb/backend/libusb1.py", line 833, in bulk_read
timeout)
File "/usr/lib/python3.6/site-packages/usb/backend/libusb1.py", line 936, in __read
_check(retval)
File "/usr/lib/python3.6/site-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 32] Pipe error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./partitions.py", line 459, in <module>
main()
File "./partitions.py", line 455, in main
wipe_partition(comm, disk_fd, part_offset, part_size, True)
File "/usr/lib/python3.6/contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "./partitions.py", line 70, in laf_open_disk
lglaf.challenge_response(comm, 4)
File "/home/android/lglaf/lglaf.py", line 373, in challenge_response
kilo_header, kilo_response = comm.call(request_kilo)
File "/home/android/lglaf/lglaf.py", line 271, in call
raise RuntimeError("Unexpected response: %r" % header)
RuntimeError: Unexpected response: b'READ0\x00\x00\x00j>\x00\x00\x000\x00\x00\x00\x00\x00\x00\x000\x00\x00WA\x00\x00\xad\xba\xbe\xbb'
[android@fwul lglaf]$ [COLOR="darkorange"]dd if=twrptest.img of=twrptestout.img bs=1024 count=21420[/COLOR]
14736+0 records in
14736+0 records out
15089664 bytes (15 MB, 14 MiB) copied, 0.099699 s, 151 MB/s
[android@fwul lglaf]$[COLOR="darkorange"] sha256sum twrptestout.img
804683af5344bdc3a5431fcb29b342ca33867b4469afbcbda015615e4adac3de twrptestout.img[/COLOR]
[android@fwul lglaf]$ [COLOR="darkorange"]sha256sum twrp-3.2.1-0-h870.img
b41cc9e03c4738b2360f9a9a47c4e6f3a7b9fb72eac2a9ef01b4df1e97a0b158 twrp-3.2.1-0-h870.img[/COLOR]
[android@fwul lglaf]$