找回密码
 立即注册
搜索
查看: 4918|回复: 15

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

[复制链接]
     
发表于 2011-7-11 16:26 | 显示全部楼层 |阅读模式
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.bin  nvs_map.bin这两文件干啥的?
一个是固件?还有一个是啥?
回复

使用道具 举报

     
发表于 2011-7-11 16:58 | 显示全部楼层
请问捣鼓这么一大堆,你到底想干啥。。。。
回复

使用道具 举报

发表于 2011-7-11 17:10 | 显示全部楼层
nvs_map.bin是wl1271的校准参数
回复

使用道具 举报

     
 楼主| 发表于 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?
回复

使用道具 举报

发表于 2011-7-11 22:05 | 显示全部楼层
这系统..wifi的service居然是写死在init.rc的...不知道settings里的wifi disable/enable怎么实现的 - -
各家脚本和android各版本都不一样的,如果是ti自己的板子可以参考omappedia.org上面的实现,非ti的板子,就得看各家代码了
回复

使用道具 举报

发表于 2011-7-11 22:48 | 显示全部楼层
具体要看方案商和WIFI的芯片组~  = =~
不过机子如果有CM7支持的话~ 应该比较好弄吧~ 源码啥的都有~ 顶多WIFI的驱动是个编译好的~
回复

使用道具 举报

     
 楼主| 发表于 2011-7-12 09:14 | 显示全部楼层
wifi tethering  在里程碑2上根本没用...启动的时候连无线模块都没加载...

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

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

使用道具 举报

发表于 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去掉,这样就可读写了。
回复

使用道具 举报

     
 楼主| 发表于 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是只读的.

我直接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去掉,这样就可读写了。
要写system直接remoun就行了,修改init.rc更麻烦,需要解system.img
回复

使用道具 举报

发表于 2011-7-12 09:52 | 显示全部楼层

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

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

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

使用道具 举报

     
 楼主| 发表于 2011-7-12 10:24 | 显示全部楼层

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

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

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

你搞笑么?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,其他的当我没说过。
回复

使用道具 举报

     
 楼主| 发表于 2011-7-12 10:37 | 显示全部楼层
我也搞错了,里程碑2不能刷第三方包,没解过android的刷机文件来看以为直接那system.img当根的


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

使用道具 举报

发表于 2011-7-12 10:41 | 显示全部楼层

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

只能怪moto脑残,不能怪android
回复

使用道具 举报

发表于 2011-7-12 19:15 | 显示全部楼层
应该是驱动没整对。俺们这个项目也是一样的现象。

直接写system.img没用的,系统不会给你repack,而且不知道moto有没有做img校验,有的话必然同不过校验。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|上海互联网违法和不良信息举报中心|网上有害信息举报专区|962110 反电信诈骗|举报电话 021-62035905|Stage1st ( 沪ICP备13020230号-1|沪公网安备 31010702007642号 )

GMT+8, 2025-9-16 05:36 , Processed in 0.144979 second(s), 7 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表