bkerler / mtkclient

MTK reverse engineering and flash tool
GNU General Public License v3.0
2.67k stars 525 forks source link

USB ERROR #15

Closed Junnsa closed 3 years ago

Junnsa commented 3 years ago

Is there any problem when this application is run on 32 bit?

USBError(5, 'Input/Output Error') <class 'usb.core.USBError'> 5

bkerler commented 3 years ago

Yes. It won't work on windows 32bit due to libusb1 issues.

Junnsa commented 3 years ago

PLTools - Kamakiri / DA Run Kamakiri - Trying kamakiri2.. Kamakiri - Done sending payload... PLTools - Successfully sent payload: C:\Users\Desktop\mtkclient\mtkclient\config..\payloads\mt6768_payload.bin Port - Device detected :) Main - Device is protected. USBError(5, 'Input/Output Error') <class 'usb.core.USBError'> 5

Doesn't work on 64 bit Not Working MT6768 Devices.

Its working MT6737M

Junnsa commented 3 years ago

Main - Device is in BROM mode. Trying to dump preloader. Successfully extracted preloader for this device to: C:\Users\Desktop\mtkclient\mtkclient\config..\Loader\Preloader\preloader_ne1.bin DALegacy - Uploading da... DALegacy - Uploading stage 1... Preloader - Jumping to 0x200000 DALegacy - DRAM config needed for : 514e011336394a32350510528971c6a9 DALegacy - Uploading stage 2... DALegacy - Successfully uploaded stage 2 DALegacy - m_emmc_ret: 0x0 DALegacy - m_emmc_boot1_size: 0x400000 DALegacy - m_emmc_boot2_size: 0x400000 DALegacy - m_emmc_rpmb_size: 0x400000 DALegacy - m_emmc_gp_size: 0x0 DALegacy - m_emmc_ua_size: 0x3ab400000 DALegacy - m_emmc_cid: 0x514e011336394a32 DALegacy - m_emmc_fwver: 0x10 DALegacy - object_size: 0x1c DALegacy - m_sdmmc_info: 0xc4f DALegacy - m_sdmmc_ua_size: 0x0 DALegacy - m_sdmmc_cid: 0x0 DALegacy - m_int_sram_ret: 0x0 DALegacy - m_int_sram_size: 0x20000 DALegacy - m_ext_ram_ret: 0x0 DALegacy - m_ext_ram_type: 0x2 DALegacy - m_ext_ram_chip_select: 0x0 DALegacy - m_ext_ram_size: 0x80000000 DALegacy - randomid: 0x4760ca9677539ac2 DALegacy - object_size: 0x26 Progress: |██████████████████████████████████████████████████| 100.0% Completetor 30720 of 32768) 0.62 MB/s Progress: |██████████████████████████████████████████████████| 100.0% Complete Dumped sector 60416 with sector count 32768 as boot.bin.

rebainoor commented 3 years ago

can try with this mt6768_payload.bin by replacing mt6768_payload.bin existing in mtkclient\payloads folder

Junnsa commented 3 years ago

Doesn't work and MT6785t didn't work either

bkerler commented 3 years ago

I will have a look for the 6768 and 6785 ones.

bkerler commented 3 years ago

Can you provide the log using --debugmode in the logs subdirectory ?

bkerler commented 3 years ago

I've had a look at the payloads, they are fine. I guess you are using usbdk under windows, if so, make sure that you've installed a proper com port for all states (the com port will change from preloader to brom), as usbdk will fail otherwise. If unsure, I strongly recommend to use linux instead.

bkerler commented 3 years ago

Another alternative would be to not use usbdk, but install winusb driver using zadig instead for more stability.

Junnsa commented 3 years ago

here you go dude debug.txt

Junnsa commented 3 years ago

Another problem is when I connect in Pl mode the app freezes and I can't manually select the Da installer.

Junnsa commented 3 years ago

I have MT6768 and MT6737M devices in my hand, please write for any test, my friend, I will try.

trancullong commented 3 years ago

PLTools - Kamakiri / DA Chạy Kamakiri - Đang thử kamakiri2 .. Kamakiri - Đã gửi xong tải trọng ... PLTools - Đã gửi tải trọng thành công: C: \ Users \ Desktop \ mtkclient \ mtkclient \ config .. \ payloads \ mt6768_payload.bin Cổng - Đã phát hiện thiết bị :) Chính - Thiết bị được bảo vệ. Lỗi USBError (5, 'Lỗi đầu vào / đầu ra') <class 'usb.core.USBError'> 5

Không hoạt động trên các thiết bị MT6768 64 bit Không hoạt động.

MT6737M đang hoạt động của nó

Yes i try MT6768 Not Work But MT6765 MT6771 Work

bkerler commented 3 years ago

Please retry with latest commit dabf620

bkerler commented 3 years ago

@marat2509 It looks like the exploit itself works fine on your device, as the payload replies with 0xa1a2a3a4 as expected. You don't need to run payload AND r boot. The read command in my tool does call payload automatically if it's needed.

bkerler commented 3 years ago

Ah .... sorry, found another issue

bkerler commented 3 years ago

Please try again with commit a0585b8820d840f10f7a928093c7d0fc56e3a9ad

Junnsa commented 3 years ago

MT6768 and 6785T working nice!!!

ivanjx commented 2 years ago

Another alternative would be to not use usbdk, but install winusb driver using zadig instead for more stability.

@bkerler is there a guide to use winusb instead of usbdk on windows? thanks.

bkerler commented 2 years ago

Winusb cannot be used as winusb cannot use non-standard usb requests. For kamakiri, this is needed.

TrailovicLuka commented 1 year ago

USBError(5, 'Input/Output Error') - Same problem on mt6893. Any solution for this?

bphd commented 1 year ago

Main - Device is protected.

Same, I hope it doesn't block the performed command

Maintainer should make a FAQ in the help section of the program and in the README to list common errors and say what to do