sahara icon indicating copy to clipboard operation
sahara copied to clipboard

Getting debug logs in 9091/9008 mode

Open rupansh opened this issue 5 years ago • 3 comments

I have been porting 4.9 for my device which has 8937. The display has been failing for a while. I tried a few fixes which did display a single frame(corrupted or solid color) after which the device went to 9091 mode. My question is that is it possible for me to get logs in this mode. Or do i need to modify the MSM_SERIAL/msm_poweroff driver to force the device to go to 9008 instead of 9091?

My pc's dmesg-

[17763.227376] usb 1-2: new high-speed USB device number 54 using xhci_hcd
[17763.367848] usb 1-2: New USB device found, idVendor=05c6, idProduct=9091, bcdDevice= 0.00
[17763.367854] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[17763.367858] usb 1-2: Product: QHSUSB__BULK
[17763.367862] usb 1-2: Manufacturer: Qualcomm CDMA Technologies MSM

rupansh avatar Jun 21 '19 18:06 rupansh

also i went to 9008 through fastboot and used this firehose programmer- https://github.com/openpst/assets/blob/master/programmers/Unidentified/prog_emmc_firehose_8937_ddr_xiaomi.mbn

The device accepted the image but it wasn't responding to my commands. Does that mean i need to try another image?

Found 5 devices
/dev/ttyS0 n/a ttyS0
/dev/ttyS1 n/a ttyS1
/dev/ttyS2 n/a ttyS2
/dev/ttyS3 n/a ttyS3
/dev/ttyUSB0 USB VID:PID=05c6:9008  Qualcomm CDMA Technologies MSM QHSUSB__BULK 
Connected to /dev/ttyUSB0
Reading hello handshake
Device In Mode: Image Transfer Pending
Version: 2
Minimum Version: 1
Max Command Packet Size: 1024
Device requesting 52 bytes of image 0x0D - EHOSTDL
Sending image /home/rupansh/Downloads/prog_emmc_firehose_8937_ddr_xiaomi.mbn
Image /home/rupansh/Downloads/prog_emmc_firehose_8937_ddr_xiaomi.mbn successfully sent.
If there are no more images requested, you should send the done command.
Devices responded with an error: Invalid Command
Devices responded with an error: Invalid Command
Requesting mode switch from Image Transfer Pending (0x00) to Memory Debug (0x02)
Devices responded with an error: Invalid Command
Sending Done Command
Devices responded with an error: Unknown

rupansh avatar Jun 21 '19 18:06 rupansh

tried xiaomi1 image -

Found 5 devices
/dev/ttyS0 n/a ttyS0
/dev/ttyS1 n/a ttyS1
/dev/ttyS2 n/a ttyS2
/dev/ttyS3 n/a ttyS3
/dev/ttyUSB0 USB VID:PID=05c6:9008  Qualcomm CDMA Technologies MSM QHSUSB__BULK 
Connected to /dev/ttyUSB0
Reading hello handshake
Device In Mode: Image Transfer Pending
Version: 2
Minimum Version: 1
Max Command Packet Size: 1024
Device requesting 52 bytes of image 0x0D - EHOSTDL
Sending image /home/rupansh/Downloads/prog_emmc_firehose_8937_ddr_xiaomi1.mbn
Image /home/rupansh/Downloads/prog_emmc_firehose_8937_ddr_xiaomi1.mbn successfully sent.
If there are no more images requested, you should send the done command.
Sending Done Command
Done Command Successfully Sent
Devices responded with an error: Unknown

xiaomi2 image-

No response from device

wing(I guessed wingtech and redmi 3s is technically wingtech) image-

No response from device

xiaomi3- No response from device

Pretty much the device seems to only accept xiaomi and xiaomi1 firehose programmers. but I am unable to get output from the commands

rupansh avatar Jun 21 '19 18:06 rupansh

quick heads up! The device seems to go to 900e sometimes as well(if anything's possible in that mode lol)

I rebooted to fastboot and invoked fastboot oem edl

After which I tried what you mentioned in #6 but I couldn't get debug logs.

Attempting to switch device to mode: Command Mode
Device is awaiting client commands
========
Dumping Data For Command: 0x06 - Read Debug Data - 256 Bytes
========

All other commands(except NOP) gave me the expected output

rupansh avatar Jun 21 '19 18:06 rupansh