[Galaxy Tab  Android Development] dizgustipated:
5/6 <DEV> [WIP] {ROM} 'AOSEP' Community Development "Build your own cm7/cm9/?"

AOSEP V2.5
​

Android Open Source Education Project

​

See post #191 for updated scripts

By following these instructions and/or using this set of files, you

proceed at your own risk. Under no circumstances would you hold

dizgustipated or anyone, except yourself, responsible for any negative consequences.[/COLOR][/I][/B]

################

***********************

################

I came across a "new" way of thinking over on a different thread, and have decided to adopt it.

I will still be developing and releasing roms,

but

Basically, I want to get

you

more involved in developing.

Allow you the chance to learn, contribute, and take pride in your accomplishments.

Possibly further the development of android, and see a whole new world open up to you.

That's why and how I got into developing. In was very curious, and unhappy with current rooms and update frequency. Or just with features available.

see post 2 for more info on the philosophy

I'd like to share a little script I found, and modified (

with permission, and is still a work in progress

) to automate the sync/build/package cycle, and to push the XDA community to get involved on a deeper level.

This whole process is designed for the latest stable Ubuntu (10.04/11.10), though it might work with Debian as well (or even other distros, if you have all the prerequisites already installed).

Alternatively, on tbe last post, you will find a handy script that gives a good shot at automating the whole prerequisites ordeal.

Place it in your root directory, navigate to it in terminal and type

Code:

sudo ~/installer.sh

Any brave souls willing to try?

I know you're impatient to get started, this script also contains a little guide, so check it out. I haven't had much opportunity to test this script because it takes so much time to start from scratch, so please help me out!

As of now, I have made many full builds this way, as well as a few incremental updates. Feel free to modify the MIT-licensed script. There are two time-consuming steps (4 and 6), so I'd recommend planning accordingly. Also make sure you have plenty of space on your disk; my working directory currently contains about 23GB.

0. I prefer you to start from scratch, (we want a clean start) as follows:

1. Make a folder for all your Android-building needs.

In your home directory, make a folder called "android"

Code:

mkdir android

and drop the text file in there, (in the new "android" directory, named Makefile (with no extension).

(Alternatively, you can open the make file, and edit the repo init to your preferred sgt7 repo sourcecode. Also, if you change repo address, you will need to make Bacon, instead of make package.)

Then open your favorite terminal app and navigate to that folder.

Code:

cd android

2. If you don't have any of the tools installed yet, and you're on Ubuntu, do this:

Code:

sudo apt-get install build-essential
sudo make apt

3. Initialize your working directory:

Code:

make init

4. Fetch the source code:

Code:

make sync

nb: It might take a while to fetch ~5.7GB of code off the Internet, depending on your connection. It might also hang, in which case you gotta stop the process, and retry (make sync) until you have everything. When you retry, you might want to do `make sync J=4` to reduce the concurrency. If it then complains about corrupt

repositories

("not a repository"), you must delete the corrupt repositories and retry. You'd know it's frozen if "Fetching projects" does not progress for a minute or so.

(after a sync, seeing:

if ! grep -q "<stddef.h>" /home/diz/android/system/external/mesa3d/src/glsl/linker.cpp; then \

sed -i '1i #include <stddef.h>' /home/diz/android/system/external/mesa3d/src/glsl/linker.cpp; \

fi

is normal, it is patching so you can build)

5. (This step is done for you in the sync)

Alternatively, if you are looking to get deeper into dev-ing, you can back up the files, boot into CM7 and do the following to start making your own device files.

Plug in your SGT7 via USB, boot into CM7/BOCA RC1, and make sure debugging is enabled... to get some vendor-specific files (proprietary bits from Samsung and prebuilt bits from CyanogenMod):

Code:*

make vendor

*This will overwrite my device files, if you do not wish to do so, move on to the next step.

6

Build that stuff:

Code:

make build

This takes a while, depending on your hardware... perhaps a few hours. It's best to do this step overnight.

*if you error out in the build on: android_reboot.c, download THIS and replace the file already in android/system/system/core/licutils(android_reboot.c)

7. Save a snapshot for later:

Code:

make snapshot

This is actually required for the next step. But don't worry: snapshots are incremental, so they don't use too much space; and it's safe to remove any snapshot except "current".

8a. Package it up:

Code:

make package CLEAN=1

Check the snapshots directory for your shiny new update.zip

8b.Or simply make Bacon.

make bacon

9. It's even easier to keep your source up-to-date:

Code:

make sync
make build
make snapshot
make package CLEAN=1

(unsigned)

or

make package CLEAN=1 SIGN=1

(signed)

Or

make bacon

This makes a GSM P-1000 flashable zip, you can easily exchange the zImage for a L or N kernel, in the zip, & then flash in recovery after clearing user data, dalvic cache and cache then flash ICS gapps

10.

Be joy full and post a screen shot or a build.

11.

Continue developing/contributing to the android community

... and don't forget to thank FatTire and inportb for allowing me to alter and post this script, which made this possible