Adb command - Android Software/Hacking General [Developers Only]

Is there an adb command to launch an apk from your phone or pc
Sent from my SCH-I500 using XDA App

Take a look here: http://forum.xda-developers.com/showthread.php?t=580291
NOTE: that is for the phones terminal in an app such as Terminal Emulator. From the computer just type "adb shell" then you are in the phones terminal and can run those commands.

Related

ADB freezes in Ubuntu 9.10 x64

I recently set up Ubuntu Karmic on my laptop's second hard drive, and I finished setting up Eclipse and the Android SDK yesterday. I set up ADB to work directly from the terminal without changing to the SDK Tools directory, and it works... kind of. I can get some ADB commands working, but most others won't. The only things that really work are "adb help" and "adb devices" at the moment. "adb install", "adb push" / "adb pull", and other similar commands seem to register, but then nothing happens after that- the terminal freezes, and inputting keys shows other characters. ]]^A and stuff like that. Can anyone help?
Ubuntu 9.10x64 adb works with sudo
$ sudo adb push...
I usually make sure the first adb command I use is sudo'd so it starts the daemon as root.
adb help - does not send any data to your droid. It's internal
adb device - shows which devices are on the USB bus.
The other adb command need to talk to the devices and depending on how your udev protections, device protections, and your personal group memberships are... it may not work.
sudo works for me always.
Ehud

SuperCID on Mac OSX

Okay, I'm about to pull my hair out. I've Googled this, I've looked for YouTube videos for this, and I've even looked on here for this.
I found one post about obtaining SuperCID on Mac, but the post ends with no real solution (that I can see).
I'm trying to get SuperCID but I do not own a Windows PC. I downloaded the SDK for Mac on the Android Dev site, but what now? I don't know where to go from there.
Can anyone help me?
Sent From My HTC Sensation 4G Using XDA Premium
Bump to the top.
Sent From My HTC Sensation 4G Using XDA Premium
Avoid trouble. Visit someone with real computer before you'll brick your Sensation.
Mike
sp5it said:
Avoid trouble. Visit someone with real computer before you'll brick your Sensation.
Mike
Click to expand...
Click to collapse
I've seen it's possible, it just wasn't explained In detail.
Sent From My HTC Sensation 4G Using XDA Premium
Set up adb (make sure you have the htc drivers), open utilities, then terminal, cd to your adb directory, write in commands from dev section with ./ in front (ex: ./adb devices)
Couldn't you use VirtualBox on your mac to install linux (ubuntu or something) and do it the proper way using revolutionary.io and the android SDK?
Behold_this said:
Set up adb (make sure you have the htc drivers), open utilities, then terminal, cd to your adb directory, write in commands from dev section with ./ in front (ex: ./adb devices)
Click to expand...
Click to collapse
I thought the drivers could only be set up on Windows.
Sent From My HTC Sensation 4G Using XDA Premium
[GUIDE] Set up ADB & fastboot on Mac OSX
Make sure you have already downloaded the ADB & fastboot files and that they at located in a directory that is easy for you to find (example: /Users/home/Android-sdk/platform-tools).
1) you have two options for using ADB & fastboot:
open terminal and navigate to your directory containing ADB and fastboot **if using this method skip to step 5, also you should note that you will need to add "./" (without the quotes) to the beginning of each ADB or fastboot command (example: ./adb devices)**
configure ADB & fastboot to run natively (recommended) **if using this method proceed to next step**
2) make an entry in ~/.bash_profile configuration file by executing the following command in terminal:
Code:
nano ~/.bash_profile
3) the corresponding file will open in a text editor window, add the following line of text, save your changes, and exit text editor:
Code:
export PATH=${PATH}:your_sdk_dir
(example: export PATH=${PATH}:/Users/home/android-sdk/platform-tools)
4) execute the following command in terminal, then quit terminal:
Code:
source ~/.bash_profile
5) check if all is working by entering the following command in terminal (your phone should be connected to your Mac via USB and must have USB debugging enabled):
Code:
adb devices
(you should see your device serial number returned. if device is not found move on to step 6)
6) if necessary, install HTC driver, and run the above command again - can be done by:
installing naked htc driver (can be found in dev section)
installing PDAnet which installs the drivers for many Android devices
Behold_this said:
Make sure you have downloaded the ADB & fastboot files and that they at located in a directory that is easy for you to find (example: Users/home/Android-sdk/platform-tools).
1) you have two options for using ADB:
open terminal and navigate to your directory containing adb **if using this method skip to step 5
configure adb to run natively **if using this method proceed to next step
2) make an entry in ~/.bash_profile configuration file by typing the following command in terminal:
Code:
nano ~/.bash_profile
3) a new file will open in a text editor, add the following line to text file and save:
Code:
export PATH=${PATH}:your_sdk_dir
(example: export PATH=${PATH}:Users/home/android-sdk/platform-tools)
4) type the following command in terminal then quit terminal:
Code:
source ~/.bash_profile
5) install HTC driver, can be done by:
installing naked htc driver (can be found in dev section)
installing PDAnet which installs the drivers for many Android devices
6) check if all is working by entering the following command in terminal:
Code:
adb devices
(you should see your device serial number returned)
7) follow steps as normal for superCID by entering fastboot commands in terminal (found in dev section)
Click to expand...
Click to collapse
Thanks man.

[Q] ADB Push not working

My "adb push" command is not working. When I type it in, the command prompt seems to run "adb help". No error message, just the list of possible commands. See the attached screenshot.
Does anybody know what's happening?
Computer: Windows 7
Device: Verizon Galaxy Nexus (toro)
Version: 4.2.2​Kernel Version: 3.0.85-franco.Kernel-nightly​Build: JDQ39​
The "adb push" command is used to push files to your device.
Typing "adb push" won't do anything besides displaying all the adb functions.
To push something, your command must be something like "adb push whateverthefileis system/bin" the "system/bin" is the destination where it is to be pushed, for example if you want to push an app you do, "adb push android.apk system/app"
Make sure your drivers for phone is installed properly.
IF I HELPED HIT THANKS
Click to expand...
Click to collapse
Sent from my Nexus F...Fi...Fii...Ahem...*clears throat*... Five.
solution???
Did you put your phone in recovery mode first?
krishneelg3 said:
The "adb push" command is used to push files to your device.
Typing "adb push" won't do anything besides displaying all the adb functions.
To push something, your command must be something like "adb push whateverthefileis system/bin" the "system/bin" is the destination where it is to be pushed, for example if you want to push an app you do, "adb push android.apk system/app"
Make sure your drivers for phone is installed properly.
Sent from my Nexus F...Fi...Fii...Ahem...*clears throat*... Five.
Click to expand...
Click to collapse
I had typed in the correct syntax for the command, but will try updating drivers. Thanks!
ADB push just scrolls commands
I am trying to use ADB with telnet to root my Droid Maxx. I have been desperately trying to use Jcase's method. All my commands work, except the push command. I can telnet, my drivers are all up to date, my phone is on debug, install unknown sources etc...Everything seems to be in order, but the su and RockMyMoto.jar will not push, just a scrolling of commands. Any help would be most appreciated.
Thank you

ADB commands

Hey,
Having problems for entering ADB codes. How do you enter something like $ fastboot oem lock. Thanks
try
"adb shell" press enter
"su" press enter
now you have the "$" at start of the command
Sent from my GT-P3100 using XDA Free mobile app
You type that command in a command line on your computer if you have adb and fastboot installed and your phone is plugged via usb.
$ is basically a sign for command line in linux, your line starts with $ for a normal user and # for root.
To sum up, if you see something starting with $, that means it is a command.
Search the forums for more info about installing adb and fastboot if you didn't already.

Is it possible to do adb operations from android phone itself, without a computer?

I have seen discussions online such as this:
https://stackoverflow.com/questions/12634280/what-is-a-adb-daemon
If I understand the answers give there correctly, whenever I use an adb command on my computer connected to a smartphone, the reason it does anything is because there is a background process adbd, the adb daemon, running on the smartphone. Everything I see on the computer screen when I issue an adb command is the result returned by the adbd daemon.
a) Is this correct? Is this how adb is supposed to work?
b) If it is correct, is there any way to programmatically enable/disable/re-enable the adbd process? Can I programmatically interact with adbd at all (either through Java or NDK)? Can I use adbd from the android phone itself and perform actions performed using adb, without using a computer?
I am hoping to do this on a non rooted device, but if not, any kind of device will do.
mahaju said:
I have seen discussions online such as this:
https://stackoverflow.com/questions/12634280/what-is-a-adb-daemon
If I understand the answers give there correctly, whenever I use an adb command on my computer connected to a smartphone, the reason it does anything is because there is a background process adbd, the adb daemon, running on the smartphone. Everything I see on the computer screen when I issue an adb command is the result returned by the adbd daemon.
a) Is this correct? Is this how adb is supposed to work?
b) If it is correct, is there any way to programmatically enable/disable/re-enable the adbd process? Can I programmatically interact with adbd at all (either through Java or NDK)? Can I use adbd from the android phone itself and perform actions performed using adb, without using a computer?
I am hoping to do this on a non rooted device, but if not, any kind of device will do.
Click to expand...
Click to collapse
Yes, but it requires having a rooted device and the terminal emulator app. Or you can install TWRP and use the terminal emulator that is built into TWRP.
Sent from my SM-S767VL using Tapatalk
reply to answer
Droidriven said:
Yes, but it requires having a rooted device and the terminal emulator app. Or you can install TWRP and use the terminal emulator that is built into TWRP.
Sent from my SM-S767VL using Tapatalk
Click to expand...
Click to collapse
I have an old rooted samsung phone with android 4.2.2
Is there any sample code on how I can interact with the adbd daemon? In the terminal emulator if I type "adb shell" it says starting daemon but then it says device not found. how would I do some basic stuff (like take a screen shot using "adb shell screencap" for example? Can I interact with it programmatically from java or ndk?
mahaju said:
I have an old rooted samsung phone with android 4.2.2
Is there any sample code on how I can interact with the adbd daemon? In the terminal emulator if I type "adb shell" it says starting daemon but then it says device not found. how would I do some basic stuff (like take a screen shot using "adb shell screencap" for example? Can I interact with it programmatically from java or ndk?
Click to expand...
Click to collapse
When using terminal emulator, it uses the same commands as adb shell(not the standard adb), but you remove "adb shell" from the commands. For example, in terminal emulator, it is:
reboot recovery
Instead of:
adb reboot recovery
Or
adb shell reboot recovery
Also, before running your commands in terminal emulator, you need to use the su command by typing:
su (then press enter, grant the app superuser/root permissions)
Then you can run the rest of your commands.
Sent from my SM-S767VL using Tapatalk

Categories

Resources