wifi and network not working after installing factory image - Google Pixel 5 Questions & Answers

Hello,
I've rooted my pixel 5 and it was running without any issues. But I wanted to return back to stock. So installed the factory image from google and once booted up, I lost wifi and network completely. When I check the about phone in settings, wifi mac address shows as "unavailable" also in the imei number, I dont see my imei number, its just some default value starting with 0044991..
When I check the barcode in fastboot mode, it shows the correct imei etc.
Anyone has any suggestion on how to solve this?
Thanks in advance

matruck said:
Hello,
I've rooted my pixel 5 and it was running without any issues. But I wanted to return back to stock. So installed the factory image from google and once booted up, I lost wifi and network completely. When I check the about phone in settings, wifi mac address shows as "unavailable" also in the imei number, I dont see my imei number, its just some default value starting with 0044991..
When I check the barcode in fastboot mode, it shows the correct imei etc.
Anyone has any suggestion on how to solve this?
Thanks in advance
Click to expand...
Click to collapse
Did you use the right build for the right carrier? How did you flash it, did you sideload it via adb sideload xxx.zip? If not, try that as a next step.

Yes I had checked and its correct, I've used the RQ1A.201205.011 (the one for all carriers except AT&T and Verizon). I've also tried the OTA sideload method, it also didnt work out.
I already have a QCN backup which was taken with the method linked in the below. But the same method also no longer work now, the command diag_mdlog no longer hangs, it just continues to work in an endless loop, when I cancel, I can see the device in QPST but the port constantly drops and reconnects, so I cannot restore it (even if I could, not sure if it will fix)
How to add 5G configurations to your Pixel 5 (solved)
Hi all Similarly to the Oneplus 8 series, Pixel 5 does not support 5G in countries that it is not sold in. For Oneplus, configurations could be changed using the Qualcomm QPST file manager...
forum.xda-developers.com
I just tried to extract below partitions to have a look and seems like the fsg partition is empty which seems weird, the image file is completely filled with zeros, do you or any one has the unlocked version that can run the last command below and send me the fsg partition image?
dd if=/dev/block/platform/soc/1d84000.ufshc/by-name/modemst1 of=/sdcard/modemst1
dd if=/dev/block/platform/soc/1d84000.ufshc/by-name/modemst2 of=/sdcard/modemst2
dd if=/dev/block/platform/soc/1d84000.ufshc/by-name/fsg of=/sdcard/fsg

In below link, it mentions that fsg is a backup of modemst1. So what if I overwrite fsg (which is already filled with zeros as mentioned in above post) with the modemst1 image I have which already have data in it?
[INFO] ANDROID DEVICE PARTITIONS and FILESYSTEMS
NOTE: I'm not a developer or something even near to that. I'm a newbie and will be, seems so. All information provided here is copied and compiled from different internet sources like this and many others. This information is according to best of...
forum.xda-developers.com

and one more question, I tried to erase the modemst1 and modemst2 as suggested in below link via ADB, it had no effect. So I erased them again and right after I erased have taken a backup to see if its all zeros in both partitions but no, they both has still data inside.
I'm trying to erase via fastboot but that also gives error and doesnt allow. Any idea why this might be?
Code:
fastboot erase modemst1
Erasing 'modemst1' FAILED (remote: 'Not allowed to erase (modemst1)')
fastboot: error: Command failed
How to Fix Empty IMEI, Corrupted EFS, No SIM, Unknown Baseband and WiFi/Bluetooth issues after restoring a TWRP Backup
While flashing things with TWRP is fun and games, it can sometimes also lead to serious issues on your device. If proper care is not taken or if the installed TWRP recovery on your device has bugs/…
nerdschalk.com

It sounds like there may be something wrong with the baseband; try reflashing the baseband image.
If that doesn't work, I would recommend a complete factory reflash. Use the Android Flash Tool, force flash all partitions and wipe data. You'll have to start over, but at least it should get the device working.

Related

[Q] Possible soft brick. When attempting to flash, gets error can't mount /system

Ok, so I was running a custom ROM (I don't even recall which specific one at the moment....one of the Cromi ROMs). I tried to wipe it and install a new version, and the install didn't go as smoothly as planned. I can still load the TWRP recovery system, and begin attempting to install any ROM, but when it gets to the point where it says it's installing, the bar across the bottom that should show progress disappears almost instantly and the next button becomes available. When I go to reboot, it warns that there is no OS installed. Of course if I continue anyway, it won't boot beyond the Asus splash screen. There are errors in multiple places saying that it can't mount /system. I saw this error in the log file generated, I saw it during reboot, and there was some point in the TWRP screens where I saw it, but can't recall where at this moment. If I go into the Mounts section, System is not checked and I cannot check it.
I tried following the instructions on the unbricking thread and got stuck. I fear this has likely only made matters worse.
Following these steps:
Code:
fastboot erase boot
fastboot erase staging
fastboot format system
fastboot flash staging blob
fastboot flash boot boot.img
fastboot flash recovery.img
fastboot reboot-bootloader
I was able to successfully erase the partitions mentioned, then when I tried to flash the first time, I actually screwed up and didn't have the blob file I needed, so now I go back, and obviously I can't re-erase the other files, but formatting system still works, so I know I'm getting good communication with the device. Then trying to flash the blob to staging, I get:
sending 'staging' (1379 KB)...
FAILED (command write failed (No such device or address))
Any thoughts or suggestions would be greatly appreciated. I've currently got an expensive paperweight.

[FIX] Empty IMEI, Unknown Baseband, No SIM, WiFi/Bluetooth unusable, Corrupted EFS

My EFS partition was corrupted after an EFS restore from TWRP (Check post #2 for link to explanation).
I was in panic mode when the super helpful folks over at #twrp sorted me out with this solution (thank you so much @jcadduono). Thought I would share it so it could possibly help someone else.
This has worked on my OnePlus 3, but it might even work on other devices.
Do this AT YOUR OWN RISK. I am not responsible for your device.
Boot into TWRP (Poweroff, then power on using Vol Down + Power Button)
Go to Advanced > Terminal
Type in the following commands:
Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1
Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst2
Reboot
Alternatively, you could also do this from your computer over adb with the following commands:
Code:
adb shell 'dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1'
Code:
adb shell 'dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst2'
Alternatively, you could try this [Though I haven't tested this myself]:
Make sure you have fast boot and drivers (for info look here)
Boot into fastboot (Poweroff, then power on using Vol Up + Power Button)
Type in the following commands into terminal:
Code:
fastboot erase modemst1
Code:
fastboot erase modemst2
Reboot
Good luck and I hope this helps!
PS: It is best to backup your EFS before something like this happens.
Take 5 minutes out of your day to do this. You can find a tool to do this here, or do it yourself by following the instructions here.
I'm just going to go ahead and link here for an explanation:
http://forum.xda-developers.com/showpost.php?p=68500121&postcount=64
BTW: Is this issue still present on OnePlus 3 official TWRP? If so we can recompile it, we *should* have all the bugs fixed in android-6.0 latest branch right now. Currently main development is happening on android-7.0 branch of omnirom/android_bootable_recovery (TWRP) but we've backported bug fixes to android-6.0 only and it's probably a good idea for developers to use that as a "stable" branch for now.
jcadduono said:
I'm just going to go ahead and link here for an explanation:
http://forum.xda-developers.com/showpost.php?p=68500121&postcount=64
BTW: Is this issue still present on OnePlus 3 official TWRP? If so we can recompile it, we *should* have all the bugs fixed in android-6.0 latest branch right now. Currently main development is happening on android-7.0 branch of omnirom/android_bootable_recovery (TWRP) but we've backported bug fixes to android-6.0 only and it's probably a good idea for developers to use that as a "stable" branch for now.
Click to expand...
Click to collapse
So, I'm not sure what version of TWRP I used to backup, but whatever it was, I only had a single efs backup (efs1.emmc.win). efs2.emmc.win was not present at all. I am guessing during restore, this is what must have caused the problem. I am not sure if TWRP should be checking for sub partitions before restore, but it definitely didn't throw any errors. Only if I had md5 check enabled did it complain that the md5 did not match '' (empty string), which is when I realized what had happened.
kgs1992 said:
So, I'm not sure what version of TWRP I used to backup, but whatever it was, I only had a single efs backup (efs1.emmc.win). efs2.emmc.win was not present at all. I am guessing during restore, this is what must have caused the problem. I am not sure if TWRP should be checking for sub partitions before restore, but it definitely didn't throw any errors. Only if I had md5 check enabled did it complain that the md5 did not match '' (empty string), which is when I realized what had happened.
Click to expand...
Click to collapse
Yeah the adb backup patch went in and broke restore and backup of subpartitions, backup was fixed not much later so you must have had a twrp build from just after the adb backup patch (which broke stuff), it wasn't for a few weeks until the restore issue was noticed, where it restored 1st partition in the backup to all subpartitions of it. Those are all fixed now but there could still be builds out there with any or all of those issues.
Reason it wasn't so noticed was not many devices with multiple subpartitions attached to one partition and not many people backing up and restoring efs. (which is often subpartitioned in twrp)
3rd way worked for me. thx
NickosD said:
3rd way worked for me. thx
Click to expand...
Click to collapse
You're welcome, but it's the folks at twrp that deserve to be thanked.
sry if my question too noob
but im curious
whats that "fastboot erase modemst1" meaning?
delete something or what?
im google it before asking here, haha
D4almond said:
sry if my question too noob
but im curious
whats that "fastboot erase modemst1" meaning?
delete something or what?
im google it before asking here, haha
Click to expand...
Click to collapse
Yes, you are erasing that partition, which the modem then rebuilds, as mentioned in the link in post #2
Thx for the explanation!
Nice thread btw, i believe this will save many hard ass out there, kek
Sent from my A0001 using Tapatalk
This worked successfully on my Mi 5. So basically I restored a backup with TWRP 3.0.2-2 and it messed up my modem, lost IMEI etc.
I followed the steps in TWRP itself > Terminal and typed the codes. Rebooted and worked.
Thank you so much for putting up the guide. I though I'd be buying an iPhone 7+ or LGV20 but because this fixed my phone, you saved me a lot of money.
@ northropgrummanrq180
Please Help ME! Save US!
http://forum.xda-developers.com/mi-5/how-to/xiaomi-mi5-efs-backup-restore-methods-t3432730
https://xiaomi.eu/community/threads/mi5-no-imei-no-modem-no-baseband-need-help.36225/
Thank you for sharing this and everyone at TWRP!!!!!!! I thought my phone was deader than a door nail!!! Method 1 worked for me perfect. Has this bug been fixed yet in the latest official version of TWRP??
I've fixed my MI5, which didn't have a baseband anymore after I've accidentally restored the efs in TWRP, using this tutorial. Thanks so much!
kgs1992 said:
My EFS partition was corrupted after an EFS restore from TWRP (Check post #2 for link to explanation).
I was in panic mode when the super helpful folks over at #twrp sorted me out with this solution (thank you so much @jcadduono). Thought I would share it so it could possibly help someone else.
This has worked on my OnePlus 3, but it might even work on other devices.
Do this AT YOUR OWN RISK. I am not responsible for your device.
Boot into TWRP (Poweroff, then power on using Vol Down + Power Button)
Go to Advanced > Terminal
Type in the following commands:
Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1
Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst2
Reboot
Alternatively, you could also do this from your computer over adb with the following commands:
Code:
adb shell 'dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1'
Code:
adb shell 'dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst2'
Alternatively, you could try this [Though I haven't tested this myself]:
Make sure you have fast boot and drivers (for info look here)
Boot into fastboot (Poweroff, then power on using Vol Up + Power Button)
Type in the following commands into terminal:
Code:
fastboot erase modemst1
Code:
fastboot erase modemst2
Reboot
Good luck and I hope this helps!
PS: It is best to backup your EFS before something like this happens.
Take 5 minutes out of your day to do this. You can find a tool to do this here, or do it yourself by following the instructions here.
Click to expand...
Click to collapse
"by-name" here means?
I didn't have wi-fi unusable or anything on my OP3, but I was only getting signal for emergency calls before trying a series of things including this. This happened after flashing open beta 9 from an earlier community build. First let me just say in my case in TWRP I wiped then changed /data partition to f2fs and clean flashed the beta as usual along with superSU. Then started my phone and realized I was only able to make emergency calls.
So I tried playing in Settings > Sim & Network > SIM 1 & tried resetting network operators & finding automatically. That may have helped.. but I didn't see any improvement so I removed my sim, reinserted & restarted. It didn't seem to be fixed by then so I tried the 3 methods OP posted. Only#1 worked in my case, but data appears to be working normally now. Whether it was the last thing I tried or some combination, IDK.
Just wanted to write all this out in case anyone is still having issues after following OP's instructions.
Thanks!
Used the dd commands in both adb shell and twrp terminal and get "dd: /dev/block/bootdevice/by-name/modemst1: No space left on device". Also tried the fastboo0t commands and got "FAILED (remote: Partition flashing is not allowed)" Any ideas?
Worked like a charm
Thank you so much! you just saved my new Mi5 prime which i messed up by trying to unlock more LTE bands.
kenboyles72 said:
Used the dd commands in both adb shell and twrp terminal and get "dd: /dev/block/bootdevice/by-name/modemst1: No space left on device". Also tried the fastboo0t commands and got "FAILED (remote: Partition flashing is not allowed)" Any ideas?
Click to expand...
Click to collapse
am also having the same issue with my htc one e8, am getting remote: partition is not allowed. Please anyone with a solution about this should share
thank you very much hope GOD replied to your knowledge
Great explanation! My phone was stuck in a soft-brick mode yesterday. Followed the mega unbrick guide and got it working again, albeit being reverted to OOS 3.1.2. The cellular network is fine (I can make and receive calls, and mobile data is working), although WiFi and Bluetooth don't work. I tried rebooting into fastboot and erasing the two
Code:
modemst
files but to no avail.
Any reason as to why this is happening?

moto e4 plus owen xt1776 vram backup

could someone with this model run these and give me the images
dd if=/dev/block/platform/.../.../by-name/nvram of=/sdcard/nvram.img
dd if=/dev/block/platform/.../.../by-name/nvdata of=/sdcard/nvdata.img
suckme69 said:
Admin Note: This is a special Q&A-formatted thread. Please follow this link to view it in your browser: http://xda.tv/post75038379
Click to expand...
Click to collapse
I would, but those are not block partitions that can be pulled like that.
Sent from my Moto E (4) Plus using XDA Labs
i dont know the excact block but my imie wifi baseband and bluetooth do not work ans was told i flashed my nv ram wouldyou know how to repair this?
Those are not block partitions on this device. I think they are only on Mediatek devices and your XT1776 is Qualcomm. You should probably try flashing stock firmware with fastboot or RSDlite. Download the one with owens_sprint_7.1.1 in the title.
i have like 5 times and i get null imei
Try flashing this modem/fsg:
https://www.androidfilehost.com/?fid=962157660013069126
nope did nothing
https://youtu.be/I8V9ud4PGUk
thats how i been flashing because in windows 10 rsd lite dont work
You should thank me later !
Copy and paste.
Click Here ! #Post8
EDIT : i don't have that device anymore. so i can't help you with this. unable to remind the full directory name.
EDIT : Here is the correct path.
---- For MediaTek Variant ----
Nvram :
dd if=/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/nvram of=/sdcard/nvram.img
Nvdata :
dd if=/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/nvdata of=/sdcard/nvdata.img
---- For Qualcomm Variant ----
Nvram :
dd if=/dev/block/bootdevice/by-name/nvram of=/sdcard/nvram.img
Nvdata :
dd if=/dev/block/bootdevice/by-name/nvdata of=/sdcard/nvdata.img
They are not at that path on the Qualcomm variant. I'd post a screenshot if I could here.
drop here you device recovery.fstab data.
how do i get that?
https://github.com/ReimuHakurei/twrp_device_motorola_owens/blob/twrp/twrp.fstab
did anyone figure anything out?
Yes, your phone is probably basically a tablet now. When your problem started, what exactly did you do? Did you flash LineageOS or something without activating the phone on stock firmware first? Did you run any fastboot erase commands like fastboot erase recovery? If so, you should not ever do either of those. The only thing I can say to try, is to remove the sim card, flash stock firmware, boot the phone to the setupwizard and then power it off. Next re-insert the sim card and turn the phone back on. If you don't get it to connect now, or if you didn't activate it already, try calling your carrier customer service and see if they can help you.
In MediaTek, variant IMEI stored in Nvram partition (non-volatile random access memory). whereas in Qualcomm Variant it is stored in raw EFS, modemst1 & modemst2 partition. Probably you lose your device nvdata and it is of no use. Service center guy can fix this by replacing a small chip within the motherboard (in my case its *PCB*). After all this you will get a new imei number.
Hope this helps.
i flashed the files in the order my flash file said i generated the commands by hand because i could not find any on xda for my device
@suckme69 Try this, either with adb with the OS booted or with a terminal emulator on your device, type:
reboot nvbackup
With terminal emulator you'll have to type su then enter for su permissions. Hope this works!
thanks for your guys help but i finally figured it out for some reason my modem image from my sprint stock package i downloaded didn't work or i wrote the sequence wrong.but i decided to flash the partition package for boot on my sprint phone from getoffmylawns forum but it was giving my crashing for my phone ,phone has crashed but i got service!. so i opened up the boost flash package and got the modem image off there. after flashing my stock firmware package threw the boot-loader i then flashed the modem i pulled from the boost partition zip . i was also flashing threw Ubuntu with the rsd lite someone posted because rsd lite doesn't work with windows 10 .and the reason i decided to flash the boost package because well it was the same model phone and the carriers boost and sprint are the same they use the same towers and sprint owns boost so i saw no harm done.

[Guide] About repairing/fixing the persist partition

Disclaimer: I am not responsible for the results of any of these operations.
Everyone knows that the persist partition is responsible for sonsors and carrier network etc. Once this partition is failed or lost, your phone will go wrong. I just faced, then solved the problem and I want to share the solution that could maybe help other persons.
This was how it happeded:
While I was flashing the phone, I erased the partition called "persist" accidently. When I was trying to flash the persist partition, the phone returned a message said that you can't flash the controlled partition. I suddenly relized something bad happened. Then I reboot the phone and find that many sensors stopped working. But the worst thing is the carrier network signals lost. I want to contact the service center at first. But I think as long as the phone is unlocked, there are tons of possibilities to fix it, unless it's hard-bricked. So I wanted to try to fix the partition.
As we know, Xiaomi phones have backup partitions for most of the important partitions. For example, vbmeta and vbmetabak partitions. The vbmetabak usually is the backup of vbmeta. This persist partition also has a backup partition called "persistbak". This backup partition can be used to repair the persist partition. There are 2 ways to fix the persist partition. Choose the method you preferred.
1. This way is for users have erased the persist partition, but haven't modified/erased the persistbak partition. If you don't want to type commands just use method 2.
Go to fastboot, flash the twrp recovery first. Then hold the POWER and VOLUME UP to force the phone boot to twrp recovery. Connect the phone to your PC and open adb command window. Type the following commands in order:
adb shell
cd /dev/block/by-name
ls -all
Check the output, find the partitions called "persist" and "persistbak". Remember the blocks corresponding to these two partitions. They should be similar to "mmcblk0p**". Once you know these correspondences, you can restore the persist partition immediately. For example, the persist partition and persistbak partition correspond to mmcblk0p$$ and mmcblk0p%% respectively (persist---->mmcblk0p$$ and persistbak---->mmcblk0p%%). Run this following command to restore your persist partition:
dd if=/dev/block/mmcblk0p%% of=/dev/block/mmcblk0p$$
Note: You need to replace "mmcblk0p$$" and "mmcblk0p%%" with the real partition block name.
Now the persist partition has been fixed/restored. Reboot your phone to system and check whether sensors and carrier network etc. all work fine.
2. This way is for users that have erased persist partition and persistbak partition or can't restore the partition using method 1. Also, this method is a universal and easy way to fix both persist partition and persistbak partition. It doesn't need to type any command but only a swipe.
I have made the persist partition repair tool for both global version and Chinese version. Both of them are in attachments. These tools make the repair process very easy. Both flashable zip files are tested on my Redmi Note 8 and they work fine.
I have also posted them to Mi Community.
Flash the repair tool in attachment. Choose the right file and flash it.
Now the persist partition and persistbak partition have been fixed/restored. Reboot your phone to system and check whether sensors and carrier network etc. all work fine.
If you think it's useful, please click the "Like" button.
Yuki1001 said:
Disclaimer: I am not responsible for the results of any of these operations.
Everyone knows that the persist partition is responsible for sonsors and carrier network etc. Once this partition is failed or lost, your phone will go wrong. I just faced, then solved the problem and I want to share the solution that could maybe help other persons.
This was how it happeded:
While I was flashing the phone, I erased the partition called "persist" accidently. When I was trying to flash the persist partition, the phone returned a message said that you can't flash the controlled partition. I suddenly relized something bad happened. Then I reboot the phone and find that many sensors stopped working. But the worst thing is the carrier network signals lost. I want to contact the service center at first. But I think as long as the phone is unlocked, there are tons of possibilities to fix it, unless it's hard-bricked. So I wanted to try to fix the partition.
As we know, Xiaomi phones have backup partitions for most of the important partitions. For example, vbmeta and vbmetabak partitions. The vbmetabak usually is the backup of vbmeta. This persist partition also has a backup partition called "persistbak". This backup partition can be used to repair the persist partition. Here is a way to fix the persist partition.
This way is for users have erased the persist partition, but haven't modified/erased the persistbak partition.
Go to fastboot, flash the twrp recovery first. Then hold the POWER and VOLUME UP to force the phone boot to twrp recovery. Connect the phone to your PC and open adb command window. Type the following commands in order:
adb shell
cd /dev/block/by-name
ls -all
Check the output, find the partitions called "persist" and "persistbak". Remember the blocks corresponding to these two partitions. They should be similar to "mmcblk0p**". Once you know these correspondences, you can restore the persist partition immediately. For example, the persist partition and persistbak partition correspond to mmcblk0p$$ and mmcblk0p%% respectively (persist---->mmcblk0p$$ and persistbak---->mmcblk0p%%). Run this following command to restore your persist partition:
dd if=/dev/block/mmcblk0p%% of=/dev/block/mmcblk0p$$
Note: You need to replace "mmcblk0p$$" and "mmcblk0p%%" with the real partition block name.
Now the persist partition has been fixed/restored. Reboot your phone to system and check whether sensors and carrier network etc. all work fine.
2. This way is for users that have erased persist partition and persistbak partition or can't restore the partition using method 1.
Find someway to download the fastboot ROM for your device. Exract the tgz file and open the folder called "images". Copy the "persist.img" to the adb tool folder. Because of the limitations of Xiaomi, you can't flash the persist partition or the persistbak partition directly. Copy the persist img file to the internal storage or sdcard on your phone. Now reboot to twrp recovery, connect the phone to your PC. Use these command to make a file that you can dd it to the persist partition and the persistbak partition:
adb shell
simg2img /sdcard/persist.img /sdcard/persist333.img
Now you have a file that can dd to the persist/persistbak partition. Then type these following commands in order:
cd /dev/block/by-name
ls -all
Check the output, find the partitions called "persist" and "persistbak". Remember the blocks corresponding to these two partitions. They should be similar to "mmcblk0p**". Once you know these correspondences, you can restore the persist partition and the persistbak partition immediately. Type these following commands in order:
dd if=/sdcard/persist333.img of=/dev/block/mmcblk0p$$
dd if=/sdcard/persist333.img of=/dev/block/mmcblk0p%%
Note: You need to replace "mmcblk0p$$" and "mmcblk0p%%" with the real partitions block name.
Now the persist partition and persistbak partition have been fixed/restored. Reboot your phone to system and check the whether sensors and carrier network etc. all work fine.
If you think it's useful, please click thanks button.
Click to expand...
Click to collapse
Does this fix "device storage corrupted" error?
Actually I have this error but my sensors, carrier, wifi ... Etc all working great this error still appears. Anyway I think magisk hide config props module damaged my device's persist when I changed the fingerprint then I came back to stock rom and this error happened so my question is: is this process risky Or could cause losing mac or imei? And am I going to lose widevine l1?
I'm thinking about backing up my current persist before proceeding do you think it's a good idea?
[email protected] said:
Does this fix "device storage corrupted" error?
Actually I have this error but my sensors, carrier, wifi ... Etc all working great this error still appears. Anyway I think magisk hide config props module damaged my device's persist when I changed the fingerprint then I came back to stock rom and this error happened so my question is: is this process risky Or could cause losing mac or imei? And am I going to lose widevine l1?
I'm thinking about backing up my current persist before proceeding do you think it's a good idea?
Click to expand...
Click to collapse
Yes. It can fix "find device storage corrupted" . You won't lose your imei or mac. At that time I erased the persist partition by a command "fastboot erase persist" accidently. I have tried both method 1 and 2, and the error is no longer appeared.
About backing up, the persistbak partition is a backup partition for your current persist partition. So if you failed, just restore the persistbak to the main persist partition. And you can also export the raw image of your current persist partition. Of course, the error will appear if you restore the corrupted persistbak.
Update: I have uploaded the persist partition repair tool for both global version and Chinese version. Both of them are in attachments. These tools make the repair process very easy. Both flashable zip files are tested on my Redmi Note 8 and they work fine.
realgordboy said:
Good work.
Just one query. In your original post, you mention simg2img command. I'm wondering if that is actually needed or wanted, given that the fastboot ROMs contain persist images that are not sparse.
Click to expand...
Click to collapse
Yes. You are right. I have been flashed my redmi note 5's persist partition and its a sparse img file. Look like this img file is a raw img not sparse file. Thanks for the tip. I have changed the content of method 2. And it's really easy to flash both persist and persistbak using my repair tool.
realgordboy said:
Looks like we both had the same good idea. I made a zip for my Redmi Note 8T, that does more or less the same, restoring both persist and persistbak to "pristine" condition.
My fix : https://forum.xda-developers.com/redmi-note-8/how-to/fix-persist-partition-getting-mangled-t4112133
Click to expand...
Click to collapse
Yes. That's a good work. Thanks for sharing. I really have the same idea to you. I will test your file later with replacing your persist.img in the zip file.
realgordboy said:
Are you serious?
Of course I tested it. In fact I tested it extensively, and the script has error checking for every single action command
The persist image, as I explained in my post is from the Global Note 8T 11.0.4.0 ROM. It will only probably work on the Note 8T.
It would of course work on just about any similar phone, if you replace the persist image with your own.
Click to expand...
Click to collapse
OK. Thanks for the reply I will test your zip file tomorrow. It should be a good work. Just technical discussion, nothing else.
realgordboy said:
Your original method 2 used 'dd'. Are you saying 'dd' is wrong?
Are you saying that in addition to the incorrect use of simg2img, your entire method was faulty?
And just what exactly is the difference between 'dd' and 'package_extract_file'?
These are not questions that require an answer, because one of us already knows the answers, and checks their 'advice' before posting.
Click to expand...
Click to collapse
I don't think dd is wrong if the img is a raw image. It should can be dd to the partition. I'm sorry if I said something wrong and don't be angry please. Just discussion, nothing else. I will test your file with my persist.img tomorrow.
Hi! Thanks for the input! Would I lose L1 widevine DRM validation with this method?
CesarPedetta said:
Hi! Thanks for the input! Would I lose L1 widevine DRM validation with this method?
Click to expand...
Click to collapse
Is your persist partition broken? If so just flash it. Don't think too much. The phone works normally is the first thing. And sorry, I don't know if it will effect the widevine DRM security level. Don't use it like a toy. Persist means "persist", its data should not be changed after shipping. Only flash it when your persist partition is broken or cannot works properly.
hello,
i have Mi 9T pro i have bug with light and proximity sensor, after flash persist.img with orange fox my sensor work but for few moment and stop work again look at the evidence
thx 4 the tutorial
can I flash this two files on my poco F2 Pro ? I have problem with persist image, lost my fingerprint sensor..
Is there an chance to get the the persist partition file for Willow please?
I tried to restore from bak files, didn't work.
autobrightness is not working for me. after ive flashed fastboot rom .. i noticed that my screen was very bright at nigth. so checked brightness.
manually brightness works ok up and down.. but in auto only works on high settings but it wont go down. or seems to go down but brightess doesnt change..
enter cit presing kernel verion did a test on light sensor. flux sensor goes up and down depending of light but the brightness value doesnt change down only up high.
WinBug2 said:
Is there an chance to get the the persist partition file for Willow please?
I tried to restore from bak files, didn't work.
Click to expand...
Click to collapse
Just download the fastboot ROM which version you are using. Extract it and you can find persist.img in images folder.
Hi, thanks for sharing.
im using mi note 10, im losing the /persist partition directory, somehow it losing after flashing custom rom, how to get it back? Im editing your file and change to my phone original persist.img, and flashing on twrp it end to fastboot bootloop. My sensor are working, but after loosing my /persist directory the fingerprint scanner "cant add fingerprint, try again" Error.
I check at miflash, theres no option to install/create persist.img partition at promram0.xml line to fix this (somehow im suprising about this, because at my old whyred phone theres an option to create the partition), Could you help me solving this?
Yuki1001 said:
Disclaimer: I am not responsible for the results of any of these operations.
Everyone knows that the persist partition is responsible for sonsors and carrier network etc. Once this partition is failed or lost, your phone will go wrong. I just faced, then solved the problem and I want to share the solution that could maybe help other persons.
This was how it happeded:
While I was flashing the phone, I erased the partition called "persist" accidently. When I was trying to flash the persist partition, the phone returned a message said that you can't flash the controlled partition. I suddenly relized something bad happened. Then I reboot the phone and find that many sensors stopped working. But the worst thing is the carrier network signals lost. I want to contact the service center at first. But I think as long as the phone is unlocked, there are tons of possibilities to fix it, unless it's hard-bricked. So I wanted to try to fix the partition.
As we know, Xiaomi phones have backup partitions for most of the important partitions. For example, vbmeta and vbmetabak partitions. The vbmetabak usually is the backup of vbmeta. This persist partition also has a backup partition called "persistbak". This backup partition can be used to repair the persist partition. There are 2 ways to fix the persist partition. Choose the method you preferred.
1. This way is for users have erased the persist partition, but haven't modified/erased the persistbak partition. If you don't want to type commands just use method 2.
Go to fastboot, flash the twrp recovery first. Then hold the POWER and VOLUME UP to force the phone boot to twrp recovery. Connect the phone to your PC and open adb command window. Type the following commands in order:
adb shell
cd /dev/block/by-name
ls -all
Check the output, find the partitions called "persist" and "persistbak". Remember the blocks corresponding to these two partitions. They should be similar to "mmcblk0p**". Once you know these correspondences, you can restore the persist partition immediately. For example, the persist partition and persistbak partition correspond to mmcblk0p$$ and mmcblk0p%% respectively (persist---->mmcblk0p$$ and persistbak---->mmcblk0p%%). Run this following command to restore your persist partition:
dd if=/dev/block/mmcblk0p%% of=/dev/block/mmcblk0p$$
Note: You need to replace "mmcblk0p$$" and "mmcblk0p%%" with the real partition block name.
Now the persist partition has been fixed/restored. Reboot your phone to system and check whether sensors and carrier network etc. all work fine.
2. This way is for users that have erased persist partition and persistbak partition or can't restore the partition using method 1. Also, this method is a universal and easy way to fix both persist partition and persistbak partition. It doesn't need to type any command but only a swipe.
I have made the persist partition repair tool for both global version and Chinese version. Both of them are in attachments. These tools make the repair process very easy. Both flashable zip files are tested on my Redmi Note 8 and they work fine.
I have also posted them to Mi Community.
Flash the repair tool in attachment. Choose the right file and flash it.
Now the persist partition and persistbak partition have been fixed/restored. Reboot your phone to system and check whether sensors and carrier network etc. all work fine.
If you think it's useful, please click thanks button.
Click to expand...
Click to collapse
not to hate or dislike or be rude or anything... but people will lose Widevine L1 support by this method... so if anyone doesn't want HD videos on netflix etc, go ahead with this method.. otherwise don't even touch persist partition.
Thank you so much, flashing the zip worked !
Where can i find repair_persist-willow.zip ? From gingko not work.

[Tutorial] Crossflash, Bypass OPID Mismatched Error

Hi there
Thanks to all other guys here who have made helpful development to tame this beautiful =)
To crossflash models other than LG G8 please read post 3.
Before asking any question please read the troubleshooting section at the bottom of the page.
If you still need some specific help I would appreciate if you bring it up just in the thread instead of sending direct messages.
LG has made things difficult in flashing custom and even stock roms by this new OPID thing! It prevents us from crossflashing but we have been able to use TWRP and change the system and some other partitions to have a different rom. We had to make some changes into OP partition using HxD editor.
But now, through this tutorial, we're able to flash any rom without the need to change OPID in OP partition. Also, there is no need to root or unlock boot-loader.
I was successful to do this on some G8 (LMG820UM) but I AM NOT RESPONSIBLE FOR ANY HARM TO YOUR PHONE!
By continuing to read the following instructions you are actually accepting the risk.
IMPORTANT!
first, MAKE A FULL BACKUP OF ALL PARTITIONS; and I mean it!!!
at least, for your sake, make a backup of "modemst1, modemst2, fsg, fsc, ftm" partitions, for emergency.
Requirements
QPST and Qualcomm USB Driver (get)
LGE SM8150 Firehose (get)
LGUP 1.16.0.3 (get)
LGUP_Common.dll (get)
UI_Config.lgl (get)
LG Mobile Driver 4.4.2 (get)
Preparation
1. Install QPST and Qualcomm USB Driver.
2. Install LGUP.
3. Find the folder named "model" in the installation directory of LGUP, then Create a folder named "common" in the "model" folder.
4. Move "LGUP_Common.dll" and "UI_Config.lgl" into "common" folder. Change the attribute of "UI_Config.lgl" to read only.
5. Install LG Mobile Driver 4.4.2.
Steps
A)
1. Open QFIL.
2. Change "Storage Type" to UFS.
3. Select "Flat Build".
4. Browse for "LGE SM8150 Firehose" and pick it.
5. Now, connect the phone to PC and boot into EDL mode.
6. Open "Select Port" and select the phone, press OK.
7. In "Tools" open the "Partition Manager".
B)
!!!BE CAREFUL TO DO EXACTLY AS THE INSTRUCTIONS SAY OR YOU WILL BRICK THE PHONE!!!
1. Make a backup of and erase these 7 partitions: FTM, Modem_A, Modem_B, SID_A, SID_B, OP_A, OP_B.
1.1. You have to left-click on a partition then right-click on it and select "Manage Partition Data".
1.2. In the pop-up window, you have 4 choices: I. Erase (to erase data on the partition), II. Read Data (to dump or back up the partition), III. Load Image (to restore the partition), IV. Close (to close the window).
1.3. First dump/back up the partition by choosing "Read Data" then Erase it.
2. Close the "Partition Manager" window.
3. Wait for 5 seconds then press Vol- and Power until it restarts.
3.1. Immediately after rebooting, Release the Vol- and Power buttons and press Vol+ to get into Download Mode.
Note: Do not let the phone to begin to boot! If it begins to boot, it may regenerate the SID and FTM partitions data and so you need to redo the whole step B.
C)
1. Open LGUP.
2. Pick your favorite KDZ.
3. Select "PARTITION DL".
4. Press Start. And a pop-up window will appear. In this window you can select which partitions to be flashed.
5. Here, uncheck these partitions: SID_A and SID_B. It will make it able to bypass the OPID Mismatched Error.
6. If you are in Sprint or other platforms you will get the message whether to change the model or not. Of course you know what to do =)
after completing the process it will boot up in some minutes and before starting the customization it will do one restart. just be patient.
ERRORS, QUESTIONS, TROUBLESHOOTING
1. Can I crossflash V50, V60, G8X or other LG devices using this method?
I did it on V50. Maybe it'll work on your devices maybe won't. There's one way to find out; make backup and give it a try.
2. SN is gone, zero, etc.
Restore your original FTM.
3. I can't get into recovery.
Restore the original FTM.
4. I got NT-Code error.
It's been discussed many times in the thread and some solutions have been presented (such as this one, thanks to @animo214 and this, thanks to @kt-Froggy as well as this one, thanks to @StvOchi ). However, you can ignore it if the phone got network.
Note: You need to disable verity on the phone in advance otherwise changes in cust_path_mapping.cfg won't be saved.
5. IMEI is lost, zero, null etc.
Restore LUN5 partitions. If you have no backup it should be repaired using Octopus box. Go to 16.
6. I got "permanently locked" error.
This is because of IMPL lock and you have to restore LUN5 partitions. In case of having no backup you should use Octopus box.
7. All partitions are deleted accidentally.
Follow this instructions.
8. I need to get into PDM mode.
Unzip and restore the attached PDM to FTM partition. Remember, you need to restore your FTM to get into OS.
9. Can I use another phone's LUN5 backup?
NO.
10. Can I use another phone's FTM backup?
Yes. All partitions can be restored from another phone's backup except LUN5 partitions.
11. My phone is stuck in boot-loop.
Restore the original FTM and if it doesn't help redo the whole crossflash process and use a different KDZ this time.
12. Which KDZ is the best (for any matter of use)?
I do not know.
13. Can I crossflash from any source variant to Korean variant or vice versa?
Yes it is possible but you may get error on opening stock camera application because of hardware differences. There are some methods to solve the issue which you can search and find them.
14. Can I downgrade using this method?
Yes.
15. I erased partitions (ftm, op_a, op_b, modem_a, modem_b, sid_a, sid_b) but it still does not let me to crossflash.
Redo the whole process and this time make backup of and erase these partitions too, on both sides A and B: vendor, product, system, boot and userdata. Do not make backup of userdata partition.
16. How can I write IMEI?
A) Dump modem_a and create a copy of it. Then open it in UltraISO and remove IMEIPROT files from image folder. Save and restore it in place of modem_a and modem_b partitions.
B) Make backup of FTM and then flash or restore the PDM file (attached) into your ftm partition. Restart the phone; you'll get into PDM mode.
C) Open Tutty (attached). Select "Serial" in protocol and the proper port of your phone's modem driver. Click open. To test if you have selected the proper port number type "at" and hit enter it should respond"ok". Type the code at%imei=# (replace # with your IMEI) and hit enter. It doesn't matter you get "error" or "ok" after that, just check if IMEI is written via this code at%imei=?. If IMEI is written so you'll have the right MEID and ESN too.
D) Restore the original ftm and modem_a in place of modem_a and modem_b. Restart the phone.
I've already tested this method on V30, V50 and G8. Remember, if the phone has IMPL lock it'll throw "perm. locked" error even if you have written the IMEI.
17. I have lost GPT files of my LG G8, G8X, G8S, V50, etc. and Qfil partition manager does not show anything in the list.
You need to flash GPT files to your device with fh_loader (see this, part C). For that matter use KDZ_Tools to Extract DZ from a KDZ of your device. Then extract the DZ using -c at the end of extracting command. For example: unkdz -f FILE_NAME.kdz -c. It will extract all files besides all GPTs.
18. Which are the LUN5 partitions?
SM8150 has 7 physical partitions known as LUNs which are numbered from 0 to 6. Each LUN is split into several partitions. In Qfil Partition Manager you can see all partitions except those of LUN3 and LUN6 which are hidden. The number of LUNs are shown under the first column named LUN. Therefore, all partitions in front of number 5 are LUN5 partitions.
Some pictures of flashing my LMG820UM, unlocked from Sprint, into OPEN_CA 20j. In normal mode you cannot flash SPR_US to OPEN_CA which is shown in the pictures. But using this thread instruction it allows to flash, even it asks to change the model from SPR_US to OPEN_CA
Until performing the instructions, it shows the "id: 2(SPR_US)" on the Download Mode screen, but after that it cannot recognize the phone model id and shows "id: 0()"
Have fun ^_^
LG K31 Crossflashing:
To crossflash LG K31 go to this guide. Thanks to @Wish39.
LG Stylo 6 Crossflashing:
To crossflash LG Stylo 6 using LG K71 Android 12 firmware see this. Thanks to @Wish39.
LG V50 Crossflashing:
I had two LG V50 (LMV450) to which I flashed Korean Andorid 12 using the method mentioned in the first post. I cannot guarantee that it will work on every V50. After corssflashing I found out that one of them had the problem of draining battery due to not getting into deep sleep mode. To overcome the issue, I reflashed it via "Chip Erase" this time, and then again reflashed it but in the same way mentioned for crossflashing in the first post. Of course, I had created backup and at the end I restored LUN5 partitions.
Hey nice! It's great to have options. I'm currently using us Open OP on my Sprint device (of course totc changed). It's working fine and not sure of any reason to change.
Although, if we do get a11 firmware available, that will change things for sure.
Thanks, nice work!
great, thank you
netmsm said:
Some pictures of flashing my LMG820UM, unlocked from Sprint, into OPEN_CA 20j. In normal mode you cannot flash SPR_US to OPEN_CA which is shown in the pictures. But using this thread instruction it allows to flash, even it asks to change the model from SPR_US to OPEN_CA
Until performing the instructions, it shows the "id: 2(SPR_US)" on the Download Mode screen, but after that it cannot recognize the phone model id and shows "id: 0()"
Have fun ^_^
Click to expand...
Click to collapse
Idk when i opened lgup it's only have 3 option refurbished, upgrade n fota update
Azs5165 said:
Idk when i opened lgup it's only have 3 option refurbished, upgrade n fota update
Click to expand...
Click to collapse
You didnt follow preparation correctly I guess?
netmsm said:
Some pictures of flashing my LMG820UM, unlocked from Sprint, into OPEN_CA 20j. In normal mode you cannot flash SPR_US to OPEN_CA which is shown in the pictures. But using this thread instruction it allows to flash, even it asks to change the model from SPR_US to OPEN_CA
Until performing the instructions, it shows the "id: 2(SPR_US)" on the Download Mode screen, but after that it cannot recognize the phone model id and shows "id: 0()"
Have fun ^_^
Click to expand...
Click to collapse
What OPID does it get assigned once you boot the device? OPEN_CA?
AsItLies said:
Hey nice! It's great to have options. I'm currently using us Open OP on my Sprint device (of course totc changed). It's working fine and not sure of any reason to change.
Although, if we do get a11 firmware available, that will change things for sure.
Thanks, nice work!
Click to expand...
Click to collapse
Like the a11 korean one?
cloud1250000 said:
You didnt follow preparation correctly I guess?
Click to expand...
Click to collapse
I had tried with my lmg850um9 sprint,i accidentally erase entire flash before but i successfull flash with other g8x em kdz but get opid missmatched
Azs5165 said:
Idk when i opened lgup it's only have 3 option refurbished, upgrade n fota update
Click to expand...
Click to collapse
i got the same problem, just 3 options
Just did this successfully, thanks OP. If yer only getting partial options on lgup, remember from the OP, you HAVE to change the UI file to be READ ONLY (do it in properties).
I didn't get the 'change model' pop up, but still worked, although device is still seen as 'um' not 'qm'. My serial # is missing (that's a simple edit in ftm), but the imei is there.
Definitely worked though, now have us op with april security patch.
Will take a few mins to get a root explorer to see what totc says... that should be interesting
AsItLies said:
Just did this successfully, thanks OP. If yer only getting partial options on lgup, remember from the OP, you HAVE to change the UI file to be READ ONLY (do it in properties).
I didn't get the 'change model' pop up, but still worked, although device is still seen as 'um' not 'qm'. My serial # is missing (that's a simple edit in ftm), but the imei is there.
Definitely worked though, now have us op with april security patch.
Will take a few mins to get a root explorer to see what totc says... that should be interesting
Click to expand...
Click to collapse
How to make it?srry i cant understand
alright, G8x Sprint succesfully crossflashed to OPEN CA
Azs5165 said:
Idk when i opened lgup it's only have 3 option refurbished, upgrade n fota update
Click to expand...
Click to collapse
Sebastian Thiago said:
i got the same problem, just 3 options
Click to expand...
Click to collapse
Azs5165 said:
How to make it?srry i cant understand
Click to expand...
Click to collapse
Follow preparation.
cloud1250000 said:
What OPID does it get assigned once you boot the device? OPEN_CA?
Click to expand...
Click to collapse
AsItLies said:
Will take a few mins to get a root explorer to see what totc says... that should be interesting
Click to expand...
Click to collapse
Actually it doesn't change OPID. By not flashing SID partitions we can bypass checking OPID and hence the error.
I checked it now it was OPEN_CA.
Azs5165 said:
I had tried with my lmg850um9 sprint,i accidentally erase entire flash before but i successfull flash with other g8x em kdz but get opid missmatched
Click to expand...
Click to collapse
Follow the steps in part C.
netmsm said:
Actually it doesn't change OPID. By not flashing SID partitions we can bypass checking OPID and hence the error.
I checked it now it was OPEN_CA.
Click to expand...
Click to collapse
curious how the sprint v50 will react to this.. I`ll try this guide when korean A11 gets release.. I'll let you know..
Also.. if it doesn`t change OPID you would get OPID mismatched error on boot.. so..
cloud1250000 said:
Also.. if it doesn`t change OPID you would get OPID mismatched error on boot.. so..
Click to expand...
Click to collapse
If SID partitions are flashed then yes it will throw OPID Mismatched Error. This is why we suggest using "Partition DL" flashing method, unchecking SID partitions.
netmsm said:
If SID partitions are flashed then yes it will throw OPID Mismatched Error. This is why we suggest using "Partition DL" flashing method, unchecking SID partitions.
Click to expand...
Click to collapse
yes but it has to generate new one with proper OPID no? when you load download mode now, does it still says id: 0? i doubt that
cloud1250000 said:
yes but it has to generate new one with proper OPID no? when you load download mode now, does it still says id: 0? i doubt that
Click to expand...
Click to collapse
That's right it generates the original OPID in download mode.
It is probable that some or all data related to OPID are stored in Modemsts partitions to which the SID partition bridges the OPID check function, in boot process. All that we do is to destroy the bridge.
netmsm said:
That's right it generates the original OPID in download mode.
It is probable that some or all data related to OPID are stored in Modemsts partitions to which the SID partition bridges the OPID check function, in boot process. All that we do is to destroy the bridge.
Click to expand...
Click to collapse
can you check which mcfg is used? (field test > mcfg status)

Categories

Resources