DroidForums.net is the original Verizon Android Forum! Registered Users do not see these ads. Please Register - It's Free!
Page 1 of 8 1 2 3 ... LastLast
Results 1 to 10 of 79

Thread: how to build a rom V2.1

  1. Beta Team
    sniffle's Avatar
    Member #
    55726
    Join Date
    Apr 2010
    Location
    Birmingham AL
    Posts
    291
    Phone
    Motorola Droid, HTC Incredible
    DroidForums.net Developer
    Premium Member
    #1

    [guide]how to build a rom rev. 2.1

    PHP Code:
    this guide is now out of date with the relerase of the froyo source
     please go to http
    ://android.cvpcs.org for the latest update to this guide
     
    and all future updates as well(hooray for a wiki!) 
    http://android.cvpcs.org/start

    ***PLEASE READ***
    this is a guide witten by me, Sniffle, tourach23@gmail.com. It is free to be used by anyone, if you have any corrections, please make the correction to the specified section and email that SPECIFIC section to me, i will test the revision and add it to the guide as i see fir. i reserve the right not to add a submission to the guide based on it's relavence, as well as to minimize possible creation of more confusion.
    ***NOTICE***
    this guide will no longer use any part of cyanogenmod's build setup. it will only use the motorola/sholes-open vendor setup created by koush, as it is necessary for the successful building of a rom for the Motorola Droid. at a later date(or of someone else writes them *hint hint community effort*) guides will be written to make your own personal vendor setup, as well as modify the build setup to prevent the flashing of a recovery on boot, add the superuser.apk, root, and busybox to the rom on compile. and any other goodies people want to help contribute.
    ***disclaimer***
    i am not responsible for any damages caused(to either computer or phone) or bricked phones that may occur with the use of this guide.

    downloading the source(modified by me): http://source.android.com/download
    HowTo: Set up For Development in Ubuntu 9.1 (thanks denkai) - ModMyMoto - Software Modding Forums and Updates for Motorola Phones
    setting up ADB and getting the system to recognize and communicate with your device(written by me):
    Android SDK | Android Developers
    Installing the SDK | Android Developers
    MOTODEV > Log In
    downloading and setting up the cyanogen vendor setup(written by me):
    koush's Profile - GitHub
    http://source.android.com/documentat...ding-for-dream
    cyanogen's Profile - GitHub
    android.git.kernel.org Git
    Martin Brabham AOSP/CyanogenMod5 and the Droid
    personal trial and error knowledge and PM's with koush
    setting up eclipse(written by me):
    http://source.android.com/using-eclipse
    ADT Plugin for Eclipse | Android Developers
    http://developer.android.com/resourc...ipsecomponents
    running vendor setup and compiling source for droid specifically(written by me)
    http://source.android.com/documentat...ding-for-dream
    Martin Brabham AOSP/CyanogenMod5 and the Droid
    personal trial and error knowledge and PM's with koush
    i would like to say that the final breakthrough in the vendor setup was due to the inspiration of this site and it deserves a special place or its own.
    Martin Brabham AOSP/CyanogenMod5 and the Droid
    ***************/start for ubuntu versions 9.1 and later*****************
    Type
    Code:
    sudo gedit /etc/apt/sources.list
    add to the file
    Code:
    deb Index of /ubuntu hardy multiverse
    deb Index of /ubuntu hardy-updates multivers
    Save the file and in terminal type
    Code:
    sudo apt-get update
    sudo apt-get install sun-java5-jdk
    sudo update-alternatives --config java
    You may or may not need to select java5 if you already have 6 installed on that last prompt. Once that is completed remove the lines we added.
    Code:
    sudo gedit /etc/apt/sources.list
    When the file opens delete the below lines and save.
    Code:
    deb Index of /ubuntu hardy multiverse
    deb Index of /ubuntu hardy-updates multivers
    ***************/stop for ubuntu versions newer than 8.0.4*******************
    ********************/start downloading aosp source***************************
    In terminal type
    Code:
    sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
    Install REPO and GIT. In terminal type
    Code:
    $ cd ~
    $ mkdir bin
    $ sudo gedit .profile
    A text editor will pop up. put this at the bottom and save
    Code:
    if [ -d ~/bin ] ; then
    PATH=~/bin:"${PATH**"
    fi
    export
    In terminal type
    Code:
    curl http://android.git.kernel.org/repo >~/bin/repo
    chmod a+x ~/bin/repo
    reboot your computer
    Next type
    Code:
    cd ~
    mkdir android
    cd android
    mkdir system
    cd system
    Setup your REPO to download the source files
    Code:
    repo init -u git://android.git.kernel.org/platform/manifest.git
    to download specific branches of code ie: eclair or erd79(android-2.1_r1) you need to add "-b eclair" to the end of the repo init
    as an example for eclair branch you would type
    Code:
    repo init -u git://android.git.kernel.org/platform/manifest.git -b eclair
    You'll get "repo initialized in /"system"" if succesful. Now you need to download the source files
    latest branches include:
    android-2.1_r2.1s (sholes ese81)
    eclair (latest eclair source available latest bleedign edge till froyo is release)
    Code:
    repo sync
    That will take awhile. Next, verify GIT tags
    Code:
    gpg --import
    nothing will seem to happen, that's fine. paste this below
    Code:
    key 9AB10E78: "The Android Open Source Project <initial-contribution@android.com>"
    -----BEGIN PGP PUBLIC KEY BLOCK-----
    Version: GnuPG v1.4.2.2 (GNU/Linux)
    mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
    lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
    8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu 5hOF9KXwCgkxMD
    u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEa UA6U90sEoVks0Z
    wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDya TrkANjdYY7p2cq
    /HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJn uyvoizl9/I1S5
    jU5SA/9WwIps4SC84ielIXiGWEqq6i6/sk4I9q1YemZF2XVVKnmI1F4iCMtNKsR4
    MGSa1gA8s4iQbsKNWPgp7M3a51JCVCu6l/8zTpA+uUGapw4tWCp4o0dpIvDPBEa9
    b/aF/ygcR8mh5hgUfpF9IpXdknOsbKCvM9lSSfRciETykZc4wrRCVGh lIEFuZHJv
    aWQgT3BlbiBTb3VyY2UgUHJvamVjdCA8aW5pdGlhbC1jb250cm lidXRpb25AYW5k
    cm9pZC5jb20+iGAEExECACAFAknnWD4CGwMGCwkIBwMCBBUCCA MEFgIDAQIeAQIX
    gAAKCRDorT+BmrEOeNr+AJ42Xy6tEW7r3KzrJxnRX8mij9z8tg CdFfQYiHpYngkI
    2t09Ed+9Bm4gmEO5Ag0ESedYRBAIAKVW1JcMBWvV/0Bo9WiByJ9WJ5swMN36/vAl
    QN4mWRhfzDOk/Rosdb0csAO/l8Kz0gKQPOfObtyYjvI8JMC3rmi+LIvSUT9806Up
    hisyEmmHv6U8gUb/xHLIanXGxwhYzjgeuAXVCsv+EvoPIHbY4L/KvP5x+oCJIDbk
    C2b1TvVk9PryzmE4BPIQL/NtgR1oLWm/uWR9zRUFtBnE411aMAN3qnAHBBMZzKMX
    LWBGWE0znfRrnczI5p49i2YZJAjyX1P2WzmScK49CV82dzLo71 MnrF6fj+Udtb5+
    OgTg7Cow+8PRaTkJEW5Y2JIZpnRUq0CYxAmHYX79EMKHDSThf/8AAwUIAJPWsB/M
    pK+KMs/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfNUKiQZ6esoAWtDg pqt7Y7s
    KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb
    N8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior 6b8LrZrAhkqDjA
    vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmU tkBszwo
    G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ
    hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+Bmr EOeCUOAJ9qmR0l
    EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KL M=
    =Wi5D
    -----END PGP PUBLIC KEY BLOCK-----
    Hit CTRL+D to close and save, this will bring you back to he command prompt
    now to run a generic make to make eclipse happy once we have it all set up
    Code:
    cd android/system
    make
    *************************/stop downloading the aosp source*******************
    ***************/start settign up SDK to run on ubuntu***********************
    android SDK has ADB in it which allows you to run commands on your phone from your PC as well as many other tools.
    download SDK for linux from here: http://developer.android.com/sdk/dow...5-linux_86.tgz
    for the purpose of this installation we are going to install the SDK to ~/android-sdk
    now back to the terminal
    Code:
    tar -zxvf ~/Downloads/android-sdk_r05-linux_86.tgz
    mv android-sdk-linux_86 ~/android/sdk
    now that everything is unzipped time to set our path to include ~/android/sdk/tools
    in terminal
    Code:
    cd ~
    sudo gedit .bashrc
    in the text editor that opens paste in the following line at the bottom
    Code:
    export PATH=${PATH}:~/android-sdk/tools
    alias sudo='sudo env PATH=$PATH'
    save the file and exit
    ADB is setup now to setup the computer to recognize the device
    in terminal
    Code:
    sudo gedit /etc/udev/rules.d/51-android.rules
    in the text box that opens past int he following line
    Code:
    SUBSYSTEM=="usb", SYSFS{idVendor}=="22b8",SYSFS[idProduct}=="41db", MODE="0666",SYMLINK+="Motorola PCS"
    *this sets up the motorola droid only*
    save the file and exit
    initialize ADB (this will have to be done after every reboot, updated method to be entered at a later date will remove the need for this)
    Code:
    sudo adb start-server
    ***************/stop settign up SDK to run on ubuntu***********************

    *******/start generic vendor setup********
    motorola directory
    Code:
    cd ~/android/system/vendor
    mkdir motorola
    cd motorola
    git clone git://github.com/koush/android_vendor_motorola_sholes-open.git sholes-open
    Connect your phone to your computer
    in terminal
    Code:
    cd ~/android/system/vendor/motorola/sholes-open
    . extract-files.sh
    ***i would suggest running the extract script once on a 2.1 rooted phone or a phone running cyanognen mod to get the latest moto proprietary files***
    ***depending on how many processor cores you have you can speed up the make process by appending -j(double the number of available processor cores) ie: make -j4, for a dual core processor***
    *********/stop generic vendor setup***********

    *************************/start settign up eclipse**************************
    go to Eclipse Downloads
    or click here http://www.eclipse.org/downloads/dow...nux-gtk.tar.gz
    download the latest eclipse classic version(i am using 3.5.2 in this example)
    once downloaded in a new terminal
    Code:
    cd ~
    tar -zxvf ~/Downloads/eclipse-SDK-3.5.2-linux-gtk.tar.gz
    mv eclipse-SDK-3.5.2-linux-gtk.tar.gz
    once extracted close the terminal
    right click on your desktop in an open area
    click create launcher
    name it whatever you want in the name area
    in command click the browse button go to your eclipse directory choose the eclipse file and click open.
    then click ok
    you now have a desktop icon to click on
    now start up eclipse
    click ok for default workspace
    once eclipse has started click help>install new software
    click add in the top right corner
    for name: galileo
    location: Galileo Software Repository
    click ok
    click add again
    name: android-sdk
    location: https://dl-ssl.google.com/android/eclipse/
    click ok
    click the drop down box next to add. choose android-sdk.
    click the box next to developer tools. then click next
    ***be sure that if an option to install missing components that it is checked***
    sometimes other files that are needed are not available on the initial install. the galileao link should have the needed files to install SDK without problem.
    eclipse after installing the SDK will restart. it will prompt you for settign up the path to your SDK and ask you if you want to provide goodle with information.
    to set your android path click: window>preferences>android
    browse for your SDK directory
    click window>android sdk avd manager>available packages
    select them all
    click install selected
    click bullet accept all then click install
    once that's complete make should be nearing completion hopefully if not sit back and wait on make to finish. we're almost done.
    once make is finished we're on the home stretch.
    back in the terminal
    Code:
    cd ~/android/system
    cp development/ide/eclipse/.classpath .
    chmod u+w .classpath
    modify elcipse settings to run better with android
    Code:
    cd ~/eclipse
    gedit eclipse.ini
    we're changing the memory values used by eclipse so it will function better.
    in the text editor that opens
    find theses values
    Code:
    -Xms40m
    -Xmx256m
    -XX:MaxPermSize=256m
    and change them to
    Code:
    -Xms128m
    -Xmx512m
    -XX:MaxPermSize=256m
    once done save and close the file
    open eclipse
    click file>new>project
    click java project
    click create project from existing source
    choose the mydroid folder
    click finish
    congratulations you just imported the entire android source into eclipse. next up is compiling the source itself. almost there!
    *************************/stop settign up eclipse***************************
    **/start running vendor setup and compiling source for droid specifically***
    in terminal
    Code:
    cd ~
    cd android/system
    source build/envsetup.sh
    lunch sholes-eng
    make
    ***to make an OTA-update.zip use "make -j(?) otapackage"
    (?) - remember this number is double the number of cores available on your processor
    once everything is all setup it is that easy to compile for the droid.
    congrats and enjoy!
    ***/stop running vendor setup and compiling source for droid specifically***
    ***************/start notes of interest and troubleshooting info ***************
    ***for adb to work it must be ran as root so from now on before starting work on android projects do the following***
    Code:
    sudo adb kill-server
    sudo adb start-server
    ***if repo will not initialize in the correct directory this should fix it***
    Code:
    cd (directory of source)
    rm -rf ~/.repo
    repo init -u git://android.git.kernel.org/platform/manifest.git
    ***************/stop notes of interest and troubleshooting info ***************
    **************recent sites of interest not yet used as a reference to material posted*************
    Android Platform Developer's Guide | Android Open Source Android Platform Developers Guide
    Last edited by sniffle; 07-01-2010 at 07:25 AM.
  2. Sponsor
    DF Advertising
    Join Date
    Nov 2008
    Location
    DroidForums.net
     
     
     
     
  3. Beta Team
    sniffle's Avatar
    Member #
    55726
    Join Date
    Apr 2010
    Location
    Birmingham AL
    Posts
    291
    Phone
    Motorola Droid, HTC Incredible
    DroidForums.net Developer
    Premium Member
    #2
    ***ANNOUNCEMENT***

    i mentioned making an announcement about my guides. In the near future myself and a few others that work on these guides and do our best to breakdown and understand not only the android build system but also android itself, will be opening a wiki where the master copy of these guides will reside.

    there will be open areas for submissions to contribute and help expand the knowledge base of android as a whole. the master guides will be broken down on the wiki page to break the information down into more manageable bites.

    the mass guide like the one above will be distributed, posted, and updated to all of the major android websites, including xda(they need somethign for the people starting out), here, alldroid, mydroidworld, and any other android websites that either ask for the guides to be posted or i come accross and decide to post there.

    the main reason this is occuring is that the main guides have been lost twice now, so this time it will be everywhere and be available to everyone to contribute.
    Last edited by sniffle; 05-23-2010 at 10:39 AM.
  4. Junior Droid
    jkman's Avatar
    Member #
    70393
    Join Date
    May 2010
    Posts
    10
    Phone
    Motorola Droid
    #3
    I got it to compile. I had to fix some code in android_surface_output_omap34xx.cpp. It was trying to access variable names out of the PVMFYuvFormatSpecificInfo0 class that where defined slightly different in the class definition in another file (don't remember the file that class was defined in). After I fixed those 4 lines it compiled.

    so i'm left wondering...now what. Do I take

    out/target/product/sholes-open/sholes-ota-eng.USERNAME.zip

    rename it to update.zip and use nandroid to load it onto my phone?
  5. Beta Team
    sniffle's Avatar
    Member #
    55726
    Join Date
    Apr 2010
    Location
    Birmingham AL
    Posts
    291
    Phone
    Motorola Droid, HTC Incredible
    DroidForums.net Developer
    Premium Member
    #4
    You can but as it is in this for you would have no root/busybox/superuser.apk/google apps... I think that's about it :P

    Edit: forgot it will also flash the stock recovery as well.

    We have figured out everything except busybox, without using cyanogen's source. Ill try to get a guide up soon. Depends on how much time I have at work to actually work on it.
    Last edited by sniffle; 05-21-2010 at 08:30 PM.
  6. Senior Droid
    borgey401's Avatar
    Member #
    60398
    Join Date
    Apr 2010
    Posts
    112
    Phone
    Motorola Droid
    #5
    Quote Originally Posted by sniffle View Post
    You can but as it is in this for you would have no root/busybox/superuser.apk/google apps... I think that's about it :P

    Edit: forgot it will also flash the stock recovery as well.

    We have figured out everything except busybox, without using cyanogen's source. Ill try to get a guide up soon. Depends on how much time I have at work to actually work on it.
    sniffle, the source link is broken. please fix and by the way thanks so much for your time and getting this guide to us. i really really appreciate it and i can't wait to start getting into all this
  7. Beta Team
    sniffle's Avatar
    Member #
    55726
    Join Date
    Apr 2010
    Location
    Birmingham AL
    Posts
    291
    Phone
    Motorola Droid, HTC Incredible
    DroidForums.net Developer
    Premium Member
    #6
    what specifically are you refering to?

    please as a note to everyone not just borgey i don't mind answering questions and helping people out, but there is a LOT of information in the original post. please copy/paste the line in question and be as specific as possible, if there is a problem with the guide and put actual quotation marks around the line as quoting the original post would jsut be messy.

    bah i suck at grammar please excuse the above statement though i still mean it :-P
  8. Beta Team
    sniffle's Avatar
    Member #
    55726
    Join Date
    Apr 2010
    Location
    Birmingham AL
    Posts
    291
    Phone
    Motorola Droid, HTC Incredible
    DroidForums.net Developer
    Premium Member
    #7
    updated the udev rules to the more correct version.

    many thanks to rfw2003 for sending it to me, i haven't had the cahnce to reference it again myself.

    also for anyone getting error 127

    google search for "alldroid how to build a rom 2.0" click get cached and the solution should be at the bottom of the page. it is a git cherrypick command.
  9. Senior Droid
    nagmier's Avatar
    Member #
    56968
    Join Date
    Apr 2010
    Posts
    177
    Phone
    Droid Incredible
    #8
    tyvm sniffle!!! I was looking for something a little more concise and put together and you have done it /thumbup!
  10. Beta Team
    sniffle's Avatar
    Member #
    55726
    Join Date
    Apr 2010
    Location
    Birmingham AL
    Posts
    291
    Phone
    Motorola Droid, HTC Incredible
    DroidForums.net Developer
    Premium Member
    #9
    No problem at all I enjoy making the guides and sharing information.

    Ill be making an announcement in the coming days regarding my guides and there distribution as well.
  11. Developer
    jrummy16's Avatar
    Member #
    31454
    Join Date
    Jan 2010
    Location
    Orange County, CA
    Posts
    1,213
    Liked
    13 times
    Phone
    Moto Droid
    DroidForums.net Developer
    DroidForums.net Theme Developer
    Premium Member
    #10
    Quote Originally Posted by sniffle View Post
    updated the udev rules to the more correct version.

    many thanks to rfw2003 for sending it to me, i haven't had the cahnce to reference it again myself.

    also for anyone getting error 127

    google search for "alldroid how to build a rom 2.0" click get cached and the solution should be at the bottom of the page. it is a git cherrypick command.
    here is the fix for Error 127:

    cd android/system/external/webkit
    git cherry-pick 18342a41ab72e2c21931afaaab6f1b9bdbedb9fa


    Sniffle, you should re-add your links for 64-bit users.
Page 1 of 8 1 2 3 ... LastLast

Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. build.prop
    By ohioDroid in forum Droid Hacks
    Replies: 1
    Last Post: 04-26-2010, 11:57 PM
  2. Could Some One Build Me A Custom Rom?
    By GraphicDemon in forum Android Roms
    Replies: 17
    Last Post: 02-25-2010, 11:04 PM
  3. ro.build.version.sdk=??
    By Benny in forum Hacking Help
    Replies: 5
    Last Post: 02-22-2010, 01:48 PM
  4. How to build a Rom
    By MrCapcom in forum Droid Hacks
    Replies: 9
    Last Post: 01-06-2010, 12:42 PM
  5. The Perfect Rom Build
    By samdevor in forum Droid Hacks
    Replies: 0
    Last Post: 01-01-2010, 01:33 AM

Search tags for this page

android rom build guide
,

framework intermediates-classes-full-debug.jar

,

how to build a rom

,
how to make rom android
,
make: *** [out/target/common/obj/apps/ctsverifier intermedia
,
make: *** [out/target/common/obj/apps/frameworkstelephonytes
,

make: *** [out/target/common/obj/apps/musicplayer intermedia

,

make: *** [out/target/common/obj/java libraries/framework in

,
musicplayer intermediates/classes-full-debug.jar] error 41
,
no rule to make target `external/busybox/archival/bbunzip.c'
,
no rule to make target `out/target/common/obj/java libraries
,
no rule to make target `out/target/product/sholes/obj/static
,
no rule to make target otapackage
,

out/target/common/obj/java libraries/framework intermediates

,

target recovery ui lib

Click on a term to search our site for related topics.
Find us on Google+