Where should i start first to learn how to code for android, make roms and compile the android tree?
or just a good place to start?
From what starting point?
Building android to make custom builds involves knowing lots of things; java, c, linux, gcc build system, android platform, etc, etc.
To make apps you just need to know java and the android platform.
Start here: http://developer.android.com/
Code for Home screen Pull up Menu
I have a similar request but was unsure if I should start a new thread, If this needs to be moved my apologies (I also searched through Q&A forums as well and came up empty ). Where or how could I get the source code for the Home Screen pull up menu? I checked out the Google Source Code but it requires Linux or Mac OS and I run Windows Vista.
cingall said:
I have a similar request but was unsure if I should start a new thread, If this needs to be moved my apologies (I also searched through Q&A forums as well and came up empty ). Where or how could I get the source code for the Home Screen pull up menu? I checked out the Google Source Code but it requires Linux or Mac OS and I run Windows Vista.
Click to expand...
Click to collapse
i don't think you can compile the source code in windows
david1171 said:
i don't think you can compile the source code in windows
Click to expand...
Click to collapse
Yeah, I'm considering running Linux on my laptop alongside Vista, as I have hit dead-ends on a couple projects simply because you need Linux for different things . All I really need is a place that I could find the source; I had an idea that I proposed to mohsinkhan47 for his Vista theme and he asked me to find the code for the pullup menu. It would be much appreciated if anyone could guide me in the right direction.
i know where you can get the entire source code. grab it from here
Thanks for the link, that was the site that I went too before but says I need either Linux or Mac OS. Still scouring the android sites but coming up with nothing .
Yeah I do not think there is a way to compile the source in windows. I guess like stericson once said "you're going to have to get your hands dirty and use linux" (it was something like that.
Guess I gotta break my cherry sometime, thanks all for the advice.
Related
Can someone please explain how to set up CM on my PC so that I can run in an emulator and do some dev? Preferrably using Eclipse IDE.
Thanks!
Nexus One
CM 5.0.5.3
Yeah great post! I'm also looking forward to start dev'ing.
Did you already set up the Android SDK?
Yup. Android SDK is set up.
I just read [source.android.com/download] that you can't compile the Android source on Windows. That basically kills it for me at this time until I get my hands on a non-Windows machine.
Basically, I want to make changes to webkit for adding Arabic support. Can this be done without the above requirement?
daiski said:
Yup. Android SDK is set up.
I just read [source.android.com/download] that you can't compile the Android source on Windows. That basically kills it for me at this time until I get my hands on a non-Windows machine.
Basically, I want to make changes to webkit for adding Arabic support. Can this be done without the above requirement?
Click to expand...
Click to collapse
I'd grab a VMware image for e.g. Ubuntu Server 9.10 (http://www.thoughtpolice.co.uk/vmware/) and use some of the free VMware versions (e.g. Player). Then follow the instructions on Cyanogenmod Wiki to get the source code and build your own system image. There should be plenty of information about how to build it, and support on IRC or the forums. Once you're past that, you can start tinkering with the Webkit code. Webkit is part of the framework (I believe), and probably has a lot of dependencies on it, so you probably cannot build it without the rest.
Maybe you want this thread to be moved to the Development forum.
Thanks for the tips robert I'll get right on that!
This thread was in the Development forum and was moved here by a moderator.
Ah btw, I thought about VMWare Player again. I don't think you can add another disk there, or at least, it's complicated (http://communities.vmware.com/thread/158454). So you might want to use VMWare Server, which is free, too. You will need a couple of gigabytes for the source code, intermediate build files, etc.
robert-qfh said:
Ah btw, I thought about VMWare Player again. I don't think you can add another disk there, or at least, it's complicated (http://communities.vmware.com/thread/158454). So you might want to use VMWare Server, which is free, too. You will need a couple of gigabytes for the source code, intermediate build files, etc.
Click to expand...
Click to collapse
Can you explain why I'd need to add another disk?
Depends on how they set up the disk when they created the image. If they made it large enough, you don't need another disk.
--- copied with permission from nathanpfry.com ---
Hi everyone! Have you ever wanted to compile your own nightlies, but are too intimidated or "not a dev"?
For various reasons, I've decided to write a guide about how you too can enter the wonderful world of development.
Before we begin, I'm going to say one thing. I'll probably repeat it a bunch of times too, to be sure everyone reads it at least once while skimming through this. PLEASE GOOGLE YOUR QUESTION FOR AT LEAST 5 MINUTES BEFORE ASKING IT HERE. The main reason I wrote this guide is to try to refocus the point of the "Development" forums on XDA. There are many users out there that seem to think this is a place to make demands for answers without trying to contribute or learn anything themselves. Developing isn't an easy thing. You should know a little bit of Linux going into this, if not, prepare yourself for some reading. This isn't the place for you to ask how to install Ubuntu, or why you need 64 bit. Just have a little faith and trust me.
Major thanks goes out to Hashcode.. Seriously, you have no idea what an inspiration he's been. For all intents and purposes, this guide will show you how to set up your system and compile ROMs based on his work, perhaps even help work on fixes. I suppose I should thank google, cyanogenmod, team aokp, thingonaspring (minimoto rocks!) a few others. You know who you are.
On with the show.
Here's a list of things you will need:
1) A decent computer (at least dual core, 2+ gig of RAM, 50 gig free HD space) capable of running Linux
2) A copy of Builduntu
3) Spare time and the desire to learn.
Double check that your main system is 64 bit. 32 bit OS will not work!
Once you get Builduntu up and running (there are instructions @ the above link), read on.
You need to make a decision. What flavor of Android do you want to compile? In other words, AOKP, Cyanogenmod, AOSP, LiquidSmooth, SimpleAOSP etc etc etc.
For the purposes of teaching everyone, I'm going to base this guide on AOKP.
You've made it this far, you're basically almost there. *cue motivational montage music*
When Builduntu says, "initialize the build repo", that means to sync your source code with a git repository. Run these commands in a terminal:
Code:
mkdir ~/android
Code:
cd ~/android
The following command will do the actual initialization:
Code:
repo init -u https://github.com/AOKP/platform_manifest.git -b jb-mr1
Ok, after this next part you're going to want to take a break. It's time to actually download to your computer (sync) the source code. As of writing this guide, it is over 10 gigabytes of information, depending on which "flavor" of Android. In the terminal:
Code:
repo sync
Don't worry, just execute and walk away. Depending on the speed of your internet connection, this could take a long time. Anywhere from one hour to "maybe-you-should-do-this-before-you-go-to-sleep". Up next is actually doing the compiling.
When that finishes, you have the source code. Let's get to business. This next bit will probably take a while also, but again, it's a set-it-and-forget-it situation.
Code:
cd ~/android
source build/envsetup.sh
lunch yourdevicenamehere
make otapackage
That should do it! Watch for errors, but everything should work at this point. Again, how long this takes is completely dependent on how fast your computer is. If it completes without a hitch, you'll have a flashable zip file located in ~/android/out/target/product/yourdevicename/
Congrats, you just compiled from source! Now, if you really want to get adventurous, you can start delving into the code itself and make some changes. But this post isn't the place to get into all that. Good luck, and please say thanks if this guide was helpful!
PLEASE PLEASE PLEASE If you happen to find an error in my guide (not just a question about it!) PLEASE PM ME. I will give you credit in the post. A potentially useful fix could be buried pages deep in the thread and unfortunately get lost if it's only a reply. Thanks!
Many thanks!
Although I didn't tried this howto yet, I feel obligated to thank you for this. In the past I though about trying to do something directly tweaking the code and, who knows, contribute with something nice to our "D3 society". But could never figure how to start it. I will spend some time trying to make it work using this "manual" and give some feedback about it.
Again, thanks.
Re: [DIY] How To Compile Your Own Nightlies (and Learn Something in the Process)
Great post.
Sent from my XT926 using Tapatalk 2
Thank you for taking the time to show the community how to contribute and give back what has been given.
Thanks for this awesome guide! I followed your directions and did produce a zip that I can flash with safestrap. Unfortunately it will not boot though:crying: Is there anything else to do with the kexec zip to make it safestrap compatible? Or did I just screw something up
Either way I am glad I did this and without your 2 great guides I never would have. So thank you again sylentprofet! :highfive:
Caldair said:
Thanks for this awesome guide! I followed your directions and did produce a zip that I can flash with safestrap. Unfortunately it will not boot though:crying: Is there anything else to do with the kexec zip to make it safestrap compatible? Or did I just screw something up
Either way I am glad I did this and without your 2 great guides I never would have. So thank you again sylentprofet! :highfive:
Click to expand...
Click to collapse
Hmmmmmm. That is a frustrating problem. I've had it happen before..
Just tried a compile myself, and CM10 doesn't work. Silly me for thinking that everything would go smoothly. It could be some changes reflected recently on CM's end. The joys of development!
However, I just tried an AOKP 4.2 build, and it does boot. So I'm going to make some quick changes to the guide to reflect building for AOKP while I examine the code and see what's up.
There's nothing more frustrating when a build completes successfully and then won't flash. I'll keep everyone posted.
this looks amazing
thank you for spending the time to write this up!
May be up for a reinstallation of my Ubuntu (currently 12.04 x86 :/).
Wonderful, might try to adapt for the galaxy note 3.
Lillie via LG Spectrum (waiting for N3 DE) & tapatalk
Hi guys,
If you're, like me, greatly excited to get Ubuntu Touch onto your phone, and/or tablet, here is a guide to port it!
It helps you get started on a port:
https://wiki.ubuntu.com/Touch/Porting
Also:
This is not a thread for eta:s for your device port. Nor is it a thread to ask for a port. Both of which you'll have to go to each device's own forum.
This is a thread for discuss ports, get help on them and to share experiences.
For Ubuntu Touch specific questions, see other threads.
FAQ:
Can you port device X?; Ask in your device X's forum. Or even better, try it yourself! It's not that hard, actually. See link above.
Does Ubuntu Touch run Android Apps?; No.
Will it?; Maybe. If anyone cares to actually make it work.
Do I need to have X; run Y; or do Z?; Check the Port guide! https://wiki.ubuntu.com/Touch/Porting
Sent from my GT-I9300 using xda app-developers app
Everyone with a nexus needs to install Ubuntu and then show everyone they know how in it's current state it is unusable except as a test device for apps.
Sv: Port Ubuntu Touch
Markk29 said:
Everyone with a nexus needs to install Ubuntu and then show everyone they know how in it's current state it is unusable except as a test device for apps.
Click to expand...
Click to collapse
Well, it is a dev release for developers and Ubuntu enthusiasts, so they probably already run Ubuntu. And if not, it's a 20 min install.
And porting it is still a large project by itself, so it'll go nicely hand in hand until the stable release of Touch, I think.
Sent from my Transformer using xda app-developers app
coming soon https://plus.google.com/u/0/107265043789873157543/posts/hAE1grem6hj
Kalashnikitty said:
coming soon https://plus.google.com/u/0/107265043789873157543/posts/hAE1grem6hj
Click to expand...
Click to collapse
is that S3 , in the pic if i am not wrong?
Porting posted:
https://wiki.ubuntu.com/Touch/Porting
S3 already has it: http://www.omgubuntu.co.uk/2013/02/ubuntu-phone-up-running-on-samsung-galaxy-s3
Just been reading through the process and if seems relatively straightforward to port so I can't wait to see what comes out of this
can i ask a question?what mean ubuntu is based on cm10.1?by which meaning?ubuntu i quess it will be an OS by itshelf.why based on cm10.1?
termagazis said:
can i ask a question?what mean ubuntu is based on cm10.1?by which meaning?ubuntu i quess it will be an OS by itshelf.why based on cm10.1?
Click to expand...
Click to collapse
Because some of the Android components are reused. Read here: https://wiki.ubuntu.com/Touch/Porting#General
Ubuntu is a distro. Linux is an OS. Android is kind of a distro too.
Please correct me if I'm wrong.
Actually pending when canonical gets to compile drivers for particular phones which incidentally is probably going to be for only their oem devices, they use the cm base.
Essentially just the drivers and hal layer.
Its not based on CM. It takes advantage of CM base. Its direct ubuntu.
And from what iv seen you can forget about lag. The alpha is awesome compared with android alphas
Sent from my GT-N7000 using xda premium
edy_3dz said:
Because some of the Android components are reused. Read here: https://wiki.ubuntu.com/Touch/Porting#General
Click to expand...
Click to collapse
yes i have read this but my english isnt perfect so i maybe didnt understant something.so because ubuntu and android are based in Linux kernel,they taking some stuff "ready" for more easyness.something like that?
Phones need drivers like your PC does and a kernel which acts as interaface between the hardware and the operating system.
Everyphone uses its own vendor supplied kernel with some modifaction and their own graphics driver. So they use the low-level stuff that already exists for Ubuntu.
You can't just make one "OS" for a smartphone that just works on all devices it has to be ported to the specific hardware (kernel and driver).
blackout23 said:
Phones need drivers like your PC does and a kernel which acts as interaface between the hardware and the operating system.
Everyphone uses its own vendor supplied kernel with some modifaction and their own graphics driver. So they use the low-level stuff that already exists for Ubuntu.
You can't just make one "OS" for a smartphone that just works on all devices it has to be ported to the specific hardware (kernel and driver).
Click to expand...
Click to collapse
thats what i mean.so they took the allready existing stuff from cm10.1 because it will work with ubuntu (or with some small changes) because both OS are based on Linux kernel.i understand right?
fromanbr said:
Ubuntu is a distro. Linux is an OS. Android is kind of a distro too.
Please correct me if I'm wrong.
Click to expand...
Click to collapse
Ubuntu is a distro or distribution which is a OS Linux isn't a OS it's a kernel (the underlying framework kinda like the glue)
PHONE SLOW CLICK ME?
_____________________________________
"If your doing the right thing then to hell with everyone else -Deadly"
TingTingin said:
Ubuntu is a distro or distribution which is a OS Linux isn't a OS it's a kernel (the underlying framework kinda like the glue)
PHONE SLOW CLICK ME?
_____________________________________
"If your doing the right thing then to hell with everyone else -Deadly"
Click to expand...
Click to collapse
Wikipedia says Linux is an unix like OS, but the main component is the Linux Kernel. Android only uses the Linux Kernel and not so much the GNU system tools which make it unix like, that is why people generally don't refer to android as a Linux distro.
BukaKing said:
Wikipedia says Linux is an unix like OS, but the main component is the Linux Kernel.
Click to expand...
Click to collapse
But saying it like that makes it sound like u can use this as a Mac OS or Windows replacement which I think is what he was asking
Android only uses the Linux Kernel and not so much the GNU system tools which make it unix like, that is why people generally don't refer to android as a Linux distro.
Click to expand...
Click to collapse
I never said android was a Linux distro
PHONE SLOW CLICK ME?
_____________________________________
"If your doing the right thing then to hell with everyone else -Deadly"
TingTingin said:
But saying it like that makes it sound like u can use this as a Mac OS or Windows replacement which I think is what he was asking
I never said android was a Linux distro
PHONE SLOW CLICK ME?
_____________________________________
"If your doing the right thing then to hell with everyone else -Deadly"
Click to expand...
Click to collapse
You didn't say android was a Linux distro but he did, I was just adding to the conversation.
I think I may understand what you're thinking though. Mac and Windows are not open source and you cant build your own version, so they are not as comparable in that sense, they are binary distributions. But you can build your own Linux configured the way you want outside of any distro, a distro is just a packaged version of Linux with additional packages and configurations.
Had angie tried to pull the source code? It's ridiculously slow on my end. About 15gb at 9 to 152kbs... I guess every dev in the world is trying to pull it...Lol...too bad there's no way to speed it up
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
fromanbr said:
Ubuntu is a distro. Linux is an OS. Android is kind of a distro too.
Please correct me if I'm wrong.
Click to expand...
Click to collapse
Actually, Linux is a clone of the UNIX kernel. Ubuntu is an operating system (or Linux distribution) with a Linux kernel. Android could be considered a Linux distribution as well, even though it's mostly Java stacks on top of a Linux kernel.
Sent from my Galaxy Nexus using Tapatalk 2
Hey,
first off, I'm not sure if this thread really belongs here, but I also thought its not something General and not a usual Q&A topic.
I see my self as a developer now, one really at the beginning, but I thought I can get the best help here.
So the most important step is already done, I know what I want to make. A better ElementalX (yes, hard do believe I know).
What i want to do? Add CPU OC Support (outside of the installer), GPU OC Support, GPU Voltage Control Support (for the KControl App) and more CPU and I/O Governors.
Also, if it works easy, I would try to add a short Boost of 2.8 GHz (or 2.6/2.7) like in faux123's Kernel, maybe for 2-5 Seconds, as it otherwise crashes (my nexus 5 at least).
So, are you interested? Yes? Cause so am I. I'm reading about how to make my own Kernel since a lot of time, but got back to it yesterday and today i installed Ubuntu 15.04 and updated it with anything needed.
GCC 4.9.2 was installed already, I followed this tutorials:
oh and before, i run Ubuntu 15.04 (Dual Boot) as I feel like in the totally wrong place with Linux and Ubuntu is easier for Windows people like me.
Code:
[URL="http://forum.xda-developers.com/android/software/ultimate-guide-compile-android-kernel-t2871276"]http://forum.xda-developers.com/android/software/ultimate-guide-compile-android-kernel-t2871276[/URL]
the above link didnt gave me links to Google Devices Source Code so I searched for myself :
[URL="https://source.android.com/source/building-kernels.html"]https://source.android.com/source/building-kernels.html[/URL]
[URL="http://jhshi.me/2014/06/30/build-kernel-in-tree-with-aosp-for-nexus-5-hammerhead/"]http://jhshi.me/2014/06/30/build-kernel-in-tree-with-aosp-for-nexus-5-hammerhead/[/URL]
So, can someone give me a quick guide on how to get the source code of LMY48B Kernel?
I already did this:
Code:
sudo apt-get install openjdk-8-jre
sudo apt-get install openjdk-8-jdk
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2
git clone https://android.googlesource.com/kernel/msm.git kernel
but i cant find that "Kernel" folder anywhere on my Ubuntu partition...
So what are my next steps? I could also try asking flar2 directly but I am not sure if he would give his source code to a noob like me
I would keep the Kernel private until I am confident with Updating it.
Is someone interested in working with me? would be more like me telling what I would like and him giving me the code oh well, maybe that's a bad idea :silly:
I am also open for Eclipse, as I already have that installed on Windows, sadly I'm unable to find the "Choose SDK location". Not in settings, not under help, not under any other tab. So I googled that problem and I just found out that other users seem also not able to find it. And I stopped using that thing. Maybe someone here knows how to do that, than I would start learning about how to do it in there again.
Help is very very appreciated.
https://dcrin3.com/unscrambled/?p=756
https://android.googlesource.com/kernel/msm/+/android-5.1.1_r0.6
xXDanielHDXx said:
I could also try asking flar2 directly but I am not sure if he would give his source code to a noob like me
I would keep the Kernel private until I am confident with Updating it.
Click to expand...
Click to collapse
All @flar2 work is already public. His N5 branch has been forked 26 times. Check his Github. As long as you give him credit if you ever release it as your own fork away.
garynych said:
https://dcrin3.com/unscrambled/?p=756
https://android.googlesource.com/kernel/msm/+/android-5.1.1_r0.6
Click to expand...
Click to collapse
thanks for the reply
the first page is really nice. Simple, yet anything I need is shown.
I already know the second one though. I tried to download the url with ubuntu but it said that that url doesnt include any git data.
Is there a correct url for that, or how to download it at all? That Question and maybe 1-2 more and I should have my Kernel ready
Hi, guys.
Android Studio newbie here. I'm a loooong time Linux user/ sys admin, but have just downloaded Android Studio. My motivation for doing so, was to give an existing (neglected) open source app a once over, ideally with a Linter, some code quality checking and maybe refactoring. Essentially, bringing it up to current Android standards. I've installed AS on my Linux Mint box, and have added the GitHub repository. I can see the code, and lint options in the menus, but don't know where to start. Does anyone know of a flowchart, or process I could follow?
Many thanks,
Chris