Hard bricked Note 5 Pro without system partition

AmeyA

Member
Dec 27, 2016
22
2
0
Pune
Hi,

I accidentally deleted the system partition on the phone using adb. Now I am not able to boot into recovery, or flash recovery, or even flash the fastboot rom, and I am stuck on the fastboot mode.
Can anyone help me flashing system partition, i.e. creating partition table on the phone using fastboot?

Thanks,
Amey
 

SubwayChamp

Senior Member
Aug 6, 2016
2,345
951
113
Hi,

I accidentally deleted the system partition on the phone using adb. Now I am not able to boot into recovery, or flash recovery, or even flash the fastboot rom, and I am stuck on the fastboot mode.
Can anyone help me flashing system partition, i.e. creating partition table on the phone using fastboot?

Thanks,
Amey
Extract the system image from the stock ROM and flash it through fastboot mode.
 

AmeyA

Member
Dec 27, 2016
22
2
0
Pune
How did you delete system partition? Using "fastboot erase system"?
Are you sure your bootloader is locked?
I was updating the partition table to increase the system partition size. During which the phone accidentally turned off and the system partition was gone..! I need to somehow correct the partition table using fastboot.
 

SubwayChamp

Senior Member
Aug 6, 2016
2,345
951
113
I was updating the partition table to increase the system partition size. During which the phone accidentally turned off and the system partition was gone..! I need to somehow correct the partition table using fastboot.
I guess you did take notes from the sizes to have how revert it and the tutorial that you followed also has a method in case you want return back like this https://iwf1.com/how-to-re-partitio...-all-options-included-change-size-fs-type-etc

I'm not sure if at least the boot partition keeps alive, in this case if you could use the Gparted file or either OrangeFox/TWRP has in-built a way to repair it.

Flash the custom recovery on the boot partition using
Code:
fastboot flash boot orangefox.img
and then just reboot, like in the boot is now the recovery your device will reboot to recovery theoretically.
 

AmeyA

Member
Dec 27, 2016
22
2
0
Pune
I guess you did take notes from the sizes to have how revert it and the tutorial that you followed also has a method in case you want return back like this https://iwf1.com/how-to-re-partitio...-all-options-included-change-size-fs-type-etc

I'm not sure if at least the boot partition keeps alive, in this case if you could use the Gparted file or either OrangeFox/TWRP has in-built a way to repair it.

Flash the custom recovery on the boot partition using
Code:
fastboot flash boot orangefox.img
and then just reboot, like in the boot is now the recovery your device will reboot to recovery theoretically.
Hi, thank you very much for your time. However I am not able to boot into TWRP/Orangefox.
Some of the commands I trie, and the results I got are as follows, that may help you understand the issue:

Code:
adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
Code:
fastboot boot twrp-3.4.0-0-whyred.img
Sending 'boot.img' (42452 KB)                      OKAY [  1.065s]
Booting                                            FAILED (remote: 'Failed to load/authenticate boot image: 00000050')
fastboot: error: Command failed
Code:
fastboot getvar all
(bootloader) crc:1
(bootloader) anti:4
(bootloader) token:VQEBIAEQ9Tig3evCCIbvIZd+UDKaiAMGd2h5cmVkAgQi+ltp
(bootloader) hw-revision:10000
(bootloader) unlocked:yes
(bootloader) off-mode-charge:0
(bootloader) charger-screen-enabled:0
(bootloader) battery-soc-ok:yes
(bootloader) battery-voltage:4064
(bootloader) version-baseband:
(bootloader) version-bootloader:
(bootloader) erase-block-size: 0x200
(bootloader) logical-block-size: 0x200
(bootloader) variant:SDM EMMC
(bootloader) partition-type:vendor:raw
(bootloader) partition-size:vendor: 0x8AC00000
(bootloader) partition-type:cache:f2fs
(bootloader) partition-size:cache: 0x11E00000
(bootloader) partition-type:recovery:raw
(bootloader) partition-size:recovery: 0x4000000
(bootloader) partition-type:boot:raw
(bootloader) partition-size:boot: 0x4000000
(bootloader) partition-type:rawdump:raw
(bootloader) partition-size:rawdump: 0x8000000
(bootloader) partition-type:modem:raw
(bootloader) partition-size:modem: 0xC000000
(bootloader) partition-type:logdump:raw
(bootloader) partition-size:logdump: 0x4000000
(bootloader) partition-type:persistbak:raw
(bootloader) partition-size:persistbak: 0x2000000
(bootloader) partition-type:persist:raw
(bootloader) partition-size:persist: 0x2000000
(bootloader) partition-type:splash:raw
(bootloader) partition-size:splash: 0x4000000
(bootloader) partition-type:bk2:raw
(bootloader) partition-size:bk2: 0x2000000
(bootloader) partition-type:mdtp:raw
(bootloader) partition-size:mdtp: 0x2000000
(bootloader) partition-type:bk1:raw
(bootloader) partition-size:bk1: 0x1800000
(bootloader) partition-type:dsp:raw
(bootloader) partition-size:dsp: 0x1000000
(bootloader) partition-type:modemst2:raw
(bootloader) partition-size:modemst2: 0x800000
(bootloader) partition-type:modemst1:raw
(bootloader) partition-size:modemst1: 0x800000
(bootloader) partition-type:fsg:raw
(bootloader) partition-size:fsg: 0x800000
(bootloader) partition-type:logfs:raw
(bootloader) partition-size:logfs: 0x800000
(bootloader) partition-type:devinfo:raw
(bootloader) partition-size:devinfo: 0x800000
(bootloader) partition-type:misc:raw
(bootloader) partition-size:misc: 0x400000
(bootloader) partition-type:xblbak:raw
(bootloader) partition-size:xblbak: 0x380000
(bootloader) partition-type:xbl:raw
(bootloader) partition-size:xbl: 0x380000
(bootloader) partition-type:sti:raw
(bootloader) partition-size:sti: 0x200000
(bootloader) partition-type:bluetooth:raw
(bootloader) partition-size:bluetooth: 0x100000
(bootloader) partition-type:keymasterbak:raw
(bootloader) partition-size:keymasterbak: 0x100000
(bootloader) partition-type:keymaster:raw
(bootloader) partition-size:keymaster: 0x100000
(bootloader) partition-type:mdtpsecappbak:raw
(bootloader) partition-size:mdtpsecappbak: 0x400000
(bootloader) partition-type:mdtpsecapp:raw
(bootloader) partition-size:mdtpsecapp: 0x400000
(bootloader) partition-type:tzbak:raw
(bootloader) partition-size:tzbak: 0x400000
(bootloader) partition-type:tz:raw
(bootloader) partition-size:tz: 0x400000
(bootloader) partition-type:devcfg:raw
(bootloader) partition-size:devcfg: 0x100000
(bootloader) partition-type:devcfgbak:raw
(bootloader) partition-size:devcfgbak: 0x100000
(bootloader) partition-type:toolsfv:raw
(bootloader) partition-size:toolsfv: 0x100000
(bootloader) partition-type:ddr:raw
(bootloader) partition-size:ddr: 0x100000
(bootloader) partition-type:dip:raw
(bootloader) partition-size:dip: 0x100000
(bootloader) partition-type:ablbak:raw
(bootloader) partition-size:ablbak: 0x100000
(bootloader) partition-type:abl:raw
(bootloader) partition-size:abl: 0x100000
(bootloader) partition-type:cmnlib64bak:raw
(bootloader) partition-size:cmnlib64bak: 0x100000
(bootloader) partition-type:cmnlib64:raw
(bootloader) partition-size:cmnlib64: 0x100000
(bootloader) partition-type:cmnlibbak:raw
(bootloader) partition-size:cmnlibbak: 0x100000
(bootloader) partition-type:cmnlib:raw
(bootloader) partition-size:cmnlib: 0x100000
(bootloader) partition-type:pmicbak:raw
(bootloader) partition-size:pmicbak: 0x80000
(bootloader) partition-type:pmic:raw
(bootloader) partition-size:pmic: 0x80000
(bootloader) partition-type:hypbak:raw
(bootloader) partition-size:hypbak: 0x80000
(bootloader) partition-type:hyp:raw
(bootloader) partition-size:hyp: 0x80000
(bootloader) partition-type:rpmbak:raw
(bootloader) partition-size:rpmbak: 0x80000
(bootloader) partition-type:rpm:raw
(bootloader) partition-size:rpm: 0x80000
(bootloader) partition-type:frp:raw
(bootloader) partition-size:frp: 0x80000
(bootloader) partition-type:keystore:raw
(bootloader) partition-size:keystore: 0x80000
(bootloader) partition-type:msadp:raw
(bootloader) partition-size:msadp: 0x40000
(bootloader) partition-type:apdp:raw
(bootloader) partition-size:apdp: 0x40000
(bootloader) partition-type:storsecbak:raw
(bootloader) partition-size:storsecbak: 0x20000
(bootloader) partition-type:storsec:raw
(bootloader) partition-size:storsec: 0x20000
(bootloader) partition-type:vbmetabak:raw
(bootloader) partition-size:vbmetabak: 0x10000
(bootloader) partition-type:vbmeta:raw
(bootloader) partition-size:vbmeta: 0x10000
(bootloader) partition-type:sec:raw
(bootloader) partition-size:sec: 0x5000
(bootloader) partition-type:ssd:raw
(bootloader) partition-size:ssd: 0x8000
(bootloader) partition-type:limits:raw
(bootloader) partition-size:limits: 0x8000
(bootloader) partition-type:fsc:raw
(bootloader) partition-size:fsc: 0x2000
(bootloader) partition-type:dpo:raw
(bootloader) partition-size:dpo: 0x2000
(bootloader) partition-type:switch:raw
(bootloader) partition-size:switch: 0x2000
(bootloader) secure:yes
(bootloader) serialno:44420506
(bootloader) product:whyred
(bootloader) max-download-size:536870912
(bootloader) kernel:uefi
all: 
Finished. Total time: 0.012s
As you can see, the "system" partirion is not available. Also, the device is not recognized for the "adb devices" command.
 

SubwayChamp

Senior Member
Aug 6, 2016
2,345
951
113
Hi, thank you very much for your time. However I am not able to boot into TWRP/Orangefox.
Some of the commands I trie, and the results I got are as follows, that may help you understand the issue:

Code:
adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
Code:
fastboot boot twrp-3.4.0-0-whyred.img
Sending 'boot.img' (42452 KB)                      OKAY [  1.065s]
Booting                                            FAILED (remote: 'Failed to load/authenticate boot image: 00000050')
fastboot: error: Command failed
Code:
fastboot getvar all
(bootloader) crc:1
(bootloader) anti:4
(bootloader) token:VQEBIAEQ9Tig3evCCIbvIZd+UDKaiAMGd2h5cmVkAgQi+ltp
(bootloader) hw-revision:10000
(bootloader) unlocked:yes
(bootloader) off-mode-charge:0
(bootloader) charger-screen-enabled:0
(bootloader) battery-soc-ok:yes
(bootloader) battery-voltage:4064
(bootloader) version-baseband:
(bootloader) version-bootloader:
(bootloader) erase-block-size: 0x200
(bootloader) logical-block-size: 0x200
(bootloader) variant:SDM EMMC
(bootloader) partition-type:vendor:raw
(bootloader) partition-size:vendor: 0x8AC00000
(bootloader) partition-type:cache:f2fs
(bootloader) partition-size:cache: 0x11E00000
(bootloader) partition-type:recovery:raw
(bootloader) partition-size:recovery: 0x4000000
(bootloader) partition-type:boot:raw
(bootloader) partition-size:boot: 0x4000000
(bootloader) partition-type:rawdump:raw
(bootloader) partition-size:rawdump: 0x8000000
(bootloader) partition-type:modem:raw
(bootloader) partition-size:modem: 0xC000000
(bootloader) partition-type:logdump:raw
(bootloader) partition-size:logdump: 0x4000000
(bootloader) partition-type:persistbak:raw
(bootloader) partition-size:persistbak: 0x2000000
(bootloader) partition-type:persist:raw
(bootloader) partition-size:persist: 0x2000000
(bootloader) partition-type:splash:raw
(bootloader) partition-size:splash: 0x4000000
(bootloader) partition-type:bk2:raw
(bootloader) partition-size:bk2: 0x2000000
(bootloader) partition-type:mdtp:raw
(bootloader) partition-size:mdtp: 0x2000000
(bootloader) partition-type:bk1:raw
(bootloader) partition-size:bk1: 0x1800000
(bootloader) partition-type:dsp:raw
(bootloader) partition-size:dsp: 0x1000000
(bootloader) partition-type:modemst2:raw
(bootloader) partition-size:modemst2: 0x800000
(bootloader) partition-type:modemst1:raw
(bootloader) partition-size:modemst1: 0x800000
(bootloader) partition-type:fsg:raw
(bootloader) partition-size:fsg: 0x800000
(bootloader) partition-type:logfs:raw
(bootloader) partition-size:logfs: 0x800000
(bootloader) partition-type:devinfo:raw
(bootloader) partition-size:devinfo: 0x800000
(bootloader) partition-type:misc:raw
(bootloader) partition-size:misc: 0x400000
(bootloader) partition-type:xblbak:raw
(bootloader) partition-size:xblbak: 0x380000
(bootloader) partition-type:xbl:raw
(bootloader) partition-size:xbl: 0x380000
(bootloader) partition-type:sti:raw
(bootloader) partition-size:sti: 0x200000
(bootloader) partition-type:bluetooth:raw
(bootloader) partition-size:bluetooth: 0x100000
(bootloader) partition-type:keymasterbak:raw
(bootloader) partition-size:keymasterbak: 0x100000
(bootloader) partition-type:keymaster:raw
(bootloader) partition-size:keymaster: 0x100000
(bootloader) partition-type:mdtpsecappbak:raw
(bootloader) partition-size:mdtpsecappbak: 0x400000
(bootloader) partition-type:mdtpsecapp:raw
(bootloader) partition-size:mdtpsecapp: 0x400000
(bootloader) partition-type:tzbak:raw
(bootloader) partition-size:tzbak: 0x400000
(bootloader) partition-type:tz:raw
(bootloader) partition-size:tz: 0x400000
(bootloader) partition-type:devcfg:raw
(bootloader) partition-size:devcfg: 0x100000
(bootloader) partition-type:devcfgbak:raw
(bootloader) partition-size:devcfgbak: 0x100000
(bootloader) partition-type:toolsfv:raw
(bootloader) partition-size:toolsfv: 0x100000
(bootloader) partition-type:ddr:raw
(bootloader) partition-size:ddr: 0x100000
(bootloader) partition-type:dip:raw
(bootloader) partition-size:dip: 0x100000
(bootloader) partition-type:ablbak:raw
(bootloader) partition-size:ablbak: 0x100000
(bootloader) partition-type:abl:raw
(bootloader) partition-size:abl: 0x100000
(bootloader) partition-type:cmnlib64bak:raw
(bootloader) partition-size:cmnlib64bak: 0x100000
(bootloader) partition-type:cmnlib64:raw
(bootloader) partition-size:cmnlib64: 0x100000
(bootloader) partition-type:cmnlibbak:raw
(bootloader) partition-size:cmnlibbak: 0x100000
(bootloader) partition-type:cmnlib:raw
(bootloader) partition-size:cmnlib: 0x100000
(bootloader) partition-type:pmicbak:raw
(bootloader) partition-size:pmicbak: 0x80000
(bootloader) partition-type:pmic:raw
(bootloader) partition-size:pmic: 0x80000
(bootloader) partition-type:hypbak:raw
(bootloader) partition-size:hypbak: 0x80000
(bootloader) partition-type:hyp:raw
(bootloader) partition-size:hyp: 0x80000
(bootloader) partition-type:rpmbak:raw
(bootloader) partition-size:rpmbak: 0x80000
(bootloader) partition-type:rpm:raw
(bootloader) partition-size:rpm: 0x80000
(bootloader) partition-type:frp:raw
(bootloader) partition-size:frp: 0x80000
(bootloader) partition-type:keystore:raw
(bootloader) partition-size:keystore: 0x80000
(bootloader) partition-type:msadp:raw
(bootloader) partition-size:msadp: 0x40000
(bootloader) partition-type:apdp:raw
(bootloader) partition-size:apdp: 0x40000
(bootloader) partition-type:storsecbak:raw
(bootloader) partition-size:storsecbak: 0x20000
(bootloader) partition-type:storsec:raw
(bootloader) partition-size:storsec: 0x20000
(bootloader) partition-type:vbmetabak:raw
(bootloader) partition-size:vbmetabak: 0x10000
(bootloader) partition-type:vbmeta:raw
(bootloader) partition-size:vbmeta: 0x10000
(bootloader) partition-type:sec:raw
(bootloader) partition-size:sec: 0x5000
(bootloader) partition-type:ssd:raw
(bootloader) partition-size:ssd: 0x8000
(bootloader) partition-type:limits:raw
(bootloader) partition-size:limits: 0x8000
(bootloader) partition-type:fsc:raw
(bootloader) partition-size:fsc: 0x2000
(bootloader) partition-type:dpo:raw
(bootloader) partition-size:dpo: 0x2000
(bootloader) partition-type:switch:raw
(bootloader) partition-size:switch: 0x2000
(bootloader) secure:yes
(bootloader) serialno:44420506
(bootloader) product:whyred
(bootloader) max-download-size:536870912
(bootloader) kernel:uefi
all: 
Finished. Total time: 0.012s
As you can see, the "system" partirion is not available. Also, the device is not recognized for the "adb devices" command.
No, adb commands won't work as you can't boot to system.

You didn't try what I suggested, I didn't say to try to boot to OrangeFox but to flash it on the boot partition instead of on the recovery partition, I know it's unusual but don't care about, if the flash is successful then don't type any more command but reboot with button power, it has to make its first parade In the boot image where now is OrangeFox.

For the rest I'm not sure if the info from your device was hidden cause i didn't see a return of the device iD
 

AmeyA

Member
Dec 27, 2016
22
2
0
Pune
No, adb commands won't work as you can't boot to system.

You didn't try what I suggested, I didn't say to try to boot to OrangeFox but to flash it on the boot partition instead of on the recovery partition, I know it's unusual but don't care about, if the flash is successful then don't type any more command but reboot with button power, it has to make its first parade In the boot image where now is OrangeFox.

For the rest I'm not sure if the info from your device was hidden cause i didn't see a return of the device iD
Hi, I tried
Code:
[email protected] Recoveries % fastboot flash boot Orangefox\ Recovery.img
Sending 'boot' (46732 KB)                          OKAY [  1.000s]
Writing 'boot'                                     OKAY [  0.385s]
Finished. Total time: 1.388s
[email protected] Recoveries % g
this command, however, the phone did not boot into the recovery when I restarted it using the power button.
Also,
Code:
adb devices
dowsn't return any device code.
 

SubwayChamp

Senior Member
Aug 6, 2016
2,345
951
113
Hi, I tried
Code:
[email protected] Recoveries % fastboot flash boot Orangefox\ Recovery.img
Sending 'boot' (46732 KB)                          OKAY [  1.000s]
Writing 'boot'                                     OKAY [  0.385s]
Finished. Total time: 1.388s
[email protected] Recoveries % g
this command, however, the phone did not boot into the recovery when I restarted it using the power button.
Also,
Code:
adb devices
dowsn't return any device code.
It's not clear which command you tried here: "[email protected] Recoveries % fastboot flash boot Orangefox\ Recovery.img"

Firstly extract the OrangeFox recovery image from the zip, then rename it for example to just orange, you will have orange.img then type or copy/paste from here:
Code:
fastboot flash boot orange.img
and finally press the power button till device boots up.

adb commands DON'T work while in fastboot, adb commands only work when device is on, there is a variant to sideload/flash files that work on recovery mode.
 

AmeyA

Member
Dec 27, 2016
22
2
0
Pune
It's not clear which command you tried here: "[email protected] Recoveries % fastboot flash boot Orangefox\ Recovery.img"

Firstly extract the OrangeFox recovery image from the zip, then rename it for example to just orange, you will have orange.img then type or copy/paste from here:
Code:
fastboot flash boot orange.img
and finally press the power button till device boots up.

adb commands DON'T work while in fastboot, adb commands only work when device is on, there is a variant to sideload/flash files that work on recovery mode.
Its the same command. Just that the name of the recovery file is "Orangefox Recovery.img"
The command I executed are:
Code:
fastboot flash boot recovery.img
fastboot flash boot boot.img
fastboot flash boot OrangefoxRecovery.img
nothing worked.
 

SubwayChamp

Senior Member
Aug 6, 2016
2,345
951
113
It's not clear which command you tried here: "[email protected] Recoveries % fastboot flash boot Orangefox\ Recovery.img"

Firstly extract the OrangeFox recovery image from the zip, then rename it for example to just orange, you will have orange.img then type or copy/paste from here:

Its the same command. Just that the name of the recovery file is "Orangefox Recovery.img"
The command I executed are:

nothing worked.
Ok then I have to assume that you did for example: "fastboot flash boot OrangeFoxRecovery.img" and then rebooted but nothing. Try next with "fastboot reboot" instead of power button, just a note, name of images can't contain spaces.

Did you remember the site/thread that you were based on to repartition, maybe they provide a method to revert it.
 

AmeyA

Member
Dec 27, 2016
22
2
0
Pune
Ok then I have to assume that you did for example: "fastboot flash boot OrangeFoxRecovery.img" and then rebooted but nothing. Try next with "fastboot reboot" instead of power button, just a note, name of images can't contain spaces.

Did you remember the site/thread that you were based on to repartition, maybe they provide a method to revert it.
Yup, I did the same. The recovery image file name doesn't contain any spaces or special characters.
I followed https://forum.hovatek.com/thread-32750.html this article. However, I did not find any info on how to revert the changes.
 

SubwayChamp

Senior Member
Aug 6, 2016
2,345
951
113
Yup, I did the same. The recovery image file name doesn't contain any spaces or special characters.
I followed https://forum.hovatek.com/thread-32750.html this article. However, I did not find any info on how to revert the changes.
I did read what you wrote in the other thread: "fastboot flash boot OrangefoxRecovery.img
This command executes successfully, but after restarting the phone using fastboot boot OrangefoxRecovery.img or using the [power + volume up] button, the devices goes to the fastboot mode."

And just to be clear what I suggested to do is first flash the recovery image in the boot partition, at this point your command is ok
But then you tried "starting the phone using fastboot boot OrangefoxRecovery.img or using the [power + volume up] button"

And I suggested that after to flash the recovery image onto the boot partition you don't execute any command nor try to boot to recovery using vol up+pwr buttons BUT simply press ONLY power button (approximately 10 seconds) till your device try to boot to system, of course it can't boot to system but it is expecting that when it goes to the boot stage then it will find recovery image in the boot partition.

If this action correctly done (not like you were doing) doesn't result then you could consider the next:

I did read in the guide that is needed to temporarily erased the partitions that are between system and userdata and those are boot, recovery and something more then I guess in this process your device reboots inadvertently and get corrupted but you did format them so probably exists a method re-format them through fastboot at least the recovery and/or boot partition to get them working, if you can boot to recovery then probably you could repair the other partitions.