Related
Hi all, I'm just starting getting into App development and I want to attach the Android source code into Eclipse so that I can reference it locally. Is there anyone here who has experience doing this on Windows who is willing to walk me through it?
Alternatively, I'll go it on my own if someone could help me get past this one roadblock. Thus far I've installed Python and msysGit (and updated my PATH variable accordingly) so that I can use git and repo. Something isn't working however and repo runs into an error that I can't seem to figure out. I'm contemplating uninstalling all that and starting from scratch with Cygwin.
Here's a tutorial on setting up Eclipse on windows (albeit over a year old so no guarantees) link
personally I would dual boot linux... it was a breeze setting it up and there's plenty of tutorials for that.
You could install ubuntu (i think) side by side with win7 using wubi, as if it were a program or something. That way you're not messing with partitions.
I already have Eclipse set up. This is not the problem. I'm having trouble downloading the Android source code - NOT the SDK - on my Windows PC. Specifically, I always run into errors when I try to use "repo init -u blah blah" as instructed on the android source page. If someone has successfully done this on Windows, I'd like someone to give me some guidance, because either I'm doing something wrong or my setup is not correct.
Right now I'm trying to use Cygwin (basically creates a linux environment inside Windows). The last time I tried using repo, I got this:
EDIT: Code removed. I found a solution, outlined below, for anyone else who wants to get the Android source into Eclipse.
Okay, I got the source code, it was actually pretty easy to do, and I didn't even need repo to do it . For those who may find this useful, here's how.
0. It is assumed you have already installed both Eclipse and the Android SDK. If you don't have those yet, download them and set those up. If you aren't on Windows but still want to know how to get the source and import it into Eclipse, you can skip step 1.
1. Install Cygwin on your computer. During the installation, you will be presented with a package explorer and you can choose specific packages to install. Choose whatever you like, but make sure to include automake, bison, curl, flex, gcc, git, gnupg, python, zip, and an editor of your choice, like nano or vim (you can use the search field at the top to find these quickly).
This will basically give you a Linux shell on Windows whose root directory is something you've designated, like C:\cygwin.
2. A few more things to set up. Fire up Cygwin and make a bin folder in your home directory. Add this directory to your PATH variable, then cd into it.
Code:
mkdir ~/bin
PATH=~/bin:$PATH
cd bin
This blog post has code for a python script that will be used later. Make a new file using an editor of your choice. Copy the code and save the file as anything you want (I named it "pack.py"). When you're done, cd back to your home directory.
3. Downloading source. From your home directory (or a subdirectory if you wish), use git to clone the platform frameworks base into a new directory (here I've called it "android").
Code:
git clone http://android.git.kernel.org/platform/frameworks/base.git android
cd into that directory and examine the git tags.
Code:
cd android
git tag
You'll get a list of tags. Choose the one that matches the API level you want to build your project(s) in. I'm using API level 10, so I chose android-2.3.3_r1. That's what you're going to check out.
Code:
git checkout android-2.3.3_r1
4. Reorganizing the source code. You need to locate all the java source files and restructure everything into a directory structure that matches the package naming. Fortunately, that script from earlier does exactly this and then zips it up into a nice little package for you called "sources.zip".
Code:
python ~/bin/pack.py
5. Move this zip file to the proper SDK platform folder. Since I downloaded sources for API level 10, I want to move this zip file to
Code:
C:\android-sdk-windows\platforms\android-[B]10[/B]
You can do this with your regular old file explorer on Windows. Extract the contents into a subfolder named "sources".
6. Get Eclipse to recognize them. Open up a project (or start a new one) whose target is the API level you just did all that stuff for. In the package explorer, right-click the project root and click "Refresh". Now when you browse the class files under project-root/android 2.3.3/android.jar/whatever, you'll see actual source code instead of that nasty "Source not found" page.
Enjoy ^_^
Hi guys. I have trouble with installing Java JDK 5 on Ubuntu 11.04. It's necessary for custom ROM development, so I really need it. I've had it installed before, but I had to format my Ubuntu partition and I lost it. I've followed all the steps, but there's an error telling that the sources are missing. Any ideas guys? It's very important, so please help!
Thanks in advance!
Did you add Path variables?
PATH=$PATH:/path/to/executables
Are you using OpenJDK or Oracle JDK.
Ubuntu comes with OpenJDK by default so if you want the Oracle version go to their website. Download JDK 5 extract the JDK then add the Path variables to the executable folder.
Also make sure you get the self-extracting download and not the rpm download.
en4bz said:
Did you add Path variables?
PATH=$PATH:/path/to/executables
Are you using OpenJDK or Oracle JDK.
Ubuntu comes with OpenJDK by default so if you want the Oracle version go to their website. Download JDK 5 extract the JDK then add the Path variables to the executable folder.
Also make sure you get the self-extracting download and not the rpm download.
Click to expand...
Click to collapse
Thanks for the info! Will definitely try this.
en4bz said:
Did you add Path variables?
PATH=$PATH:/path/to/executables
Are you using OpenJDK or Oracle JDK.
Ubuntu comes with OpenJDK by default so if you want the Oracle version go to their website. Download JDK 5 extract the JDK then add the Path variables to the executable folder.
Also make sure you get the self-extracting download and not the rpm download.
Click to expand...
Click to collapse
Where's JDK 5? I can't see it.
Sent from my GT540 using XDA App
I just had to install an Ubuntu machine for the same reason: to build AOSP from source and I couldn't do in in my preferred environment, Gentoo (JDK5 is officially dropped from Gentoo due to security issues).
Ubuntu didn't have any qualms about installing JDK5. Just ran:
sudo apt-get install sun-java5-jdk
then followed the instructions here:
http://source.android.com/source/initializing.html
Gene Poole said:
I just had to install an Ubuntu machine for the same reason: to build AOSP from source and I couldn't do in in my preferred environment, Gentoo (JDK5 is officially dropped from Gentoo due to security issues).
Ubuntu didn't have any qualms about installing JDK5. Just ran:
sudo apt-get install sun-java5-jdk
then followed the instructions here:
http://source.android.com/source/initializing.html
Click to expand...
Click to collapse
Thanks a lot! I successfully installed Java JDK5 on my Ubuntu!
pySignare
"-to sign"
v1.0
Version 1.0
Complete re-write into python.
Prerequisites
Windows (for now)
Java
Get Java here --> https://www.java.com/en/download/
Python 3.x
Get 3.3.4 here --> http://www.python.org/download/releases/3.3.4/
Instructions
Download
Extract
Copy Unsigned APKs Into "UnsignedApks"
Run "pySignare.py"
Follow On-Screen Prompts
Thats It
Future Development
Make X-Platform - (Shouldn't be too hard)
Minor code tidy up
Currently its bundled with TestExample.apk (just an empty renamed zip) so it can be tested straight away.
DOWNLOAD HERE (Download ZIP - Right hand side)
Please post your experience, and if you encounter any errors, let me know and I'll attempt to fix.
FAQ
Q. I get the error - 'java' is not recognized as an internal or external command, operable program or batch file.
A. You either, do not have the Java installed or have not added java to your PATH in Environment Variables. Either install Java or add Java to your PATH.
Thanks dude.
Any feedback, problems or suggestions?
wow it works! Easy to use! thanks!
Thank you.
Are there any Linux wizards out there who can help me port this?
New version 0.3 available.
tried it all i get is cannot find specified path
edit: forget that i fixed it had to modify the it as im using jdk 1.7.0
I don't know why I changed it, but in v0.3 it assumes you have installed the Java Development Kit (JDK) on a 64bit system (it mirrors my system rather than a universal approach).
If you have java added to your windows PATH, try using these files, just extract these to the same directory and run these instead.
works great! small suggestion is for the batch file to ask for the location of your jdk.
also have error checking as the batch said it worked but didnt at first (due to the location of the jdk)
andyharney said:
I don't know why I changed it, but in v0.3 it assumes you have installed the Java Development Kit (JDK) on a 64bit system (it mirrors my system rather than a universal approach).
If you have java added to your windows PATH, try using these files, just extract these to the same directory and run these instead.
Click to expand...
Click to collapse
I am using a 64 bit system I have jdk on both program files 64 bit and (x86) and the path in the test keys ran to jdk 1.6.0_25(x86) so I used notepad ++ edit it to 1.7.0(x86) tried again it signed and zipalinged no problem
Sent from my Desire HD using XDA App
Your right, I wrote this quickly to fulfil my needs on my system.
I will update to v0.4 with error checking & JDK checking soon.
Thanks for the suggestion.
EDIT: Seems you beat me to the reply leith. If your JDK is added to your windows path then it shouldnt matter whether its 32 or 64 bit. When I updated from v0.2 to v0.3 I used my personal build rather than the universal "java" approach. I can see that as explicit paths are specified in the .bat. v0.4 will add error checking and will most probably include a stripped out java package.
awesome! keep up the good work dude
andyharney said:
DOWNLOAD HERE
Click to expand...
Click to collapse
unable to dl now: Fatal error: Method ExceptionDisplay::__toString() must not throw an exception in /home/aharney/public_html/index.php on line 644
?
Try using a different browser, that error is quite rare and unique to certain localised versions of windows + firefox.
Version 0.4 now out.
Flawless victory brilliant Andy
im no stranger to signing apks
both of us know this tool is the best
better than any other signtool
never gonna give this up
not gonna desert this tool...
I saw what you did there. Version 0.5 will replace icon.png in every apk with a png of his face.
I can't download the file
Forbidden
You don't have permission to access /index.php on this server.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Click to expand...
Click to collapse
Yeah, I had to take the site down again. Been hit with 2 DDoS attacks in the last 3 days. I don't know why.
I will have it back up at some point tonight. I will PM you when its back up.
Hi, i'm having troubles to open the SDK manager. I have Windows 7 64-bit and i Installed de jdk 1.7.0_25 64-bit. This are the solutiones i've tried but with no success:
Installing SDK in c:\
Adding JAVA_HOME enviroment variable to the system pointing to jdk1.7.0_25
Adding JDK_HOME pointing the same place...
adding c:\program files.....jdk...\bin; to Path in enviroment variables
Editing few lines of android.bat file like:
Code:
set java_exe=
call lib\find_java.bat
if not defined java_exe goto :EOF
to
Code:
set java_exe="c:\Program Files\Java\jdk1.7.0_25\bin\java.exe"
Downloading the version that comes with eclipse... same results..
Finally i tried with Android Studio but when i try to open SDK Manager inside this program it comes an error that say:
ERROR: No suitable Java found. In order to properly use the Android Developer
Tools, you need a suitable version of Java JDK installed on your system.
We recommend that you install the JDK version of JavaSE, available here:
http://www.oracle.com/technetwork/java/javase/downloads
If you already have Java installed, you can define the JAVA_HOME environment
variable in Control Panel / System / Avanced System Settings to point to the
JDK folder.
You can find the complete Android SDK requirements here:
http://developer.android.com/sdk/requirements.html
As it writes you this
ERROR: No suitable Java found. In order to properly use the Android Developer
Click to expand...
Click to collapse
maybe it wants 32-bit Java for you 64-bit system anyway?
Like an obvious hint: Try 32-bit Eclipse 32-bit Java and 32-bit ADT plugin in you system. It should work.
EDIT: Windows Phone 8.1 is released! You can now download the official SDK from here
Hey,
the installation of the Windows Phone 8.1 SDK leak was discussed here very much, sometimes it works, sometimes not.
So I written a tutorial how to install it!
How to:
1) Download the SDK ISO from here ALL OTHER LINKS WILL NOT WORK!
1b) Download Visual Studio 2013 Express for Windows in English from here
2) Extract the VS 2013 ISO and install it.
3) Extract the leak ISO and run the installer as administrator.
4) The installation should take an half hour. You can drink one or two coffee
5) Start cmd as administrator and run "cd C:\Program Files (x86)\Microsoft XDE\8.1"
6) Enter "XDE.exe -vhd "C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Emulation\Images\Flash.vhd"". First boot will take 5-10 minutes.
7) THE EMULATOR IS WORKING!
You can also create an shortcut on desktop that saves you time. Location is: "C:\Program Files (x86)\Microsoft XDE\8.1\XDE.exe" -vhd "C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Emulation\Images\Flash.vhd"".
FAQ
How to install it on windows 7?
You need to install SP1, then it should work.
After clicking the VS link, a logon field appears, what should I do?
Just login with your outlook account and click download
Can I run it on 32-bit?
Yes, you can. You need to install VirtualBox or VMware. Create a new virtual machine and select the Flash.vhd in the SDK location. To get it to work, you must run it as administrator.
What are the minimal requirements for it?
It works on any computer with 64-bit W7 or W8(.1) For 32-bit look above.
If this guide helped you please press thanks!
Thanks @DaviUnic for a easier way to start the emulator!
Yes, I'm seeing my tutorial was landed in the news! Thanks at all what thanked me and followed this tutorial!
hey nico
There's easier ways to start the emulator than deploying an empty app... You can use the following command in CMD to start a desired VHD: xde.exe -vhd "[vhd location]".
DaviUnic said:
There's easier ways to start the emulator than deploying an empty app... You can use the following command in CMD to start a desired VHD: xde.exe -vhd "[vhd location]".
Click to expand...
Click to collapse
Thanks, already tried this, for 8.1 emulator, it didn't works
Last time I tried it worked...
Hold on, I have to re-install VS2013 and the SDK, then I'll try again.
EDIT: Just tried and it works fine for me. Just go to C:\Program Files (x86)\Microsoft XDE\ with CMD and then type XDE.exe -vhd "C:\Example\Path\example.vhd" and it works fine.
DaviUnic said:
Just tried and it works fine for me. Just go to C:\Program Files (x86)\Microsoft XDE\ with CMD and then type XDE.exe -vhd "C:\Example\Path\example.vhd" and it works fine.
Click to expand...
Click to collapse
Thanks, will test it when i'm at home
OK, edited it in the tutorial. Thanks!
You can also make a shortcut for this, saves you a bunch of time.
DaviUnic said:
You can also make a shortcut for this, saves you a bunch of time.
Click to expand...
Click to collapse
Thanks a lot, you make my tutorial perfect
Got any other links handy? That site isn't working. It just says "An error occurred. Please click here to reload the page"
nice guide
minimum
What's the minimum requirements to run this
theonepharaoh said:
What's the minimum requirements to run this
Click to expand...
Click to collapse
You're running a phone based software on your PC, it will definitely work.
Sent from my Nexus 5 using Tapatalk
You Visual Studio link takes one to the MSDN login page.
Might want to make the link this one:
http://www.microsoft.com/en-us/download/details.aspx?id=40787
does this works on windows7? i mean i am not able to install vs express 2013 on windows 7 it is asking me to upgrade to new windows version.
shah_vm said:
does this works on windows7? i mean i am not able to install vs express 2013 on windows 7 it is asking me to upgrade to new windows version.
Click to expand...
Click to collapse
No it seems as per the link VS Exp. 2013 for windows
myst02 said:
Hey,
the installation of the Windows Phone 8.1 SDK leak was discussed here very much, sometimes it works, sometimes not.
So I written a tutorial how to install it!
How to:
1) Download the SDK ISO from here ALL OTHER LINKS WILL NOT WORK!
1b) Download Visual Studio 2013 Express for Windows in English from here
2) Extract the VS 2013 ISO and install it.
3) Extract the leak ISO and run the installer as administrator.
4) The installation should take an half hour. You can drink one or to coffee
5) Start cmd as administrator and run "cd C:\Program Files (x86)\Microsoft XDE"
6) Enter "XDE.exe -vhd "C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Emulation\Images\Flash.vhd"". First boot will take 5-10 minutes.
7) THE EMULATOR IS WORKING!
You can also create an shortcut on desktop that saves you time. Location is: "C:\Program Files (x86)\Microsoft XDE\XDE.exe -vhd "C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Emulation\Images\Flash.vhd"".
If this guide helped you please press thanks!
Thanks @DaviUnic for a easier way to start the emulator!
Click to expand...
Click to collapse
Is there anyway to make windows emulators work on Android???
No, because the emulator uses Hyper-V - which is also why it requires at least Windows 8, because Windows 8 was the first client release to include Hyper-V (previously it was available only on Server editions).
Besides that, the build in the emulator is an x86 compile, and I don't think there's an x86 emulator for android.
DaviUnic said:
No, because the emulator uses Hyper-V - which is also why it requires at least Windows 8, because Windows 8 was the first client release to include Hyper-V (previously it was available only on Server editions).
Besides that, the build in the emulator is an x86 compile, and I don't think there's an x86 emulator for android.
Click to expand...
Click to collapse
So other than that I can run it on Windows 8.1 standard edition (no Pro)? Oh and, my download speeds are very slow. Mind if you host it elsewhere?
Yeah, I think you can. But Hyper-V isn't installed by default, so you must go to the features list and install Hyper-V first, then you can use the emulator.
Confirmed, only working on Win 8 Pro.
View attachment 2599789
You can, however, install any virtual machine software, then download Windows Server 2012, and run the VHD. Once you're in it and set up everything, you can follow OP instructions, install Visual Studio blah blah blah. (remember to enable Hyper-V in Ctrl Panel) Follow till the last step, then you should be able to open the emulator.
Where exactly am I going wrong? Can someone help