flashing and bootloader relocking. - Moto G 2015 Q&A, Help & Troubleshooting

Hello, I am new to custom rom flashing, I understand that I can relock the bootloader if I want to and also can restore the stock rom but every tutorial I have seen shows me to lock the bootloader after flashing the stock rom, so my questions are,
1. Can I keep the bootloader unlocked and still install the stock rom using fastboot and use it?
2. If it is okay then will I loose twrp after flashing the stock rom?
3. If the twrp stays even after flashing the stock rom then how to uninstall twrp?
4. If I decide to relock the bootloader can I unlock it again with the same unique code by motorola?
Thank you soo much.

1. Yes, just refer to the fastboot factory firmware flashing guide by lost101.
2. Yes. Specifically this command replaces existing recovery-
Code:
fastboot flash recovery recovery.img
3. Make sure you include the above command when flashing stock firmware. Recoveries can't be uninstalled, they are overwritten (replaced) directly by flashing a new one from fastboot.
Just FYI, to temporarily boot a recovery without flashing it permanently, use-
Code:
fastboot boot recovery.img
where recovery.img is the file name. It is useful to load up TWRP without disturbing existing stock recovery, for example.
Broadcasted from Zeta Reticuli

Can I unlock and relock bootloader however many times as I wish? and also
I am running on marshmallow so will I get prevalidation error when I install a custom rom 7.0 and try to flash the 6.0 stock firmware because I got this message when I updated to marshmallow and wanted to downgrade to lollipop using fastboot.?
Thanks for your answers and also for the temporary recovery tip.

1. You shouldn't be locking and unlocking it repeatedly, it is a risky procedure involving full firmware flash. Some have got unlock errors while re-unlocking right after their 1st lock, some had their unlocked successfully.
2. You can use 7.x custom ROMs and still flash STOCK 6.0/6.0.1 firmware without errors. Preflash Validation occurs only when the target firmware is newer than the one to be flashed. It occurs mostly in partition table file (gpt.bin) and bootloader (bootloader.img). AFAIK Custom ROMs do not modify these and are immune to this error.
But if you accept an OTA for the stock ROM, you'll most likely get this error. Note that STOCK OTA will most likely update the bootloader and other important partitions too which the custom ROMs do not touch.
So even if you are on 7.x, the phone has an underlying 6.0.1 firmware (almost, except for the ROM itself, obviously). Hence, you'll get preflash validation error only when fastboot flashing an earlier 6.0.1/6.0/5.x STOCK build. You can use older custom ROMs without any problems though.
Broadcasted from Zeta Reticuli

thanks a lot

Related

[Q][HELP] Getting Moto G back to stock

So here I am worrying about bricking my device if I go back to stock.
Here is some insight-
I have an unlocked XT1032 US retail moto g running Cyanogenmod 11 m4 snapshot. I am also running clockworkmod recovery and everything is working fine. I have heard of many people bricking their devices when they try and flash stock because the version doesnt match up with the bootloader version or something like that. My bootloader version is reported to be 4111.5 (The bootloader menu version is 41.11) from the "fastboot getvar all". So if I want to flash stock firmware what version do I need to choose. (can someone give me a link to the download?) Also is there any easier way to do this, perhaps can someone give me a clockworkmod backup of stock firmware and i can flash it via restore in the recovery. Also is there a way to get .img files of my whole phone via the dd command on the superuser shell. (Someone please give me a list of those commands to make a full image of my phone) so I can restore incase something goes wrong.
So pretty much all in all can someone please give me a link to the correct stock firmware for my phone that I can flash with NO issues and a list of commands that I can use to flash.
And just wondering what is mfastboot and how is it different from fastboot.
I should have made a backup with cwm recovery before I installed cm11 but I forgot which is why I made this thread. ALL HELP IS APPRECIATED! THANKS!
hey try downloading stock firmware from this link http://sbf.droid-developers.org/download.php?device=14&file=786
then follow instruction from this thread http://forum.xda-developers.com/showthread.php?t=2542219
if you failed once don't panic... just try another firmware from here http://sbf.droid-developers.org/phone.php?device=14
just make sure you choose firmware which is for retail US and also choose right version of android... but first try the firmware i have mentioned above...
skyguy126 said:
So here I am worrying about bricking my device if I go back to stock.
Here is some insight-
I have an unlocked XT1032 US retail moto g running Cyanogenmod 11 m4 snapshot. I am also running clockworkmod recovery and everything is working fine. I have heard of many people bricking their devices when they try and flash stock because the version doesnt match up with the bootloader version or something like that. My bootloader version is reported to be 4111.5 (The bootloader menu version is 41.11) from the "fastboot getvar all". So if I want to flash stock firmware what version do I need to choose. (can someone give me a link to the download?) Also is there any easier way to do this, perhaps can someone give me a clockworkmod backup of stock firmware and i can flash it via restore in the recovery. Also is there a way to get .img files of my whole phone via the dd command on the superuser shell. (Someone please give me a list of those commands to make a full image of my phone) so I can restore incase something goes wrong.
So pretty much all in all can someone please give me a link to the correct stock firmware for my phone that I can flash with NO issues and a list of commands that I can use to flash.
And just wondering what is mfastboot and how is it different from fastboot.
I should have made a backup with cwm recovery before I installed cm11 but I forgot which is why I made this thread. ALL HELP IS APPRECIATED! THANKS!
Click to expand...
Click to collapse
XdroidBD said:
hey try downloading stock firmware from this link http://sbf.droid-developers.org/download.php?device=14&file=786
then follow instruction from this thread http://forum.xda-developers.com/showthread.php?t=2542219
if you failed once don't panic... just try another firmware from here http://sbf.droid-developers.org/phone.php?device=14
just make sure you choose firmware which is for retail US and also choose right version of android... but first try the firmware i have mentioned above...
Click to expand...
Click to collapse
Yes what this guy says will work
Almost hard bricked my phone
Tomsgt said:
Yes what this guy says will work
Click to expand...
Click to collapse
during flash gpt.bin it said preflash valadition failed and on the bootloader screen it said partition table downgraded. Used CWM backup to restore and my phone is functioning again but I am still not stock. Please tell me what I am doing wrong? I have attached a screenshot of the command prompt screen.
Q30: i encounter '(bootloader) Preflash validation failed' error message when flashing Firmware Image
You may have updated to Android 4.4.4 via firmware image or OTA update. In this case you now also have the latest version of the Bootloader. That is why you get the above output when attempting to flash a 4.4.2 firmware image. ==> simply flash 4.4.4 images instead.
If the error still occurs, even with a 4.4.4 firmware image, then unlocking bootloader will be necessary.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2537119​
There is no 4.4.4 Retail US yet. You can flash 4.4.4 Retail EU just fine. Recovery flashable zip here:
http://forum.xda-developers.com/moto-g/development/rom-stock-motorola-rom-collection-t2854688​
I have the retail us version though. She. Will the retail us 4.4.4 be available? And one important question when I do go back to stock 4.4.4 with the link you gave me via recovery, will my custom recovery get overwritten with the stock one?
XT1032 is a Global GSM model. you can flash an XT1032 ROM from anywhere in the world and it will work.
It's currently unknown when 4.4.4 US Retail will be available, but I do not think it will take too much longer.
Those zip files only include ROM and Kernel. Recovery will not be changed.
I'll be trying that tomorrow and I'll let you know if it works or not asap. But for now thanks!
You might also need to flash the 4.4.4 EU Retail radio zip available here:
http://forum.xda-developers.com/showthread.php?t=2649763​
I read somewhere that when you flash stock ROM even though the recovery is not being changed, the stock ROM will overwrite the custom recovery in start up.
Is this true?
skyguy126 said:
I read somewhere that when you flash stock ROM even though the recovery is not being changed, the stock ROM will overwrite the custom recovery in start up.
Is this true?
Click to expand...
Click to collapse
Please help my phone is stuck in CWM recovery during the flash and I think the recovery is frozen. Can I hard reboot back to recovery or is my phone totaled? :crying:
This worked for me - http://forum.xda-developers.com/mot...-gpe-4-4-4-t2824377/post55768571#post55768571. Once back to 'base' you can update to 4.4.4 OTA or flash another ROM. And if you get stuck again, re-run this process. Three downloads, a few scripts to run; double-click easy.
Good luck.
Back at stock, just had to give CWM 10mins! Thanks everyone!

[Q] Help! Advice needed for getting OTA Lollipop

I see many noobs like me being confused about how their root and custom recovery status should be before installing or even receivingLollipop OTA.
So my understanding is to receive OTA update and to successfully install it one needs to be on,
1. STOCK firmware of their respective device.
2.Custom recovery ( No TWRP, CWM or any other custom recovery ).
3.Bootloader should be locked.
Am i right?
So, my questions are,
1. I can understand why the first two needs to be done but why should we lock the bootloader?.
2. When i restored to stock firmware( Mine's XT1033 ) KK 4.4.4 from TWRP Recovery with this http://forum.xda-developers.com/moto-g/development/rom-stock-motorola-rom-collection-t2854688 TWRP was still installed on my mobile.But when i reverted to stock 4.4.2( not 4.4.4 ) from fastboot using this http://forum.xda-developers.com/showthread.php?t=2700502 it successfully deleted TWRP.
So when we flash Stock ROM with Zip file it only installs the stock ROM and won't delete TWRP? and when we flash with fastboot( and .xml.zip file ) it removes TWRP? So am i right with this assumption?
If i am right how do i get back to stock recovery( delete TWRP ) since currently i have Stock 4.4.4 from the above link.
Help me and provide some correct scenarios to get Lollipop OTA.
this mototool has a functionallity of retrieving stock recovery
http://forum.xda-developers.com/showthread.php?p=50029015
it's pretty straight forward.
and as of what I've read, no need to relock bootloader for OTA to take place.. but I have no experience whatsoever..

[Q] How to get back to stock recovery?

I have 210.12.40.falcon_umts.EURetail.en.EU ROM installed on my XT1032.
I also have TWRP recovery. I want to install Lollipop OTA so I have to get back to stock recovery.
I tried to flash recovery.img from https://mega.co.nz/#!HRpRTR4Q!GNPL3a1Syc8vwholky1wNNfX4rQ-24swytFM6cUVowM via fastboot but it's not working (red triangle). How to do that?
You need to flash back to stock 4.4.4 with no root and stock recovey, update Motorola Services app in the play store, then check for OTA updates..
audit13 said:
You need to flash back to stock 4.4.4 with no root and stock recovey, update Motorola Services app in the play store, then check for OTA updates..
Click to expand...
Click to collapse
Please read before answering.
I have stock 4.4.4 and I have OTA avaliable. But I can't install it with custom recovery.
My problem is only that I can't install stock recovery.
Did you unzip the file and try to flash the stock recovery using fastboot?
You did not mention whether your ROM was rooted, had any apps removed, etc,. and this is why I suggest re-flashing to make sure you have a completely stock ROM.
You have the EU retail ROM on your phone and the link is for the Retail GB. Not sure if both ROMs use the same recovery and partition layout.
I've just finished flashing stock recovery, this is the guide I used:
http://forum.xda-developers.com/moto-g/general/gpe-ota-lrx21z-5-0-1-xt1033-xt1032-t2969847
You're going to have to download mfastbootv2, Minimal ADB and Fastboot and the batch files, then mfastboot flash recovery recovery.img and I guess you're done.
Though I've did the whole tutorial, so I'm not sure if that one command is enough if you only want to flash recovery, but I think that's all you need.
Need 5.0.1 stock recovery to update to 5.1 ota
Hello, does anyone have the stock recovery image for 5.0.1/LRX21Z.M002? I have been searching google for hours to try and find this image. Any help would be appreciated.
Pr3no said:
I've just finished flashing stock recovery, this is the guide I used:
http://forum.xda-developers.com/moto-g/general/gpe-ota-lrx21z-5-0-1-xt1033-xt1032-t2969847
You're going to have to download mfastbootv2, Minimal ADB and Fastboot and the batch files, then mfastboot flash recovery recovery.img and I guess you're done.
Though I've did the whole tutorial, so I'm not sure if that one command is enough if you only want to flash recovery, but I think that's all you need.
Click to expand...
Click to collapse
audit13 said:
Did you unzip the file and try to flash the stock recovery using fastboot?
You did not mention whether your ROM was rooted, had any apps removed, etc,. and this is why I suggest re-flashing to make sure you have a completely stock ROM.
You have the EU retail ROM on your phone and the link is for the Retail GB. Not sure if both ROMs use the same recovery and partition layout.
Click to expand...
Click to collapse
So, for last 2 hours I was trying to flash stock recovery. I tried to flash different ROMs, wiped data and system several times. Nothing seemed to work. After flashing recovery.img from any stock firmware package there always was red triangle and it didn't work. All custom recoveries works.
So since I've already had my data wiped, I just flashed Lollipop with fastboot and it works well. But still doesn't have stock recovery.

Updating Bootloader safety?

Is it possible to update bootloader and/or radio on kitkat & not ruin the rom or wipe device to update?
To still run kitkat rom w/ newer bootloader?
Yes just flash them manually in fastboot, or flash a zip file in custom recovery.

2022_VZW_EMMC_15_Chipset For Unlocked Dev BL To Downgrade To LL_KK Or Upgrade To MM_And Keep Unlock Bootloader

This Process Will Update Or Downgrade Your VZW EMMC Chipset DEV Aboot Bootloader Unlocked S5 To Marshmallow 6.0 Lollipop 5.0 Or Kitkat 4.2 or 4.4
​Root And Unlock Instructions Can Be Found Here
EMMC 15 Rooting And Bootloader Unlocking
EMMC 11 Rooting And Bootloader Updating Or Downgrading
Explanation On This Process
To update bootloaders to a newer or older bootloaders all moddified system firmware must be put back to stock in order for the bootloader to update. There is some kind of check and a flag is thrown if there is a modded boot or recovery image present. This is why it is a 2 step process and why it cannot simply be a one zip process. You are on unlocked bootloader and have TWRP probably install and maybe a custom boot.img. To upgrade bootloaders the stock recovery and boot images must be put back to stock and when you do this you obviously do not have a way to flash the zip to update rom and bootloaders. because there is no more custom recovery installed. So too do this the first zip removes TWRP and puts back Stock recovery and boot images and also adds safestrap recovery which is a system based recovery. Then when booted to safestrap recovery you can flash the rom zip with bootloader update and it will flash properly because there is no modified boot or recovery image then once the zip is flashed it removes safestrap and puts back TWRP recovery. Now the reason there is a 2 different Files To Prepair To Upgrade Or Downgrade one for kitkat and one for Lollipop/Marshmallow is the safestrap needs to be different for the kitkat system vs the lollipop/marshmallow system which can use the same safestrap. This is the reason on zip does not work for all 3 systems
Download Files To Prepair To Upgrade Or Downgrade From Unlocked KitKat 4.2 or 4.4 Bootloader Rev1-Use To Update To Rev2
EMMC_15_TWRP_KK_Prepare_Dev_BL_Update.zip
This File Is Only For People Still On Rev1 Bootloaders
Download Files To Prepair To Upgrade Or Downgrade From Unlocked KK LL MM All Bootloader Rev2
EMMC_15_TWRP_Prepare_Dev_BL_UP_Dwngrd.zip
This File Is Only For People On Rev2 Bootloaders
Download Rom Files
EMMC_15_SS_Install_QL1_6_0_1_MM_Bootloader_Unlock_AIO_Rom.zip
Stock QL1 Deodexed Rom Prerooted With EFTSU with root hide Debloated And DeKnoxed
EMMC_15_SS_Install_PB1_5_0_1_LL_Bootloader_Unlock_AIO_Rom.zip
Stock PB1 Deodexed Rom Prerooted with SuperSU 2.82 Debloated And Deknoxed
If you wish to use magisk on this rom you can download the View attachment Magisk-v13.3.zip and flash when this entire process is done. If you wish to use newer magisk zips you will need to manually patch your boot.img but the View attachment Magisk-v13.3.zip will do it for you when you flash it
EMMC_15_SS_Install_NK2_4_4_4_KK_Bootloader_Unlock_AIO_Rom.zip
Stock NK2 Deodexed Rom Prerooted with SuperSU 2.82 Debloated And Deknoxed
Instructions
You Must Be On VZW EMMC Chipset 15 With DEV Aboot Unlocked Bootloader With TWRP Recovery
1. Choose the file from the Download Files To Prepair To Upgrade Or Downgrade above that matches your current firmware and place on phone
2. Choose rom from Download Rom Files that you wish to upgrade or downgrade too and copy to phone
3. Reboot too TWRP recovery and choose install and choose EMMC_15_TWRP_**_Prepare_Dev_BL_UP_Dwngrd.zip and install. Do not wipe anything at this point just flash. This zip will remove TWRP recovery and replace any it and your boot image with stock boot images and install safestrap to your system which is needed to upgrade or downgrade bootloaders. When down flashing phone will reboot phone to Safestrap Recovery which looks just like TWRP recovery.
4. In Safestrap recovery choose install and choose the EMMC_15_SS_Install_***_*_*_*_**_Bootloader_Unlock_AIO_Rom.zip you copied to your phone. This zip will install proper bootloaders and firmware and rom and TWRP again. Do Not wipe anything at this point just flash the zip. Once zip is finished flashing phone will power off.
5. Now reboot phone to TWRP recovery which will now be back on your phone and goto wipe and choose advanced wipe and wipe data only. Then reboot phone and you are done
Bugs Problems And Tips
All roms are deodexed so they will take a long time to boot up to 20 minutes or maybe longer the first time or if you wipe dalvik cache or data
When Rom is booting up if your key lights come on and stay on why the rom is on bootanimation the entire time and waiting for rom to boot then this means your bootloader is not matched to firmware. I suggest trying above process
Fingerprint will not work on kitkat roms and may not work on others
All above roms use the QL1 baseband you are free to use any baseband you want however the Non-Hlos file must match firmware so only flash modem file
If you flash modded boot images it may break root
If you loose bootloader unlock or wish too start fresh go here first https://forum.xda-developers.com/ve...-emmc-15-chipset-onlyroot-bootloader-t4009089
If simply wanting to reflash an above rom zip over same rom and firmware it is ok too just flash it in TWRP you can skip the EMMC_15_TWRP_**_Prepare_Dev_BL_UP_Dwngrd.zip
All above methods are for Samsung Stock roms I do not offer support or answer questions about flashing Lineage or AOSP based roms
Tools And Extras
View attachment G900V_TWRP_RECOVERY_AROMA_FIX.tar This is an older TWRP that supports Aroma Installer zips
View attachment Odin_Files_3_13_Patched.zip Patched Odin
Thank you my friend.
Updated root scripts added

Categories

Resources