[modules] cifs.ko, md4.ko, nls_utf8.ko, stock [4.2 / 4.2.2] 3.4.5-g4e6298b / gaf9c307

Search This thread

dafunk60

Senior Member
Jul 12, 2008
526
135
First place I checked :)

Does this have something to do with the RSA keys, etc. mentioned earlier or no?

I don't think so. I did nothing special to get it to work. Flashed AOKP PUB last night. Flashed Trinity Ten. Installed SManager ads, ran my scripts as root. Same deal with task650 AOKP 4.2.2.

What rom are you using?

Edit: I'm also using chainfires super su pro. Not sure if the pro version is necessary however.
 
Last edited:

H3g3m0n

Senior Member
Sep 15, 2009
60
16
Thanks for the help. I got everything set up, but ADB is providing me with a error: device offline message when running the script .. thoughts?

First place I checked :)

Does this have something to do with the RSA keys, etc. mentioned earlier or no?

The 'device offline' is caused by the RSA keys (or an old version of adb which shouldn't be an issue on the phones, but could be the case if you encounter it on a computer).

Make sure you are setting the HOME environment variable in your script, I updated the script previously but it's possible you missed the change. If it's done correctly it should popup a box asking you to authorize the key. By default the HOME is set to something like /data that isn't writeable by users.
 

darkuni

Senior Member
Sep 12, 2010
378
75
The 'device offline' is caused by the RSA keys (or an old version of adb which shouldn't be an issue on the phones, but could be the case if you encounter it on a computer).

Make sure you are setting the HOME environment variable in your script, I updated the script previously but it's possible you missed the change. If it's done correctly it should popup a box asking you to authorize the key.

Thanks again .. This just isn't working. I am writing off CIFS. I've wasted DOZENS of hours trying to shove a square peg into a round hole. I'm working instead on getting SMB support for the emus and tools I need to directly access network shares for.

Seems to be a better solution.
 

wakaru

Senior Member
Jan 2, 2009
50
20
Has anyone managed to get the CIFS modules for JB 4.2.2._3.4.5-gaf9c307, working in the latest official kernel?
If so I could do with a bit of help because I have not managed to do it.
Thanks :rolleyes:
 

cien12

Senior Member
Feb 17, 2009
103
19
Has anyone managed to get the CIFS modules for JB 4.2.2._3.4.5-gaf9c307, working in the latest official kernel?
If so I could do with a bit of help because I have not managed to do it.
Thanks :rolleyes:

I suggest to use the build in Modules with the trinity kernel. Only flash the trinty kernel and install Mount Manager and enjoy cifs mount.
You dont need any scrips.
 

Bragabondio

Member
Aug 6, 2010
14
2
mount manager

I suggest to use the build in Modules with the trinity kernel. Only flash the trinty kernel and install Mount Manager and enjoy cifs mount.
You dont need any scrips.

Tried with the latest AOKP + Trinity kernel + Mount manager but alas no luck. The script was also not working (i did everything to the letter except generating the RSA key) so at this stage I give up and will wait for s/g more mainstream.
 

cien12

Senior Member
Feb 17, 2009
103
19
Tried with the latest AOKP + Trinity kernel + Mount manager but alas no luck. The script was also not working (i did everything to the letter except generating the RSA key) so at this stage I give up and will wait for s/g more mainstream.

AOKP doesn`t work yet.
Use Sentinel, CM10.1 or Sabermod for example.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    I have managed to get CIFS working on stock Nexus 10.

    It's quite a bit more problematic on the Nexus 10 than normal.

    There are 2 main issues to deal with. Newer versions of the Linux kernel require a UNC variable to be passed to them and the current version of busybox doesn't do this. There is a patch out. I have extracted the patched busybox binary from craigacomez's AOSP Nexus 10 rom.
    (Check it out here: http://xdaforums.com/showthread.php?t=1998585 ). Otherwise it should work on the stock mount command if you specify the unc= mount option with the share.

    The other issue is the multiuser stuff. If you execute the mount command from inside Terminal Emulator (or a script program) it looks like it mounts ok and you can 'ls' in the directory but it doesn't work for Android apps, they just see an empty directory but if you do it via a 'adb shell' it works fine in Android apps. My theory is ADB is outside of the multiuser stuff. adb actually ships on the device.

    1) Unlock bootloader (fastboot oem unlock)
    2) Flash recovery adb flash recovery whatever.img
    3) Root device (flash CWM-SuperSU-0.98.zip)
    4) Install BusyBox (from the market)
    5) Copy md4.ko and cifs.ko to device. The files can go anywhere you like. In this example I will just use the root of the sdcard. Some people like them in /system/modules or /system/lib/modules
    6) busybox mount -o rw,remount /
    7) adb shell
    8) Override /system/bin/busybox with the patched version (maybe move it first so it's backed up).
    9) insmod /sdcard/md4.ko
    10) insmod /sdcard/cifs.ko
    11) busybox mount -t cifs -o username=MYUSER,password=MYPASS,unc=\\\\192.168.1.1\\storage //192.168.1.1/storage /data/media/0/cifs/Storage

    You will need to manually preform the last 3 commands each time you reboot the device from a adb shell.

    NOTE: You can probably get rid of the -o flags completely. In theory the patched version of busybox makes the UNC bit redundant. Possibly you can use the stock busybox with the UNC flag and avoid using the patched one totally. I have just included it to be sure.

    Make sure you type 'busybox mount' not 'mount', by default they are different binaries. Otherwise you can remove the /system/bin/mount command and make a new one linking /system/bin/mount to /system/bin/busybox.

    Possibly there is some way to get the mount working in the multiuser environment without requiring busybox. If you figure it out please tell ☺

    Some threads on the issue:
    http://xdaforums.com/showthread.php?p=34397868#post34397868
    http://xdaforums.com/showthread.php?t=733490&page=6
    http://www.mail-archive.com/busybox@busybox.net/msg17650.html

    The modules are for 3.4.5-g4e6298b.

    EDIT: I added nls_utf8.ko by request

    EDIT2: Since adb comes on the device, it is possible to use it to connect to local host:
    1) Install cifs modules to /system/lib/modules
    2) Install Script Manager from the play store
    3) Copy script to device
    4) Start SManager
    5) Find your script and open it.
    6) Tick the su box
    7) Hit save
    8) Goto home sccreen
    9) Add a 'SMShortcuts' widget to your home screen
    10) "Add one script shortcut"
    11) Choose your script
    12) Optionally use this pretty icon
    13) Give it a nice name like "Mount Shares"

    Here is a shell script...
    Code:
    #!/system/bin/sh
    
    # Your settings here
    USERNAME="USERNAME"
    PASSWORD="PASSWORD"
    IPADDRESS="192.168.1.1"
    SHARE="storage"
    MOUNT_POINT="/data/media/0/cifs/Storage"
    
    # If you need to change the mount command edit this
    MOUNT_CMD="\
    mount -t cifs                   \
                                    \
    -o                              \
    user=$USERNAME,\
    password=$PASSWORD,\
    unc=\\\\\\\\\\\\\\\\$IPADDRESS\\\\\\\\$SHARE      \
                                    \
    //$IPADDRESS/$SHARE             \
    $MOUNT_POINT"
    
    COMMANDS="\
    insmod /system/lib/modules/md4.ko;          \
    insmod /system/lib/modules/nls_utf8.ko;     \
    insmod /system/lib/modules/cifs.ko;         \
    $MOUNT_CMD
    "
    
    # Starting ADB...
    PORT=`getprop service.adb.tcp.port`
    setprop service.adb.tcp.port 5555
    adb kill-server
    adb start-server
    stop adbd
    start adbd
    adb connect localhost
    
    # Make sure we only use the first device (sometimes there is more than one)
    SERIAL=`adb devices | head -n2 | tail -n1 | cut -f1`
    if [ "$SERIAL" = "" ] ; then
        echo "ERROR: Could not find ADB device.";
    fi
    
    echo Mounting share via adb...
    adb -s $SERIAL shell su root -c "$COMMANDS"
    
    # If you started adb, then stop it here for security:
    adb disconnect localhost
    stop adbd
    setprop service.adb.tcp.port $PORT
    start adbd
    
    RESULT=`mount | grep $MOUNT_POINT`
    
    if [ "$RESULT" = "" ] ; then
        echo "Mounting failed..."
    else
        echo "Mounting sucess!"
    fi
    
    echo Done... You may close this script window.

    EDIT3: Added usbserial.ko, option.ko and usb_wwan.ko

    EDIT4: Some users have reported that the need to modify the script to get it working with their version of SU.

    EDIT5: I have uploaded modules for 4.2.2, kernel 3.4.5-gaf9c307 but I haven't actually tested them myself (still on 4.2.1). Apparently the adb loophole has also been patched but it is possible to reenable it by putting a RSA key onto the device. Check out this set of instructions here.

    EDIT6: I have updated to 4.2.2 on my Nexus 10 and can confirm the new modules work.

    You must setup the adbkey or you will get a "device: offline" message. By default adb when adb first runs it tries to create the keys in the $HOME dir which is /data/.android, but the data directory isn't accessible by the 'shell' user.

    I got it working simply by setting the HOME variable to /sdcard and restarting the adb server in the script then Android popped up a query (I have update the script above).

    IMPORTANT: The Android Media scanner recursively scans folders for media to add the the database so it shows up in programs like Google Music. On large shares this can be a long process and use heaps of battery life. To prevent this add a blank file with the name ".nomedia" to the root of your mount points (or each individual share if you aren't used 1 folder for all your mounts). This will stop music showing up in programs though.

    If you find that the device stops responding (the launcher might work but apps fail to load) or you get reboots (often after the previous bug) this is probably due to a bad wifi connection.
    2
    Got the adb script working

    For those having trouble with the adb script in POST #1 you may try this:

    Remove the word "root" from line: adb -s $SERIAL shell su root -c "$COMMANDS"
    I also changed the "mount" command by "busybox mount" (I didn't make the hardlink as recommended in some posts)

    That was driving me nuts. Everytime I executed the script I saw "SuperSU - Copyright [...] Chainfire" message until I removed the "root". Now it all works flawlessly. I guess this may be happening because of the superuser binary version I have installed.

    Merry Xmas.
    1
    Sorry for the noob ? ...

    What are the KO's do?
    What is the practical use of then.

    Sorry I did a little research on then but I could not find an answer in layman terms

    Thank you for allowing me to learn.;)

    Sent from my toroplus using xda premium

    http://en.wikipedia.org/wiki/Loadable_kernel_module
    1
    Quick question all - (sorry an Android Noob here who's spent way too many hours reading through XDA since the Nexus 10 Purchase! :)

    Mounting CIFs shares in this manner are you then seeing transfer speeds that the nexus 10 is capable of over Wifi? I've been trying to get the 80-90mbps through CIFs shares that I get from Iperf tests but all File Explorers only give me 20mbps which obviously isn't great for HD Video.

    Just wanted to throw it out there to see what kind of bandwidth people are getting using this solution. Cheers!

    The kernel module cifs is much faster!
    1
    Remove the word "root" from line: adb -s $SERIAL shell su root -c "$COMMANDS"
    I also changed the "mount" command by "busybox mount" (I didn't make the hardlink as recommended in some posts)

    That was driving me nuts. Everytime I executed the script I saw "SuperSU - Copyright [...] Chainfire" message until I removed the "root". Now it all works flawlessly. I guess this may be happening because of the superuser binary version I have installed.

    Merry Xmas.

    I spent HOURS messing with this.. Finally!! his worked for me.Thanks.
    I still have other issues.. but this got me closer to something that resembles working.