[Q] Flashed recovery to boot partition, how to fix? - Moto X Q&A

I feel like a dummy.
I ran fastboot flash boot openrcovery-twrp-2.8.0.1-ghost.img on my unlocked Moto X.
I can boot into TRWP and stock recovery, but not the bootloader or system. I haven't been able to get to anywhere that I can run fastboot to reflash the bootloader, but I'm not an expert.
How can I restore my stock bootloader? (I have the boot.img)
Update 1: I can access adb shell so I'm considering:
dd if=/sdcard/boot.img /dev/block/mmcblk0p33
I know this is the bootloader partition, but I don't want to make things even harder on myself, so I am being cautious.
Update 2: Fixed!
It worked. Triple checked the target partition. The best way to check is :
ls -al /dev/block/platform/msm_sdcc.1/by-name/
Looked at the contents of /dev/block/mmcblk0p33 and compared to twrp image file. Made sure it looked like boot.img would be good to flash straight into the partition. Then ran the dd, said a little prayer and rebooted.

Have you tried "fastboot flash boot boot.img" by using cmd?

Well, first, boot isn't the bootloader, it is the kernel. If you flashed the bootloader with recovery, you couldn't do anything. Next, if you have recovery access and adb access, why not do "adb reboot bootloader"? Or send the stock kernel to your phone in a flashable zip and flash it via recovery? My advice after you get it fixed would be to leave your phone alone, and ideally, flash it to stock. If you don't know how to fix it, and aren't sure what partition does what, that is a recipe for disaster. The partitions have been named the same thing since the Nexus S (possibly earlier), so this is something that is fairly fundamental to Android.

Related

[Q] G1: Restore from a backup without recovery mode?.

I have a G1 htc dream (european variant = rogers 32a), and I'm slowly losing out. The thing is on CM-6.0, it never had enough memory, and eventually crashed it's way into a mess, and I'm pondering the next move.
What works: All phone features, root terminal, fastboot (r2d2s on skateboards), some programs. I can read/write the sdcards independently. I even have access with the old version of adb. It boots, & reboots.
I have a nandroid backup from late last year on the sdcard, which would do very nicely thank you if I could get it installed. Is there any way to install the backup without access to recovery mode? How are those image files cobbled together?
What doesn't work:
1. Recovery Mode(?) turn-on-with-home-pressed. I can't get off the (opening) blue screen. Remove the battery to restart.
2. /etc/fstab & /etc/mtab are no longer there :-/. /proc/mounts is. I don't know what else is missing, but it implies some essential daemon is awol. Amazingly it writes to the sdcard :-//.
3. Market - It says "starting download....." but it doesn't:-(
4. Memory control. I can start with a bit free, but as uptime continues, the memory vanishes, and anything you open crashes.
I do have linux, and a root terminal on the phone. But without /etc/fstab, all those crazy android device names are not to be seen :-//. ls /dev/block shows me loop0 - loop7; mmcblk0, mmcblk0p1 - mmcblk0p3; mtdblock0 - mtdblock5; vold.
If you have fastboot and a nandroid, you can flash all images separately, i.e.
fastboot flash system <system.img>
fastboot flash userdata <data.img>
...
In the Cyanogenmod Wiki you can find probably some additional hints
With fastboot you can also flash a new recovery ...
AndDiSa said:
If you have fastboot and a nandroid, you can flash all images separately, i.e.
fastboot flash system <system.img>
fastboot flash userdata <data.img>
...
In the Cyanogenmod Wiki you can find probably some additional hints
With fastboot you can also flash a new recovery ...
Click to expand...
Click to collapse
Thanks for the reply.
Image on pc, and fastboot on pc? I'll try that.
Ok. Not out of the woods, but I've made some progress. The obstacle is: recovery isn't mounted, and I only have /proc/mounts. In /dev/block
mtdblock3 is mounted on /system
mtdblock4 is mounted on /cache
mtdblock5 is mounted on /system/xbin
There is mtdblock 0-5. Where the $£%@! is recovery supposed to be mounted? what about the other ones? anyone got an /etc/fstab from a G1??
Actually, I probably have but it's archived. I had figured this on the android by using adb and dump_image, but that's restoring a system while it's running, and there should be laws against that sort of thing.
??? ... recovery is never mounted, it's like a second "mini" os.
Additionally: for using fastboot your phone must be in fastboot mode, i.e. boot with back+power. I suggest you to first read a bit more about fastboot, g1 partitions, etc. ...
Sent from my Gingerbread on Dream using XDA App
That worked after a fashion. I had the backup: system.img, boot.img, cache.img, recovery.img, data.img, & misc.img. Of these, I could flash recovery, cache, system, & boot. The data.img & misc.img threw errors, (me)not knowing where they should be put.
It wasn't enough. I had a trail of processes bailing out and a repeated crash in acore typical of memory being clogged. But I got back recovery mode, and I could apply the latest backup normally. I'm now back to the moments after my successful install of CM-6.0 - before I started civilising it. And I don't really have the ram for it.
Good good good, thank you very much. As I don't have the ram, I'll have to add swap, which I have my sdcard set up for. It's certainly less pain than looking for a lower level rom and going to a smaller OS.
I do have one hitch: I've lost root in the xterm (and I don't know where else).
$ su
permission denied
$
:-O?
EDIT:: I'm a twit. I forgot to run the fix_permissions script. Didn't know I backed up _THAT_ promptly. Permissions were AWOL. So are a few apps, but nothing I'm worried about. Now

[HOW TO][Unlocked Bootloaders]Install Fastboots, CWM, Tips & Ticks, and More

Now that the bootloader is unlocked, everyone is asking "WTF do I do now?". Well, here's a bit of help to get you started. I'm assuming you already have adb and fastboot setup and working -- if not, quit reading and get that taken care of. Also, I only run Linux...so I'll try to be transparent and only list the fastboot commands.
I assume that you're not a complete moron and can Google what you don't understand.
Don't use the stock\SDK fastboot binary for flashing /system.
An updated fastboot binary for Lin\Win\Mac can be found here on the Batakang FTP from our local, neighborhood Mattlgroff.
Linux -- Rename the file to moto-fastboot and add it to a directory in your $PATH -- Ubuntu\Debian users can just add it to ~/bin (enabled by default)
Windows -- Rename the file to moto-fastboot and put it somewhere handy...that's on you to decide.
ROOT\ADMINISTRATOR INFO
On Linux, you might have to run as root in order to run some of the fastboot commands. If your system uses sudo for root commands, typing "sudo -i" will bring up an interactive sudo shell so you don't have to type sudo over and over again. If your system uses su for root, well, you already know the command.
On Windows, you have to enable Administrator Privileges to be able to run some of the fastboot commands.
Linux Terminal Hints
~/ means your home directory -- example -- "gedit ~/Documents/file.txt" would open file.txt in gedit easier than /home/yourusername/Documents/file.txt
You can add a * to file names and directories to not type as much -- example -- "gedit ~/Doc*/file.txt" is the same as the command above, only shortened. If two files have similar names, like Documents and Downloads, then you have to type the name up until the firs different character then add *.
Use the command "../" to go up\back one directory. The command is stackable so "../../" would go back 2 directories and so forth and so on.
Use "cd" to change directories. Is an example really needed for this...
Proper Apps to Use
For zip file editing, use 7-zip on Windows and Archive Manager (file-roller) on Linux
For editing text files on Windows use Notepad++ or any text editor that has unix line breaks -- do not use default Notepad or Wordpad -- you've been warned. Use what ever you prefer on Linux. I prefer Gedit myself.
Basic Fastboot Command Syntax
fastboot flash "partition" "image" -- flashes partition image where partition is where to write to and image is the path to the image being written.
example -- fastboot flash system /path/to/system.img
fastboot -w -- does a factory reset; to expedite things, "-w" can be added to "fastboot flash system system.img -w"
fastboot continue -- continue with the boot process
fastboot devices -- list devices fastboot recoginzes
fastboot -s "device model number" -- set the device fastboot will write commands to; use "fastboot devices" to find model number
fastboot reboot bootloader -- reboot phone into fastboot mode (or restart fastboot mode while in fastboot); same as "adb reboot bootloader"
fastboot help -- list all of this & more
Command Info
Not all the fastboot commands work for us. Specifically, the "erase" commands. If a wipe command doesn't work, skip it. I'll mark them with a ! at the end if it might fail.
Install CWM Recovery by Epinter
Read Epinter's RAZR HD CWM Thread
Download the recovery image
On stock rom, navigate to /system/etc and rename install-recovery.sh to install-recovery.sh.bak
Reboot into fastboot -- use "adb reboot bootloader" from Terminal\Command Prompt
Wipe the existing recovery -- "fastboot erase recovery" !
Flash the recovery with "fastboot flash recovery cwmrecovery6028-xt925_20130219-epinter.img"
That's it, CWM is installed.
Install Stock Fastboots JB
Download the respective fastboot zip you want to use
Extract the zip
Open a terminal to the extracted zips directory
Reboot into fastboot
Type the following commands in this order
fastboot flash boot boot.img
fastboot flash devtree device_tree.bin
fastboot erase system -w !
fastboot flash system system.img
fastboot -w
fastboot erase cache !
fastboot reboot
Install Stock Fastboots ICS
Download the respective fastboot zip you want to use
Extract the zip
Open a terminal to the extracted zips directory
Reboot into fastboot
Type the following commands in this order
fastboot flash boot boot.img
fastboot flash devtree device_tree.bin
fastboot erase system -w !
fastboot flash system system.img.ext4
fastboot erase cache !
fastboot -w
fastboot reboot
Install Alternate Radio
Reboot into fastboot
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase modemst1
fastboot erase modemst2
NON-HLOS.bin is found inside a fastboot zip.
Easy Kernel Install
Download kernel-flash.zip in the attachments[/URL]
Open the zip
Replace the zips current boot.img and device_tree.bin from the fastboot of your choice
Install the zip with CWM
By default, kernel-flash.zip comes with Mex Retail kernel and devtree
Easy CWM Install
Download recovery-flash.zip in the attachments[/URL]
Install the zip with CWM
Not sure if its SS compatible, but it is CWM compatible (for the lazy Photon Q users).
Obtain root after installing a Stock Firmware
There are two choices for obtaining root after a stock flash. the closed source SuperSu by Chainfire & and the open source Superuser by Koush.
Download SuperSu zip from Chainfire (Closed Source)
Download Superuser from Koush (Open Source)
Download the one of the root zips above.
Reboot into CWM/TWRP -- adb reboot recovery
Locate and flash the zip (see below for an alternative way)
Reboot, that's it. Nice not having to run exploits\hacks\Linux just for root
Install Rom/Zip file with ADB + CWM
CWM has the awesome ability to install zip files without having to manually copy them to the phone first. All's necessary is a PC with working adb.
Reboot into recovery
Select "install zip from sideload"
On PC, type "adb sideload /path/to/zip" and press enter
The zip will now be copied to the phone's cache & install
Once installed, do any requirements you'd normally do like wipe caches, etc
I have done this numerous times and it still will not boot into recovery. I have read and followed epinter, yours, official cwm, and other various Google found instructions (none of them functionally different) and still the same result. It recognizes the phone, writes, completes, then if I reboot and select recovery it goes to the android with the open chest cover with the exclamation point....
Any ideas how I could be screwing this up?
Sent from my MB886 using Tapatalk 2
miketravis said:
I have done this numerous times and it still will not boot into recovery. I have read and followed epinter, yours, official cwm, and other various Google found instructions (none of them functionally different) and still the same result. It recognizes the phone, writes, completes, then if I reboot and select recovery it goes to the android with the open chest cover with the exclamation point....
Any ideas how I could be screwing this up?
Sent from my MB886 using Tapatalk 2
Click to expand...
Click to collapse
Unless you're not rooted with an unlocked BL, there's really no reason why it shouldn't work?
Sent from my N4'd Atrix HD
I was rooted before unlocking... shouldn't it still be rooted?
Sent from my MB886 using Tapatalk 2
miketravis said:
I have done this numerous times and it still will not boot into recovery. I have read and followed epinter, yours, official cwm, and other various Google found instructions (none of them functionally different) and still the same result. It recognizes the phone, writes, completes, then if I reboot and select recovery it goes to the android with the open chest cover with the exclamation point....
Any ideas how I could be screwing this up?
Sent from my MB886 using Tapatalk 2
Click to expand...
Click to collapse
Did you uninstall safestrap?
Yep. Should I reinstall it and try again?
Sent from my MB886 using Tapatalk 2
---------- Post added at 01:40 PM ---------- Previous post was at 01:30 PM ----------
reinstalled safestrap and tried again, success!!
Not sure why that made a difference but I got it so thank you very much.
miketravis said:
Yep. Should I reinstall it and try again?
Sent from my MB886 using Tapatalk 2
---------- Post added at 01:40 PM ---------- Previous post was at 01:30 PM ----------
reinstalled safestrap and tried again, success!!
Not sure why that made a difference but I got it so thank you very much.
Click to expand...
Click to collapse
Still did not work for me
Did you install recovery inside safestrap? Then fastboot cwm?
Sent from my MB886 using Tapatalk 2
miketravis said:
Did you install recovery inside safestrap? Then fastboot cwm?
Sent from my MB886 using Tapatalk 2
Click to expand...
Click to collapse
Yes, I did. After fastboot, I followed the OP instructions to uninstalling the SS recovery and SS app. Boot into recovery and got the open android.
tvd0405 said:
Yes, I did. After fastboot, I followed the OP instructions to uninstalling the SS recovery and SS app. Boot into recovery and got the open android.
Click to expand...
Click to collapse
same here.
I have the same problem. I was able to flash cwm, uninstall the SS recovery, and uninstall the app. The first time I got the dead android symbol. I restored SS via Titanium Backup, reinstalled the SS recovery, and flashed cwm again. I tried rebooting into recovery and was able to get cwm working. As soon I uninstalled SS and rebooted, I got another dead android.
probably because were all on the XT926 if we were to revert back to XT925 then the recovery should work otherwise we will have to tweak the recovery to get it to work properly witht the XT926 software awesome thing is we can now free up the space that SS used for a rom slot however for noobs you might wana stick with SS once you hardbrick without anything to go back too it will be game over for your phone and then you have to con ATT for another
i got it.....
i was on ICS 404 bootloader unlcoked and rooted
how the hek you go on bootloader menu (power vol.down???????)
right now im accessing evything with boot widget from play market....
everything works i backed up my stock rom.....
can i try a jellybean rom????? and go back to ICS as many times i want???? from cwm recovery???
thanx
htchd2fix said:
i got it.....
i was on ICS 404 bootloader unlcoked and rooted
how the hek you go on bootloader menu (power vol.down???????)
right now im accessing evything with boot widget from play market....
everything works i backed up my stock rom.....
can i try a jellybean rom????? and go back to ICS as many times i want???? from cwm recovery???
thanx
Click to expand...
Click to collapse
From Phone Off, Hold Power and Both Volumes.
If the phone is on, do the above and when the screen goes black, press them all again...I've been doing that for an hour now
I installed MR via fastboot and just now got it booting. I made the mistake of using the SDK fastboot to flash /system.
skeevy420 said:
From Phone Off, Hold Power and Both Volumes.
If the phone is on, do the above and when the screen goes black, press them all again...I've been doing that for an hour now
I installed MR via fastboot and just now got it booting. I made the mistake of using the SDK fastboot to flash /system.
Click to expand...
Click to collapse
What's MR?
yes it works.....thanx
i was used to powr vol.down with atrix4g
ok..now can i install any rom and if dont like it go back to may backup????
still a little scared.....
i mean i wont loose root right?
Markyzz said:
What's MR?
Click to expand...
Click to collapse
Mexican Retail
Install instructions in OP
htchd2fix said:
yes it works.....thanx
i was used to powr vol.down with atrix4g
ok..now can i install any rom and if dont like it go back to may backup????
still a little scared.....
i mean i wont loose root right?
Click to expand...
Click to collapse
You won't lose root
And with an unlocked bootloader, all you gotta do is flash an updater zip with the su binary and app for Stock roms that don't have root
I'll link to a root zip in the op once I find one (or just make it; depends on how quick I find it in a search)
thanx again..
ahahahha...what a beautifullll day....
skeevy420 said:
Mexican Retail
Install instructions in OP
Click to expand...
Click to collapse
is there a point to flash a different firmware? is it required by any means?
I had SS and was backed up, I booted up the "stock ROM" and was successful in unlocking the BL and flashing CWM. I made a new backup of the stock ROM and restored it with success in CWM. In the video it show he has MR , but im confused as to why.
Also, I cant seem to get rid of safestrap....how in the hell do you uninstall it???

[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

[Solved] Error while flashing Katkiss from CWM v6.0.5.0

Dear friends I need help!
I've tried to flash my tablet but I've got an error message while flashing Katkiss 6.0
What I did:
downloaded Rom.(md5sum is OK)
my bootloader is ww_epad-11.4.1.17-20140711
recovery CWM v6.0.5.0
previous rom zoombi pop
/format data
wipe data factory reset
install zip from sd card. (from internal storage or micro sd card)
And I have got the following error (in attachement)
Please help, my tablet boot only recovery now.
Thanks in advance for the help
trying to boot in fastboot mode when children let me try that...
Edit: fastboot ok.
I placed the the files
KatKiss-6.0_TF701T_033.zip
open_gapps-arm-6.0-pico-20170120.zip
UPDATE-SuperSU-v2.79-20161211114519.zip
In
C:\Program Files (x86)\Minimal ADB and Fastboot
ok I don't know how to proceed now.
Seems I cannot change the recovery from CMW to TWRP,
My bootloader is 11.4.1.17 and the tutorial to install TWRP says in capital red:
MUST BE ON A BOOTLOADER 11.4.1.27, 11.4.1.29 or 11.4.1.30
So how can I do?
I there a way to upgrade the bootloader to be able to install TWRP?
Or should I Flash the custom rom from fastboot?
My TF701 in not booting anymore.... only bootloader and recovery CMW
the positive thing is :
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot devices
15C3E10090400000011FA8580 fastboot
Please help
I have been able to flash CROMI X (unfortunately with strong battery drain) so CMW is able to flash but for some reasons not Katkiss 6.0.
I have been told that my problem is not ROM related... So it is recovery related?
What is the better option to get katkiss on my tablet? Flash the recovery to get TWRP even if my bootloader is 11.4.1.17 and the tutorial to install TWRP says in capital red:
MUST BE ON A BOOTLOADER 11.4.1.27, 11.4.1.29 or 11.4.1.30????
There is a technical reason about this warning?
Edit: I found this on an old post:
You can try this:
Download the stock recovery from here: http://droidbasement.com/db-blog/?p=3210
Copy the image to your fastboot folder.
Download the Asus firmware, unzip the file once and copy it to your internal SD.
Boot tablet into fastboot
Issue this command
Code:
fastboot boot recovery.img
Note: Do not flash the recovery, just boot it.
It should recognize the firmware file on your tablet and flash it.
Click to expand...
Click to collapse
Would this method work to get the latest stock rom from Asus?
Got your PM and will try to find some time at work today. Hang in there and don't do anything to make it worse
Ok, work was crazy busy so it took a bit longer.
If you flash a recovery that is incompatible with the bootloader nothing happens. Until you use the recovery... That could permanently brick the tablet. So heed the warnings, they are there for a reason.
Ok, let's try to get you on the latest bootloader. It's no suprise at all that nothing boots if you try to flash a Android 6 rom on an Android 4 bootloader....
Download either WW or US package from here: https://forum.xda-developers.com/showpost.php?p=61045480&postcount=2
That zip contains the latest bootloader and a compatible TWRP recovery. Flash the zip in your current recovery just like any rom, then reboot.
When you flash a bootloader or recovery you actually write those files to the staging partition. On the next boot the bootloader will unpack it and write everything to it's proper place.
So it's essential that you flash, then reboot. Does not matter that the boot does not go anywhere. The first part, flashing the contents of /staging to it's partition(s), will happen anyway.
You should see a brief blue bar filling up when that happens. It does not take long.
Boot back into fastboot and check your bootloader version.
Enter recovery through RCK and that should be TWRP now.
Then format /data. Do not wipe it, format it. Do not interrupt it. Wait for it to finish even if it takes an hour (a full battery is a must before you start this). The format command is under the Wipe menu.
Unfortunately the formatting in this kanged TWRP is pretty buggy, but I still like it better than CWM.... If you get lots of error messages after the format (cannot mount this, cannot mount that) go into Wipe > Advanced > select Data > Change or repair file system > Change file system > choose ext3 and execute
Note: The button you have to swipe is pretty "sticky". Swipe it slowly and fully
Reboot to recovery
Go back into Wipe > Advanced etc and change the file system back to ext4
Reboot to recovery
Now everything should be ok, try to mount/unmount data.
Finally you are ready to flash Katkiss
If the bootloader flash does not work, we can try to flash Asus firmware in fastboot, but try the above first.
berndblb said:
Ok, work was crazy busy so it took a bit longer.
If you flash a recovery that is incompatible with the bootloader nothing happens. Until you use the recovery... That could permanently brick the tablet. So heed the warnings, they are there for a reason.
Ok, let's try to get you on the latest bootloader. It's no suprise at all that nothing boots if you try to flash a Android 6 rom on an Android 4 bootloader....
Download either WW or US package from here: https://forum.xda-developers.com/showpost.php?p=61045480&postcount=2
That zip contains the latest bootloader and a compatible TWRP recovery. Flash the zip in your current recovery just like any rom, then reboot.
When you flash a bootloader or recovery you actually write those files to the staging partition. On the next boot the bootloader will unpack it and write everything to it's proper place.
So it's essential that you flash, then reboot. Does not matter that the boot does not go anywhere. The first part, flashing the contents of /staging to it's partition(s), will happen anyway.
You should see a brief blue bar filling up when that happens. It does not take long.
Boot back into fastboot and check your bootloader version.
Enter recovery through RCK and that should be TWRP now.
Then format /data. Do not wipe it, format it. Do not interrupt it. Wait for it to finish even if it takes an hour (a full battery is a must before you start this). The format command is under the Wipe menu.
Unfortunately the formatting in this kanged TWRP is pretty buggy, but I still like it better than CWM.... If you get lots of error messages after the format (cannot mount this, cannot mount that) go into Wipe > Advanced > select Data > Change or repair file system > Change file system > choose ext3 and execute
Note: The button you have to swipe is pretty "sticky". Swipe it slowly and fully
Reboot to recovery
Go back into Wipe > Advanced etc and change the file system back to ext4
Reboot to recovery
Now everything should be ok, try to mount/unmount data.
Finally you are ready to flash Katkiss
If the bootloader flash does not work, we can try to flash Asus firmware in fastboot, but try the above first.
Click to expand...
Click to collapse
Thanks a lot to take time to help me.
Will try that tonight and I'll let you know the result.
Thanks a lot!
It was just like you said.
I had to format to ext3 and ext4 because I had errors.
Battery seems to be very good. Just the screen display is very white, needs color saturation and contrast I guess...
Thanks again you save my tablet.
Now that's what I like to read! :cyclops:

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