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

Root Setting up your development environment

Discussion in 'Android Devices' started by Koumajutsu, Oct 13, 2011.

  1. Koumajutsu

    Koumajutsu Android Expert
    Thread Starter
    Rank:
    None
    Points:
    313
    Posts:
    1,444
    Joined:
    Aug 26, 2011

    So in trying to setup a good development environment, I've run into issues and conflicting information regarding workarounds.

    What I'm hoping to do here is start a conversation to help clear up my own confusion as well as anyone else feeling the same pain.

    Here is what I've found:

    Android SDK | Android Developers

    Starting here, I found a good bit of information on getting an environment set up for developing applications for Android using Eclipse. All seemed well and good, but the files from Samsung on https://opensource.samsung.com/ for the kernel and the Prevail's platform don't seem to match the SDK's directory structure. It makes it quite confusing as to how to use these files.

    When searching out info on compiling the kernel, I ran across this site:

    Initializing a Build Environment | Android Open Source

    This site went about creating a development environment that was quite different than the eclipse environment stated previously. The site even mentions developer.android.com as where to go to develop applications for the Android, so the 2 seem somewhat connected.
    Trying to follow the instructions here though led to issues.
    1) trying to install the dependencies leads to packages apparently missing.

    I found info here:
    http://askubuntu.com/questions/25727/how-do-i-install-the-build-dependencies-for-android

    on some alternative packages to meet at least some of those requirements.

    the worst part was though, that I was unable to download the repo script from android.git.kernel.org because kernel.org was apparently hacked and the android team has not logged back in to reactivate the project.

    I found this as an alternative source

    Kernel.org hacked – how to get Android repo? mindexception: out of context

    This gets the kernel source and development environment for Gingerbread, but simply replacing the word gingerbread for froyo in the walkthrough is successful in getting the froyo repositories.

    This builds a filestructure that looks identical to the files provided by Samsung.

    I dumped the platform, then kernel files here, then the kernel2 (ee14) files on top of that and tried to compile a kernel from here. The result was a big chunk of warnings for items that supposedly throw warnings for any linux kernel and a zimage file that was within a few bytes of the stock kernel, likely due to, at minimum, building from different versions of dependencies from when samsung compiled for release.

    This same system setup was unable to use hrorak's kernel packer, even with the zimage that comes in the zip. I was getting invalid image errors from ODIN and a boot.img that was about 7k. I blamed Python, (Ubuntu 10.4 which I was using comes with version 2.6) trying to upgrade python led me to breaking my system pretty bad so now I'm trying again with 11.04.

    I haven't tried compiling any apps yet as my personal confidence level is pretty low at this point.

    So, how about those who have been successful in at least making apps, any advice for myself and others like me in getting things set up correctly?
     

    Advertisement

  2. hroark13

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

    Jul 15, 2011
    3,288
    4,136
    483
    i first setup my build enviroment right before I released my first CWM

    So I dont remember everyhting I did

    I am using Ubunto 11.4 64 bit

    I think i had to downgrade to python 2.7

    I did not repo sync with froyo stuff, i synced with the gingerbread stuff

    i followed the instructions in the same link that you had
    Initializing a Build Environment | Android Open Source

    i followed these instructions to make CWM
    My Brain Hurts: Porting Clockwork Recovery to New Devices

    i did hit some stumbling blocks along the way, but when i did it kernel.org was up and running

    with kernel.org being down it will probably be different
     
  3. hroark13

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

    Jul 15, 2011
    3,288
    4,136
    483
    when i try to compile the kernel, this is how i do it

    copy the SPH-M820_Kernel_2.tar.gz in to your /home/user folder

    right click on it and choose extract here

    that should of created a folder called SPH-M820_Kernel_EMR2

    right click on SPH-M820_Kernel_EMR2 and choose rename and name it pkern

    go into /home/user/pkern/kernel/arch/arm/configs

    look for a file called SPH-M820_defconfig

    right click SPH-M820_defconfig and choose copy

    go into /home/user/pkern/kernel

    right click and choose paste

    rename the SPH-M820_defconfig that you just pasted and name it .config

    open a terminal session

    cd /home/user/pkern/kernel
    make menuconfig

    scroll down and choose
    Load an Alternate Configuration File
    hit enter
    it should say .config
    hit enter again
    go threw the menus and make the changes you want

    go to main menu and choose
    Save an Alternate Configuration File
    hit enter

    Then select exit, you should now be at your terminal prompt

    type

    make

    or if you want to just make modules type

    make modules



    Now I may be doing this all wrong, I was never able to make a booting kernel, but I was able to make compatible ext4.ko and jbd2.ko modules so that we can have ext4 support
     
  4. Koumajutsu

    Koumajutsu Android Expert
    Thread Starter
    Rank:
    None
    Points:
    313
    Posts:
    1,444
    Joined:
    Aug 26, 2011

    I'm partway through getting the repo on my work machine now. I think I found a copy of the kernel I tried building on my windows machine<update: it wasn't. it was a boot.img that I tried splitting and rejoining in kpack, didnt work>. I trried flashing it into my phone, but the phone doesnt make it past the Galaxy boot screen. I can ADB into it though and navigate the filesystem. The same thing happens when I try to use the odinkrnl.tar made when i run ./odinkrnl.pl shabby-rc1 with my new virtual machine... stock and hroark-12 work fine though.

    I think I figured out why I was getting errors from Odin though... it was my fault. I was trying to set the file as the PDA image, not as one package. It still doesn't explain why winrar on my windows machine was unable to open the tar file, but the ones I make now open no problem
     
  5. trenchkato

    trenchkato Android Enthusiast
    Rank:
    None
    Points:
    93
    Posts:
    507
    Joined:
    Jul 9, 2011

    Jul 9, 2011
    507
    127
    93
    Atlanta, Georgia
    thanks for the info
     

Share This Page

Loading...