[Android Software/Hacking General [Developers Only]] ledzepman71:
First of all, this is an awesome tool. I am very intrigued as I have bricked my lgk7 (lgk330). I am running into some trouble with it however.

lets get the preliminaries out of the way:

background:

bootloader is unlocked. neither adb nor fastboot see the device.

I did a full wipe from TWRP, even the system partition, (forgot to restore my backup ) and rebooted . :eek: In it's current form, doing this button combination to get back into TWRP on my K7 only runs TWRP "open recovery script" which reboots to the bootloader and no further.

I am using Ubuntu 16.04. Per your readme.md, I have installed Python 2.7.11 as well as 3.5.1+, PyUSB v1.0.0 (from source), and libusb-1.0-0

I added 42-usb-lglaf.rules to my udev rules.d

I have next to no skill with python. :(

verbose lsusb while in download mode, you'll notice that idProduct is "633e" just like the G3.

Bus 001 Device 011: ID 1004:633e LG Electronics, Inc. G2 Android Phone [MTP mode]
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1004 LG Electronics, Inc.
idProduct 0x633e G2 Android Phone [MTP mode]
bcdDevice 3.10
iManufacturer 1 LG Electronics Inc.
iProduct 2 LGE Android Phone
iSerial 3 LGK330b3b3462
bNumConfigurations 2
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 39
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 6 Imaging
bInterfaceSubClass 1 Still Image Capture
bInterfaceProtocol 1 Picture Transfer Protocol (PIMA 15470)
iInterface 5 MTP
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x001c 1x 28 bytes
bInterval 6
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 128
bNumInterfaces 4
bConfigurationValue 2
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 6 Imaging
bInterfaceSubClass 1 Still Image Capture
bInterfaceProtocol 1 Picture Transfer Protocol (PIMA 15470)
iInterface 6 MTP
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x001c 1x 28 bytes
bInterval 6
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 1
bInterfaceCount 2
bFunctionClass 2 Communications
bFunctionSubClass 2 Abstract (modem)
bFunctionProtocol 1 AT-commands (v.25ter)
iFunction 9 CDC Serial
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 7 CDC Abstract Control Model (ACM)
CDC Header:
bcdCDC 1.10
CDC Call Management:
bmCapabilities 0x00
bDataInterface 2
CDC ACM:
bmCapabilities 0x02
line coding and serial state
CDC Union:
bMasterInterface 1
bSlaveInterface 2
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 9
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 8 CDC ACM Data
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 2
Device Status: 0x0000
(Bus Powered)

lglfa does communicate with the phone. For example if I run

/opt/lglaf$ ./lglaf.py
LGLAF.py by Peter Wu (https://lekensteyn.nl/lglaf)
Type a shell command to execute or "exit" to leave.
# !INFO
LGLAF.py: WARNING: Command failed with error code 0x80000001
#ls
LGLAF.py: WARNING: Command failed with error code 0x8000010a
#!EXEC ls\0
LGLAF.py: WARNING: Header field requires a DWORD, got str 'ls\x00'
# dd if=/dev/zero of=/dev/null bs=5129 count=1
LGLAF.py: WARNING: Command failed with error code 0x8000010a

!INFO chances the status box on the phone to

USER S0.0 AS0.0 S
S U LG-K330 05.1.1 Hrev_10
K33010f

However, if i run something like extract-partitions.py

/opt/lglaf$ ./extract-partitions.py
Traceback (most recent call last):
File "./extract-partitions.py", line 63, in <module>
main()
File "./extract-partitions.py", line 58, in main
with partitions.laf_open_disk(comm) as disk_fd:
File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/opt/lglaf/partitions.py", line 73, in laf_open_disk
open_header = comm.call(open_cmd)[0]
File "/opt/lglaf/lglaf.py", line 176, in call
raise RuntimeError('Command failed with error code %#x' % errCode)
RuntimeError: Command failed with error code 0x8000010a

as a last note, here is my !INFO GPRO if it helps

download cable = 'USER'
battery level = 100
download type = ' '
download speed = 0
usb version = 'UHS'
hardware revision = 'rev_10'
download sw version = ' '
device sw version = 'K33010f'
secure device = 'S'
laf sw version = '1.2'
device factory version = 'LGK330AT-01-V10f-310-260-JAN-06-2016-ARB00+0'
device factory out version = 'LGK330AT-00-V10f-TMO-US-JAN-06-2016-ARB00+0'
pid = 'CY17S160129000815'
imei = 'xxxxxxxxxxxxxxxx'
model name = 'LG-K330'
device build type = 'U'
chipset platform = 'msm8909'
target_operator = 'TMO'
target_country = 'US'
ap_factory_reset_status = 6
cp_factory_reset_status = 0
isDownloadNotFinish = 0
qem = 0
cupss swfv = 'FFFFFFFFFFF-FFFFFFFFFFF-FFFFFFFFFFF-FFFFFFFFFFF-F'
is one binary dual plan = 0
memory size = 15269888
memory_id = 'H8G1e\x05\n'
bootloader_ver = 'MiniOS 3.0'

Any input at all would be greatly appreciated.