[Q] help installing Android SDK - General Questions and Answers

okay, so there is a bug in the custom ROM that i put on my phone and it requires some ADB commands to fix
i am trying to install Android SDK to get ADB, but it tells me that i need to install Java JDK
so i've downloaded the 6u23 version of JDK for my windows x64, and installed it ... and i ran the Android SDK installer again, and it still says that i dont have Java JDK installed
how do i install the Android SDK?

right, so i've downloaded the Android SDK zip file , and adb.exe is not under the /tools folder
where can i get adb.exe??

use path to find java
I think you need to add to your environmental variables in the line "path" append to the back end of it < ;path to java>. The path to java may be like C:\Program Files\Java.
You get to environmental variables by going Control Panel > System > Advanced Settings.

donob09 said:
I think you need to add to your environmental variables in the line "path" append to the back end of it < ;path to java>. The path to java may be like C:\Program Files\Java.
You get to environmental variables by going Control Panel > System > Advanced Settings.
Click to expand...
Click to collapse
I've got the same issue. No matter what I try I can not get SDK to recognize the fact that JDK 6u23 is on the Vista_64 I'm running.
I've tried to edit the system variable path, but I must be missing something. I'm not really sure of the proper commnad string, and there are even a couple of places that look attempt worthy, so that is what I did, I edited the path, rebooted and still nothing, undid that change and tried it uncer environment variables, still nothing. So I've gone back and undone the changes. Any details on the editing process you suggest might just to the trick. Thanks for helping a nub.
EDIT: Ok, here is what worked for me: In the advanced system settings, environment variables, I noticthed that the CLASSPATH had the path string commenced with "." and ";" thats a dot and a colon. i.e. .;C:\Program Files\Java... This was something that windows or oracle or some sub-routine must have put in place. I certainly didn't them there. I decided to delete the two special charaters so the string for my is set thus: CLASSPATH C:\Program Files\Java\jre 1.6.0... After I changed it, I ran the windows installer and the program went right through, reported finding JDK and intalled the components in SDK. What a relief cuz I was high centered on a rock. Glad I noticed that and deciede to take a hack at it. Just lucky I guess.... Cheers all!

Related

[How to]? ADB on Ubuntu 10.10?

Can someone provide a step-by-step guide to installing ADB on Ubunto 10.10 for a beginner please?
Thanks
Still need help
t0ph0id said:
Can someone provide a step-by-step guide to installing ADB on Ubunto 10.10 for a beginner please?
Thanks
Click to expand...
Click to collapse
It's been awhile since you posted, do you still need help. I have a simple method, let me know and I will make you instructions. It wouldn't be a problem.
blas4me said:
It's been awhile since you posted, do you still need help. I have a simple method, let me know and I will make you instructions. It wouldn't be a problem.
Click to expand...
Click to collapse
I would love a quick step-by-step. Been trying to figure this out but failing. Hard.
ADB & FASTBOOT Help: Updated 6/6/12
WORKS FOR x86 VERSION OF 12.04 - 12.10 TO MAKE IT WORK FOR x64 FOLLOW LINK BELOW, THEN COME BACK HERE AND FINISH SETUP. I ALSO ADDED A VIDEO, CHECK IT OUT
1. You must have java installed before you start set up.
http://askubuntu.com/questions/131207/android-sdk-cant-be-installed-on-ubuntu-12-04-64
I know if your new the other instructions can be confusing, so I kinda know what you guys are looking for, just a basic breakdown, I remember when I started playing around with 9.04, the adb setup had me stuck, Ubuntu used to frustrate me, because I didn't understand Unix based systems, but you catch on, especially if your a android user.
JUST A TIP: I make my SDK folder androidsdk, for simplicity and that's how I learned to install. so I'm just showing you the way I learned. I have rooted over 20 different Android devices, and I've installed this method on multiple Linux distros without a problem. For those of you that are new to Linux, know that Linux is hardwired for Andorid devices, same kernal and all, and that's why it's wise to do all things Android on Linux machines, I try to anyway
RECENT CHANGES TO SDK: updated 11/1/12: Just installed on Ubuntu 12.10, and the Linux adb installer is no longer needed, when I ran adb command after copying SDK to my /usr/local/ directory, my device showed up. Some resent changes to the SDK, also changed the way you set up, but not very much. The SDK provides all the files you need to set up, including fastboot.
NOTE: Once you've finished the setup, know that you push & pull right from your home folder, no need to put things in the tools folder like Windows, same thing when you pull, look for the files in the home folder.
1. Go here for the latest SDK
http://developer.android.com/sdk/index.html
(once download, double tap and extract right to home folder, rename to androidsdk)
a. Make android file executable
2. Open teminal.
a. Navigate to your SDK directory
Code:
cd /home/username/androidsdk/tools
you should get [ $ ] at the end of your path.
b. Type
Code:
./android
your SDK Manager should start.
ADVICE: I suggest you only download tools and platform-tools to make the setup quick, you can go back later and install what you need
NOTE: For development purposes you need a copy of ADB & Fastboot in your tools folder, Eclipse looks for ADB in the folder, so if you plan on developing, then you'll need those files there.
3. Open home folder, press ctrl & H to show hidden files, find bashrc
a. Paste in terminal from your document after you input your user name:
Code:
#AndroidDev PATH
export PATH=${PATH}:/androidsdk/tools
export PATH=${PATH}:/androidsdk/platform-tools
export PATH=${PATH}:/home/*********/androidsdk/tools
export PATH=${PATH}:/home/*********/androidsdk/platform-tools
4. Paste in terminal from your document after you input your user name:
Code:
export PATH=$PATH:/androidsdk/tools
export PATH=$PATH:/androidsdk/platform-tools
export PATH=$PATH:/home/*********/androidsdk/tools
export PATH=$PATH:/home/*********/androidsdk/platform-tools
NOTE: For this part you'll need your devices id, here's a list, if your devices id isn't here, use code below.
Acer 0502
ASUS 0b05
Dell 413c
Foxconn 0489
Fujitsu 04c5
Fujitsu Toshiba 04c5
Garmin-Asus 091e
Google 18d1
Hisense 109b
HTC 0bb4
Huawei 12d1
K-Touch 24e3
KT Tech 2116
Kyocera 0482
Lenovo 17ef
LG 1004
Motorola 22b8
NEC 0409
Nook 2080
Nvidia 0955
OTGV 2257
Pantech 10a9
Pegatron 1d4d
Philips 0471
PMC-Sierra 04da
Qualcomm 05c6
SK Telesys 1f53
Samsung 04e8
Sharp 04dd
Sony 054c
Sony Ericsson 0fce
Teleepoch 2340
Toshiba 0930
ZTE 19d2
In terminal type:
Code:
lsusb
and that will give a list of all USB devices attached to your machine.
a. In terminal, type:
Code:
gksudo gedit /etc/udev/rules.d/51-android.rules
b. Add these lines, put your device ID between quotations, then save
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="HERE", SYMLINK+="android_adb", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="HERE", SYMLINK+="android_adb", MODE="0666"
c. In terminal type:
Code:
sudo restart udev
5. Download the Linux ADB installer zip, extract to your home folder, make script executable and to run with auto prompt (plug your phone in if it isn't already) then just double click and choose run, then let it do it's thing Takes a second, and it should ask for permissions = user password
NOTE: When you run nautilus your going into file system directory as root, so proceed with caution, and back up any file you plan on editing. Installing SDK doesn't make a folder in /usr/local/ any more, so you'll have to copy SDK to that directory as root.
6. Open terminal, type:
Code:
sudo nautilus
a. Go to :File system /usr/local
b. Copy and paste a copy of your SDK folder there
c. Close root session
d. Close terminal
7. Open terminal, type:
Code:
adb devices
you should see your device, then type fastboot devices it should just go to the next line, you have to be in fastboot to see your device
Now you should have ADB & Fastboot on your beautiful Ubuntu machine!!!!!!!!!!
With narration
http://www.youtube.com/watch?v=HsCd1nMywR8&hd=1
Without
http://www.youtube.com/watch?v=IGAiHkPuhg8
Extra goodie (Aero Snap Windows.) Extract and follow intructions. Enjoy!!!!!!!!!
TIP: For trigger delay, the lower you set it the faster your widows will resize, and I have mine set for left & right edge. Having it set @ right & left is a headache because every time your pointer touches left or right side of the screen , widows resize. So, having them set to the edges works for me.
Just wanted to say thanks, awesome post.
Thanks
star.gazer said:
Just wanted to say thanks, awesome post.
Click to expand...
Click to collapse
I've been waiting to hear feedback, was it a simple process.
I see two problems at first glance with the instructions above:
1. This will only work with two brands, the one
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", SYMLINK+="android_adb", MODE="0666"
Click to expand...
Click to collapse
being HTC ("0bb4"), the other
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", SYMLINK+="android_adb", MODE="0666"
Click to expand...
Click to collapse
not known to me. For a list of other vendors, have a look at http://developer.android.com/guide/developing/device.html .
2. You're mixing up adb-related instructions with instructions to change Ubuntu's UI, which is totally unrelated. This "Extra goodie (Aero Snap Windows.)" is neither needed for the task in question nor is it asked for by many Linux users (like me). Also, I wouldn't recommend -- at least not to an average user -- to bypass Ubuntu's package management in order to get some visual sugar. Bypassing might conflict with further updates and lead to a situation where thorough knowledge is required.
As a simple, efficient and painless way I recommend the app adbWireless. No need to install anything but the SDK (downloaded from developer.android.com and only from there) and the app. Then start adb and the app and give the command line provided by the app's display, and you're connected without any messing around with udev and permissions.
Who are you!!!!!!!!!
mizch said:
I see two problems at first glance with the instructions above:
1. This will only work with two brands, the one being HTC ("0bb4"), the other not known to me. For a list of other vendors, have a look at http://developer.android.com/guide/developing/device.html .
2. You're mixing up adb-related instructions with instructions to change Ubuntu's UI, which is totally unrelated. This "Extra goodie (Aero Snap Windows.)" is neither needed for the task in question nor is it asked for by many Linux users (like me). Also, I wouldn't recommend -- at least not to an average user -- to bypass Ubuntu's package management in order to get some visual sugar. Bypassing might conflict with further updates and lead to a situation where thorough knowledge is required.
As a simple, efficient and painless way I recommend the app adbWireless. No need to install anything but the SDK (downloaded from developer.android.com and only from there) and the app. Then start adb and the app and give the command line provided by the app's display, and you're connected without any messing around with udev and permissions.[/QUOTE/]
The other number is the new HTC id, for those who have other android devices, I included the auto script. I've been waiting for someone like you to come along, "a mister know it all", but it's kool. Just to let you know I got Aero Windows from OMGubuntu. I still get updates. as I'm typing my Update Manaer just notified me, that there are updates for me. Obviously your not familiar with setting up ADB&Fastboot on Ubuntu. And you should be smart enough to see that the instructions are just for ADB&Fastboot setup. The instructions for Aero are inside the zip. I put everything here instead of starting a new post, duh, how many members have you helped on this forum. Don't try to confuse other members, with your babble. Next time don't just glance read, read, read, Maybe you just need a friend Two words for you " Open Source "
Click to expand...
Click to collapse
I've been waiting for someone like you to come along, "a mister know it all", but it's kool.
Click to expand...
Click to collapse
Hope you feel better now.
Just a quick post to say thanks.
Easy to follow and got me working on flashing my radio from my new 10.10 installation.
nategs said:
Just a quick post to say thanks.
Easy to follow and got me working on flashing my radio from my new 10.10 installation.
Click to expand...
Click to collapse
Thanks for the feedback.
Thanks
Thank you for the easy to follow post. I am a new user to Ubuntu (and Linux in general) and this was an extremely user friendly tutorial.
blas4me said:
I know if your new the other instructions can be confusing, so I kinda know what you guys are looking for, just a basic breakdown, I remember when I started playing around with 9.04, the adb setup had me stuck, Ubuntu used to frustrate me, because I didn't understand linux based systems, but you catch on, especially if your a android user. You can just copy & paste all of the command. I've done this on 10.04 about four or five times, and 10.10 twice so far.
Edit: I just set up adb on my other lappy, and I notice the SDK is a little different. There is no adb file in the tools folder, it's just in another folder. You don't have to give it permissions, so just follow the instructions, and enjoy the new additions to the SDK.
Note: Once you've finished the setup, know that you push & pull right from your home folder, no need to put things in the tools folder like Windows, same thing when you pull, look for the files in the home folder.
1.Go here for the latest SDK
http://developer.android.com/sdk/index.html
(once download, double tap and extract right to home folder, rename to androidsdk)
2.Open folder and got to tools folder
a.right click on adb, go to properties and check allow execution, choose or add open with auto prompt, do same for android file then double click on android and choose run
b.download and install, let it finish
Note: When I say add these line, I'm saying add the lines under the alphanumeric instructions
3.Open home folder, press ctrl & H to show hidden files, find bashrc
a.add these lines to the top of file,# include, then space it from next paragraph of text
#AndroidDev PATH
export PATH=${PATH}:/androidsdk/tools
4.Open terminal, type: export PATH=$PATH:/androidsdk/tools
a.in terminal, type: gksudo gedit /etc/udev/rules.d/51-android.rules
b.add these lines, then save
c.in terminal type: sudo restart udev
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", SYMLINK+="android_adb", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", SYMLINK+="android_adb", MODE="0666"
(plug your phone or phones in if it isn't already)
5.Extract the installer zip to your home folder, make script executable and to run with auto prompt, then just double click and choose run, then let it do it's thing
Note: When you run nautilus your going into file system directory
6.Open terminal, type: sudo nautilus
a.go to /usr/local/androidsdk/tools
b.make adb file executable, and choose or add open with auto prompt, then close root session and close terminal
7.Open terminal, type: adb devices, you should see your device or devices
8.Set up fastboot, go here for the file
http://forum.xda-developers.com/showthread.php?t=537508
a.once downloaded, copy to tools folder in your home directory, and enter root session with sudo nautilus command and add fastboot to /usr/local/androidsdk/tools
b.don't forget to make both files executable, and open with auto prompt,then close root session, close terminal.
9.Open terminal, type: adb devices
a.type:fastboot devices
(if it just go's to the next line your cool, you need to be in fastboot to see your device, if you get fastboot not found, then go back to the fastboot files and make sure you did part:8b
Now you should have adb&fastboot on your beautiful Ubuntu machine!!!!!!!!!!!
Extra goodie (Aero Snap Windows.) Extract and follow intructions. Enjoy!!!!!!!!!
TIP: For trigger delay, the lower you set it the faster your widows will resize, and I have mine set for left & right edge. Having it set @ right & left is a headache because every time your pointer touches left or right side of the screen , widows resize. So, having them set to the edges works for me.
Click to expand...
Click to collapse
Excellent Post. Thank you very much.
I can't get anything but "No command 'adb' found"
I'm trying to follow your instructions, but the section with the export PATH stuff is very hard to follow.
I know that adb is located in:
Code:
/home/USERNAME/Applications/android-sdk/platform-tools
So I would put this in my .bashrc:
Code:
#AndroidDev PATH
export PATH=${PATH}:/Applications/android-sdk/platform-tools
# include
And then I'd type this into the terminal:
Code:
export PATH=$PATH:/Applications/android-sdk/platform-tools
Right?
blas4me said:
TIP: For trigger delay, the lower you set it the faster your widows will resize, and I have mine set for left & right edge. Having it set @ right & left is a headache because every time your pointer touches left or right side of the screen , widows resize. So, having them set to the edges works for me.
Click to expand...
Click to collapse
I followed your guide for adb installation and it worked great. I just want to say thanks.
In the Aero tip, I just wanted to know what you meant by setting it to the right and left edges. When I put my pointer to the edges, the windows resize like you said and I wanted to set it up like you have yours.
You'll get it
Mogomra said:
I can't get anything but "No command 'adb' found"
I'm trying to follow your instructions, but the section with the export PATH stuff is very hard to follow.
I know that adb is located in:
Code:
/home/USERNAME/Applications/android-sdk/platform-tools
So I would put this in my .bashrc:
Code:
#AndroidDev PATH
export PATH=${PATH}:/Applications/android-sdk/platform-tools
# include
And then I'd type this into the terminal:
Code:
export PATH=$PATH:/Applications/android-sdk/platform-tools
Right?
Click to expand...
Click to collapse
Your SDK folder should be in your home directory. You should rename your SDK folder to androidsdk for simplicity, if your pasting the commands from my post. I see the path you tried to export and it's not correct. I said in my post that they changed the location of the adb file, but to follow the instructions. You need to redo your bashrc file, just copy and paste my code lines, and you can't go wrong, trust me. I want your adb&fastboot up & running. Let me know what happens.
I figured it out. I should have put a ~ in front of "/Applications" or "home/USERNAME" in front of it.
Thanks
Devildog8791 said:
I followed your guide for adb installation and it worked great. I just want to say thanks.
In the Aero tip, I just wanted to know what you meant by setting it to the right and left edges. When I put my pointer to the edges, the windows resize like you said and I wanted to set it up like you have yours.
Click to expand...
Click to collapse
You can set edge bindings from two applications, SCSM or Compiz
Mogomra said:
I figured it out. I should have put a ~ in front of "/Applications" or "home/USERNAME" in front of it.
Thanks
Click to expand...
Click to collapse
That's strange I've never heard of anybody using that path, can you still just type in " adb devices " and see you phone or do you have to type " sudo adb "
blas4me said:
You can set edge bindings from two applications, SCSM or Compiz
Click to expand...
Click to collapse
So instead of going to the sides, you are going to the corners, correct?

[Q] how to define PATH

Hi
i try to compile a simple jni sample and get:
Please define SDL_JAVA_PACKAGE_PATH to the path of your Java package with dots replaced with underscores, for example "com_example_SanAngeles"
How should i do what?
Many thanks
Michael
Assuming you are doing all this stuff from a command prompt, enter:
C:\>SET SDL_JAVA_PACKAGE_PATH = "com_examples_SanAngeles"
C:\>
Note that this environment variable will only last for the life of the command window, if you start up a second one, you will have to type it in there, as well.
To set the value permanently, use Control Panel -> System.
Click the Advanced Tab, then the Environment Variables button, and add the value.
Hi
thanks for the reply but I get:
[email protected]:~/Android-cpp/projects/test$ SET SDL_JAVA_PACKAGE_PATH = "com_examples_SanAngeles"
SET: command not found
I saw some other alike below but still don't know how/where:
# Set environment to CrystaX NDK with RTTI and exceptions instead of original NDK
# export PATH=$PATH:~/src/endless_space/android-ndk-r4-crystax/ndk-build
Regards Michael
Post #2 above will not work, as it is for a Windows command prompt. You failed to mention the fact that you are running under Linux. Also from a command prompt, Linux is case sensitive, Windows isn't.
Under Windows 'SET' and 'set', even 'sEt' are the same thing, under linux they are all different.
For a crash course on Linux environment variables try the links below:-
http://www.codecoffee.com/tipsforlinux/articles/030.html
or
http://lowfatlinux.com/linux-environment-variables.html
Yes i might figure the syntax but how should i know the path?
I've installed android sdk and ndk both the latest.
Again thanks
Michael
I would suggest posting this in the Android Development section, but unfortunately, you need 10 posts to be able to do it.
I'm really a Windows/WinMo developer, with only a passing knowledge of Linux/Android.
You could PM the moderator of this forum, madnish30 and request to have it moved over, but you still will not able to reply until you have clocked up 10 posts.
ahso said:
Yes i might figure the syntax but how should i know the path?
Click to expand...
Click to collapse
It's not a filesystem path - it is a Java namespace path. As it is package-specific there's no way to say on given information what the corresponding path should be.

[Q] Can't find Android sdk tools/ dir in cmd prmt

Hey guys, I am new to this forum so apologies if I'm posting in the wrong category. I want to run some psd files I have through drawPatch9 but I can only seem to get as far as the android-sdk-windows folder in command prompt (windows 7). I have the correct jdk and can run eclipse with no probs, just can't navigate to android-sdk-windows/tools. I get "system cannot find specified path" when I try "cd tools". I also tried tabbing through android-sdk-windows folder and I only get add-ons, docs, SDK Manager, SDK Readme and uninstall, no tools or platform-tools directories. I couldn't find a solution here or elsewhere, hoping someones ran into this before. Thanks in advance.
I can't believe no one's answered this. The SDK tools were moved to android/platform-tools, and you will need to open the SDK Manager and install the platform-tools package.
u can also add the directory to your path environment variables.
Assuming your running windows rightclick mycomputer>properties>advanced system settings>environment variables.
system variables box find path click edit and add the complete path use ; as a seperator
this way you can execute the tools from any directory
Sent from my LG-P999 using XDA

[Q] Could not create Java Virtual Machine

i m trying to install and use apktool.
I have downloaded
1.Android SDK
2.apktool
3. JDK (jdk-6u24-windows-i586.exe)
I read somewhere about changing environmental Variables.
my computer < Advanced < Environmental Variables< path
My current path entry is
C:\Windows\System32\;C:\Windows\;C:\Windows\System32\Wbem;C:\Program Files\Java\jdk1.6.0_24\bin\java.exe
Still i got the error.
my comp specs is
1 GB RAM
1.8 Ghz celeron processor
160 GB Hard disk
Pls guys help me. i did search here but i think i m the most dumb person to face this problem !
Na you are not dumb, just as lazy as the rest who could have used google to find out ;-).
But here you go:
Your path is wrong
C:\Program Files\Java\jdk1.6.0_24\bin;
dont point to java.exe just point to the bin directory, also it helps to include the path of the android sdk tools directory.
for example c:\android\tools;

[Q] cannot run MyFirstApp on windows 7 with adb and AVD

It seems it is not an easy thing to start android development. I followed the official instruction and tried to run the MyFirstApp example from developer.android.com on my Windows 7 64bit machine with AVD. But after 2 days effort, I am still cannot make it work for me in Eclipse and in adb command line.
The best I reached in command line approach is the following -- the second block with italic words shows the error I got:
Code:
E:\Workspace\MyFirstApp>ls bin
AndroidManifest.xml build.prop
AndroidManifest.xml.d classes
MyFirstApp-debug-unaligned.apk classes.dex
MyFirstApp-debug-unaligned.apk.d classes.dex.d
MyFirstApp-debug.apk dexedLibs
MyFirstApp.ap_ proguard.txt
MyFirstApp.ap_.d res
[I][B]E:\Workspace\MyFirstApp>adb install bin\MyFirstApp-debug.apk
failed to copy 'bin\MyFirstApp-debug.apk' to '/data/local/tmp/MyFirstApp-debug.a
pk': No such file or directory
rm failed for /data/local/tmp/MyFirstApp-debug.apk, No such file or directory[/B][/I]
I hope somebody can help me about these:
1. I am in Windows with AVD, why adb want to find /data/local/tmp, which is linux style location?
2. where does the adb try to copy the apk file to? My SDK is installed under "C:\Users\myname\AppData\Local\Android\android-sdk". There is no space in the address path. The source apk file is ready and should not be the cause of that error, I think.
3. Any configuration of the installed SDK needs to be modified in Windows machine? I think the SDK manager should be able to figure out what the machine is and download/install appropriate components for the user. Is that right?
I have similar or the same issue by using Eclipse.
thanks,

Categories

Resources