[GUIDE] Build Steel Droid from source (REWRITE) (WIP)

Discussion in 'Steel Droid' started by chevycam94, Jun 26, 2014.

  1. chevycam94
    Offline

    chevycam94 Steel Droid ROM Developer Developer

    Joined:
    May 12, 2010
    Messages:
    1,384
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    Central Ohio
    The previous guide was working up until a couple months ago. I am no longer able to get the build to work on ANY copy of Linux Mint (if its a new setup). Existing, and already updated copies of Mint 12 will still build, but NEW setups will not. The repositories for Linux Mint 12 (last known version that could build Gingerbread) are all broken.

    I would suggest you use Ubuntu 12.04 LTS, link
    HERE. This is currently the only setup I know of that it works on today, even with a new setup. Most of the commands in here are still correct. Some will be missing, some will no longer be needed. I will have to remake the whole guide, but that will take a long time, as I dont have a lot of free time right now. Please bare with me while I get this all straightened out!

    I will be rewriting the entire guide step by step. Feel free to let me know if you find issues or anything that needs corrected.



    I will get pictures up when I get the chance to take them!




    Installing Ubuntu 12.04 LTS

    After some issues recently with all copies of Linux Mint, I have been forced to go back to Ubuntu 12.04 to build Gingerbread. It IS possible to build Gingerbread with newer versions of Linux Mint, but your going to need a LOT of Aspirin if you want to take that route. To save you the headache, just stick with Ubuntu, it works, at least as of the time of this guide....

    You can obtain Ubuntu 12.04 here:
    Ubuntu 12.04 LTS

    Be sure to download the appropriate 32 or 64 bit version, depending on your computers capabilities. Make sure you download the DESKTOP version.

    RECOMMENDED
    Although its possible with Oracle VirtualBox, I would suggest you make a TRUE install to your system. Yes, I mean a true multi-boot setup. I will go over it a little here, as least how I set it up on my machine.

    Here is how I currently have my laptop set up:

    [​IMG]

    My laptop has 16GB of RAM, so I didn't bother to allocate anything for swap space, as it would have never been used. I would also suggest you set it up this way so that your source is on a separate partition from your system installs. That way, if something DOES go down, and your system crashes and you are forced to reinstall it, you will still have all your source in tact, and that could save you HOURS!

    The System partitions for both Linux Mint and Ubuntu are fairly small, as they only need to be enough to hold the system, its updates, and possible files you work with when your building/modding. If you want to put your files somewhere for safe storage or backup, that's what the STORAGE partition is for.

    For those of you who might have an Alienware laptop like me, or another device that currently has the hard drive partitioned as a GPT (only useful for those with a 2.2TB drive or larger), I would suggest your wipe the WHOLE drive from a live CD partition editor, and reformat it with an MBR (Master Boot Record) instead. Just saves some headache later on. You can always switch back later, through Windows Management Console.





    Installing the Android SDK


    Start by download the latest SDK for Linux from here:
    Android SDK | Android Developers
    and just save it to the default "Downloads" directory

    Current version: r23

    Once it's downloaded, open a new terminal and type:



    Code:
    [FONT=fixedsys][SIZE=3]cd ~
    mkdir android
    
    tar -zxvf ~/Downloads/android-sdk_r23-linux.tgz
    
    mv android-sdk-linux ~/android/sdk[/SIZE][/FONT]



    Next we need to include ~/android/sdk/tools and a couple other paths in our system path, so from the terminal type:


    Code:
    [FONT=fixedsys][SIZE=3]sudo gedit .bashrc[/SIZE][/FONT]


    and add the following to the bottom of the document that opens:







    and save and exit.

    We need to add a device rule to allow our computer and ADB to communicate with our phone.
    In the terminal type:

    Code:
    [FONT=fixedsys][SIZE=3]sudo gedit /etc/udev/rules.d/51-android.rules[/SIZE][/FONT]


    and then copy the following in to the file, save and exit.






    Now we need to install all the dependencies needed to do the builds.
    I added in PNGCrush, SchedTool, and OptiPNG and a few extras as the CM build environment needs them.
    Depending on which OS you have installed, chooose 32 or 64 bit.
    in the terminal:

    (for 32 bit)
    To be honest, Im not sure what the 32 bit version requires. I used 64 bit for everything as any modern computer supports a 64 bit system.

    (for 64 bit)
    Code:
    sudo apt-get install git git-core gperf build-essential pngcrush optipng schedtool ccache curl flex bison valgrind gcc-multilib g++-multilib ia32-libs libsdl1.2-dev libesd0-dev libncurses5-dev lib32readline-gplv2-dev lib32z1-dev libx11-dev libxml2-utils x11proto-core-dev zlib1g-dev


    If your following this guide, and your using Ubuntu, if you want the option to right click in a folder and have the option to open a terminal at that location, do this. Open the Software Sources app, and enable "Universe" if it isn't already. Then in terminal:

    Code:
    sudo apt-get install nautilus-open-terminal
    
    nautilus -q


    Nautilus will quit all open windows, and when you go back, the option to "Open Terminal Here" will be available.




    Getting the source


    Now we have to do the fun part, get git installed and download the source code!

    First open a new terminal window and type:

    Code:
    [FONT=fixedsys]cd ~
    
    mkdir bin
    
    [/FONT][FONT=fixedsys]curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    
    chmod a+x ~/bin/repo[/FONT]

    Next we need to initalize an empty folder for your source to be downloaded to. You dont have to have it on the same partition as your system or sdk. You can have it anywhere. Im just going to use an example here, so you get the idea of how to do the initalization.

    Close all terminal windows. Then navigate to the folder you want your source to be in, and right click, Open Terminal Here. Then type:

    Code:
    [FONT=fixedsys]repo init -u git://github.com/SteelDroid/platform_manifest.git -b gingerbread[/FONT]



    This will of course download the manifest for building Steel Droid. If you want to build something else, check with them and find out what their init command is, and use that instead. Remember, this guide is for building Gingerbread and prior, and in this case, CM7-based source.

    Once the source has finished downloading, we need to verify the GIT tags. If you want, in the same terminal window type:

    Code:
    gpg --import


    Nothing will appear to be happening, thats ok. Paste the following into the terminal window and then press CTRL+D (TWICE) to save. This will return you back to the terminal command prompt.
    Last edited: Jun 28, 2014
  2. chevycam94
    Offline

    chevycam94 Steel Droid ROM Developer Developer

    Joined:
    May 12, 2010
    Messages:
    1,384
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    Central Ohio
    Reserved
  3. chevycam94
    Offline

    chevycam94 Steel Droid ROM Developer Developer

    Joined:
    May 12, 2010
    Messages:
    1,384
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    Central Ohio
    Reserved 2
  4. chevycam94
    Offline

    chevycam94 Steel Droid ROM Developer Developer

    Joined:
    May 12, 2010
    Messages:
    1,384
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    Central Ohio
    Reserved 3
Search tags for this page

how to rewrite android

,

rewrite font android