我试图制作一个应用程序来分享我的文件,打开我的移动热点,朋友可以连接它。然后在url中打开浏览器键下载。我使用iptable从端口80重定向到我的web服务器端口8888,它可以工作。但是当我更改/etc/host文件/ add 1'92.168.43.1 xx.com‘时
客户端无法使用。我在热点手机上点击xx.com,它就能工作了。
我尝试在Android2.3.7小米android的根环境中使用nandhttpserver库(我尝试使用dns服务器应用程序,但失败了(我已经将端口53重定向到dns服务器),有谁能帮我吗?
我的主机脚本
private boolean chnagehost(String appendStr) {
boolean res;
String temp ="mount -o rw,remount -t rootfs /;mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system;"
+"cp -f /etc/hosts /etc/hosts.backup;"
+"echo "+ appendStr + " >> /etc/hosts;echo -e '\n\r' >> /etc/hosts";
res = executeRootShellCommand(temp);
//res = executeShellCommand("cp -f /etc/hosts /etc/hosts.backup");
//res= executeShellCommand("echo "+ appendStr + " >> /etc/hosts");
return res;
}发布于 2015-05-04 07:37:14
我找到了。修改主机文件后应重新启动hotspot。主人在工作。测试三星手机,android 4.3,4.1
https://stackoverflow.com/questions/29963636
复制相似问题