[Q] Setting up the Android SDK in Ubuntu... - Droid Eris Q&A, Help & Troubleshooting

Ok, I'm sure this is been asked before and I'm sure there's references somewhere...I've looked for a couple of days and found what should be answers, but nothing is working like the instructions I've seen...
Here's the simple question; How do I get the Android SDK and Java JDK setup in Ubuntu? I've tried the sudo commands to get the JDK to install, not working for me (as Ubuntu tells me it can't find the files I'm looking for). I've tried moving the SDK into the Root Folder (in the File System area itself), don't have permissions even though I'm logged in as the administrator. I've tried getting the SDK Manager to run through Terminal (home/android-sdk-xxxxx_xxxx/tools/android), can't find the file in terminal, but it's there in the file system exactly where I'm pointing it to.
I'm very new to Linux, but if I'm going to do things that I want to do, I'm going to have to learn. For the most part, I'm prepared to read whatever I need to in order to learn from this, but I also know when I need to ask for some help here. It seems like every command shown to get this started is just not working in the partition I have setup for this. If anyone can help get me started, I'm sure I can pick the rest up along the way!
Thanks in advance!

Macrodroid said:
Ok, I'm sure this is been asked before and I'm sure there's references somewhere...I've looked for a couple of days and found what should be answers, but nothing is working like the instructions I've seen...
Here's the simple question; How do I get the Android SDK and Java JDK setup in Ubuntu? I've tried the sudo commands to get the JDK to install, not working for me (as Ubuntu tells me it can't find the files I'm looking for). I've tried moving the SDK into the Root Folder (in the File System area itself), don't have permissions even though I'm logged in as the administrator. I've tried getting the SDK Manager to run through Terminal (home/android-sdk-xxxxx_xxxx/tools/android), can't find the file in terminal, but it's there in the file system exactly where I'm pointing it to.
I'm very new to Linux, but if I'm going to do things that I want to do, I'm going to have to learn. For the most part, I'm prepared to read whatever I need to in order to learn from this, but I also know when I need to ask for some help here. It seems like every command shown to get this started is just not working in the partition I have setup for this. If anyone can help get me started, I'm sure I can pick the rest up along the way!
Thanks in advance!
Click to expand...
Click to collapse
I think you could possibly use part of the EasyDev-v6 script in the Development and just cut out everything after installing prerequesites. It probably installs the JDK and the SDK among everything else, and it probably wouldn't hurt with the other things that installs, too. Just cut out everything after the prerequesites (it's just a regular text file but it'll be easier to edit in Ubuntu with OpenOffice).
Also check out http://maketecheasier.com/install-android-sdk-in-ubuntu-karmic/2010/01/11. As far as I know it worked when I tried it.

roirraW "edor" ehT said:
I think you could possibly use part of the EasyDev-v6 script in the Development and just cut out everything after installing prerequesites. It probably installs the JDK and the SDK among everything else, and it probably wouldn't hurt with the other things that installs, too. Just cut out everything after the prerequesites (it's just a regular text file but it'll be easier to edit in Ubuntu with OpenOffice).
Also check out http://maketecheasier.com/install-android-sdk-in-ubuntu-karmic/2010/01/11. As far as I know it worked when I tried it.
Click to expand...
Click to collapse
Dude, thanks so much! That worked perfectly. Thanks!
Sent from my Froyo Tazz using XDA App

You're welcome!

Related

[Q] Unable to access jarfile X10flash.jar

Hello.
This is my first post so first off I would like to say thank you to the members of XDA because I have been helped a great deal in the past by simply reading some of the posts on this forum.
That being said, I have a problem that I could not find the answer to after hours of searching.
I am trying to Debrand/Root my Rogers X10a using the Exploid method
forum.xda-developers.com/showthread.php?p=7490733#post7490733
After I enter my Device ID into the appropriate file, I ran RootX10a_v2.cmd as instructed. However, once I try to run step 1 i get the following message:
"unable to access jarfile X10flash.jar"
Ive tried connecting the phone in flash mode to different USB ports and using different Device IDs however nothing has worked.
Any ideas?
Any help will be greatly appreciated.
Thanks!
I have just the thing for you matey. I can't post a link sorry but google search for Universal Androot and download and install it on your phone.
It allows to you 1 click root or unroot your device without any fuss and should allow you to root it when 2.1 is released as it contains the superuser files for 1.5 / 1.6 and 2.0 - 2.2.
I am using it and it works brilliantly. Hope this helps
Sent from my rooted .26 x10i using the XDA app
Welcome to xda! the answer is in the forum but i can't remember where.
Set up the path to the sdk tools in your environment variables.
Cheers
Gav
Thanks for the responses.
steve- are you sure that the universal androot works with the x10? another concern is that i also wanted to debrand my phone to get rid of rogers bloatware so how would I solve that issue if I can't access the x10flash.jar?
gavriel- sorry. could you explain in a little more detail what you said? i don't quite understand what you mean.
Thanks!
The one click root seems simple enough.
My problem now is with debranding.
Ive tried the method where you switch the files in SEUS (ive also tried PC Companion) just before it installs onto your phone and that has not worked. It says every time that the installation has failed.
Does anyone have any other ideas as to how I can debrand my phone?
Thanks!
For sure. I may be wrong but ill explain it as I understand it.
Basically when your PC is trying to use a jar file it looks in a particular area. I'm not sure where it looks though. Obviously your jar file isn't in that directory or you wouldn't get that error. So, by adding it as an environment variable it will look in the directory u added for that file.
The environment variables is found somewhere in the system settings. I can't remember where. Once you have found it you should find the path to the jar you are trying to access. Copy that path and paste it and the end of the environment variables. Don't erase anything that's in there. If need be seperate that path from the one before with a ; (semicolon). Save it and try running the jar again. It should work.
Good luck and hopefully it helps.
bmalaklou said:
After I enter my Device ID into the appropriate file, I ran RootX10a_v2.cmd as instructed. However, once I try to run step 1 i get the following message:
"unable to access jarfile X10flash.jar"
Click to expand...
Click to collapse
It means that Java can't find the X10flash.jar file. Do you have that file in the same directory as DeviceID.txt? Also, do you have the latest version of 32-bit Java installed?
To solve my debranding problems I had to use the 32 bit update 20, not 21 (which is the latest) and you need the jdk and the jre, hope that helps
Sent from my X10a using XDA App

[Q] Scripting on the Archos 70

Hi!
Could anyone help steer me towards a solution please?
Or tell me if its impossible (and why).
I am trying to put together a script of some kind which I can use to do a basic rebuild of my Archos 70 after I have done a Full Reinitialization. I like to mess around installing all sorts of stuff, but when done, it's nice to reset and go
back to a clean machine.
As it's not rooted (yet?) I generally rebuild manually which takes ages.
Although a relative newbie at Android/Linux, I have worked with scripting
on mainframes and in the Windoze arena for many years.
The scripting requirement is quite simple, namely to install packages one by one from the SD card. Also to copy back Bookmarks, launcher setting etc
I am happy to work in any language which will work, but to date have just been trying with .SL (Bash?) scripts which run quite happily from within the SL4A environment or according to my theory, should work also from Android natively.
I envisage the script residing on the SD card and when invoked installing my launcher, Dolphin Browser, various other apps and games, then copying back the settings which I have saved (also by script) before the Initialisation.
Trouble is, I can find no simple samples which help. When I try, I can 'cp' stuff about and echo messages etc, but when I try to install, I don't really know where to start. I have tried just the name of the app package
'/sdcard/sdcard/packagename.apk', it replies 'permission denied' and if I try 'sudo package.apk', it says 'not found'.
I am assuming that the 'permission denied' is a good sign because it understands what I'm trying to do at least. But if I am allowed to do it myself, then surely my script should be allowed to do it?
I am quite happy messing around myself. But if anyone has any pointers
(sample scripts, which language/environment to use, etc.) I would be most grateful.
Sorry if this is covered elsewhere. I have searched but was unable to find much which helped. I am continuing the search!
Thanks in anticipation!
1. All normal installed Apps are installed in /data/app as the apk
2. Local/private data comes into /data/data/name.of.the.package
Both directories are ony accessible with root.
Hell again,
Thanks for your reply fzelle, but I'm not sure as to whether I may have explained it properly.
I am running 'Quick System Info' which is great, and it has a function to backup all the installed apps to a directory you can get at without root access. From there I have copied them onto the SD card.
I am not just trying to copy them into the working directory.
If I click on an app, it lets me install it without any problem.
I am trying to automate that part of the process, and I need the name of the software which does the installation, and how to actually give it the parameters for it to do the install. Although a Linux newbie, I don't really understand why, if I am allowed to install apps myself,
a script that I run should not be allowed to install them also?
Anyone got any ideas please?
Oops! - Sorry for that unfortunate typo at the beginning of my last post. Please read as 'Hello'!
No, i didn't understand you wrong.
You want to automate the installation of your std programs, and that normaly doesn't only include the apk but also the private Data.
And if you manually want to install this, you need root to be able to write in /data/data
If you just want to Backup/Install the apps, use appSaver from the market.
That has allready everything you need, and doesn't need root.
fzelle said:
1. All normal installed Apps are installed in /data/app as the apk
2. Local/private data comes into /data/data/name.of.the.package
Both directories are ony accessible with root.
Click to expand...
Click to collapse
Not entirely true.
I have some SSH tunnels set up on my rooted phone that use keys and a shell script to launch them, all set up with Better Terminal Emulator. The key and script files are located under /data/data/com.magicandroidapps.bettertempro/home. I wanted to use the same keys and script on my A70, so I copied the files from my phone to the same directory on my A70 using the terminal command line. Although you can't browse to the app folders under /data/data/, there is some ability to copy stuff into them. I guess the trick is knowing what and to where.
I've not used appsaver, but Astro will also let you back up and reinstall your apps all at once.

[Q] problems with android sdk

*RESOLVED*
ive searched to no prevail. id like to start developing apps but am having issues getting the environment set up. i have the jdk properly installed.
issue 1 (main \ major ):
ive installed the android sdk from multiple sources, but when i try to start sdk tools, the command prompt flashes/ opens briefly and i get this message:
"Failed to execute tools\android.bat:
The system cannot find the file specified."
do i need to change a PATH variable or something...
issue 2:
i cannot get eclipse to run. when i try to open the exe file ( because there is no short cut icon...?) it gives a message about not finding a companion library... ive try to change the properties in the file that is supposed to fix it, but it was already set the way its supposed to be. this is not major as i can use a different IDE.
so im completely lost as to th sdk tool. any help would be appreciated!
edit:
i just tried adding the file path to the android sdk ( PATH variable) and it still did not work... :/
i also just tried start the android,bat file and the cmd promt flashes briefly saying somthing about xcopy is not an operable command...etc couldnt read all of it...
btw im on windows 7 home premium
Please use the Q&A Forum for questions &
Read the Forum Rules Ref Posting
Moving to Q&A
Check if this can help you.
Actually, you don't need to configure environment variables. You only need to install Java SE, and Eclipse and Android SDK should work fine.
RoberGalarga said:
Check if this can help you.
Actually, you don't need to configure environment variables. You only need to install Java SE, and Eclipse and Android SDK should work fine.
Click to expand...
Click to collapse
well eclipse wont install either, it cant find some companion library.all i curently have is the java jdk and an IDE called intelliJ idea or something like that, nothing else will install...i had to add an environmental variable to get the java jdk to work on cmd. if you could give links to any files your using that would be of help. , that is if your on windows 7
Sure...
Eclipse
Android SDK
Follow the indications of my previous link
Word of caution
I hate to discourage anyone from following their hearts desires especially when it comes to software development. But I wanted to share some advice with you coming from an experienced software engineer. I've been developing software for over 15 years. My experience comes mainly from developing Windows desktop applications in C/C++. I've also been developing software using Java for several years so I'm by no means new to Java technology or development tools.
I've only recently started to develop for the Android platform. It didn't take me long to get started (i.e. get the development environment setup and start developing using the AVD manager) but as I dig into it I'm finding that the Android platform has become very much like developing Windows applications which is interesting to find because I really haven't done a lot of user interface development using Java. In the past my Java development projects have always been more back end server integration related to App Servers and database integration (i.e. Apache/Tomcat, JSP, Oracle, etc.).
I have seen user interface development libraries in Java such as Swing in the past but haven't had a real need for them. So to tell you the truth I can't say how much better or worse the Android SDK user interface libraries are than the traditional JDK 1.4 libraries.
All of this is to say that when I say this you know it's coming from someone that isn't just learning how to program. My advice to you is that if you haven't done much Java development in the past that Android development is not the place to start. You might want to start with the basics first like just setting up a simple Java program and learning the technology first before you jump head long into something.
I've done that more times than I can count in my long career and I can tell you from experience it's the surest way to fail before you get started.
thanks but...
RoberGalarga said:
Sure...
Eclipse
Android SDK
Follow the indications of my previous link
Click to expand...
Click to collapse
i tried to use those files, but still the same problem, they wont launch/ install...in your post it says to launch them from the folder, correct...? the problem is, THEY WONT LAUNCH AT ALL...no UI for anything, just a quick flash of the cmd window for both of them and a pop up window for eclipse...
***i wasnt yelling, just frustrated...
First. DELETE EVERYTHING FROM DOWNLOADED FILES TO EXTRACTED FILE GET RID OF ALL OF IT then clear trash can.
THen ensure the JDK is successfully installed by opening command prompt and typing "java -version" you should have build 1.7 or higher. If not, you may download it here http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u4-downloads-1591156.html
Download this http://developer.android.com/sdk/index.html and pick the one that has "Recommended" next to it.
after you have that downloaded. FOLLOW THE STEPS BELOW TO A T! NO SHORTCUTS WHAT SO EVER!
Then once everything is downloaded. simply FOLLOW ME again TO A T! and if you follow that you should get everything working. And seriously, FOLLOW IT TO A T! do not take shortcuts do not try to do more than one thing at a time just take it step by step. I had no problems getting it up and running by following that last link.
Hope that helps and BE PATIENT you will get to play around soon enough
elesbb said:
...Then once everything is downloaded. simply FOLLOW ME again TO A T! and if you follow that you should get everything working. And seriously, FOLLOW IT TO A T! do not take shortcuts do not try to do more than one thing at a time just take it step by step. I had no problems getting it up and running by following that last link.
Hope that helps and BE PATIENT you will get to play around soon enough
Click to expand...
Click to collapse
thank you very much. i have what i need now, although i think i figured out my problem...stupid me was viewing the archive for eclipse instead of extracting the files to a separate folder, where the shortcut appeared!. thank you as it was your instructions that led me to my problem.
tripartist1 said:
thank you very much. i have what i need now, although i think i figured out my problem...stupid me was viewing the archive for eclipse instead of extracting the files to a separate folder, where the shortcut appeared!. thank you as it was your instructions that led me to my problem.
Click to expand...
Click to collapse
hahaha!! Sometimes all we need to do is slow down and look at whats infront of us xD glad you got it figured out!
Samsung Galaxy S II not recognized on PC
I want to sync my PC with my Samsung Galaxy Skyrocket and put music on it, but the PC won't recognized the phone.
I have tried downloading and installing the driver, Kies, etc and still get the same error.
Can someone help me??
android.bat still not present
I went to the sdk site to download. I ran the exe file, says that it couldn't find the tool\android.bat file. Please help

[Q] Server Maintenance error when trying to flash P769

I'm trying to root my phone using the Lelus method. As far as I know, I'm following the instructions to the letter. When I get to the actual flashing step, using the ICS T-mobile rom, I get the same "Scheduled Server Maintenance" error that Kevev reported in the guide thread on the development forum. Apparently, he was able to successfully flash, but I don't see any information there as to how he got around the error. I have tried repeatedly and always come up with the same result. Since I can't post yet in a development forum, I have to ask the question here. I must be doing something wrong, but I don't have a clue. I ask your indulgence, and would appreciate any help you can give me.
bearymore said:
I'm trying to root my phone using the Lelus method. As far as I know, I'm following the instructions to the letter. When I get to the actual flashing step, using the ICS T-mobile rom, I get the same "Scheduled Server Maintenance" error that Kevev reported in the guide thread on the development forum. Apparently, he was able to successfully flash, but I don't see any information there as to how he got around the error. I have tried repeatedly and always come up with the same result. Since I can't post yet in a development forum, I have to ask the question here. I must be doing something wrong, but I don't have a clue. I ask your indulgence, and would appreciate any help you can give me.
Click to expand...
Click to collapse
Do you have shttp in C:? C:/shttp/shttp.exe. It must be exatct this way. I have this problem too....
Rixx666 said:
Do you have shttp in C:? C:/shttp/shttp.exe. It must be exatct this way. I have this problem too....
Click to expand...
Click to collapse
I have it nested several directories deep. Did you get it to work when you put it in C? I'll give it a try.
bearymore said:
I have it nested several directories deep. Did you get it to work when you put it in C? I'll give it a try.
Click to expand...
Click to collapse
You get such hiccups if you dont follow the simple instruction first. Many people have habit to extract/save everything on desktop. C drive means C root location of C drive. And you must be logged in as "ADMINISTRATOR USER" on windows 7/8 to avoid access/permission issues.
cmahendra said:
You get such hiccups if you dont follow the simple instruction first. Many people have habit to extract/save everything on desktop. C drive means C root location of C drive. And you must be logged in as "ADMINISTRATOR USER" on windows 7/8 to avoid access/permission issues.
Click to expand...
Click to collapse
I'm used to Linux rather than Windows and when possible I put things in a user's home directory rather than the root directory. Since all that the instructions said was C drive, I interpreted that to mean anywhere on the C drive, not the root directory. Now that I put the program in the root directory, everything worked perfectly.
Thanks for your guide!
I just rooted my p769. I had a few hiccups.
Line 5a says optional, but really it's a necessary step if you've never done it once. If you've edited your HOSTS file and are running shttp, then it's not gonna be able to download/update what it needs to. Close shttp and rem out the lines in HOSTS until it updates, the continue as normal.
shttp has to be extracted in C:\
Mine ran from desktop but the 127.0.0.0:9002 test for the girls picture was file not found, look at shttp dialog window and you see it couldn't find the file because it wasn't where it expected it..
Also did you forget to right click and edit UpTestEX_mod2_marwin.exe compatibility tab if you're running win7/8 like it says to?
Once I set it all up according to the image in the thread and clicked "Normal web upgrade test" it gave me an error box. Saying to setup Tool > B2C Client Setup.
After that it was easy sailing. Well other than the fact that some of the KDZ/bin files were either missing, deleted or dropbox blocked the account for excessive use..

[Q] [SL4A] Importing PHP or Python script from github to execute from command line

Hey all,
This is my first post here because I have been tearing my hair out trying to get this to work on my own, and I hope you all can help.
What I am trying to do is get either nest-api in PHP or pynest in python to run out of SL4A in order to control my Nest thermostat ultimately out of Tasker. Both are found on github, but I can't link to them as I apparently need ten posts to do so. So a google search for "nest-api github" and "pynest github" will have to do I suppose.
I have absolutely no issues getting either to run out of Terminal on my MacBook Air, but for whatever reading the SL4A shell seems to escape my understanding. I would rather have the PHP script work, as it has more options for things I can set, which I like. The problem is I have no idea where to put the nest.class.php on my phone in order for the PHP shell to reference it when running the example.php or any script I write myself. When I put both files in the sdcard/sl4a/scripts folder and try to run either from within either sl4a or sl4a's shell I get a call to undefined function error.
For the python script, I'm not sure how I need to import the module so that I can call it with nest.py at the beginning of my command line prompt and follow it up with the user name and password and so on. I've done everything including trying to create an .egg file, which I've since been told is not necessary, and that I simply have to put it in the /sl4a/scripts folder. That doesn't make sense to me though, as I needed to run the setup.py command on my computer in order to start using it, and the .egg file should be the equivalent of that on the phone, no?
So what I am looking for is the foolproof way to get either a php or python script running through the shell that isn't actually hooking into the Android environment at all, which is what all the writeups I have found in my searching seems to pertain to. Then eventually make sure that they are available in a way that Tasker can call them. I should also note that all this has been done in an emulator through eclipse until this point, as I didn't want to go screwing around with my brand new Nexus 4's file structure until I had the best practice perfected.
Do you helpful folk have any guidance, tips, or insight on how I can get that done? Of course I can provide any other information you might need.
Thanks in advance.
Nest Api on Android using SL4A
I spend hours yesterday trying to do this. Did you ever get some help or figured it out on your own?
I have no idea how to make it work with SL4A I have done this succesfully on my computer.
Hope you can help me.
heytcass said:
Hey all,
This is my first post here because I have been tearing my hair out trying to get this to work on my own, and I hope you all can help.
What I am trying to do is get either nest-api in PHP or pynest in python to run out of SL4A in order to control my Nest thermostat ultimately out of Tasker. Both are found on github, but I can't link to them as I apparently need ten posts to do so. So a google search for "nest-api github" and "pynest github" will have to do I suppose.
I have absolutely no issues getting either to run out of Terminal on my MacBook Air, but for whatever reading the SL4A shell seems to escape my understanding. I would rather have the PHP script work, as it has more options for things I can set, which I like. The problem is I have no idea where to put the nest.class.php on my phone in order for the PHP shell to reference it when running the example.php or any script I write myself. When I put both files in the sdcard/sl4a/scripts folder and try to run either from within either sl4a or sl4a's shell I get a call to undefined function error.
For the python script, I'm not sure how I need to import the module so that I can call it with nest.py at the beginning of my command line prompt and follow it up with the user name and password and so on. I've done everything including trying to create an .egg file, which I've since been told is not necessary, and that I simply have to put it in the /sl4a/scripts folder. That doesn't make sense to me though, as I needed to run the setup.py command on my computer in order to start using it, and the .egg file should be the equivalent of that on the phone, no?
So what I am looking for is the foolproof way to get either a php or python script running through the shell that isn't actually hooking into the Android environment at all, which is what all the writeups I have found in my searching seems to pertain to. Then eventually make sure that they are available in a way that Tasker can call them. I should also note that all this has been done in an emulator through eclipse until this point, as I didn't want to go screwing around with my brand new Nexus 4's file structure until I had the best practice perfected.
Do you helpful folk have any guidance, tips, or insight on how I can get that done? Of course I can provide any other information you might need.
Thanks in advance.
Click to expand...
Click to collapse
I read on ifttt that they are planning on integrating nest options there. SO that is an easier solution I hope happens soon. They said this fall (already gone) or winter they hope to add functionality to for Nest. <fingers crossed>

Categories

Resources