[Q] Homemade Fastboot doesn't work for me - RAZR i Q&A, Help & Troubleshooting

I have flashed the 91.2.26001.Retail.en.EU - 4.1.2 homemade fastboots from mattlgroff several times, but I always stuck in a bootloop.
The warning message of the unlocked bootloader is shown, but nothing happens.
I wiped and formatted all partitions with CWM and installed all manually from my gentoo machine with the same commands as in the batch script shown.
What could be the reason, a missing firmware file for my phone or something related? Is there a possibility to look into a log file what's the error?
I switched back to my saved JB (same version) with CWM and all is fine again. I also tried to mix your homemade system.img with my saved boot.img but with no success. Have I missed anything?

Machredsch said:
I have flashed the 91.2.26001.Retail.en.EU - 4.1.2 homemade fastboots from mattlgroff several times, but I always stuck in a bootloop.
The warning message of the unlocked bootloader is shown, but nothing happens.
I wiped and formatted all partitions with CWM and installed all manually from my gentoo machine with the same commands as in the batch script shown.
What could be the reason, a missing firmware file for my phone or something related? Is there a possibility to look into a log file what's the error?
I switched back to my saved JB (same version) with CWM and all is fine again. I also tried to mix your homemade system.img with my saved boot.img but with no success. Have I missed anything?
Click to expand...
Click to collapse
Hello good morning
You can start the process in fastboot mode
Put manually RAZRiRoot2.zip file in the SDCARD
In the PC, need to modify the file *****.bat (EDIT)
delete 2 lines containing the command ADB, skip the file, saving changes
start your phone in fastboot mode and the PC starts the file ****.bat, you just modified.
Once the process is complete, the file RAZRiRoot2.zip flashing in CWMR
(not you format any partition)
Greetings and Luck
Sorry for my bad english
EXAMPLE
adb kill-server > nul
adb start-server > nul
ping 1.1.1.1 -n 1 -w 500 > nul
cls
echo. "Have drivers installed, phone connected, and USB Debugging enabled in Developer Options."
echo. "Also make sure to have a lot of battery power or a factory-style adapter before attempt."
pause
adb wait-for-device push RAZRiRoot2.zip /sdcard/RAZRiRoot2.zip DELETE THIS
adb reboot bootloader DELETE THIS
ping 1.1.1.1 -n 1 -w 1000 > nul
fastboot flash system system.img.ext4
ping 1.1.1.1 -n 1 -w 1000 > nul
fastboot flash boot boot.img
fastboot flash recovery cwm.img
echo. "Select Recovery with Volume Up and flash RAZRiRoot2.zip from internal SD card..."
echo. "Done. If you bootloop then wipe data. "
pause
Click to expand...
Click to collapse

I think you haven't understood what I meant. The homemade ROM isn't working for me, as I said, after flashing. Flashing is well. It absolutely makes no sense to remove commands which let you enter fastboot mode and enter fastboot mode manually then. And there is no difference of starting a batch Script or typing in the same flash commands by hand in a Shell. Starting the bat isnt possible because of using Gentoo Linux, except for running it through my Virtual Machine or converting it to a bash Script. I just wanna know why it doesn't boot the homemade. I installed the root afterwards manually through CWM from sideload so no need for push and also tried via external sd. Root installed always fine too like the flash process.

Related

I need some serious help

well i happened to have some problems with a theme i was using that made the icons appear themed even in cyanogens roms , and i was told that i needed to flash the htc adp image to fix that
the problem comes here i flashed the htc adp image but i forgot to read what cyanogen said that i had to flash his rom before rebooting
so i just found that cyanogen gives us something to follow just in case it happens what happened to me here http://wiki.cyanogenmod.com/index.php/RE-recovery-img
i went to ''if you currently have an engineering or a Hard SPL'' and followed all the procedures until i got to number 4 where it asks me to Change directory to where you have saved your recovery image..i've tried lots of paths but none seems to work...ADB NOOB HERE so please help
when you didnt follow the process, you lost root.
you have to start from scratch.
.............................................................................
i typed
cd C:\recovery-RA-dream-v1.5.2.img
and it tells me the directory name is invalid what am i doing wrong?
recovery image is not a directory, it'a file. What are you trying to do?
borodin1 said:
recovery image is not a directory, it'a file. What are you trying to do?
Click to expand...
Click to collapse
im trying to flash amon ra recovery via fastboot
Easier to do it from adb
Code:
adb remount
adb shell flash_image recovery C:\recovery-RA-dream-v1.5.2.img
reboot
Just a tip: I usually rename files into something easier to type, like ra152.img. Up to you though.
You can also do it from terminal (place file on the root of sdcard)
Code:
su
flash_image recovery /sdcard/filename.img
reboot
If you must do it via fastboot
Start your phone in fastboot mode (camera/power)
Code:
fastboot flash recovery recovery-RA-dream-v1.5.2.img
fastboot reboot
borodin1 said:
Easier to do it from adb
Code:
adb remount
adb shell flash_image recovery C:\recovery-RA-dream-v1.5.2.img
reboot
Just a tip: I usually rename files into something easier to type, like ra152.img. Up to you though.
You can also do it from terminal (place file on the root of sdcard)
Code:
su
flash_image recovery /sdcard/filename.img
reboot
If you must do it via fastboot
Start your phone in fastboot mode (camera/power)
Code:
fastboot flash recovery recovery-RA-dream-v1.5.2.img
fastboot reboot
Click to expand...
Click to collapse
i would do this..but i cant since i messed up when flashing the htc adp image im following cyanogens tutorial http://wiki.cyanogenmod.com/index.php/RE-recovery-img and it says that i have to flash the new recovery through fastboot , and the part im stuck at is step 4 where he says that i need to Change directory to where you have saved your recovery image
if you can get into the main phone operating system via a boot up then use linda file manager to move them
when i type this
fastboot recovery recovery-RA-dream-v1.5.2.img
i get this message "error: cannot load 'recovery-RA-dream-v1.5.2.img
then i changed the directory to where the recovery image was and when i tried to flash i got this message
'fastboot' is not recognized as an internal or external command, operable program or batch file
Not sure, I'm not anywhere near my computer. Try putting your recovery image into different locations (i always put it on desktop) and rename it to something simpler, without any punctuation or special characters (i suggest rec.img). Also... make absolutely sure that you're NOT naming it rec.img.img . Make sure that your PC is not hiding your extensions.
Then, connect your phone to the computer, start your phone in fastboot mode (not Hboot or serial, if you see serial or Hboot on your screen then tap return button)
In command line type
Code:
fastboot devices
to make sure that you're connected
then type
Code:
cd desktop
your directory should change to something like C:\user\desktop (make SURE there are no spaces anywhere in user name, fastboot has problem with that. I had to rename my account to "EugeneAndLiz"a from "Eugene and Liza" because of that)
then type
Code:
fastboot recovery rec.img
fastboot reboot
and let us know how did it go for you. I'l be lurking around here for a while, hopefully we can resolve this.
Good luck
borodin1 said:
Not sure, I'm not anywhere near my computer. Try putting your recovery image into different locations (i always put it on desktop) and rename it to something simpler, without any punctuation or special characters (i suggest rec.img). Also... make absolutely sure that you're NOT naming it rec.img.img . Make sure that your PC is not hiding your extensions.
Then, connect your phone to the computer, start your phone in fastboot mode (not Hboot or serial, if you see serial or Hboot on your screen then tap return button)
In command line type
Code:
fastboot devices
to make sure that you're connected
then type
Code:
cd desktop
your directory should change to something like C:\user\desktop (make SURE there are no spaces anywhere in user name, fastboot has problem with that. I had to rename my account to "EugeneAndLiz"a from "Eugene and Liza" because of that)
then type
Code:
fastboot recovery rec.img
fastboot reboot
and let us know how did it go for you. I'l be lurking around here for a while, hopefully we can resolve this.
Good luck
Click to expand...
Click to collapse
im going to tell you step by step what i do
turn the phone off
hold power and back
i see the androids on skateboards and it says fastboot in red letters
i connect my phone via usb then the name changes to fastboot usb
run the cmd
once there i type where adb is located which is cd C:\android-sdk-windows\tools
then when i type fastboot devices
i see the serial number of my phone
now when i type cd desktop i get this message "the system cannot find the path specified"
and if i ignore that and try to flash
fastboot flash recovery rec.img (yes i did rename the recovery image)
it says that it cant load 'rec.img'
Got it! Put your image file into the "tools' folder and once you see your device in the fastboot just flash it from there
Code:
cmd
cd C:\android-sdk-windows\tools
fastboot devices
fastboot flash recovery rec.img
fastboot reboot
Sorry about all this complication... the main idea is that your recovery needs to be in the same directory as you're when you're flashing. So if earlier you went to tools folder then your file needs to be there as well.
Try it out.
it worked...it said sending 'recovery' <4456 KB>... okay
writting 'recovery'...okay
fastboot reboot
then when i go to the system recovery..its the same htc adp one
i tried to flash amon ra's recovery and cyanogens
oh nevermind..instead of rebooting the phone i just unpluged the device and wnet directly into the system recovery and YES i have cyanogens recovery thank you so much borodin1
hmmmm that's weird because you got confirmation....
1. Did you download right recovery? You had to becaue you tried 2 of them and you can only make the same mistake once lol
2. AmonRA's recovery has the same image in the background as HTCs, are you sure that it's still HTC's recovery?
Other then that... I'm clueless
Can you get su in the adb shell? Try flashing it from adb....
You got me stomped on this.... Anyone else wants to take a shot at this????
i dont know what happened but when i flashed the recovery image on fastboot and then rebooted the phone...then turn off the phone and went to the system recovery and the htc adp recovery appeared...blue letters and the scrolling options..but when i did not reboot the phone after flashing the image and went directly to the system recovery i had the recovery i flashed...then i applyed the updateand everything is good now
weird uh?
will that new recovery stick?... I'm starting to remember something but it's vague... give me few minutes Reboot couple of times into recovery and back for now and see what happens...
it did stick..i just rebooted into recovery and i have the new recovery..haha
Great! Happy modding!

Please Help Tried Updating to 4.4 Kitkat Bricked

Ok so I tried updating my phone that was already rooted on Android 4.3 S-OFF to 4.4 kitkat with sinless rom sense. Transferred the rom zip to my phone, then proceeded to wipe the system and data, as well as davalik cache with clockworkmod recovery. Attempted to flash the rom and it aborted. Tried a few times and nothing worked. Didn't realize till after that my phone had no OS, and now all I can do is enter the bootloader. Can't enter recovery as the phone will enter clockworkmod then abort and reboot the phone. Not sure what to do at this point as I tried one of the guides and couldn't figure it out. If anyone can help me I'd greatly appreciate it. At least I backed everything up on my computer manually and am using my iPhone 4 until I can get this fixed. Thanks in advance.
Try reflashing recovery then if that works ad b push or usb otg a working Rom to your phone
Sent from my HTC One using Tapatalk
nathlynn22 said:
Try reflashing recovery then if that works ad b push or usb otg a working Rom to your phone
Sent from my HTC One using Tapatalk
Click to expand...
Click to collapse
How do I reflash recovery when I can't access the filesystem? Do I need to setup ADB and connect to my phone via command line to initiate the transfer? Can you link me to a thread that explains how to setup ADB in a case like this? Thanks
You need to reflash cwm. I'll try find a link. But after recovery is working you would have to use ad b to sideload the Rom. Have you tried from bootloader fastboot erase cache?
Sent from my HTC One using Tapatalk
nathlynn22 said:
You need to reflash cwm. I'll try find a link. But after recovery is working you would have to use ad b to sideload the Rom. Have you tried from bootloader fastboot erase cache?
Sent from my HTC One using Tapatalk
Click to expand...
Click to collapse
My biggest issue is being able to reflash clockworkmod. If I could that out of the way, I already have the rom on the phone storage, so I should in theory be able to reflash I'd think.
I don't have the option to delete cache within the bootloader under fastboot
One Hype said:
How do I reflash recovery when I can't access the filesystem? Do I need to setup ADB and connect to my phone via command line to initiate the transfer? Can you link me to a thread that explains how to setup ADB in a case like this? Thanks
Click to expand...
Click to collapse
How did you get your One rooted, then?
You need to install ADB/Fastboot on your computer. Best to create a folder directly on C:
In that folder you also copy the .img of the recovery (you need latest TWRP for 4.4 ROMs)
Now, once ADB/Fastboot Folder is set up, the TWRP download is copied into the same folder, you go to your bootloader and connect the One via USB and select FASTBOOT (red letters) and once connected you see (USB)
You open a CMD window (START and type cmd) , in that window you point to the fastboot folder:
cd c:\fastboot (or whatever name you choose as in link above)
fastboot erase cache (enter)
fastboot flash recovery openrecovery-twrp-2.6.3.4-m7ul.img (enter)
fastboot erase cache (enter)
you see the commands running in the cmd window
after that you can choose inside the recovery the ADVANCED option and SIDELOAD ADB
I have not done that, so you need to search the forum on how to do that.
Njoi
Screenshot to see the Fastboot folder on my laptop with the TWRP file in it
Just saw that you still have the .zip of your ROM on your internal storage. So just choose to install that and that's it! Be careful with the wiping option and only choose factory reset or cache/dalvik and never system!
hardstuffmuc said:
How did you get your One rooted, then?
You need to install ADB/Fastboot on your computer. Best to create a folder directly on C:
In that folder you also copy the .img of the recovery (you need latest TWRP for 4.4 ROMs)
Now, once ADB/Fastboot Folder is set up, the TWRP download is copied into the same folder, you go to your bootloader and connect the One via USB and select FASTBOOT (red letters) and once connected you see (USB)
You open a CMD window (START and type cmd) , in that window you point to the fastboot folder:
cd c:\fastboot (or whatever name you choose as in link above)
fastboot erase cache (enter)
fastboot flash recovery openrecovery-twrp-2.6.3.4-m7ul.img (enter)
fastboot erase cache (enter)
you see the commands running in the cmd window
after that you can choose inside the recovery the ADVANCED option and SIDELOAD ADB
I have not done that, so you need to search the forum on how to do that.
Njoi
Screenshot to see the Fastboot folder on my laptop with the TWRP file in it
Just saw that you still have the .zip of your ROM on your internal storage. So just choose to install that and that's it! Be careful with the wiping option and only choose factory reset or cache/dalvik and never system!
Click to expand...
Click to collapse
Gotcha. Makes sense. Will try and let you know. Thanks so much!
Htc one kiktkat 4.4 update gone wrong
hardstuffmuc said:
How did you get your One rooted, then?
You need to install ADB/Fastboot on your computer. Best to create a folder directly on C:
In that folder you also copy the .img of the recovery (you need latest TWRP for 4.4 ROMs)
Now, once ADB/Fastboot Folder is set up, the TWRP download is copied into the same folder, you go to your bootloader and connect the One via USB and select FASTBOOT (red letters) and once connected you see (USB)
You open a CMD window (START and type cmd) , in that window you point to the fastboot folder:
cd c:\fastboot (or whatever name you choose as in link above)
fastboot erase cache (enter)
fastboot flash recovery openrecovery-twrp-2.6.3.4-m7ul.img (enter)
fastboot erase cache (enter)
you see the commands running in the cmd window
after that you can choose inside the recovery the ADVANCED option and SIDELOAD ADB
I have not done that, so you need to search the forum on how to do that.
Njoi
Screenshot to see the Fastboot folder on my laptop with the TWRP file in it
Just saw that you still have the .zip of your ROM on your internal storage. So just choose to install that and that's it! Be careful with the wiping option and only choose factory reset or cache/dalvik and never system!
Click to expand...
Click to collapse
I did all what you said there its still takes me back to bootloader...
and that red message active cmdline overflow (1085bytes) still there...any soulutions to fix this please?
hardstuffmuc said:
How did you get your One rooted, then?
You need to install ADB/Fastboot on your computer. Best to create a folder directly on C:
In that folder you also copy the .img of the recovery (you need latest TWRP for 4.4 ROMs)
Now, once ADB/Fastboot Folder is set up, the TWRP download is copied into the same folder, you go to your bootloader and connect the One via USB and select FASTBOOT (red letters) and once connected you see (USB)
You open a CMD window (START and type cmd) , in that window you point to the fastboot folder:
cd c:\fastboot (or whatever name you choose as in link above)
fastboot erase cache (enter)
fastboot flash recovery openrecovery-twrp-2.6.3.4-m7ul.img (enter)
fastboot erase cache (enter)
you see the commands running in the cmd window
after that you can choose inside the recovery the ADVANCED option and SIDELOAD ADB
I have not done that, so you need to search the forum on how to do that.
Njoi
Screenshot to see the Fastboot folder on my laptop with the TWRP file in it
Just saw that you still have the .zip of your ROM on your internal storage. So just choose to install that and that's it! Be careful with the wiping option and only choose factory reset or cache/dalvik and never system!
Click to expand...
Click to collapse
Just tried everything and it worked 100%! Can't thank you enough!

[TUTORIAL] Applying an OTA update with stock + root/custom recovery

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

Can't Root, Can't Update TWRP - Something Fishy Happening

I can't work out what's going on.
My phone lost it's root a few days ago - I only noticed when Magisk said it had a new one. So here's the lowdown:
My TWRP is out of date.
Magisk is out of date.
I've downloaded both the magisk.zip file and an img file of the latest TWRP.
I put them on the deskop, in the adb folder (in C drive) and on the phone under "downloads".
Boot into recovery, but when I navigate to install a zip file, it can only see the system files, no "downloads" folder or pictures or anything. I can't seem to change that.
Use Powershell to try and sideload the TWRP zip and it says "waiting for device" - that seems good. However, when i then boot into fastboot mode, Powershell tells me "error: cannotload twrp... .img"
So I try and look at Magisk, but I can only download the zip (of which I've done and can't flash it via recovery), or patch boot file, of which I can't navigate to as I'm currently not rooted so it can't find the boot file anyway.
What do I type into Powershell to flash the latest Magisk (I guess I can then update TWRP after using the in-
built updater?)?
When in TWRP, I click on the three lines on the right, which say:
Could not muont /data and unable to find crypto footer.
Failed to mount '/data' (no such process)
Unable to recreate /data/media folder,.
Updating partition details
Failed to mount '/data' (no such process)
... done
Unable to mount storage
Failed to mount '/data' (no such process)
Full SELinux support is present
Unable to mount /data/media/TWRP/.twrps
MTP Enabled
Failed to mount '/data' (no such process)
Click to expand...
Click to collapse
What can be causing all of this?
Probably rip UFS chip, if
Code:
fastboot format userdata
won't help, then you should send your phone for repair
Hmm.
So the only fix is to format all the data?
What data gets deleted?
I don't really want to do that if I can help it but I guess it's the only way to fix it.
Strange how it's just done it by itself.
anotherxdauser said:
Hmm.
So the only fix is to format all the data?
What data gets deleted?
I don't really want to do that if I can help it but I guess it's the only way to fix it.
Strange how it's just done it by itself.
Click to expand...
Click to collapse
Is the system bootable? If yes, then you can make a backup, if not, then you can consider your data gone.
"format userdata" removes everything you have stored on the phone
Yeah, I can boot to my Resurrection Remix rom and see everything, all my files, it's fine.
I can connect to a PC and move files to and fro the device.
It's just TWRP doesn't seem to see the storage. When looking, it just says 0Mb :S
Does Userdata mean the apps and stuff as well?
I saw a video of someone formatting the userdata to ex2, then back to ex4 but if it means I'd have to reinstall RR then it's a lot of work for something that may happen again in the near future.
I have Titanium Backup but of course, it needs root, of which I can't gain :/
Sounds a lot like a failed decrypt of an encrypted userdata partition, this is common in this phone with TWRP and custom ROMs.
Skickat från min ONEPLUS A3003 via Tapatalk
pitrus- said:
Sounds a lot like a failed decrypt of an encrypted userdata partition, this is common in this phone with TWRP and custom ROMs.
Click to expand...
Click to collapse
Is there non-destructive way to fix?
Oh, ok, I thought that the system is broken too. That's ok then, your memory chip is fine.
Can you boot an up-to-date TWRP from fastboot and try to access data?
Try with
Code:
fastboot boot twrp-3.2.3-0-oneplus3.img
Which TWRP version do you have exactly?
Sent from my ONEPLUS A3003 using Tapatalk
przemcio510 said:
Oh, ok, I thought that the system is broken too. That's ok then, your memory chip is fine.
Can you boot an up-to-date TWRP from fastboot and try to access data?
Try with
Code:
fastboot boot twrp-3.2.3-0-oneplus3.img
Click to expand...
Click to collapse
Yeah, try this first. Problably you have a twrp lower than 3.2.0? I think below that it cannot decrypt Oreo encrypted Partitions.
Second thing is. Probably you have to format Data (not Userdata) anyway. I think you probably tried to upgrade Magisk because you lost root. But Magisk hat a bug in 17.0. That corrupted the permission Database. I had the same problem and was not able to get root again until formatted data. You will loose every app and its setting when formatting it. But everything under sdcard/ will still be there. So the download folder should be fine and everything. So when you make a titanium backup of your most valuable apps. You can restore them after renewing your phone.
TLDR:
1. Make Titanium Backup if you have it and want to have your apps back as before.
2. Try przemcio510 suggestion to get new TWRP. (most important)
3. backup your partitions and copy them to your pc
4. backup everything importantto you on your "SDCard" Volume (Where Download is and everything)
5. format DATA, Cache, Dalvik/ART Cache, System
4. Reflash Full OxygenOS 5.0.5
(optional) 5. Flash Rom of your flavor (with/without Gapps)
(optional) 6. Flash magisk
7. boot up your device
przemcio510 said:
Oh, ok, I thought that the system is broken too. That's ok then, your memory chip is fine.
Can you boot an up-to-date TWRP from fastboot and try to access data?
Try with
Code:
fastboot boot twrp-3.2.3-0-oneplus3.img
Click to expand...
Click to collapse
Did this. ADB said it was "waiting for device" so I rebooted to fastboot but then the ADB window shows some options (see quote below), nothing to show it's done anything.
I put the img file on the sim card on the phone and in the directory of the adb.
Code:
PS C:\WINDOWS\system32> fastboot twrp-3.2.3-0-oneplus3.img
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot, system, vendor and if found,
recovery
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> [ <second> ] ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> [ <second> ] ] create bootimage and
flash it
devices list all connected devices
continue continue with autoboot
reboot reboot device normally
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable
PS C:\WINDOWS\system32>
RASTAVIPER said:
Which TWRP version do you have exactly?
Click to expand...
Click to collapse
3.1.1-0
S4RGE said:
TLDR:
1. Make Titanium Backup if you have it and want to have your apps back as before.
2. Try przemcio510 suggestion to get new TWRP. (most important)
3. backup your partitions and copy them to your pc
4. backup everything importantto you on your "SDCard" Volume (Where Download is and everything)
5. format DATA, Cache, Dalvik/ART Cache, System
4. Reflash Full OxygenOS 5.0.5
(optional) 5. Flash Rom of your flavor (with/without Gapps)
(optional) 6. Flash magisk
7. boot up your device
Click to expand...
Click to collapse
My Titanium Backup needs root to work :/
It might have been when I upgraded RR Rom to the Oreo release, but it's only been the past week when I mysteriously lost root access.
anotherxdauser said:
Did this. ADB said it was "waiting for device" so I rebooted to fastboot but then the ADB window shows some options
Click to expand...
Click to collapse
To be clear, I think you mean fastboot whenever "ADB" is mentioned above. adb and fastboot are related, but 2 different things, with different usages and requirements. So it's best to refer to them in correct and distinct terms.
adb: Needs debugging enabled. Will work only in OS or custom recovery. Will not work in bootloader (even in fastboot mode) - maybe this is why you have "waiting for device"?
fastboot: Does not need debugging enabled. Only works in bootloader-fastboot mode.
fastboot is what you want for booting/flashing TWRP. Not adb (at least for the commands/methods suggested here).
anotherxdauser said:
PS C:\WINDOWS\system32> fastboot twrp-3.2.3-0-oneplus3.img
Click to expand...
Click to collapse
When command prompt shows you the list of command, this almost always means your command syntax is incorrect.
In your case, you used typed "fastboot" and a file name, without telling it what to do with that file name. The suggested command was "fastboot boot filename" (no quotes) or another usage option is "fastboot flash filename".
A little confusing I know, "fastboot" in itself is not a full command/action. I has to be "fastboot boot". Think of fastboot as a "thing" instead of an action. Thus, you still need to tell fastboot to perform an action ("boot").
anotherxdauser said:
...
3.1.1-0
My Titanium Backup needs root to work :/
It might have been when I upgraded RR Rom to the Oreo release, but it's only been the past week when I mysteriously lost root access.
Click to expand...
Click to collapse
Ah right I forgot.
As redpoint73 mentioned you have to be in fastboot mode.
When you start up your phone and the unlock Warning ist triggered. Push the volume up or down button and go to fastboot.
When you are in there the fastboot command should work.
As redpoint73 pointed out it is very important that you type "fastboot boot (ImagePath)".
To make it easier for you, you should copy the image where fastboot is.
Then you have only to enter
fastboot boot twrp-3.2.3-0-oneplus3.img
This should do the trick. If you still need help. Don't hesitate to ask.
redpoint73 said:
To be clear, I think you mean fastboot whenever "ADB" is mentioned above. adb and fastboot are related, but 2 different things, with different usages and requirements. So it's best to refer to them in correct and distinct terms.
In your case, you used typed "fastboot" and a file name, without telling it what to do with that file name. The suggested command was "fastboot boot filename" (no quotes) or another usage option is "fastboot flash filename".
Click to expand...
Click to collapse
Sorry my explanation isn't that great.
Whenever I've mentioned adb it's the dos/command prompt window.
Fastboot is that small menu where it shows whether the device bootloader is locked or not isn't it?
At any rate, tried "fastboot boot twrp-3.2.3-0-oneplus3.img" and the command prompt window shows "waiting for device". My device is on, at the homescreen, doing nothing. The command prompt window stays like that until I boot into fastboot mode, where it then just shows the large list of commands quoted above.
HOWEVER, a development!
When in fastboot mode and using the "fastboot boot twrp-3.2.3-0-oneplus3.img" command, the window now says "cannot load 'twrp-3.2.3-0-oneplus3.img': No such file or directory". So I tried typing the exact file path (C:\adb\twrp... img), which has now allowed me to boot into the updated TWRP.
Does this mean it's just booted into it, but not updated to it?
I'm able to see the contents of my sdcard now. So flashed the latest 17.1 magisk zip and... success! I'm now on the latest magisk and have been able to flash the latest TWRP to recovery.
Just to say, I really appreciate the help with this.
I know I could factory reset but it's helping me learn more.
anotherxdauser said:
Whenever I've mentioned adb it's the dos/command prompt window.
Fastboot is that small menu where it shows whether the device bootloader is locked or not isn't it?
Click to expand...
Click to collapse
You confuse some terms. adb and fastboot are programs, command prompt is the interpreter of the commands you give to these programs.
And yes, the fastboot is that mode.
anotherxdauser said:
At any rate, tried "fastboot boot twrp-3.2.3-0-oneplus3.img" and the command prompt window shows "waiting for device". My device is on, at the homescreen, doing nothing. The command prompt window stays like that until I boot into fastboot mode, where it then just shows the large list of commands quoted above.
Click to expand...
Click to collapse
Fastboot mode is meant to be used while phone is booted into fastboot mode
anotherxdauser said:
When in fastboot mode and using the "fastboot boot twrp-3.2.3-0-oneplus3.img" command, the window now says "cannot load 'twrp-3.2.3-0-oneplus3.img': No such file or directory". So I tried typing the exact file path (C:\adb\twrp... img), which has now allowed me to boot into the updated TWRP.
Click to expand...
Click to collapse
"no such file" means that you could have not copied the img file to the same folder as the adb binary (this is not the case when adb and fastboot binaries are installed with %PATH% variable added, then you can use these commands all over the filesystem).
anotherxdauser said:
Does this mean it's just booted into it, but not updated to it?
Click to expand...
Click to collapse
Fastboot boot command, which I have provided earlier is used to boot temporarily, one time an image you tell it to.
anotherxdauser said:
Just to say, I really appreciate the help with this.
Click to expand...
Click to collapse
Just kindly informing that there is a button on the lower-right hand corner for this
anotherxdauser said:
Whenever I've mentioned adb it's the dos/command prompt window.
Fastboot is that small menu where it shows whether the device bootloader is locked or not isn't it?
Click to expand...
Click to collapse
Both adb and fastboot are command prompt functions. They are both "bridge" tools used to communicate from computer to the phone.
The phone menu screen you are referring to is bootloader. Fastboot is one of the choices on that (bootloader) menu. It puts the phone in fastboot mode, which is specifically intended for fastboot commands (only mode fastboot command will work). The response will always be "waiting for device" if you try fastboot commands, and not in fastboot mode.
If the command is "fastboot . . . " you are issuing fastboot commands (not adb).
If the command is "adb . . . " you are issuing adb commands.
Again, they are both related, but different. Different requirements and usages for adb versus fastboot. It is important to understand the distinction, so you don't waste more time trying command in the wrong mode (which will never work).

Is there a way to save a modified boot image from within the booted ROM which is rooted with magisk

I don't have the original boot.img. I want to unroot temporarily. But want to re-root afterward.
I was wondering if I can save a modified_boot.img somehow and flash that later once I am done. Is it possible?
devsk said:
I don't have the original boot.img. I want to unroot temporarily. But want to re-root afterward.
I was wondering if I can save a modified_boot.img somehow and flash that later once I am done. Is it possible?
Click to expand...
Click to collapse
What ROM and device are you using?
How did you root it in the first place?
What OS are you running?
Heres my 30 second version of how id do it on my Pixel 2 XL an a/b device....ymmv, depending on device
Download latest platform tools from Google for your OS, if necessary: https://developer.android.com/studio/releases/platform-tools
Next you'll need dd, if you're on Linux, you can skip ahead
For Windows....go to http://gnuwin32.sourceforge.net/packages/coreutils.htm
Download Binaries & Dependencies zips
Extract dd.exe from coreutils-5.3.0-bin.zip /bin to platform tools path
Extract all .dll's from coreutils-5.3.0-dep.zip /bin to platform tools path
Enable USB Debugging & ABD access on device
Boot device to recovery (usually TWRP)
on PC and prompt in platform tools folder:
if you have recovery (usually TWRP) installed:
adb reboot recovery
if you DONT have recovery (usually TWRP) installed, but instead fastboot it via bootloader (as i do on my Pixel 2XL):
adb reboot bootloader
fastboot boot twrp-xxx.img
swipe into twrp
back to PC prompt:
adb shell
dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/boot.img
adb pull /sdcard/boot.img magisk_boot.img
Uninstall magisk
When you need to flash magisk boot image back:
Boot to bootloader..
on PC and prompt in platform tools folder:
adb reboot bootloader
fastboot flash boot magisk_boot.img
fastboot reboot
Note: You can of course use the same first process to backup (and extract) the stock boot.img before rooting ....and the latter to reflash it if needed if rooting goes wrong
Sorry, I should update my profile. My device is OnePlus 8 Pro.
> dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/magisk_boot.img
@73sydney why would this not work from within a rooted device? Its not like some process is holding a read lock on that partition or something else is also writing to it. Its a partition persisted in the NAND, which is not being touched by anything.
The only thing is that there are 2 partitions on the NAND: boot_a and boot_b. I need to know which one is the current one.
And this tells me slot B:
cat /proc/cmdline | tr ' ' '\n' | grep --color slot
androidboot.slot_suffix=_b
For flashing back, I obviously need to be in bootloader because I won't have the root to write to the partition.

Categories

Resources