Problem with Adb - G1 Q&A, Help & Troubleshooting

Ok i can get to the shell perfectly fine but every time i try to do adb push it can never find the file (and yes its in the right directory). Even if i type adb push by itself, it jus pops up all the adb shell commands. Can some one please help me out here. I tired looking everywhere for a solution but no luck

you are doing it in the correct format right
adb push [dir on computer (no spaces can be used)] [dir on phone (no spaces can be used)]
if you are on windows put the file directly in your C:\ drive and do
adb push C:\filename [dir on phone i.e /sdcard (again with no spaces)]
the help scrolls down because the command is not being typed in a way that adb is supposed to type it as being recognized.

ah yes that did help alot thanks

Related

ADP pull/push ISSUES

ok so I got adb working fine .. but apparently I have NO idea on how to properly pull and anything from the phone or push to the phone what I saw was something about adb pull system/sd/app app and then I have seen adb pull system/sd/app/app which BOTH give me the adb: not found
then I have created a folder named android on my C:
then I tried the cd C:\android adb pull /system/sd/app/app and that gives me a bad substitution
I have also tried the adb pull system/sd/app/app cd C:\android .. this also gives me that bad substitution error
so what I NEED is SOMEONE to give me SPECIFIC examples of this
so i am asking for 2 exapmles
one to pull the calcultor from the phone to the comp
second is to pull an installed app like chompsms from the phone to the comp
I am doing all of this from the #
I have searched google and cannot find ANYTTING on this
I have searched here and found nothing
I have read the adb for dummies and the adb useful commands
any help on this would be great
also I have done the cd data then cd app and then when I get to the cd ls is says cannot cd into ls
But when I just ls I get the apps list
I am using vista 64 too
BTW I am using the 1.5MOD from lucid and I do have my apps to the sd card by using his lucid script
Strapt said:
BOTH give me the adb: not found
Click to expand...
Click to collapse
Put the path to your folder with adb in it in your system path directory. Instructions from the android dev site:
Optionally, you may want to add the location of the SDK's primary tools directory to your system PATH. The primary tools/ directory is located at the root of the SDK folder. Adding tools to your path lets you run Android Debug Bridge (adb) and the other command line tools without needing to supply the full path to the tools directory.
On Linux, edit your ~/.bash_profile or ~/.bashrc file. Look for a line that sets the PATH environment variable and add the full path to the tools/ directory to it. If you don't see a line setting the path, you can add one:
export PATH=${PATH}:<your_sdk_dir>/tools
On a Mac, look in your home directory for .bash_profile and proceed as for Linux. You can create the .bash_profile if you haven't already set one up on your machine.
On Windows, right-click on My Computer, and select Properties. Under the Advanced tab, hit the Environment Variables button, and in the dialog that comes up, double-click on Path (under System Variables). Add the full path to the tools/ directory to the path.
Click to expand...
Click to collapse
then I have created a folder named android on my C:
then I tried the cd C:\android adb pull /system/sd/app/app and that gives me a bad substitution
Click to expand...
Click to collapse
Adb push/pull requires two arguments, the source and the destination. E.g. on windows:
adb push \completely_legit_apps\gamelofd-monopolizing.apk /data/app/mono.apk
-or-
adb pull /system/app/Mail.apk \roflmao_i_ripped_exchangemail.apk
Notice that on the Android side, the path delimiter is the forward slash (/), whereas on the Windows side it's backslash (\).
Edit: also, on windows if you don't specify an absolute path, it is taken as being relative to your usr directory:
adb push \app.apk <-- pushes c:\Documents and Settings\username\app.apk, NOT c:\app.apk
^above^
But this is also in the wrong forum! This belongs to Q&A.
jashsu said:
Put the path to your folder with adb in it in your system path directory. Instructions from the android dev site:
Adb push/pull requires two arguments, the source and the destination. E.g. on windows:
adb push \completely_legit_apps\gamelofd-monopolizing.apk /data/app/mono.apk
-or-
adb pull /system/app/Mail.apk \roflmao_i_ripped_exchangemail.apk
Notice that on the Android side, the path delimiter is the forward slash (/), whereas on the Windows side it's backslash (\).
Edit: also, on windows if you don't specify an absolute path, it is taken as being relative to your usr directory:
adb push \app.apk <-- pushes c:\Documents and Settings\username\app.apk, NOT c:\app.apk
Click to expand...
Click to collapse
ok so I am trying to pull the Mms.apk to the comp into my C: documents
So I got
# adb pull /system/app/Mms.apk ... then what exactly would I need to finish the rest? how would that look whole?
My Mms.apk is in system/app in my phone and I do have apps to sd if that makes a diff
also .. if I pull this does that completely remove it from the phone? assuming it would
I keep getting adb not found But I can type lucid and it shows the lucid comands and reboot and it reboots ... so i am connected ...
Strapt said:
ok so I am trying to pull the Mms.apk to the comp into my C: documents
So I got
# adb pull /system/app/Mms.apk ... then what exactly would I need to finish the rest? how would that look whole?
My Mms.apk is in system/app in my phone and I do have apps to sd if that makes a diff
also .. if I pull this does that completely remove it from the phone? assuming it would
I keep getting adb not found But I can type lucid and it shows the lucid comands and reboot and it reboots ... so i am connected ...
Click to expand...
Click to collapse
adb pull /system/app/Mms.apk temp/
Of course, you can substitute temp with any folder you want (by default, you will save it under the folder that adb is located in,
so the command above would push the file to /adb directory/temp
Like that.
Its might be saying that its not there, because its not there, with apps2sd it should be located under /system/sd/app_s/Mms.apk (but of course this differs from build to build)
and no, I don't think it will remove it, it should still be there, to remove it you have to type:
adb shell rm /system/sd/app_s/Mms.apk
h.nocturna said:
adb pull /system/app/Mms.apk temp/
Like that.
Its might be saying that its not there, because its not there, with apps2sd it should be located under /system/sd/app_s/Mms.apk (but of course this differs from build to build)
and no, I don't think it will remove it, it should still be there, to remove it you have to type:
adb shell rm /system/sd/app_s/Mms.apk
Click to expand...
Click to collapse
ok so I tried both the
/system/app/Mms.apk temp/
and the adb pull /system/sd/app_s/Mms.apk temp/
BOTH I get adb not found
Do i need to add something like cd C:\Documents adb pull /system/app/Mms.apk ??? (which If I do that I get a bad substitution error or a directory not found .. which it is in there)
when I go thru astro the path is system/app then I see all the stock apps and the odex files
EDIT: some I have seen have been adb pull /system/app/Mms.apk/Mms.apk OR adb pull /system/app/Mms.apk Mms.apk .. those I still get adb not found
EDIT EDIT: hell even adb remount gets me adb not found ... and the cd ls gets me cant cd into ls
EDIT EDIT EDIT: ok so i tried to change the dir to where the file goes. So I created a Documents folder in root of my C drive. Then I used the adb pull /system/app/Mms.apk Documents\ and I got a > and nothing is in my folder I changed the direction of the last \ after Documents
I got it!!! this worked!!!
adb pull /system/app/Mms.apk \Documents WORKS!!! NOT FROM THE#!!!
Strapt said:
I got it!!! this worked!!!
adb pull /system/app/Mms.apk \Documents WORKS!!! NOT FROM THE#!!!
Click to expand...
Click to collapse
I think you should learn more about command prompts and linux shell commands
other than that, good for you.
glad it worked for you. If i wasn't clear, I meant that you should've cd to the location of adb on your computer through command prompt, then from there run the commands that I outlined above.
h.nocturna said:
glad it worked for you. If i wasn't clear, I meant that you should've cd to the location of adb on your computer through command prompt, then from there run the commands that I outlined above.
Click to expand...
Click to collapse
ok so like what ya mean?
from the
C:\Users\Owner
I do then "cd C:\android-sdk-windows-1.5_r2\tools"
and that takes me to the plain C:\android-sdk-windows-1.5_r2\tools
so from here what would you type in to cd and cd into what?
apparently the problem what that I typed adb shell and then was doing everything from the comand prompt and that didnt work.
ok so I think I figured out what you mean.
I did type the cd C:\Documents then I get the C:\Documents> and from there I can run just the adb pull /system/app/Mms.apk Mms.apk
now that I have that working I have to try the push now
so with the same example above I would:
again cd C:\Documents
then
adb push Mms.apk /system/app/
is that right or should that be different?
ok so here is a question
I did mange to find where my downloaded apps are going by mounting the volumes onto ubuntu. which is /media/disk-1/app and this is in my ext2 partition
but I cant seem to be able cd to the /media/disk-1/app everytime it says cant cd to /media/disk-1/app
trying to do two things
one is trying to cd into that path so I can ls
and also trying to see how I would be able to pull apps that I have downloaded
I have kinda figured out the other pull but now would like to know why this isnt working.
Strapt said:
ok so I think I figured out what you mean.
I did type the cd C:\Documents then I get the C:\Documents> and from there I can run just the adb pull /system/app/Mms.apk Mms.apk
now that I have that working I have to try the push now
so with the same example above I would:
again cd C:\Documents
then
adb push Mms.apk /system/app/
is that right or should that be different?
Click to expand...
Click to collapse
adb should only work from whatever location you put the adb.exe, so for instance, I'm assuming that you put adb in c:\Documents. Then you would type cd c:\documents and run your adb commands there, and adb will treat c:\Documents as your root folder (which is why everything transfers to c:\Documents by default for you). Therefore, the push commands will also treat c:\Documents as your root folder, so you can only push whatever is in c:\Documents. So transfer whatever file you want to be pushed to c:\Documents and then adb push file within c:\Documents /wherever you want it on the phone
h.nocturna said:
adb should only work from whatever location you put the adb.exe, so for instance, I'm assuming that you put adb in c:\Documents. Then you would type cd c:\documents and run your adb commands there, and adb will treat c:\Documents as your root folder (which is why everything transfers to c:\Documents by default for you). Therefore, the push commands will also treat c:\Documents as your root folder, so you can only push whatever is in c:\Documents. So transfer whatever file you want to be pushed to c:\Documents and then adb push file within c:\Documents /wherever you want it on the phone
Click to expand...
Click to collapse
well actually I made the Documents folder and its completely empty
the actual adb.exe is in the C:\android-sdk-windows-1.5_r2\tools\adb.exe
I think that I have copied and pasted that and some win something .dll into system32 folder. not sure if that makes a difference or not.
from my understanding I can now change it to whatever folder I want to move the files to on my comp just by typing the location and folder name and not just to the Documents folder.
also when I am at the C:\android-sdk-windows-1.5_r2 in cmd what is that line called or the commands that you do from that line called? and the pull push has to be from this line right?
Im guessing that the adb shell is the linux shell commands which is the # right?
also I would to really like to say thank you for your continued help on this!!
Its no problem, placing it in system32, allows you to use adb.exe straight from the console so its alright. But instead of cd(ing?) to whatever location the adb.exe is located, just cd to wherever you want to pull the files or wherever the files you want to push are and then just run the commands outlined above for pushing/pulling files.
the # denotes that you have entered the phone's terminal with root permissions. Yes, it is linux.
Yes the commands must be typed from the command prompt so:
C:\Documents>adb pull /system/sd/app_s/Mms.apk C:\Documents
or wherever you want, just replace C:\Documents with whatever you want.

trying to adb push an xml file to g1

hi, i'm running cm5 test 4 on my g1 and for the most part it's been great...except for the slow market...so i did my research and found that there's an xml file that you can push to fix this issue-http://www.google.com/support/forum/p/Android+Market/thread?tid=1ea082d443f3d16c&hl=en...so i copied the file, named it "marketfix" and stuck it in C:...tried to adb push it like this - adb push C:\marketfix.rtf /data/data/com.android.vending/shared_prefs/vending_preferences.xml - but after that i get an "adb: not found"...what did i do wrong? any help would be appreciated...thanks in advance!
naars90 said:
hi, i'm running cm5 test 4 on my g1 and for the most part it's been great...except for the slow market...so i did my research and found that there's an xml file that you can push to fix this issue-http://www.google.com/support/forum/p/Android+Market/thread?tid=1ea082d443f3d16c&hl=en...so i copied the file, named it "marketfix" and stuck it in C:...tried to adb push it like this - adb push C:\marketfix.rtf /data/data/com.android.vending/shared_prefs/vending_preferences.xml - but after that i get an "adb: not found"...what did i do wrong? any help would be appreciated...thanks in advance!
Click to expand...
Click to collapse
Either you don't have adb installed, you didn't set it up correctly, or you aren't in the directory where adb is installed.
Solutions are: Setup adb, set it up correctly, or change your directory in your cmd prompt to the directory where the adb.exe file is located.
Additionally, make sure you aren't entering the command superfluously like:
Code:
adb shell
adb push blah blah blah
You can't push files from within adb so once you open you cmd prompt and navigate to the correct directory do adb push directly from there, don't try and go into the shell and then execute adb push like I outlined above

[Q] Please help me use adb to root JI6 on a mac!!

I have been trying to make this whole adb think work for about twenty hours strait and I still have not gotten very far. I own a mac and no pc and updated to froyo with my buddies pc. I have followed all the directions to a T over and over using terminal on the mac and I can get to the ADB commands and even to where I can see my phone by clicking devices but I must be missing something important. ANY HELP WOULD BE REALLY APPRECIATED I AM ABOUT TO PULL MY FREAKING HAIR OUT!!!
Ok, so if you can see your phone through adb, then you are definitely on the right track. Unfortunately, I'm not really familiar with OS X anymore so I'm not quite sure how to do it. Just sit tight for now until someone who does use a Mac, or has more of a clue then I do can help you out.
But seriously, don't pull your hair out. It won't stay on your head forever ya know...
Edit: oops, just saw this is JI6 (Froyo) not JF6, so I can't help you, but here is a general overview:
from terminal inside Android sdk main directory:
tools/adb devices -> list all devices connected that ADB can see
tools/adb shell -> gets a normal user shell on your phone
tools/adb reboot recovery -> reboots into recovery mode, suitable for update.zip root method
--------------------------------
Place the root update.zip on internal sdcard.
from terminal inside Android sdk directory:
tools/adb reboot recovery
Select the update software option, and you will be done.
laxwillsch said:
I have been trying to make this whole adb think work for about twenty hours strait and I still have not gotten very far. I own a mac and no pc and updated to froyo with my buddies pc. I have followed all the directions to a T over and over using terminal on the mac and I can get to the ADB commands and even to where I can see my phone by clicking devices but I must be missing something important. ANY HELP WOULD BE REALLY APPRECIATED I AM ABOUT TO PULL MY FREAKING HAIR OUT!!!
Click to expand...
Click to collapse
Start simple:
If you open a terminal on the mac, and go to your android SDK tools folder; what happens when you type ADB shell?
Or if you type any of the ADB push commands?
You need to give more detail around what you are seeing for us to help you.
Ok so if I am in terminal and i type in my /android-sdk-mac_x86/tools nothing happens and it just says /android-sdk-mac_x86/tools is a directory. But if I type the same but with /tools/abd it opens the abd command lines, like how to write code. Then when I try to "adb push rageagainstthecage-arm5.bin /data/local/tmp/rageagainstthecage-arm5.bin"
it says "-bash: adb: command not found"
however when I type laxwillsch$ /android-sdk-mac_x86/tools/adb shell
it does give me the drop down $
but when I then try to write the next line of code "chmod 0755 rageagainstthecage-arm5.bin"
it says "chmod: rageagainstthecage-arm5.bin: No such file or directory"
I am stumped I am beginning to think i need to buy a pc as I am very interested in android development and want to learn more, but it seems all the tutorials are run assuming you are on a PC
EDIT** I have downloaded the android SDK started pack, and the 2.2 root pack and they are all in my /android-sdk-mac_x86/tools folder that is directly on my Macintosh HD for simplicity
Do you know how to change directories (cd command)?
The problem is that you are trying to work in one directory, but all your tools are in another.
So change directories to the tools directory:
cd /android-sdk-mac_x86/tools/
now run your adb commands - you may have to type ./adb to tell your mac to look in the current directory for the adb command (that is what ./ means "start here")
Also, try to understand what is happening so you can more easily troubleshoot: chmod is a command to change permissions, and you are running it on the phone. If you can't push the file to the phone, then you can change it's permisssions. I guess you never got rageagainstthecage on the phone, so there is no way to chmod it.
If you can't do this on a mac, a PC is not easier. I use both, and like both, but you need to learn basic commands first - they apply to the mac terminal and the windows cmd prompt.
Getting root means moving in and out of the phone - adb shell - puts you in a terminal on the phone. So you really need to understand cd (change directory); pwd (present working directory - shows you where you are); cp (copy); and know your current path - what the ./ does.
I hope this helps, not trying to sound condescending - maybe practice a linux terminal tutorial would help
Thanks so much, I am at school right now and cant test out all that but you are really helping me understand all this! I will post tonight and let you know how it goes. again thank you
ok so i dont have my usb cable with me but I was playing around with the commands that you suggested and ureka! i finally got to a point where it says "h70-33-65-19:tools laxwillsch$" thats a first! and when i type pwd it shows "/android-sdk-mac_x86/tools" so that means I am working out of the right directory right? and from here I enable usb debugging connect my phone then just copy and paste the codes from the thread correct?
yes, it sounds like you are on the right track. But take it nice and slow when you follow the steps. It is very important that the commands are entered exactly as you see them.
Also, one step tells you to wait for something to run and kick you out of ADB - wait just like it says - takes about 45 seconds but feels like forever.
If you are in the tools directory - just by typing "adb" no quotes will give you whole page of adb commands - if you get a "command not found", then you need to add the ./ and make it ./adb
Hope this helps and again, read the commands step by step a couple times first so you understand what is happening.
In a nutsell, you push the rage file;
change its permissions, run it;
get kicked out of ADB and then open a new ADB shell;
you are now root;
remount the system partition to give you write access when it reboots;
reboot;
push over some files;
change permissions on files you pushed;
reboot;
Some things to know - SU is a command for gaining root access; when you use SU your prompt changes (in adb shell) from $ to #
If you are succesful you should see the SuperUser app listed in your apps.
Done and Done just rooted successfully couldnt have done it without you! thanks so much

unable to push files through adb

Hey, I'm pretty good with ADB but I cant seem to push files to my streak 7. I tried adb remount and I get a remount failed operation not allowed error. I am rooted. I can see the device in adb, I can pull files just fine but I cant push them.. I also tried using the shell command to remount but that didnt work
Anyone have any ideas?
This is what I did for my G1 adb pushes and pull, You can see if anything here helps ya.
http://forum.xda-developers.com/showpost.php?p=5049397&postcount=5194

ADB Shell not working, but my N1 isn't bricked

I wanted to use USB Tunnel to share my PC's internet connection with the phone, but I got the error:
Code:
- exec '/system/bin/sh' failed: No such file or directory (2) -
I tried to install other APK's through ADB and they also failed, so I googled this error and I saw that the main issue is a failing ADB Shell. I tried to open Shell and I got the same error. The difference between me and the other users is that my phone is booting as usual, USB Mass Storage works, the phone is detected by fastboot- and adb devices commands and everything is working as intended, except for installing APKs through ADB/opening Shell.
Here is my phone's current config:
MeDroidMod 1.4.4 w/ HWA
Latest Tiamat kernel
TexasICE HBOOT w/ 210/8/218 partition layout
4GB microSD card...I don't know the filesystem but it's definitely NOT ext4, so there's not A2SD for me (I think it's FAT or FAT32)
ClockWorkMod Recovery
gnexus47 said:
I wanted to use USB Tunnel to share my PC's internet connection with the phone, but I got the error:
Code:
- exec '/system/bin/sh' failed: No such file or directory (2) -
I tried to install other APK's through ADB and they also failed, so I googled this error and I saw that the main issue is a failing ADB Shell. I tried to open Shell and I got the same error. The difference between me and the other users is that my phone is booting as usual, USB Mass Storage works, the phone is detected by fastboot- and adb devices commands and everything is working as intended, except for installing APKs through ADB/opening Shell.
Here is my phone's current config:
MeDroidMod 1.4.4 w/ HWA
Latest Tiamat kernel
TexasICE HBOOT w/ 210/8/218 partition layout
4GB microSD card...I don't know the filesystem but it's definitely NOT ext4, so there's not A2SD for me (I think it's FAT or FAT32)
ClockWorkMod Recovery
Click to expand...
Click to collapse
Which adb commands did you use? Can you list the commands here that you had used? It could be that you didn't issue su command to get superuser rights?
you don't need to be in Shell to push apk
put the apk on your C: drive
open command window and navigate to the folder you have adb/fastboot in--normally tools of your sdk
then:
type adb devices--then
1. adb remount
2. adb push C:/CalendarGoogle.apk /system/app/CalendarGoogle.apk
3. adb push C:/CalendarProvider.apk /system/app/CalendarProvider.apk
4. adb shell
7. chmod 777 system/app/CalendarGoogle.apk
11. chmod 777 system/app/CalendarProvider.apk
12. exit
13. Reboot
use the apk name of whatever you are flashing in place of mine and your chmod may not be exactly like mine--
ADB Shell
rugmankc said:
you don't need to be in Shell to push apk
put the apk on your C: drive
open command window and navigate to the folder you have adb/fastboot in--normally tools of your sdk
then:
type adb devices--then
1. adb remount
2. adb push C:/CalendarGoogle.apk /system/app/CalendarGoogle.apk
3. adb push C:/CalendarProvider.apk /system/app/CalendarProvider.apk
4. adb shell
7. chmod 777 system/app/CalendarGoogle.apk
11. chmod 777 system/app/CalendarProvider.apk
12. exit
13. Reboot
use the apk name of whatever you are flashing in place of mine and your chmod may not be exactly like mine--
Click to expand...
Click to collapse
I don't use ADB Shell to push APK's. That's just another thing which doesn't work.
@taodan: I only use: adb install xxxxx.apk.
A work around is to mount the sdcard and drag and drop the apks to the sdcard. Then install using your favorite file manager.
evilkorn said:
A work around is to mount the sdcard and drag and drop the apks to the sdcard. Then install using your favorite file manager.
Click to expand...
Click to collapse
that will work too, i've used root explorer to copy paste from sdcard to correct file location. prefer adb. set your permissions after
did you try adb remount first, not sure if that would help
what i was saying is you don't need to type adb shell. assuming you are doing this from a pc command terminal window.
you can use the commands I gave above to push apk. i think when you push it copies apk to phone leaving apk on pc also. install actually moves it to phone--as i understand it
here is some links and info that might help.*
http://www.talkandroid.com/guides/beginner/install-apk-files-on-android/#.T2-cdaJST3U
http://www.brighthub.com/mobile/google-android/articles/37151.aspx
also, have you ever had luck installing/pushing apk's. you may not have the correct environmental path on pc or are typing incorrect path in your command line
you can google environmental path editing for android and get examples of how to do it--i am not even sure mine is set right since I still have to type the full path in command window to use adb
sorry if this is old news just trying to find your problem

Categories

Resources