您的位置:首页 > 移动开发 > Android开发

(OK) Android-x86 —— compile the source code —— VirtualBox

2016-06-14 09:28 495 查看
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Android-x86 —— compile the source code —— VirtualBox

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
http://www.android-x86.org/getsourcecode

[root@localhost android-x86-6.0-rc1]# export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.x86_64

[root@localhost android-x86-6.0-rc1]# export PATH=$JAVA_HOME/bin:$PATH

[root@localhost android-x86-6.0-rc1]# . build/envsetup.sh

[root@localhost android-x86-6.0-rc1]# lunch android_x86-userdebug

[root@localhost android-x86-6.0-rc1]# m -j4 iso_img

Total translation table size: 6900

Total rockridge attributes bytes: 3312

Total directory bytes: 12288

Path table size(bytes): 88

Done with: The File(s)                             Block(s)    170078

Writing:   Ending Padblock                         Start Block 170122

Done with: Ending Padblock                         Block(s)    150

Max brk space used 22000

170272 extents written (332 MB)

/bin/bash: isohybrid: 未找到命令

isohybrid not found.

Install syslinux 4.0 or higher if you want to build a usb bootable iso.

out/target/product/x86/android_x86.iso is built successfully.

make: Leaving directory '/run/media/root/158a840e-63fa-4544-b0b8-dc0d40c79241/android-x86/android-x86-6.0-rc1'

#### make completed successfully (03:19:54 (hh:mm:ss)) ####

------------------------------------------------------------
out/target/product/x86/android_x86.iso

[root@localhost android-x86-6.0-rc1]# ll -h out/target/product/x86/android_x86.iso

-rw-r--r--. 1 root root 333M 6月  13 18:42 out/target/product/x86/android_x86.iso

------------------------------------------------------------

------------------------------------------------------------
running Android-x86 in VirtualBox

------------------------------------------------------------
refer to http://blog.csdn.net/ztguang/article/details/51649619
-----------

in HOST

-----------

tunctl -t tap-left

ip link set up dev tap-left

brctl addbr br-android

brctl addif br-android tap-left

ip link set up dev br-android

ip addr add 10.1.1.1/24 dev br-android

ip route add 10.1.1.0/24 dev br-android

-----------

// Virtual Box > Settings > Network > Adapter 2 > bridge, br-android, then, to start android in genymotion window.

-----------

in Android

-----------

-------------------------------------

// in HOST

[root@localhost busybox]# adb push busybox-x86_64 /data

[root@localhost busybox]# adb shell

// in Android

root@vbox86p:/ # cd data/                                                      

chmod 755 busybox-x86_64

-------------------------------------

// in Android

netcfg eth1 down

./busybox-x86_64 ifconfig eth1 down

./busybox-x86_64 ifconfig eth1 10.1.1.2 netmask 255.255.255.0 up

// ./busybox-x86_64 ip addr add 10.1.1.2/24 dev eth1

// ./busybox-x86_64 ip route add default via 10.1.1.1 dev eth1

./busybox-x86_64 route -n

./busybox-x86_64 ifconfig

./busybox-x86_64 ping 10.1.1.2

-----------

-------------------------------------

ifconfig br-android down

brctl delif br-android tap-left

brctl delif br-android eth1

brctl delbr br-android

ifconfig tap-left down

tunctl -d tap-left

//ip link delete veth_android44

//ip link delete X

-------------------------------------

------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: