1.Introduction
- Host Setup
Download the Sun Java JDK from the following link: http://www.oracle.com/technetwork/java/javase/downloads/jdk6-downloads-1637591.html .
You need to download the Linux x64 bin installer. (Not the rpm installer)
$ cp android-sdk_r20.0.3-linux.tgz to home dir.
$ tar -zxvf android-sdk_r20.0.3-linux.tgz
$ cd android-sdk_r20.0.3-linux
$ chmod a+x jdk-6u33-linux-x64.bin
$ ./jdk-6u33-linux-x64.bin
$ mkdir ~/bin
$ PATH=~/bin:$PATH
Download the repo script and ensure it is executable
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ git clone https://android.googlesource.com/kernel/goldfish
$ cd goldfish/
$ git branch -a
$ git checkout -t origin/android-goldfish-2.6.29 -b goldfish
- Compilation Procedure
Download cross-tool chain arm-2012.03-56-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 from code sorcery web site.. $ tar -jxvf 2012.03-56-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
$ export PATH=arm-2012.03/bin:$PATH
- Build Kernel
$ cd goldfish
$ make ARCH=arm CROSS_COMPILE=arm-none-eabi- distclean
$ make ARCH=arm CROSS_COMPILE=arm-none-eabi- goldfish_armv7_defconfig
$ make ARCH=arm CROSS_COMPILE=arm-none-eabi- zImage
This will generate zImage (kernel image) in kernel/arch/arm/boot folder Build Android filesystem
- Managing Virtual Devices
$ tar xvzf android-sdk_r20.0.3-linux.tgz
$ export PATH=$PATH:~/android-sdk-linux_86/tools
$ emulator -help # Shows some help.
$ export ANDROID_PRODUCT_OUT=/path/to/goldfish/arch/arm/boot/zImage # Env variable showing where our images are.
$ emulator -verbose
$ emulator -show-kernel -verbose
adb tool comes within Android SDK.
$ adb devices
It will show available devices in your system:
List of devices attached
emulator-5554 device
$ adb shell
- Loading modules in android using ADB bridge
- Compile the module hello.c to be inserted using proper cross-tool chain to get .ko file.
- Now push hello.ko on to the data dir of emulatorusing cmd push hello.ko /data
- run " adb shell" from your terminal to have goldfish terminal.
- ismode /data/hello.ko
- Acknowledge if module is loaded or not using dmesg
- If module insertion is successfull go rmmode again check the dmesg prints...
Follow the below links for more tutorials
How to configure Samba 4 Secondary Domain Controller
How to secure Apache web server in Linux using password (.htaccess)
How to register Red Hat Linux with RHN (Red Hat Network )
Red hat Enterprise Linux 5.5 Installation Guide (Screenshots)
15 tips to enhance security of your Linux machine
Why is Linux more secure than windows and any other OS
What is the difference between "su" and "su -" in Linux?
What is swappiness and how do we change its value?
How to log iptables messages in different log file
What are the s and k scripts in the etc rcx.d directories
How to check all the currently running services in Linux
How to auto start service after reboot in Linux
What is virtual memory, paging and swap space?