trying to adb push an xml file to g1 - G1 Q&A, Help & Troubleshooting

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

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.

Problem with Adb

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

[Q] Pushing Gapps To ginger bread.

I just got Chis's GB rom and as usual it is lacking Google apps, I understand that I must flash them or use adb push, but every time i try adb push it never works!!
I copy the apk files and paste it under androidsdk/tools
then i go to command: cd\androidSDK\tools\adb push androidmarket.apk /system/app/.
then when it should show the file size and download time, it just says directory not found, I've watched tons of tuts, but it does the same every time. What am I doing WRONG!?!
and i know i spelled gingerbread wrong, sorry!
try
cd {path to your android sdk tools} (just drag it to your terminal) enter
androidSDK/tools/ adb root enter
androidSDK/tools/ adb push {path to your .apk, again just drag} /system/app/ enter
it should push then, where did you download the latest gapps from?
I picked them up from the cyanogen guys, u cant flash them all as u normally would because you will get a boot loop.
gullygossner said:
cd {path to your android sdk tools} (just drag it to your terminal) enter
androidSDK/tools/ adb root enter
androidSDK/tools/ adb push {path to your .apk, again just drag} /system/app/ enter
it should push then, where did you download the latest gapps from?
Click to expand...
Click to collapse
I tried this method, but for some reason adb is acting up because almost everything i do it says "permission denied"
You need to mount the file system as rw first.
thanks to both of you guys, i successfully pushed the market on the nexus, however, IT KEEPS CRASHING!!!! It truly never ends! any ideas for this one?

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

Manually Push CWM to Zv8 With Cmd Prompt.

I realize that these threads are every where but re posting in hopes of helping someone out. Every bit of mt's AIO worked for me, but AIO 2 for Zv8 would not.
You could always do this manually using adb. Here's how.
Push CWM Recovery image to your phone manually once in rooted zv8.
1. Open the ZV8CWMRecovery folder on your PC.
2. Double click the 'Files' folder to go into that directory.
3. Highlight/select and copy the address of your current folder location on your PC. It will look something like this:
Code:
C:\Documents and Settings\username\My Documents\Downloads\ZV8CWMRecovery\Files
4. Click Start>Run>type 'cmd' and hit enter/return to open your command prompt.
5. Type 'cd', hit your spacebar, then paste your address which you copied in step 3 into your command prompt, hit enter/return.
6. You should now be positioned in the folder containing the adb and CWMRecovery files.
7. Type the following to copy the CWMRecovery image to your phone:
Code:
adb devices
adb remount
adb push cwmrecovery.img /data/local/tmp/cwmrecovery.img
adb shell dd if=/data/local/tmp/cwmrecovery.img of=/dev/block/mmcblk0p14 bs=4096
adb shell "rm /data/local/tmp/* 2>/dev/null"
adb shell rm /system/etc/install-recovery.sh
adb shell rm /system/recovery-from-boot.p
adb shell rm /data/local.prop
adb reboot
Phone should reboot. Try and boot into CWMRecovery after it reboots.
you can do that by typing: adb reboot recovery
all thanks go to brad 6360 for lending a hand and general lack of DoucheBaggery!
You're welcome. Glad I could help.
I'm stuck on adb remount cmd. Here's the output I get:
adb remount
remount failed: Operation not permitted
Any ideas? This is the same place I had issues running the AIO .bat file. Any help would be greatly appreciated!
JMink said:
I'm stuck on adb remount cmd. Here's the output I get:
adb remount
remount failed: Operation not permitted
Any ideas? This is the same place I had issues running the AIO .bat file. Any help would be greatly appreciated!
Click to expand...
Click to collapse
Make sure you have internet connection and usb debugging enabled.
JMink said:
I'm stuck on adb remount cmd. Here's the output I get:
adb remount
remount failed: Operation not permitted
Any ideas? This is the same place I had issues running the AIO .bat file. Any help would be greatly appreciated!
Click to expand...
Click to collapse
I was having the same problems. No matter what I tried, AIO, this method, etc, nothing worked when I was using my computer to get CWM back after ZV8. I found this thread that uses terminal emulator on the phone and it worked perfectly.
http://forum.xda-developers.com/showthread.php?t=1594885
I never could get cwm working but a friend recommended QuickBoot, gives you the boot into recovery mode. Works great.
Sent from my VS910 4G using xda premium
This is the same thing as terminal emulater on your phone
with this you can open a shell inside your phone running on your pc
Same commands
Thanks for the suggestions. I ended up getting it to work. I just skipped the adb remount cmd and started with pushing the img. Then I used the su cmd in shell to get a # prompt and ran the rest of the cmds as written including reboot recovery. CWM popped up on boot!
Sent from my Revo 4g using XDA Premium App
Hoping someone can help
Hey all. Last night I was helping a friend keep root through the V8 update. Everything went fine until I thought that I had manually pushed clockwork, but when I tried to reboot into recovery I got stuck on the LG logo forever. How I'm having trouble getting the phone to do anything. When in emergency mode it won't connect to the computer and it's not even my phone so I feel like a real #$%^^. Any advice would be appreciated.
Edit: http://forum.xda-developers.com/showthread.php?t=1564941 allow me to answer my own question

Categories

Resources