Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange error thrown in opensuse, whereas live cd works ok. #1272

Open
zhubr opened this issue Nov 3, 2024 · 1 comment
Open

Strange error thrown in opensuse, whereas live cd works ok. #1272

zhubr opened this issue Nov 3, 2024 · 1 comment

Comments

@zhubr
Copy link

zhubr commented Nov 3, 2024

Hi! First of, tons of thanks for this excellent work!

I'm using mtkclient for some noname mtk-based phone. It does operate fine from live cd image 
(at least for reading and writing partitions, which is fully sufficient for me). However, I'd rather like 
to use it in my regular OS of choice instead (opensuse). (Using the live image routinely is a bit annoying 
because first it defaults to german keyboard layout which makes old plain console useless, and then it 
somewhy goes to suspend and shuts off display and usb connectors in just a few minutes on my laptop 
despite connected to AC mains, and then it does not have midnight commander installed so lots of extra 
keystrokes are required etc etc).
Now in opensuse I have python 3.11 installed, all required libraries also installed, I've prepared a kernel 
with patched devio.c, and done "pip3.11 install .... -r requirements.txt", copied udev rules, added dialout 
(suse does not have plugdev), all apparently successfully. But when I connect my phone I only get this:
...........
DeviceClass
DeviceClass - [LIB]: Couldn't get device configuration.
DeviceClass
DeviceClass - [LIB]: Couldn't get device configuration.
DeviceClass
DeviceClass - [LIB]: Couldn't get device configuration.
DeviceClass
DeviceClass - [LIB]: Couldn't get device configuration.
------------------------------------------------------------------------------
The message is not too verbose so I'm a bit lost.

Whereas, after a reboot to the live cd image all looks fine:
....Port - Device detected :)
Preloader - 	CPU:			MT6739/MT6731/MT8765()
Preloader - 	HW version:		0x0
Preloader - 	WDT:			0x10007000
Preloader - 	Uart:			0x11002000
Preloader - 	Brom payload addr:	0x100a00
Preloader - 	DA payload addr:	0x201000
Preloader - 	CQ_DMA addr:		0x10212000
Preloader - 	Var1:			0xb4
Preloader - Disabling Watchdog...
Preloader - HW code:			0x699
Preloader - Target config:		0x0
Preloader - 	SBC enabled:		False
Preloader - 	SLA enabled:		False
Preloader - 	DAA enabled:		False
Preloader - 	SWJTAG enabled:		False
Preloader - 	EPP_PARAM at 0x600 after EMMC_BOOT/SDMMC_BOOT:	False
Preloader - 	Root cert required:	False
Preloader - 	Mem read auth:		False
Preloader - 	Mem write auth:		False
Preloader - 	Cmd 0xC8 blocked:	False
Preloader - Get Target info
Preloader - 	HW subcode:		0x8a00
Preloader - 	HW Ver:			0xcb00
Preloader - 	SW Ver:			0x2
Preloader - ME_ID:			EC6E2782BEAAD108912E731FBD314910
Preloader - SOC_ID:			1639828B040C52AF37F84E535345C0B22CE3FC710050D73A985E26091D45BF62
DaHandler - Device is unprotected.
DaHandler - Device is in Preloader-Mode.
DAXFlash - Uploading xflash stage 1 from MTK_DA_V5.bin
XFlashExt - Patching da1 ...
Mtk - Patched "Patched loader msg" in preloader
Mtk - Patched "hash_check" in preloader
Mtk - Patched "Patched loader msg" in preloader
Mtk - Patched "get_vfy_policy" in preloader
XFlashExt - Patching da2 ...
XFlashExt - Security check patched
XFlashExt - DA version anti-rollback patched
XFlashExt - SBC patched to be disabled
XFlashExt - Register read/write not allowed patched
DAXFlash - Successfully uploaded stage 1, jumping ..
Preloader - Jumping to 0x200000
Preloader - Jumping to 0x200000: ok.
DAXFlash - Successfully received DA sync
DAXFlash - Uploading stage 2...
DAXFlash - Upload data was accepted. Jumping to stage 2...
DAXFlash - Boot to succeeded.
DAXFlash - Successfully uploaded stage 2
DAXFlash - DA SLA is disabled
DAXFlash - EMMC FWVer:      0x0
DAXFlash - EMMC ID:         RX1BMB
DAXFlash - EMMC CID:        150100525831424d420682b8dae514ab
DAXFlash - EMMC Boot1 Size: 0x400000
DAXFlash - EMMC Boot2 Size: 0x400000
DAXFlash - EMMC GP1 Size:   0x0
DAXFlash - EMMC GP2 Size:   0x0
DAXFlash - EMMC GP3 Size:   0x0
DAXFlash - EMMC GP4 Size:   0x0
DAXFlash - EMMC RPMB Size:  0x400000
DAXFlash - EMMC USER Size:  0x747c00000
DAXFlash - HW-CODE         : 0x699
DAXFlash - HWSUB-CODE      : 0x8A00
DAXFlash - HW-VERSION      : 0xCB00
DAXFlash - SW-VERSION      : 0x2
DAXFlash - CHIP-EVOLUTION  : 0x0
DAXFlash - DA-VERSION      : 1.0
DAXFlash - Extensions were accepted. Jumping to extensions...
DAXFlash - Boot to succeeded.
DAXFlash - DA Extensions successfully added
DaHandler - Requesting available partitions ....
DaHandler - Dumping partition "vendor"
Progress: |██████████| 100.0% Read (0xE4000/0xE4000, ) 18.89 MB/s62 MB/s
DaHandler - Dumped sector 688128 with sector count 933888 as /tmp/vendor.img.
------------------------------------------------------------------------------
What could be the issue in my regular environment?
@Massatrio16
Copy link

Hi! First of, tons of thanks for this excellent work!

I'm using mtkclient for some noname mtk-based phone. It does operate fine from live cd image 
(at least for reading and writing partitions, which is fully sufficient for me). However, I'd rather like 
to use it in my regular OS of choice instead (opensuse). (Using the live image routinely is a bit annoying 
because first it defaults to german keyboard layout which makes old plain console useless, and then it 
somewhy goes to suspend and shuts off display and usb connectors in just a few minutes on my laptop 
despite connected to AC mains, and then it does not have midnight commander installed so lots of extra 
keystrokes are required etc etc).
Now in opensuse I have python 3.11 installed, all required libraries also installed, I've prepared a kernel 
with patched devio.c, and done "pip3.11 install .... -r requirements.txt", copied udev rules, added dialout 
(suse does not have plugdev), all apparently successfully. But when I connect my phone I only get this:
...........
DeviceClass
DeviceClass - [LIB]: Couldn't get device configuration.
DeviceClass
DeviceClass - [LIB]: Couldn't get device configuration.
DeviceClass
DeviceClass - [LIB]: Couldn't get device configuration.
DeviceClass
DeviceClass - [LIB]: Couldn't get device configuration.
------------------------------------------------------------------------------
The message is not too verbose so I'm a bit lost.

Whereas, after a reboot to the live cd image all looks fine:
....Port - Device detected :)
Preloader - 	CPU:			MT6739/MT6731/MT8765()
Preloader - 	HW version:		0x0
Preloader - 	WDT:			0x10007000
Preloader - 	Uart:			0x11002000
Preloader - 	Brom payload addr:	0x100a00
Preloader - 	DA payload addr:	0x201000
Preloader - 	CQ_DMA addr:		0x10212000
Preloader - 	Var1:			0xb4
Preloader - Disabling Watchdog...
Preloader - HW code:			0x699
Preloader - Target config:		0x0
Preloader - 	SBC enabled:		False
Preloader - 	SLA enabled:		False
Preloader - 	DAA enabled:		False
Preloader - 	SWJTAG enabled:		False
Preloader - 	EPP_PARAM at 0x600 after EMMC_BOOT/SDMMC_BOOT:	False
Preloader - 	Root cert required:	False
Preloader - 	Mem read auth:		False
Preloader - 	Mem write auth:		False
Preloader - 	Cmd 0xC8 blocked:	False
Preloader - Get Target info
Preloader - 	HW subcode:		0x8a00
Preloader - 	HW Ver:			0xcb00
Preloader - 	SW Ver:			0x2
Preloader - ME_ID:			EC6E2782BEAAD108912E731FBD314910
Preloader - SOC_ID:			1639828B040C52AF37F84E535345C0B22CE3FC710050D73A985E26091D45BF62
DaHandler - Device is unprotected.
DaHandler - Device is in Preloader-Mode.
DAXFlash - Uploading xflash stage 1 from MTK_DA_V5.bin
XFlashExt - Patching da1 ...
Mtk - Patched "Patched loader msg" in preloader
Mtk - Patched "hash_check" in preloader
Mtk - Patched "Patched loader msg" in preloader
Mtk - Patched "get_vfy_policy" in preloader
XFlashExt - Patching da2 ...
XFlashExt - Security check patched
XFlashExt - DA version anti-rollback patched
XFlashExt - SBC patched to be disabled
XFlashExt - Register read/write not allowed patched
DAXFlash - Successfully uploaded stage 1, jumping ..
Preloader - Jumping to 0x200000
Preloader - Jumping to 0x200000: ok.
DAXFlash - Successfully received DA sync
DAXFlash - Uploading stage 2...
DAXFlash - Upload data was accepted. Jumping to stage 2...
DAXFlash - Boot to succeeded.
DAXFlash - Successfully uploaded stage 2
DAXFlash - DA SLA is disabled
DAXFlash - EMMC FWVer:      0x0
DAXFlash - EMMC ID:         RX1BMB
DAXFlash - EMMC CID:        150100525831424d420682b8dae514ab
DAXFlash - EMMC Boot1 Size: 0x400000
DAXFlash - EMMC Boot2 Size: 0x400000
DAXFlash - EMMC GP1 Size:   0x0
DAXFlash - EMMC GP2 Size:   0x0
DAXFlash - EMMC GP3 Size:   0x0
DAXFlash - EMMC GP4 Size:   0x0
DAXFlash - EMMC RPMB Size:  0x400000
DAXFlash - EMMC USER Size:  0x747c00000
DAXFlash - HW-CODE         : 0x699
DAXFlash - HWSUB-CODE      : 0x8A00
DAXFlash - HW-VERSION      : 0xCB00
DAXFlash - SW-VERSION      : 0x2
DAXFlash - CHIP-EVOLUTION  : 0x0
DAXFlash - DA-VERSION      : 1.0
DAXFlash - Extensions were accepted. Jumping to extensions...
DAXFlash - Boot to succeeded.
DAXFlash - DA Extensions successfully added
DaHandler - Requesting available partitions ....
DaHandler - Dumping partition "vendor"
Progress: |██████████| 100.0% Read (0xE4000/0xE4000, ) 18.89 MB/s62 MB/s
DaHandler - Dumped sector 688128 with sector count 933888 as /tmp/vendor.img.
------------------------------------------------------------------------------
What could be the issue in my regular environment?

bro how to disable

Preloader - SBC enabled: False
Preloader - SLA enabled: False
Preloader - DAA enabled: False
Preloader - SWJTAG enabled: False
Preloader - EPP_PARAM at 0x600 after EMMC_BOOT/SDMMC_BOOT: False
Preloader - Root cert required: False
Preloader - Mem read auth: False
Preloader - Mem write auth: False
Preloader - Cmd 0xC8 blocked: Fals

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants