(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
-------------------------------------
------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++
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
-------------------------------------
------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++
相关文章推荐
- Android之Activity(五):知晓当前是在哪一个活动?
- 屏幕适配
- Android中View绘制流程以及invalidate()等相关方法分析
- Android事件处理分发机制的总结:二(事件分发)
- Android/IOS/Web跳转第三方QQ指定QQ号的聊天框,实现陌生人聊天
- Android 5.X 新特性详解(五)——Notification
- Android 底部菜单栏实现
- 安卓音乐播放器1
- Android编程之文件读写操作与技巧总结【经典收藏】
- Android 插件化开发技术分享
- Android中的“再按一次返回键退出程序”功能实现
- Android studio开发环境搭建教程与软件安装教程(从零开始学android)
- Android 检测是否有ROOT权限
- Android组件(Broadcast Receiver)
- Androidstudio shrinkResources
- Android开发注意点
- 15 个 Android 通用流行框架
- 快速开发之Android Orm总结
- Android Vibrator的使用
- 全新的手势,侧滑返回、全局右滑返回都OUT啦!