How to avoid running a new adb for each command send? - General Questions and Answers

I'm trying to send runtime commands like:
adb.exe -s 127.0.0.1:5555 shell screencap /sdcard/ss.png
To the adb server running, using SendMessage / Windows Message, does adb even support it? If so I wonder how it needs to be sent.
I know I could pass runtime commands using cmd or running directly to the adb.exe.
My goal is to keep just one running and avoid spamming a new ADB for each command sent. Is it even possible?
Any other suggestion is welcome.

When command
Code:
adb start-server
is run then one ADB ( server ) session gets established.
This session lasts untill command
Code:
adb kill-server
is run.
Look into Windows Task Manager.

The question is how to communicate with this window using sendmessage or any other option that does involve you manually typing in the console.

ADB isn't a Windows executable you can send messages to, it only offers a CLI.

Related

[FIX] [GUIDE] ADB command not found issue

Hi, I'm posting this because I had a lot of problems with ADB shell and its drivers, etc.
Problem: when you try to input a command inside ADB like REBOOT , ADB shell comes back as " ADB: not found"
PPL say you need to re-install drivers, java, SDK, etc.. well none of that worked for me and many users here. I even tried to reinstall Windows.. but that was a no go ether.
FIX: the only way that I could make ADB to send commands to the phone was making a .BAT file and add the commands in there and execute the bat to run the ADB commands.
GUIDE: this is what's inside the .BAT
:cd %:h
adb wait-for-device
**YOUR COMMANDS HERE**
adb wait-for-device
adb shell sync
pause
now for example: you have a THREAD that describe what you need to do to push files with ADB like this
1) Unzip the two files into the directory where ADB is kept
2) Get to that directory in command prompt
3) Connect your phone if you haven't done so already
4) adb remount
5) adb push gps.conf /system/etc
6) adb push SuplRootCert /system/etc
7) adb reboot
now the only thing that you need to do is RIGHT CLICK the Auto ADB.BAT and click EDIT
:cd %:h
adb wait-for-device
**YOUR COMMANDS HERE**
adb wait-for-device
adb shell sync
pause
Just copy and paste the ADB commands from the THREAD there, like this.
:cd %:h
adb wait-for-device
adb remount
adb push gps.conf /system/etc
adb push SuplRootCert /system/etc
adb reboot
adb wait-for-device
adb shell sync
pause
and close and save the changes, after you inputted your commands just place the Auto ADB.BAT in the folder where you have ADB shell install (E.X: "adb.exe" C:\AndroidSDK\Tools or \Desktop\ADB where you install it or downloaded the folder)
After that it's done. Every time you want to use ADB just EDIT the .BAT, close, save, and execute the .BAT.
Here I leave some THREADS in reference for installing ADB and its components.
[GUIDE] (For Noobs) SDK, ADB, and Drivers
Posted by the user *MLIGN*
Basic adb/shell commands for noobs
Posted by the user *brandenk*
The method mention above (Auto ADB.BAT) it's the last resort when everything else fails and you cannot send commands to adb shell.
I hope this will help some ppl, I spent many days trying to find out a way to make ADB work and this is what I found.
Please be nice in here and if you found another way, I gladly post it up front.
And remember to say Thanks if I helped you
thanks!
matury said:
Hi, I'm posting this because I had a lot of problems with ADB shell and its drivers, etc.
Problem: when you try to input a command inside ADB like REBOOT , ADB shell comes back as " ADB: not found"
PPL say you need to re-install drivers, java, SDK, etc.. well none of that worked for me and many users here. I even tried to reinstall Windows.. but that was a no go ether.
FIX: the only way that I could make ADB to send commands to the phone was making a .BAT file and add the commands in there and execute the bat to run the ADB commands.
GUIDE: this is what's inside the .BAT
:cd %:h
adb wait-for-device
**YOUR COMMANDS HERE**
adb wait-for-device
adb shell sync
pause
now for example: you have a THREAD that describe what you need to do to push files with ADB like this
1) Unzip the two files into the directory where ADB is kept
2) Get to that directory in command prompt
3) Connect your phone if you haven't done so already
4) adb remount
5) adb push gps.conf /system/etc
6) adb push SuplRootCert /system/etc
7) adb reboot
now the only thing that you need to do is RIGHT CLICK the Auto ADB.BAT and click EDIT
:cd %:h
adb wait-for-device
**YOUR COMMANDS HERE**
adb wait-for-device
adb shell sync
pause
Just copy and paste the ADB commands from the THREAD there, like this.
:cd %:h
adb wait-for-device
adb remount
adb push gps.conf /system/etc
adb push SuplRootCert /system/etc
adb reboot
adb wait-for-device
adb shell sync
pause
and close and save the changes, after you inputted your commands just place the Auto ADB.BAT in the folder where you have ADB shell install (E.X: "adb.exe" C:\AndroidSDK\Tools or \Desktop\ADB where you install it or downloaded the folder)
After that it's done. Every time you want to use ADB just EDIT the .BAT, close, save, and execute the .BAT.
Here I leave some THREADS in reference for installing ADB and its components.
[GUIDE] (For Noobs) SDK, ADB, and Drivers
Posted by the user *MLIGN*
Basic adb/shell commands for noobs
Posted by the user *brandenk*
The method mention above (Auto ADB.BAT) it's the last resort when everything else fails and you cannot send commands to adb shell.
I hope this will help some ppl, I spent many days trying to find out a way to make ADB work and this is what I found.
Please be nice in here and if you found another way, I gladly post it up front.
And remember to say Thanks if I helped you
Click to expand...
Click to collapse
Thanks am new here and I had the same problem I couldn't get the adb to respond at all, I did reinstall and all but it came back as not found, however this method worked fine. Thanks

[Guide]Setting up ADB and Fastboot

Definition:
ADB is the android debugging bridge that allows you to control your phone from your PC and is a bridge allowing you transfer stuff from it
Fastboot is usually used in bootloader and used a lot in unlocking your bootloader and commands in it
Setting up ADB:
1.Download the ZIP file from the attachments and extract it in C:\SDK\platform-tools (You will need to create these folders)
2. Go to command prompt by typing this word in menu search
3.Start writing
Code:
cd C:\SDK\platform-tools
adb.exe
You will see
Code:
Android Debug Bridge version 1.0.29
-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 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] <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 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 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.
Don't freak out everything will be explained
4.Connect device and make sure that USB Debugging is enabled from Settings:Applicationsevelopment(on GB)
Settingseveloper Options(on ICS and HC)
5.Write
Code:
adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
Device name
6.There are common commands used on ADB:
Code:
adb reboot
adb reboot recovery
adb reboot bootloader
adb push C:\<directory>\file /sdcard/
adb pull /sdcard/file C:\<directory>\
adb install C:\<directory>/file.apk
or /sdcard/<directory>/file.apk
adb remount
Push and Pull means copy form directory to another
ADB Shell for in device commands
Code:
adb shell
#mv /sdcard/file /system/app
#cp /sdcard/file /system/app
#rm /sdcard/file
#mkdir /sdcard/yourfoldernamehere
#ls /sdcard/<directory>
Setting up fastboot: Your phone must be on bootloader
Code:
cd C:\SDK\platform-tools
Commands List:
Code:
fastboot devices – lists which devices in fastboot mode are currently attached to your computer
fastboot boot <filename> – boots a rom stored on your pc specified by the filename
fastboot flash <partition> <filename> – flashes a rom stored on your pc, partition can be one of {boot, recovery, system, userdata}
Example: fastboot flash recovery C:\<directory>\recovery.img
PS: When i wrote <directory> it means like C:\Users\Desktop\Desktop\file
Or you can put the file in the the platform-tools folder you created so
write Ex:
Code:
adb push file.apk /sdcard/
Got stuck with htc logo after the LeeDroid flash on my HTC
Hi All,
Good morning. I am very new with Android, I did the flash rom using Leedroid 4.3.0 I can flash it ok, but it said I use s-off so I need to extract the boot.img from rom.zip and flash it.
I have no idea how to flash it. Can anyone guide me step by step.
I tried the ADB.exe with CMD but no luck, although it say (sending boot <3853 kb> ... okay, writing boot... OKAY, I still cannot get it to work, after reboot, I still got stuck with htc logo.
I am using HTC flyer, HBOOT 6.10.1002
Thank you in advance for your help
you need to flash it when you are in bootloader using fastboot command:
fastboot flash boot boot.img
You are my first teacher......enjoyed it....Thanks a lot...
Incredible s stuck on loading
Hey All,
Here is my story -
Never felt the need of rooting my phone, until one of my relatives, done that for me. If I ever knew, that i will have so many problems, I would have never let him do that.
Moving on, I couldn't find a rom fitting myself, always had bugs, used too much of my battery, or so on. Got tired losing everything, everytime i had to change the rom, after finding a bug i couldn't stand. So, I came back to original rom 2.3.5. Thought i will just update and will have S-off phone with original software.
Somehow it didn't let me update, I stayed with that for few months, then one day i decided i can't stand the old soft, and started working on getting my phone back to s-on and original rom. Used Android flasher to flash this file engHBOOToverARX . The next step was to flash the original rom, via
Android flasher. But i couldn't find it on internet. Therefore i thought it's just gonna be easier and faster that i'll just go and scan for the update.
It found and finally was updating when I was happy i'll get back to normal phone. Unfortunately, It wouldn't load the software anymore, only the white screen with the HTC logo.
Bootloader still says
Revolutionary
Vivo PVT SHIP S-OFF RL
HBOOT - 6.13.1002
RADIO - 3822.10.08.28_M
eMMC - boot
Apr 1 2011, 18:34:39
I tried to follow the steps, on the cmd.
But it looks like it can not find the device.
My phone is connected to the computer via usb cable and on the bootloader menu.
PLEASE HELP ASAP.
I am using my old Nokia 6310i as the backup plan at the moment, and believe me it is not fun at all, uxcept the fact that I make everyone laugh
when I take it from my pocket
Titas
Where to start:
This is not a general help thread
This is not even in the Q&A forum
You have a VIVO which is an incredible s not SAGA (codename for desire s so you're in the wrong forum)
Sywepd form my DsereiS
explanation
"Setting up fastboot: Your phone must be on bootloader "
1st... what do you mean by "Your phone must be on bootloader" & how to do ??
2nd... I accessed this thread from another one concerning nabi II tablet rooting .... but I can't figure out the DIRECT importance to know that ...in regard to rooting the nabi II
.... is it essential ??
3rd.. can u please write the prompt commands in full manner ... as sometimes u use "\" or "/" eg:
"adb install C:\<directory>/file.apk
or /sdcard/<directory>/file.apk "
that's a little bit difficult ..thanks
ayanah said:
"Setting up fastboot: Your phone must be on bootloader "
1st... what do you mean by "Your phone must be on bootloader" & how to do ??
Click to expand...
Click to collapse
If you don't know that then you need to do A LOT of reading before attempting to play around with your device
ayanah said:
2nd... I accessed this thread from another one concerning nabi II tablet rooting .... but I can't figure out the DIRECT importance to know that ...in regard to rooting the nabi II
.... is it essential ??
Click to expand...
Click to collapse
I have no idea how you got here from the Nabi II forum - unless someone there felt that this was a decent guide to also use on the Nabi II
ayanah said:
3rd.. can u please write the prompt commands in full manner ... as sometimes u use "\" or "/" eg:
"adb install C:\<directory>/file.apk
or /sdcard/<directory>/file.apk "
that's a little bit difficult ..thanks
Click to expand...
Click to collapse
The OP is NOT going to rewrite his guide just for you after 6 months. Also, the difference between using '\' and '/' depends on whether you are using Windows or Linux - if you can't work that out then I would also suggest that you leave your device alone before you destroy it.
a reply
SimonTS said:
If you don't know that then you need to do A LOT of reading before attempting to play around with your device
I have no idea how you got here from the Nabi II forum - unless someone there felt that this was a decent guide to also use on the Nabi II
The OP is NOT going to rewrite his guide just for you after 6 months. Also, the difference between using '\' and '/' depends on whether you are using Windows or Linux - if you can't work that out then I would also suggest that you leave your device alone before you destroy it.
Click to expand...
Click to collapse
by the way .. in less than 1 hrs I used his guide to install programs from my PC (& I had no previous knowledge even where to start command prompt) on my old galaxy i5700 (use it for trials) ... I installed the programs using "adb install ....." & every thing is OK ... & I had successfully rooted my galaxy s6102 using another thread (not the one click programs) also every thing is OK ... I'd like to tell you I know about (rooting) less than 2 days ago ... so I think this is a good start for me ..... SO .. it would be appreciated to anyone who could answer me in short just showing little pit details & the pitfalls to avoid ...
also I thought"\" is where I copy from &"/" where I copy to i.e. concerning the direction of the path ... but I wasn't sure so I needed to get that explained
thanks for help but let OP take the decision HIMSELF.
referral thread :http://forum.xda-developers.com/showthread.php?t=1905674
I have been trying to do a factory reset of the Nabi 2, and since I can't seem to access the "Mommy Mode", I thought I could do it from the recovery menu. So far I have yet to find any factor reset option available. Is there such a beast or am I out of luck?
kcallis said:
I have been trying to do a factory reset of the Nabi 2, and since I can't seem to access the "Mommy Mode", I thought I could do it from the recovery menu. So far I have yet to find any factor reset option available. Is there such a beast or am I out of luck?
Click to expand...
Click to collapse
This is not the Nabi 2 forum...
And don't even know what the hell the "Mommy Mode" is, but with the command <adb reboot recovery> should bring you to the recovery.
Sent from my Nexus 7 using xda app-developers app
c.m.b said:
This is not the Nabi 2 forum...
And don't even know what the hell the "Mommy Mode" is, but with the command <adb reboot recovery> should bring you to the recovery.
Sent from my Nexus 7 using xda app-developers app
Click to expand...
Click to collapse
Actually, was able to get it sorted... I am not sure how I ended up posting on this thread, because I was replying on the Rooting Nabi thread... Weird!
If my USB debugging was off occurred when the soft brick, is there any way to get access via ADB?
My softbrick was caused by a bad file (framework-res.apk).
Is there any way to replace this file?
Nice work mOh19973 :good:
Your guide came in really handy for rooting the Nabi 2 that we got my son for Christmas. He'll be really excited once he sees that the Google play store is now available
Thanks,
Bodie
HELP!!!
mOh19973 said:
Definition:
ADB is the android debugging bridge that allows you to control your phone from your PC and is a bridge allowing you transfer stuff from it
Fastboot is usually used in bootloader and used a lot in unlocking your bootloader and commands in it
Setting up ADB:
1.Download the ZIP file from the attachments and extract it in C:\SDK\platform-tools (You will need to create these folders)
2. Go to command prompt by typing this word in menu search
3.Start writing
Code:
cd C:\SDK\platform-tools
adb.exe
You will see
Code:
Android Debug Bridge version 1.0.29
-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 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] <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 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 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.
Don't freak out everything will be explained
4.Connect device and make sure that USB Debugging is enabled from Settings:Applicationsevelopment(on GB)
Settingseveloper Options(on ICS and HC)
5.Write
Code:
adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
Device name
6.There are common commands used on ADB:
Code:
adb reboot
adb reboot recovery
adb reboot bootloader
adb push C:\<directory>\file /sdcard/
adb pull /sdcard/file C:\<directory>\
adb install C:\<directory>/file.apk
or /sdcard/<directory>/file.apk
adb remount
Push and Pull means copy form directory to another
ADB Shell for in device commands
Code:
adb shell
#mv /sdcard/file /system/app
#cp /sdcard/file /system/app
#rm /sdcard/file
#mkdir /sdcard/yourfoldernamehere
#ls /sdcard/<directory>
Setting up fastboot: Your phone must be on bootloader
Code:
cd C:\SDK\platform-tools
Commands List:
Code:
fastboot devices – lists which devices in fastboot mode are currently attached to your computer
fastboot boot <filename> – boots a rom stored on your pc specified by the filename
fastboot flash <partition> <filename> – flashes a rom stored on your pc, partition can be one of {boot, recovery, system, userdata}
Example: fastboot flash recovery C:\<directory>\recovery.img
PS: When i wrote <directory> it means like C:\Users\Desktop\Desktop\file
Or you can put the file in the the platform-tools folder you created so
write Ex:
Code:
adb push file.apk /sdcard/
Click to expand...
Click to collapse
When I go to command and type in adb.exe i get an error. Also when I try to download the file it doesn't let me have the option of saving the file to platform-tools. I have to move it there myself and then I extract the files. I've done this several different times and still keep coming up with same results on the command prompt! Please help!!!! Been working on this for 4 hours!!!
Once in directory you do not type adb.exe. just type
Adb devices
If your Android device is hooked into the USB it should be listed
Flyer
I am having major troubles trying to root my nabi 2 tablet. I tried replying on the actual thread but it wouldnt let me. If anyone can help me out please do. I've tried 2 ways which are pretty much the exact same.
1. download pdanet - install (whilst tablet is plugged in) and chose samsung and it shows up in devices as working fine
2. downloaded platform-tools and made SDK and platform-tools folder. I have the install files as well
3. Run cmd type cd C:\SDK\platform-tools. type adb.exe and it loads in.
4. Run install and chose option 1.
It goes to the option where I choose reboot kernal then it restarts and I get the green android icon with the red triangle with esclamation mark in it.
What am I doing wrong its been doing my head in for 3 days now if anyone can help it would be great. thanks
sweetpea8852 said:
When I go
Click to expand...
Click to collapse
In future, please don't quote the entire OP lie that when there is no need. It makes threads much more difficult to follow.
Klarkus said:
I am having major troubles trying to root my nabi 2 tablet. I tried replying on the actual thread but it wouldnt let me. If anyone can help me out please do. I've tried 2 ways which are pretty much the exact same.
1. download pdanet - install (whilst tablet is plugged in) and chose samsung and it shows up in devices as working fine
2. downloaded platform-tools and made SDK and platform-tools folder. I have the install files as well
3. Run cmd type cd C:\SDK\platform-tools. type adb.exe and it loads in.
4. Run install and chose option 1.
It goes to the option where I choose reboot kernal then it restarts and I get the green android icon with the red triangle with esclamation mark in it.
What am I doing wrong its been doing my head in for 3 days now if anyone can help it would be great. thanks
Click to expand...
Click to collapse
This is the Desire S forum. You may have been directed here, but we don't use Nabi tablets I'm afraid.
Nabi 2
Klarkus said:
I am having major troubles trying to root my nabi 2 tablet. I tried replying on the actual thread but it wouldnt let me. If anyone can help me out please do. I've tried 2 ways which are pretty much the exact same.
1. download pdanet - install (whilst tablet is plugged in) and chose samsung and it shows up in devices as working fine
2. downloaded platform-tools and made SDK and platform-tools folder. I have the install files as well
3. Run cmd type cd C:\SDK\platform-tools. type adb.exe and it loads in.
4. Run install and chose option 1.
It goes to the option where I choose reboot kernal then it restarts and I get the green android icon with the red triangle with esclamation mark in it.
What am I doing wrong its been doing my head in for 3 days now if anyone can help it would be great. thanks
Click to expand...
Click to collapse
Try this link
http://forum.xda-developers.com/showthread.php?t=1905674
i need some help in cammand propt for adb devices please. my problem is when i push enter on putting in adb devices it says emulator-5554 device and then my device underneath, i need to some how turn off the emulator because it will only finish process with one adb device. has anyone asked you about this before? can you help me?

ADB

Hello, I have a problem. I'm trying to do some things from my pc in the phone with the ADB Shell and not let me.
My problem is that I put adb: not found.
I do this:
i1141.photobucket.com/albums/n582/RyuuDrakonShis/7.png
Worth up here all right but when I have root permissions and everything working I put the commands and none let me get adb remount such or adb pull and nothing makes me adb: not found.
Thank you.
I'm not sure if that's a screenshot from your own computer or not.
On my computer adb resides in C:\adb. So when using it I type:
cd C:\adb
Then, to make sure it sees my device, I type.
adb devices
If it returns a device, great. Otherwise check your usb cable and driver.
I have a feeling you need to tell cmd prompt where to look for adb by using the cd (change directory) command.
For instance, if your adb install is located in C:\Users\User1\adb, you would type cd C:\Users\User1\adb, and hit enter.
adb stands or Android Debug Bridge. It's a command line tool that comes with the Android SDK (Software Development Kit). If you develop for Android, you should know where it is.
Anyway, in my case it's in C:\Program Files (x86)\Android SDK\platform-tools\adb.exe
Google Android SDK to get it.
If you have adb, and you're typing: adb shell, then you go to the Android shell. You don't need to type "adb" inside the shell again!
What I mean is:
Code:
adb shell ls
it's the same than:
Code:
adb shell
ls

[Q] .bat file to open adb shell?

I thought it would be nice to have a quick way to open adb shell, so I tried to make a .bat file to do so.
This is the code I put in the .bat file.
cd..
cd..
cd..
cd adt-bundle-windows-x86_64
cd sdk
cd platform-tools
adb
When I run the program, it runs through and closes.
Does anyone know what I did wrong?
moose392 said:
I thought it would be nice to have a quick way to open adb shell, so I tried to make a .bat file to do so.
This is the code I put in the .bat file.
cd..
cd..
cd..
cd adt-bundle-windows-x86_64
cd sdk
cd platform-tools
adb
When I run the program, it runs through and closes.
Does anyone know what I did wrong?
Click to expand...
Click to collapse
to open a adb shell the command is "adb shell"
EDIT
Oh and why not put all your cd commands into one command? ie.
cd ..................\adt-bundle-windows-x86_64\sdk\platform-tools
zacthespack said:
to open a adb shell the command is "adb shell"
EDIT
Oh and why not put all your cd commands into one command? ie.
cd ..................\adt-bundle-windows-x86_64\sdk\platform-tools
Click to expand...
Click to collapse
Sorry, I think I asked the wrong question. Im not trying to open adb shell but just adb.exe from the sdk.
The program I made seems to do the same thing as just double clicking on the adb.exe, but it is supposed to work correctly through cmd.
Maybe it is not running through cmd correctly?
moose392 said:
Sorry, I think I asked the wrong question. Im not trying to open adb shell but just adb.exe from the sdk.
The program I made seems to do the same thing as just double clicking on the adb.exe, but it is supposed to work correctly through cmd.
Maybe it is not running through cmd correctly?
Click to expand...
Click to collapse
When running via the command line you have to issue an argument to adb, e.g adb shell or adb devices etc etc
zacthespack said:
When running via the command line you have to issue an argument to adb, e.g adb shell or adb devices etc etc
Click to expand...
Click to collapse
Ok I replaced adb with adb devices, but cmd still closes itself.
moose392 said:
Ok I replaced adb with adb devices, but cmd still closes itself.
Click to expand...
Click to collapse
Yep, that's right. It would stay if you enter something like adb shell. A simple adb devices lists all the recognized devices via adb and the command is done.
Why are you trying to start adb? The cd to your adb folder should be enough to type commands or open the adb shell.
-star- said:
Yep, that's right. It would stay if you enter something like adb shell. A simple adb devices lists all the recognized devices via adb and the command is done.
Why are you trying to start adb? The cd to your adb folder should be enough to type commands or open the adb shell.
Click to expand...
Click to collapse
Ok thanks I figured things out.

adb push/pull with wildcards (or adb shell cp /foo/*/bar_*)

I've been working on a bash script that automates commonly used adb and fastboot commands. Its pretty much done, but I have one option I'm trying to incorporate that takes a backup (through the adb twrp interface) and automatically puts it on the host machine.
It needs to wildcard both the folder the backup is in, and the date I append to the backup name. From the research I've done adb push/pull doesn't accept wildcards for whatever reason. I've been playing around with adb shell, but adb shell can't communicate with the host machine (to cp the file back to it), and that makes sense since its a shell on the device.
So, how would you go about taking a backup on the remote device (through a command on the host machine), and then copying the backup to the host machine?
Code:
adb pull /data/media/0/TWRP/BACKUPS/*/backup_* /home/ninja/Downloads/
Doesn't work because adb doesn't accept wildcards.
Code:
adb shell cp /data/media/0/TWRP/BACKUPS/*/backup_* /home/ninja/Downloads/
Doesn't work because its trying to find
Code:
/home/ninja/Downloads/
on the remote device.
I'm pretty new to scripting/programing, so any and all relevant input would be greatly appreciated.
Anyone?

Categories

Resources