Write down the steps for compiling the source code under ubuntu9.10 for future reference:
Sudo apt-Get install Git-core curl
Sudo apt-Get install GCC g ++ flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind
1. ubuntu9.04 is libsdl-Dev
Ubuntu9.04 is libsdl-Dev
With the jdk5 source, ubuntu9.10 does not have the jdk5 source by default.
- 1. Deb [url] http://run.hit.edu.cn/ubuntu/#/url] jaunty main restricted universe multiverse
- 2. Deb-Src [url] http://run.hit.edu.cn/ubuntu/#/url] jaunty main restricted universe multiverse
- 3. Deb [url] http://run.hit.edu.cn/ubuntu/#/url] jaunty-Updates main restricted universe multiverse
- 4. Deb-Src [url] http://run.hit.edu.cn/ubuntu/#/url] jaunty-Updates main restricted universe multiverse
- 5. Deb [url] http://run.hit.edu.cn/ubuntu/#/url] jaunty-backports main restricted universe multiverse
- 6. Deb-Src [url] http://run.hit.edu.cn/ubuntu/#/url] jaunty-backports main restricted universe multiverse
- 7. Deb [url] http://run.hit.edu.cn/ubuntu/#/url] jaunty-security main restricted universe multiverse
- 8. Deb-Src [url] http://run.hit.edu.cn/ubuntu/#/url] jaunty-security main restricted universe multiverse
- 9.
- 10. After update, use sudo apt-Get install sun-java5-jdk
Copy code
After update, use sudo apt-Get install sun-java5-jdk
Load JDK environment variables:
- 1. sudo gedit/etc/profile
- 2. Export java_home =/usr/lib/JVM/Java-5-sun
- 3. Export Path = $ path: $ java_home/bin
- 4. Export classpath = $ java_home/lib
Copy code
Create a directory for storing andorid and create a bin directory in it.
- 1. mkdir android
- 2. CD android
- 3. mkdir Bin
- 4. CD Bin
- 5. Curl [url] http://android.git.kernel.org/repo#/url]> Repo
- 6. sudo chmod A + x repo // Modify permissions
- 7. CD .. // return to the previous layer: Return to the android directory
Copy code
Then, create a directory for saving the source code in the android directory. My name is androidsrc.
Mkdir androidsrc
CD androidsrc
../Bin/repo init-u git: // android.git.kernel.org/platform/manifest.git
After the settings are complete, start to synchronize the code
../Bin/repo sync
Load Android environment variables:
- 1. sudo gedit/etc/profile
- 2. Export android_java_home = $ java_home
- 3. Export Path = $ path:/home/Heji/Android/androidsrc/out/host/linux-x86/bin
- 4. Export android_product_out =/home/Heji/Android/androidsrc/out/target/product/generic
Copy code
- 1. sudo gedit/home/Heji/. bashrc
- 2. Export Path = $ path :~ /Android/androidsrc/out/host/linux-x86/bin
- 3. Export android_product_out = ~ /Android/androidsrc/out/target/product/generic
Copy code
Source code compilation:
After the download is complete, go to the androidsrc directory, make, compile the source code, and compile the SDK as make SDK.
Start the simulator:
Go to the androidsrc directory and enter the command: emulator
Module Compilation:
Run. Build/envsetup. Sh (required) in the androidsrc directory)
Mmm packages/apps/contacts/compile contacts
Directory out/target/product/generic/system/APP/contacts.apk
To directly test the changes, you need to generate a new system. IMG and run the following command in the android directory:
Make Snod (under the androidsrc directory)
Of course, if you change emulator or other peripheral-related things, instead of internal system things, you don't just need to regenerate system. IMG. (Text/Heji)