1. Download our Official Android App: Forums for Android!

Root [TUT] Building CyanogenMod 7 for the Prevail from source

Discussion in 'Android Devices' started by hroark13, Jan 11, 2012.

  1. hroark13

    hroark13 Android Expert
    Recognized Developer Thread Starter
    Rank:
     #49
    Points:
    483
    Posts:
    3,288
    Joined:
    Jul 15, 2011

    Jul 15, 2011
    3,288
    4,136
    483
    Squadzone has made an excellent tutorial and script for setting up and making CyanogenMod
    I am using most of it and making some tiny changes and additions for use with the Prevail

    Requirements :
    1.OS linux Ubuntu 11.04 64bits ( recommended ) or above
    2.2Gb RAM with 3Gb swap or above
    3.Processor Centrino Duo or above
    4.120Gb Harddisk or above
    5.Fast internet connection

    First download this file to you Downloads folder
    installerBuildRomGalmin.sh
    Password : squadzone

    Open Terminal

    $ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"

    Enter your password

    $ sudo add-apt-repository ppa:ferramroberto/java
    $ sudo apt-get update
    $ sudo apt-get install sun-java6-jdk sun-java6-plugin

    if you get an error

    $ sudo apt-get -f install

    $ chmod 7777 ./Downloads/installerBuildRomGalmin.sh
    $ sudo ./Downloads/installerBuildRomGalmin.sh

    say yes or OK to any prompts and Install the recommended packages

    follow all instructions that appear,
    after Finish, now we goto download repository

    still on Terminal
    type


    $ mkdir -p ~/cm7/system
    $ sudo su
    $ sudo curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > /bin/repo
    $ sudo chmod a+x /bin/repo
    $ exit
    $ cd cm7/system
    $ repo init -u https://github.com/CyanogenMod/android.git -b gingerbread

    Enter you name and email when asked and say yes to color display

    $ repo sync -j32

    THIS WILL TAKE A WHILE TO FINISH

    download this zip file, unzip, and copy contents into /cm7/system
    prevail_cm7_config.zip
    merge all folders and overwrite any files

    still on Terminal
    type


    $ ./vendor/cyanogen/get-rommanager

    (ROM manager does not support our phone, but we need this file for the build to work)



    $ source ./build/envsetup.sh
    $ lunch full_prevail-eng
    $ mka -j4 bacon

    THIS WILL TAKE A WHILE TO FINISH

    WHEN FINISHED YOU WILL HAVE A FOLDER
    cm7/system/out/target/product/prevail
    WITH A BUNCH OF GOODIES IN IT, LIKE YOUR ROM AND CWM(YES THIS MAKES CWM FOR YOU)
    THE ZIP FILE update-cm-nightly-signed.zip IS THE ROM
    THIS IS FLASHABLE IN CWM
    I USUALLY TAKE THAT ZIP UNZIP IT AND PUT A MODDED INSTALLER SCRIPT IN IT, REMOVE ROM MANAGER, AND ADD SOME LAST MINUTE FILES AND GAPPS FILES AND SUCH


    I BUILD THE ROM ODEXED BECAUSE WHEN I AM DEBUGGING THE ROM AN ODEXED ROM BOOTS SO MUCH FASTER THE FIRST TIME AND I AM CONSTANTLY REFLASHING AND WIPING TO TEST NEW
    SETTINGS

    IF YOU WANT CM7 TO BUILD THE ROM DE-ODEXED FOR YOU

    EDIT THIS FILE IN TEXT EDITOR

    cm7/system/device/samsung/prevail/BoardConfig.mk


    ON THE BOTTOM OF THE FILE LOOK FOR THIS SECTION

    #JIT / Optimizations
    WITH_DEXPREOPT := true
    JS_ENGINE := v8


    Add # so it looks like this and save the file

    #JIT / Optimizations
    #WITH_DEXPREOPT := true
    JS_ENGINE := v8

    IF YOU HAVE ALREADY COMPILED THE SOURCE AND YOU MAKE CHANGES TO THE BoardConfig.mk YOU WILL HAVE TO DO THIS FOR YOUR NEXT BUILD



    $ make clobber clean
    $ source ./build/envsetup.sh
    $ lunch full_prevail-eng
    $ mka -j4 bacon

    I WILL BE MAKING CHANGES TO THE CODE FROM TIME TO TIME SO YOU WILL NEED TO DOWNLOAD THE NEW SOURCE FROM




    https://github.com/hroark13/prevail_cm7_config


    If I have helped you, and you like my work, please click on the Thanks Button and give my thread a rating by clicking on the stars above.

    If you would like to buy me a beer cofee, you can click on the PayPal button

    [​IMG]
     

    Advertisement

  2. ron580

    ron580 Well-Known Member
    Rank:
    None
    Points:
    53
    Posts:
    159
    Joined:
    Nov 26, 2011

    Nov 26, 2011
    159
    64
    53
    college student
    nice thanks, did you ever manage to get to build cm9 from source?
     
  3. hroark13

    hroark13 Android Expert
    Recognized Developer Thread Starter
    Rank:
     #49
    Points:
    483
    Posts:
    3,288
    Joined:
    Jul 15, 2011

    Jul 15, 2011
    3,288
    4,136
    483

    I can build CM9 it just does not work

    I need to try to make a new kernel zImage
     
  4. ron580

    ron580 Well-Known Member
    Rank:
    None
    Points:
    53
    Posts:
    159
    Joined:
    Nov 26, 2011

    Nov 26, 2011
    159
    64
    53
    college student
    oh ok i tried a while back to compile the kernel from the ee14 source i think , but i got a bucket load of errors and plus i upgraded to ubuntu 11.04 from 10.04 and ive been getting a bunch of issues on my system.
     
  5. new optimus

    new optimus Android Expert
    Rank:
    None
    Points:
    413
    Posts:
    4,205
    Joined:
    Mar 10, 2011

    Mar 10, 2011
    4,205
    1,457
    413
    Jax Fl
    not to get too far off topic but I gave up on ubuntu after they went to unity. :mad:
    I however found one that works better and it seems they feel the same about unity.

    Linux Mint.
    They have ubuntu based and debian based I like the debian based but I also like the rolling upgrade, I dont need to upgrade my system its always updated.
     
  6. The~Skater~187

    The~Skater~187 Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    1,395
    Joined:
    Oct 20, 2011

    Oct 20, 2011
    1,395
    460
    163
    Male
    Connecticut
    I followed all the steps here, got something pretty solid so far. But my question is I'm trying to set up a chroot enviroment with my Rom, and I keep getting this error: chroot cannot execute bin/bash. Any ideas?
     
  7. hroark13

    hroark13 Android Expert
    Recognized Developer Thread Starter
    Rank:
     #49
    Points:
    483
    Posts:
    3,288
    Joined:
    Jul 15, 2011

    Jul 15, 2011
    3,288
    4,136
    483
    how far did you get in this guide, before it failed
     
  8. exgenmeikoj

    exgenmeikoj Android Enthusiast
    Rank:
     #202
    Points:
    63
    Posts:
    480
    Joined:
    Oct 30, 2011

    Hroak this is awesome best.tut.I needed I just finished Modding my laptop *going off topic* its a dell mini duo with ubuntu 11.10 custom kernel with windows 8 dev and dell stoped supporting it after I.bought LOL so I have no decent drivers or support. But Modding wise it runs like a horse but any way going back on topic this well help me out a lot to building a rom and to forking cm9 with 7 I always like to frankinstine my stuff LOL
     
  9. hroark13

    hroark13 Android Expert
    Recognized Developer Thread Starter
    Rank:
     #49
    Points:
    483
    Posts:
    3,288
    Joined:
    Jul 15, 2011

    Jul 15, 2011
    3,288
    4,136
    483
    its really Squadzones tut

    http://forum.xda-developers.com/showthread.php?t=1423460


    i changed a few things
     
  10. The~Skater~187

    The~Skater~187 Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    1,395
    Joined:
    Oct 20, 2011

    Oct 20, 2011
    1,395
    460
    163
    Male
    Connecticut
    I got the Rom built and flashed on my phone. But I'm trying to install BT5 in chroot on my phone, and I keep getting that error. I had it working on Froyo.
     
  11. hroark13

    hroark13 Android Expert
    Recognized Developer Thread Starter
    Rank:
     #49
    Points:
    483
    Posts:
    3,288
    Joined:
    Jul 15, 2011

    Jul 15, 2011
    3,288
    4,136
    483

    sorry dude I dont know what BT5 or chroot is I am a Linux noob
     
  12. The~Skater~187

    The~Skater~187 Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    1,395
    Joined:
    Oct 20, 2011

    Oct 20, 2011
    1,395
    460
    163
    Male
    Connecticut

    Bt5 is backtrack 5 linux for the arm processor. Its kool though hroark. Thanks for this awesome tut. I'm going to re install and re sync repos and try again.
     
  13. The~Skater~187

    The~Skater~187 Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    1,395
    Joined:
    Oct 20, 2011

    Oct 20, 2011
    1,395
    460
    163
    Male
    Connecticut
    Removed everything. went back through all the above mentioned steps, got to the repo sync -j32 comand and keep getting this error now:

    fatal: unable to connect a socket (Connection refused)
    github.com[0: 207.97.227.239]: errno=Connection refused
    fatal: unable to connect a socket (Connection refused)

    Not sure how to fix this. Any help would be awesome.

    Edit: Got it. :D
     
  14. hroark13

    hroark13 Android Expert
    Recognized Developer Thread Starter
    Rank:
     #49
    Points:
    483
    Posts:
    3,288
    Joined:
    Jul 15, 2011

    Jul 15, 2011
    3,288
    4,136
    483
    what do you mean remove everything

    maybe try renaming the ./repo folder
    in your /home/user folder

    you have to press control h to see hidden folders and files
     
    The~Skater~187 likes this.
  15. The~Skater~187

    The~Skater~187 Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    1,395
    Joined:
    Oct 20, 2011

    Oct 20, 2011
    1,395
    460
    163
    Male
    Connecticut
    Got it. I had to sudo su it. For some reason it wouldn't work other wise.
    Thanks Hroark, you da man!!!
     
  16. hroark13

    hroark13 Android Expert
    Recognized Developer Thread Starter
    Rank:
     #49
    Points:
    483
    Posts:
    3,288
    Joined:
    Jul 15, 2011

    Jul 15, 2011
    3,288
    4,136
    483
    do I need to update my section on setting up repo to include sudo su?
     
  17. The~Skater~187

    The~Skater~187 Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    1,395
    Joined:
    Oct 20, 2011

    Oct 20, 2011
    1,395
    460
    163
    Male
    Connecticut

    No, it might be just my rig. Its a bit buggy at times. Especially if all those commands work for you, it must have been an error on my part.
     
  18. hroark13

    hroark13 Android Expert
    Recognized Developer Thread Starter
    Rank:
     #49
    Points:
    483
    Posts:
    3,288
    Joined:
    Jul 15, 2011

    Jul 15, 2011
    3,288
    4,136
    483

    well I already had repo setup from back when I did CWM

    and I dont remember if I had to sudo
     
  19. Snake X

    Snake X Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    1,035
    Joined:
    Aug 20, 2011

    Aug 20, 2011
    1,035
    359
    163
    "I USUALLY TAKE THAT ZIP UNZIP IT AND PUT A MODDED INSTALLER SCRIPT IN IT, REMOVE ROM MANAGER, AND ADD SOME LAST MINUTE FILES AND GAPPS FILES AND SUCH"

    how do I remove rom manager from it most importantly? also doesn't unzipping the file break the signing keys on it?
     
  20. hroark13

    hroark13 Android Expert
    Recognized Developer Thread Starter
    Rank:
     #49
    Points:
    483
    Posts:
    3,288
    Joined:
    Jul 15, 2011

    Jul 15, 2011
    3,288
    4,136
    483
    remove the Rom Manager apk from the /app foler


    yes it breaks the signing, signing is something I have not concerned myself with
     
  21. Snake X

    Snake X Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    1,035
    Joined:
    Aug 20, 2011

    Aug 20, 2011
    1,035
    359
    163
    so you just re-zip it after that?

    edit: I also want to know whats the chance this will brick my phone? I am using this guide but modded some parts to build for the warp and it seems to be working well :D I already made a first build but scrapped it since it wasn't de-odex'd now im de-odexing it
     
  22. hroark13

    hroark13 Android Expert
    Recognized Developer Thread Starter
    Rank:
     #49
    Points:
    483
    Posts:
    3,288
    Joined:
    Jul 15, 2011

    Jul 15, 2011
    3,288
    4,136
    483
    When ever you load custom ROMs or kernels you are taking a chance of bricking the phone

    My instructions and source are for building for the Samsung Prevail

    It can be used as an example and adapted for the Warp if you use the files from the Warp and adjust your boardconfig settings for the Warp

    I am not too familiar with the Warp, I know QuietStorm is working on CM7 for it, you should hook up with him and see how far he is.

    He is pretty cool, I helped him get CWM working for it
     
  23. Snake X

    Snake X Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    1,035
    Joined:
    Aug 20, 2011

    Aug 20, 2011
    1,035
    359
    163
    yeah but he is fairly inactive recently. Though, if I somehow do manage to brick it and I have a nandroid backup, would that be good enough?

    edit: I'm actually farther on it than he is

    edit 2: which boardconfig?
     
  24. hroark13

    hroark13 Android Expert
    Recognized Developer Thread Starter
    Rank:
     #49
    Points:
    483
    Posts:
    3,288
    Joined:
    Jul 15, 2011

    Jul 15, 2011
    3,288
    4,136
    483

    BoardConfig.mk

    it is in the /device/samsung/prevail folder
     
  25. Snake X

    Snake X Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    1,035
    Joined:
    Aug 20, 2011

    Aug 20, 2011
    1,035
    359
    163
    oh well actually I downloaded his config settings that he used from the warp and put it in a new folder called warp under /devices/zte. Btw is there any way I can pm you? I feel like a hijacker now :L

    I wasn't able to get it to boot on my warp also.
     

Share This Page

Loading...