[Guide] Recover IMEI fully detailed - Moto G5 Guides, News, & Discussion

TRY AT YOUR OWN RISK I AM NOT RESPONSIBLE FOR ANY DAMAGES
It may or may not work
So I spent the last 48 hours trying to fix my phone following a lot of tutorials and finally after combining some methods together here is the simplest solution.
1- install twrp 32-bit
2- wipe everything including internal storage
3- with twrp connect to pc
4- transfer the debloated stock firmware download from here
5- flash it
6- reboot to system after full boot still no signal
7- turn off and boot to bootloader
8- run commands (fastboot erase modemst1, modemst2)
9- reboot and voila signal is back + imei is back (cant fix the 4g if any know how let me know)
If you want to install a custom rom 8.1.0 like pixelexperience follow these steps after the previous ones
1- reboot to recovery
2- install no-verity-opt-encrypt-5.1 download from here
3- reboot to recovery
4- wipe > advanced wipe > data only
5- reboot to bootloader
6- flash twrp 64 bit
7- start recovery
8- wipe > slide to factory reset
9- flash custom rom
10- reboot to system > error in sim card detection
11- reboot and voila works like charm but also no 4G only 3G

Can you post the twrp 32-bits? I can't find it
//---//
I do with twrp-3.1.1.0 and the imei keeps 0

Fehra said:
Can you post the twrp 32-bits? I can't find it
//---//
I do with twrp-3.1.1.0 and the imei keeps 0
Click to expand...
Click to collapse
It's on the first page of the dev section
Click here

AhmedtSadek said:
So I spent the last 48 hours trying to fix my phone following a lot of tutorials and finally after combining some methods together here is the simplest solution.
1- install twrp 32-bit
2- wipe everything including internal storage
3- with twrp connect to pc
4- transfer the debloated stock firmware download from here
5- flash it
6- reboot to system after full boot still no signal
7- turn off and boot to bootloader
8- run commands (fastboot erase modemst1, modemst2)
9- reboot and voila signal is back + imei is back (cant fix the 4g if any know how let me know)
If you want to install a custom rom 8.1.0 like pixelexperience follow these steps after the previous ones
1- reboot to recovery
2- install no-verity-opt-encrypt-5.1 download from here
3- reboot to recovery
4- wipe > advanced wipe > data only
5- reboot to bootloader
6- flash twrp 64 bit
7- start recovery
8- wipe > slide to factory reset
9- flash custom rom
10- reboot to system > error in sim card detection
11- reboot and voila works like charm but also no 4G only 3G
Click to expand...
Click to collapse
First thnks for sharing, i spend all day on it trying a lot of ways and nothing, i followed the steps with the stock rom and the signal looks like came back in the first view, but i went to see the IMEI and still 0, i tried to make a call and nothing, rebooted and the signal was lost. I really don't know what to do anymore, everything that i try fails =\

A possible solution from the G5 Plus forum
Hi all - I've done some work on potter (Moto G5 Plus) around the IMEI issue. I was wondering if someone would be able to see if what I have found for the G5 Plus, applies to other Moto phones. Below is my thread:
https://forum.xda-developers.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147
So, if someone is willing to help out, all you need is a stock rom with root access. Ideally I'd get two volunteers - one who has never flashed an oreo rom, and a second who has flashed an oreo rom and has had IMEI 0 at some stage (if it appears resolved, that's OK, you can still help). What is important for both scenarios is that you have never flashed someone else's persist.
All you'd need to do to help out is run the following commands via adb or in a shell, and paste the results:
Code:
su
ls -l /persist
That ensures a root shell (su), then lists details about the top level files in the persist folder, including their permissions and ownership.
The second one is this (still in a root shell, so su again if need be):
Code:
find /persist -type f
If anyone has questions, I'll keep an eye on this thread, and I'm also happy to take private messages.
Cheers

NZedPred said:
Hi all - I've done some work on potter (Moto G5 Plus) around the IMEI issue. I was wondering if someone would be able to see if what I have found for the G5 Plus, applies to other Moto phones. Below is my thread:
https://forum.xda-developers.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147
So, if someone is willing to help out, all you need is a stock rom with root access. Ideally I'd get two volunteers - one who has never flashed an oreo rom, and a second who has flashed an oreo rom and has had IMEI 0 at some stage (if it appears resolved, that's OK, you can still help). What is important for both scenarios is that you have never flashed someone else's persist.
All you'd need to do to help out is run the following commands via adb or in a shell, and paste the results:
Code:
su
ls -l /persist
That ensures a root shell (su), then lists details about the top level files in the persist folder, including their permissions and ownership.
The second one is this (still in a root shell, so su again if need be):
Code:
find /persist -type f
If anyone has questions, I'll keep an eye on this thread, and I'm also happy to take private messages.
Cheers
Click to expand...
Click to collapse
I tried that thread but it gives me error "chown: bad user 'rfs'"

AhmedtSadek said:
I tried that thread but it gives me error "chown: bad user 'rfs'"
Click to expand...
Click to collapse
Hi, as I stated in the potter thread and above, I need someone who has never installed an Oreo rom to run the commands in my post above. Then I will be able to see the correct ownership for cedric. The 'fix' commands in my Potter thread are specific to Potter.
So to take something from what you posted in the Potter thread, I can see a similar issue, as the owner of your rfs folder is a user and group called "oem_2903" which indicates that the same issue is present.

renanfamous said:
First thnks for sharing, i spend all day on it trying a lot of ways and nothing, i followed the steps with the stock rom and the signal looks like came back in the first view, but i went to see the IMEI and still 0, i tried to make a call and nothing, rebooted and the signal was lost. I really don't know what to do anymore, everything that i try fails =\
Click to expand...
Click to collapse
Yes same problem bro.. with me xda help us plzz what we can do

Hey again, I've worked on another workaround that I have tested on my G5 Plus, that should work with the G5 as well. This will also allow me to identify the correct owner of the rfs folder, which is key to making this work.
For someone who is willing, please back up your persist partition first, then try the following:
Boot into stock rom, ensuring that you have root enabled
Run the following commands via adb or a shell
Code:
su
chmod -R +X+r+w /persist/rfs
chmod -R +X+r+w /persist/hlos_rfs
Then reboot. Your IMEI should be recreated now. Now run the following and post the full output so that I can work out who the correct owner of the rfs and hlos_rfs folders are:
Code:
su
ls -lR /persist/rfs

I flashed a 8.1 Oreo room and then used fastboot erase modemst1,2. This recovered 4g and imei ( no voltle)
I got my volte after flashing stock Oreo.. by fedrey.

Sonisudhanshu said:
I flashed a 8.1 Oreo room and then used fastboot erase modemst1,2. This recovered 4g and imei ( no voltle)
I got my volte after flashing stock Oreo.. by fedrey.
Click to expand...
Click to collapse
Did you had ever restored that moto g4 Persist backup for volte.?

akshu2697 said:
Did you had ever restored that moto g4 Persist backup for volte.?
Click to expand...
Click to collapse
First of all this a g5 thread.
secondly i just simply installed stock oreo and that recovered my 4g imei and volte automatically

akshu2697 said:
Did you had ever restored that moto g4 Persist backup for volte.?
Click to expand...
Click to collapse
Sonisudhanshu said:
First of all this a g5 thread.
secondly i just simply installed stock oreo and that recovered my 4g imei and volte automatically
Click to expand...
Click to collapse
I'm from the G5+ forums. In case it's not common knowledge here, never restore a persist from another device. We have had numerous threads recommending to flash the persist of a G4/G4+ to restore Volte and other functionality. That has been the cause of countless permanent semi-bricked and bricked G5+ devices. The persist is unique to each device, and without your own, you can no longer guarantee full functionality, and in the worst case, you will permanently lose your IMEI.

NZedPred said:
Hey again, I've worked on another workaround that I have tested on my G5 Plus, that should work with the G5 as well. This will also allow me to identify the correct owner of the rfs folder, which is key to making this work.
For someone who is willing, please back up your persist partition first, then try the following:
Boot into stock rom, ensuring that you have root enabled
Run the following commands via adb or a shell
Code:
su
chmod -R +X+r+w /persist/rfs
chmod -R +X+r+w /persist/hlos_rfs
Then reboot. Your IMEI should be recreated now. Now run the following and post the full output so that I can work out who the correct owner of the rfs and hlos_rfs folders are:
Code:
su
ls -lR /persist/rfs
Click to expand...
Click to collapse
When I execute it, it says "chmod: bad mode '+ X + r + w'".
Do you know why it happens?
Code:
adb shell
cedric:/ $ su
cedric:/ # hmod -R +X+r+w /persist/rfs
sh: hmod: not found
127|cedric:/ # chmod -R +X+r+w /persist/rfs
chmod: bad mode '+X+r+w'
1|cedric:/ # chmod -R +X+r+w /persist/hlos_rfs
chmod: bad mode '+X+r+w'
1|cedric:/ #
[CODE]

TioNacho said:
Hey again, I've worked on another workaround that I have tested on my G5 Plus, that should work with the G5 as well. This will also allow me to identify the correct owner of the rfs folder, which is key to making this work.
For someone who is willing, please back up your persist partition first, then try the following:
Boot into stock rom, ensuring that you have root enabled
Run the following commands via adb or a shell
Then reboot. Your IMEI should be recreated now. Now run the following and post the full output so that I can work out who the correct owner of the rfs and hlos_rfs folders are:
When I execute it, it says "chmod: bad mode '+ X + r + w'".
Do you know why it happens?
Code:
adb shell
cedric:/ $ su
cedric:/ # hmod -R +X+r+w /persist/rfs
sh: hmod: not found
127|cedric:/ # chmod -R +X+r+w /persist/rfs
chmod: bad mode '+X+r+w'
1|cedric:/ # chmod -R +X+r+w /persist/hlos_rfs
chmod: bad mode '+X+r+w'
1|cedric:/ #
[CODE][/QUOTE]
Just follow the guide here:
[url]https://forum.xda-developers.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147[/url]
Those commands above only worked in certain environments (e.g. with a particular version of something, can't remember which).
Click to expand...
Click to collapse

Hi All, Am Moto G5 plus XT1687 user. I installed number of custom ROM's and finally head back to Stock. This is my headache now, I lost my IMEI & VOLTE. I tried so many steps as mentioned in XDA, same I also tried installing with someone's persist .win file. Permanently I lost my IMEI & VOLTE. If you guys need anything from my phone to find a solution, please ping me. Now I can use that phone as 2g device only.

[email protected] said:
Hi All, Am Moto G5 plus XT1687 user. I installed number of custom ROM's and finally head back to Stock. This is my headache now, I lost my IMEI & VOLTE. I tried so many steps as mentioned in XDA, same I also tried installing with someone's persist .win file. Permanently I lost my IMEI & VOLTE. If you guys need anything from my phone to find a solution, please ping me. Now I can use that phone as 2g device only.
Click to expand...
Click to collapse
Since my Moto G5 Plus (XT1687) isnt my primary phone I just flashed it back to stock 7.1 and when I got the Oreo OTA it fixed the IMEI problem.

sabbotage said:
Since my Moto G5 Plus (XT1687) isnt my primary phone I just flashed it back to stock 7.1 and when I got the Oreo OTA it fixed the IMEI problem.
Click to expand...
Click to collapse
Thanks for the reply. Please update with stock room details that you used. I will try the same and revert.

Related

HTC Desire HD won't boot after flash

Hello!
I have a big problem.
I might have bricked the device however the things what i can do are the following:
- Boot into recovery (clockworkmod)
- start a usb data connection with a computer (clockworkmod)
- input of the ADB commands through terminal running in the computer
What i did?
Flashed the memory with a Cyanogenmod 6.3 according to official guideline:
http://wiki.cyanogenmod.com/index.php?title=HTC_Desire_HD:_Full_Update_Guide
and took note and used most procedures from there actually:
http://forum.xda-developers.com/wiki/index.php?title=HTC_Vision#Rooting_the_G2
Didn't do the engineering hboot.
Everything was working. I got cyanogenmod working.
Then after a while i tried to restore a backup which i had from original HTC configuration which was actually just before i did the cyanogenmod flash with clockworkmod.
So the backup was from the time i already unlocked the phone from locks and had root access.
So again the restore function worked and everything was back to normal.
How i managed to half brick the device?
Yesterday i wanted to put cyanogenmod back to my phone and then the s hit happened.
I admit that i didn't check whether the locks were off i just thought that these should have been off because backup soft was from time i had phone unlocked.
Anyway to cut the long story short - after flashing the memory with cyanogenmod with the help of rom manager the phone didn't boot anymore.
I tried all the options from clockworkmod flash and format and upgrade straight from sd card a new cyanogenmod but nothing worked. Again the white HTC screen and connection through a usb cable.
So probably i have the s-off and who knows what else.
I dont have a root access anymore as well because i already tried it through the terminal. It doesn't recognize the su command.
Question is, how can i put the cyanogenmod back on by only using clockworkmod recovery and working ADB connection through usb link?
Probably have to just get the locks off but the original instructions say i have to have terminal emulator running in phone but i only have clockworkmod recovery soft running at best.
S hit, again very long story, but hope someone can help me!
Cheers!
I had a similar problem yesterday, after flashing ClockwordkMod Recovery to version 3.0.0.5 (it said it had an update) and trying to reinstall CyanoGenmod 6.3 my phone would no longer boot, it got stuck in the white HTC Logo screen.
I'm not really an expert on this stuff, but I managed to "recover" my device by downgrading it again to 1.32.405.6 using this thread: http://forum.xda-developers.com/showthread.php?t=905003. First I had tried to recover a previously backed-up ROM, but that did not work.
I had to put the stock 1.32 PD98IMG.zip file on my SD card using ClockwordMod Recovery (since I could no longer boot), I'm not exactly sure which steps I took to do so, I have tried a lot of things yesterday before I got everything working again.
After this my phone could boot again and I was ready to play around again. I reinstalled CyanogenMod again using an older version of ClockwordMod Recovery. I'm not sure if this is related in any way, but my phone works smooth again..
Once again; I'm really not on expert on how all this stuffs works, I just hope that I can help you on the way with some ideas on how to fix your device.
So probably i have the s-off and who knows what else.
Click to expand...
Click to collapse
I figured out wether my device was S-OFF and/or Eng S-OFF by entering "adb reboot bootloader" from cmd. At the top of the page for me it states:
ACE PVT ENG S-OFF
I believe it stated only SHIP S-OFF when I had the problems you describe.
Thanks man for quick reply!
I definitely try the downgrading solution and i remember i too did the update for clockworkmod rom manager before the flash.
I'll report back tomorrow.
Cheers!
couldn't boot up any roms earlier after upgrading clockworkmod recovery to v3... downgraded to 2.5.1.3 and worked fine
Hi Guys, I have exactly the same problem. It would be really great if you provide me the step by step process to downgrade clockworkmod recovery.
Cheers,
Pav
I'd like to say to you guys that the downgrading solution worked
Didn't have to use any programs inside phone except clocworkmod recovery which was the only thing i had running.
Thank you user jvdminne!
The downgrading solution was in official cyanogenmod guidelines as well but forgot it anyway.
------------
Pavanka!
The downgrading solution from the link is pretty step by step actually.
But anyway, with my half-broken phone the lines didnt do the trick:
Code:
adb push psneuter /data/local/tmp
adb push misc_version /data/local/tmp
adb shell chmod 777 /data/local/tmp/psneuter
adb shell chmod 777 /data/local/tmp/misc_version
adb shell /data/local/tmp/psneuter
I had to copy psneuter and misc_version to /tmp folder not into /data/local/tmp.
But anyhow, i already had # root access through computer. Probably from last half flashed system.
So only thing i basically had to do was to cd in windows cmd into folder where i had psneuter and misc_version and after that:
Code:
adb push misc_version /tmp
adb shell chmod 777 /tmp/misc_version
adb shell
in the shell (adb shell):
Code:
cd /tmp
./misc_version -s 1.31.405.6
And after that follow the instructions from previous link.
To get the ADB functions working just follow the guide here or from previous link where it had adb program included, but not sure whether it was working cause i had it from Android SDK package already set.
Hope you got some sense out of it.
Cheers!
Hey
I had similar problems to those mentioned in the beginning with the cyanogen mod...
I installed cyanogen and the it got to the screen with the blue swirlyness and then just kept restarting. I decided to restore a backup and just got stuck on the white htc screen.
I decided to follow this post and now am stuck with this...
I just tried a couple of different things to no avail...
maxa1577 said:
Hey
I had similar problems to those mentioned in the beginning with the cyanogen mod...
I installed cyanogen and the it got to the screen with the blue swirlyness and then just kept restarting. I decided to restore a backup and just got stuck on the white htc screen.
I decided to follow this post and now am stuck with this...
I just tried a couple of different things to no avail...
Click to expand...
Click to collapse
If you had ROOT , S-OFF etc you shouldn't need to go through all this rigmarole, if you can access recovery carry out a full wipe /system /cache /dalvik-cache and reflash your chosen ROM, should be all that's required
ghostofcain said:
If you had ROOT , S-OFF etc you shouldn't need to go through all this rigmarole, if you can access recovery carry out a full wipe /system /cache /dalvik-cache and reflash your chosen ROM, should be all that's required
Click to expand...
Click to collapse
phew cheers for that. First time flashing and I thought I killed me poor desire.

[Q&A] [ROOT][LOLLIPOP] Root Mi2 with Lollipop 5.0 !!

Q&A for [ROOT][LOLLIPOP] Root Mi2 with Lollipop 5.0 !!
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [ROOT][LOLLIPOP] Root Mi2 with Lollipop 5.0 !!. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
problems with wi-fi after root lollipop mi2
I have a problem.
After flashing "bottinsecure.img" in the fastboot mode, the Wi-Fi doesn't work anymore!
Suggestions?
ferrets said:
I have a problem.
After flashing "bottinsecure.img" in the fastboot mode, the Wi-Fi doesn't work anymore!
Suggestions?
Click to expand...
Click to collapse
Um... I'm not sure whether it is the problem of flashing bottinsecure.img... It's because I flashed it before and succeeded without problems...
I think you should complete the whole guide first, to make sure that rooting is complete.
BTW, how is the WIFI not working? Can you turn it on/off or can you scan for available WiFi networks?
P.S. You can ask here for answers too. Just if you know Chinese or I can help you to ask.
problems with wi-fi after root lollipop mi2
henry0504 said:
Um... I'm not sure whether it is the problem of flashing bottinsecure.img... It's because I flashed it before and succeeded without problems...
I think you should complete the whole guide first, to make sure that rooting is complete.
BTW, how is the WIFI not working? Can you turn it on/off or can you scan for available WiFi networks?
.
Click to expand...
Click to collapse
Sorry, I don't know chinese.
The first two times I follow all the guide, to the end. Root works perfectly, but Wi-Fi doesn't turn on.
The third time I noticed that Wi-Fi stops working as soon as I flash the bootinsecure.img.
Now I'm trying to reflash ROM and follow the second part of the part without flashing bootinsecure.img
Ok I can confirm that the problem is in the file bootinsecure.img.
After rooting and confirming the wi-fi doesn't work, I reflash the originale boot.img of my ROM from fastboot with the same procedure.
The Wi-Fi work again and the root disappared..
With 4-11-28 wifi disapear if install this busybox, hard choise, root or wifi
I cannot even root my device, even though I followed every step carefully. six times.
every time, I did a factory reset and tried the order of the translated post and the order of the original Chinese post. (they paste the BETASuperSu in the beginning)
nothing works. I use the 4.11.28 by Ivan and can't open Google search app. other than that, it works fine
can anyone help me? thx in advance
kokoparkletal said:
With 4-11-28 wifi disapear if install this busybox, hard choise, root or wifi
Click to expand...
Click to collapse
helped you ask in chinese here http://geek.miui.com/content-14-964-1.html
henry0504 said:
helped you ask in chinese here
Click to expand...
Click to collapse
Thanks, but the same result, or root or wifi, with 4-11-28 and Mi2S
kokoparkletal said:
Thanks, but the same result, or root or wifi, with 4-11-28 and Mi2S
Click to expand...
Click to collapse
According to this http://www.miui.com/forum.php?mod=viewthread&tid=2119701&page=60, a new version of Lollipop for Mi 2 has been released. It said with the latest version, bugs will be cleared. Check it out!
henry0504 said:
According to this, a new version of Lollipop for Mi 2 has been released. It said with the latest version, bugs will be cleared. Check it out!
Click to expand...
Click to collapse
Working perfectly now, Thanks!:victory:
"No space left on device" ?
At the step
cp /data/local/busybox /system/xbin
I get
cp: /system/xbin/busybox: No space left on device
I tried executing this script to enlarge my partition maybe, but this script didn't work either (http://forum.xda-developers.com/mi-...ript-fix-partition-table-android-4-4-t2878553).
What can I do?
Root Xiaomi Mi 2
Hi,
I was trying to root my new Mi 2 - and this is the first time for me, so having no knowledge i tried to do it following the guide...
downloaded some of the apps to use after it had been rooted to update it to lollipop from kitkat.
first thing i did was follow this guide here:
Root Mi2 with Lollipop 5.0 !!
In Xiaomi 2, you need to carry out special procedures to root with the Android Lollilpop (5.0) version.
***This root kit is not made by me. I just translated it.***
1. Download the Root Mi2 Lollipop.zip (9.17 MB) in the attachments of this thread.
2. Unzip it in a location you like.
3. Open the "Command Prompt.bat" in the folder.
4. Enter fastboot mode in your Mi2 by shutting down and then long-press VOLUME - AND POWER BUTTON.
5. Connect it to your PC with USB CABLE.
6. In "Command_Prompt.bat" in Root Mi2 Lollipop, enter followings:
Code:
fastboot flash boot bootinsecure.img
fastboot reboot
7. It will then reboot. After boot, Open "Command Prompt.bat" and enter followings:
Code:
adb kill-server
adb root
adb remount
adb push busybox /data/local/busybox
adb shell
su
cd /data/local
chmod 755 busybox
./busybox
mount -o remount,rw /system
mkdir /system/xbin
cp /data/local/busybox /system/xbin
cp /data/local/busybox /system/bin
cd /system/xbin
busybox --install .
sync
reboot
8. This will install the busybox and reboot. After it boots, copy the "BETA-SuperSU-v2.19.zip" into the root directory(/sdcard0). Rename it "update.zip"
9. Shut the phone down. Long-press VOLUME+ AND POWER to open recovery. In recovery, choose the "update.zip" to flash.
10. Reboot and you are done!!
You now has root access on L on your Mi2!!
[EDIT] Thanks to zipalign, pointing out the second edition of the tool kit.
As the attachment is over sized, please use the external link below, thanks
I got as far as finishing number 6 where I went to reboot it from the command prompt and it went to reboot but doesnt at all...
now all i can get from a working phone is starting it up like normal and it only gets to the first screen where it just shows the letter m. So I cant actually do anything and it no longer works. I cant go to reset it either - that doesnt work.
The only thing I can access is Fastboot mode...
any help? or have i ruined the phone already??
thanks!
Use MiFlash to recover your phone.
Than you probably have to reuse MiFlash to install CWM.
SuperSU works well for a long time.
Fortinho said:
Use MiFlash to recover your phone.
Than you probably have to reuse MiFlash to install CWM.
Click to expand...
Click to collapse
hey, so ive tried to use MiFlash to recover, installed all the drivers and set it up with Mi Flash, plugged it in in fastboot mode and my computer picked it up, clicked on flash and after about 3 seconds it gave me an error in the status saying "Unspecidied error(0xffffffff: )"
any help?
thanks!
raab93 said:
hey, so ive tried to use MiFlash to recover, installed all the drivers and set it up with Mi Flash, plugged it in in fastboot mode and my computer picked it up, clicked on flash and after about 3 seconds it gave me an error in the status saying "Unspecidied error(0xffffffff: )"
any help?
thanks!
Click to expand...
Click to collapse
Have you selected a MIUI fastboot package to flash?
Fortinho said:
Have you selected a MIUI fastboot package to flash?
Click to expand...
Click to collapse
yea, i downloaded it all and then in MiFlash from my computer selected the right one and checked it all out in the advanced settings...
had a look round online as to what else could be wrong, so got rid of all spaces in the files, changed the directory to C:\ and such...
not sure what else?
MI2 not booting
Thank You for the post,
I tried to root my MI2 device, it got failed at below step
adb root
error: device not found
PLEASE HELP

Need a A2017 Modem

Hey Guys,
i good a little problem with my axon 7. ive got the g model with cm13 and yesterday i tryed to flash the b29 o n my phone.
now the problem is that my sim card is accepted and the imeis are correct but i have no data connection at all.
so i tryed to go back to b03 oder other otas for the g model but i cant install any of this updates.zips in recovery because of error 8.
older backups dont fix the problem even and when i want to go back to the first backup i made after rooting the phone then it tells me that something is wrong withe the encoding...
so has anyone an idea how i can fix that problem?
for everyone with the same issue:
is used this guide (https://forum.xda-developers.com/axon-7/development/rom-guide-updates-to-stock-files-via-t3469484) and it worked.
-> if you get the "encryption error1 after flashing the rom then just press reset phone.
-> if the divice doesnt boot after flashing just boot into recovery frist and reboot system in there.
but be sure that you havent any impiortant flies on internal sd card!
Try this: boot into TWRP recovery and in "advanced" go to Terminal Emulator
There, enter these codes
Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1
and execute and then enter
Code:
dd if=/dev/zero of=/dev/block/bootdevice/modemst2
and execute
This should erase those partitions and they should regenerate automatically on boot.
If this doesn't help, you could indeed try to use someone else's modems
EDIT: damn, too late
Now we have two solutions!
thank you

[FIX] Phone Reboots Into Recovery Mode & Can Only Be Started From Fastboot

Thanks to xda member @Shooting Star Max for the original post for this solution
If your phone is always rebooting into recovery, and the only way to boot normally is by using the bootloader, follow these instructions:
Some users recommend removing your SD before doing the following as incorrectly formatted SD Cards could cause the phone to boot into recovery instead of booting normally.
1) Boot into TWRP recovery.
2) Plug your Cedric into your computer (which needs to have drivers and fastboot installed).
3) Open a command prompt window and type:
Code:
adb pull /dev/block/platform/soc/7824900.sdhci/by-name/misc misc.img
This will make a backup of the misc partition just in case.
4) Type the following:
Code:
adb shell dd if=/dev/zero of=/dev/block/platform/soc/7824900.sdhci/by-name/misc
This will clear the misc partition. You might get a message regarding lack of space, but it's okay.
5) Your Cedric will boot normally again
TheFixItMan said:
Thanks to xda member @Shooting Star Max for the original post for this solution
If your phone is always rebooting into recovery, and the only way to boot normally is by using the bootloader, follow these instructions:
1) Boot into TWRP recovery.
2) Plug your Cedric into your computer (which needs to have drivers and fastboot installed).
3) Open a command prompt window and type:
Code:
adb pull /dev/block/platform/soc/7824900.sdhci/by-name/misc misc.img
This will make a backup of the misc partition just in case.
4) Type the following:
Code:
adb shell dd if=/dev/zero of=/dev/block/platform/soc/7824900.sdhci/by-name/misc
This will clear the misc partition. You might get a message regarding lack of space, but it's okay.
5) Your Cedric will boot normally again.
Click to expand...
Click to collapse
I did the procedure and everything went back normal.
I did a backup with the twrp and when I went to restore and go back everything as before, it will continue to restart in the bootloader and I must confirm with the power key to boot the system.
I tried to repeat the procedure but nothing to do does not work anymore.
Some help thank you
masterdex said:
I did the procedure and everything went back normal.
I did a backup with the twrp and when I went to restore and go back everything as before, it will continue to restart in the bootloader and I must confirm with the power key to boot the system.
I tried to repeat the procedure but nothing to do does not work anymore.
Some help thank you
Click to expand...
Click to collapse
As long as you have fully booted your phone before trying again I don't see why you couldn't repeat it
Or reflash the recovery and try again
[/ATTACH]
TheFixItMan said:
As long as you have fully booted your phone before trying again I don't see why you couldn't repeat it
Or reflash the recovery and try again
Click to expand...
Click to collapse
Still tried on minimal adb and phower shell does not work. I attach pictures.
masterdex said:
[/ATTACH]
Still tried on minimal adb and phower shell does not work. I attach pictures.
Click to expand...
Click to collapse
Make sure adb is connected properly
Code:
adb kill-server
adb devices
Your device should be displayed as connected & should be the only device listed
If it still doesn't work then the only solution I can think of is restoring your stock firmware by fastboot - do not flash the bootloader part of the firmware
TheFixItMan said:
Make sure adb is connected properly
Code:
adb kill-server
adb devices
Your device should be displayed as connected & should be the only device listed
If it still doesn't work then the only solution I can think of is restoring your stock firmware by fastboot - do not flash the bootloader part of the firmware
Click to expand...
Click to collapse
Yes is connected. If only I could find the firmware for my XT1675 16gb / 2gb single sim model.
masterdex said:
Yes is connected. If only I could find the firmware for my XT1675 16gb / 2gb single sim model.
Click to expand...
Click to collapse
Same phone as mine & Iv never had this problem - I use lineageos - try flashing that
Other than that I can't suggest anything else
Thank you anyway. They persistently waited for Lenovo to provide the tools and release the firmware for my model that is currently unavailable.
I've tried all the constructions here, but they all have background noise during calls and fixed gps in over a minute and it's not accurate.
Do you have my own model with the same features?
masterdex said:
Thank you anyway. They persistently waited for Lenovo to provide the tools and release the firmware for my model that is currently unavailable.
I've tried all the constructions here, but they all have background noise during calls and fixed gps in over a minute and it's not accurate.
Do you have my own model with the same features?
Click to expand...
Click to collapse
I have the XT165 running lineageos
No problems with calls - iv changed the build.prop to edit call volume (see my last post in the lineageos thread)
No problem with gps
You could try running these commands in fastboot as this was a fix for gps in past moto devices
Code:
fastboot erase modemst1
fastboot erase modemst2
Okay, now I'm just trying to build stock, if I think I bought the phone, just the time to get home and unlock bootloader and put custom rom, I almost do not know the functions of building stock. Now I see how it behaves and I guess if I install Lineage again and make all the corrections you've suggested very kindly thanks.
TheFixItMan said:
4) Type the following:
Code:
adb shell dd if=/dev/zero of=/dev/block/platform/soc/7824900.sdhci/by-name/misc
This will clear the misc partition. You might get a message regarding lack of space, but it's okay.
Click to expand...
Click to collapse
Clearing the whole misc partition may be overkill and cause other issues. In the LG threads they currently suggest clearing only the first 256 bytes.
ST Dog said:
Clearing the whole misc partition may be overkill and cause other issues. In the LG threads they currently suggest clearing only the first 256 bytes.
Click to expand...
Click to collapse
This works fine for our users - its been tested & no one has reported any issues
TheFixItMan said:
This works fine for our users - its been tested & no one has reported any issues
Click to expand...
Click to collapse
That's cool. Just a thought.
Different OEs put different stuff there, but really no reason to clear it all if only part is the problem.
And one never knows when they might change the usage.
Oh, and masterdex above appears to have had some issue.
ST Dog said:
That's cool. Just a thought.
Different OEs put different stuff there, but really no reason to clear it all if only part is the problem.
And one never knows when they might change the usage.
Oh, and masterdex above appears to have had some issue.
Click to expand...
Click to collapse
It worked for him but then he restored old phone backups - I recommended flashing lineageos from scratch
Nothing to do, I tried again to download Lineage, make a clean installation by deleting all the entries in the TWRP, configuring the phone restarted in recovery, and rewriting the procedure, the result does not change always restarts the bootloader.
At this point you only have to install the firmware from scratch, someone knows where to find firmware stock model XT1675 16gb storage and 2 gb sin ram single sim?
masterdex said:
Nothing to do, I tried again to download Lineage, make a clean installation by deleting all the entries in the TWRP, configuring the phone restarted in recovery, and rewriting the procedure, the result does not change always restarts the bootloader.
At this point you only have to install the firmware from scratch, someone knows where to find firmware stock model XT1675 16gb storage and 2 gb sin ram single sim?
Click to expand...
Click to collapse
This is rom stock Cedric work on XT1675 16 gb 2 gb ram installed on Motog5 brand Tim :https://www.youtube.com/watch?v=EMyaDv1lcYg
TheFixItMan said:
I have the XT165 running lineageos
No problems with calls - iv changed the build.prop to edit call volume (see my last post in the lineageos thread)
No problem with gps
You could try running these commands in fastboot as this was a fix for gps in past moto devices
Code:
fastboot erase modemst1
fastboot erase modemst2
Click to expand...
Click to collapse
I tried to give these commands fastboot but the result and that when I restart the phone no longer sees the sim and I have to reinstall the original firmware with fastboot. Tried twice the same result, are you sure you have the right commands?
My Cedric is listed on the adb devices code when it's turned on. But if I restart to twrp then it's not listed. Now how can I perform this
Sent from my Motorola Moto G 2014 using XDA Labs
---------- Post added at 11:57 AM ---------- Previous post was at 11:52 AM ----------
It is listed when I turned off the Mtp. But when I give the first command to backup the misc folder I get
[?] /dev/block/platform/soc/7824900.sdhci/by-name/misc: 1048576/?.
Sent from my Motorola Moto G 2014 using XDA Labs
---------- Post added at 12:17 PM ---------- Previous post was at 11:57 AM ----------
Again solved it. I just backed up the misc in twrp itself by copying the misc file to the /sdcard using the inbuilt file manager of twrp. Then tried the second command. It worked like charm. Thank you
Sent from my Motorola Moto G 2014 using XDA Labs
Perfect!
Thank you, TheFixItMan! I have an XT1672, Android 7.0 Stock Rom, and I was having this problem after trying the November update via OTA. The correction steps worked perfectly! Happy New Year!
Thanks hope to try this tonight, have you had feedback that this works? Thanks

[How to] Fix 'sensors and camera not working', restore IMEI, etc. (Stock Pie)

At some moment when playing with Magisk modules, I've got Android crash, after which sensors (Accelerometer, Gravity, etc.) and Camera stopped working.
Obviously, somehow persist partition data got corrupted and must be reflashed. I believe, that flashing persist via fastboot is not supported, so I reflashed it via ADB, and got everything working.
What we'll need to flash persist partition:
1. Mi A2 with unlocked bootloader and critical partitions, on stock Pie 10.0.2.0 to 10.0.7.0, connected to an USB 2.0 port in PC MB; USB debugging and MTP file transfer enabled;
2. Working copy of ADB / Fastboot installation
3. image of persist partition, can be found in each stock fastboot image
https://forum.xda-developers.com/mi-a2/how-to/fastboot-xiaomi-mi-a2-fastboot-images-t3824849
as "jasmine_global_images_V10.0.2.0.PDIMIFJ_9.0\images\persist.img"; must be copied to ADB / Fastboot installation directory.
4. twrp-3.3.1-5-jasmine_sprout-unofficial.img, copied to ADB / Fastboot installation directory
https://forum.xda-developers.com/mi-a2/development/recovery-mi-a2-jasminesprout-t3941096
Note: even if TWRP boots with black screen, this method should work as we'll not control process on Mi A2, instead we'll use ADB commandsthis TWRP is reported to work with all variants of MiA2 screen panels.
5. Attached command file "flash_persist.cmd", unZIPped to ADB / Fastboot installation directory.
Instruction:
Run "flash_persist.cmd" from CMD shell or Explorer (probably admin rights needed?).
Command file execution will be paused several times, waiting for ADB and fastboot commands execution.
Please read CMD window output, check that phone is being switched to needed mode and/or ADB/Fastboot commands succeed.
In case something goes wrong, press Ctrl^C and terminate batch job.
After 1st reboot from TWRP, reboot once more by standard means.
Update:
- attached f"lash_persist_V2.zip" using "twrp-3.3.1-5-jasmine_sprout-unofficial"
my mi a2 is in ARB4, I can only use MIUI, could you tell me how do I get the persist file, could also explain where TWRP comes in since the command is made by ADB?
Aerobatic said:
At some moment when playing with Magisk modules, I've got Android crash, after which sensors (Accelerometer, Gravity, etc.) and Camera stopped working.
Obviously, somehow persist partition data got corrupted and must be reflashed. I believe, that flashing persist via fastboot is not supported, so I reflashed it via ADB, and got everything working.
What we'll need to flash persist partition:
1. Mi A2 with unlocked bootloader and critical partitions, on stock Pie 10.0.2.0 to 10.0.7.0, connected to an USB 2.0 port in PC MB; USB debugging and MTP file transfer enabled;
2. Working copy of ADB / Fastboot installation
3. image of persist partition, can be found in stock fastboot image
http://en.miui.com/download-353.html
as "jasmine_global_images_V10.0.2.0.PDIMIFJ_9.0\images\persist.img"; must be copied to ADB / Fastboot installation directory.
4. twrp-3.2.3-0-jasmine_sprout.img, copied to ADB / Fastboot installation directory
https://dl.twrp.me/jasmine_sprout/
Note: even if TWRP boots with black screen, this method should work as we'll not control process on Mi A2, instead we'll use ADB commands.
5. Attached command file "flash_persist.cmd", unZIPped to ADB / Fastboot installation directory.
Instruction:
Run "flash_persist.cmd" from CMD shell or Explorer (probably admin rights needed?).
Command file execution will be paused several times, waiting for ADB and fastboot commands execution.
In case something goes wrong, press Ctrl^C and terminate batch job.
After 1st reboot from TWRP, reboot once more by standard means.
Click to expand...
Click to collapse
I don't understand either why is twrp involved. I'm at stock 10.0.12 ROM, with unlocked bootloader and usb depuration turned on. Should I get the persist.img from the Fastboot image of 10.0.12? I only see the link to an unofficial one which I don't know in which way is different to the official one...
marcushg said:
I don't understand either why is twrp involved..
Click to expand...
Click to collapse
ADB.exe is sending requests to phone. Usual ROM cannot evaluate these requests, while TWRP is specially developed to perform actions specified by ADB requests.
Thanks for the reply. Now what I'm not sure is if flashing persist.img will delete my original IMEI and Bluetooth and WiFi Mac address. I don't want to lose them.
[/COLOR]
marcushg said:
Thanks for the reply. Now what I'm not sure is if flashing persist.img will delete my original IMEI and Bluetooth and WiFi Mac address. I don't want to lose them.
Click to expand...
Click to collapse
This happens to me, camera and sensors are not working. the solution for this is to flash persist.img from original and official rom. you can get that on miui official website. there you can get the persist.img and flash it on TWRP in Mi6X version not the jasmin_sprout. I have try and tested and sensors and camera on my Mi A2 is working now. Blaming myself by deleting the persist! and persist_back up at the twrp. Not to worry by lost imei and etc. mine is all working fine.
how can i do this on android 10? I say that because twrp is not available for android 10. I have problem with frond camera. it return at secondary back camera. please help me
tnt-4- said:
how can i do this on android 10? I say that because twrp is not available for android 10. I have problem with frond camera. it return at secondary back camera. please help me
Click to expand...
Click to collapse
TWRP_4pda_verison works for me in 9 and 10 stock crypted. See link in item 4 of OP instruction.
Aerobatic said:
TWRP_4pda_verison works for me in 9 and 10 stock crypted. See link in item 4 of OP instruction.
Click to expand...
Click to collapse
sorry i am noob. please give me the link
tnt-4- said:
sorry i am noob. please give me the link
Click to expand...
Click to collapse
'OP' in these forums is mostly used in 2 meanings:
- 'OP' refers to the person who Originally Posted this thread;
- 'OP' refers to the Opening Post in this thread.
So, " See link in item 4 of OP instruction" means:
- scroll page up to the beginning (or go to the beginning of 1st page of a thread, here we still have 1 page);
- then read it carefully;
- find item 4:
4. twrp-3.3.1-5-jasmine_sprout-unofficial.img, copied to ADB / Fastboot installation directory
https://forum.xda-developers.com/mi-...prout-t3941096
Click to expand...
Click to collapse
Do I need to go through alphabet or google search course also? no offence, cheer up!
Aerobatic said:
'OP' in these forums is mostly used in 2 meanings:
- 'OP' refers to the person who Originally Posted this thread;
- 'OP' refers to the Opening Post in this thread.
So, " See link in item 4 of OP instruction" means:
- scroll page up to the beginning (or go to the beginning of 1st page of a thread, here we still have 1 page);
- then read it carefully;
- find item 4:
Do I need to go through alphabet or google search course also? no offence, cheer up!
Click to expand...
Click to collapse
thanks for all. i will try to do it beacause the front camera is very usefull.
Persist.img flash via flashed_persist.cmd or flash with twrp??
tnt-4- said:
Persist.img flash via flashed_persist.cmd or flash with twrp??
Click to expand...
Click to collapse
Read OP carefully and try to Google about ADB, TWRP, etc. to understand the process. Why should we do your homework instead of you?
In brief, again and again:
1. TWRP is needed to be booted into phone, as it is the only valid means to perform ADB requests from PC.
2. TWRP has no options to reflash /persist partition from its UI
3. /persist partition image is flashed into phone from PC using ADB commands, so:
3.1. PC is to be prepared (drivers installed, latest platform-tools with ADB unpacked and tested to work, persist.img unpacked and copied into platform-tools directory)
3.2. phone is to be prepared (successfully connected via USB and then booted into TWRP with command from "flash_persist.cmd").
4. "flash_persist.cmd" is just Windows::CMD command file, helping to make ADB / fastboot / ADB requests from PC to phone/TWRP in correct order, and with intermediate checks of successful connection / mode switching: rebooting into bootloader (ADB command), booting into TWRP (fastboot command), and then reflashing /persist (ADB command)
You can read it, e.g. in Notepad, and try to understand what it should make, Googling for Windows::CMD commands and ADB commands descriptions.
Aerobatic said:
Read OP carefully and try to Google about ADB, TWRP, etc. to understand the process. Why should we do your homework instead of you?
In brief, again and again:
1. TWRP is needed to be booted into phone, as it is the only valid means to perform ADB requests from PC.
2. TWRP has no options to reflash /persist partition from its UI
3. /persist partition image is flashed into phone from PC using ADB commands, so:
3.1. PC is to be prepared (drivers installed, latest platform-tools with ADB unpacked and tested to work, persist.img unpacked and copied into platform-tools directory)
3.2. phone is to be prepared (successfully connected via USB and then booted into TWRP with command from "flash_persist.cmd").
4. "flash_persist.cmd" is just Windows::CMD command file, helping to make ADB / fastboot / ADB requests from PC to phone/TWRP in correct order, and with intermediate checks of successful connection / mode switching: rebooting into bootloader (ADB command), booting into TWRP (fastboot command), and then reflashing /persist (ADB command)
You can read it, e.g. in Notepad, and try to understand what it should make, Googling for Windows::CMD commands and ADB commands descriptions.
Click to expand...
Click to collapse
I understand that. I have unlock bootloader and criticals. Then i need run twrp.img on cmd to boot twrp. Then?? Sorry for my questions i am afraid for my phone. I dont want to destroy it with any fault step
tnt-4- said:
I understand that. I have unlock bootloader and criticals. Then i need run twrp.img on cmd to boot twrp. Then?? Sorry for my questions i am afraid for my phone. I dont want to destroy it with any fault step
Click to expand...
Click to collapse
Then read everything I wrote and understand what you are going to do.
Again: read text in "flash_persist.cmd" and make sure you understand each line in it.
At this I stop helping you, I'm to make my work, I'm really busy.
Aerobatic said:
Then read everything I wrote and understand what you are going to do.
Again: read text in "flash_persist.cmd" and make sure you understand each line in it.
At this I stop helping you, I'm to make my work, I'm really busy.
Click to expand...
Click to collapse
i've done it but my front camera still not working. when return it returned at secondary. :crying:
Then i disassembly my phone and disconnect my camera. I open my phone again and did the same thing. Finally i reconnect the camera and it works!! Thanks fo all Aerobatic
Would this work on a V11.0.6.0.QDIMIXM?
Also, where can I find the persist files for it?
valp88 said:
Would this work on a V11.0.6.0.QDIMIXM? Also, where can I find the persist files for it?
Click to expand...
Click to collapse
Yes, it should, if this is really /persist corruption issue, and not HW problem. Diagnostics can be made running tests in engineering mode or with 3rd-party apps like AIDA64: if most or at least several sensors are misbehaving or disfunctional, this is the direct prompt to reflash /persist.
As for your question, It is always recommended to read the OP:
Aerobatic said:
3. image of persist partition, can be found in each stock fastboot image
https://forum.xda-developers.com/mi-a2/how-to/fastboot-xiaomi-mi-a2-fastboot-images-t3824849
as "jasmine_global_images_V10.0.2.0.PDIMIFJ_9.0\images\persist.img"; must be copied to ADB / Fastboot installation directory.
Click to expand...
Click to collapse
Latest variant of persist.img for A10 can be found in unofficial repack of 11.0.8.0 OTA, link was published in https://forum.xda-developers.com/showpost.php?p=82370929&postcount=42.
Funny fact, but someone wrote in these forums that he solved his problem with corrupted /persist (being on Pie?) using image from the 1st official fastboot image for Oreo (V9.6.9.0.ODIMIFE, link in the thread pointed to in OP and above.)
Will it work with WIfi problems in MIUI for Mi A2
I'm using Custom Rom named as Derpfest and i had also flashed MIUI 11 but my wifi doesn't works in MIUI while it works perfectly for Derpfest.
steps please?
tnt-4- said:
i've done it but my front camera still not working. when return it returned at secondary. :crying:
Then i disassembly my phone and disconnect my camera. I open my phone again and did the same thing. Finally i reconnect the camera and it works!! Thanks fo all Aerobatic
Click to expand...
Click to collapse
Can you describes the steps... yo disassembly and disconnect the camera module, and then? you power it on?

Resources