I'm trying to get into development of custom ROM's and whatnot and am following CM's build guide, however I've read numerous people attest to using a distribution of Linux for all development.
I do a little Java and c++ development as I study Software Engineering and to be honest considering Mac is UNIX also, I've never found any difference between me using my MBP or running one of the many linux distro's i've experimented with.
I was just wondering if anyone can actually give some valid reasons and justifications for all the people who state that it's almost a -must- to develop on 64-bit linux installation.
I know this question has probably been asked before but I've been searching and can't find any non-flamey posts.
Cheers!
Developing on Linux isn't a MUST, but I highly recommend it. With Linux you can set up servers to test connectivity with ease, and there is a plethora of built in support for Linux on distributions like Ubuntu. Different distributions, such as Kali (formerly BackTrack) are good for hacking and stuff. Simply using 'sudo apt-get install' you can get amazing tools to help you out.
Blog: http//konvey.blogspot.com | Sent from the Nokia 3310
vyper91 said:
I'm trying to get into development of custom ROM's and whatnot and am following CM's build guide, however I've read numerous people attest to using a distribution of Linux for all development.
I do a little Java and c++ development as I study Software Engineering and to be honest considering Mac is UNIX also, I've never found any difference between me using my MBP or running one of the many linux distro's i've experimented with.
I was just wondering if anyone can actually give some valid reasons and justifications for all the people who state that it's almost a -must- to develop on 64-bit linux installation.
I know this question has probably been asked before but I've been searching and can't find any non-flamey posts.
Cheers!
Click to expand...
Click to collapse
the only reason is that as most android developers work from linux so they have built most tools for that platform, on other platforms you'll find only the most rudimentary tools.
so you can do the same on mac or windows or beos if you want but you'll have to create all the missing tools by yourself probably.
Related
Hey All,
I'm curious about compiling a native Linux app for the Nexus One, and wondering what the best way is to go about it in Ubuntu. I found this link for the G1:
http://android-dls.com/wiki/index.php?title=Compiling_for_Android
Since the Snapdragon is also ARM I'm assuming this will work, but is there a decent way to do this on Ubuntu or is my best bet to install Debian in Virtualbox and compile it there?
Thanks,
-Dan
overridex said:
Hey All,
I'm curious about compiling a native Linux app for the Nexus One, and wondering what the best way is to go about it in Ubuntu. I found this link for the G1:
http://android-dls.com/wiki/index.php?title=Compiling_for_Android
Since the Snapdragon is also ARM I'm assuming this will work, but is there a decent way to do this on Ubuntu or is my best bet to install Debian in Virtualbox and compile it there?
Thanks,
-Dan
Click to expand...
Click to collapse
There's a certain amount of vagueness associated with your generalized request.
That said ... ubuntu is sooo very very closely related to debian in the linux fam!
Almost all things described in the link your reference will carry-over/hold-true in ubuntu as they are stated in debian.
But ... the real kicker is the specific app you're trying to compile.
Depending on what the app you want to build depends on ... will determine your overall success. While the reference posted link is insightful, you must understand the need to link against libraries being used. Many of these libraries (at least the basic 'c' ones) you'll find in the AOSP code in android's git repo.
I would suggest taking a look at the "external" projects found in the AOSP code to see how they utilize the makefile setup and build-environment and how they leverage bionic and others to build against.
The way those projects build out, would be essentially what you're looking for .. (I assume) again, I state this without knowing the specific app you have in mind.
Hope that helps.
~enom~
How well would a linux disto made for desktop PCs work with touch screen mouse inputs and no keboard support? (im assuming the Android VK doesnt work when you press on a textbox in a Linux Emulator)
enomther said:
There's a certain amount of vagueness associated with your generalized request.
Click to expand...
Click to collapse
Sorry, I should have been more specific - by Linux native I didn't mean any app in particular, I just meant not a java Android app. I'm really just looking to compile a HelloWorld in C and run it at the shell on the Nexus at this point.
My main concern with the link I posted is that although Ubuntu is based on Debian, Ubuntu does not maintain an ARM version, and the package mentioned in that tutorial is not included in Ubuntu because of this.
So I'm just wondering if anyone has come up with a good solution for compiling for the Nexus in Ubuntu, or if I'm better off installing Debian in a virtual machine.
Thanks,
-Dan
http://android-tricks.blogspot.com/2009/02/hello-world-c-program-on-using-android.html
I think this is more of what I was looking for, I'll build AOSP and try out the agcc script.
-Dan
Another idea: find the Android source wherever Google hides it, I have forgotten, sorry! But they give instructions for setting up a whole ARM cross-compiling environment on x86/x64 Ubuntu, and as I recall, it was really easy, quick and automatic! (so easy, I did it just so I could compile some ARM apps myself, I really didn't need to compile Android, I don't build phones! )
After that, you too should be able to compile your own apps into native ARM binaries.
overridex said:
Sorry, I should have been more specific - by Linux native I didn't mean any app in particular, I just meant not a java Android app. I'm really just looking to compile a HelloWorld in C and run it at the shell on the Nexus at this point.
Click to expand...
Click to collapse
To do this, you need a version of the ARM tools appropriate for your platform and then use them for building a static binary for Linux. You can find such tools at CodeSourcery (http://www.codesourcery.com/sgpp/lite/arm). Given that you sound like you have Ubuntu, then the Linux version from this page, http://www.codesourcery.com/sgpp/lite/arm/portal/[email protected]=lite, would be what you want. The key is to use the --static parm when you build the binary.
From there, just get your binary over onto the target and run it from the command shell.
Remember that static binaries are HUGE. They have to include all library functions linked in.
If you are looking for tiny binaries, look into the NDK and use the BUILD_EXECUTABLE rule for Android.mk.
A few more useful links, but not much that hasn't already been stated in previously referenced links:
http://benno.id.au/blog/2007/11/13/android-native-apps
http://honeypod.blogspot.com/2007/12/dynamically-linked-hello-world-for.html
http://honeypod.blogspot.com/2007/12/initialize-libc-for-android.html
Hi guys i have been trying to know about android driver development.. i know driver development is not an easy job but i'd like to learn.. Is there any tutorials for that or any simple examples??
[Q] How to write drivers for Android
Ashok,
Writing android drivers is no different then writing drivers for linux. In fact many linux drivers would simply just work on the android.
Here is a little reading list for you if you want to find out more about linux driver development:
http://kernelnewbies.org/New_Kernel_Hacking_HOWTO
http://www.ibm.com/developerworks/linux/library/l-linux-kernel/?
http://www.amazon.com/gp/product/0596100795
http://www.amazon.com/Linux-Device-Drivers-Jonathan-Corbet/dp/0596005903
Hope this helps
thanks for the tutorials and the book suggestions I appreciate the help.
If you are familiar with Linux kernel and Linux based development then it will not that tough for you since Android uses modified version of Linux kernel. For tutorial source for Android kernel go to:
http://android.git.kernel.org/
Please use the Q&A Forum for questions Thanks
Moving to Q&A
Memsgr religious
Mr.Wrong said:
If you are familiar with Linux kernel and Linux based development then it will not that tough for you since Android uses modified version of Linux kernel. For tutorial source for Android kernel go to:
Hello, sorry for raising the dead, but this topic is rare.
I have a project where I basically need to write a mouse cursor driver. Would you have any specific information on how the mouse is actually drawn on the system level, as in between activities/programs/windows/etc. ? And would it be possible to include this as part of an app, so that it can be downloaded by an average user? (not as vital)
Click to expand...
Click to collapse
hello, I was wondering, since Android is based on linux, if we can install a full version of Firefox (Linux version) on the tab. Does anyone know if this is possible?
I've never seen anyone run any linux apps in Android. That would surely be something we'd see if it were possible. I don't know the technical reasons why it isn't, but I'm pretty sure you can't.
You can't install desktop Firefox because much of the required software is missnig, all the UI stuff of regular Linux distro's aren't in Android, stuff like the X windows system, KDE or Gnome, and probably a bunch of other libraries.
The Linux portion of Android handles really low level stuff like file permissions, talking with the hardware, memory management but really nothing to do with the user experience.
you could just run ubuntu through chroot. it works okay.
Please use the Q&A Forum for questions Thanks
Moving to Q&A
Facegarden said:
I've never seen anyone run any linux apps in Android. That would surely be something we'd see if it were possible. I don't know the technical reasons why it isn't, but I'm pretty sure you can't.
Click to expand...
Click to collapse
Commandline stuff with few library dependencies can be ported fairly easily - busybox, bash, etc.
Graphical stuff - not nearly as easy as that depends on graphics toolkits not present in Android.
People forget that Linux is just the kernel. As you increase the number of abstraction layers used by software, Linux as implemented by Android and Linux as implemented by most desktop distros diverge more and more.
So i been developing actual apps for about 6 months, and want to get into customizing rooms, so i see that alot of you guys use cygwin, a virtual machine or linux and wanted to know if its really worth it running linux natively instead of a vm or cygwin...
if yes, then whats the general opinion on linux vs osx?
I have definitely used all three with good success. If you are RAM limited on your machine, skip the virtual machine option since you need enough RAM to run your base OS and the VM separately. One advantage to running linux natively is that you are forced to think in the linux world, which for an Android behind the curtain point of view is closer to the mentality you need. You might learn some good stuff familiarizing yourself with linux that later applies to your Android exploits!
SuperMiguel said:
So i been developing actual apps for about 6 months, and want to get into customizing rooms, so i see that alot of you guys use cygwin, a virtual machine or linux and wanted to know if its really worth it running linux natively instead of a vm or cygwin...
if yes, then whats the general opinion on linux vs osx?
Click to expand...
Click to collapse
I'm using win7 with andLinux installed. Unfortunately andLinux is based on Ubuntu 9.04 so I can't use most toolchains built on newer distro because they need newer versions of glibc.
So I'm forced to use CodeSourcery's toolchain which uses it's own glibc.
hey im new here....can anyone tell me which linux is best for android development and how to configure it........
ci9her said:
hey im new here....can anyone tell me which linux is best for android development and how to configure it........
Click to expand...
Click to collapse
Hi there. Depends on how familiar you are with Linux. If you are just beginning, then I suggest Ubuntu as it is the most popular distro and the one that most of the How-To Build Guides are written for. If you plan on developing anything newer than GB, then it's recommended to install the 64 bit version. You CAN build some ICS and JB versions on 32, but more of a pain than it's worth since the compiler is written in 64 bit.
There are tons of guides for beginners here - including Stickies at the top of this particular forum. If you search, you'll even find semi-automated scripts and such to set up the build environment for you.