yum install java-devel
yum install java-1.6.0-openjdk-devel
updatedb
locate javac
# dd if=/dev/zero of=/run/media/root/Elements/ztguang/android.iso bs=1M count=112640
# mkfs.ext4 /run/media/root/Elements/ztguang/android.iso
# mount /run/media/root/Elements/ztguang/android.iso /mnt/iso
# mkdir -p /mnt/iso/android-source/android/system
# cd /mnt/iso/android-source/android/system
-----------------------------------------------
[root@localhost system]# gedit .repo/manifests/default.xml
fetch="https://android.googlesource.com"
改为
fetch="https://aosp.tuna.tsinghua.edu.cn/"
或
fetch="git://aosp.tuna.tsinghua.edu.cn/aosp/"
-----------------------------------------------
[root@localhost system]# gedit /bin/repo
REPO_URL = 'git://aosp.tuna.tsinghua.edu.cn/aosp/'
-----------------------------------------------
# repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
# repo sync -j16; while [ $? = 1 ]; do sleep 1; repo sync -j16; done
# cd vendor/cyanogen
# ./get-rommanager //Once completed, this does not need to be done again.
# cd /mnt/iso/android-source/android/system
# source build/envsetup.sh
# lunch or # lunch cm_jordan-userdebug or # lunch full_jordan-userdebug
# cd device/motorola/jordan
# ./extract-files.sh //Now ensure that your Defy is connected to your computer via the USB cable
# cd -
# export USE_CCACHE=1
# prebuilt/linux-x86/ccache/ccache -M 50G
# export PATH=/usr/lib/jvm/java-1.6.0-openjdk.x86_64/bin/:$PATH
# croot
# brunch jordan
-----------------------------------------------没有/mnt/iso/android-source/android/system/device/motorola/jordan文件夹的解决方法
在 https://github.com/CyanogenMod
搜索(filters) android_device_motorola_jordan
下载得到 android_device_motorola_jordan-gb-release-7.2.zip,然后,解压,内容复制到 device/motorola/jordan中
单独 clone jordan
[root@localhost tmp]# git init
[root@localhost tmp]# git clone https://github.com/CyanogenMod/android_device_motorola_jordan.git
-----------------------------------------------
target Prebuilt: gdbserver (out/target/product/jordan/obj/EXECUTABLES/gdbserver_intermediates/gdbserver)
make: *** 没有规则可以创建“out/target/product/jordan/obj/lib/libaudio.so”需要的目标“vendor/motorola/jordan/proprietary/lib/libaudio.so”。 停止。
make: *** 正在等待未完成的任务....
解决方法:
下载 libaudio.so (搜索关键字:jordan libaudio.so) 到 /opt/tools/
[root@localhost system]# cp /opt/tools/libaudio.so vendor/motorola/jordan/proprietary/lib/
[root@localhost system]# cp /opt/tools/libaudio.so out/target/product/jordan/system/lib/
-----------------------------------------------
修改 .repo/manifests.git/config,将
url = git://github.com/CyanogenMod/android.git
更改为
url = git://aosp.tuna.tsinghua.edu.cn/aosp/platform/manifest
# 或 url = https://aosp.tuna.tsinghua.edu.cn/platform/manifest
这个方法也可以用来在同步 Cyanogenmod 代码的时候从 TUNA 同步部分代码
-----------------------------------------------如下尝试,若不行,则还原
[root@localhost motorola]# ls
common jordan jordan-common
[root@localhost motorola]# mv jordan jordan.bac
[root@localhost motorola]# cp -a jordan-common/ jordan
[root@localhost motorola]# cd jordan
[root@localhost jordan]# mv jordan-common-blobs.mk jordan-blobs.mk
[root@localhost jordan]# mv jordan-common.mk jordan.mk
-----------------------------------------------
error: Cannot fetch CyanogenMod/android external svox.
error: Cannot fetch CyanogenMod/android hardware ti wpan.
[root@localhost system]# gedit .repo/manifests/default.xml
fetch="https://aosp.tuna.tsinghua.edu.cn/"
改为
fetch="https://android.googlesource.com"
删除line129, <project path="external/svox" name="CyanogenMod/android_external_svox" />
删除line162, <project path="hardware/ti/wpan" name="CyanogenMod/android_hardware_ti_wpan" />
添加:
<project path="device/motorola/jordan" name="CyanogenMod/android_device_motorola_jordan" />
-----------------------------------------------
Your version is: java version "1.7.0_91".
The correct version is: 1.6.
export PATH=/usr/lib/jvm/java-1.6.0-openjdk.x86_64/bin/:$PATH
-----------------------------------------------
-----------------------------------------------
make: *** [out/target/product/jordan/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/V8HTMLElementWrapperFactory.h] 错误 255
make: *** 正在等待未完成的任务....
make: *** [out/target/product/jordan/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/HTMLNames.h] 错误 255
make: *** [out/target/product/jordan/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/HTMLElementFactory.h] 错误 255
解决方法:
[root@localhost system]# gedit out/target/product/jordan/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/HTMLElementFactory.h
内容是:http://www.opensource.apple.com/source/WebCore/WebCore-332/html/HTMLElementFactory.h
https://github.com/Treeeater/chrome_release_webkit_bindings/blob/1b1f616598da8506b56e858e6fd20b4883496b10/HTMLElementFactory.cpp
[root@localhost system]# gedit out/target/product/jordan/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/V8HTMLElementWrapperFactory.h
内容是:https://github.com/Treeeater/chrome_release_webkit_bindings/blob/master/V8HTMLElementWrapperFactory.h
https://github.com/Treeeater/chrome_release_webkit_bindings/blob/1b1f616598da8506b56e858e6fd20b4883496b10/V8HTMLElementWrapperFactory.cpp
[root@localhost system]# gedit out/target/product/jordan/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/HTMLNames.h
内容是:https://github.com/Treeeater/chrome_release_webkit_bindings/search?utf8=%E2%9C%93&q=HTMLNames.h
[root@localhost system]# gedit out/target/product/jordan/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/XMLNames.cpp
内容是:https://github.com/Treeeater/chrome_release_webkit_bindings/blob/1b1f616598da8506b56e858e6fd20b4883496b10/XMLNames.cpp
[root@localhost system]# gedit out/target/product/jordan/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/XMLNSNames.cpp
内容是:https://github.com/Treeeater/chrome_release_webkit_bindings/blob/1b1f616598da8506b56e858e6fd20b4883496b10/XMLNSNames.cpp
out/target/product/jordan/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/HTMLNames.cpp
https://github.com/Treeeater/chrome_release_webkit_bindings/blob/1b1f616598da8506b56e858e6fd20b4883496b10/HTMLNames.cpp
out/target/product/jordan/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/HTMLElementFactory.cpp
https://github.com/Treeeater/chrome_release_webkit_bindings/blob/1b1f616598da8506b56e858e6fd20b4883496b10/HTMLElementFactory.cpp
out/target/product/jordan/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/V8HTMLElementWrapperFactory.cpp
https://github.com/Treeeater/chrome_release_webkit_bindings/blob/1b1f616598da8506b56e858e6fd20b4883496b10/V8HTMLElementWrapperFactory.cpp
[root@localhost system]# mv out/target/product/jordan/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/platform/AtomicString.h out/target/product/jordan/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/
[root@localhost system]# mv out/target/product/jordan/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/platform/AtomicString.cpp out/target/product/jordan/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/
[root@localhost system]#
gedit out/target/product/jordan/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/HTMLNames.h
#include "AtomicString.h"
//extern const WTF::AtomicString xhtmlNamespaceURI;
extern const AtomicString xhtmlNamespaceURI;
++++++++++++++++++++++++++++++++++
https://github.com/CyanogenMod/android_device_motorola_jordan.git
# repo init -u https://github.com/CyanogenMod/android_device_motorola_jordan.git
# repo sync -j16
error: .repo/manifests/: contains uncommitted changes
# repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
# repo init -u git://github.com/CyanogenDefy/android.git -b gingerbread
https://github.com/CyanogenMod/android_device_motorola_jordan.git
git clone https://github.com/CyanogenMod/android_device_motorola_jordan.git
git clone https://github.com/CyanogenMod/android_device_motorola_jordan