Push a folder via Adb? - Sprint HTC One (M7)

I need to push a folder via adb. I screwed up With a kern and need to push a recovery folder for TWRP. I cant figure out the command but im prtty sure it does not suport zips.
Help?

DragonMinerToons said:
I need to push a folder via adb. I screwed up With a kern and need to push a recovery folder for TWRP. I cant figure out the command but im prtty sure it does not suport zips.
Help?
Click to expand...
Click to collapse
Code:
adb push (folder in the same directory as adb.exe) (destination)
Pretty sure that should work. Also, I'm pretty sure you would've found the answer if you google'd around for a bit.

Related

can i...?

push a ROM onto my sdcard through adb?
my win xp is so old it wont read the root of my sdcard unless its only fat32...
so i was wondering if i could do it that way...
ive looked through threads but hadnt found a definite answer seeing as im new to all this
any help would be appreciated!
I am not sure you are understanding the process or I am not understanding the question.
But lets just roll with it...
You can do:
adb push c:\romNam.zip /sdcard
Click to expand...
Click to collapse
This will put the romName.zip file on the root of your sdcard (fat32 partition). From there you can reboot into recovery mode (turn off phone, then hold down the HOME button and then hit the POWER button). If you have the CM 1.4 recovery image installed then you can install any zip file and you would just point to the romName.zip file. If you have the CM 1.3 recovery image you should rename the romName.zip file to update.zip and then apply that update from the menu in CM 1.3.
If you do not have the CM recovery image installed, well, then you need to back and read some more.
i think you are on the right track for what im asking...
im using cm 1.4 recovery
lets say i dl drizzys 1.5.5
do i rename it update?update.zip?or leave it as is the way i downloaded it?
i tried putting it on my c drive and naming it update and it didnt work
or course i was using someone elses thread to go by so maybe i did it wrong
Do you have adb set up so it can connect to your phone?
If you have CM recovery 1.4 you do not have to rename it to update.zip but go ahead and do that for this test.
When you say
i tried putting it on my c drive and naming it update and it didnt work
Click to expand...
Click to collapse
what do you mean?
The renaming didn't work, or the adb push didn't work
renaming it update and trying to push it through adb didnt work...
im downloading another ROM and im gonna try again and see if it might work this time...
Right. But what I am asking is, what "didnt work." Was the file not there on the sdcard after you pushed? Did the CM recovery image fail to apply the update?
the file wasnt on the sd and cm didnt see it to install...
i may have named it wrong...or missed the space between zip and /
i will try again and see if thats what was wrong...
Okay.
When you set up adb did you follow this thread?
If you are not able to mount your sdcard in windows that may or may not be a showstopper. How do you have your sdcard formatted? All fat32 or did you split it up into fat32, ext3, linux-swap?
If you are going to adb push files to your sdcard you should NOT mount the sdcard.
yes...i followed that thread
and i repartitioned my 4gb sdcard as such:
fat32 0 1405
ext3 1405 1905
linux-swap 1905 2001
and i did not mount my phone...i at least saw not to do that in very bold letters so i took it to heart...lol!
Okay, cool.
What does the CM 1.4 tell you when you try to apply the update.zip?
After you adb push the file, go into the device via adb shell.
CD to the /sdcard and do an "ls" and tell me what you see.
If you do not see anything but the adb push returned no errors, your sdcard may be fubar (don't freak yet, there are fixes for it and we will get there if we need to).
If you do see the zip file then reboot into recovery again. But this time do not try to apply an update, instead drop to a console and CD into the /sdcard again and do another "ls" and let me know what you see.
i just tried doing this:
cd c:\android-sdk-windows-1.6_r1\tools>adb shell
/ # adb push c:\KiNgxKxROM_Beta1_RedRosieThemev1_signed.zip /sdcard
/sbin/sh: adb: not found
then i tried:
/ # adb push c:\KiNgxKxROM_Beta1_RedRosieThemev1_signed /sdcard
/sbin/sh: adb: not found
then:
/ # adb push c:\update /sdcard
/sbin/sh: adb: not found
nothing
and where do i look in the forums...or how exactly do i cd to the sdcard?
aha!
I see the issue.
You do not need to adb shell then do adb push
it shoul be like:
C:c:\android-sdk-windows-1.6_r1\tools> adb push c:\KiNgxKxROM_Beta1_RedRosieThemev1_signed.zip /sdcard
Click to expand...
Click to collapse
adb push is done from your local dos window not from within the adb shell.
Try that out and let me know.
wow!
that did it! thank you sooooo much!
thats just one more step i can eliminate now!
no Problem. Welcome to the world of roms.
care to walk me through how to use switchrom? lol!
all these hero builds seem to crash on me after awhile and i kinda wanna have several to switch to if/when they fail...

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

adb commands nexus one-read only error

I have been trying for some time now,pushing files via adb commands onto nexus one but keep getting cannot copy file read only file error.I am fully rooted and unlocked.I have also reinstalled the android sdk but always get the same error when I push the image file.has anyone experienced this with their phone. I have a feeling its something to do with the SD card but can't be sure.any help would be appreciated. Thanks.
I know you must be thinking "Jedi"how can he can he call himself an androidjedi when he can't sort this simple problem (to some of you),but I must say even a Jedi needs to learn!
try adb remount before your command
Dunno if this will help but have tried changing the system to rw then try to push
Tried that no cigar
are you trying to push it into your sdcard or the phone system??
and remember the whole folder name has to be in the push so it woul have to look like
C:\Users\Android>ad push "C:\Users\Android\Downloads\Android\Nexus 1\Phone.apk" /sdcard/files
has to have full path of where you are pushing it from/too.. i have mine sdk setup to use adb in any directory as well why you dont see it in the sdk directory
@ilostchild
Thanks i will try that later today and let you know
As for pushing the file - i am trying to push it to the sd card - but i am not really sure as i am following instructions in the [HOW-TO] Revert HBOOT 0.35.0017 to 0.33.0012 thread in the forum
as i need to downgrade my Hboot from #17 to 12
are the commands different for pushing a file to the phone?
the more i think about i think i need to flash the file to the phone - but i will try your adb command format of specifying the location of the file in the comp
androidjedi said:
the more i think about i think i need to flash the file to the phone - but i will try your adb command format of specifying the location of the file in the comp
Click to expand...
Click to collapse
Ooo you want to push to sdcard.. ok then yea, you would type it like this
C:\android-sdk-windows\tools> adb push C:\Users\Android\Downloads\Android\signed-passion-FRF50-from-
ERE27.1e519a24.zip /sdcard*
if you dont have the option to use adb in any directory, then you have to be in the android sdk directory and in tools
cd android-sd-windows
cd tools
adb push(drag the file you want to push in the command prompt window) /sdcard*
sorry i know its detailed and im sure you know all these things.. but it kinda gets the questions out of the way for future problems to come
ilostchild said:
Ooo you want to push to sdcard.. ok then yea, you would type it like this
C:\android-sdk-windows\tools> adb push C:\Users\Android\Downloads\Android\signed-passion-FRF50-from-
ERE27.1e519a24.zip /sdcard*
if you dont have the option to use adb in any directory, then you have to be in the android sdk directory and in tools
cd android-sd-windows
cd tools
adb push(drag the file you want to push in the command prompt window) /sdcard*
sorry i know its detailed and im sure you know all these things.. but it kinda gets the questions out of the way for future problems to come
Click to expand...
Click to collapse
thanks for spending time on this-i am new to the android world so any help is welcome-however detailed or not
thanks will try that
ilostchild said:
Dunno if this will help but have tried changing the system to rw then try to push
Click to expand...
Click to collapse
how do i change the system to read write as i am still getting cannot copy file read only file error
androidjedi said:
how do i change the system to read write as i am still getting cannot copy file read only file error
Click to expand...
Click to collapse
do adb shell
su
Mount -o remount,rw /dev/block/mtdblock3 /system
then exit and exit
then do push
ilostchild said:
do adb shell
su
Mount -o remount,rw /dev/block/mtdblock3 /system
then exit and exit
then do push
Click to expand...
Click to collapse
tried that did the push and all i got was 950 KB/s <0 bytes in 76044.000s>
looks like its not pushing the file not sure what to do now
androidjedi said:
tried that did the push and all i got was 950 KB/s <0 bytes in 76044.000s>
looks like its not pushing the file not sure what to do now
Click to expand...
Click to collapse
Umm if you got that mesage you may have pushed it in right..
ilostchild said:
Umm if you got that mesage you may have pushed it in right..
Click to expand...
Click to collapse
does not seem to have worked for some reason as after flashing it should reboot in htc mode and then i would be able to flash a rom with the hboot12
May i ask what are you trying to push into your phone/sdcard?
ilostchild said:
May i ask what are you trying to push into your phone/sdcard?
Click to expand...
Click to collapse
I am trying to follow the instructions on the thread which can be found in the the following link forum.xda-developers.com/showthread.php?t=726258
basically trying to flash two image files that enable downgrading the Hboot from 0.35.0017 to 0.33.0012
androidjedi said:
I am trying to follow the instructions on the thread which can be found in the the following link forum.xda-developers.com/showthread.php?t=726258
basically trying to flash two image files that enable downgrading the Hboot from 0.35.0017 to 0.33.0012
Click to expand...
Click to collapse
managed to do it after just following the instructions and inoring what i thought was an error i managed to downgrade my happy days have a good weekend
will no doubt ask you for help another time cheers and thanks a lot
Welcome and congratz
Sent from my Nexus One using XDA App

[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?

[Q] Can't mount in recovery phone in bootloop

I tried to load the advanced menu mod and the phone wont go past the startup screen. I can get into TWRP but I don't know how to get a rom to the SD card when it wont mount. Funny, I've been doing the ROM thing for 4 years now and have never used ABD so I don't know how that works or if that's what I need........can someone please point me in the right direction for getting a ROM on my phone so I can flash in TWRP?
digthemlows said:
I tried to load the advanced menu mod and the phone wont go past the startup screen. I can get into TWRP but I don't know how to get a rom to the SD card when it wont mount. Funny, I've been doing the ROM thing for 4 years now and have never used ABD so I don't know how that works or if that's what I need........can someone please point me in the right direction for getting a ROM on my phone so I can flash in TWRP?
Click to expand...
Click to collapse
How did you unlock bootloader and flash recovery?
Sent from my HTC One using xda premium
redbull123 said:
How did you unlock bootloader
and flash recovery? All-In-One Toolkit?
Sent from my HTC One using xda premium
Click to expand...
Click to collapse
Bootloader was unlocked long ago via HTC Dev. All-in-one wasn't out when I got the phone ...... I just downloaded that, but when I try to ABD sideload it opens up a CMD prompt that says C:\Users\myname\desktop\HTC is not recognized as an internal or external command, operable program or batch file.
Also when I enable ABD sideload in TWRP on my phone it hangs at "Starting ABD sideload feature..." and never does anything.
Try push instead of sideload
ArmedandDangerous said:
Try push instead of sideload
Click to expand...
Click to collapse
Sorry, I don't know how to Push, can someone give me quick instructions?? or point me in the right direction........XDA has become so huge it's actually a mess to search..........I appologize in advance.
Type "adb push ROM.zip /sdcard/ROM.zip" replacing ROM with the EXACT name of the ROM file and including the .zip piece on both ends.
digthemlows said:
Bootloader was unlocked long ago via HTC Dev. All-in-one wasn't out when I got the phone ...... I just downloaded that, but when I try to ABD sideload it opens up a CMD prompt that says C:\Users\myname\desktop\HTC is not recognized as an internal or external command, operable program or batch file.
Also when I enable ABD sideload in TWRP on my phone it hangs at "Starting ABD sideload feature..." and never does anything.
Click to expand...
Click to collapse
Download these files: http://d-h.st/RvD - call the unzipped folder with the four files 'android' or something and put it somewhere, either directly on your c:\ drive or on your desktop
Download a rom and put it in the folder along with those files you download
Select 'install zip from sideload' in recovery on your phone
Hold Shift and right-click on the folder and select 'Open Command Window Here'
Command:
adb sideload name_of_rom.zip
once it reaches 100% it should begin to install on your phone automatically.
Or you could
adb push name_of_rom.zip /sdcard/
this will put the rom on your sdcard and you will need to flash it normally. (you don't select 'install zip from sideload' for this)
redbull123 said:
Download these files: http://d-h.st/RvD - call the unzipped folder with the four files 'android' or something and put it somewhere, either directly on your c:\ drive or on your desktop
Download a rom and put it in the folder along with those files you download
Select 'install zip from sideload' in recovery on your phone
Hold Shift and right-click on the folder and select 'Open Command Window Here'
Command:
adb sideload name_of_rom.zip
once it reaches 100% it should begin to install on your phone automatically.
Or you could
adb push name_of_rom.zip /sdcard/
this will put the rom on your sdcard and you will need to flash it normally. (you don't select 'install zip from sideload' for this)
Click to expand...
Click to collapse
'abd' is not recognized as and internal or external command, operable program or batch file is the error I'm getting.............
digthemlows said:
'abd' is not recognized as and internal or external command, operable program or batch file is the error I'm getting.............
Click to expand...
Click to collapse
its adb, not abd - stands for Android Debug Bridge
---------- Post added at 05:09 PM ---------- Previous post was at 05:04 PM ----------
You should read this: http://www.androidcentral.com/android-201-10-basic-terminal-commands-you-should-know
Helped me out a lot with ADB, easy to understand...
redbull123 said:
its adb, not abd - stands for Android Debug Bridge
---------- Post added at 05:09 PM ---------- Previous post was at 05:04 PM ----------
You should read this: http://www.androidcentral.com/android-201-10-basic-terminal-commands-you-should-know
Helped me out a lot with ADB, easy to understand...
Click to expand...
Click to collapse
Man, I'm being such a noob. Ok, so when I run c:\fastboot>adb push name_of_rom.zip/sdcard/ it displays a menu of all the adb commands but does nothing.........
digthemlows said:
Man, I'm being such a noob. Ok, so when I run c:\fastboot>adb push name_of_rom.zip/sdcard/ it displays a menu of all the adb commands but does nothing.........
Click to expand...
Click to collapse
tried "adb remount" and get "error: device not found
I don't think my computer is seeing the device, gonna log in with admin rights and see what's up
digthemlows said:
Man, I'm being such a noob. Ok, so when I run c:\fastboot>adb push name_of_rom.zip/sdcard/ it displays a menu of all the adb commands but does nothing.........
Click to expand...
Click to collapse
Did you type 'name_of rom.zip'? Or did you replace it with the actual name of the ROM?
Edit: Sorry, you need to put a space before /sdcard/
redbull123 said:
Did you type 'name_of rom.zip'? Or did you replace it with the actual name of the ROM?
Click to expand...
Click to collapse
I typed the name of the rom......I'm going to update the drivers, because I'm seeing an error in device manager for the "android driver" .......
digthemlows said:
Man, I'm being such a noob. Ok, so when I run c:\fastboot>adb push name_of_rom.zip/sdcard/ it displays a menu of all the adb commands but does nothing.........
Click to expand...
Click to collapse
Ok let's make this easier. Go to where your ADB/fastboot files are, shift right click on empty space and select Open Command Window Here. Then type push name_of_rom.zip/sdcard/
name_of_rom.zip should be changed to whatever file name your ROM is that you want to install. If sdcard doesn't work, try /data/media
ArmedandDangerous said:
Then type push name_of_rom.zip/sdcard/
name_of_rom.zip should be changed to whatever file name your ROM is that you want to install. If sdcard doesn't work, try /data/media
Click to expand...
Click to collapse
adb push name_of_rom.zip /sdcard/
ArmedandDangerous said:
Ok let's make this easier. Go to where your ADB/fastboot files are, shift right click on empty space and select Open Command Window Here. Then type push name_of_rom.zip/sdcard/
name_of_rom.zip should be changed to whatever file name your ROM is that you want to install. If sdcard doesn't work, try /data/media
Click to expand...
Click to collapse
either of these get me the ADB menu as well, If I put as space after the rom name i get "error, closed"
yeah, I have tried everything I think. Any other ideas?
digthemlows said:
yeah, I have tried everything I think. Any other ideas?
Click to expand...
Click to collapse
Are you right clicking on the folder and open command window here?
Reboot your computer...
Shift+right-click, Open command window from folder
Go into fastboot in your bootloader and type
fastboot devices
If your device appears then go into recovery and type
adb devices
If your devices doesn't appear then there's something wrong with your drivers/adb files or folder
If it's found then just do a push or sideload...
The only thing I can think if it doesn't work is buy a usb otg cable and put the ROM onto a usb and flash it through TWRP that way.
Sent from my HTC One using xda premium
Ok, abd devices showed my device and "recovery" Went in and renamed the folder with adb and my ROM in it, double checked everything and was able to load the rom.......also I wasn't putting space after the rom name and between /sdcard/ ......
digthemlows said:
Ok, abd devices showed my device and "recovery" Went in and renamed the folder with adb and my ROM in it, double checked everything and was able to load the rom.......also I wasn't putting space after the rom name and between /sdcard/ ......
Click to expand...
Click to collapse
So... Everything's ok?
Sent from my HTC One using xda premium

Categories

Resources