3 个答案:
答案 0 :(得分:1)
我能够将Ip设置为以太网连接,如下所示。
我正在使用Allwinner A31s安卓板。
String command1 = "su -c ifconfig eth0 "
+ terminalIpAddressString+" netmask "
+ subnetMaskAddressString
+" up";
String command2 = "route add default gw "
+ gatewayAddressString+" dev eth0";
String command3 = "mount -o remount,rw /system";
String command4 = "echo \"su -c ifconfig eth0 "
+terminalIpAddressString+" netmask "
+subnetMaskAddressString+" up;" +
"route add default gw "
+gatewayAddressString
+" dev eth0\" > /system/bin/preinstall.sh";
String command5 = "busybox sed -i 's/su -c ifconfig eth0 "
+terminalIpAddressString