bkerler / edl

Inofficial Qualcomm Firehose / Sahara / Streaming / Diag Tools :)
GNU General Public License v3.0
1.6k stars 376 forks source link

Nokia 6300 4G bricked after first attempt #88

Closed jwktje closed 3 years ago

jwktje commented 3 years ago

I tried flashing the recovery and it failed. And now the device is broken. 5 minutes after I got it out of the box. I was following this guide..

I knew I was taking this risk obviously, but now what? I would really appreciate any help! All I wanted was to get rid of Facebook and Whatsapp and other apps I don't need.


jwktje@Jan-Willems-MBP edl % sudo python3 edl.py w recovery /Users/jwktje/Downloads/recovery-8110.img --loader=/Users/jwktje/Downloads/8k.mbn
Qualcomm Sahara / Firehose Client V3.3 (c) B.Kerler 2018-2021.
main - Using loader /Users/jwktje/Downloads/8k.mbn ...
main - Waiting for the device
main - Device detected :)
main - Mode detected: sahara
Device is in EDL mode .. continuing.
sahara - 
------------------------
HWID:              0x009600e100420029 (MSM_ID:0x009600e1,OEM_ID:0x0042,MODEL_ID:0x0029)
CPU detected:      "MSM8909"
PK_HASH:           0x952bed90f6e9eac6e28da21916da4410e3dfebd81c5523ad712bb226db0b5df3
Serial:            0x13741678

sahara - Uploading loader /Users/jwktje/Downloads/8k.mbn ...
Successfully uploaded programmer :)
firehose
firehose - [LIB]: Nop failed.
firehose - No supported functions detected, configuring qc generic commands
firehose - 
firehose_client - Target detected: MSM8909
firehose_client - Based on the chipset, we assume eMMC as default memory type...
firehose - TargetName=
firehose - MemoryName=eMMC
firehose - Version=
firehose_client - Supported functions:
-----------------
configure,program,firmwarewrite,patch,setbootablestoragedrive,ufs,emmc,power,benchmark,read,getstorageinfo,getcrc16digest,getsha256digest,erase,peek,poke,nop,xml
firehose - 
Writing to physical partition 0, sector 2488416, sectors 32411
Progress: |██████████████████████████████████████████████████| 100.0% Complete (Sector 32395)
firehose
firehose - [LIB]: Error:{}
Error writing /Users/jwktje/Downloads/recovery-8110.img to sector 2488416.
zzz
bkerler commented 3 years ago

Actually, no worries. Did you first backup your device ? The command itself looks good to me, so normally there shouldn't be an issue. What do you mean by "broken" ? Is it black ? Does it reboot all the time ? If it's just black, then press and keep pressed vol up and power until it reboots.

jwktje commented 3 years ago

Hey @bkerler Actually, good news. I was mostly just being an idiot. What failed was the flashing of the recovery, but it didn't actually brick. I found out that I was able to boot normally after power cycling a couple of times. I did a regular factory reset from the stock OS when that happened and somehow this also restored the stock recovery. Meaning I was able to boot to recovery by holding asterisk and power-on.

So pretty much the phone is back to normal. But I'm still not sure how to proceed now. My only goal is to be able to remove stuff that is preinstalled.

And in my attempt at this, I got the error listed in the original issue. So; Error writing /Users/jwktje/Downloads/recovery-8110.img to sector 2488416.

How can I go about fixing this? Am I using the wrong recovery IMG or should the 8110 be fine for the Nokia 6300 4G?

I'm able to get an ADB shell but not as root. So how do I precede from here? I thought the initial steps I was following were needed to root the phone to get a root shell which would allow me to change stuff. Or is this assumption wrong to begin with?

jwktje commented 3 years ago

I really wanna be able to make a distraction free phone. So I'm even willing to put up a bug bounty for this of $50. For anyone that can help me remove the unwanted apps on this phone.

bkerler commented 3 years ago

actually, you can use the pm manager to disable apps. of course the 8110 recovery WON'T work on the 6300, as it's a different device. For rooting the device, first unlock the device and then use for example magisk to modify the recovery/boot.

jwktje commented 3 years ago

I tried listing apps with PM over ADB but got this;

jwktje@Jan-Willems-MBP ~ % adb shell pm list
/system/bin/pm[6]: app_process: not found

Does that mean I would need to root it first?

jwktje commented 3 years ago

Using tag 3.1 from the repo I get a different error by the way;

jwktje@Jan-Willems-MBP edl % python3 edl.py w recovery /Users/jwktje/Downloads/recovery-8110.img --loader=/Users/jwktje/Downloads/8k.mbn
Qualcomm Sahara / Firehose Client V3.1 (c) B.Kerler 2018-2021.
Library.utils - Using loader /Users/jwktje/Downloads/8k.mbn ...
Library.utils - Waiting for the device
Library.utils - Device detected :)
Library.utils - Mode detected: sahara
Device is in EDL mode .. continuing.
Library.sahara - 
------------------------
HWID:              0x009600e100420029 (MSM_ID:0x009600e1,OEM_ID:0x0042,MODEL_ID:0x0029)
PK_HASH:           0x952bed90f6e9eac6e28da21916da4410e3dfebd81c5523ad712bb226db0b5df3
Serial:            0x13741678

Library.sahara - Using loader /Users/jwktje/Downloads/8k.mbn ...
Successfully uploaded programmer :)
Library.utils - Nop succeeded.
Library.utils - No supported functions detected, configuring qc generic commands
Library.utils - 
Library.utils - TargetName=MSM8909
Library.utils - MemoryName=eMMC
Library.utils - Version=1
Library.utils - Supported functions:
-----------------
configure,program,firmwarewrite,patch,setbootablestoragedrive,ufs,emmc,power,benchmark,read,getstorageinfo,getcrc16digest,getsha256digest,erase,peek,poke,nop,xml
Library.utils - Target detected: MSM8909
Library.utils - 
Writing to physical partition 0, sector 2488416, sectors 32411
Progress: |██████████████████████████████████████████████████| 99.0% CompleteTraceback (most recent call last):
  File "/Users/jwktje/Downloads/edl/edl.py", line 372, in <module>
    main()
  File "/Users/jwktje/Downloads/edl/edl.py", line 355, in main
    fh.handle_firehose(cmd,options)
  File "/Users/jwktje/Downloads/edl/Library/firehose_client.py", line 520, in handle_firehose
    if self.firehose.cmd_program(lun, partition.sector, filename):
  File "/Users/jwktje/Downloads/edl/Library/firehose.py", line 308, in cmd_program
    self.cdc.write(wdata, wlen)
  File "/Users/jwktje/Downloads/edl/Library/usblib.py", line 224, in write
    self.device.write(self.EP_OUT, b'')
  File "/usr/local/lib/python3.9/site-packages/usb/core.py", line 979, in write
    return fn(
  File "/usr/local/lib/python3.9/site-packages/usb/backend/libusb1.py", line 837, in bulk_write
    return self.__write(self.lib.libusb_bulk_transfer,
  File "/usr/local/lib/python3.9/site-packages/usb/backend/libusb1.py", line 938, in __write
    _check(retval)
  File "/usr/local/lib/python3.9/site-packages/usb/backend/libusb1.py", line 602, in _check
    raise USBTimeoutError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBTimeoutError: [Errno 60] Operation timed out
jwktje commented 3 years ago

Just tried it inside a Ubuntu VM instead of OSX and got the same result sadly :(

jwktje commented 3 years ago

Update. Using tag 3.0 in the VM seems to work!

jwktje commented 3 years ago

Just finished the entire guide successfully by using the 3.0 tag in a VM for the first phase, and finished the rest on OSX. Closing now