Terminal Emulator Commands - RAZR HD General

Anyone by chance know the commands to push/flash a recovery (specifically CWM) via Terminal Emulator on the MAXX HD? Device is telling me it it full, however, I have no recovery whatsoever on the device as one of those tools apparently either botched the install, or just erased what was there. Thanks in advance!

Ok, I found my thread I made for TE on the GS3 last year, but I am not sure that sdcard/ or mmcblk0p18 are correct for storage location and recovery location on Razr/Maxx HD. Any insight?
$ su
# dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p18
# reboot recovery
Click to expand...
Click to collapse

Ok, for these commands to work, we are assuming you have renamed the recovery image to cwmrecovery.img
And that you have placed it on the internal sdcard.
You must also ensure that you have removed or renamed to .Bak the following two files, if your device still has them. Use root explorer or es file explorer to get rid of Em.
/system/recovery-from-boot.p
And
/system/etc/install-recovery.sh
Both must be gone or add the .bak extension to them. Then in terminal emulator:
$ su
# dd if=/sdcard/cwmrecovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery

tucstwo said:
Ok, for these commands to work, we are assuming you have renamed the recovery image to cwmrecovery.img
And that you have placed it on the internal sdcard.
You must also ensure that you have removed or renamed to .Bak the following two files, if your device still has them. Use root explorer or es file explorer to get rid of Em.
/system/recovery-from-boot.p
And
/system/etc/install-recovery.sh
Both must be gone or add the .bak extension to them. Then in terminal emulator:
$ su
# dd if=/sdcard/cwmrecovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
Click to expand...
Click to collapse
Are these the EXACT commands, or are there different values for "platform" and "by-name"? I've never tried this on an emulator before.
Sent from my ROOTed, Boot loader unlocked RAZR MAXX HD

bigdanmeys13 said:
Are these the EXACT commands, or are there different values for "platform" and "by-name"? I've never tried this on an emulator before.
Sent from my ROOTed, Boot loader unlocked RAZR MAXX HD
Click to expand...
Click to collapse
These are the exact commands for Razr HD and Razr m only.
Sent from my Nexus 7 using Tapatalk HD

tucstwo said:
These are the exact commands for Razr HD and Razr m only.
Sent from my Nexus 7 using Tapatalk HD
Click to expand...
Click to collapse
These also work for RAZR Maxx HD! Installed TWRP thanks to you! You rock,
Sent from my ROOTed, Boot loader unlocked RAZR MAXX HD

bigdanmeys13 said:
These also work for RAZR Maxx HD! Installed TWRP thanks to you! You rock,
Sent from my ROOTed, Boot loader unlocked RAZR MAXX HD
Click to expand...
Click to collapse
Well yeah.. Same phone, different battery.
Actually, I can be even more specific: These will work with any Snapdragon MSM8960 powered Motorola device. So Droid Razr HD/HD Maxx, GSM Razr HD XT925, CDMA/GSM Razr M and even the April HD. They're all the same innards.
Sent from my Nexus 7 using Tapatalk HD
---------- Post added at 07:12 PM ---------- Previous post was at 07:10 PM ----------
This may be a silly question now but, why don't you guys just flash these recoveries with fastboot?
Sent from my Nexus 7 using Tapatalk HD

Related

[Problem] Can't use su in ADB.

I've got a problem with my Wildfire.
I've rooted it with unrevolked 3, and in Android itself I've got root access for applications, but if I access the phone using ADB and type in su I only get permission denied.
Why does that happen?
Shouldn't a fully rooted phone provide access as su over ADB too?
And why can't I use Titanium to delete the HTC shipped apps, doesn't unrevolked unlock the NAND?
Thanks in advice
ChrBeck
What UID you have on adb shell ?
Use
Code:
adb shell
then
Code:
whoami
the wildfire atm only has full root via recovery, not full root access to the whole phone, soon it will get full root acess when alpharev releases their working patch for the wildfire.
Ok guys thanks for your answers.
I just found out the recovery thing yesterday evening too.
In ClockworkMod I mounted /system.
Then I was able to delete files.
After that I installed Wildpuzzle and now I have full root in the normal system too.
Anyways thanks for your help.
I rooted my wildfire with unrevoked and it worked good. In the shell: whoami
Root
Make sure the terminal is accepted by superuser
Sent from my Milestone using XDA App
And if you use adb from linux you need to setup android.rules add the vendorId, kill adb server, restart then type. /adb devices
Sent from my Milestone using XDA App
OK, I used adb under Linux and of course haven't added the Vendor ID.
So maybe that was my problem, but WildPuzzle is better anyways and doesn't cause these problems.
Has nothing to do with that. If Linux has no defined rules it will not be able to see your device.
http://menodev.com/mobile/debugging-your-android-device-on-linux/
Sent from my Milestone using XDA App
OK, then that wasn't my problem because I was able to see the device and access it, only su in adb wasn't working, but the simple things like cd and ls have been fine.
As far as i recall you need a rooted phone to su in the adb shell
Sent from my Milestone using XDA App

Iced Glacier boot animation

Forgive me if this has been answered before.. Anyone know how to push a boot animation through terminal on Iced Glacier rom? I can get it done through adb, but was curious as to how I can do it without a pc...
Sent from my HTC Glacier using XDA App
as long as you have the bootanimation.zip in the floor of the sd card, you can do this in the terminal.
su
cp /sdcard/bootanimation.zip /data/local/
reboot
You can also just replace the file with root explorer under system/customize/resource
Neither method would work... I do have the boot animation saved in my sd card's root, and even in adb I have to push it to /system/customize/resource... And if it makes any difference, the original boot animation is named TMUS_bootanimation.zip and also I am using ghost commander as a root explorer...
Sent from my HTC Glacier using XDA App
Sorry, yeah, you need to rename the file to TMUS_bootanimation.zip to replace the current
ronin178 said:
Sorry, yeah, you need to rename the file to TMUS_bootanimation.zip to replace the current
Click to expand...
Click to collapse
I did that... Did not work... Also tried replacing the lines in the other guys post with the right location/ name... The result of both is a second file in my resource folder and it gives it (2) after the filename... No big deal, I will continue using adb...
Sent from my HTC Glacier using XDA App
iamiced said:
as long as you have the bootanimation.zip in the floor of the sd card, you can do this in the terminal.
su
cp /sdcard/bootanimation.zip /data/local/
reboot
Click to expand...
Click to collapse
that worked..after giving it super user privilege. My keyboard dropped out of sight.. i exited , than re-entered Terminal emulator repeating the steps one by one and it worked! Thank you! ive been up and down the forum even using ROM manger but stuck with there boot animations instead of the ones i wanted.
*Thanks Given!
I had this problem before, but I was using ES File Explorer. What I ended up doing was backing up the old bootanimation.zip file and then deleting it with the RM command under SU. After I did that I could copy the new animation in just fine.

[HOW TO] Flashing ClockworkMod via ADB

So was helping someone flash ClockworkMod via ADB in another thread, just thought if I made a topic for it, everyone can see it so if people have any issues they can always use this method instead.
Anyway, here are the instructions:
The 'flash_image' is within the attached zip file! Use the file within the zip file, NOT the zip file itself
The 'recovery.img' is your chosen recovery file, get this off ClockworkMods website or if you have a copy use that. Then when flashing the recovery image where ever it says 'recovery.img' replace that with the name of the recovery file.
Put the recovery image and the flash_image on the root of your C drive.
So,
(make sure you're in the command prompt and have changed directory to where the adb file is)
adb push c:\flash_image /sdcard/
adb push c:\recovery.img /sdcard/
adb shell
su
mount -o remount, rw /system
cp /sdcard/flash_image /system/bin
cd /system/bin
chmod 777 flash_image
flash_image recovery /sdcard/recovery.img
It has now been flashed successfully
Hope this is of use to some people
Thanks! Very helpful.
varsaljr said:
Thanks! Very helpful.
Click to expand...
Click to collapse
As repeated in many places, press the thanks button instead of posting thanks
Hello, when i enter abd shell, then su.
I get acces denied..
what to do? :O
MrKiller2010 said:
Hello, when i enter abd shell, then su.
I get acces denied..
what to do? :O
Click to expand...
Click to collapse
u rooted and have superuser on your phone??
No i dont some one told me to do this cause my screen freezes when im trying to root it. Chek the How to root your blade.
Sent from my ZTE-BLADE using xda premium
You must be rooted for this, root using z4root or something
Sent from my ZTE-BLADE using Tapatalk 2
MrKiller2010 said:
No i dont some one told me to do this cause my screen freezes when im trying to root it. Chek the How to root your blade.
Sent from my ZTE-BLADE using xda premium
Click to expand...
Click to collapse
Dude i didn't know u weren't rooted yet. U don't need to use adb to root. Just Google z4root modaco and click on the first link. Install z4root and permanent root it. Don't forget to install rom manager and flash cwm from within it
Oh, well z4root doesn't work for me cause i got 2.3.5 i heard that the only way to root my blade is this: http://forum.xda-developers.com/showthread.php?t=1319257
and that doesn't work, it freezes when i enter the command "adb reboot bootloader" it reboots and stay on the ZTE logo and freezes. :S
MrKiller2010 said:
Oh, well z4root doesn't work for me cause i got 2.3.5 i heard that the only way to root my blade is this: http://forum.xda-developers.com/showthread.php?t=1319257
and that doesn't work, it freezes when i enter the command "adb reboot bootloader" it reboots and stay on the ZTE logo and freezes. :S
Click to expand...
Click to collapse
That's what it is supposed to do. That's it in fastboot mode. You need to go on to the next step at that point.
Well when i enter next command nothing happends.
Sent from my ZTE-BLADE using xda premium
matt4321 said:
You must be rooted for this, root using z4root or something
Sent from my ZTE-BLADE using Tapatalk 2
Click to expand...
Click to collapse
So what's the point in doing it?
Just install rom manager & use that instead.
---------- Post added at 04:17 PM ---------- Previous post was at 04:16 PM ----------
MrKiller2010 said:
Well when i enter next command nothing happends.
Sent from my ZTE-BLADE using xda premium
Click to expand...
Click to collapse
You need to install drivers for fastboot if you use Windows. Sometimes you might need to unplug the usb, then plug it back in again & try fastboot again.
It should at least give an error.
wbaw said:
So what's the point in doing it?
Just install rom manager & use that instead.
Click to expand...
Click to collapse
What's the point in using fastboot to flash clockworkmod, it's just another way of doing it, some may prefer other ways (yeah via rom manager is a lot easier i know) but spread the knowledge, may be of use to some people.
matt4321 said:
What's the point in using fastboot to flash clockworkmod, it's just another way of doing it, some may prefer other ways (yeah via rom manager is a lot easier i know) but spread the knowledge, may be of use to some people.
Click to expand...
Click to collapse
You don't need your phone to be rooted to use fastboot, it's a method for new stock roms that have all the common root exploits fixed.
So, what's the point in this method when using Rom Manager is much easier? If you've already rooted your phone then this has to be one of the hardest possible ways to install clockworkmod.
wbaw said:
You don't need your phone to be rooted to use fastboot, it's a method for new stock roms that have all the common root exploits fixed.
So, what's the point in this method when using Rom Manager is much easier? If you've already rooted your phone then this has to be one of the hardest possible ways to install clockworkmod.
Click to expand...
Click to collapse
I was never able to get fastboot working for my blade, always had driver issues, yet adb was fine. So I was able to use this method to flash and try the clockworkmod recovery touch that was released for us (turned out to be useless haha) but that couldn't be done via rom manager (well yeah, but you had to pay and i'm a poor student) so that's an example of when it could be useful.
point aside this is just another way, I just want people to learn as i am here to learn too.
Permission Denied
I need to flash CWM recovery using this adb method since I dont have data on the phone(Videocon Zeus V7500.. a clone of Commtiva Z51).
I have all the files in the right places but when I put the first command I get the following error :
I:\>adb push c:\flash_image /sdcard/
failed to copy 'c:\flash_image' to '/sdcard//flash_image': Permission denied ,
What permissions do I have to grant?
Try adb push c:/flash_image /sdcard/flash_image
Sent from my RACERII using xda app-developers app
Nevermind I figured it out, the problem was that I had mounted sd card to PC and I guess that was causing the problems.
I got it to work and have flashed CWM recovery now
Code:
I:\>adb push c:\flash_image /sdcard/
751 KB/s (26172 bytes in 0.034s)
I:\>adb push c:\recovery-clockwork-2.5.1.3-z71.img /sdcard
2444 KB/s (3831808 bytes in 1.531s)
I:\>adb shell
$ su
su
# su
su
# mount -o remount, rw /system
mount -o remount, rw /system
# cp /sdcard/flash_image /system/bin
cp /sdcard/flash_image /system/bin
# cd /system/bin
cd /system/bin
# chmod 777 flash_image
chmod 777 flash_image
# flash_image recovery /sdcard/recovery-clockwork-2.5.1.3-z71.img
flash_image recovery /sdcard/recovery-clockwork-2.5.1.3-z71.img
Thanks you very much for this thread
how to??
matt4321 said:
So was helping someone flash ClockworkMod via ADB in another thread, just thought if I made a topic for it, everyone can see it so if people have any issues they can always use this method instead.
Anyway, here are the instructions:
The 'flash_image' is within the attached zip file! Use the file within the zip file, NOT the zip file itself
The 'recovery.img' is your chosen recovery file, get this off ClockworkMods website or if you have a copy use that. Then when flashing the recovery image where ever it says 'recovery.img' replace that with the name of the recovery file.
Put the recovery image and the flash_image on the root of your C drive.
So,
(make sure you're in the command prompt and have changed directory to where the adb file is)
adb push c:\flash_image /sdcard/
adb push c:\recovery.img /sdcard/
adb shell
su
mount -o remount, rw /system
cp /sdcard/flash_image /system/bin
cd /system/bin
chmod 777 flash_image
flash_image recovery /sdcard/recovery.img
It has now been flashed successfully
Hope this is of use to some people
Click to expand...
Click to collapse
friend plss suggest me that how to use this flash_image and where should i put it
in mobile system or in pc drive c
plsss tell me clearly because when i use it in cmd it says su not found whts the mean of this plss tell me clearly one by one step
i am not able to understnd
pls pls pls help me
---------- Post added at 04:09 PM ---------- Previous post was at 03:55 PM ----------
mandloihitesh said:
friend plss suggest me that how to use this flash_image and where should i put it
in mobile system or in pc drive c
plsss tell me clearly because when i use it in cmd it says su not found whts the mean of this plss tell me clearly one by one step
i am not able to understnd
pls pls pls help me
Click to expand...
Click to collapse
heyy plss i m confused in command
i dont know what commnds should i usee
plss help me
plss
---------- Post added at 04:13 PM ---------- Previous post was at 04:09 PM ----------
saaransh9 said:
u rooted and have superuser on your phone??
Click to expand...
Click to collapse
ya i rooted my phone and superuser is also installed on my phone then wht to do
????
clockworkmod is not working in recovery manager also
said unrecognized
thanks for this. Got me out of a jam

Making A Guess As To Why Root works or not..

So, in my journey of rooting, upgrading, attempting to root again, failing, unlocking, flashing, etc, I'm wondering if my observation directly relates with why root works for some people after the upgrade, but others who seemingly do the same thing have a "half" root, meaning, apps no longer have root access, but you can still get it via ADB with a "adb shell and then su - root"
My quick and dirty story is:
I was on ICS .30 all lock and stock, and rooted, using debugfs method...
I took the update to JB
Everything seemed OK until I did a data wipe to resolve a looping problem
After that, I had "half root" and couldn't get it back to where apps had access to it, despite the fact I backed up with OTA rootkeeper...
Here is my guess - my superuser install was NOT in the /system/app directory. I installed straight from the market, and it worked just fine on ICS, but when JB came out, and permissions, particularly to /data were redone, it broke me.
However, others used different methods for getting superuser into their device. I'm wondering if those that had no trouble at all had superuser installed in /system/app, and survived the OTA, while people like me did not.
I did try to simply move the suerpuser.apk to /system/app after making the mount read-write, but it gave some kind of "cross link" error and refused. Anyway, perhaps someone will read this prior to update and take precautions, and perhaps survive the OTA.
i'm guessing that you didnt have 'OTA Survival' checked in the superuser settings.
rickykemp said:
i'm guessing that you didnt have 'OTA Survival' checked in the superuser settings.
Click to expand...
Click to collapse
Can't remember but certainly possible.
Sent from my ASUS Transformer Pad TF300T using xda app-developers app
funnel71 said:
Can't remember but certainly possible.
Sent from my ASUS Transformer Pad TF300T using xda app-developers app
Click to expand...
Click to collapse
do you have a binary in /usr/we-need-root i had to run that binary via adb to get UID0 and than re mount /system/ partition as RW vs RO and copy the same binary there to /usr/sbin/su
I am still on ICS. I rooted with debugfs. Root check came back successful last night. now I have a half root today.
---------- Post added at 03:15 PM ---------- Previous post was at 03:09 PM ----------
And I have a 300TL so I cant switch out my ROM version because I dont want to loose the LTE driver. I just need to root to get Ubuntu running on it.
I had similar problem. had root for every app until i removed the app. installed apps kept root but could not install any new apps with root. had to manually update the su binary. fortunately i still had root with es file explorer and could copy it into system/bin.
i was locked and stock rooted.
Sent from my ASUS Transformer Pad TF300T
if I re-run debugfs, it goes all the way through. and gets root remotely.[frustrated]
And to top it off, since I have a 300TL, the firmware is an oddball build. 9.44.45.3
---------- Post added at 04:20 PM ---------- Previous post was at 04:03 PM ----------
root OTS keeper says that the device is rooted, but that the app can't gain root access. No other root checker app even gets that far. WTF?
Reilly1812 said:
I had similar problem. had root for every app until i removed the app. installed apps kept root but could not install any new apps with root. had to manually update the su binary. fortunately i still had root with es file explorer and could copy it into system/bin.
i was locked and stock rooted.
Sent from my ASUS Transformer Pad TF300T
Click to expand...
Click to collapse
i'm in the same situation as you, can you help me and and let me know which files need to get copied and from where to where? the help is appreciated.
my searches turned up this thread -> http://forum.xda-developers.com/showthread.php?p=34197309
follow the first post. perform the download of the su binary. extract it. it creates folders and stuff you don't need. just copy the su file and paste it on top the the existng su in system/bin. make sure the permissions are as the post indicated.
root notifications and prompts for root access should start working again.
this process works if you have at least one app that will give you root. I always have system mounted r/w in es file explorer so that's not an issue.
good luck!
Sent from my ASUS Transformer Pad TF300T
If you have an existing such in system, you should be able to access root via adb. Simply type such at a prompt and you'll get a # prompt, meaning root.
Sent from my ASUS Transformer Pad TF300T using xda app-developers app
if you can log as root in adb shell why dont just push su executable and chmod +x it manually from it?
Su binary need suid excate bit, means chmod 04755 /system/bin/su
Sent from my GALAXY Cooper
NixZero said:
if you can log as root in adb shell why dont just push su executable and chmod +x it manually from it?
Click to expand...
Click to collapse
If my memory is correct, when I tried to copy files into system I received some type of link error and it didn't copy. Can't hurt to try.
Sent from my ASUS Transformer Pad TF300T using xda app-developers app
Reilly1812 said:
my searches turned up this thread -> http://forum.xda-developers.com/showthread.php?p=34197309
follow the first post. perform the download of the su binary. extract it. it creates folders and stuff you don't need. just copy the su file and paste it on top the the existng su in system/bin. make sure the permissions are as the post indicated.
root notifications and prompts for root access should start working again.
this process works if you have at least one app that will give you root. I always have system mounted r/w in es file explorer so that's not an issue.
good luck!
Sent from my ASUS Transformer Pad TF300T
Click to expand...
Click to collapse
This hasnt really helped me... i even rebooted after, still no dice. Notifications work now but is always a denied notification unless it's those apps that had it before.
Edit - and now root explorer won't mount system as R/W
Sent from my ASUS Transformer Pad TF300T using XDA Premium HD app

Help: Is there an Windows app that can backup the Streak ROM as an image file?

Hi,
Is there an app that you can run from a Windows XP laptop that can backup a Dell Streak ROM Image as a single file to a hard drive?
My apologies if this has been asked before, but I seem to only find backup apps that run on the device itself.
Thanks.
PS: Assuming if this is not possible, what is the best way to backup to a laptop hard drive?
me4tux said:
Hi,
Is there an app that you can run from a Windows XP laptop that can backup a Dell Streak ROM Image as a single file to a hard drive?
My apologies if this has been asked before, but I seem to only find backup apps that run on the device itself.
Thanks.
PS: Assuming if this is not possible, what is the best way to backup to a laptop hard drive?
Click to expand...
Click to collapse
You have to flash either StreakMod or ClockworkMod recovery and from there you do a nandroid backup and then copy that to your PC
Sent from my cm_tenderloin using Tapatalk HD
cdzo72 said:
You have to flash either StreakMod or ClockworkMod recovery and from there you do a nandroid backup and then copy that to your PC
Sent from my cm_tenderloin using Tapatalk HD
Click to expand...
Click to collapse
Thanks for you reply. That's the step I wanted to avoid by installing a custom recovery.
So I suppose there is no other easier way if I just have a stock Streak with the stock Dell recovery?
me4tux said:
Thanks for you reply. That's the step I wanted to avoid by installing a custom recovery.
So I suppose there is no other easier way if I just have a stock Streak with the stock Dell recovery?
Click to expand...
Click to collapse
Nothing at all. There are non root apps that will allow you to backup your user apps and their settings but anything related to the system will have to be manually reconfigured because your not rooted more than likely either. And those don't work well either.
Sent from my cm_tenderloin using Tapatalk 2
He could do a system dump using ADB, but to do so he would...
...have to be rooted.
...have busybox installed.
...have to determine where the system partitions are (e.g. /dev/mnt/nanda for /system).
From there he could then execute the commands in a command prompt. For example, to do a system dump on my el cheapo Coby tablet, I use the following commands:
Code:
adb.exe wait-for-device
adb.exe shell mkdir /sdcard/dump
adb.exe shell su -c "cat /dev/block/nanda > /sdcard/dump/bootloader.img"
adb.exe shell su -c "cat /dev/block/nandc > /sdcard/dump/boot.img"
adb.exe shell su -c "cat /dev/block/nandg > /sdcard/dump/recovery.img"
adb.exe shell su -c "busybox tar -czvf /sdcard/dump/system.tgz /system"
mkdir dump
adb.exe pull /sdcard/dump dump
Putting it all together into a single file though is not going to happen. Besides, installing ClockworkMod or StreakMod and doing a nandroid backup through it is the best means of backing up the Streak.

Categories

Resources