ADB freezes in Ubuntu 9.10 x64 - Android Software/Hacking General [Developers Only]

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

Related

[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

[Q] ADB command hang out

Hi All,
I am a newbie here. I issue following "adb shell getprop" adb command to retrieve device properties. This just hang out no output printed on the terminal or no prompt appears.
I then kill it at send "adb shell getprop ro.build.version.release" but it also just hang out.
I am working on ubuntu12.04. adb devices list one device which is connected.
Please help, how can I read device properties from adb (such as OS, model, manufacturer etc..)
My device is not rooted.
Many thanks!
IUA

Top cmds that you need to know

There are servel cmds which we can use
But I post only top 10 cmds to help that ones who need
###############
If I make a mistake so please reply with your suggestions
And if you want a cmd in the list .submit your reply with cmd and features ( full detail as you know.).
########cmds###########
For a lot of us, the fact that we can plug our Android phone or tablet into our computer and interact with it is a big plus. Besides the times when we've broken something and need to fix it, there are plenty of reasons why an advanced Android user would want to talk to his or her device. To do that, you need to have a few tools and know a few commands. That's what we're going to talk about today. Granted, this won't be the end-all be-all discussion of adb commands, but there are 10 basic commands everyone should know if they plan to get down and dirty with the command line.
The tools are easy. If you're a Mac or Linux user, you'll want to install the SDK as explained at the Android developers site. It's not hard, and you don't have the whole driver mess that Windows users do. Follow the directions and get things set up while I talk to the Windows using folks for a minute.
If you're using Windows, things are easier and harder at the same time. The tools themselves are the easy part. Download this file. Open the zip file and you'll see a folder named android-tools. Drag that folder somewhere easy to get to. Next, visit the manufacturers page for your device and install the adb and fastboot drivers for Windows. You'll need this so that your computer can talk to your Android device. If you hit a snag, visit the forums and somebody is bound to be able to help you through it.
Now that we're all on the same page, enable USB debugging on your device (see your devices manual if you need help finding it, and remember it was hidden in Android 4.2), and plug it in to your computer. Now skip past the break and let's begin!
1. The adb devices command
The adb devices command is the most important one of the bunch, as it's what is used to make sure your computer and Android device are communicating. That's why we're covering it first.
If you're a pro at the operating system on your computer, you'll want to add the directory with the Android tools to your path. If you're not, no worries. Just start up your terminal or command console and point it at the folder with the tools in it. This will be the file you downloaded earlier if you use Windows, or the platform-tools folder in the fully installed Android SDK. Windows users have another easy shortcut here, and can simply Shift + right click on the folder itself to open a console in the right spot. Mac and Linux users need to navigate there once the terminal is open, or install an extension for your file manager to do the same right click magic that's in Windows by default.
Once you're sure that you are in the right folder, type "adb devices" (without the quotes) at the command prompt. If you get a serial number, you're good to go! If you don't, make sure you're in the right folder and that you have the device driver installed correctly if you're using Windows. And be sure you have USB debugging turned on!
Now that we have everything set up, let's look at a few more commands.
2. The adb push command
If you want to move a file onto your Android device programmatically, you want to use the adb push command. You'll need to know a few parameters, namely the full path of the file you're pushing, and the full path to where you want to put it. Let's practice by placing a short video (in my case it's a poorly done cover of the Rick James tune Superfreak) into the Movies folder on your device storage.
I copied the superfreak.mp4 file into the android-tools folder so I didn't need to type out a long path to my desktop. I suggest you do the same. I jumped back to the command line and typed "adb push superfreak.mp4 /sdcard/Movies/" and the file copied itself to my Nexus 4, right in the Movies folder. If I hadn't dropped the file into my tools folder, I would have had to specify the full path to it -- something like C:\Users\Jerry\Desktop\superfreak.mp4. Either way works, but it's always easier to just drop the file into your tools folder and save the typing.
3. The adb pull command
If adb push sends files to your Android device, it stands to reason the adb pull command gets them out. That's exactly what it does, and it works the same way as the adb push command did. You need to know both the path of the file you want to pull off, as well as the path you want it placed into. You can leave the destination path blank and it will drop the file into your tools folder to make things easy.
In this example, I did it the hard way so you can see what it looks like. The path of the file on the device is "/sdcard/Movies/superfreak.mp4" and I put it on my Windows 8 desktop at "C:\Users\Jerry\Desktop". Again, the easy way it to just let it drop into your tools folder by not giving a destination, which would have been "adb pull /sdcard/Movies/superfreak.mp4". Remember your forwards slash for the Android side, and you'll have no problems here.
5. The adb reboot-bootloader and adb reboot recovery commands
Not only can you reboot your device, you can specify that it reboots to the bootloader. This is awfully handy, as sometimes those button combos are touchy, and if you have a lot of devices you can never remember them all. Some devices (the LG Optimus Black comes to mind) don't even a way to boot to the bootloader without this command. And once again, being able to use this command in a script is priceless. Doing it is easy, just type "adb reboot-bootloader" and hit the enter key.
Most devices can also boot to the recovery directly with the "adb reboot recovery" (note there is no hyphen in this one) and some can't. It won't hurt anything to try, and if yours can't nothing will happen.
6. The fastboot devices command
When you're working in the bootloader, adb no longer works. You're not yet booted into Android, and the debugging tools aren't active to communicate with. We use the fastboot command in it's place.
Fastboot is probably the most powerful tool available, and many devices don't have it enabled. If you're does, you need to be sure things are communicating. That's where the fastboot devices command comes into play. At the prompt, just type in "fastboot devices" and you should see a serial number, just like the adb devices command we looked at earlier.
If things aren't working and you are using Windows, you likely have a driver issue. Hit those forums for the answer.
7. The fastboot oem unlock command
The holy grail of Android commands, fastboot oem unlock does one thing, and one thing only -- unlocks your Nexus device (or an HTC device using their official tool). If you're using a phone from a different manufacturer, you have a different method of unlocking things -- maybe with ODIN or .sbf files -- and this won't apply to you. We're including it because even if you don't need it, it's an important part of Android's openness. Google doesn't care what we do with phones or tablets that we've bought, and include this easy way to crack them open. That's something you usually don't see from any tech company, and a big part of the reason why many of us choose Android.
Using it is easy enough. Once you've used fastboot devices to make sure everything is communicating, just type "fastboot oem unlock" at the prompt and hit enter. Look at your device, read carefully, and choose wisely.
Protip: Using "fastboot oem unlock" will erase everything on your device
8. The adb shell command
The adb shell command confuses a lot of folks. There are two ways to use it, one where you send a command to the device to run in its own command line shell, and one where you actually enter the device's command shell from your terminal. In the image above, I'm inside the device shell, listing the flies and folders on the device. Getting there is easy enough, just type "adb shell" and enter. Once inside, you can escalate yourself to root if you need to. I'll warn you, unless you're familiar with an ash or bash shell, you need to be careful here -- especially if you're root. Things can turn south quickly if you're not careful. If you're not familiar, ash and bash are command shells that a lot of folks use on their Linux or Mac computers. It's nothing like DOS.
The other method of using the adb shell command is in conjunction with one of those Ash commands your Android device can run. You'll often use it for more advanced tasks like changing permissions of files or folders, or running a script. Using it is easy -- "adb shell <command>". An example would be changing permissions on a file like so: "adb shell chmod 666 /data/somefile". As mentioned, be very careful running direct commands using these methods.
9. The adb install command
While adb push can copy files to our Android devices, adb install can actually install .apk files. Using it is similar to use the push command, because we need to provide the path to the file we're installing. That means it's always easier to just drop the app you're installing into your tools folder. Once you've got that path, you tell your device to sideload it like this: "adb install TheAppName.apk".
If you're updating an app, you use the -r switch: "adb install -r TheAppName.apk". There is also a -s switch which tries to install on the SD card if your ROM supports it, and the -l switch will forward lock the app (install it to /data/app-private). there are also some very advanced encryption switches, but those are best left for another article.
And finally, you can uninstall apps by their package name with "adb uninstall TheAppName.apk". Uninstall has a switch, too. The -k switch will uninstall the app but leave all the app data and cache in place.
10. The adb logcat command
The adb logcat command is one of the most useful commands for some folks, but just prints a bunch of gibberish unless you understand what you're seeing. It returns the events written to the various logs in the running Android system, providing invaluable information for app developers and system debuggers. Most of us will only run this one when asked by one of those developers, but it's very important that we know how to use it correctly.
To see the log output on your computer screen, just type "adb logcat" and hit enter. Things can scroll by pretty fast, and chances are you won't find what you're looking for. There are two ways to handle this one -- filters, or text output.
You also have to specify the cmds properly.
Hope it help you .
Like my work hit thanks button.
$$$$$$$$$$$$$$$$$$$$$$$$
Any suggestions most welcome.
$$$$$$$$$$$$$$$$$$$$$$$$$

ADB Emulator 5554 offline

When I connect my pixel to my pc and go to adb, i'm seeing 2 devices on "adb devices" prompt
xxxxxxxxxxxx (the model for my phone)
emulator 5554 offline
this is since i updated my pixel xl onto Oreo.
I can use -d for adb commands, but the presence of the offline emulator means i can't fastboot command as it wont accept the -d in the string to select the phone.
I've checked online (lots) to try to see how to remove it, but does anyone have any ideas how i can remove the offline emulator (i don't even use an emulator) from my adb devices?
same problem here, and I don't have bluestack!

[ADB][UBUNTU] Same command on several devices in parallel

I need to manually root a lot of devices in as short a time as possible. I would like to do this with ADB but I don't know how to use ADB to perform the same commands on more than one device at a time. I found this Stack Overflow (that I'm not allowed to post the link to) and this Github (that I also can't post a link for call adb-wrapper) so I've been trying to use these shell scripts in Ubuntu (I am a complete noob at Linux). I wrote a simple little "Hello World" shell script and ran it from CMD prompt just to see how they work. And I managed to get the Stack Overflow script to work (I think) to call ADB devices and engage the debugging authorization on 5 devices at a time. That was great! I just copied the script into the Ubuntu Bash and called it in CMD Prompt and then ran the command: ADB devices. But when I tried adb reboot-bootloader I got the more than one device is attached warning. So I tried implementing the Github one and I just can't get it to work. I was close but my $ANDROID_HOME path was wrong and when I tried to fix it I think I just broke everything. Now whenever I run adb (anything) it just prints out ADB guidelines like commands to use and what they do. I'm at the point where any bug I Google is returning nothing useful.
I need to run the following ADB commands in parallel:
adb reboot-bootloader
fastboot oem unlock
fastboot boot recovery.img
Help?
run adb command in parallel
jaynesbluewish said:
I need to manually root a lot of devices in as short a time as possible. I would like to do this with ADB but I don't know how to use ADB to perform the same commands on more than one device at a time. I found this Stack Overflow (that I'm not allowed to post the link to) and this Github (that I also can't post a link for call adb-wrapper) so I've been trying to use these shell scripts in Ubuntu (I am a complete noob at Linux). I wrote a simple little "Hello World" shell script and ran it from CMD prompt just to see how they work. And I managed to get the Stack Overflow script to work (I think) to call ADB devices and engage the debugging authorization on 5 devices at a time. That was great! I just copied the script into the Ubuntu Bash and called it in CMD Prompt and then ran the command: ADB devices. But when I tried adb reboot-bootloader I got the more than one device is attached warning. So I tried implementing the Github one and I just can't get it to work. I was close but my $ANDROID_HOME path was wrong and when I tried to fix it I think I just broke everything. Now whenever I run adb (anything) it just prints out ADB guidelines like commands to use and what they do. I'm at the point where any bug I Google is returning nothing useful.
I need to run the following ADB commands in parallel:
adb reboot-bootloader
fastboot oem unlock
fastboot boot recovery.img
Help?
Click to expand...
Click to collapse
Hi jaynesbluewish,
I too want to run adb commands in parallel. Can you let me know if you have found the solution to this..
Please share the steps you followed..

Categories

Resources