赤色彗星SE 发表于 2011-7-11 16:26

android真脆皮,一个wlan_loader直接吧系统搞死机了

insmod /system/lib/modules/tiwlan_drv.ko

然后照着http://code.google.com/p/android-wifi-tether/issues/detail?id=338来那么下

android的wlan_loader是咋加载的...

喵的直接用他里面编译好的iwconf 设置ad-hoc貌似会自动重新加载无线模块还原.....

妹的看了下init.rc


service ap_fmloader /system/bin/logwrapper /system/bin/wlan_loader -f /system/etc/wifi/fw_tiwlan_ap.bin -i /system/etc/wifi/tiwlan_ap.ini -e /pds/wifi/nvs_map.bin
    class post-zygote_services
    disabled
    oneshot

service ap_fmloader_rfmd /system/bin/logwrapper /system/bin/wlan_loader -f /system/etc/wifi/fw_tiwlan_ap_rfmd.bin -i /system/etc/wifi/tiwlan_ap_rfmd.ini -e /pds/wifi/nvs_map.bin
    class post-zygote_services
    disabled
    oneshot

service hostapd /system/bin/logwrapper /system/bin/Hostapd -d /data/misc/wifi/hostapd.conf
    class post-zygote_services
    socket hostapd_tiwlan0 dgram 660 wifi wifi
    disabled
    oneshot

service dnsmasq /system/bin/logwrapper /system/bin/dnsmasq -C/data/misc/wifi/dns.conf -k
    class post-zygote_services
    group wifi
    disabled
    oneshot

service mynet_start /system/bin/logwrapper /system/bin/sh /data/misc/wifi/forward_start.sh
    class post-zygote_services
    disabled
    oneshot

service mynet_stop /system/bin/logwrapper /system/bin/sh /data/misc/wifi/forward_stop.sh
    class post-zygote_services
    disabled
    oneshot


貌似hostapd_tiwlan0 就只直接做ap?


fw_tiwlan_ap_rfmd.binnvs_map.bin这两文件干啥的?
一个是固件?还有一个是啥?

chronicle 发表于 2011-7-11 16:58

请问捣鼓这么一大堆,你到底想干啥。。。。

yaksayahc 发表于 2011-7-11 17:10

nvs_map.bin是wl1271的校准参数

赤色彗星SE 发表于 2011-7-11 17:53


/system/bin/logwrapper /system/bin/wlan_loader -f /system/etc/wifi/fw_tiwlan_ap.bin -i /system/etc/wifi/tiwlan_ap.ini -e /pds/wifi/nvs_map.bin

照这样启动wiconfig还是直接死机

/system/bin/logwrapper /system/bin/Hostapd -d /data/misc/wifi/hostapd.conf
这个怎么启动?用start hostapd ?setprop start hostapd?

yaksayahc 发表于 2011-7-11 22:05

这系统..wifi的service居然是写死在init.rc的...不知道settings里的wifi disable/enable怎么实现的 - -
各家脚本和android各版本都不一样的,如果是ti自己的板子可以参考omappedia.org上面的实现,非ti的板子,就得看各家代码了

SUPERFIGHT 发表于 2011-7-11 22:48

具体要看方案商和WIFI的芯片组~= =~
不过机子如果有CM7支持的话~ 应该比较好弄吧~ 源码啥的都有~ 顶多WIFI的驱动是个编译好的~

赤色彗星SE 发表于 2011-7-12 09:14

wifi tethering  在里程碑2上根本没用...启动的时候连无线模块都没加载...

源代码没有啊,moto的找不到

这国行2.2的系统里面居然自带了Hostapd,估计是功能没开放而已- -

yaksayahc 发表于 2011-7-12 09:28

tethering 本来就是2.2才开放的.2.1的系统原生不支持.自己扩展才行
想要靠手动编辑init.rc或者insmod没用,得用一个app去在每次启动的时候做这个工作才可以,因为system.img是只读的.

河野貴明 发表于 2011-7-12 09:32

回 7楼(yaksayahc) 的帖子

如果只是system的话可以在init.rc里把mount ro去掉,这样就可读写了。

赤色彗星SE 发表于 2011-7-12 09:48

Re:回 7楼(yaksayahc) 的帖子

引用第7楼yaksayahc于2011-07-12 09:28发表的:
tethering 本来就是2.2才开放的.2.1的系统原生不支持.自己扩展才行
想要靠手动编辑init.rc或者insmod没用,得用一个app去在每次启动的时候做这个工作才可以,因为system.img是只读的. images/back.gif


我直接insmod然后执行那个服务的指令也不行啊...国行2.6是安卓2.2.2的,而且执行后用tethering里面的iwconfig直接死机....
看不到那个模块的源码,不知道insmod有什么参数。
终端直接insmod以后iwconfig看到的无线网卡的mode居然是bug,用外面app启动无线就能用iwconfig看见模式是Managed
妈的外面app到底是怎么启动无线的,难道copy设置的app出来看java代码么orz


引用第8楼河野貴明于2011-07-12 09:32发表的 回 7楼(yaksayahc) 的帖子 :
如果只是system的话可以在init.rc里把mount ro去掉,这样就可读写了。 images/back.gif

要写system直接remoun就行了,修改init.rc更麻烦,需要解system.img

河野貴明 发表于 2011-7-12 09:52

回 9楼(赤色彗星SEXY) 的帖子

为什么要解,难道文件不是已经写到NAND上的吗?莫非启动的时候没有mount mtdblock操作?

另外不动init.rc的话把启动文件放到init.d下也行,一般来说只是个顺序问题。

赤色彗星SE 发表于 2011-7-12 10:24

Re:回 9楼(赤色彗星SEXY) 的帖子

引用第10楼河野貴明于2011-07-12 09:52发表的 回 9楼(赤色彗星SEXY) 的帖子 :
为什么要解,难道文件不是已经写到NAND上的吗?莫非启动的时候没有mount mtdblock操作?

另外不动init.rc的话把启动文件放到init.d下也行,一般来说只是个顺序问题。 images/back.gif


你搞笑么?rootfs / rootfs ro,relatime 0 0,
init.rc在/下你改我看看?
还init.d呢...连puppy这种都没init.d了,更何况嵌入式的....

河野貴明 发表于 2011-7-12 10:29

回 11楼(赤色彗星SEXY) 的帖子

init.rc一般是在boot下,跟system没有关系。把ramdisk提取出来随便改。

当然我说的都是基于CM7的Android,其他的当我没说过。

赤色彗星SE 发表于 2011-7-12 10:37

我也搞错了,里程碑2不能刷第三方包,没解过android的刷机文件来看以为直接那system.img当根的


不过要写system随时随地remount的就是。

河野貴明 发表于 2011-7-12 10:41

回 13楼(赤色彗星SEXY) 的帖子

只能怪moto脑残,不能怪android

yaksayahc 发表于 2011-7-12 19:15

应该是驱动没整对。俺们这个项目也是一样的现象。

直接写system.img没用的,系统不会给你repack,而且不知道moto有没有做img校验,有的话必然同不过校验。
页: [1]
查看完整版本: android真脆皮,一个wlan_loader直接吧系统搞死机了