Hi, fans and friends:
Xianyu bought an open source tablet for 50 yuan. Please note that this tablet has source code and can be compiled and modified. Hahaha, Brother Ma has experienced whether a 50 yuan tablet can be used as a framework?
Haha, we started working as soon as we agreed. I got the relevant information and found that it was the source code of aosp 5.0. . . . What an ancient artifact, but at least it costs 50 yuan, and it also has aosp source code, kernel, etc. It is still very worthwhile. Here is the compilation of the relevant source code. However, the source code of Android 5.0 compiled by high version Ubuntu is still a bit bumpy. The record is as follows:
Compile the kernel and uboot parts
The relevant step-by-step video explanation is as follows: https://www.bilibili.com/video/BV1SF411U73z/
You can watch the video and contact Ma Geha to get more knowledge about android framework
1Install mkimage
sudo apt-get install u-boot-tools
2 awk regenerate rootfs cpio
11282 blocks
12029 blocks
awk: line 2: function strtonum never defined
awk: line 2: function strtonum never defined
Solution:
sudo apt-get install gawk
Compile android part
3 hide method requires, make update-api
Directly perform make update-api
4. Install openjdk7
Installation package: java-7-openjdk-amd64.tar.gz
(Download link: https://pan.baidu.com/s/1TWr9apWgCaRz6RzFiG33Lw?pwd=d1nq Extraction code: d1nq)
How to use
-
Copy to server/PC
-
解包
mkdir /opt/jdk/
sudo tar -zxvf java-7-openjdk-amd64.tar.gz -C /opt/jdk/ -
Configure the compilation environment
JAVA_HOME=/opt/jdk/java-7-openjdk-amd64
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME
export PATH
export CLASSPATH
$ java -version
java version “1.7.0_121”
OpenJDK Runtime Environment (IcedTea 2.6.8) (7u121-2.6.8-1ubuntu0.12.04.3)
OpenJDK 64-Bit Server VM (build 24.121-b00, mixed mode)
4. ld related errors occur
It is an error if the following class appears during compilation
libnativehelper/JNIHelp.cpp:310: error: unsupported reloc 43
According to the above error message, the root cause is due to the error reported by ld
Solution:
Copy the ld of the current system to the prebuild of the source code
cp /usr/bin/ld.gold prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/x86_64-linux/bin/ld
The last successful screenshot: