Factory Reset with TWRP and Magisk Boot loops back to TWRP - X Style (Pure) Q&A, Help & Troubleshooting

I tried to do a Factory Reset from within Nougat 7.0 under Settings, Backup & reset "Factory data reset" but after a reboot, my MXPE entered TWRP, so I tried doing another System reboot, but kept booting to TWRP, I eventually had to Re-Flash step by step , but I do know what could have caused it, I tried it 3 times and each time, same result. I have TWRP 3.1.1-0, Magisk 14.0 installed with Xposed Framework 88.2 SDK-24 (Systemless by topjohnwu) installed, and followed these steps https://forum.xda-developers.com/xposed/unofficial-systemless-xposed-t3388268. After installing TWRP Recovery, I made sure to choose to leave the System Partition READ ONLY.
Code:
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot flash bluetooth BTFM.bin
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo
fastboot oem fb_mode_clear
fastboot reboot
Then after a complete setup
fastboot flash recovery twrp-3.1.1-0-clark.img
fastboot flash logo logo.bin (Custom Logo) (to wipe that stupid Unlocked Bootloader Warning logo)
fastboot reboot (back into Recovery) (2x)
Any help would be most appreciated..

Boot into twrp and do "format data/factory reset".
Reflash magisk if you want root.
Reset from settings works only with stock recovery.
---------- Post added at 06:16 AM ---------- Previous post was at 06:16 AM ----------
@CLETjB

Thank you, I'll try it.

dzidexx said:
Boot into twrp and do "format data/factory reset".
Reflash magisk if you want root.
Reset from settings works only with srock recovery.
---------- Post added at 06:16 AM ---------- Previous post was at 06:16 AM ----------
@CLETjB
Click to expand...
Click to collapse
^^^ This.
When you choose to do a factory reset, the phone attempts to boot to recovery and perform that action.
When you have a custom recovery on the device, the action cannot be completed and the phone retains a 'flag' within one of the partitions to continually boot to recovery.
This partition has been identified on most phones that have been around for while and rooted, however, the method of removing this flag is usually performed in an 'unchecked' state, and therefore, any mistyping can potentially brick the phone for good. Hence these methods are not generally publicised.
I remember back in the days of Gingerbread and Ice Cream Sandwich, these methods were shared more openly, however, in those days, I think the community both here, and on other forums, was a little more savvy in terms of technical ability and awareness of potential issues.
Regardless, if you have twrp installed, do not attempt to perform a factory reset from within the settings of android, you can only perform it from within twrp.
I hope that this sheds a little light on the issue.

Yes it does, Thank you.
I only wish the Carriers and MFGs would openly be more friendly with Development/Rooting since it would help Enhance the products openness and compatibility after the initial Warranty period of 2 years. Google Pixel devices welcome Rooting and Bootloader unlocking without void the warranty, plus there is a lot of more customization out there with a rooted device and bland UI and backup options, than one that is so locked down you practically can't do squat with it. I like the MXPE and the MOTO Actions / Voice have a lot to do why the MXPE STOCK image is a sought after device as well the 21 Mega Pixel Camera and the storage options, to name a few. The Craftsmanship of this device from China is pretty good compared to other devices, and it feels like its built strong and not too fragile, I only wish it was 100% waterproof and virtually indestructible like the Droid Turbo II.
I know security has a lot to do with the reluctancy to openly unlock a device, but that would put some more pressure and creativity on some developer like TWRP to help protect the device they are running on.

removed

Related

Need help... Bricked my phone...

Hi,
I was flashing many different ROMs in attempt to find a solution to something I was trying to accomplish. In the end, I gave up and decided to go back to stock. I used this instruction to revert back to stock: http://forum.xda-developers.com/moto-x-style/development/pure-firmware-tuff-wip-t3224833
I followed the instruction under Android 6.0, MPH24.49-18-3 FIRMWARE that said to do:
fastboot flash partition gpt.bin
fastboot reboot bootloader
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot flash bluetooth BTFM.bin
fastboot erase cache
fastboot erase userdata
fastboot reboot
I remember when flashing system, there was an invalid sparse header message, but it kept going, so I let it. After that I rebooted bootloader and flashed TWRP again. I then rebooted bootloader once more and entered TWRP. There, I proceeded normally. But then I realized that there was something wrong when I couldn't do the full wipe. I went to look in the mount setting and saw that TWRP was not able to mount internal. The internal was also listed as 0MB. I'm guessing that I need to re-partition/format the internal (or I don't know what I'm talking about lol). Either way, I'm now unable to flash a ROM. Can someone please help me?
Thank you in advance.
try http://forum.xda-developers.com/moto-x-style/development/windows-tool-moto-x-style-pure-edition-t3199905
then flash android 6.0 maybe trupure 2.9 and then get the modem from trupure and flash it
goldentequila said:
Hi,
I was flashing many different ROMs in attempt to find a solution to something I was trying to accomplish. In the end, I gave up and decided to go back to stock. I used this instruction to revert back to stock: http://forum.xda-developers.com/moto-x-style/development/pure-firmware-tuff-wip-t3224833
I followed the instruction under Android 6.0, MPH24.49-18-3 FIRMWARE that said to do:
fastboot flash partition gpt.bin
fastboot reboot bootloader
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot flash bluetooth BTFM.bin
fastboot erase cache
fastboot erase userdata
fastboot reboot
I remember when flashing system, there was an invalid sparse header message, but it kept going, so I let it. After that I rebooted bootloader and flashed TWRP again. I then rebooted bootloader once more and entered TWRP. There, I proceeded normally. But then I realized that there was something wrong when I couldn't do the full wipe. I went to look in the mount setting and saw that TWRP was not able to mount internal. The internal was also listed as 0MB. I'm guessing that I need to re-partition/format the internal (or I don't know what I'm talking about lol). Either way, I'm now unable to flash a ROM. Can someone please help me?
Thank you in advance.
Click to expand...
Click to collapse
Its incomplete comanda... Where is the main spunk files??
These are the main firmware files
---------- Post added at 04:06 PM ---------- Previous post was at 04:00 PM ----------
goldentequila said:
Hi,
I was flashing many different ROMs in attempt to find a solution to something I was trying to accomplish. In the end, I gave up and decided to go back to stock. I used this instruction to revert back to stock: http://forum.xda-developers.com/moto-x-style/development/pure-firmware-tuff-wip-t3224833
I followed the instruction under Android 6.0, MPH24.49-18-3 FIRMWARE that said to do:
fastboot flash partition gpt.bin
fastboot reboot bootloader
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot flash bluetooth BTFM.bin
fastboot erase cache
fastboot erase userdata
fastboot reboot
I remember when flashing system, there was an invalid sparse header message, but it kept going, so I let it. After that I rebooted bootloader and flashed TWRP again. I then rebooted bootloader once more and entered TWRP. There, I proceeded normally. But then I realized that there was something wrong when I couldn't do the full wipe. I went to look in the mount setting and saw that TWRP was not able to mount internal. The internal was also listed as 0MB. I'm guessing that I need to re-partition/format the internal (or I don't know what I'm talking about lol). Either way, I'm now unable to flash a ROM. Can someone please help me?
Thank you in advance.
Click to expand...
Click to collapse
Its incomplete comanda... Where is the main spunk files??
These are the main firmware files
Check all the files that u have flashed
goldentequila said:
Hi,
I was flashing many different ROMs in attempt to find a solution to something I was trying to accomplish. In the end, I gave up and decided to go back to stock. I used this instruction to revert back to stock: http://forum.xda-developers.com/moto-x-style/development/pure-firmware-tuff-wip-t3224833
I followed the instruction under Android 6.0, MPH24.49-18-3 FIRMWARE that said to do:
fastboot flash partition gpt.bin
fastboot reboot bootloader
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot flash bluetooth BTFM.bin
fastboot erase cache
fastboot erase userdata
fastboot reboot
I remember when flashing system, there was an invalid sparse header message, but it kept going, so I let it. After that I rebooted bootloader and flashed TWRP again. I then rebooted bootloader once more and entered TWRP. There, I proceeded normally. But then I realized that there was something wrong when I couldn't do the full wipe. I went to look in the mount setting and saw that TWRP was not able to mount internal. The internal was also listed as 0MB. I'm guessing that I need to re-partition/format the internal (or I don't know what I'm talking about lol). Either way, I'm now unable to flash a ROM. Can someone please help me?
Thank you in advance.
Click to expand...
Click to collapse
Find 18-4 firmware, it's newer anyway... the sparse chunk size error is the problem, the system.img file in that firmware file is too large for the phone to flash via fastboot (thus, it probably isn't an official image, or it's an image for the engineering flash tool, not fastboot). The proper image file with have 6-11 sparce chunks you need to flash individually.
acejavelin said:
Find 18-4 firmware, it's newer anyway... the sparse chunk size error is the problem, the system.img file in that firmware file is too large for the phone to flash via fastboot (thus, it probably isn't an official image, or it's an image for the engineering flash tool, not fastboot). The proper image file with have 6-11 sparce chunks you need to flash individually.
Click to expand...
Click to collapse
I think i made it worse lol... Because I was getting many errors (random reboots), I decided to do a full wipe to install a ROM fresh. When wiping in TWRP, I accidentally wiped "internal" too. I'm guessing that I need to do something to correct this before I can flash 18-4 firmware. Please let me know if you know what I need to do. Thank you.
goldentequila said:
I think i made it worse lol... Because I was getting many errors (random reboots), I decided to do a full wipe to install a ROM fresh. When wiping in TWRP, I accidentally wiped "internal" too. I'm guessing that I need to do something to correct this before I can flash 18-4 firmware. Please let me know if you know what I need to do. Thank you.
Click to expand...
Click to collapse
TWRP shouldn't be a part of this, nor should it matter whats on your internal storage, this is all done with fastboot.
Factory reset in stock recovery, reboot to bootloader, then flash the complete image with fastboot.
Sagar_1401 said:
Its incomplete comanda... Where is the main spunk files??
These are the main firmware files
---------- Post added at 04:06 PM ---------- Previous post was at 04:00 PM ----------
Its incomplete comanda... Where is the main spunk files??
These are the main firmware files
Check all the files that u have flashed
Click to expand...
Click to collapse
The instruction in that post said to not worry about the sparse error message, so I went with it. This is what the post said.
"You may notice a "sparse header error" when flashing at the beginning. Don't worry about it, all is well. The current AutoFlashFirmware.bat file doesn't work with this Firmware file. Flash the files manually!"
Also, i posted above too, but I just accidentally wiped internal via TWRP too. Do you know what I need to do now in order to get my phone back? I've found solutions for other phones regarding this situation, but I haven't come across one for Moto X Pure. This is what happens when you work on your phone all day long and some more into late night lol...
acejavelin said:
TWRP shouldn't be a part of this, nor should it matter whats on your internal storage, this is all done with fastboot.
Factory reset in stock recovery, reboot to bootloader, then flash the complete image with fastboot.
Click to expand...
Click to collapse
Thank you for your ongoing support. I just want to make sure I'm doing this right. I found this firmware: http://forum.xda-developers.com/showpost.php?p=69103575&postcount=243
Could you please tell me if you think that's what I should flash?
Also, if you don't mind, will you please share exact fastboot commands/process? I just don't want to make any more mistakes and make things worse. I apologize for being needy.
goldentequila said:
Thank you for your ongoing support. I just want to make sure I'm doing this right. I found this firmware: http://forum.xda-developers.com/showpost.php?p=69103575&postcount=243
Could you please tell me if you think that's what I should flash?
Also, if you don't mind, will you please share exact fastboot commands/process? I just don't want to make any more mistakes and make things worse. I apologize for being needy.
Click to expand...
Click to collapse
Yes, look in my signature and use the non-relock option: http://forum.xda-developers.com/mot...de-return-to-stock-relock-bootloader-t3489110
Code:
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot flash bluetooth BTFM.bin
fastboot erase cache
fastboot erase userdata
fastboot oem fb_mode_clear
fastboot reboot
acejavelin said:
Yes, look in my signature and use the non-relock option: http://forum.xda-developers.com/mot...de-return-to-stock-relock-bootloader-t3489110
Code:
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot flash bluetooth BTFM.bin
fastboot erase cache
fastboot erase userdata
fastboot oem fb_mode_clear
fastboot reboot
Click to expand...
Click to collapse
Thank you very much for that. You mentioned that I would need to factory reset in stock recovery first. Do I just fastboot flash a stock recovery from the firmware zip file from 18-4, boot into its recovery, reset, and then follow the instruction above?
goldentequila said:
Thank you very much for that. You mentioned that I would need to factory reset in stock recovery first. Do I just fastboot flash a stock recovery from the firmware zip file from 18-4, boot into its recovery, reset, and then follow the instruction above?
Click to expand...
Click to collapse
Boot, flash, whatever... It is best to do a factory reset in the default recovery first, but it isn't essential.
acejavelin said:
Boot, flash, whatever... It is best to do a factory reset in the default recovery first, but it isn't essential.
Click to expand...
Click to collapse
Oh ok. Thanks again. I'll report back if I succeed (or not) later today. I appreciate your help.
acejavelin said:
Boot, flash, whatever... It is best to do a factory reset in the default recovery first, but it isn't essential.
Click to expand...
Click to collapse
Thank you so much for your help. It worked perfectly. Now I have my phone back :victory:
goldentequila said:
Thank you so much for your help. It worked perfectly. Now I have my phone back :victory:
Click to expand...
Click to collapse
Glad I could help. You're welcome.
Lol it was sparsechunk i just got confused with it and said spunk??

OTA upgrade from 7.0 with TWRP installed?

Hello,
So I've been trying to update my XT1265 which is currently on build number NPJS25.93-14-4. I my phone is rooted with TWRP installed. The phone was unlocked through the motorolla site. There's an OTA update that keeps annoying me so I'm trying to update it. If I try the update it updates, then when it reboots it stops in TWRP. (My phone actually always boots into TWRP when it reboots/boots but I'm able to reboot bootloader and get it booted.) I've read that I need to get back to stock recovery to get it to update. I've yet to be able to find a stock recovery that I can fastboot to reinstall.
What do I need to do to get this to update?
Generally, OTA updates require stock recovery, stock system and stock kernel - any modifications to these and the OTA update fails, as you've found (e.g. the TWRP boot issue). By modifications, I mean TWRP, root, even letting TWRP modify the system read/write status.
If you really want to flash OTA updates, then you'd be best served by re-flashing the stock ROM. The following commands in fastboot should preserve your data and roll back your device to an OTA friendly state. However, back up and be aware that this will remove TWRP, any modifications (including custom logos) and restore your system partition to a read-only status.
Link for NPJS25.93-14-4 (non Amazon): https://androidfilehost.com/?fid=673368273298955218
Amazon: https://androidfilehost.com/?fid=889764386195899718
Extract the correct stock ROM zip to your ADB directory (it's about 2 GB expanded) and flash with the following commands in your ADB terminal:
Code:
[B]fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img[/B]
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
[B]fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn[/B]
fastboot erase cache
fastboot reboot
Up to you if you choose to flash the steps in bold, as you should be flashing the same firmware onto your device as what you currently have.
Upon rebooting, your device should be back to where it was (though the initial boot might be longer as the cache is re-built) and then you should be okay to take OTA updates.
If you simply want to silence the updater, have a look at this thread (requires root) : https://forum.xda-developers.com/moto-g4-plus/help/how-disable-notification-update-t3459587
As for the TWRP boot issue, you may wish to look at this thread too (though I've not tried this, so be careful) : https://forum.xda-developers.com/moto-g4/help/troubleshooting-twrp-boot-loop-ota-t3714325

Fastboot rom for Moto G4 PLUS XT1643 NPJS25.93-14-15

Hii !! How long will it take for the fastboot rom to arrive for Moto g4 plus Indian retail xt1643 ... With 1st Feb 2018 security patch ???
Vs1607 said:
Hii !! How long will it take for the fastboot rom to arrive for Moto g4 plus Indian retail xt1643 ... With 1st Feb 2018 security patch ???
Click to expand...
Click to collapse
https://drive.google.com/file/d/1qR9MUUQCNUQ6sAivz2OTkc4TW88vmszv/edit
Already available since a month.
smog2699 said:
https://drive.google.com/file/d/1qR9MUUQCNUQ6sAivz2OTkc4TW88vmszv/edit
Already available since a month.
Click to expand...
Click to collapse
Where'd you find it ?? I mean I've been searching this whole time and couldn't find it ?
.
.
.
Just curious ! ?
Vs1607 said:
Where'd you find it ?? I mean I've been searching this whole time and couldn't find it Just curious ! ?
Click to expand...
Click to collapse
It was posted in the forum at least three times.
thorin0815 said:
It was posted in the forum at least three times.
Click to expand...
Click to collapse
Hi thorin0815, Vs1607,
Just a off thread question. If a flash this image it will wipe the data? My issue is described on below link. Please help me.
https://forum.xda-developers.com/moto-g4-plus/help/stock-moto-g4-plus-getting-rebooted-t3781480
hardythaker said:
Hi thorin0815, Vs1607,
Just a off thread question. If a flash this image it will wipe the data? My issue is described on below link. Please help me.
https://forum.xda-developers.com/moto-g4-plus/help/stock-moto-g4-plus-getting-rebooted-t3781480
Click to expand...
Click to collapse
If you want to avoid wiping your data whilst flashing the fastboot stock ROM, you can omit the 'fastboot erase userdata' command and you do not have to re-lock your bootloader (re-locking will wipe your data).
However, if you are experiencing instabilities as you mentioned, a data wipe is a useful troubleshooting step, and may help you determine if your data is corrupted or whether you may have a more serious hardware/firmware issue.
echo92 said:
If you want to avoid wiping your data whilst flashing the fastboot stock ROM, you can omit the 'fastboot erase userdata' command and you do not have to re-lock your bootloader (re-locking will wipe your data).
However, if you are experiencing instabilities as you mentioned, a data wipe is a useful troubleshooting step, and may help you determine if your data is corrupted or whether you may have a more serious hardware/firmware issue.
Click to expand...
Click to collapse
Okay thanks for your comments. I will give it a try. Just one question is that the latest firmware. Because I had recently updated the ROM.
hardythaker said:
Okay thanks for your comments. I will give it a try. Just one question is that the latest firmware. Because I had recently updated the ROM.
Click to expand...
Click to collapse
NPJS25.93-14-15 as of writing is the latest firmware, Feb 2018 security patch. What ROM did you update to?
echo92 said:
NPJS25.93-14-15 as of writing is the latest firmware, Feb 2018 security patch. What ROM did you update to?
Click to expand...
Click to collapse
April ota is the last , but no one have it
leap_ahead said:
April ota is the last , but no one have it
Click to expand...
Click to collapse
Yeah the update note appears to be up but as you mentioned it's not been released yet to any channel. So for now the latest firmware we have is the Feb 2018 build.
echo92 said:
If you want to avoid wiping your data whilst flashing the fastboot stock ROM, you can omit the 'fastboot erase userdata' command and you do not have to re-lock your bootloader (re-locking will wipe your data).
However, if you are experiencing instabilities as you mentioned, a data wipe is a useful troubleshooting step, and may help you determine if your data is corrupted or whether you may have a more serious hardware/firmware issue.
Click to expand...
Click to collapse
Can i use this below commands. Also my bootloader is already locked, I have not unlocked the bootloader. Should I have to add any addtional command to above script like fastboot oem lock begin command.
Code:
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
[STRIKE]fastboot erase userdata[/STRIKE]
fastboot erase customize
fastboot erase clogo
fastboot reboot
hardythaker said:
Can i use this below commands. Also my bootloader is already locked, I have not unlocked the bootloader. Should I have to add any addtional command to above script like fastboot oem lock begin command.
<Snip>
Click to expand...
Click to collapse
Okay, as your bootloader is locked, there's no need for the OEM lock commands. Using them, regardless of if your bootloader is locked or not, will erase your data.
Those commands look okay, just ensure in your flashing script that you have that erase userdata command removed (not just struck out). Your command list a look like:
Code:
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase customize
fastboot erase clogo
fastboot reboot
If this flash doesn't get your device going, you may have to wipe your data or consider a service repair as a locked bootloader gives us limited options for rescue.
echo92 said:
Okay, as your bootloader is locked, there's no need for the OEM lock commands. Using them, regardless of if your bootloader is locked or not, will erase your data.
Those commands look okay, just ensure in your flashing script that you have that erase userdata command removed (not just struck out). Your command list a look like:
Code:
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase customize
fastboot erase clogo
fastboot reboot
If this flash doesn't get your device going, you may have to wipe your data or consider a service repair as a locked bootloader gives us limited options for rescue.
Click to expand...
Click to collapse
Thanks mate. Am going to flash this tomorrow. Will surely let you know the outcome. Anyway if all this allow me to use my phone at least for an hour, I will take the backup of the necessary data and then will proceed with wipe data/factory reset.
echo92 said:
Okay, as your bootloader is locked, there's no need for the OEM lock commands. Using them, regardless of if your bootloader is locked or not, will erase your data.
Those commands look okay, just ensure in your flashing script that you have that erase userdata command removed (not just struck out). Your command list a look like:
Code:
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase customize
fastboot erase clogo
fastboot reboot
If this flash doesn't get your device going, you may have to wipe your data or consider a service repair as a locked bootloader gives us limited options for rescue.
Click to expand...
Click to collapse
Okay so I have flash the phone using above commands, but no luck, exact same issue is persists and even nothing has been changed on the phone, not even lock screen wallpaper.
So now do you have any more suggestion please let me know if not will proceed with Data Wipe. Also Even if I wipe user data and after that can I recover files using some Andrioid File Recovery Tools out there.
Waiting for your reply and will proceed as you will suggest. Thanks.
hardythaker said:
Okay so I have flash the phone using above commands, but no luck, exact same issue is persists and even nothing has been changed on the phone, not even lock screen wallpaper.
So now do you have any more suggestion please let me know if not will proceed with Data Wipe. Also Even if I wipe user data and after that can I recover files using some Andrioid File Recovery Tools out there.
Waiting for your reply and will proceed as you will suggest. Thanks.
Click to expand...
Click to collapse
That's not good, if a flash doesn't fix things.
1)Try to wipe your data via a factory reset. I think you can try to keep your internal storage by selecting to only wipe userdata in the stock recovery (boot to recovery, hold the power key then press the volume up key to get past the 'No Command screen', then under wipe data/factory reset, there should be an option to wipe userdata only). Then wipe cache/Dalvik in that same menu, and see if your device boots. I do not know if file recovery tools will work on non-rooted devices (due to restrictions on reading the data partition).
2)If that doesn't work, your device may have a serious hardware fault that only a service centre can resolve.
echo92 said:
That's not good, if a flash doesn't fix things.
1)Try to wipe your data via a factory reset. I think you can try to keep your internal storage by selecting to only wipe userdata in the stock recovery (boot to recovery, hold the power key then press the volume up key to get past the 'No Command screen', then under wipe data/factory reset, there should be an option to wipe userdata only). Then wipe cache/Dalvik in that same menu, and see if your device boots. I do not know if file recovery tools will work on non-rooted devices (due to restrictions on reading the data partition).
2)If that doesn't work, your device may have a serious hardware fault that only a service centre can resolve.
Click to expand...
Click to collapse
Okay so seems like am in serious trouble.
1) Done wipe data (user data only) with no luck.
2) Done wipe data with userdata and personalized content, still...
3) Flash stock ROM along with "Fastboot Erase userdata", but no joy.
Should I unlock the bootloader now and try to install TWRP and from there if I can go some where
And now I have kept the phone on Welcome Screen, its not getting rebooted, Am able to go till Select WIFI, even am able to connect to WIFI. Then on next screen it is asking me to "Accept Moto T&C", after that it will show me Checking Connectivity > Checking For Update > Checking Info.......and this is the point where it get restarted. Can you guess what is the issue, seems like its some network or connectivity hardware issue.
hardythaker said:
Okay so seems like am in serious trouble.
1) Done wipe data (user data only) with no luck.
2) Done wipe data with userdata and personalized content, still...
3) Flash stock ROM along with "Fastboot Erase userdata", but no joy.
Should I unlock the bootloader now and try to install TWRP and from there if I can go some where
And now I have kept the phone on Welcome Screen, its not getting rebooted, Am able to go till Select WIFI, even am able to connect to WIFI. Then on next screen it is asking me to "Accept Moto T&C", after that it will show me Checking Connectivity > Checking For Update > Checking Info.......and this is the point where it get restarted. Can you guess what is the issue, seems like its some network or connectivity hardware issue.
Click to expand...
Click to collapse
You'd only be able to unlock your bootloader if you enabled OEM unlocking in Settings>Developer Options, and you can only get to Developer Options if you can properly boot into the system (as a security measure)....
Hmm, if it's holding on the Setup Assistant now, can you use mobile data to set up instead of Wi-Fi? If it is an issue with the Wi-Fi, maybe using the mobile signal could get around that.
echo92 said:
You'd only be able to unlock your bootloader if you enabled OEM unlocking in Settings>Developer Options, and you can only get to Developer Options if you can properly boot into the system (as a security measure)....
Hmm, if it's holding on the Setup Assistant now, can you use mobile data to set up instead of Wi-Fi? If it is an issue with the Wi-Fi, maybe using the mobile signal could get around that.
Click to expand...
Click to collapse
Tried with mobile data too, but still same issue. Anyway am in service center now let's see what they say.
echo92 said:
You'd only be able to unlock your bootloader if you enabled OEM unlocking in Settings>Developer Options, and you can only get to Developer Options if you can properly boot into the system (as a security measure)....
Hmm, if it's holding on the Setup Assistant now, can you use mobile data to set up instead of Wi-Fi? If it is an issue with the Wi-Fi, maybe using the mobile signal could get around that.
Click to expand...
Click to collapse
Okay so after one-month of stupidity from service center and some other guys finally I myself resolved the issue.
1) Service center tried to flash the rom but didn't resolved the issue.
2) They changed the battery, but still the same issue.
3) They said that this is motherboard issue and it will cost 5200 INR.
Then gave my phone on yaantra .com to repair it they kept the phone for 5 days and said the same thing that it is a motherboard issue as network circuit is not working properly.
( In between this I end up buying OnePlus 6 :victory: :victory: )
Then I bought one new damaged phone in which motherboard was working fine. I replaced that motherboard with mine and still the same issue. After this I started disconnecting parts one by one which are there on display pannel. After checking speaker, vibrator, flash, when I disconnected the fingerprint sensor and rebooted the phone it was totally fine and no more reboots.
I never thought that a corrupted/damaged fingerprint scanner can do this kind of wired issue to a phone. .Now this will be a spare phone without fingerprint scanner. Thanks for your help @echo92

[Q] Boot looping into TWRP, XT1768 Qualcomm, can boot via "factory mode"

Hello all! Been a member for years but haven't had to post anything for a very very long time. Having a very strange compound set of issues with an XT1768 Moto E4. I bought this phone about two years ago but only used it for a couple of months. I did unlock the bootloader and install TWRP back then but don't remember what else, not sure if it was a custom ROM or not.
It's sat in a drawer for over a year, and I decided to let my kid have it for Christmas. It booted up fine and had 80% battery, all my apps etc. Every thing worked. Then I did a factory reset. After doing the reset, the phone booted into TWRP and would only boot into TWRP after a couple more reboot attempts.
So I downloaded and installed the Stock Plus ROM from XDA, following the instructions to wipe system, data, dalvik and cache first. After flashing, the phone would still only reboot into TWRP. On a whim, I rebooted to bootloader, then selected "factory mode", which then booted normally. The phone worked fine for about a day, but would occasionally reboot on its own and boot into TWRP. Now, the phone does not want to charge,and will reboot into TWRP when disconnecting the USB cable.
I really just want to flash the phone back to 100% stock, factory image. No TWRP, locked bootloader. My kid doesn't need any of it, just a reliable stock phone. I've been googling and searching XDA but information I'm finding is very confusing since there seem to be several e4 models. This one is an unlocked, Qualcomm variant as far as I know. I can't find a 100% stock image to flash or clear instructions to restore back to 100% stock, locked.
Can anyone point me in the right direction? Is Stock Plus good for the XT1768? Is there a way to go back 100% stock with clear instructions? Or to fix the issues with charging and being stuck rebooting into TWRP? Do I need to flash "no verity", whatever that is? I have not done any rooting or unlocking or flashing of Android for quite a while and am a bit Rusty, but I know my way around TWRP and ADB, etc. Any help would be immensely appreciated!
bast525 said:
Hello all! Been a member for years but haven't had to post anything for a very very long time. Having a very strange compound set of issues with an XT1768 Moto E4. I bought this phone about two years ago but only used it for a couple of months. I did unlock the bootloader and install TWRP back then but don't remember what else, not sure if it was a custom ROM or not.
It's sat in a drawer for over a year, and I decided to let my kid have it for Christmas. It booted up fine and had 80% battery, all my apps etc. Every thing worked. Then I did a factory reset. After doing the reset, the phone booted into TWRP and would only boot into TWRP after a couple more reboot attempts.
So I downloaded and installed the Stock Plus ROM from XDA, following the instructions to wipe system, data, dalvik and cache first. After flashing, the phone would still only reboot into TWRP. On a whim, I rebooted to bootloader, then selected "factory mode", which then booted normally. The phone worked fine for about a day, but would occasionally reboot on its own and boot into TWRP. Now, the phone does not want to charge,and will reboot into TWRP when disconnecting the USB cable.
I really just want to flash the phone back to 100% stock, factory image. No TWRP, locked bootloader. My kid doesn't need any of it, just a reliable stock phone. I've been googling and searching XDA but information I'm finding is very confusing since there seem to be several e4 models. This one is an unlocked, Qualcomm variant as far as I know. I can't find a 100% stock image to flash or clear instructions to restore back to 100% stock, locked.
Can anyone point me in the right direction? Is Stock Plus good for the XT1768? Is there a way to go back 100% stock with clear instructions? Or to fix the issues with charging and being stuck rebooting into TWRP? Do I need to flash "no verity", whatever that is? I have not done any rooting or unlocking or flashing of Android for quite a while and am a bit Rusty, but I know my way around TWRP and ADB, etc. Any help would be immensely appreciated!
Click to expand...
Click to collapse
Good source for firmware
https://mirrors.lolinet.com/firmware/moto/perry/official/
Probably use Retus software channel
Sent from my mata using XDA Labs
---------- Post added at 04:06 AM ---------- Previous post was at 04:00 AM ----------
The XT1768 is Qualcomm
Flash command s should be
Code:
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase modemst1
fastboot erase modemst2
fastboot flash dsp adspso.bin
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash oem oem.img_sparsechunk.0
fastboot flash oem oem.img_sparsechunk.1
fastboot erase userdata
fastboot erase cache
fastboot erase DDR
fastboot oem fb_mode_clear
Sent from my mata using XDA Labs
---------- Post added at 04:08 AM ---------- Previous post was at 04:06 AM ----------
Some good instructions in
https://forum.xda-developers.com/moto-e4/how-to/firmware-restoring-moto-e4-xt1766-t3820749
Or my
Setting up and Using adb.exe and fastboot.exe https://forum.xda-developers.com/android/general/index-links-setting-using-adb-fastboot-t3495167
Sent from my mata using XDA Labs
Many thanks! I will try the most recent image in the Retus folder using those commands you posted! Thanks!

Moto G7 and... Ubuntu Touch GSI

Maybe it isn't a right place to ask for it, however, I saw that erfanoabdi made an Ubuntu Touch GSI and also a halium-boot port for river. Maybe it's a silly question, but it is possible to just simply install this GSI (or maybe semi-GSI, because it requires halium port) on river and boot it? There's a simple guide for installing this GSI or any device which has a halium port, here it is:
0) Install treble compatible android 9 rom
1) FORMAT data in twrp
2) Flash halium-boot.img of your device
3) Flash GSI zip (I think I can't give a link here, it is allowed?)
So can it theoretically work? I tried it, but unfortunately I saw just blank screen after booting.
don't format data before LOS16
HueyT said:
don't format data before LOS16
Click to expand...
Click to collapse
So, I should:
1. Flash LOS 16 without formatting data (I'm on Android 10)
2. Format data
3. Flash halium boot
4. Flash UBports GSI
I'll try that but I don't think it's a data problem, because I've already tried it and the zip was successfully installed - files it should copy were copied on data partition, I've checked this. But I'll try once more, without formatting data. Should I boot lineage after flashing?
Yeah, so I followed this and it worked. Thanks!
If anyone had the same problem, I'll write down all what I did:
0. Temporarily booted TWRP and installed it via zip (twrp-3.3.1-14-river)
1. Installed LOS 16 (lineage-16.0-20200127-UNOFFICIAL-river) without formatting data.
2. Booted LOS but it rebooted as the data wasn't formatted and i kept it booting until it booted into LOS Recovery to format data, so I just rebooted phone without formatting data and installed TWRP as in step 0.
3. Flashed halium-boot as boot image in TWRP and installed UBports installed v5 zip, also in TWRP of course.
4. Rebooted phone.
5. Now Ubuntu Touch booted succesfully. Unfortunately, it reboots after about 1 minute. So it's not stable enough at this time. Or maybe I'm doing something wrong, I'll try also another vendor image.
EDIT: I've just tried another vendor.img from newer LOS16 build. Worked fine, but sim doesn't work
Nick_Nicker said:
Maybe it isn't a right place to ask for it, however, I saw that erfanoabdi made an Ubuntu Touch GSI and also a halium-boot port for river. Maybe it's a silly question, but it is possible to just simply install this GSI (or maybe semi-GSI, because it requires halium port) on river and boot it? There's a simple guide for installing this GSI or any device which has a halium port, here it is:
0) Install treble compatible android 9 rom
1) FORMAT data in twrp
2) Flash halium-boot.img of your device
3) Flash GSI zip (I think I can't give a link here, it is allowed?)
So can it theoretically work? I tried it, but unfortunately I saw just blank screen after booting.
Click to expand...
Click to collapse
Did it occur to you to maybe link to what you're talking about? Where is this halium-boot port for River you're talking about? I see nothing in the main GSI thread about anything but the G7 Power. No results on google for halium-boot river or halium river point to anything but this thread, so I have no idea what you could possibly mean.
Check on https://build.lolinet.com/file/halium/
Here you can find GSI and halium-boot images from Erfan. He also posted it on XDA, here you can find all information about it: https://forum.xda-developers.com/pr...development/gsi-ubuntu-touch-ubports-t4110581
So, halium-boot.img is found on build.lolinet.com
But you can also build Halium 9 image if your device's kernel source is available, here's some info https://github.com/ubports/porting-notes/wiki/Generic-system-image-(GSI)#how-to-install-gsi
Also it's very important to have Android 9 ROM installed before. However, stock Android 9 didn't work for me, I prefer LineageOS. So, just install Lineage and then the GSI and halium boot image. For Moto G7 also flash 'river-firmwares.zip' found on lolinet. It'll fix that weird vibration noise bug. For now, there are some visual glitches visible (also only on river), but it'll be fixed. Anbox is working if you have /data partition formatted in ext4 (not f2fs), so if you follow instructions, you can also run some Android apps. Unfortunately, for me internet connection inside Anbox doesn't work.
Thanks sorry I was just starting to feel a bit insane, that stuff is not indexed on google at all by the looks of it. Thank you.
So here is the process that worked for me.
I started with the stock rom.
1. Followed the full Lineage OS install instructions, including the partitions zip etc.
2. Installed Lineage OS on Slot B per the above instructions
3. Wiped data
4. Flash halium-boot.img
5. Flash GSI zip
Everything works perfectly including cellular functionality.
Followed the steps above. Is it possible to revert?
I followed the steps above, but I am have serious issues with the screen jitter. I have been looking all over the place to see if there is a way to revert back to android so that I can use my phone without the screen jitter. Does any one have any instructions on how to do this? I did turn on ADB mode on Ubuntu Touch but my computer does not see an adb device. Thank for any help.
Took me a long time to figure out too.
Main thing is, if you hold down Power and Volume Down, eventually it will reboot to the boot menu. Don't select anything, just plug it in, and you'll have fastboot.
To go back to stock:
1. Hold down Power and Volume till the boot menu shows up.
2. Plug the phone into your PC
3. Get the newest firmware for your phone model. I bought mine at Best Buy, so it was RETUS aka retail US. https://mirrors.lolinet.com/firmware/moto/river/official/
4. Extract the archive, and enter that folder in your terminal
5. Run the following commands from that folder. I saved these commands in a shell script and ran it but I think you can just paste it
THIS WILL WIPE ANY DATA ON YOUR PHONE AND PUT IT BACK TO FULL FACTORY FIRMWARE WITH LOCKED BOOT LOADER. At least when I ran it, it got my phone 100% no more complaints when it boots about untrusted code. After this you should have a fresh phone you can unlock and try flashing again. THis also restored my OTA ability and I was able to get the Android 10 update without any issues.
fastboot oem lock begin
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase modemst1
fastboot erase modemst2
fastboot flash dsp adspso.bin
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash dtbo dtbo.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
fastboot flash system system.img_sparsechunk.10
fastboot flash system_b system_b.img_sparsechunk.0
fastboot flash system_b system_b.img_sparsechunk.1
fastboot flash system_b system_b.img_sparsechunk.2
fastboot flash vendor vendor.img_sparsechunk.0
fastboot flash vendor vendor.img_sparsechunk.1
fastboot flash vendor vendor.img_sparsechunk.2
fastboot flash oem oem.img
fastboot flash oem_b oem_other.img
fastboot erase userdata
fastboot erase DDR
fastboot oem fb_mode_clear
fastboot oem lock
fastboot oem lock
fastboot oem lock
fastboot flash boot boot.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
fastboot flash system system.img_sparsechunk.10
fastboot flash oem oem.img
fastboot oem lock
Click to expand...
Click to collapse

Categories

Resources