Installing CWM Recovery on Unlocked RAZR M via terminal emulator - Droid RAZR M Q&A, Help & Troubleshooting

I ran the boot loader unlock exploit successfully. Had troubles flashing recovery. I don't own a computer. Hence my dilemma. Is it possible to flash custom recovery with terminal emulator? I have searched other forums and sites for hours now. I've tried the flash_image command. And just about any other options that I've found. What am I doing wrong? Its it even possible on the RAZR M? Do I have to use fastboot? Any help would be appreciated.

Here are some flashable recoveries. I have not tried them out, but I heard they work.
http://batakang.com/ftp/?dir=devs/mhous33/XT907/recovery-flashable_recoveries

You need to use the dd command and the full /by-name path to the recovery partition in terminal from root shell.
If you download the latest TWRP recovery image for scorpion-mini and rename it to twrp.img for simplicity then place it on the root of the sdcard then you would use the following commands to write the file with dd in the terminal emulator.
su
dd if=/storage/sdcard1/twrp.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery bs=4096
I strongly recommend backing up the current stock recovery first because without access to a PC you may need it to restore yours in the event of a problem.
su
dd if=/dev/block/platform/msm_sdcc.1/by-name/recovery of=/storage/sdcard1/recovery_original.img bs=4096
That will save your stock recovery and you can restore it using the first command and that file as if.

Related

[Guide] How to recover your semi-brick

YES YOU NEED TO READ THIS WHOLE POST, PROB MORE THEN ONCE TO MAKE SURE YOU GOT IT. YES I KNOW HOW LONG IT IS, I TYPED IT!
the reason i call it a semi-brick is because a true brick can bot be recovered with out opening the case.
first go here and read this for info: http://forum.xda-developers.com/showthread.php?t=838484
now since your here im going to assume that its too late.
*things you will need.
copy of cwm recovery. get it here (the manual install link): http://forum.xda-developers.com/showpost.php?p=9145724&postcount=28
adb installed and working.
a known good rom, or nandroid backup. here is one: http://forum.xda-developers.com/showthread.php?t=836042 (use odex one)
a wpthis.ko for YOUR specfic kernel (run (adb shell cat /proc/version) that will tell you what kernel you have)
*first thing we need to know is, are you s-off or s-on now?
if your s-off just boot into clockwork mod recovery, wipe the phone and flash a known good rom and be done with it. if you dont have cwm recovery installed. boot into fastboot (vol down+power) you must have the sdk/adb installed and working, and type fastboot flash recovery LocationOfRecovery.img (where LocationOfRecovery.img= where you have the recovery, ie c:\android\recovery.img). once thats installed follow instructions above.
*if you are s-on:
will the phone boot into android? if so your not bad off.
if you want to unroot to return the phone, follow the unroot thread here: http://forum.xda-developers.com/showthread.php?t=835971
if you dont want to unroot then you have a couple of different options. if you have cwm recovery still installed, just follow instructions above and flash a known good rom. ive been told that boot.img (kernel) wont flash if you are s-on. the way to fix this (temporarily) is boot into recovery, but before you flash run these commands:
(put wpthis.ko in sdk folder)
adb remount
adb push wpthis.ko /data/local/wpthis.ko (specific for your kernel)
adb shell
# insmod /data/local/wpthis.ko (should get same function not implemented error as when u rooted first time)
then proceed to flash the rom. once booted into android skip down to, "now to get back to s-off"
*if you have stock or eng-recovery installed.
will the phone attempt to boot android at all? where is it stuck at?
a good min after it starts to try to boot, type these commands:
adb remount
adb shell
if you can get in shell then theres still hope. back out shell for a second and start here:
put the cwm recovery.img and wpthis.ko in your sdk folder
adb remount
adb push wpthis.ko /data/local/wpthis.ko (specific for your kernel)
adb push recovery.img /data/local/recovery.img
adb shell
# insmod /data/local/wpthis.ko (should get same function not implemented error as when u rooted first time)
# dd if=/data/local/recovery.img of=/dev/block/mmcblk0p21 (now wait a min or 2 to give it time to finish)
#sync (give it another min or to just to be safe)
#reboot recovery
at this point you should be in cwm recovery. follow instructions above for flashing with s-on.
*if you cannot get into shell while booting, but have eng-recovery installed, there might be some options.(however this is all theory)
boot into recovery-
if you are on linux using adb, you can try taking sh from /system/bin folder of any custom rom, chmod 0755 it, then push it to /system/bin and adb shell might work.
windows-
boot into recovery.
a system.img compatible with your installed kernel pushed may work. put the system.img into the sdk folder.
adb push system.img /data/block/mmcblk0p25
then reboot and see where you are. if that dont work, grab the modified miscnew.img here: http://www.4shared.com/file/pUPfrGi-/mmcblk0p17.html
rename it misc.img put it in sdk folder and
adb push misc.img /dev/block/mmcblk0p17
then reboot into bootloader with PC10IMG.zip on root of sdcard and it should run though. if it does your fully stock and get to start all over again.
*if you cannot get into shell, and you have stock recovery, im sorry your pretty screwed. as of right now the only thing thats gonna bring it back is a full img/update signed from htc thats equal to or higher then the version currently on the phone. (well and jtag of course)
*well now you've done one of the steps above. your booted into android, you have perm root, and cwm recovery installed, just still s-on. dont worry your almost there!
first take that wpthis.ko for you kernel and push it, and the eng hboot.
adb push wpthis.ko /data/local/
adb push hboot-eng.img /data/local
then from adb shell, or terminal root prompt:
# insmod /data/local/wpthis.ko (again you should get the function not implemented error)
NOW REMEMBER THIS NEXT STEP COULD MEAN DEATH FOR YOU G2 IF TYPED WRONG, AND AFTER ALL THIS HARD WORK!
# dd if=/data/local/hboot-eng.img of=/dev/block/mmcblk0p18
wait a few mins to be sure its done.
# sync
wait a few more just cause.
reboot, you should now be s-off, cwm recovery installed, and free to do whatever you want. just dont go screwing it up again
* as new methods are discovered, or ones here are proven wrong, i will update as necessary. as of the writing post, 2 devices that i know of have been saved!
good luck!
wpthis.ko for bacon bits.03 kernel: http://www.4shared.com/file/OAcd1bix/wpthis-263221-cyanogenmod.html

[Q] can't change CWM from 5.8.3.4

I'm stuck with only the ability to go into recovery while the rom doesn't boot and backups are stored on the uSD.
It's the Clockworkmod Recovery 5.8.3.4, and it looks like it doens't read from my uSD. I am able to connect via adb and push an other recovery.zip, that does work with the uSD, but it looks like the flashing goes ok, but when i reboot, i just end up in clockworkmod recovery 5.8.3.4 again.
adb push works to push multiple recovery.zip, but when i try with some rom.zip, i get, maybe because of the filesize, a 'protocol failure'.
I tried easyflasher 0.8.3, but it also doesn't have any effect.
Is there anyone who can help me guiding what else i can try or what the problem could be?
Try these steps
1: use adb to push a new recovery file (which you already did)
2: flash the zip
3: use the adb shell to execute the following command
Code:
echo boot | dd of=/dev/block/mmcblk0p3 bs=1 seek=0

[Q] stock recovery lg g2 d802

excuse me for my bad english......
hi everybody,
i have rooted g2 with twrp recovery but i don't have back up of stock recovery.
i want to install the new ota upgrade but i read of many problem with custom recovery.
can u help me to give me a guide to restore the stock recovery and where can i find it?
tnx
please help meeeeeeeeee
ulakala said:
excuse me for my bad english......
hi everybody,
i have rooted g2 with twrp recovery but i don't have back up of stock recovery.
i want to install the new ota upgrade but i read of many problem with custom recovery.
can u help me to give me a guide to restore the stock recovery and where can i find it?
tnx
Click to expand...
Click to collapse
If your phone is rooted don't even think to update ota.
If it is not rooted then what is your variant? D80210a, 10b, 10c, 10e?
depending on your variant take a look here: http://downloads.codefi.re/autoprime/LG/LG_G2/D802/Stock_Firmware
Partager.info said:
If your phone is rooted don't even think to update ota.
If it is not rooted then what is your variant? D80210a, 10b, 10c, 10e?
depending on your variant take a look here: http://downloads.codefi.re/autoprime/LG/LG_G2/D802/Stock_Firmware
Click to expand...
Click to collapse
i've root and twrp.......
ulakala said:
i've root and twrp.......
Click to expand...
Click to collapse
rooted = no ota
You will brick your phone.
http://forum.xda-developers.com/showthread.php?t=2432476
Follow this to a T I did this morning and it worked like a charm. Removes root. Make sure you factory reset after because with me having a recovery installed it was bootlooped on the Verizon screen.
Factory reset removes the recovery and makes it out of the box new.
Once you've done that, accept the ota and enjoy!
Keep in mind I am not sure if there is a safe way to root/install a recovery on the new ota
Sent from my VS980 4G using xda app-developers app
Hi,
I'am new on LG G2, after 2 years with HTC EVO 3D (awesome)
my phone is LG-G2 D80210c-HKG
this morning i restored the stock Recovery, and i procedeed as follows:
Got the recovery from http://downloads.codefi.re/autoprime/LG/LG_G2/D802/Stock_Firmware/10b_16G_partitions/recovery.img
1) Backup current recovery
from computer command line:
#push the recovery to the phone
adb push recovery.img /sdcard/stock-recovery.img
# Connect to the phone shell
adb shell
#getting root
su -
cd /sdcard/
# /dev/block/platform/msm_sdcc.1/by-name/recovery is a link to /dev/block/mmcblk0p15 on my phone
dd if=/dev/block/platform/msm_sdcc.1/by-name/recovery of=recovery-twrp-mmcblk0p15.img
2) Wrote recovery
dd if=/sdcard/stock-recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
3) testing
from computer command line:
adb reboot recovery
To reboot, press power button 10s
4) Restoring twrp recovery
from computer command line:
# Connect to the phone shell
adb shell
#getting root
su -
cd /sdcard/
dd if=recovery-twrp-mmcblk0p15.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
I don't know if i'll can write OTA firmware in the future, but i think so ...
Sincerely,
fxjumper said:
Hi,
I'am new on LG G2, after 2 years with HTC EVO 3D (awesome)
my phone is LG-G2 D80210c-HKG
this morning i restored the stock Recovery, and i procedeed as follows:
Got the recovery from http://downloads.codefi.re/autoprime/LG/LG_G2/D802/Stock_Firmware/10b_16G_partitions/recovery.img
1) Backup current recovery
from computer command line:
#push the recovery to the phone
adb push recovery.img /sdcard/stock-recovery.img
# Connect to the phone shell
adb shell
#getting root
su -
cd /sdcard/
# /dev/block/platform/msm_sdcc.1/by-name/recovery is a link to /dev/block/mmcblk0p15 on my phone
dd if=/dev/block/platform/msm_sdcc.1/by-name/recovery of=recovery-twrp-mmcblk0p15.img
2) Wrote recovery
dd if=/sdcard/stock-recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
3) testing
from computer command line:
adb reboot recovery
To reboot, press power button 10s
4) Restoring twrp recovery
from computer command line:
# Connect to the phone shell
adb shell
#getting root
su -
cd /sdcard/
dd if=recovery-twrp-mmcblk0p15.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
I don't know if i'll can write OTA firmware in the future, but i think so ...
Sincerely,
Click to expand...
Click to collapse
Hi Everyone
Can I flash this http://downloads.codefi.re/autoprime/LG/LG_G2/D802/Stock_Firmware/10b_16G_partitions/recovery.img stock recovery on my d80210e ?
And if it possible... does this method of flashing full wipe the device? (and internal memory) ?

[Fix] Stuck at TWRPviaBump after installing 10L/any OTA?

all credits go to thecubed.
i feel sorry for the guy @ q&a section, that had the same experience . had to go through wipe.
will have to remember to update via lg pc suite now to retain apps etc. then just redo bump if ever. thanks autoprime,thecubed and the rest of the amazing devs.
http://forum.xda-developers.com/showthread.php?t=2451696
thecubed said:
Howdy all!
Did you install TWRP and then take the OTA, now you can't get your phone to boot normally, but you do see TWRP?
Here's the easy fix:
If you have ADB access, plug in your phone and run this:
Code:
adb shell
dd if=/dev/block/platform/msm_sdcc.1/by-name/fota of=/sdcard/fota-backup.img
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/fota
Then you should be able to successfully reboot your phone via the TWRP menu option, or via a simple reboot command in adb.
If you DONT have ADB access (because of an early build of TWRP), you can simply use TWRP's awesome "terminal command" option to run the following:
Code:
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/fota
You'll have to type that whole thing out, and be VERY careful with spaces and punctuation. One wrong letter and you could nuke your phone.
After that finishes, you can reboot and continue on your happy way!
Let me know if this helps anyone!
As usual, I'm on #lg-g2 in Freenode as IOMonster, if I'm around I'll be happy to help wherever I can.
Click to expand...
Click to collapse
http://forum.xda-developers.com/lg-g3/development/fix-stuck-custom-recovery-trying-ota-t2907508
if that doesn't work, try autoprime's with added step for misc.
after that you can delete the files located at (using es file explorer) device>cache>fota
autoprime said:
LG G3 Stuck in Recovery Fix
Background
This thread is to help those who get stuck in custom recovery every time they try to boot into the rom.. usually after trying to take an OTA. Now that we're all rooted and unlocked this might be needed soon. Inspired by IOMonster's [FIX] Installed TWRP and now you're stuck after OTA? thread for the LG G2. Sometimes wiping FOTA was not enough and wiping the misc partition was also needed. But wiping the entire partition isn't the best idea. I've made a flashable zip to automate this process to properly fix being stuck in TWRP/CWM due to "stuck fota" or "stuck misc"​Fix
Flash LG_G3_Flash2FixStuckRecovery.zip to backup the current stuck fota/misc partitions and then fix them to allow proper booting.
Flashing LG_G3_Flash2FixStuckRecovery.zip creates a backup of your FOTA and Misc partitions in the /sdcard/FOTAnMisc_Backup/ folder.
1. Download the LG_G3_Flash2FixStuckRecovery.zip and place it on your phone. You can use TWRP's MTP feature to copy it from computer to phone, use OTG w/connected storage containing zip or use adb push to get the file onto your phone...
Code:
adb push LG_G3_Flash2FixStuckRecovery.zip /sdcard/
DOWNLOAD FROM CODEFIRE HERE
2. Flash LG_G3_Flash2FixStuckRecovery.zip in recovery or use adb commands below to fix boot issues..
Code:
adb shell
su
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/fota
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/misc bs=256 count=1 conv=notrunc
reboot
If you are still booting into TWRP/CWM then you may have accidentally flashed the custom recovery img to the boot partition slot instead of the recovery partition slot. Reflash the rom in TWRP/CWM which should fix the boot.img... or download the required boot.img, place on root of internal storage ( /sdcard/ ) and flash the boot.img in TWRP/CWM...
Code:
dd if=/sdcard/boot.img of=/dev/block/platform/msm_sdcc.1/by-name/boot
reboot
Click to expand...
Click to collapse

Root OnePlus 2 with TWRP or OTA stock ?

Hi,
I've got a new OnePlus 2 phone.
Do i really have to flash TWRP in order to root my phone using SU tool ? or i can stay with the OnePlus 2 original stock ?
What are the advantages of TWRP?
Best,
Jonathan
rose10 said:
Hi,
I've got a new OnePlus 2 phone.
Do i really have to flash TWRP in order to root my phone using SU tool ? or i can stay with the OnePlus 2 original stock ?
What are the advantages of TWRP?
Best,
Jonathan
Click to expand...
Click to collapse
You can either FLASH TWRP recovery or BOOT into it: the difference is that when you boot into TWRP, it's temporary, which means when you've done your stuff and you reboot into the system, stock recovery will be present. To do so, boot into bootloader:
Code:
adb reboot-bootloader
and instead of:
Code:
fastboot flash recovery recovery.img
which FLASH the recovery, do:
Code:
fastboot boot recovery.img
which lets BOOT into TWRP.
Then you'll be able to flash SuperSu.V.Xx.zip beforehand pushed into your device.
Benefit of TWRP?
Full backup / restore, change file format, flash zip files, etc, etc.
For the OTA, you can still flash them, but you'll have to flash the stock ROM then the incremental zip if you FLASH TWRP or the full OTA update zip file from here.
Hi again,
After rooting my device....i can't copy a sound file to my /system/media/audio/ui..... How can i change the library permission ?
rose10 said:
Hi again,
After rooting my device....i can't copy a sound file to my /system/media/audio/ui..... How can i change the library permission ?
Click to expand...
Click to collapse
Which method? ADB shell? With an app?
If you use ADB shell / Terminal Emulator, you need to mount it into Read-Write mode.
To do so:
(
If you use ADB
Code:
adb shell
)
Code:
su
Code:
mount -o remount,rw /system
Then you can move your file.
Or if you use an app (ES File Explorer for example), you need to enable Root Mode: swipe from left, scroll down and activate "Root Explorer" case.
A thanks is always appreciated.

Categories

Resources