[6039] - ***GUIDE*** - How to return the fastboot commands on already upgraded device

Search This thread

petrov.0

Senior Member
Aug 4, 2015
367
275
Your warranty is void. I'm not responsible if your device is hard bricked by using the procedure below. The method described below has been tested on 6039Y, 6039S, 6039H (with the archives for 6039Y) and 6039K (with the 6039S archive) and is confirmed that it works.
What to expect on successful completion:
- you will have access to the fastboot commands (removed by the latest upgrade).
- you should be able to check for OTA updates and to download them, but you will not be able to install them.

What's needed:
-------------------
1. I hate when I must say this ... but ... a Windows PC.
2. QPST version 2.7.422 (you can find it on the net as 2.7 build 422). This is a link to one such version (found through Google). If there are problems with this link please let me know. I will try to find another one (you can do it yourself too).
3. Drivers in order the device to be recognized when is in Download mode. Install Mobile Upgrade Q 4.8.7 the necessary drivers are installed with it. It can be downloaded from here.
4. The files from the archives below. Please use the archive which is especially for your device ... in theory if you use the archive for different device (e.g. the archive for 6039S on 6039Y (with the standard partitions)) you should have a repartitioned device at the end, and only the resize2fs command should be enough to start to utilize the whole memory chip ... but you will loose the possibility to sweat a little bit when do the repartitioning by following the guide for it :p.
- 6039Y (8GB stock partition sizes) (md5sum: 860789bedb63da5c5976c24825c29d47)
- 6039Y (repartitioned by following the repartitioning guide) (md5sum: c2f8ff3cfc683e46fbf5d797103de71b)
- 6039S (md5sum: dfd04067230b5709729c70cac61ffd52)

How to proceed:
--------------------
1. Install all the necessary software.
2. Unpack the downloaded archive for your device.
3. Power off the device. Connect it with the USB cable to the PC. Wait the battery symbol to disappear and hold both volume keys and the power button. You should see a red screen with a warning sign and a scheme. Then hold the volume up button. The display will stay lit but nothing will be shown on it from now on until the end of the procedure.
4. When the device is in Download mode under the windows device manager -> Ports (COM & LPT) you should see Android HS-USB QDLoader 9008 (COMXX)
5. Open the windows explorer and find the installation folder of QPST (mine is under Program Files (x86)\Qualcomm\QPST). From the bin sub-directory start QFIL as administrator.
6. In QFIL the COM port number as seen under the windows device manager should be selected automatically.
7. The rest must be done from QFIL:
- Programmer path: _____ - Click on the Browse button against it and from the extracted archive select prog_emmc_firehose_8916.mbn
- Search Path: _____ - if the path is not selected automatically after the programmer selection click on the Browse button against it and select the folder where the archive has been extracted.
- Load XML - click on it and first select rawprogram0.xml from the archive, then the patch0.xml file.
- Click on the Download button. The process should finish quickly (few seconds ... up to a minute). If everything is OK the phone will be restarted automatically and the fastboot commands will be available again.

(If you feel unsure to proceed or not but your device is already in download mode ... disconnect the USB cable and hold both volume keys and the power button to restart it).
Screenshots from QFIL is possible to be provided later ...
 
Last edited:

Rorshan

Member
Aug 3, 2015
42
3
Alright I guess I'll be the guinea pig here.... Few questions beforehand:
I currently have the 6039Y version without having repartitioned... Using the repartitionned one would directly give me a repartitionned memory? Did I understand that correctly?
Did I dream about you saying that you might have a way to fix hard bricks? Because I might very well brick mine with my usual luck
About the updates... If there were any later OTA updates (I know it's unlikely) would there be a way to apply them still?
 
Last edited:

petrov.0

Senior Member
Aug 4, 2015
367
275
Alright I guess I'll be the guinea pig here.... Few questions beforehand:
I currently have the 6039Y version without having repartitioned... Using the repartitionned one would directly give me a repartitionned memory? Did I understand that correctly?
Did I dream about you saying that you might have a way to fix hard bricks? Because I might very well brick mine with my usual luck
In theory yes, but is untested. Yes, hard bricks should be fixable with these tools and with slightly different files. But as this requires a full copy of the memory chip and for the moment I have such copy only from my device, I can recover only my device (or others which will become the same as mine ... this means radio, languages, apps etc. :) ).
About the updates... If there were any later OTA updates (I know it's unlikely) would there be a way to apply them still?
Yes, but modified
Edit: What do I do here? I guess a missing font file shouldn't bother me, but still I'd like some advice here
No idea ... try with ignore. I didn't have have any problems with mobile upgrade q.
 

Rorshan

Member
Aug 3, 2015
42
3
In theory yes, but is untested. Yes, hard bricks should be fixable with these tools and with slightly different files. But as this requires a full copy of the memory chip and for the moment I have such copy only from my device, I can recover only my device (or others which will become the same as mine ... this means radio, languages, apps etc. :) ).

Yes, but modified

No idea ... try with ignore. I didn't have have any problems with mobile upgrade q.

Untested doesn't sound nice... I guess I'll go with the normal way and worry about the repartition afterwards.
I cancelled the install and reinstalled with no issue
I guess this is it. Either way I'll come here to cry, be it from joy or sadness/anger

---------- Post added at 07:46 PM ---------- Previous post was at 07:26 PM ----------

Well I'm done and my phone resetted just fine... I freaked for a minute when it took a bit longer than usual for my phone to pick up signal.
And......
fastboot -i 0x1bbb devices
48fee072 fastboot

I haven't tried TWRP yet since I don't really know what version I should be using... Any idea @petrov.0 ?
 

petrov.0

Senior Member
Aug 4, 2015
367
275
Untested doesn't sound nice... I guess I'll go with the normal way and worry about the repartition afterwards.
I cancelled the install and reinstalled with no issue
I guess this is it. Either way I'll come here to cry, be it from joy or sadness/anger

---------- Post added at 07:46 PM ---------- Previous post was at 07:26 PM ----------

Well I'm done and my phone resetted just fine... I freaked for a minute when it took a bit longer than usual for my phone to pick up signal.
And......


I haven't tried TWRP yet since I don't really know what version I should be using... Any idea @petrov.0 ?
For normal use (flashing) the latest from 12.09.2015. For the repartitioning boot with the one from the repartitioning thread.
 

Rorshan

Member
Aug 3, 2015
42
3
For normal use (flashing) the latest from 12.09.2015. For the repartitioning boot with the one from the repartitioning thread.

Alright TWRP seems to work fine, I'm doing backups at the moment. Thank you so much! You're such a lifesaver. Quick last question... I think I'm going to root and repartition. Does it matter at all which I do first?
 

petrov.0

Senior Member
Aug 4, 2015
367
275
Alright TWRP seems to work fine, I'm doing backups at the moment. Thank you so much! You're such a lifesaver. Quick last question... I think I'm going to root and repartition. Does it matter at all which I do first?
This question is for the other thread ... but no, it doesn't matter.
 

petrov.0

Senior Member
Aug 4, 2015
367
275
Update

The link and the md5sum in the first post for the repartitioned 6039Y have been updated as one of the files was missing from the archive. Thanks @kkkk2222 for finding the error.
 
Last edited:

famewolf

Senior Member
Jul 14, 2006
5,366
1,370
OnePlus 7 Pro
OnePlus Nord N200 5G
@petrov.0


For those who end up stuck in bootloops(on both 6039's and 6045's) with factory recovery is there a way this method could be used to either 1) flash twrp to the device or 2) force the device into bootloader?

If a user can get to bootloader (and has fastboot) then they could attempt to fix their own issue.
 

petrov.0

Senior Member
Aug 4, 2015
367
275
@petrov.0


For those who end up stuck in bootloops(on both 6039's and 6045's) with factory recovery is there a way this method could be used to either 1) flash twrp to the device or 2) force the device into bootloader?

If a user can get to bootloader (and has fastboot) then they could attempt to fix their own issue.
1. Yes, it should be possible by using the same tools with different files. But if they flash their system image backup this will lead to a big mess ... they will have a partially upgraded device. Probably if they use the fix permissions option or force the reinstall of SuperSU from the recovery this will be the end of the bootloops (these are unconfirmed speculations though). I need the gpt table from the device (6045) to generate the necessary files.
Code:
dd if=/dev/mmcblk0 of=<path to the sd_card>/gpt.bin bs=512 count=34
2. No.
 

DeckerSU

Senior Member
Jan 10, 2014
138
222
www.decker.su
petrov.0, first of all - thx for your great work. I have a theoretical question about QFIL and partition flashing. Is it necessary to flash all of this partitions in rawprogram0.xml:

  • sbl1.mbn
  • rpm.mbn
  • tz.mbn
  • hyp.mbn
  • aboot.mbn
  • gpt_main0.bin
  • gpt_backup0.bin
For working fastboot we need only aboot (emmc_appsboot) from previous firmware version (or i'm wrong?), if we short rawprogram0.xml only for aboot and gpt, like this:
Code:
<?xml version="1.0" ?>
<data>
  <!--NOTE: This is an ** Autogenerated file **-->
  <!--NOTE: Sector size is 512bytes-->
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="aboot.mbn" label="aboot" num_partition_sectors="2048" physical_partition_number="0" size_in_KB="1024.0" sparse="false" start_byte_hex="0xc18c000" start_sector="396384"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="aboot.mbn" label="abootbak" num_partition_sectors="2048" physical_partition_number="0" size_in_KB="1024.0" sparse="false" start_byte_hex="0xc28c000" start_sector="398432"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="gpt_main0.bin" label="PrimaryGPT" num_partition_sectors="34" physical_partition_number="0" size_in_KB="17.0" sparse="false" start_byte_hex="0x0" start_sector="0"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="gpt_backup0.bin" label="BackupGPT" num_partition_sectors="33" physical_partition_number="0" size_in_KB="16.5" sparse="false" start_byte_hex="(512*NUM_DISK_SECTORS)-16896." start_sector="NUM_DISK_SECTORS-33."/>
</data>
Phone doesn't brick after flashing?

p.s. And another one question. Do you know where the testpoint on 6039Y located? After several my experiments (not with your files, i was bricked it by myself ;) i have bricked phone. There is no download mode (9008 com port not appears in my case), only turned on LED on front panel. Any actions with holding both volume buttons and power button doesn't get success, i think in this case testpoint will help. But i don't know where is it. If somebody need - i can attach photo of PCB.
 
Last edited:

famewolf

Senior Member
Jul 14, 2006
5,366
1,370
OnePlus 7 Pro
OnePlus Nord N200 5G
1. Yes, it should be possible by using the same tools with different files. But if they flash their system image backup this will lead to a big mess ... they will have a partially upgraded device. Probably if they use the fix permissions option or force the reinstall of SuperSU from the recovery this will be the end of the bootloops (these are unconfirmed speculations though). I need the gpt table from the device (6045) to generate the necessary files.
Code:
dd if=/dev/mmcblk0 of=<path to the sd_card>/gpt.bin bs=512 count=34
2. No.


Code:
/mmcblk0 of=/storage/sdcard1/gpt.bin bs=512 count=34                          <
dd: /dev/mmcblk0: No such file or directory


Now a cat of /proc/partitions shows 179 0 15267840 mmcblk0 so I have no idea why it says it's not found. [I can confirm none of the mmc* are under /dev. I have a find running to see where it says it is.....ok..for us it's in /dev/block/mmcblk0 ]

Just drop .zip off the end of the name..it's not actually zipped but couldn't upload a .bin.
 

Attachments

  • gpt.bin.zip
    17 KB · Views: 86
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 30
    Your warranty is void. I'm not responsible if your device is hard bricked by using the procedure below. The method described below has been tested on 6039Y, 6039S, 6039H (with the archives for 6039Y) and 6039K (with the 6039S archive) and is confirmed that it works.
    What to expect on successful completion:
    - you will have access to the fastboot commands (removed by the latest upgrade).
    - you should be able to check for OTA updates and to download them, but you will not be able to install them.

    What's needed:
    -------------------
    1. I hate when I must say this ... but ... a Windows PC.
    2. QPST version 2.7.422 (you can find it on the net as 2.7 build 422). This is a link to one such version (found through Google). If there are problems with this link please let me know. I will try to find another one (you can do it yourself too).
    3. Drivers in order the device to be recognized when is in Download mode. Install Mobile Upgrade Q 4.8.7 the necessary drivers are installed with it. It can be downloaded from here.
    4. The files from the archives below. Please use the archive which is especially for your device ... in theory if you use the archive for different device (e.g. the archive for 6039S on 6039Y (with the standard partitions)) you should have a repartitioned device at the end, and only the resize2fs command should be enough to start to utilize the whole memory chip ... but you will loose the possibility to sweat a little bit when do the repartitioning by following the guide for it :p.
    - 6039Y (8GB stock partition sizes) (md5sum: 860789bedb63da5c5976c24825c29d47)
    - 6039Y (repartitioned by following the repartitioning guide) (md5sum: c2f8ff3cfc683e46fbf5d797103de71b)
    - 6039S (md5sum: dfd04067230b5709729c70cac61ffd52)

    How to proceed:
    --------------------
    1. Install all the necessary software.
    2. Unpack the downloaded archive for your device.
    3. Power off the device. Connect it with the USB cable to the PC. Wait the battery symbol to disappear and hold both volume keys and the power button. You should see a red screen with a warning sign and a scheme. Then hold the volume up button. The display will stay lit but nothing will be shown on it from now on until the end of the procedure.
    4. When the device is in Download mode under the windows device manager -> Ports (COM & LPT) you should see Android HS-USB QDLoader 9008 (COMXX)
    5. Open the windows explorer and find the installation folder of QPST (mine is under Program Files (x86)\Qualcomm\QPST). From the bin sub-directory start QFIL as administrator.
    6. In QFIL the COM port number as seen under the windows device manager should be selected automatically.
    7. The rest must be done from QFIL:
    - Programmer path: _____ - Click on the Browse button against it and from the extracted archive select prog_emmc_firehose_8916.mbn
    - Search Path: _____ - if the path is not selected automatically after the programmer selection click on the Browse button against it and select the folder where the archive has been extracted.
    - Load XML - click on it and first select rawprogram0.xml from the archive, then the patch0.xml file.
    - Click on the Download button. The process should finish quickly (few seconds ... up to a minute). If everything is OK the phone will be restarted automatically and the fastboot commands will be available again.

    (If you feel unsure to proceed or not but your device is already in download mode ... disconnect the USB cable and hold both volume keys and the power button to restart it).
    Screenshots from QFIL is possible to be provided later ...
    2
    This is all happening on a 6039S (factory unlocked) upgraded to the latest Alcatel ROM (6.0.1) through Mobile Upgrade Q before any of my hacks happened.

    After investigating some more I conclude (however tentatively ;) ) that the modem has nothing to do with these issues. Instead we can have a bootloader with all the fastboot commands enabled, or an MM-compatible bootloader, but never both. The symptoms for lack of MM compatibility include (but I am not sure whether they are limited to) a mangled bootloader screen and the inability to set up any lock screen security.

    The good news is that we can have TWRP even if the fastboot commands are not available, in a pretty straightforward manner: one can use the recipe in this thread to obtain the MM-incompatible bootloader, use said bootloader to flash TWRP to the recovery partition (and promptly do a full backup of the exisitng ROM for good measure), then restore the MM-compatible bootloader.

    The only trickier step would be the last one (restoring an MM-compatible bootloader). I solved it using DeckerSU's ROM (http://xdaforums.com/idol-3/development/rom-android-6-0-1-marshmallow-t3397546 - the second revision), which turned out to be a pretty horrible ROM for me but does restore a suitable bootloader. I then restored my ROM from the TWRP backup.

    Overall I have a custom recovery and so I am happy. I hope that the above is useful for other people as well.

    Cheers!
    2
    I used the 6039s files for my 6039k and it was successful and I got booted the phone to TWRP
    But I can't do the wiping ! (the major wipe with sliding option)
    It stucks on wiping and nothing happens !
    After a couple of forced restarts, I managed to wipe the phone and installed cm
    But it freaked me out, I thought I lost my phone
    I'm wondering if anyone else has the same issue and how to solve it for next cm installation
    Probably everyone and is not an issue ... the procedure takes time. You must be more patient next time :D.
    2
    Hello! Which file should I use for the 6039K?
    I used the files from the archive for the 6039S. With the files for the 6039S and the QFIL program I successfully re-enabled the fastboot commands of my Idol 3 6039K with stock firmware 5.0.2 build 01006.
    1
    Thanks! I will try it now!

    EDIT:
    It all works :D