[Q] Setting up Android SDK on Ubuntu 10.4 x64 - Hero, G2 Touch Q&A, Help & Troubleshooting

Alrighty, I am new to the linux world and I am trying to setup my beloved adb on my Ubuntu. Java is there, SDK in in /opt/androidsdk. Do I need something more? I read that people install Eclipse also but since I am not a developer I don't need it, do I? I only need to execute very simple adb commands like push.
With Windows I needed the HTC Hero drivers and then it worked like a charm. Do I need something similar here?
I tried to run adb devices while my phone was connected and I get a phone with ?????????? as a name.
Is adb going to work or do I miss something?
Thanks in advance!

Adb works fine on x64 Ubuntu. I know there is a guide for it on www.villainrom.co.uk/wiki, but then search "adb" and it should bring up the entry.
I'm installing Ubuntu again today anyway, so I can check it works (which it does btw)

theodore80 said:
Alrighty, I am new to the linux world and I am trying to setup my beloved adb on my Ubuntu. Java is there, SDK in in /opt/androidsdk. Do I need something more? I read that people install Eclipse also but since I am not a developer I don't need it, do I? I only need to execute very simple adb commands like push.
With Windows I needed the HTC Hero drivers and then it worked like a charm. Do I need something similar here?
I tried to run adb devices while my phone was connected and I get a phone with ?????????? as a name.
Is adb going to work or do I miss something?
Thanks in advance!
Click to expand...
Click to collapse
Try doing this.
sudo adb kill-server
sudo adb root
then do w/e you need to do. This worked for me.
Not sure if you need to sudo kill-server, if it doesnt kill it, try without

ante0 said:
Try doing this.
sudo adb kill-server
sudo adb root
then do w/e you need to do. This worked for me.
Not sure if you need to sudo kill-server, if it doesnt kill it, try without
Click to expand...
Click to collapse
I did this followed by adb devices and I now get the correct device name.
I guess that it works though I didn't try to push any app
Another question: how do I add adb to the path? I currently need to type in the full adb path. It is linux related but I am new into this exciting world!!
Thanks for helping me out!

Google "Ubuntu add to path" and it will tell you

Related

[Q] how to get adb running on my vibrant

i downloaded the sdk and i downloaded a samsung galaxy driver and when i look for my phone in the command line it just doesnt show up. theunlockt just isnt helping. anybody got a good link for dummies?
antonio91282 said:
i downloaded the sdk and i downloaded a samsung galaxy driver and when i look for my phone in the command line it just doesnt show up. theunlockt just isnt helping. anybody got a good link for dummies?
Click to expand...
Click to collapse
Did you put your phone in debug? Settings>Applications>Development
yes. and i been going over the directions repeatedly on theunlockr. im running xp 32 i believe
ADB for Dummies: Download http://de.codeplex.com/
- Once installed... open command prompt:
cd C:\Program Files\Droid Explorer\SDK\tools
Click to expand...
Click to collapse
- <type your ADB command here> e.g.
adb shell
Click to expand...
Click to collapse
^ yeah...
adb devices
Click to expand...
Click to collapse
should show your device...
To the OP, I don't know if this is the case for you but I changed my path on my Windows PC like the guides said to and that didnt completely work. (Maybe neede a restart). But in any case if you go to the command prompt, change directories to were you have adb and run your commands from there, it works like a charm.
For example if you unzip the the SDK in your download directory, open up the command line and type:
cd C:\Documents and Settings\<your user name>\Downloads\<whatever-you-named-the-unzipped-folder>\tools
ADB is in the tools directory you just went to. From here you can run the adb command without having to set up the system paths. This is a quick and dirty explanantion and might not even work for you. I was running this on Windows XP when I had this problem. Same thing had to be done on my Ubuntu Linux box b/c I'm to lazy to set up paths on that one, lol.
zephiK said:
ADB for Dummies: Download http://de.codeplex.com/
- Once installed... open command prompt:
- <type your ADB command here> e.g.
Click to expand...
Click to collapse
Oops, didnt see that you allready posted this. Yea do what zephiK says and it should work.
i have not been able to get adb to work no matter what i did (i am using xp) and i have been trying since i had the htc magic last year. here is how i recently got it working.
i downloaded the one-click root zip file and unzipped it. inside there is a adb.exe file. i clicked it and then then made sure my phone was in debugging mode and connected to my pc and used the command prompt to point to where adb is in my android sdk which for me is cd\androidsdk\tools
adb devices
i hit enter after tools and enter after devices and now it works. not sure why but it does. i couldnt get my magic, my nexus one or even the galaxy to work until i did this.
i got everything done. i think? only problem is im getting $ sign instead of # sign. any ideas?
i got adb working. thanks everyone.
A thread success story without any casualties. Almost makes me weep.

[Solved] n00b needs help with adb and Ubuntu

Hi all,
I searched quite a lot, but seems to me not nearly enough. I've been using adb on my Windows 7 machine for a while now, but would like to have adb at work on my Ubuntu 11.04 machine where I am going to start some boring development.
I have installed the sdk and eclipse and and and (if it is important WHAT I installed more than this, I will elaborate)
lsusb returns
Code:
Bus 002 Device 009: ID 04e8:689e Samsung Electronics Co., Ltd
so I have set my
/etc/udev/rules.d/51-android.rules
to reflect like this:
Code:
SUBSYSTEM=="usb",ATTRS{idVendor}=="04e8",ATTRS{idProduct}=="689e",SYMLINK+="android_adb",MODE="0666
I'm kinda hoping this is wrong and there is an easy fix that I can laugh about.
When I have the emulator running and my phone plugged in
Code:
$sudo adb devices
returns a blank line and something about an emulator, only emulator running yields no blank line and only phone plugged in yields a nice and quiet blank line.
I had this on Windows as well when I struggled with drivers, but the CD sorted it out. I read that the necessary drivers comes with the SDK, but I might be wrong.
I have tried different tutorials and different values for the idProduct and idVendor as some tutorials claim they should be kept constant and not vary per phone... I restarted adb each time I made a change with
Code:
$sudo adb kill-server; sudo adb start-server; sudo adb devices
I'm currently running FirstUA v1.2 if that changes anything.
If you need more info, don't hesitate to ask, I know it's easier to solve problems with the right info (coming from an IT helpdesk).
Digi.Gram said:
Hi all,
I searched quite a lot, but seems to me not nearly enough. I've been using adb on my Windows 7 machine for a while now, but would like to have adb at work on my Ubuntu 11.04 machine where I am going to start some boring development.
I have installed the sdk and eclipse and and and (if it is important WHAT I installed more than this, I will elaborate)
lsusb returns
Code:
Bus 002 Device 009: ID 04e8:689e Samsung Electronics Co., Ltd
so I have set my
/etc/udev/rules.d/51-android.rules
to reflect like this:
Code:
SUBSYSTEM=="usb",ATTRS{idVendor}=="04e8",ATTRS{idProduct}=="689e",SYMLINK+="android_adb",MODE="0666
I'm kinda hoping this is wrong and there is an easy fix that I can laugh about.
When I have the emulator running and my phone plugged in
Code:
$sudo adb devices
returns a blank line and something about an emulator, only emulator running yields no blank line and only phone plugged in yields a nice and quiet blank line.
I had this on Windows as well when I struggled with drivers, but the CD sorted it out. I read that the necessary drivers comes with the SDK, but I might be wrong.
I have tried different tutorials and different values for the idProduct and idVendor as some tutorials claim they should be kept constant and not vary per phone... I restarted adb each time I made a change with
Code:
$sudo adb kill-server; sudo adb start-server; sudo adb devices
I'm currently running FirstUA v1.2 if that changes anything.
If you need more info, don't hesitate to ask, I know it's easier to solve problems with the right info (coming from an IT helpdesk).
Click to expand...
Click to collapse
The SDK Drivers are not for Galaxy Ace , Google for the drivers , they should be easy to find
Sent from my Ultma Weapon using XDA App
It seems that my problem begins with our Proxy server.... As the SDK manager and I had a quarrel about authentication, I downloaded some of the packages directly and forced the manger to use them instead of those on Google. With this, I accidentally downloaded an outdated adb, which had problems specifically with the Galaxy line of phones.... Downloading the correct package now, will see if it works better
Maybe I must just stop before I think of continuing I installed the newer r06 version, and my device is picked up, but now adb shell gives me this:
Code:
:~$ adb devices
List of devices attached
S58300c017faf device
:~$ adb shell
sh: applet not found
Any ideas where to look for the applet? Maybe I must continue tomorrow, new day new ideas.
Do you have Debugging turned on? And is the device rooted with Busybox? I assume yes since you're running a custom ROM but double checking.
If you're having trouble, I'd either: a) run a VM with XP SP3; b) head to the Android Q&A board here.
mmm, I never though of looking at that, since I figured they do say busybox is installed on this ROM, but thanx for nudging me into that direction, I found this post from ketut.kumajaya so I'm looking into that. Had some issues with not abling to get rw access, but my only problem there was a spelling error in the terminal.
I still get the error with the sh: applet not found, even after I tried the advice on that link. I tried installing all 3 versions shipped with BusyBox Installer on all 3 locations, still nothing. Just had an idea I'll try, if you invoke sh in linux you get a new shell, when I invoke sh I get the applet not found error. Maybe I should upgrade my sh or something. Worth a try
I am running a VM for the VB programming I do at work, but that doesn't have USB support (to much trouble to reinstall Virtual Box now just for USB support). Last night I tested on Windows 7 (first time since I started using this ROM) and it failed with the same error. I'm sure it's the sh that's broken or something. Will test on my wife's phone tonight (running the same ROM).
Thanx for your ideas so far. That's what I love about an online community, even if you don't exactly know what's wrong, people sling ideas around that nudge you in the right direction. One error message at a time
Solved thanx to Ketut
Thanx for all your help guys.

Im going CRAZY trying to root!

Heres the deal. I have a MAC with a newly installed hard drive. On my old hard drive I had everything setup with SDK and Adb but that was when I had an HTC Hero. My problem is this: When in terminal my damn computer keeps prompting me for a password but it doesnt allow me to type anything except control C which aborts the program. It never was like that with the old hard drive.
2. Ive dl SDK for MAC unzipped it and saved it to my desktop and my hard drive.
3. When I click on tools it says "adb_has_moved.txt"
4. It says the adb tool has moved to platform-tools/ and if you dont see this directory in your SDK, launch the SDK and AVD manager and install "android SDK Platform-tools and also update my path environment variable to include the platform-tools/ directory, so I can execute adb from any location. What the heck does this mean and how do I fix it. Also how do I know if SDK is installed correctly.
5. I DL some version of eclipse that was recommended from SDK but I dont know how to use that either.
6. I have tried all the root methods shown here in XDA except the on with the Dock since I dont have a dock.
7. Also ADB does not recognize my device and my debug is selected. I cannot get it to find my device.
8. One last question when some instructions say unzipped and move the root exploit to /data/tmp/ is that the file labeled under sdcard/data or is it the one inside the Android Folder listed as "data"
Please anyone help if possible.
let me try that
Stupid question but How do I launch SDK?
laraiza said:
Stupid question but How do I launch SDK?
Click to expand...
Click to collapse
Make sure your phone has USB Debugging Mode enabled. Otherwise, adb will not recognize your device.
Check this thread: http://forum.xda-developers.com/showthread.php?t=879701
However, you will have to modify for MAC.
In my opinion the easiest way to root the Photon is still using the dock method. Otherwise, try the One Click Root method (Torpedo) as mentioned above. Then you don't have to worry about issuing all the commands.
I got it done I got it done. What I did was borrow my daughters windows netbook and the one click method worked on the first try. Thanks to all who replied. I will definitely hit your thanks buttons.
Sent from my MB855 using XDA App
im sorry.. my tool was a one click i dint think i needed to give it instructions.. especially teh part of how to run it on your computer... just fyi.. when invoking sudo (to do things as admin/root) on your computer. you are asked to enter in your password.. as a privacy/security feature it will NOT display any characters.. ergo it looks blank...
as you arent teh first one to run into this issue ill add instructions for mac users ( i know anyone running linux can figure out how to run a bash script, and windows users have a bat file after installing 209387249087 drivers... but they still figure it out ;P)

[SOLVED] Adb won't update to 1.0.31 from 1.0.26

I've tried on windows 7 and Ubuntu 12.10 and no matter what I do,no matter how many times I update the SDK or uninstall and reinstall the SDK,ADB version is still 1.0.29...tried killing server,restarting adb, etc.
Trying to ./extract files from cm10.1 for compiling CM but ADB must be updated to connect to JB devices...
Someone please help!!! I've googled for hours and tried everything..still getting nowhere.
Sent from my SAMSUNG-SGH-I727 using Tapatalk 2
:SOLVED FOR ME:
so what i did (and i dont know why all of a sudden its working) but,
i opened up the terminal and did the following
lsusb
This should kick out a list of plugged in devices. Most likely the last one is the phone. There were references to Samsung and Galaxy so it was pretty easy to figure out. On that same line, there is an ID number in this format...xxxx:xxxx. Write that number down for reference.
Now a few more commands:
cd
sudo gedit /etc/udev/rules.d/99-android.rules
When the rules open, copy/paste the following with the id "lsusb" gave you:
replace the ####:#### in the above string of text with the number you got from "lsusb"
Then save and exit.
sudo service udev restart
sudo adb devices
# XXXXXXXXXXXX offline
sudo ./extract-files.sh
GOT THE WINDOW POPUP ON MY PHONE
check always accept from this computer
then everything went smoothly....hope this somehow or another helps someone...if it does,please hit thanks.
in Ubuntu, once you update the SDK , copy the adb file in SDK/platform-tools to /usr/bin
reboot Ubuntu and try .
i don't use windows sorry
Sent from my GT-S5670 using xda premium
soham jambhekar said:
in Ubuntu, once you update the SDK , copy the adb file in SDK/platform-tools to /usr/bin
reboot Ubuntu and try .
i don't use windows sorry
Sent from my GT-S5670 using xda premium
Click to expand...
Click to collapse
just tried sudo cp ~/android-sdk-linux/platform-tools/adb /usr/bin
it seemed to have copied since the original adb there was like 577kb and the new one is 1.2mb but still same issue.. i dont care to get it working on windows anyways...just thought i was strange it wont work on either platform...any other suggestions??
just a mention if someone arrives due to google search and are having an issue updating adb version in windows..this thread only speaks of a fix in linux so here is what i found: somehow someway adb.exe along with a couple dll files found their way to my windows directory, even though i always had its installed path included in my systems environment variables!! first i simply renamed these 3 files and added the extension .old to them. immediately running adb version in a command prompt my version finally read properly as it should 1.0.31 and not 1.0.26. its self explanatory why. hope this helps someone!
sinner99 said:
just a mention if someone arrives due to google search and are having an issue updating adb version in windows..this thread only speaks of a fix in linux so here is what i found: somehow someway adb.exe along with a couple dll files found their way to my windows directory, even though i always had its installed path included in my systems environment variables!! first i simply renamed these 3 files and added the extension .old to them. immediately running adb version in a command prompt my version finally read properly as it should 1.0.31 and not 1.0.26. its self explanatory why. hope this helps someone!
Click to expand...
Click to collapse
I had to sign up for this forum just to tell you, THANK YOU!!!! For the life of me, it was ridiculous that I couldn't find just simple information on how to do stuff. This is my first time looking into this stuff, So I couldn't even figure out how to update individual tools like that, which is what I've been spending the last 2 hours or more trying to figure it out.
It really was those three files in the Windows directory this whole time. Now my device is online, and adb shows the right version. Amazing. It's absolutely pathetic that google has their program screw up the entire adb functionality by putting these broken versions of the tool in the Windows directory.
I had to add to the path variable the location folder of the appdata platoformtools abd.exe.

ADB + Linux error: device unauthorized

Hi
First of all, sorry for my bad english.
It has been several hours that i'm trying to find a solution to my problem.
I want to wake my nvidia shield via adb command throught network.
I installed android tools on my raspberry pi, and when i connect to it via command line everything work, i can wake up the Shield.
But when i put my command line in a bash script
Code:
#!/bin/bash
adb kill-server
adb start-server
adb connect 192.168.1.38:5555
adb shell input keyevent KEYCODE_WAKEUP
adb kill-server
i have this error :
Code:
error: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
I dont know why, when i am execute the command line in a bash script it can't find the rsa key, who is there and should be used.
Any ideas
Thanks in advance.
darkouz said:
Hi
First of all, sorry for my bad english.
It has been several hours that i'm trying to find a solution to my problem.
I want to wake my nvidia shield via adb command throught network.
I installed android tools on my raspberry pi, and when i connect to it via command line everything work, i can wake up the Shield.
But when i put my command line in a bash script
Code:
#!/bin/bash
adb kill-server
adb start-server
adb connect 192.168.1.38:5555
adb shell input keyevent KEYCODE_WAKEUP
adb kill-server
i have this error :
Code:
error: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
I dont know why, when i am execute the command line in a bash script it can't find the rsa key, who is there and should be used.
Any ideas
Thanks in advance.
Click to expand...
Click to collapse
Normally on Windows the first time you turn on usb debugging it will pop up and ask you to accept the adb key. This is what is preventing you, I haven't had to resolve this in Linux, but essentially you need to go to C:\\Users\You\.android\ (in Windows, path will be different in Linux) and copy the file adbkey. Now you need to move it to data/misc/adb/
This will most likely require root or TWRP. Good luck, my friend.
Sent from my KYOCERA-C6745 using Tapatalk
Hi
Thanks for your quick response.
I couldn't make the connection via USB my adb tells me that there is no emulated device. But it work with network And yeah the first time I made the connection, the authorization pop up appeared on my shield. I checked, always authorized this device.
I have the key in /root/.android on my raspberry pi
I don't think I have the access to the /data/ folder in my shield.
But what I don't understand is why when I execute the command in a terminal like that, it work and when it's from the bash script it won't work anymore
darkouz said:
Hi
Thanks for your quick response.
I couldn't make the connection via USB my adb tells me that there is no emulated device. But it work with network And yeah the first time I made the connection, the authorization pop up appeared on my shield. I checked, always authorized this device.
I have the key in /root/.android on my raspberry pi
I don't think I have the access to the /data/ folder in my shield.
But what I don't understand is why when I execute the command in a terminal like that, it work and when it's from the bash script it won't work anymore
Click to expand...
Click to collapse
Option B would be to dump your boot.img and use Assayed's kitchen to add insecure kernel and adb direct root, then the adbkey doesn't need to be on the device.
Sent from my KYOCERA-C6745 using Tapatalk
RealWelder said:
Option B would be to dump your boot.img and use Assayed's kitchen to add insecure kernel and adb direct root, then the adbkey doesn't need to be on the device.
Sent from my KYOCERA-C6745 using Tapatalk
Click to expand...
Click to collapse
Yeah as you said in your previous post, i think the solution is to root the nvidia shield cause the rsa key doesny copy itself on the device.
But would you able to explain to me why if i execute those command individually in the terminal it works.
But if i put them all in a bash script that i execute it doesnt work anymore, what's the difference between those two procedure ?
darkouz said:
Yeah as you said in your previous post, i think the solution is to root the nvidia shield cause the rsa key doesny copy itself on the device.
But would you able to explain to me why if i execute those command individually in the terminal it works.
But if i put them all in a bash script that i execute it doesnt work anymore, what's the difference between those two procedure ?
Click to expand...
Click to collapse
How are you executing the script? There's some (hopefully) helpful info here.
https://community.spiceworks.com/topic/433656-command-not-running-in-batch-but-will-run-in-cmd
Sent from my KYOCERA-C6745 using Tapatalk
RealWelder said:
How are you executing the script? There's some (hopefully) helpful info here.
https://community.spiceworks.com/topic/433656-command-not-running-in-batch-but-will-run-in-cmd
Sent from my KYOCERA-C6745 using Tapatalk
Click to expand...
Click to collapse
i m doing : sh script.sh
i m gonna read that, thanks
I found the solution.
I don't really understand why, but adding
Code:
sleep 1
before
Code:
adb shell input keyevent KEYCODE_BACK
resolved the problem, maybe the script execution was to fast for adb to adjust, dont know.
All i know is, that works
darkouz said:
I found the solution.
I don't really understand why, but adding
Code:
sleep 1
before
Code:
adb shell input keyevent KEYCODE_BACK
resolved the problem, maybe the script execution was to fast for adb to adjust, dont know.
All i know is, that works
Click to expand...
Click to collapse
Glad you got it.
Sent from my KYOCERA-C6745 using Tapatalk
sudo rm -rf /home/(username)/.android
that worked with my kde neon machine

Categories

Resources