(solved) How restore /cust partition?

miguelwill

Member
Feb 5, 2014
17
4
0
51
Santiago
In my case, could not load twrp and should restore CUST partition
Flashing image recovery in boot partition, get booting in TWRP
With twrp or in android copy the image CUST and boot from the computer

Finally:
I flashed CUST.img in CUST partition
BOOT.img in boot partition,
and lastly, flash the zip of the rom that previously worked without problems of cust or misc partition on system

regards
 

ThunderThighs

Senior Member
Aug 7, 2015
305
112
63
I had an issue with /cust partition and managed to fix it last night.

This was a complicated process but I'll try and explain as best as I can.

You need to obtain the original stock CUST.img file. You can download the full system images from https://mega.nz/#!Kg9UiKiD!cCh9UK0Oi-P1UNk-e1RBk_jlUEHGm0MGYa_HSlQ-3c4

You also need simg2img from https://github.com/KinglyWayne/simg2img_win

copy CUST.img into the simg2img directory, edit convert.bat to change the command to: simg2img.exe CUST.img cust.ext4.img

Or open a command prompt and navigate to the folder, running simg2img.exe CUST.img cust.ext4.img

Once run you'll have an ext4 image. The original image is a sparse image - useless for direct writing.

Boot your device into TWRP. Mount internal storage then copy the new cust.ext4.img file to your device.

You need ADB on your computer for the next step. Open adb shell:

now do the following:

dd if=/sdcard/cust.ext4.img of=/dev/block/mmcblk0p23

assuming you copied the cust image to your internal storage

Once the dd process has completed, test this worked by mounting the cust partition inside TWRP. If it mounts then the dd worked correctly and your cust is restored.
Dude, if you had never posted this I would have never figured out how to fix the /cust partition. I wiped the stock MIUI rom in twrp without updating to the latest 4.0. Been stuck ever since then, including not being able to mount the /cust partition. Please keep voicing your solutions like you do!
 
  • Like
Reactions: 8109930082

HORROR.

New member
Jun 17, 2017
1
0
0
cust

I have a problem of this kind, basically when I try to run an update on huawei p9 lite, but the update does not start and remains on the screen that the device is starting now, some files to boot the bootloader?
I try to download the above files
 

PalakMi

Senior Member
Aug 18, 2016
5,131
652
223
Oujda
I have a problem of this kind, basically when I try to run an update on huawei p9 lite, but the update does not start and remains on the screen that the device is starting now, some files to boot the bootloader?
I try to download the above files
Please, ask that in the p9 lite forum, they will help you there :)
 
  • Like
Reactions: HORROR.

gopinaidu77

Senior Member
Jan 23, 2015
6,948
4,613
0
I have a problem of this kind, basically when I try to run an update on huawei p9 lite, but the update does not start and remains on the screen that the device is starting now, some files to boot the bootloader?
I try to download the above files
So u unlocked the bootloader ?
 

Rodiandrea

Member
Nov 10, 2014
49
2
28
I had an issue with /cust partition and managed to fix it last night.

This was a complicated process but I'll try and explain as best as I can.

You need to obtain the original stock CUST.img file. You can download the full system images from https://mega.nz/#!Kg9UiKiD!cCh9UK0Oi-P1UNk-e1RBk_jlUEHGm0MGYa_HSlQ-3c4

You also need simg2img from https://github.com/KinglyWayne/simg2img_win

copy CUST.img into the simg2img directory, edit convert.bat to change the command to: simg2img.exe CUST.img cust.ext4.img

Or open a command prompt and navigate to the folder, running simg2img.exe CUST.img cust.ext4.img

Once run you'll have an ext4 image. The original image is a sparse image - useless for direct writing.

Boot your device into TWRP. Mount internal storage then copy the new cust.ext4.img file to your device.

You need ADB on your computer for the next step. Open adb shell:

now do the following:

dd if=/sdcard/cust.ext4.img of=/dev/block/mmcblk0p23

assuming you copied the cust image to your internal storage

Once the dd process has completed, test this worked by mounting the cust partition inside TWRP. If it mounts then the dd worked correctly and your cust is restored.

this messed up my phone, is there a method for reverse all changes?
 

Rodiandrea

Member
Nov 10, 2014
49
2
28

adriansticoid

Senior Member
Jul 5, 2014
7,494
1,588
0
22
San Pedro, Laguna
https://forum.xda-developers.com/honor-8/help/hard-brick-help-t3650557

This happened

And i tried to follow your guide to resolve my problem but didn't work
And now i can't flash nothing and mount nothing because the part modified following your guide prevent me to do nothing and appear in every error

So, in the end, now I can use my phone (thx to another user) but can't mod it :(

Sorry for my bad English
You have TWRP installed?

Sent from my Honor 8 using XDA Labs
 

Rodiandrea

Member
Nov 10, 2014
49
2
28
Place your firmware inside a folder named dload. Then power off your phone, and press the three hardware buttons simultaneously. The flashing should commence shortly.
So I create this folder in the internal memory and after I placed the file and did all things the phone flash it?
Or I can get others error and get other problems?