Persist partition not flashing - Xiaomi Mi A1 Questions & Answers

Hey, I accidentally corrupted my persist partition, the phone is unusable; the WiFi doesn't work, and it restarts every 2 Minutes. I tried flashing persist
fastboot flash persist persist.img
FAILED (remote: Error: This image isn't allow download)
I already tried erasing persist, but it won't let me.
Can someone please tell me a method to unlock the persist partition for download so I can flash persist.img? Please note that I can't flash TWRP either, says partition table doesn't exist. Is there a way to maybe flash it through Mi Flash Tool?

boot to twrp
enable mtp from twrp if not enabled
copy persist.img to root of your phone storage
open terminal in twrp
and give the following command
dd if=/sdcard/persist.img of=/dev/block/mmcblk0p27
and done
now persist partition will be restored
reboot your phone

No twrp
raaz1431994 said:
boot to twrp
enable mtp from twrp if not enabled
copy persist.img to root of your phone storage
open terminal in twrp
and give the following command
dd if=/sdcard/persist.img of=/dev/block/mmcblk0p27
and done
now persist partition will be restored
reboot your phone
Click to expand...
Click to collapse
As I said earlier, I can't flash a custom recovery, tells me that partition table does not exist.

Hi man!.
do you flash with factory_reset.bat?, if the answer is yes, you have to flash tissot 7.23 with the attachment (change the txt extension to bat and start the phone in fastboot, when it finish, start the phone in fastboot and unlock the bootloader and try to flash the persist partition again in fastboot, if didnt work, boot the TWRP recovery (yes, boot it with fastboot boot recovery.img ) and flash the persist image with adb shell, dd if=/sdcard/persist.img of=/dev/block/bootdevice/by-name/persist , the persist image must be in the internal memory (you can copy it with MTP) when the phone starts, you can change the WLAN and Bluetooth mac addres in /persist/wlan_mac.bin, /persist/bluetooth/.nv_bluetooth, to change the serial numer /persist/.sn
Hope it works to you
PD. If you flash the factory_reset.bat, probably you lost the IMEI to and that would be a problem.

do not flash twrp
just boot to twrp using fastboot command
fastboot boot twrp.img
---------- Post added at 12:49 AM ---------- Previous post was at 12:48 AM ----------
CoolPlushBear said:
As I said earlier, I can't flash a custom recovery, tells me that partition table does not exist.
Click to expand...
Click to collapse
do not flash twrp
just boot to twrp using fastboot command
fastboot boot twrp.img

CoolPlushBear said:
As I said earlier, I can't flash a custom recovery, tells me that partition table does not exist.
Click to expand...
Click to collapse
Did you ever solve this issue or find a work around? I have same issue.....

If you don't flash the backup of your persist partition and use instead someone else's backup, you'll mess up your phone.

- # dd if=/sdcard/persist.img of=/dev/block/mmcblk0p27
dd: writing '/dev/block/mmcblk0p27': No space left on device
2049+0 records in
2048+0 records out
1048576 bytes (1 .0MB) copied, 0.114366 seconds, 8.7MB/s
FAIL~~

CoolPlushBear said:
Hey, I accidentally corrupted my persist partition, the phone is unusable; the WiFi doesn't work, and it restarts every 2 Minutes. I tried flashing persist
fastboot flash persist persist.img
FAILED (remote: Error: This image isn't allow download)
I already tried erasing persist, but it won't let me.
Can someone please tell me a method to unlock the persist partition for download so I can flash persist.img? Please note that I can't flash TWRP either, says partition table doesn't exist. Is there a way to maybe flash it through Mi Flash Tool?
Click to expand...
Click to collapse
Don't try to flash persist.img You can encounter more trouble
You can Lost IMEI and sensor, try this metodo:
https://forum.xda-developers.com/mi-a1/how-to/tool-persist-resurrector-v1-0-0-0-t3781095

carlosorta said:
Hi man!.
do you flash with factory_reset.bat?, if the answer is yes, you have to flash tissot 7.23 with the attachment (change the txt extension to bat and start the phone in fastboot, when it finish, start the phone in fastboot and unlock the bootloader and try to flash the persist partition again in fastboot, if didnt work, boot the TWRP recovery (yes, boot it with fastboot boot recovery.img ) and flash the persist image with adb shell, dd if=/sdcard/persist.img of=/dev/block/bootdevice/by-name/persist , the persist image must be in the internal memory (you can copy it with MTP) when the phone starts, you can change the WLAN and Bluetooth mac addres in /persist/wlan_mac.bin, /persist/bluetooth/.nv_bluetooth, to change the serial numer /persist/.sn
Hope it works to you
PD. If you flash the factory_reset.bat, probably you lost the IMEI to and that would be a problem.
Click to expand...
Click to collapse
what is tissot 7.23?

raaz1431994 said:
boot to twrp
enable mtp from twrp if not enabled
copy persist.img to root of your phone storage
open terminal in twrp
and give the following command
dd if=/sdcard/persist.img of=/dev/block/mmcblk0p27
and done
now persist partition will be restored
reboot your phone
Click to expand...
Click to collapse
still working in 2020. Thanks for your post. Small thread but powerful. :dynamite:

Related

Can't flash partitions

Hello all,
I left a similar post in a couple other threads, and thought maybe someone here might have some insight into my problem.
Been running AICP rom (no custom kernel except the one that comes with AICP) with f2fs on /data and /cache for several months on 16GB grouper. About a month or so ago, the wife installed a game that wouldn't run on this hardware (King's Paradise Bay), and I uninstalled it. It left a file in /data/data/....etc that couldn't stat in TWRP, so no nandroid backups since then. I figured I'd just backup user data with TiBkp and wipe with fresh install of latest AICP when time permitted.
The other night I noticed the N7 was boot looping, getting to the stage where the boot animation dims. The boot anim would hang and after several seconds the Google unlock splash screen would come up and the N7 would try to boot again.
I can get into TWRP and bootloader with no problem. However, when TWRP comes up, the log shows the red entries for 2 files that can't stat, which has been this way since that game was uninstalled. I cannot seem to wipe *any* partition, and when I attempt to format or wipe userdata in TWRP, the N7 spontaneously reboots. Manually attempting to wipe/format/etc. via FastBoot doesn't work, with error message showing after trying to flash bootloader. Also, I can't change /data or /cache back to ext4. I am able to successfully read, write, and delete files on the N7 via computer USB MTP connection.
If the N7's flash memory has somehow become corrupted, is there a way to completely erase/format/whatever so that this wonderful device can become usable again? Any help would be greatly appreciated.
Thanks in advance.
Hello,
don't flash Bootloader via Fastboot. You should do this commands:
Code:
fastboot erase cache
fastboot erase userdata
fastboot erase system
fastboot erase boot
Trafalgar Square said:
Hello,
don't flash Bootloader via Fastboot. You should do this commands:
Code:
fastboot erase cache
fastboot erase userdata
fastboot erase system
fastboot erase boot
Click to expand...
Click to collapse
Yes, I have attempted all these commands, followed by flashing with either fastboot or TWRP with no success. Fastboot reports success, but partitions are not erased.
I have the same problem. The Nexus Root Toolkit can not flashign. It succeeds only boot TWRP. In TWRP computer sees the files from the tablet.I could not rename and delete. Wipe the TWRP and stock recovery displays the status OK, and the files are deleted. Fastboot shows that uploads, but all files remain unchanged.

bootloop 6p flashed the stock image now what still bootlooping

So I was on weta rom flashed benzo latest with vendor and bootlooped my device. Got worried so I downloaded NRD90U factory image and fastboot flashed stock and format userdata, but phone still boot loops.
fastboot erase boot
fastboot erase cache
fastboot erase recovery
fastboot erase system
fastboot erase userdata
fastboot flash bootloader C:\angler\images\bootloader-angler-angler-xx.xx.img
fastboot reboot-bootloader
fastboot flash radio C:\angler\images\radio-angler-angler-xx.xx.img
fastboot reboot-bootloader
fastboot flash boot C:\angler\images\boot.img
fastboot erase cache
fastboot flash cache C:\angler\images\cache.img
fastboot flash recovery C:\angler\images\recovery.img
fastboot flash system C:\angler\images\system.img
fastboot flash vendor C:\angler\images\vendor.img
fastboot format userdata
fastboot format cache
fastboot reboot
I can go into the bootloader and then went to recovery get the android red exclamation mark guy so stock recovery has been flashed. I just don't know why it's bootlooping?
Did you backup and restore EFS at any point. If so you're bricked.
AndrewM3 said:
I can go into the bootloader and then went to recovery get the android red exclamation mark guy so stock recovery has been flashed. I just don't know why it's bootlooping?
Click to expand...
Click to collapse
And if you are bricked (TWRP 3.0.2-1 EFS restore?) you need to erase those partitions via ADB to fix it.
Sent from my Nexus 6P using Tapatalk
Gytole said:
Did you backup and restore EFS at any point. If so you're bricked.
Click to expand...
Click to collapse
no i didn't backup efs, wait when I was on benzo I tried to restore a twrp backup I had but it said it failed, i left all the boxes checked marked to restore
ok so i'm getting the jist that I am hard bricked, my phone is still under warranty from google what is the best way to explain to them what happened so not to void warranty
ultyrunner said:
And if you are bricked (TWRP 3.0.2-1 EFS restore?) you need to erase those partitions via ADB to fix it.
Sent from my Nexus 6P using Tapatalk
Click to expand...
Click to collapse
ok what is the command to do this. I put my phone in bootloader and what command do I fastboot. and would I reflash the factory image afterwards. thank you
how do i erase efs partition
so I have stock recovery how would I erase my efs partition?
Solved
thanks to @ ultyrunner I flashed twrp and then ran the follwing adb commands to make my phone boot up and it worked. you sir are my hero!
If you have been bricked you NEED to Erase the EFS partitions and that will fix it immediately.
For the Nexus 6P go to TWRP. Then on PC Open Command Prompt with access to ADB ( Android Debug Bridge) and execute the following commands:
ADB shell dd if=/dev/zero of=/dev/block/platform/soc.0/f9824900.sdhci/by-name/modemst1 bs=16384
and
ADB shell dd if=/dev/zero of=/dev/block/platform/soc.0/f9824900.sdhci/by-name/modemst2 bs=16384
This should fix it for ANY Nexus 6P users.
from the thread http://forum.xda-developers.com/nexus-6p/help/announcement-twrp-3-0-2-1-fatal-bug-t3453119
AndrewM3 said:
thanks to @ ultyrunner I flashed twrp and then ran the follwing adb commands to make my phone boot up and it worked. you sir are my hero!
If you have been bricked you NEED to Erase the EFS partitions and that will fix it immediately.
For the Nexus 6P go to TWRP. Then on PC Open Command Prompt with access to ADB ( Android Debug Bridge) and execute the following commands:
ADB shell dd if=/dev/zero of=/dev/block/platform/soc.0/f9824900.sdhci/by-name/modemst1 bs=16384
and
ADB shell dd if=/dev/zero of=/dev/block/platform/soc.0/f9824900.sdhci/by-name/modemst2 bs=16384
This should fix it for ANY Nexus 6P users.
from the thread http://forum.xda-developers.com/nexus-6p/help/announcement-twrp-3-0-2-1-fatal-bug-t3453119
Click to expand...
Click to collapse
Glad it worked. Grab the unofficial 3.0.2-3 update and avoid further headache
Sent from my Nexus 6P using Tapatalk
---------- Post added at 01:41 PM ---------- Previous post was at 12:54 PM ----------
AndrewM3 said:
so I have stock recovery how would I erase my efs partition?
Click to expand...
Click to collapse
You can run ADB commands on stock recovery. You need to ensure you have current ADB/fastboot drivers installed and that your computer recognizes your device.
Once that's working, do some research on the exact process but in a nutshell boot into bootloader, reboot into stock recovery and get into the recovery menu, use the rocker to select "update over ADB" and then you can doublecheck your computer recognizes your device and should be able to issue the commands to erase the EFS.

Bootloader-Relock LG G4 (H815) No Wipe, No Backups, All Versions

Relock LG G4 Bootloader easily
First of all, I'm new here. So please tell me if I broke any rules or if I made any english mistakes.
Warning:
This guide will show you how to easily Re-Lock your Bootloader. Your Bootloader is then Locked! So, it's not really clever to lock the Bootloader when a Non-Stock-Rom is installed...
Requirements:
- LG G4 (H815) [This probably works with other LG's too]
- TWRP-Recovery installed or temporary booted using "fastboot boot"
- Stock-Android installed (Any Version)
- Flashable Bootloader/Boot Zip's for your Android-Version
For Android 6.0 you can get them here: https://forum.xda-developers.com/g4/development/stock-h815-20g-images-kdz-flashable-t3450503
How to Relock:
Step 1: Boot into TWRP
Step 2: Copy the Zip-Files to internal storage
Step 3: Go to Advanced/Terminal
Step 4: Perform this command:
Code:
dd if=/dev/zero of=/dev/block//bootdevice/by-name/misc
Your bootloader is Non-Functional now... Don't reboot until the next steps are completed!
Step 5: Flash both Zip-Files using TWRP
Step 6: Reboot
You now have a G4 with stock ROM and locked bootloader. If you wish to uninstall TWRP (Its no longer working) just Flash a Stock kdz-File using LGUP
Hope I was able to help someone...
Reserved
in dd command are 2x //, is the corect command ? or just one / ?
dd if=/dev/zero of=/dev/block//bootdevice/by-name/misc
to
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc
for me misc is /dev/block/mmcblk0p22
ghepardus said:
in dd command are 2x //, is the corect command ? or just one / ?
dd if=/dev/zero of=/dev/block//bootdevice/by-name/misc
to
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc
for me misc is /dev/block/mmcblk0p22
Click to expand...
Click to collapse
The command is correct... If you perform it, it will make the bootloader crash. If you flash a clean bootloader now ur device is locked again.
Mathias
MathiasR33 said:
Relock LG G4 Bootloader easily
I ...
Click to expand...
Click to collapse
... Thx for your thread even if it is known that the unlock state is handled by misc partition but it's good to have an own thread for it now. Latest TWRP beta can save the unlock state since a while.
Just wanted to add: if you made a misc backup before unlock you can just restore your backup. You can even flash a misc of an extracted kdz.
And another thing: if you zero out it like described you may loose your WiFi Mac and you can loose your imei. So before using this it's better to backup your current unlocked misc e.g. with the latest TWRP beta (select BL unlock state).
Backup before unlock is possible with SALT DLM backup ( https://tinyurl.com/dlbackup )
Sent from my LG-H815 using XDA Labs
MathiasR33 said:
Relock LG G4 Bootloader easily
First of all, I'm new here. So please tell me if I broke any rules or if I made any english mistakes.
Warning:
This guide will show you how to easily Re-Lock your Bootloader. Your Bootloader is then Locked! So, it's not really clever to lock the Bootloader when a Non-Stock-Rom is installed...
Requirements:
- LG G4 (H815) [This probably works with other LG's too]
- TWRP-Recovery installed or temporary booted using "fastboot boot"
- Stock-Android installed (Any Version)
- Flashable Bootloader/Boot Zip's for your Android-Version
For Android 6.0 you can get them here: https://forum.xda-developers.com/g4/development/stock-h815-20g-images-kdz-flashable-t3450503
How to Relock:
Step 1: Boot into TWRP
Step 2: Copy the Zip-Files to internal storage
Step 3: Go to Advanced/Terminal
Step 4: Perform this command:
Code:
dd if=/dev/zero of=/dev/block//bootdevice/by-name/misc
Your bootloader is Non-Functional now... Don't reboot until the next steps are completed!
Step 5: Flash both Zip-Files using TWRP
Step 6: Reboot
You now have a G4 with stock ROM and locked bootloader. If you wish to uninstall TWRP (Its no longer working) just Flash a Stock kdz-File using LGUP
Hope I was able to help someone...
Click to expand...
Click to collapse
you said temporary booted using "fastboot boot", which is the method with just fastboot? and second thing the command :
Code:
dd if=/dev/zero of=/dev/block//bootdevice/by-name/misc
need any substitution?
freno25 said:
you said temporary booted using "fastboot boot", which is the method with just fastboot? and second thing the command :
Code:
dd if=/dev/zero of=/dev/block//bootdevice/by-name/misc
need any substitution?
Click to expand...
Click to collapse
u can now re-lock your device with fastboot
important: you device must be FULLY STOCK BEFORE you lock it again! That means no TWRP, no custom ROM etc! otherwise you will brick the device
if you still want to use that method mentioned here:
Make a backup with SALT (basic mode is enough)
boot into fastboot:
Code:
[B]fastboot erase misc[/B]
is doing the same then the above mentioned way.
the misc partition contains also your IMEI, your MAC (wifi) and Bluetooth address. Those SHOULD be re-generated once you boot Android again but if not you will have the backup you created with SALT before.
.
steadfasterX said:
u can now re-lock your device with fastboot
important: you device must be FULLY STOCK BEFORE you lock it again! That means no TWRP, no custom ROM etc! otherwise you will brick the device
if you still want to use that method mentioned here:
Make a backup with SALT (basic mode is enough)
boot into fastboot:
Code:
[B]fastboot erase misc[/B]
is doing the same then the above mentioned way.
the misc partition contains also your IMEI, your MAC (wifi) and Bluetooth address. Those SHOULD be re-generated once you boot Android again but if not you will have the backup you created with SALT before.
.
Click to expand...
Click to collapse
wow perfect you was very clear, and OMG I didn't saw your projects man, you rock! another and last questions(after the cmd "fastboot erase misc" I should use the cmd mentioned in your first link? so "fastboot oem lock" (because i tried this cmd with fastboot and my phone is recognized I checked with "fastboot devices" but my try failed maybe I miss something? I unlocked bootloader 1 year ago now I want to relock it so I refurbished the stock kdz with lgup and try the cmd but the console said to me FAIL (unknown command remote) somethings like that)? otherwise What I should do? just flash bootloader and boot zips?
EDIT:
What I've done:
-Refurbished with LGUP last version of KDZ STOCK of my country
-Now I have my device STOCK but with bootloader to relock
-I downloaded your os
-I downloaded the zip bootloader and boot of my KDZ from this site
-I made a backup basic with your software SALT (just in case)
-I have just to erase misc part (don't reboot before I haven't done last flash for rebuild misc partition)
-But my last doubt is which cmd I have to do with SALT for reflash the two zip and if this zip containg the misc partition (because inside I did found misc bin or img)
freno25 said:
wow perfect you was very clear, and OMG I didn't saw your projects man, you rock! another and last questions(after the cmd "fastboot erase misc" I should use the cmd mentioned in your first link? so "fastboot oem lock" (because i tried this cmd with fastboot and my phone is recognized I checked with "fastboot devices" but my try failed maybe I miss something? I unlocked bootloader 1 year ago now I want to relock it so I refurbished the stock kdz with lgup and try the cmd but the console said to me FAIL (unknown command remote) somethings like that)? otherwise What I should do? just flash bootloader and boot zips?
EDIT:
What I've done:
-Refurbished with LGUP last version of KDZ STOCK of my country
-Now I have my device STOCK but with bootloader to relock
-I downloaded your os
-I downloaded the zip bootloader and boot of my KDZ from this site
-I made a backup basic with your software SALT (just in case)
-I have just to erase misc part (don't reboot before I haven't done last flash for rebuild misc partition)
-But my last doubt is which cmd I have to do with SALT for reflash the two zip and if this zip containg the misc partition (because inside I did found misc bin or img)
Click to expand...
Click to collapse
I meant that you can also go the new way which is less risky by flashing the nougat bootloader in my mentioned link. Then you don't need to erase anything.
So I can just flash the v29a bootloader over my v20g or I should flash the entire stock with lgup?
freno25 said:
So I can just flash the v29a bootloader over my v20g or I should flash the entire stock with lgup?
Click to expand...
Click to collapse
Flash the TOT available is the easiest way.
Sent from my LG-H815 using XDA Labs
Hello,
thanks for the tuto.
With this method, will the message on the top left corner "bootloader unlocked" no longer appear?
steadfasterX said:
Backup before unlock is possible with SALT DLM backup ( https://tinyurl.com/dlbackup )
Click to expand...
Click to collapse
how do I restore the backup created with salt? Unfortunately my IMEI & MAC won't restore >.<
Koile said:
how do I restore the backup created with salt? Unfortunately my IMEI & MAC won't restore >.<
Click to expand...
Click to collapse
manually with fastboot or in TWRP. Both require an unlocked device though.
SALT will allow restore in a future release in download mode too.
Sent from my LG-H815 using XDA Labs
steadfasterX said:
manually with fastboot or in TWRP. Both require an unlocked device though.
Click to expand...
Click to collapse
bootloader is unlocked again, but TWRP won't show the bin-files created and fastboot just returns:
Code:
> .\fastboot flash misc E:\salt_backup\misc.bin
target reported max download size of 536870912 bytes
sending 'misc' (16384 KB)...
OKAY [ 0.375s]
writing 'misc'...
FAILED (remote: cannot flash this partition in unlocked state)
finished. total time: 0.406s
Can I restore a stock image i backed up with with twrp and go from there or will I need to reflash a tot/kdz and reflash twrp first?
steadfasterX said:
u can now re-lock your device with fastboot
important: you device must be FULLY STOCK BEFORE you lock it again! That means no TWRP, no custom ROM etc! otherwise you will brick the device
if you still want to use that method mentioned here:
Make a backup with SALT (basic mode is enough)
boot into fastboot:
Code:
[B]fastboot erase misc[/B]
is doing the same then the above mentioned way.
the misc partition contains also your IMEI, your MAC (wifi) and Bluetooth address. Those SHOULD be re-generated once you boot Android again but if not you will have the backup you created with SALT before.
.
Click to expand...
Click to collapse
C:\Windows\system32>fastboot erase misc
erasing 'misc'...
FAILED (remote: cannot erase this partition in unlocked state)
finished. total time: 0.031s
Koile said:
bootloader is unlocked again, but TWRP won't show the bin-files created and fastboot just returns:
Code:
> .\fastboot flash misc E:\salt_backup\misc.bin
target reported max download size of 536870912 bytes
sending 'misc' (16384 KB)...
OKAY [ 0.375s]
writing 'misc'...
FAILED (remote: cannot flash this partition in unlocked state)
finished. total time: 0.406s
Click to expand...
Click to collapse
in twrp:
Code:
adb push misc.bin /tmp/
adb shell
dd if=/tmp/misc.bin of=/dev/block/bootdevice/by-name/misc
sync
Spaceboy60 said:
Can I restore a stock image i backed up with with twrp and go from there or will I need to reflash a tot/kdz and reflash twrp first?
Click to expand...
Click to collapse
really reflashing a kdz is your best option. everything must be stock (no twrp or other mods are in place) so flashing a kdz ensures you are good.
Spaceboy60 said:
C:\Windows\system32>fastboot erase misc
erasing 'misc'...
FAILED (remote: cannot erase this partition in unlocked state)
finished. total time: 0.031s
Click to expand...
Click to collapse
that happens when you are on v29a.
on v29a its just a fastboot cmd to lock again: https://forum.xda-developers.com/g4/general/managed-to-relock-bootloader-t3660282
keep in mind that your phone is better pure stock before doing this and it will 100% brick your phone when you have UsU'd your device.
.
steadfasterX said:
u can now re-lock your device with fastboot
important: you device must be FULLY STOCK BEFORE you lock it again! That means no TWRP, no custom ROM etc! otherwise you will brick the device
if you still want to use that method mentioned here:
Make a backup with SALT (basic mode is enough)
boot into fastboot:
Code:
[B]fastboot erase misc[/B]
is doing the same then the above mentioned way.
the misc partition contains also your IMEI, your MAC (wifi) and Bluetooth address. Those SHOULD be re-generated once you boot Android again but if not you will have the backup you created with SALT before.
.
Click to expand...
Click to collapse
steadfasterX said:
in twrp:
Code:
adb push misc.bin /tmp/
adb shell
dd if=/tmp/misc.bin of=/dev/block/bootdevice/by-name/misc
sync
really reflashing a kdz is your best option. everything must be stock (no twrp or other mods are in place) so flashing a kdz ensures you are good.
that happens when you are on v29a.
on v29a its just a fastboot cmd to lock again: https://forum.xda-developers.com/g4/general/managed-to-relock-bootloader-t3660282
keep in mind that your phone is better pure stock before doing this and it will 100% brick your phone when you have UsU'd your device.
.
Click to expand...
Click to collapse
I'm on marshmallow, not 29a
EDIT:reflashed back to stock, but command fastboot erase misc still comes up with an error about not being able to flash in an unlocked state.
MathiasR33 said:
Relock LG G4 Bootloader easily
First of all, I'm new here. So please tell me if I broke any rules or if I made any english mistakes.
Warning:
This guide will show you how to easily Re-Lock your Bootloader. Your Bootloader is then Locked! So, it's not really clever to lock the Bootloader when a Non-Stock-Rom is installed...
Requirements:
- LG G4 (H815) [This probably works with other LG's too]
- TWRP-Recovery installed or temporary booted using "fastboot boot"
- Stock-Android installed (Any Version)
- Flashable Bootloader/Boot Zip's for your Android-Version
For Android 6.0 you can get them here: https://forum.xda-developers.com/g4/development/stock-h815-20g-images-kdz-flashable-t3450503
How to Relock:
Step 1: Boot into TWRP
Step 2: Copy the Zip-Files to internal storage
Step 3: Go to Advanced/Terminal
Step 4: Perform this command:
Code:
dd if=/dev/zero of=/dev/block//bootdevice/by-name/misc
Your bootloader is Non-Functional now... Don't reboot until the next steps are completed!
Step 5: Flash both Zip-Files using TWRP
Step 6: Reboot
You now have a G4 with stock ROM and locked bootloader. If you wish to uninstall TWRP (Its no longer working) just Flash a Stock kdz-File using LGUP
Hope I was able to help someone...
Click to expand...
Click to collapse
Hello, dear MathiasR33
I am asking you with a very polite request for technical support. I upgraded after OTA Wi-Fi to the latest version of Android MarshMallow 6.0.
Please help me in the next steps.
The fastboot devices command does not work for me.
I post a screen showing the version of my Firmeware in the LGUP.
And Screen from the CMD console saying that the fastboot devices command does not work.
Please, help me, I am waiting for your answer.

Ruined my modem partition... Please help

i downloaded factory image of 7.12.29 oreo
i used flash_factory.bat
it reflashed partitioning
apparently it had a command "fastboot flash modem_a NON-HLOS.bin"
the NON-HLOS.bin file does not exist in images folder nor in any fastboot rom
now i dont have any connectivity... signal.. wifi etc..
can anybody provide NON-HLOS.bin file for the A1
Hello,
Inside the fastboot ROM file "tissot_images_7.12.19_20171219.0000.00_7.1_d39fa89aaf.tgz" (Nougat 7.1.2) ... in the file "flash_all_lock_crc.bat" for example, these lines appear:
fastboot %* flash modem_a %~dp0images\modem.img || @ECHO "Flash modem_a error" && exit /B 1
fastboot %* flash modem_b %~dp0images\modem.img || @ECHO "Flash modem_b error" && exit /B 1
It seems that the file is called "modem.img", not "NON-HLOS.bin".
May be?
Regards!
PS: Sorry for my English!
i managed to flash all images from fast boot to partitions manually step by step
except something called fsg and persist partitions
which i managed to flash through twrp using dd command via terminal
now it boots but i dont have imei number "says imei number unknown"
and it reboots after less than a minute
i read something about qcn file restore and editing from another mi A1
and that i can edit it to put my imei numbers back
anybody please provide a valid qcn number and how can i restore it
m.hashem said:
i managed to flash all images from fast boot to partitions manually step by step
except something called fsg and persist partitions
which i managed to flash through twrp using dd command via terminal
now it boots but i dont have imei number "says imei number unknown"
and it reboots after less than a minute
i read something about qcn file restore and editing from another mi A1
and that i can edit it to put my imei numbers back
anybody please provide a valid qcn number and how can i restore it
Click to expand...
Click to collapse
if it is under warranty just brick your phone and give it to service centre they will flash it and give you back
m.hashem said:
i downloaded factory image of 7.12.29 oreo
i used flash_factory.bat
it reflashed partitioning
apparently it had a command "fastboot flash modem_a NON-HLOS.bin"
the NON-HLOS.bin file does not exist in images folder nor in any fastboot rom
now i dont have any connectivity... signal.. wifi etc..
can anybody provide NON-HLOS.bin file for the A1
Click to expand...
Click to collapse
i have same problem last night
then i reflash 7.12.19 using miflash 2016.08.30.0
my imei normal again
Wow! The file NON-HLOS.bin is the modem for other Xiaomi phone. May be you use a batch file (flash_factory.bat) for other phone, not Mi A1. Please use Mi Flash with right rom.
this is method not working
bangir said:
i have same problem last night
then i reflash 7.12.19 using miflash 2016.08.30.0
my imei normal again
Click to expand...
Click to collapse
this is method not working
gautamaurya said:
this is method not working
Click to expand...
Click to collapse
What happens if you try to re-flash your modem with the flash_all or flash_all_except_storage scripts from here: https://forum.xda-developers.com/mi-a1/how-to/ota-official-fastboot-image-n2g47h-7-12-t3728929 ?
Can you please report, if it works and if should not work, please attach the terminal/ shell outpout of the failed flashing attempt here.
modemst1 and modemst2
hey ... i managed to flash the fastboot rom via miflash via hsusb 9008 mode through miflash tool (run as administrator)
the remainig problem is 2 partitions modemst1 and modemst2
which are dev/block/mmcblk0p14 & 15 respectively
can somebody please send me a backup of modemst1 and modemst2
it's doable via twrp
fastboot boot twrp3.1.1.1.img
advanced
terminal
dd if=/dev/block/mmcblk0p14 of=/sdcard/modemst1.img
dd if=/dev/block/mmcblk0p15 of=/sdcard/modemst2.img
i'll flash them back and edit the imei numbers via hex after qcn backup
thanks everybody
m.hashem said:
hey ... i managed to flash the fastboot rom via miflash via hsusb 9008 mode through miflash tool (run as administrator)
the remainig problem is 2 partitions modemst1 and modemst2
which are dev/block/mmcblk0p14 & 15 respectively
can somebody please send me a backup of modemst1 and modemst2
it's doable via twrp
fastboot boot twrp3.1.1.1.img
advanced
terminal
dd if=/dev/block/mmcblk0p14 of=/sdcard/modemst1.img
dd if=/dev/block/mmcblk0p15 of=/sdcard/modemst2.img
i'll flash them back and edit the imei numbers via hex after qcn backup
thanks everybody
Click to expand...
Click to collapse
I have done some digging in order to assist you to get this fixed. I think I have 2 very hot leads (untested as I don't have any issues with my IMEI):
1. http://www.androidbrick.com/ultimat...agon-xiaomi-mi5-imei-and-baseband-repair-fix/ & http://www.androidbrick.com/ultimate-guide-qualcomm-snapdragon-imei-baseband-repair-fix-part-2/
2. https://androidmtk.com/use-qualcomm-smartphone-write-imei-tool (looks almost to easy, but worth a try?)
Please report your feedback here
hey bro how to the editting modem1st.img
m.hashem said:
i downloaded factory image of 7.12.29 oreo
i used flash_factory.bat
it reflashed partitioning
now i dont have any connectivity... signal.. wifi etc..
Click to expand...
Click to collapse
Hello!
I made the same mistake. Is there a way to solve this problem?
m.hashem said:
i downloaded factory image of 7.12.29 oreo
i used flash_factory.bat
it reflashed partitioning
apparently it had a command "fastboot flash modem_a NON-HLOS.bin"
the NON-HLOS.bin file does not exist in images folder nor in any fastboot rom
now i dont have any connectivity... signal.. wifi etc..
can anybody provide NON-HLOS.bin file for the A1
Click to expand...
Click to collapse
Same problem here. Phone doesn't work correctly now. Boots, freezes and reboots. :crying:
persist image problem
https://xiaomifirmware.com/guides-and-tips/restore-persist-partition-xiaomi-mi-a1/
try ghis to restore persist img from twrp see if it fixes the freeze and reboot problem
also download the persist.img from the guide not from a fastboot rom... it should be 32 mb in size
i actually bricked my phone via doing fastboot flash partition partition-both-gpt.bin from fastboot folder then fastvoot reboot.... warning this bricks the phone completely... theres no bootloader now... i gave it to service center... ill take my chances for replacement
m.hashem said:
https://xiaomifirmware.com/guides-and-tips/restore-persist-partition-xiaomi-mi-a1/
try ghis to restore persist img from twrp see if it fixes the freeze and reboot problem
also download the persist.img from the guide not from a fastboot rom... it should be 32 mb in size
i actually bricked my phone via doing fastboot flash partition partition-both-gpt.bin from fastboot folder then fastvoot reboot.... warning this bricks the phone completely... theres no bootloader now... i gave it to service center... ill take my chances for replacement
Click to expand...
Click to collapse
thank you very much broo my device is fixed freezee and reboots problem
Ok. But what is the persist partition? Someone tried already? Doesn't want to brick my phone completely.
how to the editting qcn file beacuse my imei 0 null please help me editting brother
m.hashem said:
https://xiaomifirmware.com/guides-and-tips/restore-persist-partition-xiaomi-mi-a1/
try ghis to restore persist img from twrp see if it fixes the freeze and reboot problem
also download the persist.img from the guide not from a fastboot rom... it should be 32 mb in size
i actually bricked my phone via doing fastboot flash partition partition-both-gpt.bin from fastboot folder then fastvoot reboot.... warning this bricks the phone completely... theres no bootloader now... i gave it to service center... ill take my chances for replacement
Click to expand...
Click to collapse
The freeze and reboot problem is fixed. Thanks. Still one problem. IMEI1 is 0 and IMEI2 is null. Anyone has an idea?
Nordland_ua said:
Hello!
I made the same mistake. Is there a way to solve this problem?
Click to expand...
Click to collapse
Me tooo
Sent from my Mi A1 using Tapatalk
https://www.androidfilehost.com/?fid=673956719939818468
Replace the IMEi with UR Own IMEI . if not it's illegal to use this QCN
Password : testnreport
if you don't know how to change IMEI Using hex editor , try my method . DO NOT use QCN to restore .
(hex and imei provided in order for u to find n replace)
i lost my imei n spent me about 6days n 8 hours per day to find a way to fix it .
actually it's easy to fix the problem .
My own method
1. download the older rom (7.8.23) Link
2. Use flash_all.bat
3.reboot into fastboot mode , erase modemst1 and modemst2 .
fastboot erase modemst1
fastboot erase modemst2
4. reboot
5. go to phone , enter *#*#717717#*#*
6.got to settings enable USB Debugging (ADB)
7. disconnect your phone n connect it back
8.Use WriteDualIMEI(W+G_eMMC) Remember run as administrator , enter your IMEI .
9.if success , go to phone enter *#*#717717#*#* to disable the diag port
10. reboot
Done .

Persist partition not flashing...

Hey, I need to flash a persist.img file, because my phon restarts every 2 Minutes and does not find any WiFi, but it gives me out the error: remote:Error : persist partition not allowed download. Is there a way to flash it without twrp, since when I try to flash a custom recovery, it says partition table not found. Is there a way to flash persist.img in Mi Flash Tool?
use the link given below
it will help you
https://forum.xda-developers.com/showpost.php?p=75782887&postcount=2
raaz1431994 said:
use the link given below
it will help you
https://forum.xda-developers.com/showpost.php?p=75782887&postcount=2
Click to expand...
Click to collapse
Don't have Twrp, can't flash custom recovery, it says partition table does not exist
boot to fastboot and
give the command
fastboot boot twrp.img
instead of fastboot flash recovery twrp.img

Categories

Resources