Android4.2 后解决挂载cifs文件系统后不显示

介绍

手机es管理器里的显示的文件是我电脑上 win7的共享文件夹.只要手机和电脑在同一局域网就能实现图中的效果. 
不仅能读取电脑的文件,所有的写操作也会保存回电脑的文件中.当然有了cifs模块 samba文件系统也是支持的 
有兴趣的请自行百度win7共享和cifs模块~

要求

  仅cm11和cm11s!且手机已root

使用方法

  1. 下载 ak_kernel_modify.zip (8.26 MB, 下载次数: 8) 
    这个内核是使用至昨晚为止(20150201)最新的akkernel代码编译的.有可能维护者正在调试什么功能..但是我用到现在没发现任何异常.使用 [一加万能工具包] 刷写boot内核刷入即可

  2. 挂载 
    两种方法: 
    一 推荐 
    示例 
    在adb shell 或者别的终端下:

<code class="language-shell hljs lasso has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal; background: transparent;">su
insmod /system/lib/modules/cifs<span class="hljs-built_in" style="color: rgb(102, 0, 102); box-sizing: border-box;">.</span>ko
/system/xbin/mount <span class="hljs-attribute" style="box-sizing: border-box;">-t</span> cifs <span class="hljs-attribute" style="box-sizing: border-box;">-o</span> username<span class="hljs-subst" style="color: rgb(0, 0, 0); box-sizing: border-box;">=</span>administrator,password<span class="hljs-subst" style="color: rgb(0, 0, 0); box-sizing: border-box;">=</span><span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"#password"</span> <span class="hljs-attribute" style="box-sizing: border-box;">-o</span> iocharset<span class="hljs-subst" style="color: rgb(0, 0, 0); box-sizing: border-box;">=</span>utf8 <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">//10.0.136.102/win_share /mnt/cifs/</span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li></ul>

几个注意

  • 一定要使用/system/xbin/mount 没有的请安装busybox
  • 挂载点 /mnt/cifs/是我创建的.可以是别的地方 但是一定注意不能是 /mnt/storage/以下的目录!或者.使用cifsmanager .自行百度.

原理

cifs模块玩手机多的应该都不陌生了.但是android4.2之后在有些手机上很蛋疼.具体表现是 例如你在adb shell上挂载了共享,但是在文件管理器上找不到!? 
这时候正义的xda大神就站出来了.link 
好像是说4.2后 android引入了个muti-user机智,但是xda大神不服认为这个机智可以只用在 /mnt/storage/目录下 ,于是给内核添加了一段代码.

我也就按照大神的指引把他的patch也打到自己正在用的这个ak内核,和改了下init.rc

提问

说起一加 kernel ,我编译了 这个kernel ,用 cyanogenmod_bacon_defconfig 这个配置. 烧进去后能用,但是时不时会死机..水平不够不会调试内核.. 
(:з」∠) 求高手教教

更新

内核补丁提交成功了 发不了链接.下一版的ak内核可以看到这个功能.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值