主题 : 请问4412上跑的4.2的操作系统,有办法修改以太网的IP地址么 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 95617
精华: 0
发帖: 9
金钱: 45 两
威望: 9 点
综合积分: 18 分
注册时间: 2013-08-19
最后登录: 2013-10-18
楼主  发表于: 2013-10-05 08:58

 请问4412上跑的4.2的操作系统,有办法修改以太网的IP地址么

如题,想要修改系统的以太网IP地址。210板子跑的4.0的操作系统设置就有以太网的选项,4.2的没有了,网上查了手动设置IP地址的方法,说是没有API接口,需要移植,如果不重新编译系统的话,有没有方法能直接修改成固定的以太网IP?多谢
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2013-10-05 09:48
用busybox的ifconfig?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 95617
精华: 0
发帖: 9
金钱: 45 两
威望: 9 点
综合积分: 18 分
注册时间: 2013-08-19
最后登录: 2013-10-18
2楼  发表于: 2013-10-05 11:40
在adb shell里用busybox ifconfig 可以改,但是开机重启后就又自动dhcp了,在程序里调用命令行,又没有权限。。。。
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2013-10-06 20:24

 回 2楼(minminmoon2) 的帖子

很不幸的是,DHCP服务是定义在/init.tiny4412.rc里的:

复制代码
  1. # eth0
  2. service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL
  3.     class main
  4.     disabled
  5.     oneshot


要禁用掉它,你需要把device/friendly-arm/tiny4412/init.tiny4412.rc里对应部分代码去除掉,重新下载编译生成的ramdisk-u.img
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 95617
精华: 0
发帖: 9
金钱: 45 两
威望: 9 点
综合积分: 18 分
注册时间: 2013-08-19
最后登录: 2013-10-18
4楼  发表于: 2013-10-11 11:09
多谢,苦于我现在没有Android的编译环境,最后在Linux下强制对IP地址进行赋值了。