• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Developing for our phone.

ZeroGeined

Well-Known Member
Ok, as some of you know (via pm's) I'm dipping my toes into the android ROM development pool (attempting to anyways). The problem is I'm having trouble setting all this up for jumping in. I'm not too versed in Ubuntu and I've probably got a total of a month for experience with this operating system. I'm having a lot of trouble getting this set up for development. I've downloaded and (as far as I can tell) installed the android sdk but I cant even get into the sdk manager for this. Can anybody give me a clear concise guide for setting this up? I've tried the xda-development forums guide for setting this up (thread t=1762641) but I
 
Ok, as some of you know (via pm's) I'm dipping my toes into the android ROM development pool (attempting to anyways). The problem is I'm having trouble setting all this up for jumping in. I'm not too versed in Ubuntu and I've probably got a total of a month for experience with this operating system. I'm having a lot of trouble getting this set up for development. I've downloaded and (as far as I can tell) installed the android sdk but I cant even get into the sdk manager for this. Can anybody give me a clear concise guide for setting this up? I've tried the xda-development forums guide for setting this up (thread t=1762641) but I
 
I'll give it a shot in the morning. This thing is a headache at the moment. Lol.

Its all a part of learning something new. I'm seeing the similarities now though so maybe this will help the learning process.
 
yeah. they had a typo. its ./android
then from there install updates. that link above is what I used from the beginning. we are here to help out anyway we can. just drop us a line. we got ya back homie
 
Holy [xxxx]! I just got adb working!

sudo apt-get install ia32-libs

which with Ubuntu 13.04 x64 returned with

Package dependencies cannot be resolved This error could be caused by required additional software packages which are missing or not installable. The following packages have unmet dependencies: ia32-libs-multiarch

This can be resolved with

sudo dpkg --add-architecture i386
sudo apt-get update

After that I tried to run adb when Ubuntu actually gave me the sudo install to get it

sudo apt-get install android-tools-adb

And now I actually have the adb running! Holy [xxxxxxx] [xxxx]!

Thank you totlth and rapture81g! You guys are [xxxxxxx] awesome!
 
And I'm the Guinea pig to explain to the n00bs how to get it set up right.

ROM development is something that can end up being extremely easy, or incredibly complicated depending on your phone's hardware. I believe the Avid has a MSM8960 SoC, so that benefits you in the long run (it's a common arch found on a lot of phones). Popular 3rd-party projects, my favorite being CyanogenMod, can make getting started in ROM dev'ing very easy. Pulling straight AOSP and building for a device is quite difficult. CM, and similar projects, collect all the necessary pieces and allow developers to "simply" drop in their device tree and start building for their device.

You'll need to be familiar with C, C++, and Java. Also, you'll need to be familiar with makefiles. Once again, this may not be a factor though; it really depends on how difficult your hardware is to port a ROM onto. For example, when putting CM7/MIUI on the Motorola Triumph, the LED notification didn't work properly. I was forced to write a new liblights in order to get it to work. However, similar devices didn't have that issue.

This is how I usually get started with ROM development:

1) I pull a copy of the system and boot images. I usually accomplish this by making a backup in CWM. "Back in the day", I used to use fastboot to pull the directly off.

2) I use the popular Android Kitchen to dissect the stock ROM and boot images. I start looking for things specific to my device (WIFI, bluetooth, GPS, media codecs, etc).

3) I start looking at the RIL libs and binaries. If it's a Qualcomm device, they're pretty obvious.

4) I get the Android source (usually from the CyanogenMod manifest), and get started on a device tree. Pulling the CM source is better because they've made it easy to start a device tree and drop it directly in their source to build. Straight Android (AOSP) will not be as simple. You'll have to make changes to numerous parts of the AOSP source. You can check out my device trees as an example on my Github: https://github.com/ikarosdev

I like to identify my device trees as android_device_devicemanufacturer_model. So, for example, if I'm working on a Motorola Triumph, I would use android_device_motorola_triumph.

5) The device tree contains all the parts that my particular device needs in order to build a working ROM. This includes the customized makefiles needed to build the ROM correctly for my device, and all the necessary files (i.e. prebuilt stuff taken from the stock ROM) need to get all my hardware working in the new ROM. This is the most time consuming part of the whole ordeal. For example, the RIL (cell radio) will require you to re-use all the prebuilt stuff from the stock ROM.

6) Once I've reached a point where I feel I have enough to get a semi-booting ROM, I'll build. If the build finishes, I take the ROM, flash it on my phone, and see how far I get. If it boots, I start seeing what hardware stuff doesn't work (e.g. camera, sensors, audio, etc), and then I start debugging those pieces to figure out why they don't work. Then I make the adjustments in my device tree and build again.

I know my "explanation" is long, but it really only scratches the surface of ROM development. If you feel discouraged - don't, I was (and still am) only a half-assed programmer. When I started, I had no knowledge of building Android. Once you get the feel for it, it really becomes easier.

I recommend Google'ing "building Android from source". This will give you a great starting point.

TL;DR version: ROM development hard and time-consuming, don't give up, look up how to build Android from source on Google. :D

BTW, I can help with more specific stuff. Feel free to ask any questions, I'll try my best to answer them. I'm also a long-time Linux user (I don't have any Windows comps actually), so I can help with set-up too!
 
Damn dude. Thanks for being thorough with that. I've been meaning to head out to my library to get some books (I'm a big time reader) but thanks for pointing me towards some programming languages. I'm a long time windows user and know enough about it that if you wanted your (windows based) computer to sing, I could have it singing but this diving into Linux had been a challenge to me so far. I have many thanks to totlth and Raptured as they have been very helpful and patient with me this far. They've kept my ass from drowning seeing as I decided to dive into the deep end of this without checking the waters first. Lol.

Thank you very much for the tips on this.
 
Back
Top Bottom