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內核可以看到這個功能.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章