[GUIDE] ADB For Beginners (Setup, Use, and More!) - Nexus One Q&A, Help & Troubleshooting

Hello All!
After much frustration with setting up ADB i finally got it working. Everyone said its simple and takes minimal knowledge but when things dont work, nothing really worked. Anyways after 2 hours of research trying to get ADB to work i finally got it all working and wanted to share my knowledge to anyone else that needed help.
This Guide is for windows only. If you are using Mac OS X please go here: ADB For Dummies
If you are using Linux please go here: [HOW-TO]Set up Android SDK/ADB/Fastboot on Ubuntu Linux
Like My Guide(s)? Donate
--------------------------------------------------------------------------
Things you need:
Android SDK - Download
Winrar - Download (32bit) Download (64bit)
Windows PC
USB Cable
A Rooted HTC Dream (Google G1)
--------------------------------------------------------------------------
Setting up the Android SDK
Download the file from above
Unzip to your desktop
Take the "android-sdk-windows" folder and move it to the root of your hard drive (C:\)
Right click on My Computer and click properties
Select the Advanced Tab or Advanced System Setting (Vista/Windows 7)
Select Environment Variables...
Press New
For Variable Name type: adb
For Variable Value type: C:\android-sdk-windows\tools
Now, [Get new sdk (1.5r3) to work]
1. Run SDK Setup.exe
2. If it gives you an error go to settings and click on "Force http//....."
3. Select all options and let it download and install
If you cant get the setup to work, Download the USB-DRIVERS folder - HERE (Windows XP/Vista/Windows 7)
--------------------------------------------------------------------------
Preparing your phone for ADB
Go to Settings on your phone
Select Applications
Select Development
Make sure 'USB Debugging' is checked
--------------------------------------------------------------------------
Installing Drivers
Plug in your phone through USB and DO NOT MOUNT IT!!!!!
Your computer should see a new device and try to install Android 1.0 driver (If it doesnt, scroll down to the "Im not getting a notification of Android ADB when i plug in my USB" section)
Let it load
Once it cant find them select "Install drivers from my pc"
The drivers you need are in the Android SDK 1.5r2 folder (C:\android-sdk-windows\usb_driver)
Depending on your OS pick x86 or amd64
You ADB Android Device should now be installed! Good Job
For Android SDK 1.5r3+
1. Run SDK Setup.exe
2. If it gives you an error go to settings and click on "Force http//....."
3. Select all options and let it download and install
If you cant get the setup to work, Download the USB-DRIVERS folder - HERE (Windows XP/Vista/Windows 7)
--------------------------------------------------------------------------
Check if your phone is detected by ADB
Open up Command Prompt (Go to run, type in cmd, press enter)
Type in
Code:
cd C:\android-sdk-windows\tools === Press Enter
adb devices === You should see your device listed
adb shell === you should see # in the next line
Now you are all set to run adb commands
Note: for a list of commands type in 'adb' in cmd
CONGRATS YOU NOW HAVE ADB FULLY RUNNING!
--------------------------------------------------------------------------
Droid Explorer by Camalot
Droid Explorer is a Windows software that will download, install, and setup the android SDK for you all in under a minute so you are ready to go. I use this on a daily basis. This amazing piece of software has tons of plugins and a built in file explorer for all your files on your phone! All you gotta do is download, install, and go!
Download Droid Explorer - Here
Install the program, and let it setup the SDK files for you
Connect your phone
Enjoy!
--------------------------------------------------------------------------
"Im not getting a notification of Android ADB when i plug in my USB"
Why: Your computer has detected your phone but as a protable device and as a storage device.
Fix: This took me a lot of research and time to figure out so this is what your are going to do.
First download USBDeview - Here
Unzip it
Run USBDeview.exe as Administrator
You will see all drivers being used on your computer
Highlight and Uninstall all drivers with the description have HTC Android (Should be 3 of them)
Right Click on the driver and press uninstall
Once done, Unplug your phone and plug it back in
You should now get the notification of the ADB device
Follow the steps above to install the drivers
--------------------------------------------------------------------------
When Typing just adb in cmd you will get whats called a "usage doc" which gives you a lits of commands that you can use:
Code:
-d - directs command to the only connected USB devic
e
returns an error if more than one USB device is
present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <serial number> - directs command to the USB device or emulator w
ith
the given serial number
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> <local> - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] <file> - push this package file to the device and instal
l it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data
)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories
)
adb bugreport - return all information from the device
that should be included in a bug report.
adb help - show this help message
adb version - show version num
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb root - restarts adb with root permissions
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PDP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be u
pdated.
- If it is "system" or "data", only the corresponding partition
is updated.
--------------------------------------------------------------------------
Commands that you should know
adb push - Insert file to phone such as Stock.apk to /data/app_s
Code:
adb push <pathtofile.apk> <file system location> - Example: adb push c:\app.apk /data/app
adb pull - Remove file from phone such as Stock.apk from /data/app_s
Code:
adb pull <pathtofile.apk> - Example: adb pull /data/app_s/Stock.apk
adb install - Install app to phone
Code:
adb install <path to file> - Example: adb install c:/apps/apps2sd.apk
adb uninstall - Uninstall app from phone
Code:
adb uninstall <name of application> - Example: adb uninstall linda.apk
For more ADB Commands go - Here
--------------------------------------------------------------------------
Thats it for ADB! Congrats and if you have any questions please ask me or if anything is missing or not correct please tell me. I got all of this from research and personal experience.

-------bump------

Good guide, pretty simple... Ill bookmark this, so I can send people that needs help here.

i have attached a zip that has the files i use to get basic use like for doing root to stock to upgrading 2.1-2.2 and other small things.
extract to C:\fastboot
in C:\fastboot you will find a "cmd" batch file. just run it and it should be ready for you to type in adb commands or fastboot. just make sure your in debug mode by doing all in the first post for installing drivers and all that.

U seriously bumped this thread? Lmfao

help?
i was trying adb and i got!
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
K:\>adb devices
List of devices attached
HT07YHL02294 offline
HT07YHL02294 device
K:\>adb remount
error: more than one device and emulator
Click to expand...
Click to collapse

ADB
i have this message Permission Denied what should i do?

thank you D200P13 soo much. i got it working thanks to your files

X10 adb issues
Can't get it to work for my X10.
ADB does not see my X10 when connected, have tried all mentioned above several times, no luck.
USB drivers seem not to install.
Do i need something special for my X10 to connect via ADB ?

p2dewit said:
Can't get it to work for my X10.
ADB does not see my X10 when connected, have tried all mentioned above several times, no luck.
USB drivers seem not to install.
Do i need something special for my X10 to connect via ADB ?
Click to expand...
Click to collapse
Turn telephone i debug mode.

when i type adb it says that it's an unrecognized command.

That's because you haven't navigated to the folder where the adb file is located...
Sent from my Nexus One using XDA App

danger-rat said:
That's because you haven't navigated to the folder where the adb file is located...
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
Isn't it in the android-sdk-windows folder?
EDIT
nvm found it. it's in another folder....thanks

when i run adb shell, it doesn't give me a # it gives me $. what do i do?

What are you trying to do?
Sent from my Nexus One using XDA App

Trying to flash a rom on my phone (x10) and was making sure adb is working properly before i do anything. When flashing the new rom there's some bugs that require adb to fix. From my understanding "$" means i don't have su access. Thanks for the help btw. Sorry for bothering you. Just taking proper precautions.
EDIT
Sorry again. Found my answer. I forgot to unlock my device to accept superuser permissions. Thanks for your help

to check ur phone is detected by adb....
i type "adb shell" in cmd,and according 2 u i should show #.....but it shows $ to me......why?

To check connection, type "adb devices"
"adb shell" will allow you to work remotely on your device. If the $ doesn't change to #, then you don't have root access.
Sent from my Nexus One using XDA App

If your just trying to set up adb to riot your device, I put this together to make things much easier...
http://www.nexusoneforum.net/forum/...mple-sdk-setup-manual-root-guide-windows.html
Sent from my Nexus One using XDA App

Where is the Mac Specific version. Everything you posted is for windows mate!

Related

Got ADB running, now what?

So I'm trying to get the Gapps from this link http://nookdevs.com/NookColor:_Nookie_Froyo_Tips#3rd-Party_App_support. I believe I got ADB and the drivers installed correctly. Now what do I do. I open up CMD and when I put in the first line of that script, it basically says $ is not a recognized command or something along those lines. I'm so close to doing the last thing I want to, but can't get over this hump. Can someone give me the play by play on what to do?
Don't type the $. The $ is representing the typical command prompt in *nix (such as Linux) based OSes. You just need to enter everything after the $.
Ok, after I do the first line of
adb shell mount -o remount,rw /dev/block/mmcblk1p2 /system
adb push C:\Documents and Settings\g018807\Desktop\system/
adb reboot
It won't let me type anything else or paste anything else. What am I doing wrong?
Is their anyone who can take me through this?
now I'm just getting ADB not found.
When you issue the command "adb devices" (without quotes), what do you see? Anything? If you see nothing, then your device isn't connected.
eyecrispy said:
When you issue the command "adb devices" (without quotes), what do you see? Anything? If you see nothing, then your device isn't connected.
Click to expand...
Click to collapse
It says list of devices attached
*****numbers* Device
Now it's back to the point where after I hit ADB Shell it just doesn't let me type anything.
Does it just lock up? can you try cntl-C out of it? Other than adb shell, can you do any other adb commands? like adb push or adb pull?
eyecrispy said:
Does it just lock up? can you try cntl-C out of it? Other than adb shell, can you do any other adb commands? like adb push or adb pull?
Click to expand...
Click to collapse
I can cntl-c out of it. If I type push or pull it gives me this
Android Debug Bridge version 1.0.26
-d - directs command to the only connected USB devic
e
returns an error if more than one USB device is
present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <serial number> - directs command to the USB device or emulator w
ith
the given serial number. Overrides ANDROID_SERI
AL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number
is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number
is specified.
Using this ocmmand with no additional arguments
will disconnect from all connected TCP/IP devic
es.
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] <file> - push this package file to the device and i
nstall it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data
)
('-s' means install on SD card instead of inter
nal storage)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories
)
adb bugreport - return all information from the device
that should be included in a bug report.
adb help - show this help message
adb version - show version num
DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on th
e specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be u
pdated.
- If it is "system" or "data", only the corresponding partition
is updated.
environmental variables:
ADB_TRACE - Print debug information. A comma separated list
of the following values
1 or all, adb, sockets, packets, rwx, usb, sync
, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes prior
ity over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these de
bug tags are printed.
Click to expand...
Click to collapse
I have USB debugging on, and I turned on storage mode. Are both of those right?
buffnutz1 said:
I have USB debugging on, and I turned on storage mode. Are both of those right?
Click to expand...
Click to collapse
Yeah, USB debugging is definitely needed. Having storage mode on is fine too.
But let's slow down and back up a little here. Btw, I'm not trying to be condescending with the following. Just being thorough.
First, unplug your Nook from USB. Next, on the Nook uncheck then recheck USB debugging. Now back up to the Home screen.
If you're running Windows Vista/7, make sure you're running command prompt as Administrator. Better safe than sorry. Now at a command prompt type:
adb kill-server
There won't be any result but you should get back to the command prompt.
Now connect the Nook via USB and type:
adb devices
This is just to re-connect your Nook to your computer. You should get a result like:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
xxxxxxxxxxxxxxxxxx device
Click to expand...
Click to collapse
Now type:
adb shell
If you don't get a $ (unrooted) or # (rooted) prompt, then I think there is something wrong with the drivers you installed.
If you do get a $ or # prompt, type:
exit
You should be back to your command prompt.
If you get this far, re-extract or move the zip from http://nookdevs.com/NookColor:_Nookie_Froyo_Tips#3rd-Party_App_support to C:\Temp.
At a command prompt type:
cd C:\Temp
dir
You should get something like
Volume in drive C has no label.
Volume Serial Number is B077-0836
Directory of C:\Temp
02/15/2011 03:06 PM <DIR> .
02/15/2011 03:06 PM <DIR> ..
02/15/2011 03:06 PM <DIR> META-INF
02/15/2011 03:06 PM <DIR> system
0 File(s) 0 bytes
4 Dir(s) 20,067,143,680 bytes free
Click to expand...
Click to collapse
Now type (or copy/paste):
adb shell mount -o remount,rw /dev/block/mmcblk1p2 /system
You should get back to a command prompt. Now type (or copy/paste):
adb push "C:\Temp\system" system/
Again you should get back to a command prompt. Now type (or copy/paste):
adb reboot
This will reboot your Nook and the Google Apps will be available.
You are seriously the best friggin guy ever. Thanks so much. I was missing this entire step
cd C:\Temp
dir
No problem. Actually I'm glad it worked because I just realized that my steps were assuming that you have Froyo on a micro SD card. This wouldn't have worked if you had Froyo on the internal memory. Also, that step you missed is really not necessary. That's just to make sure you had the zip extracted properly. In any case, good to hear it worked out.
Try this here>nookdevs{dotcom}/NookColor_USB_ADB
^ please insert .com for {dotcom} as i cant post links since i dont have enough posts, this forum is good but kinda harsh towards newcomers, otherwise love the forum.
I was stuck at the same spot as you and took me forever to find the fix until i stumbled upon that page. Im in Ubuntu 10.04 so i cant speak for the windows procedure, but it worked perfect for me. I now have HC v3 with gapps thanks to that site. hope this helps
I'm having similar issues. Unfortunately I'm leaving for Fl. for 4 days. As an aside, it would be great if there were some kind of adb gui program for windows. Something were instead of manually entering dos commands like "/dev/block/mmcblk1p2 /system" you could just browse to your nooks system dir. and drop the file in question. Probably just dreaming here. Anyway, I will try your guide as soon as I get back. Cant wait!

[GUIDE][HOWTO] How to Push files using ADB Desire C

Hello guys today I am going to show you how to use a program called quick adb pusher, it is a great starting point for new android users who want to copy modified system files, without flashing update Zip’s all the time, it will also let member do things manually instead of relying on update ZIP's all the time. Besides of explaining how to use a simple program such a quick ADB Pusher, i will also explain in depth the commands of ADB through the actual command line interface, so here we go:
Code:
#include
*
* Your warranty is now void.
*By you using my Mods, Roms etc...
* I am not responsible for bricked devices, or dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed.
* Please do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
First of all we will start with The command line ADB, the quick adb pusher tutorial is further down the post.
Before we start explaining some of the code what is used in ADB, it is important you know what it is, it is called the Android-Debug-Bridge.
In order to even get ADB to wokr you need to follow these procedures:
Settings -> Developers options -> USB-de bugging
Then check that box, it will make you feel like a boss.
Now once you have done that your android device, is now setup for both development and ADB. Next you are going to plug your device into your computer, via a usb cable.
Once you have done that you need to go to the directory of your ADB interface, this is where you have the android SDK installed too, on a linux or mac based system this could be:
Code:
cd /home/yourusername/android-sdk-mac/tools
Once you have the ADB interface loaded into your terminal, if you type help it will show something similar to this:
Code:
Android Debug Bridge version 1.0.25
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <serial number> - directs command to the USB device or emulator with
the given serial number. Overrides ANDROID_SERIAL
envivornment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>:<port> - connect to a device via TCP/IP
disconnect <host>:<port> - disconnect from a TCP/IP device
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> <local> - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] <file> - push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb help - show this help message
adb version - show version num
DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specified device
adb remount - remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or recovery program
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on the specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition
is updated.
Now that you have ADB running here are some simple commands on how to use it:
How identify that your device is being recognised by ADB:
Code:
adb devices
Once this has been typed it should show something like this:
Code:
C:\Users\Daniel\Android development\ADB, Fastboot\adt-bundle-windows-x86_64\adt-
bundle-windows-x86_64\sdk\platform-tools>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
HT26GW507639 device
C:\Users\Daniel\Android development\ADB, Fastboot\adt-bundle-windows-x86_64\adt-
bundle-windows-x86_64\sdk\platform-tools>
If there is a line what says "HT26GW507639" with "device" at the end your devices is successfully recognised by ADB!
How to pull data from your device:
Code:
adb -s [yourdeviceADBNUMBERHERE] pull /system /the directory you want it saved too
This command will pull all the files from your devices system directory, to the directory you told it to be saved too.
I did the pull command on a PC and I was able to get all the data from following directories on my Desire C:
/data
/system
How to push data to your device:
Code:
adb -s [yourdeviceserialnumberhere] push /system/app/whatever.apk
This command will push the files you wish to your phone, though this command.
The most basic ADB commands
ADB push, as explained before this command is used to send files to your device
Code:
adb push
ADB pull, as explained before it pulls files from your phone, and makes a copy of them.
Code:
adb pull
ADB Install and example of this code would be "adb install c:\users\app.apk"
Code:
adb install c:\users\app.apk
ADB Shell, this command begins a shell connection to the device on the other end.
Code:
adb shell
ADB reboot, it does what it says
Code:
adb reboot
ADB reboot recovery, this also does what it says
Code:
adb reboot recovery
ADB reboot bootloader, this also does what is says, like the ones above.
Code:
adb reboot bootloader
ADB remount, this remounts the devices file system for editing etc...
Code:
adb remount
ADB Shell commands:
cd, this command changes directories in your devices filesystem.
Code:
cd /system/app
is, this command listes all of the file present in the directory you are at.
Code:
is /system/app
rm, this command removes file from your device.
rm /system/app/whatever.apk​cp, this command copies files, and is very similar to the cat command below.
Code:
cp /system/app/whatever.apk /sdcard/whatever.apk
cat, this command is also used to copy files to your device.
Code:
cat /system/app/whatever.apk > /sdcard/whatever.apk
exit, this command exits the ADB shell.
Code:
exit
If any of you are having any problems, read the FAQ first before posting a question in this thread, happy pushing!
If you think any other commands should me added to this section, PM me about it.
As explained above, the quick ADB pusher is an interface over the code based ADB. I will be a much easier approach for new user of android to get to grips to, that is why I am including it.
Hello guys today I am going to show you how to use a program called quick adb pusher, it is a great starting point for new android users who want to copy modified system files, without flashing update Zip’s all the time, so here we go:
First of all you want to download the quick adb pusher program, this is in both this thread and the revolution Rom thread on XDA, the link for the program is listed below:
Quick ADB Pusher​
Now you want to make sure your phone is plugged into your computer, but do not put it into USB storage mode. Make sure your USB de-bugging option is enabled it is located at:
Settings --> Developer options --> USB De-bugging​
Now you will start the quick ADB pusher program, once it has started it should detect your phone. If it does not then post a comment in the thread below and we will resolve the issue.
Watch the video below to clarify a few things, such as how to copy system apps etc...
Again I hope this tutorial helps some people out, remember to read the FAQ first before posting,, to prevent the same questions being asked time and time again.
FAQ
Brilliant guide thanks russell . Time to learn how to do it properly .though in fairness I do use it a bit
ps used all my thanks up again this morning !
haha already, you like smashing that thanks button, right in the face lol.
Re: [GUIDE] How to Push files using ADB
Great guide Russell.
To moderators: please move the this thread to sticky section.
Thanks, TheRedHunter.
If you guys think this thread should be stickied, them click the report button at the top of the first post, and ask it to be moved.
On another note the first post is updated with new ADB shell commands.
Thanks, I really love you threads, I will read later, i has got school now

help - flashed kernel and now stuck at load screen

Hi everyone.
I something of a noob but have unlocked/rooted/flashed several roms in the past but this time I have made a mess of it.
I unlocked my phone then flasked CWM revovery ok but was not getting anywhere with rooting it. So for some reason i flashed the kernel and now it is stuck on the white htc screen with some red text stating this is a htc developer rom please dont use without htc permission etc.
All I am able to do now is down/power button boot into bootloader and get into recovery.
I don't have any rom saved on the SD card.
I checked other solutions on this site all day yesterday and nothing seemed to work for me.
Thanks for the help in advance.
You should be able to download a rom to your pic, mount the internal sd in recovery and push the rom to it. Then wipe and flash. I'm not familiar with the phone or cwm, but that's a method used in the past.
if you have an otg cable you can mount external storage in recovery and flash from there...
metalfan78 said:
You should be able to download a rom to your pic, mount the internal sd in recovery and push the rom to it. Then wipe and flash. I'm not familiar with the phone or cwm, but that's a method used in the past.
Click to expand...
Click to collapse
I tried to mount sd card
in CWM it gives me 'error mounting /sdcard'
What next?
I don't know what kernel you flashed, since there are no kernels out for this device, but you need a otg cable with a usb drive stick to put the new rom zip on to flash in recovery, or your other options are to use the android sdk(adb) to push the rom zip to your storage, or you could adb sideload the rom zip.
to adb push plug up to your pc & type this in the cmd prompt
Code:
adb push nameofROM.zip /sdcard/nameofROM.zip
sideload is an option in cwm, just start it from recovery & connect to your pc & in your cmd prompt type
Code:
adb sideload (path to your rom.zip)
rayford85 said:
I don't know what kernel you flashed, since there are no kernels out for this device, but you need a otg cable with a usb drive stick to put the new rom zip on to flash in recovery, or your other options are to use the android sdk(adb) to push the rom zip to your storage, or you could adb sideload the rom zip.
to adb push plug up to your pc & type this in the cmd prompt
Code:
adb push nameofROM.zip /sdcard/nameofROM.zip
sideload is an option in cwm, just start it from recovery & connect to your pc & in your cmd prompt type
Code:
adb sideload (path to your rom.zip)
Click to expand...
Click to collapse
I got 'adb is not a recognised internal or external command
trenzador said:
I got 'adb is not a recognised internal or external command
Click to expand...
Click to collapse
try using google search to find out how to properly install the android sdk, your gonna need it. In the mean time take this & extract it, open your cmd prompt inside the folder, also put the rom.zip in that folder & it will work. https://dl.dropbox.com/u/31377968/adb_files.zip
rayford85 said:
try using google search to find out how to properly install the android sdk, your gonna need it. In the mean time take this & extract it, open your cmd prompt inside the folder, also put the rom.zip in that folder & it will work. https://dl.dropbox.com/u/31377968/adb_files.zip
Click to expand...
Click to collapse
great....but do i need to get android sdk working before the rest of the method or are you saying i will need it one day in the future maybe?
cheers by the way.
trenzador said:
great....but do i need to get android sdk working before the rest of the method or are you saying i will need it one day in the future maybe?
cheers by the way.
Click to expand...
Click to collapse
your gonna need it in the future, just use my files for now to get your device running again
rayford85 said:
your gonna need it in the future, just use my files for now to get your device running again
Click to expand...
Click to collapse
ok sorry one more question..
what do you mean open the cmd inside the folder? is there a file to open in the folder or i just open the fo....you get the picture.
trenzador said:
ok sorry one more question..
what do you mean open the cmd inside the folder? is there a file to open in the folder or i just open the fo....you get the picture.
Click to expand...
Click to collapse
open the folder, hold shift & mouse right click, choose open command prompt here.
i did what you said and i got this
Android Debug Bridge version 1.0.31
-d - directs command to the only connected USB devic
e
returns an error if more than one USB device is
present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <specific device> - directs command to the device or emulator with
the given
serial number or qualifier. Overrides ANDROID_S
ERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices [-l] - list all connected devices
('-l' will also list device qualifiers)
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number
is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number
is specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devic
es.
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] [--algo <algorithm name> --key <hex-encoded key> --
iv <hex-encoded iv>] <file>
- push this package file to the device and instal
l it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data
)
('-s' means install on SD card instead of inter
nal storage)
('--algo', '--key', and '--iv' mean the file is
encrypted already)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories
)
adb bugreport - return all information from the device
that should be included in a bug report.
adb backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|-nosy
stem] [<packages...>]
- write an archive of the device's data to <file>
.
If no -f option is supplied then the data is wr
itten
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks
themselves
in the archive; the default is noapk.)
(-shared|-noshared enable/disable backup of the
device's
shared storage / SD card contents; the defau
lt is noshared.)
(-all means to back up all installed applicatio
ns)
(-system|-nosystem toggles whether -all automat
ically includes
system applications; the default is to inclu
de system apps)
(<packages...> is the list of applications to b
e backed up. If
the -all or -shared flags are passed, then t
he package
list is optional. Applications explicitly g
iven on the
command line will be included even if -nosys
tem would
ordinarily cause them to be omitted.)
adb restore <file> - restore device contents from the <file> backup
archive
adb help - show this help message
adb version - show version num
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb get-devpath - prints: <device-path>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on th
e specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be u
pdated.
- If it is "system" or "data", only the corresponding partition
is updated.
environmental variables:
ADB_TRACE - Print debug information. A comma separated list
of the following values
1 or all, adb, sockets, packets, rwx, usb, sync
, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes prior
ity over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these de
bug tags are printed.
C:\Users\Leon\Desktop\ADB GUY\adb_files>
trenzador said:
i did what you said and i got this
C:\Users\Leon\Desktop\ADB GUY\adb_files>
Click to expand...
Click to collapse
Use 'adb shell' then adb sideload I think
MacHackz said:
Use 'adb shell' then adb sideload I think
Click to expand...
Click to collapse
sorry i gotta ask more, abd shell then adbsideload in the same command or what?
i got another wall of text bigger than last time.
trenzador said:
sorry i gotta ask more, abd shell then adbsideload in the same command or what?
i got another wall of text bigger than last time.
Click to expand...
Click to collapse
no need to shell, easiest way for me is to start sideload from recovery, once its started on your pc type adb sideload then drag the rom.zip into the cmd prompt & hit enter, it should do the rest.
rayford85 said:
no need to shell, easiest way for me is to start sideload from recovery, once its started on your pc type adb sideload then drag the rom.zip into the cmd prompt & hit enter, it should do the rest.
Click to expand...
Click to collapse
the good news is that worked in part, by that i mean it did load but on the phone i got this...
finding update package
opening update package
E: can't open /tmp/update.zip
(bad)
Installation aborted
trenzador said:
the good news is that worked in part, by that i mean it did load but on the phone i got this...
finding update package
opening update package
E: can't open /tmp/update.zip
(bad)
Installation aborted
Click to expand...
Click to collapse
redownload a rom like renovate for example and try again.
rayford85 said:
redownload a rom like renovate for example and try again.
Click to expand...
Click to collapse
I think I have it working...thank goodness.
Big thank you for the help and patience
Trenzador I have the same trouble can you please post instructions on how you managed to get it sorted out thanks
Sent from my Nexus 7 using xda app-developers app

[HOW TO] ADB Sideload/Push if you Wipe Internal Storage & No ROM to Flash [19 May 15]

[HOW TO] ADB Sideload/Push if you Wipe Internal Storage & No ROM to Flash [19 May 15]
How to Sideload in TWRP if you erase your Internal Memory and don't have a ROM to Flash or Restore
Warning!
Code:
#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
Requirements
Code:
#include
/*
* Unlocked Phone @ HTCDEV
* Custom Recovery
*/
Before You Start - Update Android SDK - How to set up Android SDK (ADB)
Instructions
MAKE SURE YOU BACK UP YOUR SD CARD FIRST!!!!!!!!
Make Sure HTC Drivers are installed and ADB is already working
1. Reboot into TWRP
2. in TWRP, Hit andvanced and find Sideload
3. Swipe to start Sideload
4. Open a CMD Prompt window and Change Directories to where your adb.exe is
5. type adb devices and it should show your device conntected and say sideload
6. Your ZIP file should already be in your adb folder - See Example Below
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
7. You are now ready to push the zip.....
8. type adb sideload nameofzip.zip <------------See Example Below
9. Wait until it says 100% and reboot back into recovery to flash the ROM
10. If hitting power does not make the screen come one, type adb reboot recovery
11. if adb reboot recovery does not work, hold power and volume down until it reboots to fastboot then go to recovery
ADB Push from Recovery - If Sideload Fails For You ​
adb push rom.zip /data/media/0/
​
Click to expand...
Click to collapse
If You have any Troubles with ADB
Koush Universal ADB Driver - Works on Windows 8 - Thanks xeroxide
YouTube Video for ADB Help
How to install ADB Drivers for any Device
​
​
​
FAQ
If your Output looks similiar to this below, then you are not in sideload mode or you typed the command incorrectly
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\William>cd Downloads\ADB
C:\Users\William\Downloads\ADB>adb sideload Slim-nozomi-4.2.2.build.6-OFFICIAL
Android Debug Bridge version 1.0.26
-d - directs command to the only connected USB devic
e
returns an error if more than one USB device is
present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <serial number> - directs command to the USB device or emulator w
ith
the given serial number. Overrides ANDROID_SERI
AL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>:<port> - connect to a device via TCP/IP
disconnect <host>:<port> - disconnect from a TCP/IP device
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] <file> - push this package file to the device and i
nstall it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data
)
('-s' means install on SD card instead of inter
nal storage)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories
)
adb bugreport - return all information from the device
that should be included in a bug report.
adb help - show this help message
adb version - show version num
DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on th
e specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be u
pdated.
- If it is "system" or "data", only the corresponding partition
is updated.
C:\Users\William\Downloads\ADB>-d
'-d' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\William\Downloads\ADB>-d\
'-d\' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\William\Downloads\ADB>-d: \
'-d:' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\William\Downloads\ADB>:-d
C:\Users\William\Downloads\ADB>-d\
'-d\' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\William\Downloads\ADB>-d
'-d' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\William\Downloads\ADB
DO THE FOLLOWING - (Refer to Post 1 Before you start for Picture Example)
1. Run sdk manager and update all the 4.1.2 - 4.4.2 binaries, you will see installed if you have done so
2. Reboot into TWRP
3. Go to advanced
4. Touch ADB Sideload
5. Swipe To start sideload
6. in command promt example: cd c:\android\sdk\platform-tools (that is where my adb files are at)
7. Once you have navigated to where your adb is at in command promt type adb devices
8. When you type adb devices, it should show your HTCxxjxihdjiw (whatever yours is) and Sideload which indicates you are set up properly
9. Once you see the above type adb sideload nameofzip.zip
bdorr1105 said:
Reserved if needed
Sent from my HTC One using xda premium
Click to expand...
Click to collapse
get em greezemeister!!!!
I have never had to do it... but if I do I know there are easy to understand directions.. Thanks
slimc84 said:
get em greezemeister!!!!
Click to expand...
Click to collapse
Lol thanks greezemeister
Sent from my HTC One using xda premium
Wow amazing that you posted this on the very day like an idiot I bricked my new HTC one. I followed your directions with no luck however. What I did to get in this mess was to wipe the phone before realizing I forgot to put the viper rom in internal storage. (I have an OTG cable on the way but wont be here for a few days.) So I open an adb command window and when I type in adb devices it does show my device with the following text:
"List of devices attached
FA345S900209 host"
I have the rom zip file in the correct directory on my desktop but when I type adb sideload it just brings up the entire adb help menu.FWIW on the phone it shows "starting ADB sideload feature" but it never does anything after that. ANy thoughts would be greatly appreciated!
Thanks!
I have not ran into this for a while, but I thought you could just adb push the Rom to the phone and flash as normal.
Sent from Taptalk on HTC One on some awesome custom Rom!
avwheeler said:
I have not ran into this for a while, but I thought you could just adb push the Rom to the phone and flash as normal.
Sent from Taptalk on HTC One on some awesome custom Rom!
Click to expand...
Click to collapse
Is there any trick to doing that ? I tried adb push and the rom name but is there something I'm missing ?
pitchristian said:
Wow amazing that you posted this on the very day like an idiot I bricked my new HTC one. I followed your directions with no luck however. What I did to get in this mess was to wipe the phone before realizing I forgot to put the viper rom in internal storage. (I have an OTG cable on the way but wont be here for a few days.) So I open an adb command window and when I type in adb devices it does show my device with the following text:
"List of devices attached
FA345S900209 host"
I have the rom zip file in the correct directory on my desktop but when I type adb sideload it just brings up the entire adb help menu.FWIW on the phone it shows "starting ADB sideload feature" but it never does anything after that. ANy thoughts would be greatly appreciated!
Thanks!
Click to expand...
Click to collapse
Try using the tool kit and relocking boot loader and run the RUU
Sent from my HTCONE using xda app-developers app
pitchristian said:
Is there any trick to doing that ? I tried adb push and the rom name but is there something I'm missing ?
Click to expand...
Click to collapse
It has been a while, just remember that the paths/location need to be right. Might have to mount storage or something like that too. Lots of threads on adb. Wish you luck, that sucks.
Sent from Taptalk on HTC One on some awesome custom Rom!
thanks guys I fixed it after relocking the bootloader and running the stock RUU from toolkit as mentioned! I really appreciate it. (FWIW I could never get sideload through TWRP to work)
Added you guide HERE Q14 Thanks OP
pitchristian said:
thanks guys I fixed it after relocking the bootloader and running the stock RUU from toolkit as mentioned! I really appreciate it. (FWIW I could never get sideload through TWRP to work)
Click to expand...
Click to collapse
Glad you got it back up and running. You really should read up on adb. And how to get your paths correct. The toolkits are great but its always good to know ADB just in case you.
Sent from my HTCONE using xda app-developers app
Sorry guys I am 6hrs behind east coast. I live in Hawaii
You can use adb push if the phone is picked up in recovery but a lot of times my phone isnt recongnised. You have to go in advanced and swipe to start adb sideload...You literally dont have to pick a path because by default side load pushes to the root of your sd card...All you have to do is have the zip in the right place on your computer and type the command as instructed and it will push the zip to your sd card
pitchristian said:
Wow amazing that you posted this on the very day like an idiot I bricked my new HTC one. I followed your directions with no luck however. What I did to get in this mess was to wipe the phone before realizing I forgot to put the viper rom in internal storage. (I have an OTG cable on the way but wont be here for a few days.) So I open an adb command window and when I type in adb devices it does show my device with the following text:
"List of devices attached
FA345S900209 host"
I have the rom zip file in the correct directory on my desktop but when I type adb sideload it just brings up the entire adb help menu.FWIW on the phone it shows "starting ADB sideload feature" but it never does anything after that. ANy thoughts would be greatly appreciated!
Thanks!
Click to expand...
Click to collapse
Hey man I think you already fixed your phone but in the future you have to be booted into TWRP already then what you do next is go to Advanced and then Sideload then you swipe to enable sideload on the phone...After you have done that the phone will say starting adb sideload...It's important you update Adnroid SDK so you have the latest binaries....Once sideload is enabled on your phone then you you type the adb devices and it shouls show your device and say sideload, if it does you are solid...
After that then you type adb sideload nameofzip.zip and it will start pushing to the root of your SD card and then you just flash like normal...
Glad locking the bootloader and using the toolkit worked for you bro
bigdaddy619 said:
Added you guide HERE Q14 Thanks OP
Click to expand...
Click to collapse
Thanks man appreciate it. Thanks for the heads up
avwheeler said:
I have not ran into this for a while, but I thought you could just adb push the Rom to the phone and flash as normal.
Sent from Taptalk on HTC One on some awesome custom Rom!
Click to expand...
Click to collapse
You can use adb push but if your phone is in recovery adb didn't recognize my phone, it did when I was booted in my ROM but this is worst case or upgrading and you wipe the internal memory before you flash and your sd is blank and you can't flash adb sideload is different than regular adb commands...
When I wiped my SD on accident a few days ago I managed to adb push while in recovery.
I think it has to do with which drivers you have installed. I just use the ones that come with the Android SDK ( /sdk/extras/google/usb_driver/android_winusb.inf ), and I have the driver set to "Android Composite ADB Interface".
Always good to have options though. :good:
Harfainx said:
When I wiped my SD on accident a few days ago I managed to adb push while in recovery.
I think it has to do with which drivers you have installed. I just use the ones that come with the Android SDK ( /sdk/extras/google/usb_driver/android_winusb.inf ), and I have the driver set to "Android Composite ADB Interface".
Always good to have options though. :good:
Click to expand...
Click to collapse
Yeah it is good to have options, there is no need for paths pretty much sideload puahes to the root of your sd card automatically so it's easier in my opinion. Anyway thanks for the info
Sent from my HTC One using xda premium
bdorr1105 said:
Yeah it is good to have options, there is no need for paths pretty much sideload puahes to the root of your sd card automatically so it's easier in my opinion. Anyway thanks for the info
Sent from my HTC One using xda premium
Click to expand...
Click to collapse
So what happens when all the abve has occurred and now in TWRP it states, Sideload failed?

[GUIDE] How to ADB Push to fix a formatted /sdcard (Mac + PC)

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This guide will help you to restore your phone if you happen to have wiped your internal sdcard and have no way of getting your phone to boot to a functional state.
This method is 99.9% safe, and should anyone break their phones as a direct result of this guide, I will send a donation
Requirements: A computer running either Windows or Mac
An unlocked bootloader, which can be achieved at http://www.htcdev.com/bootloader
This guide, best served cold, comes in three parts:
Unlocking the bootloader
Installing the ADB drivers
Restoring your phone
Feel free to skip to the part you require, and I hazard a guess at saying most people can skip straight to the third and most important part, where the magic actually happens.
Unlockin' the bootloader
First off, you need to head over to HTC Dev and select 'All Other Supported Models' in the little drop down menu, then press the big green button as shown.
This will then require you to register, and you can then follow the steps provided by HTC. Obviously, during this process you're gonna come to a point where ADB drivers are needed to flash your unlock token, so take a peek down the page. I aren't going into detail with this unlock guide because I am fully aware that there are detailed guides elsewhere in the forums, from people who have a lot more time to sit and explain things than I do.
Installin' the ADB drivers
Howdy partner, this here thang be the most important thing you can ever do regarding your Android and PC ecosystem, and you're gonna be hella glad that you did it. After installing ADB, you're free to enjoy the wonderful world that is logcats, custom recoveries, ROMs, kernels; the whole package!
First off, select your OS!​
Windows 7
Congratulations! You have managed to avoid the flop that is Windows 8, kudos to you.
First, head over to HTC Sync Manager and download this and install, to gain the required drivers.
Now, head over to the Android SDK and download it, using the big blue download button. Simpless.
Extract this zip file to the root of your C:/ drive.
Now you're done! To check it's working, open the platform-tools folder of the SDK and then hold down Shift, Right Click and press 'Open Command Window here'.
Now, type
Code:
adb devices
If your device is plugged in, and powered into Android or a custom recovery, it should appear as a serial number here!
Windows 8
Sorry to hear you're stuck with the latest and far from greatest iteration of Windows, but don't let that Metro interface get you down! Lets crack on.
First, head over to HTC Sync Manager and download this and install, to gain the required drivers.
Now, head over to the Android SDK and download it, using the big blue download button. Simpless.
Extract this zip file to the root of your C:/ drive.
Now you're done! To check it's working, open the platform-tools folder of the SDK and then hold down Shift, Right Click and press 'Open Command Window here'.
Now, type
Code:
adb devices
If your device is plugged in, and powered into Android or a custom recovery, it should appear as a serial number here!
Mac
Finally, someone with a good taste in operating systems This is the easiest thing you will do all day, believe me.
First, head over to HTC Sync Manager and download this and install, to gain the required drivers.
Now, head over to the Android SDK and download it, using the big blue download button. Simpless.
Locate the zip, or folder (if you have 'Open "safe" files' turned on) in your Downloads folder and drag it to your Desktop. If it ain't extracted, give it a double click to extract it.
Now open the folder and navigate to 'platform-tools'. Drag this to your Desktop out of the main folder.
Open Terminal and type:
Code:
cd Desktop/platform-tools
./adb devices
If your phone is plugged in, and powered into Android or a custom recovery, the serial number will show up here. Congrats, adb is set up, now lets restore your phone.
Usin' ADB Push
So, you're stuck in recovery and cannot boot, or you just need to transfer a file to your phone for whatever reason... This is the method to transfer a rom back onto your phone, in order to make it fully functional again. This works in both recovery and booted Android, meaning it is also a good way to transfer music and photos when your phone boots again. This process doesn't wipe any data.
First, open platform-tools (your adb folder as described above). Download any ROM from the HTC One section of XDA and drag the .zip inside here
Hold down Shift and Right-Click, selecting 'Open Command Window Here'.
On a Mac, open Terminal and type;
Code:
cd Desktop/platform-tools
to achieve the same result.
Now, we are ready to use the ADB push command.
Plug your phone into your computer in recovery mode, and in CMD type:
Code:
adb push NameOfRom.zip /data/media/
Be aware that on Android 4.2.2, you need to type '/data/media/0/'
On a Mac, type:
Code:
./adb push NameOfRom.zip /data/media/
(or /data/media/0/ if coming from a 4.2.2 rom)
Now, wait for the process to complete. This takes on average around 260 seconds for a 900mb rom, with no progress indicator. Don't worry, it hasn't frozen.
When it completes, type:
Code:
adb reboot recovery
or
Code:
./adb reboot recovery
on a Mac.
Your file can now be found on your sdcard, and can be flashed from the 'Install zip from sdcard' screen.
That's it, you have saved your phone, and can now get back to using it again!​
Annddd I've posted this in the wrong section by accident... Sorry I was too excited about finishing ;D
Great tutorial. I wish I had seen that a couple of days ago when I accidentally wiped my internal SD and had no ROM to flash. Thanks to the members here and hours and hours of Googling, though, I was able o get ADB working. Bookmarked!
Great work - this should be a sticky on the Q & A page. This issue/problem comes up 2 or 3 times per day. Especially since 4.2.2 releases came out.
Sent from my HTC One using xda premium
Sticked until August 1st. If there is still a problem with formatted sd-cards then, we will re-asess.
I can't believe there are still people around android who don't know how to push I had to do that as well as I had my internal SD wiped too during the S-OFFing/unlocking...
One a bit OT, but does anyone know why the TWRP lacks the advanced "mount USB storage" feature? I had that one on my OneX....
Cheers
Dr.Romca said:
I can't believe there are still people around android who don't know how to push I had to do that as well as I had my internal SD wiped too during the S-OFFing/unlocking...
One a bit OT, but does anyone know why the TWRP lacks the advanced "mount USB storage" feature? I had that one on my OneX....
Cheers
Click to expand...
Click to collapse
Neither TWRP nor CWM are able to Mount USB Storage anymore and I have no idea why. They were not able to mount on my Galaxy S3 either.
thnx
thanks you very much it helps me allot
thanks again
anyone know how to get around this so it actually pushes teh rom to the phone?
Android Debug Bridge version 1.0.29
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <serial number> - directs command to the USB device or emulator with
the given serial number. Overrides ANDROID_SERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number is specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devices.
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] [--algo <algorithm name> --key <hex-encoded key> --iv <hex-encoded iv>] <file>
- push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
('-s' means install on SD card instead of internal storage)
('--algo', '--key', and '--iv' mean the file is encrypted already)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|-nosystem] [<packages...>]
- write an archive of the device's data to <file>.
If no -f option is supplied then the data is written
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks themselves
in the archive; the default is noapk.)
(-shared|-noshared enable/disable backup of the device's
shared storage / SD card contents; the default is noshared.)
(-all means to back up all installed applications)
(-system|-nosystem toggles whether -all automatically includes
system applications; the default is to include system apps)
(<packages...> is the list of applications to be backed up. If
the -all or -shared flags are passed, then the package
list is optional. Applications explicitly given on the
command line will be included even if -nosystem would
ordinarily cause them to be omitted.)
adb restore <file> - restore device contents from the <file> backup archive
adb help - show this help message
adb version - show version num
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specified device
adb remount - remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on the specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition
is updated.
environmental variables:
ADB_TRACE - Print debug information. A comma separated list of the following values
1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes priority over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these debug tags are printed.
TarekElsakka said:
Neither TWRP nor CWM are able to Mount USB Storage anymore and I have no idea why. They were not able to mount on my Galaxy S3 either.
Click to expand...
Click to collapse
at least they allow to use OTG to install roms, so (if you have the cable) you just can wipe the internal sd, and flash using an usb with OTG :good:
SLver said:
at least they allow to use OTG to install roms, so (if you have the cable) you just can wipe the internal sd, and flash using an usb with OTG :good:
Click to expand...
Click to collapse
Yeah, I'm aware of that. I went ahead and ordered an OTG cable when I mistakenly wiped my internal SD card before. It arrived about four days later, though, so I had already fixed the problem. I am sure when I want to do a fresh install, it'll make life much easier than having to sideload or push using ADB.
Great guide although i'm a bit stuck, when I run the ./adb push Rom.zip /data/media/0 command it says:
-bash: /Users/archiedennis/Desktop/platform-tools: is a directory
Any ideas anyone?
Running OSX btw
JustArchiee said:
Great guide although i'm a bit stuck, when I run the ./adb push Rom.zip /data/media/0 command it says:
-bash: /Users/archiedennis/Desktop/platform-tools: is a directory
Any ideas anyone?
Running OSX btw
Click to expand...
Click to collapse
./adb push rom.zip /data/media/0/
MacHackz said:
./adb push rom.zip /data/media/0/
Click to expand...
Click to collapse
sry for noob question.. but adb won't show my device
have latest drivers and htc sync installed.. it was working before, now it just won't
fcjan said:
sry for noob question.. but adb won't show my device
have latest drivers and htc sync installed.. it was working before, now it just won't
Click to expand...
Click to collapse
Download and run this: http://adbdriver.com/upload/AdbDriverInstaller.exe
MacHackz said:
Download and run this: http://adbdriver.com/upload/AdbDriverInstaller.exe
Click to expand...
Click to collapse
thanks.. now there is a another problem -.-
I was trying to do a clean install of ARHD, had some problems..
enter CM recovery, tested adb (working)
wipe data/factory reset, wipe cache, wipe /sdcard.. full wipe
now adb is saying
C:\adb>adb devices
adb server is out of date. killing...
ADB server didn't ACK
* failed to start daemon *
error:
FIXED.. had do delete adb.exe in HTC Sync folder, it works now.. thank you!
MacHackz said:
./adb push rom.zip /data/media/0/
Click to expand...
Click to collapse
Nope still the same thing :L
Dude!!! You are the greatest! Help me alot and saved my weekend *muchlove*
An all nighter, os X and Win7, 8 hours later you saved me. Thanks!
crash087 said:
anyone know how to get around this so it actually pushes teh rom to the phone?
Android Debug Bridge version 1.0.29
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <serial number> - directs command to the USB device or emulator with
the given serial number. Overrides ANDROID_SERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number is specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devices.
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] [--algo <algorithm name> --key <hex-encoded key> --iv <hex-encoded iv>] <file>
- push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
('-s' means install on SD card instead of internal storage)
('--algo', '--key', and '--iv' mean the file is encrypted already)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|-nosystem] [<packages...>]
- write an archive of the device's data to <file>.
If no -f option is supplied then the data is written
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks themselves
in the archive; the default is noapk.)
(-shared|-noshared enable/disable backup of the device's
shared storage / SD card contents; the default is noshared.)
(-all means to back up all installed applications)
(-system|-nosystem toggles whether -all automatically includes
system applications; the default is to include system apps)
(<packages...> is the list of applications to be backed up. If
the -all or -shared flags are passed, then the package
list is optional. Applications explicitly given on the
command line will be included even if -nosystem would
ordinarily cause them to be omitted.)
adb restore <file> - restore device contents from the <file> backup archive
adb help - show this help message
adb version - show version num
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specified device
adb remount - remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on the specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition
is updated.
environmental variables:
ADB_TRACE - Print debug information. A comma separated list of the following values
1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes priority over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these debug tags are printed.
Click to expand...
Click to collapse
I'm having the EXACT same issue....

Categories

Resources