Okay, i've wanted to flash TWRP, to flash CM11, so i have root, unlocked bootloader, drivers, etc. Required for flashing but there are two problems.
---DONT MIND THIS, MY FAULT (Solved)---
With TWRP flashing:
* Whenever i try to flash it (i have the file in the adt bundle folder with the cmd window open from the directory) and write:
fastboot flash recovery [filename].img (yes, i've checked many times for typos)
I get this:
(Bootloader) variable not supported
---This is the actual problem---
With Stock flashing:
Then i tried to re-flash stock firmware in case that there were any corrupted file interrupting the process.
Flashed, but in the process, after, or while flashing system.img (All with RSD Lite), in the phone, appeared a red text line that said "sp space is not enough" and the phone took like half a minute to reboot again and everything seemed to be normal. But if i try to do any of those processes again, even if i re flash stock fw, it keeps the same.
Need responses please D:
ANMTMS said:
Okay, i've wanted to flash TWRP, to flash CM11, so i have root, unlocked bootloader, drivers, etc. Required for flashing but there are two problems.
---DONT MIND THIS, MY FAULT (Solved)---
With TWRP flashing:
* Whenever i try to flash it (i have the file in the adt bundle folder with the cmd window open from the directory) and write:
fastboot flash recovery [filename].img (yes, i've checked many times for typos)
I get this:
(Bootloader) variable not supported
---This is the actual problem---
With Stock flashing:
Then i tried to re-flash stock firmware in case that there were any corrupted file interrupting the process.
Flashed, but in the process, after, or while flashing system.img (All with RSD Lite), in the phone, appeared a red text line that said "sp space is not enough" and the phone took like half a minute to reboot again and everything seemed to be normal. But if i try to do any of those processes again, even if i re flash stock fw, it keeps the same.
Need responses please D:
Click to expand...
Click to collapse
If I understand your post correctly..
Sir..use mfastboot with this command >>
mfastboot flash recovery recovery.img
Rename your recovery file to this >> recovery.img
Then flash..make sure that the recovery.img file is in the same directory as adb.exe
Make sure that you do have a mfastboot.exe in the same directory as the adb.exe..you may have to also copy some .dll files from another directory to the same directory as the mfastboot.exe (and) adb.exe
Also..you mentioned that you flashed a new OS..maybe the FXZ is modified to NOT erase data/cache.?
Make SURE that you have the proper TWRP version for your device..(probably) "ghost" code name type TWRP is what you'll need..many ones mess up by not using the proper TWRP version for the device..
Sent from my:
(Jaocagomex debloated)
4.4_19.6.3 (Unlocked)
XT1080M Droid Maxx #2
http://waynekent.com/page6.html
ANMTMS said:
Okay, i've wanted to flash TWRP, to flash CM11, so i have root, unlocked bootloader, drivers, etc. Required for flashing but there are two problems.
---DONT MIND THIS, MY FAULT (Solved)---
With TWRP flashing:
* Whenever i try to flash it (i have the file in the adt bundle folder with the cmd window open from the directory) and write:
fastboot flash recovery [filename].img (yes, i've checked many times for typos)
I get this:
(Bootloader) variable not supported
---This is the actual problem---
With Stock flashing:
Then i tried to re-flash stock firmware in case that there were any corrupted file interrupting the process.
Flashed, but in the process, after, or while flashing system.img (All with RSD Lite), in the phone, appeared a red text line that said "sp space is not enough" and the phone took like half a minute to reboot again and everything seemed to be normal. But if i try to do any of those processes again, even if i re flash stock fw, it keeps the same.
Need responses please D:
Click to expand...
Click to collapse
Find the Return to Stock thread.
Use the manual method instead of RSD Lite, and use 'mfastboot' for ALL commands.
The problem is that the native fastboot cannot flash system.img because it is too large. The modified motorola 'mfastboot' is able to flash it.
Please try and post results.
Related
Droid 3 Flash Failure
I assume it is possible to fix this problem but I can not find a solution despite extensive research. I have a Droid 3, XT862 experiencing:
AP Fastboot Flash Mode (S)(Flash Failure)
Every time I start the phone I get this message. I can get around it by using Power+M, going into Boot Mode Selection Menu and using Normal Powerup. I have Safestrap v1.08 installed and am able to run 5.6.890 as my safe ROM and Hash’s Cyanogen ICS and both ROM’s work great.
Having to go through these procedures is a pain. I have tried to SBF. I have attempted to flash using RSD Lite. All attempts fail. I would appreciate any help or even an explanation of what the problem may be. Thanks.
Hello
dowlnoad moto-fastboot
download swu.zip file
( moto-fastboot file and downloaded swu.zip file must be extracted to that same folder )
turn on phone by using power + vol down
and in CMD use a command
moto-fastboot flash preinstall preinstall.img
( you know, how to use a CMD in windows right ? )
after that reboot your phone all should be ok
You Give Me Too Much Credit
Thank you so very much for your help. I have moto-fastboot but have no idea where to obtain the swu.zip file. Any help would be appreciated. CMD in windows, what? Sorry, I am 62 years old, have no experience with this stuff. I thought I was doing well by rooting, strapping, and loading two ROMs. So if you could give me just a little more help here, I will kiss your avatar on the screen (which actually looks pretty hot!). Thanks.
Weird! Could you detail at which step RSD Lite failed to flash the ROM onto your phone? Normally, RSD Lite is the first to call when it comes to flash or unbrick Motorola phones. It's never failed me once since using on my Milestone.
Anyway, I don't know if you've read this instruction. This is pretty much foolproof. The link for the file is dead, you could try this to obtain it.
Good luck!
1. Download full system files from that link
http://www.multiupload.nl/PLYL79UDCC or from link what you got from blackbuddha
1a. make directory on C: and name it 1
2. extract this file to folder c:/1/
3. download moto-fastboot files
http://forum.xda-developers.com/attachment.php?attachmentid=635568&d=1308927194
end extract to C:/1/ where you have system droid3 system files
you must have moto-fastboot file and preinstall.img file in that same folder
( so you must check and if this both file is in diffrent folders please copy all to c:/1/)
4. click on start and in type CMD (and push enter)
5. in this black window ( CMD ) input cd/ (and push enter)
6. now type cd 1 (and push enter) you will go to folder 1
7.and now type moto-fastboot flash preinstall preinstall.img (and hit enter)
*** update ***
You must turn on phone with hold POWER + VOL DOWN buttons i forgot
niko99 said:
1. Download full system files from that link
http://www.multiupload.nl/PLYL79UDCC or from link what you got from blackbuddha
1a. make directory on C: and name it 1
2. extract this file to folder c:/1/
3. download moto-fastboot files
http://forum.xda-developers.com/attachment.php?attachmentid=635568&d=1308927194
end extract to C:/1/ where you have system droid3 system files
you must have moto-fastboot file and preinstall.img file in that same folder
( so you must check and if this both file is in diffrent folders please copy all to c:/1/)
4. click on start and in type CMD (and push enter)
5. in this black window ( CMD ) input cd/ (and push enter)
6. now type cd 1 (and push enter) you will go to folder 1
7.and now type moto-fastboot flash preinstall preinstall.img (and hit enter)
*** update ***
You must turn on phone with hold POWER + VOL DOWN buttons i forgot
Click to expand...
Click to collapse
I tried this but nothing happens after, phone stays in AP Fastboot Flash mode(S)
cmd did sending preinstall and writing okay twice.
Is the phone supposed to restart itself?
What next?
so no problem flash all files
with using a CMD and FAST-BOOT
moto-fastboot flash recovery recovery.img
moto-fastboot flash boot boot.img
moto-fastboot flash devtree device_tree.bin
moto-fastboot flash logo.bin logo.bin
moto-fastboot flash preinstall preinstall.img
moto-fastboot flash cdrom cdrom
moto-fastboot flash radio radio.img
moto-fastboot flash system system.img
and this should help for 100% to you
Still working on this
I, original poster, still working on this to solve problem. Have two Droid3s so I have time to work on it. Will try later today. Thanks.
Does Not work!! Lint in the blowhole?
OK, I have tried this cure multiple ways and it just does not work. I downloaded multiple copies of the files to be installed. I have used CMD as described above but it just does not "flash". When I add the command line in CMD my hard drive cranks and spins, loading the files to be flashed. Then I get <waiting for device>. I put the phone into AP Flashboot Phone battery is OK, and plug in the USB cable. I get Erasing "userdata"...OKAY [0.047s] and Erasing 'cache" ...OKAY [0.156s] CMD says Sending "recovery" <9216 KB>... and nothing. I have waited, and waited. There is just something that prevents the files from being flashed in. Any possible ideas? It is obviously connecting if it can erase, but it will not send.
When using RSD Lite, the phone is detected as Fastboot CDMA_Solana S. When I attempt to flash the SBF file it says: Failed flashing process. Unable to retrieve interface handle. [0x7027]; phone connected.
You also try to flash mbm.bin and mbmloader.bin finally or not ?
MBM.BIN
MBMLOADER.BIN
this two files must work
moto-fastboot flash mbm mbm.bin
moto-fastboot flash mbmloader mbmloader.bin
must work ! look if you have this both files in that same folder where is fast-boot.exe
if you dont have download from here
http://speedy.sh/gURdE/mbmloader.bin
http://speedy.sh/UHGVd/mbm.bin
Thanks again but no luck
Tried to flash just these two files and no luck. The same process as described above occurred, then it did not flash the files. I am about ready to give up and just put up with having to use two steps to start the phone.
Are you on one of the leaked OTA ROMs (.902, .905, or .906)?
I am on .905 and also have this same issue. Cannot flash anything with RSD Lite and I get the AP-FastBoot Flash Failed message everytime I reboot.
I think we need a new version of RSD Lite.
Sent from my DROID3 using xda premium
Maybe Tha's The Problem
Perhaps you have put your finger on the problem. I have .906 currently installed. I am using RSD Lite 5.6 which I assume, but do not know, is the latest version available. My only reservation in agreeing that this may be the problem is that I believe I had 5.6.890 installed when I bricked and tried to unbrick using Pete's unbricking script. Flash would not work. Later I recovered by installing .906 from recovery (I think) and then continued to be unable to flash. So it could be a .906 problem but maybe not.
Preamble
As the title suggests, I had a Nexus 5 running stock Android 5.0, with root and TWRP, and wanted to update to Android 5.0.1 (without losing all my data, of course). I couldn't find any guides for my particular circumstances, so after working out how to do it myself, I thought I'd share my method.
Note: This guide is not for the uninitiated. Be prepared to Google something for yourself if you don't understand it.
Prerequisites
Before starting this guide, you should have:
A Nexus 5 that running stock Android. The presence of root/Xposed/custom recovery (maybe custom kernels?) shouldn't be relevant, but I can't vouch for the efficacy of this guide if you've done something obscure to your install.
Android SDK tools, specifically the ADB and fastboot binaries. Additional USB drivers may be required on Windows.
The factory image for the Android version you are currently running.
1. Uninstall root and other /system modifications
If you have rooted your Android, and/or installed BusyBox, Xposed or other modifications to /system, you will need to uninstall these modifications. Failing to do so will cause the OTA to complain that there's something funky going on in your /system partition.
You may be able to manually uninstall each of these modifications, but this was not enough for my install – doing a ‘Full unroot’ in SuperSU still left behind files in /system. The easiest way to uninstall all /system modifications is to reflash the /system partition.
Extract the Nexus 5 factory image (e.g. hammerhead-lrx21o-factory-01315e08.tgz), yielding a directory with files such as flash-all.bat and image-hammerhead-XXXXXX.zip. Do not use the flash-all script, as this will unnecessarily wipe all data on the device.
Extract the image-hammerhead-XXXXXX.zip file, specifically the system.img file.
Open a command prompt/terminal window.
Connect the phone to the computer with a USB cable.
Boot the phone into the bootloader.
Method 1: Power down the phone, then hold VolUp + VolDn + Power until the phone boots into the bootloader.
Method 2: From the terminal, run adb reboot bootloader while the phone is still powered on.
From the terminal, run fastboot flash system /path/to/system.img.
2. Uninstall any custom recovery
Custom recoveries don't seem to support OTA updates, making it necessary to uninstall the custom recovery by reflashing the stock recovery.
Extract the recovery.img file from the factory image, as in Part 1.
Open a command prompt/terminal window, connect the phone to the computer, and boot into the bootloader, as in Part 1.
From the terminal, run fastboot flash recovery /path/to/recovery.img.
Optional: Reflash boot.img and/or cache.img
Some users have reported that reflashing system.img was not sufficient, and that reflashing boot.img and/or cache.img was also necessary. I did not have this problem, but if you do:
Extract the boot.img and/or cache.img files from the factory image, as in Part 1.
Open a command prompt/terminal window, connect the phone to the computer, and boot into the bootloader, as in Part 1.
From the terminal, run fastboot flash boot /path/to/boot.img.
From the terminal, run fastboot flash cache /path/to/cache.img.
3. Apply the OTA update
The simple part. In the bootloader, use the VolUp/VolDn buttons to select ‘Start’, then press the Power button, to reboot into Android. Follow the system update instructions to install the OTA update.
4. Reflash the custom recovery and re-root
Also self-explanatory.
Hey,
I just wanted to say thanks. This totally fixed the problem I was having. I also want to add that after I flashed the system.img, I was getting errors related to "EMMC:/dev/block/platform/msm_sdcc.1/by-name/boot" with a bunch of numbers after. I googled it and found I had to also flash boot.img, and after that, the OTA worked fine. I would assume if anyone else gets errors like this, they should flash whatever img it shows in the error (ie: mine said /by-name/boot so I flashed boot.img).
-BGM
It worked for me
I've always been using a toolkit for my rooting purposes, I have done Full Unroot on SuperSU, but still getting an error when trying to update to 5.0.1
Will flashing stock wipe everything(whatsapp image, camera's,messages, etc etc)on my phone?
azlan96 said:
I've always been using a toolkit for my rooting purposes, I have done Full Unroot on SuperSU, but still getting an error when trying to update to 5.0.1
Will flashing stock wipe everything(whatsapp image, camera's,messages, etc etc)on my phone?
Click to expand...
Click to collapse
I also had problems using ‘Full Unroot’ in SuperSU. It's not actually as ‘full’ as it sounds.
Flashing a full factory image would normally wipe everything, but carefully following this guide will only reset the /system partition, not any user data.
I'd like to say thank you very much! I was looking for this kind of tutorial... I encountered an error while following all the steps because I forgot I had a custom kernel. So I wanted to add that if you have a custom kernel remember to do the same steps as described above for the kernel (return to stock) and then follow the system and recovery steps afterwards.
If you don't like running commands in terminal you can use Nexus Root Toolkit, on advanced, you have all the commands you need available.
Thank you very much RunasSudo
Taiyo85 said:
I'd like to say thank you very much! I was looking for this kind of tutorial... I encountered an error while following all the steps because I forgot I had a custom kernel. So I wanted to add that if you have a custom kernel remember to do the same steps as described above for the kernel (return to stock) and then follow the system and recovery steps afterwards.
If you don't like running commands in terminal you can use Nexus Root Toolkit, on advanced, you have all the commands you need available.
Thank you very much RunasSudo
Click to expand...
Click to collapse
I have my ADB and Fastboot ok as confirmed by nexus root toolkit, but I am not sure on how to use terminal.. I launched command prompt but it doest recognise all the commands..
Tried Flash Stock + Unroot on Nexus Root Toolkit but the software will crash (fastboot.exe has stopped responding)
I am really clueless on what to do next..
azlan96 said:
I have my ADB and Fastboot ok as confirmed by nexus root toolkit, but I am not sure on how to use terminal.. I launched command prompt but it doest recognise all the commands..
Tried Flash Stock + Unroot on Nexus Root Toolkit but the software will crash (fastboot.exe has stopped responding)
I am really clueless on what to do next..
Click to expand...
Click to collapse
Flash Stock + Unroot wipes everything and defeats the purpose of the tutorial made by RunasSudo
First and foremost you should download Android SDK (Tools only) on http://developer.android.com/sdk/index.html and then ask to install the extra: Google USB Driver.
With Nexus Root Toolkit you don't need terminal, click on advanced and you should see options to flash through fastboot the system only, recovery and kernel. It is pretty straighforward and it asks where the .img are in your computer
Thanks! This guide worked.
For Ubuntu users, you need to install adb and fastboot with these commands :
sudo add-apt-repository ppahablet-team/tools && sudo apt-get update (optional)
sudo apt-get install android-tools-adb android-tools-fastboot
Thanks for the great step by step.
As with some of the other posters, re-flashing system.img was not enough for me, I had to also re-flash the boot.img. Once that was done, I had no problems side loading the update and am now running LRX22C.
I only seem to fiddle with adb once a year - when it OTA time comes - and can never seem to remember some of the steps that need to be taken. Reading through some of the other threads, I have a feeling a lot of people who rooted/custom recovery and cant do the OTA are going to be doing complete image re-flashes when this guide makes that completely unecessary.
thanks again,
.d
BananasGoMoo said:
I googled it and found I had to also flash boot.img, and after that, the OTA worked fine.
Click to expand...
Click to collapse
datcon said:
As with some of the other posters, re-flashing system.img was not enough for me, I had to also re-flash the boot.img.
Click to expand...
Click to collapse
Thanks for the feedback! I've added a note about boot.img to the OP.
+1 for flashing boot.img worked perfect after I did that.
I tried with this tutorial. I flashed system and recovery and then restart. Confirm OTA but I get ERROR.
Then I flashed boot as it was described. Now I don't get OTA In About phone, I'm still on 5.0.0, Check for updates now don't find update
Any idea?
UPDATE - UPDATE: After hour now it is here ... super, it works.
This walkthrough was most helpful! Ended up replacing the boot.img as well since I had ElementalX installed. My apps are optimizing as we speak. Thank you!
Worked for me. What a hassle!
Here is a summary of the process for those looking for a less wordy procedure, with a few added steps:
Download Nexus 5 5.0 (LRX21O) file (note: NOT 5.0.1 yet) https://developers.google.com/android/nexus/images
Unzip via 7-zip multiple times in order to get boot.img, recovery.img, system.img
Enable USB debugging: http://www.kingoapp.com/root-tutorials/how-to-enable-usb-debugging-mode-on-android-5-lollipop.htm
Plug phone into PC > cmd prompt where adb is installed > type "adb devices" to ensure connection is valid (will need to authorize via popup on phone > then "adb devices" should return your device id and "device"; if it says "unauthorized" then look for the popup on your phone)
adb reboot bootloader
Put system.img, recovery.img, and boot.img in same folder as fastboot.exe
Run commands:
fastboot flash system system.img
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot erase cache (this is optional. I didn't have to do it, but you might)
Use Volume Up/Down to select Start > press Power Button to reboot
Update via Settings > About Phone > System Update
Re-flash TWRP recovery:
Get the file from here: http://forum.xda-developers.com/showpost.php?p=57580889&postcount=1
adb reboot bootloader
fastboot flash recovery openrecovery-twrp-2.8.1.0-hammerhead.img
Paul22000 said:
Worked for me. What a hassle!
Here is a summary of the process for those looking for a less wordy procedure, with a few added steps:
1. Download Nexus 5 5.0 (LRX21O) file (note: NOT 5.0.1 yet) https://developers.google.com/android/nexus/images
2. Unzip via 7-zip multiple times in order to get boot.img, recovery.img, system.img
3. Enable USB debugging: http://www.kingoapp.com/root-tutorials/how-to-enable-usb-debugging-mode-on-android-5-lollipop.htm
4. Plug phone into PC > cmd prompt where adb is installed > type "adb devices" to ensure connection is valid (will need to authorize via popup on phone > then "adb devices" should return your device id and "device"; if it says "unauthorized" then look for the popup on your phone)
5. adb reboot bootloader
6. Put system.img, recovery.img, and boot.img in same folder as fastboot.exe
7. Run commands:
fastboot flash system system.img
fastboot flash recovery recovery.img
fastboot flash boot boot.img
8. Use Volume Up/Down to select Start > press Power Button to reboot
9. Update via Settings > About Phone > System Update
Click to expand...
Click to collapse
Maybe you could add `fastboot erase cache` as stepp 8.
gee2012 said:
Maybe you could add `fastboot erase cache` as stepp 8.
Click to expand...
Click to collapse
I added it to step 7, thanks. :good: I also cleaned up the formatting and added step 10 about re-flashing TWRP.
Loading problem
I flashed system, recovery & boot images strictly following the instructions, restarted the phone. It got stuck in loading where balls in four colors keep running for half an hour. Shall I keep waiting? I think there must be something wrong. Your advises are welcome.
guangy said:
I flashed system, recovery & boot images strictly following the instructions, restarted the phone. It got stuck in loading where balls in four colors keep running for half an hour. Shall I keep waiting? I think there must be something wrong. Your advises are welcome.
Click to expand...
Click to collapse
Try flash the partitions again. If it's still not working, you may need to reflash a factory image.
RunasSudo said:
Try flash the partitions again. If it's still not working, you may need to reflash a factory image.
Click to expand...
Click to collapse
I flashed the cache image as well, then the problem solved. Thanks
So i kind of got a situation here , i originally wanted to be rooted and have my nexus 6 non encrypted so i had unlocked and rooted my phone. After i ran the "./fastboot erase userdata" command i flashed the custom recovery again and booted into it. From there i thought i would be able to "./adb sideload" a stock custom rom non encrypted but for some reason i was having difficulty running that command. My laptop was not seeing the phone, so after about 30 min of playing around with it trying to get it to work i figured id just start over fresh. From this point i dont have an OS installed so i knew i would have to download the appropriate files for the nexus 6 so i did. I tried both methods, the "./flash-all.sh" command and flashing everything one by one rebooting the bootloader in between flashes and still kept getting this same error
fastboot(1561,0xa04aa1d4) malloc: *** mach_vm_map(size=1681293312) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
failed to allocate 1679613116 bytes
error: update package missing system.img
and now im stuck in fastboot mode at least, but cannot revert back to stock unless im missing something here. Can someone help please
AnthonyAldrete said:
So i kind of got a situation here , i originally wanted to be rooted and have my nexus 6 non encrypted so i had unlocked and rooted my phone. After i ran the "./fastboot erase userdata" command i flashed the custom recovery again and booted into it. From there i thought i would be able to "./adb sideload" a stock custom rom non encrypted but for some reason i was having difficulty running that command. My laptop was not seeing the phone, so after about 30 min of playing around with it trying to get it to work i figured id just start over fresh. From this point i dont have an OS installed so i knew i would have to download the appropriate files for the nexus 6 so i did. I tried both methods, the "./flash-all.sh" command and flashing everything one by one rebooting the bootloader in between flashes and still kept getting this same error
fastboot(1561,0xa04aa1d4) malloc: *** mach_vm_map(size=1681293312) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
failed to allocate 1679613116 bytes
error: update package missing system.img
and now im stuck in fastboot mode at least, but cannot revert back to stock unless im missing something here. Can someone help please
Click to expand...
Click to collapse
it looks like the script is looking for a file that is not in the proper directory
the flash all script has never worked for me I have always had to manually flash the images.
looks like you are on a mac since you are using the ./with the command
follow the directions below and you should get back to stock
since you are already in bootloader mode
Download the required factory image files to your computer and extract them
Create an empty directory. All of the files that are required, need to be in one (i.e., the same) directory. It does not matter what it is called, but all the files need to be in there, with NO subfolders. EVERYTHING needs to be extracted into this one directory; (it is easier this way)
Download the version of Android you want to your new directory. Make sure you are using a nexus 6 image.
Extract the files from within the .tgz file which you downloaded in step 3 using 7-zip, not WinZip or WinRAR or whatever.
Make sure you have extracted ALL the files (including extracting any files in any archives inside the .tgz file). You should have six (6) files ending with .img in the directory you created in step 1. The other files you extracted from the .tgz are not necessary;
Open a command prompt in the same directory (i.e., make sure you are in the same directory as your files are located). You can hold the shift key when you are in the folder in Windows explorer and right-click in a blank spot and it will open a command prompt. In Ubuntu or MAC just cd to the directory.
Type in the commands into the command prompt
Make sure your computer recognizes your device by typing: fastboot devices
Flash the bootloader: fastboot flash bootloader bootloader-some-description-number.img
Reboot: fastboot reboot-bootloader
Flash the radio: fastboot flash radio radio-some-description-number.img
Reboot: fastboot reboot-bootloader
Flash the system partition: fastboot flash system system.img
Flash the data partition: fastboot flash userdata userdata.img
Flash the kernel/ramdisk: fastboot flash boot boot.img
Flash the recovery partition: fastboot flash recovery recovery.img
Erase the cache partition: fastboot format cache
Reboot: fastboot reboot
Done! The first boot will likely take quite a bit longer than you are used to, as Android builds the cache.
Now you have a fully stock image on your device. The only thing that is different from out-of-the-box condition is that your bootloader is unlocked.
No you can root or decrypt. Search for directions on the forum or the internet.
funny i just did this exact same thing like you instructed and was about to reply to this post saying i resolved it hahah. Thanks anyways though =), i dont understand why i was getting that though because i had every file in the same place
No worries glad you got it working
qnc said:
No worries glad you got it working
Click to expand...
Click to collapse
Also found out that you Dont do the ./fastboot erase userdate command because it puts 0s in and leaves the phone unbootable which was my root cause for my phone being stuck. Instead, after flashing the boot.IMG you do the ./fastboot partition userdata instead and it will do a factory reset and when booting it will not encrypt the phone.
qnc said:
it looks like the script is looking for a file that is not in the proper directory
the flash all script has never worked for me I have always had to manually flash the images.
looks like you are on a mac since you are using the ./with the command
follow the directions below and you should get back to stock
since you are already in bootloader mode
Download the required factory image files to your computer and extract them
Create an empty directory. All of the files that are required, need to be in one (i.e., the same) directory. It does not matter what it is called, but all the files need to be in there, with NO subfolders. EVERYTHING needs to be extracted into this one directory; (it is easier this way)
Download the version of Android you want to your new directory. Make sure you are using a nexus 6 image.
Extract the files from within the .tgz file which you downloaded in step 3 using 7-zip, not WinZip or WinRAR or whatever.
Make sure you have extracted ALL the files (including extracting any files in any archives inside the .tgz file). You should have six (6) files ending with .img in the directory you created in step 1. The other files you extracted from the .tgz are not necessary;
Open a command prompt in the same directory (i.e., make sure you are in the same directory as your files are located). You can hold the shift key when you are in the folder in Windows explorer and right-click in a blank spot and it will open a command prompt. In Ubuntu or MAC just cd to the directory.
Type in the commands into the command prompt
Make sure your computer recognizes your device by typing: fastboot devices
Flash the bootloader: fastboot flash bootloader bootloader-some-description-number.img
Reboot: fastboot reboot-bootloader
Flash the radio: fastboot flash radio radio-some-description-number.img
Reboot: fastboot reboot-bootloader
Flash the system partition: fastboot flash system system.img
Flash the data partition: fastboot flash userdata userdata.img
Flash the kernel/ramdisk: fastboot flash boot boot.img
Flash the recovery partition: fastboot flash recovery recovery.img
Erase the cache partition: fastboot format cache
Reboot: fastboot reboot
Done! The first boot will likely take quite a bit longer than you are used to, as Android builds the cache.
Now you have a fully stock image on your device. The only thing that is different from out-of-the-box condition is that your bootloader is unlocked.
No you can root or decrypt. Search for directions on the forum or the internet.
Click to expand...
Click to collapse
And I was having the same issues executing the flash all command too until I opened the command in a text editor and for every command put the "./" in front and was able to execute it but this is the first time I've gotten an error. My nexus5 worked with this command no problem
worked for me but still could not decrypt
qnc said:
it looks like the script is looking for a file that is not in the proper directory
the flash all script has never worked for me I have always had to manually flash the images.
looks like you are on a mac since you are using the ./with the command
follow the directions below and you should get back to stock
since you are already in bootloader mode
Download the required factory image files to your computer and extract them
Create an empty directory. All of the files that are required, need to be in one (i.e., the same) directory. It does not matter what it is called, but all the files need to be in there, with NO subfolders. EVERYTHING needs to be extracted into this one directory; (it is easier this way)
Download the version of Android you want to your new directory. Make sure you are using a nexus 6 image.
Extract the files from within the .tgz file which you downloaded in step 3 using 7-zip, not WinZip or WinRAR or whatever.
Make sure you have extracted ALL the files (including extracting any files in any archives inside the .tgz file). You should have six (6) files ending with .img in the directory you created in step 1. The other files you extracted from the .tgz are not necessary;
Open a command prompt in the same directory (i.e., make sure you are in the same directory as your files are located). You can hold the shift key when you are in the folder in Windows explorer and right-click in a blank spot and it will open a command prompt. In Ubuntu or MAC just cd to the directory.
Type in the commands into the command prompt
Make sure your computer recognizes your device by typing: fastboot devices
Flash the bootloader: fastboot flash bootloader bootloader-some-description-number.img
Reboot: fastboot reboot-bootloader
Flash the radio: fastboot flash radio radio-some-description-number.img
Reboot: fastboot reboot-bootloader
Flash the system partition: fastboot flash system system.img
Flash the data partition: fastboot flash userdata userdata.img
Flash the kernel/ramdisk: fastboot flash boot boot.img
Flash the recovery partition: fastboot flash recovery recovery.img
Erase the cache partition: fastboot format cache
Reboot: fastboot reboot
Done! The first boot will likely take quite a bit longer than you are used to, as Android builds the cache.
Now you have a fully stock image on your device. The only thing that is different from out-of-the-box condition is that your bootloader is unlocked.
No you can root or decrypt. Search for directions on the forum or the internet.
Click to expand...
Click to collapse
so all of this worked for me and its back up and running, but my phone still says that its encrypted
Hey guys. So I've been trying to manually update with no success so far. I was going to sideload, but I got the November security update ota and there is no ota file for LMY48X to Marshmallow (as far as I know). So I bit the bullet and unlocked the bootloader yesterday, and got the adb and fastboot set up and tried to run the ./flash-all.sh command. (I'm on a Mac) Everything was going fine until I came across an error. So I basically gave up and restored all my user data.
Today I figured I'd try again since I have already unlocked my bootloader and have nothing to lose. mra58k didn't work, so I figured I'd try the mra58n image and removed the -w command from the flash-all.sh and tried again. This is what I got:
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
fastboot(69137) malloc: *** mmap(size=2094391296) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
failed to allocate 2092296104 bytes
error: update package missing system.img
Can anyone help me out? I have a feeling I won't be getting the ota through my phone anytime soon.
I may be wrong as this is a pure guess, but did you check the download to confirm it met the checksum? You might just try deleting your download and redownloading the latest version.
haibane said:
I may be wrong as this is a pure guess, but did you check the download to confirm it met the checksum? You might just try deleting your download and redownloading the latest version.
Click to expand...
Click to collapse
No it is Google. Same here. Flashall.bat stops after flashing m-bootloader and m-radio.
After that it is needed to extract all the images and fastboot flash every image.
Don't use the flash-all.sh file to flash, flash the files manually. Plenty of guides outline the commands to use. Plus, make sure that you're Android SDK Tools is updated to the latest version.
RMarkwald said:
Don't use the flash-all.sh file to flash, flash the files manually. Plenty of guides outline the commands to use. Plus, make sure that you're Android SDK Tools is updated to the latest version.
Click to expand...
Click to collapse
Thanks for the reply. So I went ahead and followed your advice and tried to do it manually. I checked everything was up to date. I flashed the bootloader, radio, recovery and boot images and rebooted the bootloader between every flash with no incident. Then I tried to flash the system.img and it first everything seemed to be ok but the terminal is stuck at "sending sparse 'system' " and hasn't done anything in 20 minutes. I'm afraid to do anything right now. Is it ok to close terminal, reopen it and try flashing the system.img again?
ICStevenC. said:
Thanks for the reply. So I went ahead and followed your advice and tried to do it manually. I checked everything was up to date. I flashed the bootloader, radio, recovery and boot images and rebooted the bootloader between every flash with no incident. Then I tried to flash the system.img and it first everything seemed to be ok but the terminal is stuck at "sending sparse 'system' " and hasn't done anything in 20 minutes. I'm afraid to do anything right now. Is it ok to close terminal, reopen it and try flashing the system.img again?
Click to expand...
Click to collapse
Hmmm...the system.img does take time but shouldn't take 20 minutes. Did you flash all the .img files separately, or did you use the command:
Code:
fastboot -w update image-shamu-mra58n.zip
?
I've never done any of this from a Mac, only Linux and Windows, but here's what I do when flashing manually. I extract the contents of the factory image zip, AND the image-shamu-mra58n.zip into my SDK directory (see image attached).
Once everything is extracted, after backing up things I wanna save on my device, I boot to the bootloader and go to town:
Code:
fastboot erase boot
Code:
fastboot erase cache
Code:
fastboot erase recovery
Code:
fastboot erase system
Code:
fastboot erase userdata
Code:
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.15.img
Code:
fastboot reboot-bootloader
Code:
fastboot flash radio radio-shamu-d4.01-9625-05.27+fsg-9625-02.104.img
Code:
fastboot reboot-bootloader
Code:
fastboot flash system system.img
Code:
fastboot flash boot boot.img
Code:
fastboot flash recovery recovery.img
Code:
fastboot flash cache cache.img
Code:
fastboot flash userdata userdata.img
Code:
fastboot reboot
RMarkwald said:
Hmmm...the system.img does take time but shouldn't take 20 minutes. Did you flash all the .img files separately, or did you use the command:
Code:
fastboot -w update image-shamu-mra58n.zip
?
Click to expand...
Click to collapse
No, I decompressed that zip and flashed them all separately using the
Code:
./fastboot flash
command and dragging the files directly to the terminal and then using
Code:
./fastboot reboot-bootloader
in between every flash.
ICStevenC. said:
No, I decompressed that zip and flashed them all separately using the
Code:
./fastboot flash
command and dragging the files directly to the terminal and then using
Code:
./fastboot reboot-bootloader
in between every flash.
Click to expand...
Click to collapse
Okay, seems like you're on the right path. See my post above. You'll erase everything first, then flash everything back one by one, kinda like what you are already doing. I've never had issues doing it this way ever, it may be overkill and it will wipe your phone completely, but if you've backed things up (pictures, docs, music, etc) beforehand, no biggie. The only times I reload the bootloader is after flashing the bootloader, and then the radio.
The system.img will take the longest, and userdata will take a little time too, but the others should be almost instant.
RMarkwald said:
Okay, seems like you're on the right path. See my post above. You'll erase everything first, then flash everything back one by one, kinda like what you are already doing. I've never had issues doing it this way ever, it may be overkill and it will wipe your phone completely, but if you've backed things up (pictures, docs, music, etc) beforehand, no biggie. The only times I reload the bootloader is after flashing the bootloader, and then the radio.
The system.img will take the longest, and userdata will take a little time too, but the others should be almost instant.
Click to expand...
Click to collapse
The terminal doesn't appear to be responding to any command now. I tried erasing boot and after pressing enter, nothing happened. Closing it and reopening it doesn't help. Should I try restarting my computer?
ICStevenC. said:
The terminal doesn't appear to be responding to any command now. I tried erasing boot and after pressing enter, nothing happened. Closing it and reopening it doesn't help. Should I try restarting my computer?
Click to expand...
Click to collapse
Yeah, give that a shot. As long as you have bootloader access you will be okay.
RMarkwald said:
Yeah, give that a shot. As long as you have bootloader access you will be okay.
Click to expand...
Click to collapse
I am now on 6.0 and everything appears to be functional. Thank you so much for all your help! I really appreciate it.
Awesome man! Glad I could help.
My smartphone was running on Android 9 pie. I am saying "was running" beacuse i am in a trouble now... I flashed a custom recovery(TWRP) and I installed a custom rom (LingeaOS) without wipping storage... from that time TWRP shows that "No os installed" .. It restart again and again but without starting android..Whenever I tried to restore my backuped stock rom It shows an error message"Failed to mount /system".. then I flashed another custom recovery(CWM).. And now it restart again and again I've tried to rebboot it in custom recovery mood but I 've failed... Is my Smartphone is bricked?? Is there any way to solve this problem??
This is how to fix it
Naim178 said:
My smartphone was running on Android 9 pie. I am saying "was running" beacuse i am in a trouble now... I flashed a custom recovery(TWRP) and I installed a custom rom (LingeaOS) without wipping storage... from that time TWRP shows that "No os installed" .. It restart again and again but without starting android..Whenever I tried to restore my backuped stock rom It shows an error message"Failed to mount /system".. then I flashed another custom recovery(CWM).. And now it restart again and again I've tried to rebboot it in custom recovery mood but I 've failed... Is my Smartphone is bricked?? Is there any way to solve this problem??
Click to expand...
Click to collapse
Yes, this is called a soft brick.
You can solve the problem by doing the following:
-Your bootloader should be unlocked, and I think you've already unlocked it since you were trying to flash a custom ROM.
-You need to have a STOCK ROM of your exact phone model, this is different from TWRP backup, search google for your phone model's stock rom and download.
-You should have Fastboot and ADB installed on your pc.
-boot to fastboot mode (volume up+power, then navigate to fastboot mode).
-connect your phone to pc with USB cable
-open the folder where you have downloaded the minimal adb and fastboot, and open cmd window there with right lick or click cmd-here.exe
-now type fastboot devices, and there should be an alphanumeric code. This means your device is connected. If it is not showing up, try downloading 'minimal adb and fastboot tool' and clicking cmd-here.exe.
-In the stock rom file, there will be a file called 'firmware', and inside it there should be these files: 'system.img' 'recovery.img' 'cache.img' 'userdata.img' 'boot.img'
-Copy all 5 of these, then go to the folder where you have adb and fastboot, go inside that folder( to the place where you have all the adb and fastboot files like adbWinApi.dll). Now paste the 5 files here.
-open cmd window again, and type the following:
1) fastboot erase boot
2) fastboot flash boot boot.img
3)fastboot erase system
4)fastboot flash system system.img
5)fastboot erase recovery
6)fastboot flash recovery recovery.img
7)fastboot erase cache
8)fastboot flash cache cache.img
9)fastboot erase userdata (this may be called data, if fastboot shows an error message, type data instead)
10)fastboot flash userdata userdata.img
and you are done, this should enable you to restore your phone.
If you are unable to access your bootloader, try flashing your stock ROM with SP Flash tool (if you have a mediatek device). You have to have your stock ROM downloaded on your pc. Connect phone to pc via usb, open SP Flash tool, select your firmware file in the topmost box, and in the box beneath that, select the file ending in scatter.txt from your firmware file. Uncheck 'preloader' if it shows up on your screen, then click 'download'. Do not disconnect your phone during the process. When it is finished, there will be a green tick, and you should be able to restart your device.