[Q] ADB question - Android Q&A, Help & Troubleshooting

Ive pushed all kinds of other stuff, I did do the add system enviromental variable to XP so this could be my issue, though like i said its worked for other things ...
ERROR I GET>
CANNOT STAT
adb push stock-hc-flyer-hboot_1.11.0006.nb0 / && adb shell dd if=/stock-hc-flyer-hboot_1.11.0006.nb0 of=/dev/block/mmcblk0p18
NO SUCH FILE OR DIRECTORY
a thourough explanation or a cut and pastable pointing my adb to this file, its in the root, the variable is to the root C also, so....
PLEASE HELP, to get me past this 10+hours of hell

May be a connection between your computer and phone issue. I have this error when I wanted to root my nexus s. Try different driver for your flyer.
Accidentally sent from my Google Nexus S using XDA Premium

Make sure the adb works via "adb devices" and "adb shell". If it does not work you can try "adb kill-server" first.
I don't think you can write (push) to "/" without "adb remount". Not sure if it is a good idea to write to root directory.
Alternatively, you can use the storage in /data/local/tmp, it is always writable.

Related

hello to a new forum, and already a newb question...

OK. Firstly, I have extensive experience with rooting moto droids and custom roms. That said I got cocky and didn't do enough homework trying to root my girls Eris and proceeded following the instructions in the "1.5 to rooted 2.1" thread. Step 1 went fine. I THINK I have root access. Anyway, like I was tired and couldn't get adb shell working so I left it at that with intent to finish today when I get home from work. Now she's telling me her icons are different and some are linking to different programs. Any ideas? Second, can someone point me in the direction of an adb shell how to, on my Droid I can just use terminal emulation and don't actually need a computer so I'm not too familiar with the process... sorry for the stupid newborn questions, don't pull the flame throwers out yet, thanks!
You can use terminal emulator, same thing for the most part as adb... I use that more then adb, faster then having to connect to a pc IMO.
I tried the terminal emulator and got adb not found or not allowed or some craziness like that. Does that mean I didn't root like I thought? Also, any clue about the icon s changing or linking to other apps like shes claiming? I'm going to try again when she gets home
In the terminal emulator you would not need to type adb.. adb is the program you would be using on a pc to talk to the phone... what is it that you are trying to type through adb or the terminal?
III: Flashing a Custom Recovery
Flashing a custom recovery will make your life easier when flashing ROMs in the future.
1. Download this file: Recovery.zip
2. Extract file contents to your \tools\ directory of your Android SDK.
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
4. Success! You now have a recovery partition installed on your phone. You can access it by running "adb shell reboot recovery" or by powering off your phone, holding "Volume Up + Power On"
step 3. im an ass. ok so dont type the adb. like i said, not much exp in this part... im guessing i dont tye shell either, but i do type mount?
evilsway said:
III: Flashing a Custom Recovery
Flashing a custom recovery will make your life easier when flashing ROMs in the future.
1. Download this file: Recovery.zip
2. Extract file contents to your \tools\ directory of your Android SDK.
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
4. Success! You now have a recovery partition installed on your phone. You can access it by running "adb shell reboot recovery" or by powering off your phone, holding "Volume Up + Power On"
step 3. im an ass. ok so dont type the adb. like i said, not much exp in this part...
Click to expand...
Click to collapse
Oh I see, for that yes you will need to get the SDK setup on your PC as per step 2... There is another thread that has a batch file that does all of this for you. You still need the SDK though.
see: http://forum.xda-developers.com/showthread.php?t=651669
ok, i have the sdk, i followed these instructions to the letter, and i still couldnt get it running last night, where in the sdk do i do this from or is it a command promp, or can i use the terminal emulator?
yes in the command prompt, typically adb.exe will be in your tools folder.
also, and i know im being a pain now, but by adb does it mean the adb in the tools directory of the sdk, i click it and it runs a script then dissapears.
evilsway said:
also, and i know im being a pain now, but by adb does it mean the adb in the tools directory of the sdk, i click it and it runs a script then dissapears.
Click to expand...
Click to collapse
yes, adb needs to be ran through the command prompt, if you click on it in windows it wont work... read the thread I linked you to, you wont need to run adb if you use that method, it does it all for you.
yeah im downloading the file now, but im just curious, now i want to be able to do it just to do it. i hate when i cant figure crap like this out,
so far ive done this, opened command promp, put in C:\androidsdk\android-sdk-windows\tools\adb.exe and it runs a script then nothing
evilsway said:
yeah im downloading the file now, but im just curious, now i want to be able to do it just to do it. i hate when i cant figure crap like this out,
so far ive done this, opened command promp, put in C:\androidsdk\android-sdk-windows\tools\adb.exe and it runs a script then nothing
Click to expand...
Click to collapse
go to start, run and type cmd and enter. then in that window
you have to change to the tools directory at the command prompt like so"
cd androidsdk\android-sdk-windows\tools
then type adb
Renocat said:
go to start, run and type cmd and enter. then in that window
you have to change to the tools directory at the command prompt like so"
cd androidsdk\android-sdk-windows\tools
then type adb
Click to expand...
Click to collapse
Yeah, once you do what he states and type...
cd androidsdk\android-sdk-windows\tools ... or where ever you have your SDK saved at on your computer ... you should be good to start running those scripts in the directions.

[Q]ADB issue

Okay, so I'm a bit an ADB noob here. I've been trying to push my avatar apk into /system/apps for awhile here but every time i do so, it fails with this error:
/bin/sh: adb: not found
did I set it up wrong somehow?
Oniyuri said:
Okay, so I'm a bit an ADB noob here. I've been trying to push my avatar apk into /system/apps for awhile here but every time i do so, it fails with this error:
/bin/sh: adb: not found
did I set it up wrong somehow?
Click to expand...
Click to collapse
Make sure you are running the adb command from the directory where your adb is located. There is tons of info on this site and google that will give you everything you need to know about using adb. Try typing the error message into search
yeah, i know to change directories already. this error is happening after i'm in the directory.
i basically start out like this:
cd C:\android-sdk-windows\tools
and after that, switch to adb shell
C:\android-sdk-windows\tools> adb shell
i get some characters and then try for a push
"adb push C:\users\myuser\downloads/avatar.apk /system/app
after that, boom! error.
bump
+10char
Oniyuri said:
yeah, i know to change directories already. this error is happening after i'm in the directory.
i basically start out like this:
cd C:\android-sdk-windows\tools
and after that, switch to adb shell
C:\android-sdk-windows\tools> adb shell
i get some characters and then try for a push
"adb push C:\users\myuser\downloads/avatar.apk /system/app
after that, boom! error.
Click to expand...
Click to collapse
You really should be using either the search bar here or google because this information is in abundance. "adb push" should not be run from inside the shell. adb is not recognized by the shell. Do the same thing that you listed above minus the step where you typed "adb shell"
********
Sent from my Paragon RC3 Captivate using the XDA app
Try 'cd C:\android-sdk-windows\platform-tools', not C:\android-sdk-windows\tools.
Better yet, just add that to the environment variable, PATH.
hth

adb wireless problem

Hi,
I have a problem with adb wireless as documentation is very limited and I actually had no knowledge of adb whatsoever.
However, I have it up and running and I can change and list directories. I also can remove applications but I struggle with the very simple push and pull commands.
Here is what I do. First I connect to adb wireless, then I type adb shell and after that su.
Now when I try to push or pull I always get a :not found error.
Can anyone advise what I'm doing wrong?
For example: "pull /data/app/com.antivirus-2.apk " will return pull:not found
Any help is greatly appreciated as I would like to use adb wireless as my standard application for moving files from/to pc and phone.
push and pull are not ran from a shell, but as actuall ADB calls/commands.
i.e. instead of "adb shell" you do "adb push" or "adb pull".
Hope this helps
+1
Thanks very much ..... I knew that the solution must be very simple ...

[Q] adb push HELP

Lil' Help... New stock SGS2 phone arrived today... I successfully flashed Entropy512's "stock kernel + rooted stock system image" via Odin3 (v1.85). Worked perfect, phone rebooted, now I have root. 2nd step, I extracted the zImage from Codeworkx's CWM tar file (put zImage in same PC desktop folder as my adb.exe files). I want to use adb push to push zImage file to phone so I can avoid the triangle/counter of death. Anyway, I got this error in my CMD window:
C:\Android\android-sdk-windows\platform-tools>adb push zImage /sdcard/zImage
error: device not found
What went wrong? The "phone" and "card" are recognized by windows explorer, but when trying to use adb commands, get "error: device not found"
Thx.
DoctorQMM said:
Lil' Help... New stock SGS2 phone arrived today... I successfully flashed Entropy512's "stock kernel + rooted stock system image" via Odin3 (v1.85). Worked perfect, phone rebooted, now I have root. 2nd step, I extracted the zImage from Codeworkx's CWM tar file (put zImage in same PC desktop folder as my adb.exe files). I want to use adb push to push zImage file to phone so I can avoid the triangle/counter of death. Anyway, I got this error in my CMD window:
C:\Android\android-sdk-windows\platform-tools>adb push zImage /sdcard/zImage
error: device not found
What went wrong? The "phone" and "card" are recognized by windows explorer, but when trying to use adb commands, get "error: device not found"
Thx.
Click to expand...
Click to collapse
Try to start by verifying that adb can see your phone.
type "adb devices" (no quotes)
This should return a number, if not, the phone is not being seen by adb.
If not check drivers, cable, try different usb port.
If it does return a number you are properly connected.
Proceed to:
adb push zImage /sdcard/zImage
adb shell dd if=/sdcard/zImage of=/dev/block/mmcblk0p5
Might need to as su if prompt shows $ instead of #
Try adb remount
i didnt realize so many people cared about a little triangle that you see for about 3 seconds on boot.
DoctorQMM said:
Lil' Help... New stock SGS2 phone arrived today... I successfully flashed Entropy512's "stock kernel + rooted stock system image" via Odin3 (v1.85). Worked perfect, phone rebooted, now I have root. 2nd step, I extracted the zImage from Codeworkx's CWM tar file (put zImage in same PC desktop folder as my adb.exe files). I want to use adb push to push zImage file to phone so I can avoid the triangle/counter of death. Anyway, I got this error in my CMD window:
C:\Android\android-sdk-windows\platform-tools>adb push zImage /sdcard/zImage
error: device not found
What went wrong? The "phone" and "card" are recognized by windows explorer, but when trying to use adb commands, get "error: device not found"
Thx.
Click to expand...
Click to collapse
You're missing drivers or haven't enabled USB debugging. Drivers for USB Mass Storage are built into Windows, drivers for ADB are not. Not sure what the procedure is for installing Windows ADB drivers... It's one of the reasons I almost never use Windows for working with my phone.
I've heard Droid Explorer might come with a drivers package, not sure.
Entropy512 said:
You're missing drivers or haven't enabled USB debugging. Drivers for USB Mass Storage are built into Windows, drivers for ADB are not. Not sure what the procedure is for installing Windows ADB drivers... It's one of the reasons I almost never use Windows for working with my phone.
I've heard Droid Explorer might come with a drivers package, not sure.
Click to expand...
Click to collapse
PDANET is free and simple to install on any Windows based machine. Less than 30 seconds and it recognises every phone I have tried so far. You just need to be sure to get the right one for you OS, 64 or 32 bit.
I sent to my kids that are too lazy to install the Android SDK.....
SNadler said:
Try to start by verifying that adb can see your phone.
type "adb devices" (no quotes)
This should return a number, if not, the phone is not being seen by adb.
If not check drivers, cable, try different usb port.
If it does return a number you are properly connected.
Proceed to:
adb push zImage /sdcard/zImage
adb shell dd if=/sdcard/zImage of=/dev/block/mmcblk0p5
Might need to as su if prompt shows $ instead of #
Click to expand...
Click to collapse
I appreciate everyone's input... OK, here's where I stand:
adb does now recognize phone. After typing "adb devices", cmd window showed my phone in list of devices attached. I then proceeded to "adb push zImage /sdard/zImage... that seemed to work also [cmd window came back with "2544 KB/s (6718048 bytes in 2.578s)]. Next, I typed "adb shell dd if=/sdcard/zImage of=/dev/block/mmcblk0p5" [cmd window came back with "/dev/block/mmcblk0p5: cannot open for write: Permission denied"]
so is still a drivers issue? cable issue? or something else? Thx again
EDIT: one additional clue for all the experts: the zImage is now on my /sdcard. When I type "adb shell", I do get "$" instead of "#" in cmd window... and I know I have root on phone. When I type "adb shell su" in cmd window, I get "Permission denied".
Sometimes the root install won't completely work until you go to the Superuser app once manually. (e.g. in Applications).
Also, another possibility may be that there are two ways to run adb shell:
One is
Code:
adb shell <command>
Where it'll run <command> and then exit
Then there is
Code:
adb shell
<command1>
<command2>
exit
In the second, when you first type "adb shell" you'll get a shell prompt on your phone.
Then you'll type su (this will give you superuser privileges)
Then you run the dd command
Then you should be good.
The difference is: If you have a custom "insecure" kernel, an ADB shell defaults to root privileges. If you have a stock kernel, ADB shell defaults to "mortal user", and you need to manually use su to get root privileges.
Pushing the file to the SD card does not require root, writing the kernel to the kernel partition (mmcblk0p5) does.
Entropy512 said:
Sometimes the root install won't completely work until you go to the Superuser app once manually. (e.g. in Applications).
Also, another possibility may be that there are two ways to run adb shell:
One is
Code:
adb shell <command>
Where it'll run <command> and then exit
Then there is
Code:
adb shell
<command1>
<command2>
exit
In the second, when you first type "adb shell" you'll get a shell prompt on your phone.
Then you'll type su (this will give you superuser privileges)
Then you run the dd command
Then you should be good.
The difference is: If you have a custom "insecure" kernel, an ADB shell defaults to root privileges. If you have a stock kernel, ADB shell defaults to "mortal user", and you need to manually use su to get root privileges.
Pushing the file to the SD card does not require root, writing the kernel to the kernel partition (mmcblk0p5) does.
Click to expand...
Click to collapse
===============
Entropy512... you da man! I'm good to go now. As you recommended, even though I've been using Root Explorer and I know I was 'rooted', had to open SuperUser app on phone... then in the cmd window when I typed "adb shell" I got the "$" prompt. So at the $ prompt I typed "su"... this gave me the "#" prompt. SuperUser App then asked for SU permission acceptance. Then did the "dd xxxxxxxx" command, and it came back with:
13121 +1 records in
13121 +1 records out
6718048 bytes transferred in 2.895 secs (2320569 bytes/sec).
Rebooted phone to recovery, and have the light blue CWM Recovery 5.0.2.3.
Now I'm rooted, have CWM, and no triangle/counter of death. Hope this helps anyone else with a similar situation.
Again, a BIG shoutout to Entropy512, SNadler, jivy26, et al., for your constructive and quick replies. This forum is the best!
DocQ
One last [Q] Do I have to leave the large "zImage" file (6.41mb) in the /sdcard folder, or can it be removed /moved now that CWM successfully flashed?
DoctorQMM said:
One last [Q] Do I have to leave the large "zImage" file (6.41mb) in the /sdcard folder, or can it be removed /moved now that CWM successfully flashed?
Click to expand...
Click to collapse
No need to leave it, although I keep a bunch of various kernels in /sdcard/kernels myself - it's up to you.

[Q] Proper adb command

Sorry for the noob question, but I am having some troubles doing a backup with adb. I have my phone rooted and can connect with adb, however I cant do a "adb pull / d:\whereveriwantit" without it just saying skipping special file for everything. I'm assuming because it is not pulling as root. So I try "adb shell" then "su" and I get root privileges, but then I cant figure out how to copy everything to say /sdcard/temp/ for me to then copy to my laptop (my unix command knowledge is lacking). Any help would be appreciated.
[EDIT] After some more playing around. I guess I can pull some things using the adb pull / <dir> , but alot of files are skipped "skipping special file" or "permission denied". Would using the proper commands in the shell after switching to root user be a better way to get the files copied?

Categories

Resources