Configure Ubuntu 13.04 for Compiling Android ROMs - Samsung Galaxy Nexus

As someone who is trying to learn how to develop for Android, I found alot of tutorials in setting up the Linux environment to be using outdated information which led to alot of frustration. After a few days of poking around the internet, I stumbled across this thread I'm linking that helps you get Ubuntu Linux 13.04 set up easily. Now this is just getting the environment set up, for developing for a device you'll have to follow other guides like the development tutorial on the android development page (http://source.android.com/source/downloading.html) or if you find a device specific one. I have completed a couple of personal builds from this that work fine (didn't release them since they were just pure stock) so as far as that goes, it works great.
The thread is [GUIDE] How to Configure Ubuntu 13.04 Raring Ringtail for Compiling Android ROMs and it was created by sylentprofet who copied it with permission from soupdawg on wordpress.

Related

installing ubuntu

I became interesed in using linux apps like wine so i'm looking for some basic tutorials to install linux on my defy so that i can use, both androd and linux whenever i want.
Thanks !
i dont think their will be any basic tuts on it porting a whole os is a trick business. Although you could use some kind of remote desktop perhaps

ubuntu version for building roms

Quick noob question with a little intro info ...
I have developed some Android apps, using Ubuntu 11.10 and 12.04, without issue. I do this on a 64-bit machine.
Just started looking into building ROMs (for my KF and other devices) and Google recommends Ubuntu 10.04 for this, though they seem to say that 11.10 and 12.04 may work ... just no guarantees.
My question is: Should I go to Ubuntu 10.04 if I am going to try my hand at ROM building and/or kernel development? Or, can I safely stick with 12.04 LTS?
Thanks in advance...
12.04 is fine for building (i do it all the time)
teamgummy.com site has a great walkthrough for 11.10 that should work for 12.04, just switch the repo init line to whatever manifest you're trying to build to
i'm not sure if any of the devs have github repos, but hashcode maintains his cm9 with an otter (kindle fire) manifest, and git provides some instructions for how to initialize here: https://github.com/KFire-Android/device-amazon-otter (scroll down)
those two guides should be enough to get you started! enjoy!!
there's also a thread in general with some other links:
http://forum.xda-developers.com/showthread.php?t=1690497
@barrmulio...
Good news all around -- I'll stick with 12.04. I really appreciate you going through all of the effort to post the very helpful links.
Followup...
Woohoo! Just compiled my first KF ROM ... took about 1 hr 15 mins.

[Q] Linux question

How does I set up teh linux?
1- you dont know anything about linux. go ubuntu. we will tweak it after that. version 10.xxx (cant remember exactly).
2- you've used linux before and feel comfortable when thinking about it. go ubuntu/fedora.
3- no worries. you can troubleshoot alone when leenucks acts funny, you su everyday. go arch linux.
bottom line, it all comes to a few package versions.
make, python2, git, jdk, maybe a few others, need old versions. even in ubuntu, if you would like to start from a more updated base image, you'll need to downgrade. arch linux allows this with more freedom, since its more modular.
i havent used fedora for a few years now. used it back when red hat quit doing desktop images, didnt stay long and switched to slack.
i prefer archlinux because it's 300mb'ish iso, allows lvm, luks from live cd, doesnt have a text-based installer but install scripts, rolling release system (prebuilt packages/packages built from src using abs/aur, testing repo), customizable/modular, cli package manager (pacman ), systemd, grub2..
basically, if you like bleeding edge and power to yourself, try archlinux. read the wiki, begginer guide, install guide. first time i did it, i used another pc to help me go through all the steps.
sent from my i9250
When you're interested in Linux you can take a easy to use Distro like Ubuntu.
Packetmanagement resolves dependencies autocratically and nearly each software is available as a precompiled Packet
Also such Distros are running 32 and 64bit Programms out of the box.
If you want to learn linux in deep (and have enough time to solve issues) i recommend a Distro like Arch or Slackware.
I use Slackware64 and learned a lot about Linux and the packet and library dependencies.
Because the Packetmanagement does not resolve dependencies.
Even GUI Tools are rare on this Distro, you have to struggle with config files.
Slackware is a pure 32 or 64bit Linux (can be build to a Multilib Linux).
For Example the Android SDK mainly uses 32bit.
Maybe you should try some Distros and use that one you feel familiar with.
Also there are good Resources out in the net which you should read (Filesystem Hierarchy Standard, File Permissions, Basic Shell Tools)
Google and en.wikibooks.org/wiki/LPI_Linux_Certification would be a good starting point.
You could also try some Live-CDs, mess with it and when all went wrong only reboot.
Good Luck
Indeed, start Ubuntu, you can even stay with it if you like. But Arch and the install guide give you a good grasp on how Linux works.
Of course, you can develop apps in Windows or OSX, and OSX and Linux are the only two that allow you to build Android from source (basically ROM development). You also need to know Java to develop Android apps, less fun than screwing around with Ubuntu lol.
Good luck!
Sent from my Galaxy Nexus using xda app-developers app
Thanks for all the replies guys! Wish me luck lol.
RoyJ said:
Thanks for all the replies guys! Wish me luck lol.
Click to expand...
Click to collapse
Just to give one final thought, I think Slack would be a better learning experiencing, since it's even more close to Unix than Arch. With Arch you learn a lot, that's a fact, but with Slack you understand even how libraries and dependencies work, kinda the hard way, since you don't have a package manager to take care of it for you.
I think both might be a steep (maybe too steep) learning curve, and Ubuntu will be easier but, Ubuntu does things more their way. It's Linux, but things are different. Eventually, you'll know what i mean.
sent from my i9250
Thanks for the input. That's something to look into for sure. I am in no rush to just jump in and try it. I'd really like to learn everything on a basic level like that first.
I'm trying to get the research down before I start messing with the development.

Introducing Ro0tb33r-T00ls: Root your Droid from any Linux

Hi,
Just wanted to wish everyone here a Happy New Year and also I want to introduce you my toolkit/method for rooting Android devices using any Linux distro. The toolkit is called Ro0tb33r-T00ls and it is 100% Linux native... The official webpage is this one:
ro0tb33r.xenodesystems.com
And well... The toolkit was born out of the necessity of rooting my android device without using a Windows Machine. It supports a wide variety of Devices, Compilations/Versions and I'm going to mantain it as long as I can. It is based of parts of other famous tools such as SuperOneClick with the zergRush/Psneuter Xploits (But it works a bit different and integrates additional tools) and because of that, I want to say thank you to everyone involved in the development of those other projects.
In the future I will automate the process with my own script but for now, take a look to the project, try it out and give some feedback.
C'ya!

Porting C/C++ Linux apps via python binding?

First of all let me start off by admitting that I am crazy and a noob programmer so maybe I don't understand the problem and am asking a rediculus question.
I was wondering if there was any way of converting C/C++ source into python that could be run on Android. Mostly command line stuff that would be done over adb or maybe even the terminal. I have got the python interpreter google provides running on the command line, I can access it from adb, terminal IDE, Terminal emulator, it seems everywhere, I moved the files into my /system directorys and add PYTHONHOME and ""PATH to my bashrc and mkshrc files located in the "/system/etc" section and now I can call them from those shells. For instance I can call "bash" and get bash, or/and I can call "python" to get python2.6 ( I have no idea how to implement the "Alternative" method of linking executables like in debian on android so it just has to be thought out, i tested with 2.6)
So with that all being said, if the C/C++ bindins for python ( I don't really even know how those work) were ported to android would we be able to use that to port C source?
And a second question. Does the python interpreter googlecode offers run on top of the Delvik VM?
Sounds pretty complicated and interesting, seen a lot of crazy things happen here over the years so I wouldn't say anything is impossible lol I recommend you ask this in the Q&A section though. Or maybe the Android Development and Hacking section, there's a lot of talented programmers over there as well.
Sent from my SPH-L710 using Tapatalk 4 Beta
To answer the question you asked: no, that's not a reasonable endeavor.
To answer the one you didn't: it's actually not hard to build most console programs from source to run on Android. You should be able to grab yourself a cross-compiler toolchain, and build the programs yourself. If you're running Linux on your computer, most distros have a tool to build such toolchains, or you can use e.g. MinGW and a Windows toolchain (Linaro might have one) to compile. In general './configure --host arm-linux-androideabi' should set everything up for you.
Obviously, there is a learning curve to building like this, but it's certainly not impossible to do.
Sent from my SPH-L710 using xda app-developers app
decimalman said:
To answer the question you asked: no, that's not a reasonable endeavor.
To answer the one you didn't: it's actually not hard to build most console programs from source to run on Android. You should be able to grab yourself a cross-compiler toolchain, and build the programs yourself. If you're running Linux on your computer, most distros have a tool to build such toolchains, or you can use e.g. MinGW and a Windows toolchain (Linaro might have one) to compile. In general './configure --host arm-linux-androideabi' should set everything up for you.
Obviously, there is a learning curve to building like this, but it's certainly not impossible to do.
Sent from my SPH-L710 using xda app-developers app
Click to expand...
Click to collapse
Right on, I just started reading the Linux From Scratch book and it has helped me understand the process behind it all a bit, I still need to finish reading the book and build my own Linux system for the my laptop first as that is what they are talking about.
I actually just got msfconsole or Metasploit running on Android, I ran started it up from ADB. I posted another thread about it with more detail.
I am just mounting the filesystems from the kali.img file that I made a few days ago, I basically just did a reverse chroot and brought those directories into Android's "/" directory and then exported the path variables that you normaly would but since I didn't change root and all the apropriate directories where in their proper place it ran.
My next step is to obtain a method for building the Kali Linux for arm system on a ROM, probably a blend of Cyanogenmod and Kali Linux core or rather just the command line programs. I am assuming that once the tools are available to the Android system folks could build gui's that call those programs and return their values and then bundle it in an apk for installation across devices running the modified ROM.
My end goal is basically a version of the Kali Linux distro that runs Android as its "desktop" instead of kde gnome pxe or some of the others. Then hopefully, maybe, if its deemed worthy, a specialized repository can be maintained for this version of the distro that wouldn't include any of the original gui programs for normal Linux Desktops, but only specialized apk's (instead of .deb or .rpm) that install gui's for android.
Thats what I would like to see, a Super Droid.
Please read forum rules before posting
Questions and Help issues go in Q&A and Help section
Thread moved'
Thanks
FNM

Categories

Resources