Sunday, March 3, 2013

How to Compile an Android Kernel for the Samsung Intercept



1. Go to the Applications menu, select 'Accessories' and click 'Terminal' to open the Ubuntu Terminal tool.

2. Get and install the tools that are required to compile your own kernel by running this command in the Terminal: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

3. Open your Web browser and download the Android NDK (full link in Resources). Save the archive on your computer.

4. Get and install the unzip utility by running this command in the Terminal:sudo apt-get install unzip

5. Extract the Android NDK archive by running the following commands, replacing 'path/to/Android NDK' with the path to the Android NDK archive downloaded earlier:cd path/to/Android NDK

unzip android-ndk-r4-linux-x86.zip

6. Create a new folder named KernelSource to store the Android kernel by running these commands:mkdir KernelSource

cd KernelSource

7. Open your favorite Web browser and navigate to opensource.samsung.com. Type the following in the Search box:M910

8. Click the SPH-M910_OpenSource.zip link and save the file on your computer.

9. Run the following commands to extract the archive, replacing 'path/to/SPH M910' with the path to the folder where you downloaded the Android source. This process creates two folders, platform and kernel:cd path/to/SPH M910

unzip android-ndk-r4-linux-x86.zip

10. Open the kernel folder, select all files and copy them to the KernelSource folder.

11. Connect the Samsung Intercept to your computer using the USB cable that came with the phone.

12. Get the config from your Samsung phone by running these commands in the Terminal:adb pull /proc/config.gz .

gunzip config.gz

mv config .config

13. Open the config file in a text editor and edit the kernel settings. For example, if you want to use USB devices with your Intercept, enable the 'Support for Host-side USB' and 'USB Gadget Support' settings. You can also enable various network functions like IP tunneling and privacy options. The configuration file includes comments that explain each setting and its options. Save the config file in the KernelSource folder.

14. Prepare to compile the kernel by running these commands in the Terminal:export ARCH=arm

export CROSS_COMPILE=arm-eabi-4.4.0

export PATH=$PATH:~/android-ndk-r4/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin

15. Run the following command in the Terminal to compile the Android kernel for your Samsung Intercept:makeThis can take up to one hour, depending on your computer.

No comments:

Post a Comment