cmd error flashing custom recovery - Droid Eris Android Development

Someone please tell me what I'm doing wrong:
C:\Users\[my name]> cd C:\android-sdk-windows\tools
C:\android-sdk-windows\tools> adb devices
List of devices attached
HT9ADHG05719 device
C:\android-sdk-windows\tools> adb shell
# mount -o rw,remount /dev/block/mtdblock3 /system
mount -o rw,remount /dev/block/mtdblock3 /system
# adb push recovery-ra-eris.img /sdcard
adb push recovery-ra-eris.img /sdcard
adb: not found
#
I had to enter adb shell and hit enter before inputting the rest of that command just to get past that step. I tried doing the same with the next step and entering adb push separately but I got this:
# adb push
adb push
adb: not found
#
Does anyone know what I'm doing wrong or leaving out? I have the recovery and flash saved to the tools folder of my sdk.

you cant use adb push from inside a shell

That's what the "how to root" instructions are telling me to do.

joshw0000 said:
That's what the "how to root" instructions are telling me to do.
Click to expand...
Click to collapse
looks like you are "separating" steps...
3. Open up a command prompt and go to your tools directory, and execute these commands:
* adb shell mount -o rw,remount /dev/block/mtdblock3 /system
* adb push recovery.img /sdcard
* adb push flash_image /system/bin
* adb shell chmod 755 /system/bin/flash_image
* adb shell flash_image recovery /sdcard/recovery.img
(Taken from this thread: http://forum.xda-developers.com/showthread.php?t=647707)
your command is "adb shell" (which is going to shell... in which, anonomouse is correct, you cannot "adb" inside a shell). instead, type 1 command like this:
- adb shell mount -o rw,remount /dev/block/mtdblock3 /system
re-read the thread (link i posted) again... you're close
from your post... you'd have to exit shell... then get back to a DOS prompt... then do the "adb push" command

If I type the adb shell mount command together I get an error. That's why I broke them up.
So basically, once in the tools directory, I should be able to copy and paste the commands (which is what I was doing)? I would need to get back in front of my home pc and I'll tell you what error I'm getting. I believe it was "adb: not found".

If I type the adb shell mount command together I get an error. That's why I broke them up.
So basically, once in the tools directory, I should be able to copy and paste the commands (which is what I was doing)? I would need to get back in front of my home pc and I'll tell you what error I'm getting. I believe it was "adb: not found".

Linux or windows
Nevermind.... i reread your post. Sorry.

joshw0000 said:
If I type the adb shell mount command together I get an error. That's why I broke them up.
So basically, once in the tools directory, I should be able to copy and paste the commands (which is what I was doing)? I would need to get back in front of my home pc and I'll tell you what error I'm getting. I believe it was "adb: not found".
Click to expand...
Click to collapse
Make sure your sdcard is not mounted, it should be in charge only mode. Also make sure USB Debugging is on.

My phone was in charge mode and USB debugging was enabled, thanx.

joshw0000 said:
My phone was in charge mode and USB debugging was enabled, thanx.
Click to expand...
Click to collapse
You can use the application in this thread to help ease the process. They automated the commands through scripts to help in these situations. Plus, ECLIPS3 and Jamezelle do great work!
http://forum.xda-developers.com/showthread.php?t=661413

joshw0000 said:
If I type the adb shell mount command together I get an error. That's why I broke them up.
So basically, once in the tools directory, I should be able to copy and paste the commands (which is what I was doing)? I would need to get back in front of my home pc and I'll tell you what error I'm getting. I believe it was "adb: not found".
Click to expand...
Click to collapse
First the solution and then the explanation; note that I have included the command prompts here:
C:\android-sdk-windows\tools> adb shell
# mount -o rw,remount /dev/block/mtdblock3 /system
# exit
C:\android-sdk-windows\tools> adb push recovery-ra-eris.img /sdcard
C:\android-sdk-windows\tools> adb push recovery-ra-eris.img /sdcard
So, here's what is happening.
When you "break up the command", by making the first part the single line
Code:
adb shell
What you are getting is an interactive shell running on the phone. That shell does not terminate immediately; you can type an unlimited number of commands into it, one after another.
When you issue a command (from the PC's command window) which looks like this:
Code:
adb shell programname arg1 arg2 arg3 arg4
something a little different happens than in the first example: the program "programname" is launched on the phone, with the arguments "arg1", "arg2", et cetera - and the "shell" on the phone terminates as soon as "programname" is finished running
Note that the command prompt changed!
C:\android-sdk-windows\tools>
vs
#
So what happened? "adb" is a program on the PC, and NOT ON THE PHONE. When you typed "adb blah blah blah" into the interactive shell on the phone - guess what? you see "command not found".
If you insist on "splitting up the command", then go ahead (although I really don't see any reason why it wouldn't work in it's original format); just bear in mind you are typing commands into an interactive "command prompt" that is running on the phone. When it comes time to run other "adb" commands - you need to be at the PC's command prompt
bftb0

Thanks for the info. You were right. I had just screwed something up when I typed it in the first time. Explaining the steps really helped me to understand what I was doing. I entered the commands as you had them in the tutorial and it worked perfect. So after that I created a backup and attempted to flash a custom rom:
I just ran a nandroid backup for my Eris which was at stock 2.1 w/ root. I first partitioned the sd to swap - 3072 MB, ext2 swap 3072 MB, and fat32 - remainder. Realizing this was stupid, I went back and changed the partition to swap - 0, ext2 - 512 MB, fat32 - remainder 7680 MB or 7.5 GB. I moved ext2 to ext3 and booted the phone. All my sd was cleared so I copied everything back on (I saved all sd contents to my computer prior to this). I went back to recovery and flashed Eris Lightning 3.02. Everything went successful and when it rebooted, I saw the droid guys, then the "quietly brilliant", then "Verizon" screens. It then began running the "quietly brilliant" and "verizon" screens over and over. I pulled the battery and powered up again but it's still running those two screens over and over. I booted into recovery and attached my phone to the computer. I opened command prompt, entered " sd C:\android-sdk-windows\tools" and then entered "adb devices". It reads "List of devices attached" but there are none. I attempted to add the driver back to my device but when I go to device manager and click "update driver" and point it to the tools directory in SDK, it says that "Windows could not find driver software for your device".
If I can't communicate with my phone via usb and it wont boot, how can I get it to recover?
Any suggestions would help, I'm scratching my head here. I really don't want to have to buy another phone.

It turns out I was just having another newbie moment. I did a wipe and reflashed the rom and it worked perfectly.

Related

Terminal Commands?

I seem to be having trouble using the same commands I used to use on my G1.
I used to be able to copy via terminal (cp) and I was able to mount with a simple declaration "mount system" and "mount sdcard". Is that something that was created later on during the life of the G1 and still has yet to make it to the N1 or is it just a whole different set of commands?
I know the move command works in terminal (mv), but I haven't been able to use anything else. I couldn't even use ADB to pull something, is this correct?
(after su and mounting, mount -o rw,remount /dev...etc...)
adb-windows pull /system/build.prop c:/
I keep getting an error, no such file or directory. What am I doing wrong?
do you get a response with adb device? if not, then you don't have a bridge. if you don't have a bridge, you can't give commands
I get a response. "adb-windows devices" detects the device and I can mount the system folder as well as being able to enter adb shell, I just can't seem to get the usual commands (ones I would use with the G1 and adb/terminal) to work.

need help with command prompt PLEASE!! ASAP im working on it now

im on to the command prompt thingy and im a little confused......
do i put the whole command in? because when i do it says faild bla bla?
do i type it in just how it shows? cuz i wont work for me, but if i put in
JUST..."abd shell mount" it show alot of writing like it worked but im not putting in the WHOLE command???
can anyone tell me what it is supposed to say after each command??????????
omg i just want it to work. i got a new phone from verizon because i downloaded the leak, when all i wanted was a custom rom for wireless tether
adb shell mount -o rw,remount /dev/block/mtdblock3 /system
adb push recovery.img /sdcard
adb push flash_image /system/bin
adb shell chmod 755 /system/bin/flash_image
adb shell flash_image recovery /sdcard/recovery.img
you might want to hit up in the irc chat, you can get real time help there. irc.wastate.net i believe or irc.zifnab06.net chat room either erisroothelp or droideris
where is that? those links diddnt work
those werent links, they were the servers for the irc chats. you need a irc chat client to get on there. if you want to use a web based chat client, the direct link to there is chat.andirc.net
whooohoooo!
you dont remember how the command prompt works? im just wondering if you put the whole command in or just the first part....sorry if im coming off a little stupid and pushy
how about posting the error?
ok i get in to my tools directory(this is what i see)
*C:\AndroidSDK\AndroidSDK\tools>
i put in (adb shell mount -o rw,remount /dev/block/mtdblock3 /system)
this is what it says "mount: Operation not permitted"
Why not use this:
http://forum.xda-developers.com/showthread.php?t=661413
what does that do? is it an app to get around the command prompt?
Does your phone have root access? (did you flash the rooted PB00IMG.zip?)
yes i did all the steps leading up to this now im stuck on the command prompt
do i type in all of the command? when i do it says "mount: Operation not permitted" on the first command
*Sigh*
- Open up command prompt (either type in cmd in the windows search bar or dig deep into your computer to find that sexy thang.
- Direct it to the folder of your choosing. In this case, the tools subfolder of android sdk. There are several ways to do this, the easiest would be as follows:
Say you're trying to get to C:\AndroidSDK\tools
Type:
cd C:\AndroidSDK\tools
or
cd C:\
cd AndroidSDK
cd tools
- From here, you shouldn't have a problem with adb. Make sure your device is plugged in and type:
adb devices
and you should see your device. Copy and paste the commands and you should be good to go.
ok so i put in adb devices (wasnt in the walkthrough)
and it showed
"list of devices attached"
HT9CTHG01052 device
im assuming that this is my device! yay.....or so i thought
i copied and pasted the command...and i also tried to type it out
it said the same thing!?
"mount: operation not permitted"
im sure its something im doing wrong...i just need someone to take a couple minutes to help a brutha
i typed in "cmd" in front of each command and it showed
microsoft windows [version bla bla]
copyright bla bla
untill i got to the last command..... it said 'ecovery.img' is not recognized as an internal or external command, operable program or bach file (yes it did say " 'ecovery.img' ") i looked all over a i found no file mis labled as "ecovery.img"
when it says all that stuff about windows does that mean that it took the command?
Why are you typing in "cmd" infront of everything?
IDK im just trying to figure it all out? am i wrong?
thanks for helping btw
i wish someone knew what it is supposed to say after each command....or even a video showing someone doing these commands so you can see them typing them
Open up a command prompt and go to your tools directory, and execute these commands:
adb shell mount -o rw,remount /dev/block/mtdblock3 /system
adb push recovery.img /sdcard
adb push flash_image /system/bin
adb shell chmod 755 /system/bin/flash_image
adb shell flash_image recovery /sdcard/recovery.img
you type the adb commands in exactly like they are shown. you dont type anything in front of adb.

[Q] 1st update froyo

should i flash it. i dont have root
WOW! i cant believe no one has replied to you.
if you take a look at the first post with the topic
[ROM] Official AOSP 2.2 OTA
but you mentioned you dont have root. so try installing alogcat from the marketplace and capture the whole deal. then you can email directly from the app.
logcat isnt going to do much, it prefetches the files, need to pull the update.zip from adb
ok, so i havnt gotten the notice yet.
but need a bit of help prepping for when i do.
i have the android sdk installed on my desktop, and can create a virtual device etc...
but when i open the cmd prompt and try to run adb devices it says it is populating a list but i see no results or no file created.
so i tried just running adb logcat and it stops at waiting for device.
any pointers. im running win7x64 ultimate
well, i screwed it up. i removed the usb drivers and set it to debugging mode and got it working.
so i am able to run adb shell etc...
once i get the notice ill be ready to do an adb pull
adb shell
su
cd /cache/
ls
adb pull /cache/<package_name>.zip .
sepiid said:
well, i screwed it up. i removed the usb drivers and set it to debugging mode and got it working.
so i am able to run adb shell etc...
once i get the notice ill be ready to do an adb pull
adb shell
su
cd /cache/
ls
adb pull /cache/<package_name>.zip .
Click to expand...
Click to collapse
but how do you know the new radio and spl update name?
you should get that by running su then "cd /cache/ ; ls"
right now i have
download-1.apk
downloadfile.apk
recovery
lost+found
so after it is precached i run that "cd cache/ ; ls" i should have another file or two in there
that would be the file you run adb pull /cache/*.*
a tad bit of help, as a test i am trying to do
adb pull cache/downloadfile.apk d:\
but i get
remote object 'cache/downloadfile.apk' does not exist
i also tried adb pull /cache/downloadfile.apk d:\
and get the same.
edit:
tried doing a adb push
D:\android-sdk-windows\tools>adb push d:\test.txt /cache
failed to copy 'd:\test.txt' to '/cache/test.txt': Permission denied
so i dont have permission to put anything there, which means i likely dont have permission to pull from there
D:\android-sdk-windows\tools>adb pull /cache/downloadfile.apk d:\
remote object '/cache/downloadfile.apk' does not exist
so i opened another cmd prompt and and did an adb shell
su
and i am su
so while the other window was open and i was su i tried the same commands again and got the same results.
edit2:
D:\android-sdk-windows\tools>adb shell ls /cache
opendir failed, Permission denied
so it is definately a su/permissions issue.
Are you rooted? If not use Universal Androot.
*anticipation*
sepiid said:
a tad bit of help, as a test i am trying to do
adb pull cache/downloadfile.apk d:\
but i get
remote object 'cache/downloadfile.apk' does not exist
i also tried adb pull /cache/downloadfile.apk d:\
and get the same.
edit:
tried doing a adb push
D:\android-sdk-windows\tools>adb push d:\test.txt /cache
failed to copy 'd:\test.txt' to '/cache/test.txt': Permission denied
so i dont have permission to put anything there, which means i likely dont have permission to pull from there
D:\android-sdk-windows\tools>adb pull /cache/downloadfile.apk d:\
remote object '/cache/downloadfile.apk' does not exist
so i opened another cmd prompt and and did an adb shell
su
and i am su
so while the other window was open and i was su i tried the same commands again and got the same results.
edit2:
D:\android-sdk-windows\tools>adb shell ls /cache
opendir failed, Permission denied
so it is definately a su/permissions issue.
Click to expand...
Click to collapse
Here do this:
First if you have root, open up terminal or cmd prompt if you are on windows:
adb shell
su
mount -o rw,remount yaffs2 /cache
chmod 777 /cache
that will change the permissions allowing for read and write.
Now exit out of shell and just adb pull /cache/
That will pull everything out of the cache partition.
BAM!!! perfect!
i new it was permissions related. just couldnt figure out the "mount -o rw,remount yaffs2 /cache" part. might i ask you to break that down for me? at least the yaffs2 part.
thanks!
so once the update hits i am ready to grab the files.
callmeradical said:
Here do this:
First if you have root, open up terminal or cmd prompt if you are on windows:
adb shell
su
mount -o rw,remount yaffs2 /cache
chmod 777 /cache
that will change the permissions allowing for read and write.
Now exit out of shell and just adb pull /cache/
That will pull everything out of the cache partition.
Click to expand...
Click to collapse
So the YAFFS2 part of the code I put up there is designating the file system in which we are reading/writing.
YAFFS2 is the most popular and widely used format for flash memory.
please allow me.
yaffs2 is a filesystem type. /cache is of course the directory. -o is for option.
rw: read/write
remount: remount /cache again with new option.
sepiid said:
BAM!!! perfect!
i new it was permissions related. just couldnt figure out the "mount -o rw,remount yaffs2 /cache" part. might i ask you to break that down for me? at least the yaffs2 part.
thanks!
so once the update hits i am ready to grab the files.
Click to expand...
Click to collapse
Oh yeah and BTW, you can change the permissions back if you want after your done, otherwise I believe you can just reboot the phone and it fixes it, not entirely sure, I was trying to rewrite my default.prop to get adb remount to work with stock 1.6 rooted, but I am getting and access denied issue.
perfect was about to ask what the -o was but i tried mount --help and mount -h both resulted in nothing. then you reply sharpt71
thanks again all.
i am now ready to pull the update and upload once i get the update. hopefully soon!
Rather than the remounting and chmoding so you can adb pull.
You could probably get away with
Code:
su
cp /cache/<whatever> /sdcard
Then mount the SD card or put it in a card reader.
SilverSurfR said:
Rather than the remounting and chmoding so you can adb pull.
You could probably get away with
Code:
su
cp /cache/<whatever> /sdcard
Then mount the SD card or put it in a card reader.
Click to expand...
Click to collapse
You probably could I just know that this is a sure fire way to grab everything in cache directly to the machine, otherwise if you aren't next to a machine you could probably do a copy like you said.
My 2nd update failed, do you guys think the files are still in my cache?

Uninstall WaveSecure system app?

Hi I have been trying all evening to remove com.wsandroid.apk from my phone, using terminal but I simply cannot. I've tried many different commands and I'm just being told either permission denied, directory not found/not empty. I have a Wildfire which is obviously rooted. Please help me out, tearing my hair out here.
So you're using modaco custom rom?
Download the latest version of HTC Sync and install. This will also install the adb drivers. (I presume you use windows, if not, I apologise)
Download the Android SDK
Put the phone in fastboot mode (Power+Volume down) and plug it into your computer.
When the drivers are installed, use the command prompt to navigate to the tools folder within the android sdk folder.
Type the following commands, pressing enter at the end of each line:
adb shell
mount -o rw,remount -t yaffs2 /dev/block/mtdblock03 /system
cd app
rm -r com.wsandroid.apk
That should do it
I'm using the stock ROM but it is rooted with Unrevoked. I'll try these instructions anyway.
- Connect your phone to the PC
- Clear WaveScure's cache on the phone
- Open a command prompt
- go to run go to C:\androidSDK\tools and then run these 2 commands
1. adb remount
2. adb shell rm /system/app/*wsandroid*
Click to expand...
Click to collapse
I'm trying these settings, but when I get to adb remount, I get this error: remount failed: Operation not permitted
EDIT: I put the phone into recovery mode and mounted it and it said remount succeeded, I then followed step 2. both *wsandroid* and com.wsandroid.apk and it says that they cannot be found.
EDIT: Nevermind, deleted it
There's currently no write access to system partition using Unrevoked on Wildfire. So you can't remove it. You flashed it with update.zip? I'm not an expert (yet) but I assume the only way (or easiest way) to remove it is to flash your stock ROM again.

[Q] Need help pushing a system file with adb

I have bricked my device when I tried to copy framework-res.apk to the system folder. I renamed the old framework-res.apk to framework-res.apk.bak but before I could paste the new one the phone freaked out and rebooted and now I'm stuck at the ATT white screen. I have adb access though so I'm hoping I can just push the framework-res file using adb. Every time I try this though I get an error saying file system is read only. I know all I probably need to do is get the computer to mount system as read/write. I just don't know how to do this. Is there anyone out there who can help me out?
Modified from:
http://forum.xda-developers.com/showthread.php?p=41339365
You may need to do:
mount -o remount,rw /system
chmod 777 /system/framework
Thank you for your quick reply. I'm kind of a novice when it comes to adb so bear with me, but when I use those commands I get 'mount' is not recognized as an internal or external command. I'm not sure if it matters or not but I'm running windows XP and my working directory is in c:\android-sdk\platform-tools when I tried executing "mount -o remount,rw /system".
Okay I tried changing the command to "adb shell mount -o remount,rw /system" now I get the error mount operation not permitted. I hope this doesn't mean I borked it. . . Also want to note that I did root the phone.
jack_slapped said:
Thank you for your quick reply. I'm kind of a novice when it comes to adb so bear with me, but when I use those commands I get 'mount' is not recognized as an internal or external command. I'm not sure if it matters or not but I'm running windows XP and my working directory is in c:\android-sdk\platform-tools when I tried executing "mount -o remount,rw /system".
Click to expand...
Click to collapse
You need to do some reading before you go any further - please. ADB is a command shell, and the commands he gave you are for running IN ADB after it's successfully connected to the phone.
There are lots of good writeups on using ADB all over the place.
jack_slapped said:
Okay I tried changing the command to "adb shell mount -o remount,rw /system" now I get the error mount operation not permitted. I hope this doesn't mean I borked it. . . Also want to note that I did root the phone.
Click to expand...
Click to collapse
You need to get INTO the shell first -- then execute the commands.
Also, always stop the system before modifying stuff, especially framework!
like so:
Code:
> [B]adb shell[/B]
$ [B]su[/B]
# [B]mount -o rw,remount /system[/B]
# [B]stop[/B]
# **[I]cp or mv whatever here[/I]**
# [B]reboot[/B]
your cmd prompt will return after reboot
alacrify said:
You need to do some reading before you go any further - please. ADB is a command shell, and the commands he gave you are for running IN ADB after it's successfully connected to the phone.
There are lots of good writeups on using ADB all over the place.
Click to expand...
Click to collapse
I know believe me when I say I'm trying to read as much as I possibly can. Nobody wants this phone fixed more than me. It's just alot of new stuff and I'm not entirely familiar with it. I think I'm connected with adb and started a shell using "adb -s myserial shell". I input the first command and got "mount: operation not permitted". Not really sure why it would say that considering I rooted the device.
jack_slapped said:
I know believe me when I say I'm trying to read as much as I possibly can. Nobody wants this phone fixed more than me. It's just alot of new stuff and I'm not entirely familiar with it. I think I'm connected with adb and started a shell using "adb -s myserial shell". I input the first command and got "mount: operation not permitted". Not really sure why it would say that considering I rooted the device.
Click to expand...
Click to collapse
Be sure to follow gwbard's directions a little closer. The first command inside the ADB shell is "su" which will elevate you to root - this will be necessary in order to execute the "mount" command.
From your command line (assuming in Windows), you'll run the "adb shell" command that gwbard showed. It should give you a prompt that ends with a dollar sign. Once you execute the "su" command, you'll see that change to a pound/hash sign (#).
gwbard said:
You need to get INTO the shell first -- then execute the commands.
Also, always stop the system before modifying stuff, especially framework!
like so:
Code:
> [B]adb shell[/B]
$ [B]su[/B]
# [B]mount -o rw,remount /system[/B]
# [B]stop[/B]
# **[I]cp or mv whatever here[/I]**
# [B]reboot[/B]
your cmd prompt will return after reboot
Click to expand...
Click to collapse
Dude you are the man! That did the trick. I really appreciate it. I'm still trying to figure out exactly what a shell is and how that ties into adb but I learned a good bit about it from today. I've used linux before and I have heard of a shell but never really understood what exactly it was. Anyways thanks again for everyone who helped me get this working.
Aou said:
Be sure to follow gwbard's directions a little closer. The first command inside the ADB shell is "su" which will elevate you to root - this will be necessary in order to execute the "mount" command.
From your command line (assuming in Windows), you'll run the "adb shell" command that gwbard showed. It should give you a prompt that ends with a dollar sign. Once you execute the "su" command, you'll see that change to a pound/hash sign (#).
Click to expand...
Click to collapse
Yea I posted that last one before I saw his instructions. They were right on point. Thanks guys!
jack_slapped said:
Dude you are the man! That did the trick. I really appreciate it. I'm still trying to figure out exactly what a shell is and how that ties into adb but I learned a good bit about it from today. I've used linux before and I have heard of a shell but never really understood what exactly it was. Anyways thanks again for everyone who helped me get this working.
Click to expand...
Click to collapse
When you click "start" and type "cmd", you're starting a shell. They're command interpreters that extend functionality in specific ways. like "dir" for the Windows/DOS command shell, and "su" or "mount" for adb. Lots of good writeups on that around too

Categories

Resources