(OK)(OK) NS3 - Genymotion - Android
-----------------------------------------------------------------
install genymotion in Fedora23
-----------------------------------------------------------------
[root@localhost android-on-linux]# pwd
/opt/android-on-linux
[root@localhost android-on-linux]# ls genymotion-2.6.0-ubuntu15_x64.bin
genymotion-2.6.0-ubuntu15_x64.bin
[root@localhost android-on-linux]# chmod +x genymotion-2.6.0-ubuntu15_x64.bin
[root@localhost android-on-linux]# ll -h genymotion-2.6.0-ubuntu15_x64.bin
-rwxr-xr-x. 1 root root 41M 5月 18 22:54 genymotion-2.6.0-ubuntu15_x64.bin
[root@localhost android-on-linux]# ./genymotion-2.6.0-ubuntu15_x64.bin
Installing for all users.
Installing to folder [/opt/genymobile/genymotion]. Are you sure [y/n] ? y
- Trying to find VirtualBox toolset .................... OK (Valid version of VirtualBox found: 5.0.20r106931)
- Extracting files ..................................... OK (Extract into: [/opt/genymobile/genymotion])
- Installing launcher icon ............................. OK
Installation done successfully.
You can now use these tools from [/opt/genymobile/genymotion]:
- genymotion
- genymotion-shell
- gmtool
[root@localhost android-on-linux]#
-----------------------------------------------------------------
[root@localhost genymotion]# pwd
/opt/genymobile/genymotion
[root@localhost genymotion]# ./genymotion
./genymotion: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory
-----------------------------------------------------------------
https://github.com/maciej-c/libjpeg8x64
wget https://codeload.github.com/maciej-c/libjpeg8x64/zip/master
[root@localhost libjpeg8-x64]# ll
总用量 1176
lrwxrwxrwx. 1 root root 16 5月 18 23:12 libjpeg.so.8 -> libjpeg.so.8.0.0
-rwxrwxr-x. 1 root root 1188344 2月 12 02:23 libjpeg.so.8.0.0
[root@localhost libjpeg8-x64]# cp -a libjpeg.so.8* /usr/lib64/
-----------------------------------------------------------------
[root@localhost genymotion]# pwd
/opt/genymobile/genymotion
[root@localhost genymotion]# ./genymotion
-----------------------------------------------------------------
[root@localhost ~]# pwd
/opt/android-on-linux/android-sdk-linux/platform-tools
[root@localhost ~]# gedit /root/.bashrc
export PATH=f; done
cd -
----------------------------
second:
----------------------------
to set up the first genymotion VM in VirtualBox.
---> Virtual Box > (Custom Phone-5.1.0-API 22-768x1280) > Settings > Network > Adapter 2 > bridge, br_a_1,
to set up the second genymotion VM in VirtualBox.
---> Virtual Box > (Google Nexus7-5.0.0-API 21-800x1280) > Settings > Network > Adapter 2 > bridge, br_a_2,
[root@localhost genymotion]# pwd
/opt/genymobile/genymotion
[root@localhost genymotion]# ./genymotion
to start the first android (Custom Phone-5.1.0-API 22-768x1280) in genymotion window.
to start the second android (Google Nexus7-5.0.0-API 21-800x1280) in genymotion window.
----------------------------
third:
----------------------------
[root@localhost ~]# adb devices
List of devices attached
192.168.58.102:5555 device
192.168.58.101:5555 device
[root@localhost 111]#
adb -s 192.168.58.101:5555 root
adb -s 192.168.58.101:5555 shell
netcfg
// netcfg eth0 up
// netcfg eth0 dhcp
ip addr add 172.17.0.1/16 dev eth1
ping 172.17.0.1
ping 172.17.0.2
[root@localhost 222]#
adb -s 192.168.58.102:5555 root
adb -s 192.168.58.102:5555 shell
ip addr add 172.17.0.2/16 dev eth1
netcfg
// netcfg eth0 up
// netcfg eth0 dhcp
ping 172.17.0.1
ping 172.17.0.2
--------------------------------------
172.17.0.2 can not ping 172.17.0.1
--------------------------------------
cp manet-2015.cc /opt/tools/network_simulators/ns3/ns-allinone-3.25/ns-3.25/scratch/
[root@localhost ns-3.25]# pwd
/opt/tools/network_simulators/ns3/ns-allinone-3.25/ns-3.25
[root@localhost ns-3.25]#
./waf --run manet-genymotion --vis
172.17.0.2 can ping 172.17.0.1 successfully
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
clean
------------------------------------------------------------------------------------------
ifconfig br_a_1 down
brctl delif br_a_1 tap_a_1
brctl delbr br_a_1
ifconfig tap_a_1 down
tunctl -d tap_a_1
ifconfig br_a_2 down
brctl delif br_a_2 tap_a_2
brctl delbr br_a_2
ifconfig tap_a_2 down
tunctl -d tap_a_2
------------------------------------------------------------------------------------------
So far, OK OK OK
------------------------------------------------------------------------------------------
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通