I upgraded to 4.3 from 4.2 and found I'd been SCROOGLED again. If any Google android developers happen upon this thread, I would really love an explanation as to exactly why we aren't allowed to use CIFS (and other external filesystems for that matter) out of the box. It doesn't really make much sense...unless you're trying to force us into using your stupid cloud services and to purchase media we already own from the Play store. You really wouldn't be trying to do that now would you? Anyhow, I had CIFS mounting working great under 4.2 by using a local connection to ADB and scripts to replace /system/bin/mount and umount. But, after going to 4.3 I found that not only did those googley bastards remove loadable module support from the kernel, but they also "jailed" ADB in their stupid namespaces. What that means is that it is now absolutely impossible to get CIFS working using the stock kernel and ADB. Thanks a lot Google! A thousand curses upon you and your progeny!
So, to get around this mess I've compiled the latest grouper AOSP kernel using the default config and added loadable module support. I've also compiled the CIFS, md4, nls_utf8, and configs (they removed the /proc/config.gz in 4.3. Why?) modules. Then, I built sshd, ssh, and ssh-keygen from the Android source. The paths were all messed up for the ssh client with the default configuration, so I changed them. It's set so sshd stores it's configuration and keys in /data/ssh, and the client uses /data/.ssh. I ran into some weird issues with the libcutils.so library which sshd is linked to. It doesn't come with Android by default and it seems if I install it to /system/lib it breaks everything and the tablet won't even boot. So, I just statically linked it to sshd. I also altered the /init.rc script to start the ssh daemon and created mount and umount scripts which simply ssh to localhost and run the mount/umount commands through busybox with whatever arguments they're given. The scripts replace the /system/bin links and the mount script creates /cifsmnt/0-9. You can change this if you need more mount points by editing the mount script. Since sshd is started by init outside of dalvik and ADB we don't have to worry about the stupid private namespaces. I'm now able to mount my CIFS shares again and actually use them from all applications. Instructions are below.
DISCLAIMER: This worked for me, but I'm making no guarantees. If you have weird issues, lose data, brick your tablet, whatever; I take no responsibility for it.
1. Download one of the two update .zip attachments below. One contains the kernel and modules I've built. The other just has the altered /init.rc, ssh binaries, libssh.so, and mount scripts. If you would like to use a different kernel than the one I've compiled, use that one. I haven't tested it, but it should work as long as the kernel has CIFS/md4/nls_utf8 modules/built-in. Just save the .zip to your tablet and install it from recovery.
2. When your device boots back up, start a shell and run:
Code:
su
ssh localhost
It will ask if you want to continue connecting. Enter yes. It will fail to connect, but that's OK.
3. From the same shell run:
Code:
ssh-keygen
This will create the public/private RSA keys.
4. From the same shell run:
Code:
cat /data/.ssh/id_rsa.pub >> /data/ssh/authorized_keys
This will allow the user root to open a local ssh session without a password (they aren't even supported under Android anyhow)
If you use Cifsmanager and are using my kernel (other kernels may not need to load modules or the modules may be kept in a different path):
5. In CifsManager's settings, check "Load cifs module" and "Load via insmod". Then set "Path to cifs.ko[:<modpath>]*" to:
Code:
/sdcard/modules/cifs.ko:/sdcard/modules/md4.ko:/sdcard/modules/nls_utf8.ko
6. Create your share in CifsManager and under options put:
Code:
rw,file_mode=0777,dir_mode=0777,uid=1015,gid=1015
(and any others you may need) . For the mount point, use one of the the mount points created under /cifsmnt (0-9).
Hey, sorry for the necrobump, but would the no_kernel zip work for the 2013 nexus 7 LTE?
Also, when I try running "ssh" in a terminal emulator, it says that the command wasnt found. Sorry if I sound oblivious, Im kinda a noob at these things
suffer1989 said:
Hey, sorry for the necrobump, but would the no_kernel zip work for the 2013 nexus 7 LTE?
Also, when I try running "ssh" in a terminal emulator, it says that the command wasnt found. Sorry if I sound oblivious, Im kinda a noob at these things
Click to expand...
Click to collapse
It may. I don't have one, so I can't be sure. You'll still need to get a kernel with CIFS support/modules though. You'll also need to compare the init.rc in my zip with yours and see if there's anything in yours that will need to be added to the one in the zip. If you post your init.rc I can take a look at it. Also, it's saying command not found for ssh because ssh doesn't come with android, it's part of the zip.
jmtw000 said:
It may. I don't have one, so I can't be sure. You'll still need to get a kernel with CIFS support/modules though. You'll also need to compare the init.rc in my zip with yours and see if there's anything in yours that will need to be added to the one in the zip. If you post your init.rc I can take a look at it. Also, it's saying command not found for ssh because ssh doesn't come with android, it's part of the zip.
Click to expand...
Click to collapse
I realized that I need a kernel with CIFS support so I downloaded and flashed this one:
http://forum.xda-developers.com/showthread.php?t=2389022
from
http://www.androidfilehost.com/?fid=23212708291674219
Do I still need to flash your zips since I flashed a kernel that supports CIFS?
CIFS support is the one thing holding me back from really fully utilizing my nexus 7 :-/.
suffer1989 said:
I realized that I need a kernel with CIFS support so I downloaded and flashed this one:
http://forum.xda-developers.com/showthread.php?t=2389022
from
http://www.androidfilehost.com/?fid=23212708291674219
Do I still need to flash your zips since I flashed a kernel that supports CIFS?
CIFS support is the one thing holding me back from really fully utilizing my nexus 7 :-/.
Click to expand...
Click to collapse
You will still need to use my zip that does not contain the kernel. It has the other stuff (ssh, sshd, mount script, init.rc) that allows CIFS mounts to work. But like I said, you need to make sure that there isn't anything in your init.rc which isn't in the one in my zip, as it will replace yours so that sshd will start.
jmtw000 said:
You will still need to use my zip that does not contain the kernel. It has the other stuff (ssh, sshd, mount script, init.rc) that allows CIFS mounts to work. But like I said, you need to make sure that there isn't anything in your init.rc which isn't in the one in my zip, as it will replace yours so that sshd will start.
Click to expand...
Click to collapse
Thanks, ill look through your Zip file, as well as the rom I am using to compare and contrast and see if it is safe to put into my 2013 preKK nexus 7.
I played a little bit with it, but get stuck at some time with just getting "Invalid argument" when trying to mount.
I have 4.4.2 with franco kernel (r12).
I looked into your "nokernel" zip and was surprised that you have a boot.img that for my understanding includes the ramdisk and a kernel.
So I unpacked the franco kernel img using http://forum.xda-developers.com/showpost.php?p=35181780.
I changed the init.rc file in the ramdisk image and removed the "disabled" on the service sshd statement.
Somehow it still does not start sshd on boot using the repacked boot.img
Another issue I had was the updater script. It did not mount the correct partitions for me.
I modified it:
Code:
ui_print("Installing CIFS Mount Support");
ui_print("Mounting /system");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
delete("/system/bin/mount");
delete("/system/bin/umount");
package_extract_dir("system", "/system");
set_perm(0, 0, 0755, "/system/bin/mount");
set_perm(0, 0, 0755, "/system/bin/umount");
set_perm(0, 0, 0755, "/system/bin/sshd");
set_perm(0, 0, 0755, "/system/bin/ssh");
set_perm(0, 0, 0755, "/system/bin/start-ssh");
set_perm(0, 0, 0755, "/system/bin/ssh-keygen");
unmount("/system");
ui_print("Mounting /data");
mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/userdata", "/data");
package_extract_dir("data", "/data");
unmount("/data");
ui_print("Write boot.img");
package_extract_file("boot.img", "/dev/block/platform/sdhci-tegra.3/by-name/boot");
The next issue was with the mount script. The remount rw of / did not work in the script and leave the system without the mount folders.
So I created them myself with:
Code:
busybox mount -o remount,rw /
mkdir /mnt/cifs
chmod 755 /mnt/cifs
mkdir /mnt/vids
chmod 755 /mnt/vids
busybox mount -o remount,ro /
Now that sshd didn't start I started it myself, what could be the problem when I trying to mount the cifs later.
sshd showed me that he had to create the keys in /data/ssh. Could it be the problem with init.rc trying to start sshd without the keyfiles there?
I was able to "ssh localhost". I tried manually mounting inside the ssh session and always got "Invalid argument".
For example with this command:
Code:
busybox mount -t cifs -o username=user,password=password 192.168.0.1/share /mnt/cifs/vids
Any suggestions?
Could there be a way without having to edit the ramdisk or is this the necessary way to have sshd in the right name space?
The solutions posted for the same issues with 4.2 http://forum.xda-developers.com/showthread.php?t=2106480 would not work on 4.4?
Related
Hey guys
Need your help here.
Have been desperately searching the forums/net for a cifs.ko for the galaxy tab but i do not think one exists.
Have decided to see if i can build one on my own (this will likely crash & burn)
Anyway, i've installed ubuntu in a VM
and pulled the following down
-GT-P1000 source code (from http://opensource.samsung.com)
-toolchains (wget http://www.codesourcery.com/public/...-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2)
unpacked the source
unpacked toolchains into /opt/toolchains
ran ./build_kernel.sh <--no errors
cd into source directory
-apt-get install ncurses-dev
make oldconfig
make menuconfig
set M for cifs (under fs -> networking)
exited
make prepare
make M=fs/cifs
and the cifs.ko was created!
upon copying into my tab and trying an insmod cifs.ko
I saw the following in my dmesg
cifs: Unknown symbol slow_work_register_use
cifs: Unknown symbol slow_work_enqueue
I'm guessing i need to make a slow-work.ko or hack the source of the cifs and remove all references of slow-work.
Anyone can advice how for either or better yet, make a cifs.ko for us
Thanks!
Hiya,
If you ever get it working, please do share... I know a fair number of people who have the Galaxy Tab including myself who are just waiting for someone bright enough to get samba mounting available so they can play their media files without having to copy directly to the device.
Kinda like the Holy Grail this is... Especially as iPad users are able to stream avi's using Buzz Player HD which is a media player with a built in method of connecting to smb shares from the app. I hate being one-upped by my iPad weilding wife!! Heh.
Cheers.
bullyfrog said:
Anyone can advice how for either or better yet, make a cifs.ko for us
Thanks!
Click to expand...
Click to collapse
There are several reasons why you may have missing symbols. One is that the original kernel was compiled with different driver options, so certain symbols are missing when compared to the new kernel/module you compiled. The easy fix is to install the new kernel too.
It could also be that the kernel versions are different, and the source you have is older or newer than the original.
If I have time later I plan on giving it a go myself, compile and install a complete kernel.
From another discussion thread on this forum:
-------
You'll need to change kernel/slow-work.c to be compiled as a module which is not very hard:
move kernel/slow-work.c in fs/slow-work/slow-work.c
remove "config SLOW_WORK" from init/Kconfig
create fs/slow-work/Kconfig with config SLOW_WORK as tristate and add it to fs/Kconfig (source fs/slow_work/Kconfig)
create fs/slow-work/Makefile with obj-$(CONFIG_SLOW_WORK) += slow-work.o and add it to fs/Makefile: obj-$(CONFIG_SLOW_WORK) += slow-work/
-------
Then, some useful commands:
adb shell
su
insmod slow-work.ko
insmod cifs.ko
lsmod | grep cifs
dmesg
mount -o username=guest -t cifs //IP/SHARE /mnt/cifs
(or CifsManager)
...also add "iocharset=utf8" in CifsManager's options field (non-latin characters support).
I too need to get started with compiling the Tab's sources...when I have time !
Ok, I compiled cifs.ko and slow_work.ko modules using the SCH-I800 kernel source (which is the Verizon Galaxy Tab model) so I'm not sure they'll work on other tabs, but I figured I'd post them here.
I haven't done much testing yet, but I ran:
busybox insmod slow_work.ko
busybox insmod cifs.ko
mkdir /mnt/cifs
busybox mount -o username=guest //myserver/share /mnt/cifs
It mounted successfully, and I was able to watch a video directly off the mount. It was a little choppy though, I'm not sure if the default video player has any buffering options or if there's one in the market that does.
As far as how I got it to compile, it was very much a hack based on info here. The rough method was:
Built cifs.ko from the steps listed in the first post, with the exception of using the SCH-I800 source instead.
After that:
mkdir fs/slow-work
cp kernel/slow-work.* fs/slow-work/.
added fs/slow-work/Kconfig with the config section copied from init/Kconfig, but with bool changed to 'tristate' and default changed to m.
edited fs/Kconfig and added 'source "fs/slow-work/Kconfig"'
Added fs/slow-work/Makefile containing: "obj-m += slow-work.o"
Added the line "obj-m += slow-work/" to the end of fs/Makefile
I also had to edit fs/slow-work/slow-work.c and removed the round_jiffies calls, they were coming up as unresolved symbols and it's a function in timer.c, wasn't sure if there was a way to pull that into a module.
make M=fs/slow-work
I'll post more as I play around with it, just wanted to get the modules up for people to play with. I should also probably look into using my busybox utilities as the default so I don't have to keep calling busybox to use the correct ones.
-Dan
CIFS on Sprint device
I'm using the updated Sprint GTab and your precompiled CIFS modules worked very well. It's just now CIFS Manager seems to keep telling me that the mount string isn't valid. I mounted with the mount command from the terminal (wow, this is tedious without a BT keyboard. Need a terminal with editable strings.) and it worked just great.
JK
Well done ! This works on my JK1-flashed Galaxy Tab.
Note: I use WifiKeyboard as my input method on the tablet, to ease typing in the Terminal Emulator (or ConnectBot). It works marvelously well !
The "insmod" commands worked perfectly (thanks again for compiling...personally I was stuck at the "libc" ELF headers in my toolchain Mac OS X setup...I will soon install a Linux virtual machine so I can use the default toolchain, which contains all the required "libc" stuff...I regularly compile RockBox on my Mac so I wonder what's wrong with this particular toolchain).
I switched on Samba/SMB/CIFS sharing on my Mac OS X laptop, via the "Sharing" panel in System Preferences.
Once in "su" shell mode, I pre-created the mount point: "mkdir /mnt/cifs". I then experimented various commands, including:
- EDIT - DroidWall configured with a whitelist *prevents* the "mount" command from connecting to the Samba share, despite allowing Terminal Emulator and ConnectBot to connect via wifi...as a result I have to disable DroidWall entirely, which sub-optimal Allowing all "root" applications to access wifi in DroidWall doesn't solve the problem: it makes a difference with commands like "ping" but the SMB mount fails to connect over the network...for some reason.
busybox mount -r -t cifs -o "username=MY_USERNAME,password=MY_PASS" //MY_IP/MY_SHARED_FOLDER /mnt/cifs
busybox mount | grep cifs
ls /mnt/cifs
umount /mnt/cifs
busybox mount -r -t cifs -o "username=guest" //MY_IP/MY_SHARED_FOLDER /mnt/cifs
Note that I chose to secure the mounted directory in read-only mode, but of course we could use "-w" instead, providing the file server accepts authenticated or anonymous connections with write credentials.
I still need to test transfer speeds...as this is often the problem with high-quality video. At any rate, I recommend using VLC Player on the server (e.g. laptop containing video/audio assets), and VLC Stream and Connect on the Android device: the live transcoding works really well !
CIFSManager
I'm a bit of a noob, actually. I put a double-slash in cifsmanager in front of the name, like you were doing in mount. It's just machine/share and not //machine/share. Makes all the difference, really.
Now I just wish there were a few more video codecs to be had.
JK
jknisley said:
Now I just wish there were a few more video codecs to be had.
Click to expand...
Click to collapse
RockPlayer ?
Wow. That's a fantastic player. And sorry to be off topic. Glad CIFS is working for us.
Cool, now all we need is a step by step guide for doing this for noob users like me who have no idea what Busybox is or where to save the cifs and slow work files etc... Hmm... Anyone fell nice and would like to help a guy out?
Cheers
overridex said:
Ok, I compiled cifs.ko and slow_work.ko modules using the SCH-I800 kernel source (which is the Verizon Galaxy Tab model) so I'm not sure they'll work on other tabs, but I figured I'd post them here.
I haven't done much testing yet, but I ran:
busybox insmod slow_work.ko
busybox insmod cifs.ko
mkdir /mnt/cifs
busybox mount -o username=guest //myserver/share /mnt/cifs
It mounted successfully, and I was able to watch a video directly off the mount. It was a little choppy though, I'm not sure if the default video player has any buffering options or if there's one in the market that does.
As far as how I got it to compile, it was very much a hack based on info here. The rough method was:
Built cifs.ko from the steps listed in the first post, with the exception of using the SCH-I800 source instead.
After that:
mkdir fs/slow-work
cp kernel/slow-work.* fs/slow-work/.
added fs/slow-work/Kconfig with the config section copied from init/Kconfig, but with bool changed to 'tristate' and default changed to m.
edited fs/Kconfig and added 'source "fs/slow-work/Kconfig"'
Added fs/slow-work/Makefile containing: "obj-m += slow-work.o"
Added the line "obj-m += slow-work/" to the end of fs/Makefile
I also had to edit fs/slow-work/slow-work.c and removed the round_jiffies calls, they were coming up as unresolved symbols and it's a function in timer.c, wasn't sure if there was a way to pull that into a module.
make M=fs/slow-work
I'll post more as I play around with it, just wanted to get the modules up for people to play with. I should also probably look into using my busybox utilities as the default so I don't have to keep calling busybox to use the correct ones.
-Dan
Click to expand...
Click to collapse
How did you manage to remount the filesystem r/w? I can't mkdir /mnt/cifs because fs is read only.
alias_neo said:
How did you manage to remount the filesystem r/w? I can't mkdir /mnt/cifs because fs is read only.
Click to expand...
Click to collapse
Are you in "su" mode ? (type "su" in the shell before typing any other commands)
daniel.weck said:
Are you in "su" mode ? (type "su" in the shell before typing any other commands)
Click to expand...
Click to collapse
Yes I am. I su'd, Superuser popped up and asked to grant permissions, did so, this then allowed me to insmod the modules (only root can do so) but won't let me mkdir.
overridex said:
Ok, I compiled cifs.ko and slow_work.ko modules using the SCH-I800 kernel source (which is the Verizon Galaxy Tab model) so I'm not sure they'll work on other tabs, but I figured I'd post them here.
I haven't done much testing yet, but I ran:
busybox insmod slow_work.ko
busybox insmod cifs.ko
mkdir /mnt/cifs
busybox mount -o username=guest //myserver/share /mnt/cifs
It mounted successfully, and I was able to watch a video directly off the mount. It was a little choppy though, I'm not sure if the default video player has any buffering options or if there's one in the market that does.
As far as how I got it to compile, it was very much a hack based on info here. The rough method was:
Built cifs.ko from the steps listed in the first post, with the exception of using the SCH-I800 source instead.
After that:
mkdir fs/slow-work
cp kernel/slow-work.* fs/slow-work/.
added fs/slow-work/Kconfig with the config section copied from init/Kconfig, but with bool changed to 'tristate' and default changed to m.
edited fs/Kconfig and added 'source "fs/slow-work/Kconfig"'
Added fs/slow-work/Makefile containing: "obj-m += slow-work.o"
Added the line "obj-m += slow-work/" to the end of fs/Makefile
I also had to edit fs/slow-work/slow-work.c and removed the round_jiffies calls, they were coming up as unresolved symbols and it's a function in timer.c, wasn't sure if there was a way to pull that into a module.
make M=fs/slow-work
I'll post more as I play around with it, just wanted to get the modules up for people to play with. I should also probably look into using my busybox utilities as the default so I don't have to keep calling busybox to use the correct ones.
-Dan
Click to expand...
Click to collapse
Mate, you rock! I too ran into problems with the round jiffies and put this side project on hold. Your modules work and thats what matters. Thank you
Sent from my GT-P1000
Hi there,
Where do I save the cifs.ko and slow-work.ko files? Anyone help please?
Cheers.
I’m a really beginner user and have a question to the install of cifs.ko .
I like to mount on my Samsung Galaxy Tab an SMB network share. The Tab is rooted.
1)Copy the cifs.ko on my Tab
2)Install busybox from the market on my Tab
3)Run Busybox
4)Write in Busybox
“busybox insmod cifs.ko
mkdir /mnt/cifs”
5)To mount I like to use the Cifs Manager
These 5 steps are correct or I have some errors in it? Where on the Tab I have to copy the file “cifs.ko”? Can I write in Busybox with the virtual keyboard?
Thanks for your help.
Stefan
For those of you struggling with commands, an easy way is to just copy the two files to your sdcard. You can put them to /sdcard/Android if you like. Issue the following commands in your terminal app
$su -
#cd /sdcard/Android
#insmod slow-work.ko
You should see no errors
Next pull down CifsManager from the market.
Using CifsManager, specify where the cifs.ko is located. The gui is pretty intuitive. If all goes well, you should be able to watch your shared videos off your tab
Sent from my GT-P1000
Well spank me sideways that worked a treat for a noob user like me Thanks a lot to everyone who as made this wonderful "feature" a reality.
bullyfrog said:
For those of you struggling with commands, an easy way is to just copy the two files to your sdcard. You can put them to /sdcard/Android if you like. Issue the following commands in your terminal app
$su -
#cd /sdcard/Android
#insmod slow-work.ko
You should see no errors
Next pull down CifsManager from the market.
Using CifsManager, specify where the cifs.ko is located. The gui is pretty intuitive. If all goes well, you should be able to watch your shared videos off your tab
Sent from my GT-P1000
Click to expand...
Click to collapse
Thanks a lot.That worked perfectly for me.But, for us, noobs would add 2 points that I had problems with
1."the two files" mentioned above could be found here :
http://forum.xda-developers.com/showpost.php?p=9275507&postcount=5
2. For not latin characters in filenames needed to to the following (from http://forum.xda-developers.com/showpost.php?p=9271775&postcount=4): ...also add "iocharset=utf8" in CifsManager's mount options field (non-latin characters support).
After that, everething worked perfect. Do I need to remount it each time after reboot?
SD Tweakz v2
Only works on custom ROMs with init.d(aka busybox runparts) support
UPDATED 04/11/11(added a few battery tweaks)
Wondering around on XDA will sometimes lead you to threads with scripts/tweaks that may or may not help you improve your android device in one way or another. Now most of these scripts/tweaks are not boot resistant. Meaning, after rebooting the tweaks gets disabled and you need to enter/execute them once again.
Well here's another script that would help you initialize those scrips/tweaks every time you restart/reboot you phone and make your life a lot more easier.
Instructions / How does it work?
1. Download the initial script here (SD Tweakz v2)
2. Flash via recovery This will install/copy the initial script into a portion of your android system which initializes/runs every time the phone boots
3. Create a folder on SD called "scriptz" (/sdcard/scriptz)
4. Place your tweaks/scripts inside "scriptz" folder. Usefull scripts/tweaks with explanation below
5. Reboot and see your script run on boot time By this point, every time you boot, the initial script will check your sdcard(/sdcard/sctiptz) if any scripts/tweaks are present. Once found it will then run the scripts for you each and every time you boot
What is it good for
Well there are lots of tweaks out there just waiting to be discovered. Some can yield great performance and some can provide you with a better battery management that can extend your battery life for hours. Unfortunately, some tweaks can only give you one of the benefits above and a bad performance on the other. Meaning you just can't have 'em all. Here you can choose which tweaks/scripts to apply, modify the values as you want as well as debugging which script provides the benefits that you expect. Another reason for using this mod is compatibility as some tweaks/scripts can be ROM dependent. Most of the time it's a kernel issue but some libraries can get involved too.
The Scripts
Scripts are just plain linux compliant text document which has certain linux commands that can be issued using adb/terminal.
You can make one yourself using some android text editors(from es file explorer, dropbox, root explorer etc.). Don't forget to add a ".sh" file extension.
Here's a few example of the scripts I use:
Code:
#These scripts are from various sources from different sites including [URL="http://forum.samdroid.net/"]Samdroid.net[/URL]
#And of course in collaboration with FranciscoFranco
#
#My approach in the scripts/tweaks that I use is basically just to
#squeeze more juice out of my phone. So in contrast to the tweaks
#included in FranciscoFranco's thread, the tweaks/scripts I use are less
#aggressive in terms of performance and more inclined to save battery.
#
#non-rotational.sh
#this script tells android that you are not using spinning disks
DM=`ls -d /sys/block/dm*`;
MTD=`ls -d /sys/block/mtd*`;
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
for j in $DM $MTD $LOOP $RAM;
do
echo 0 > $j/queue/rotational;
done
#noatime.sh
#Remount all partitions with noatime, for more info visit [URL="http://forum.xda-developers.com/showpost.php?p=8708125&postcount=1"]http://forum.xda-developers.com/showpost.php?p=8708125&postcount=1[/URL]
for k in $(busybox mount | grep relatime | cut -d " " -f3)
do
sync
busybox mount -o remount,noatime $k
done
#scheduler.sh
#Changes the scheduler used by the system, for more info visit [URL="http://forum.xda-developers.com/showpost.php?p=4806456&postcount=1"]http://forum.xda-developers.com/showpost.php?p=4806456&postcount=1[/URL]
for i in `busybox ls -1 /sys/block/mtdblock*`
do
echo "noop" > $i/queue/scheduler;
done
echo "noop" > /sys/block/mmcblk0/queue/scheduler;
echo "noop" > /sys/block/dm-0/queue/scheduler;
echo "noop" > /sys/block/dm-1/queue/scheduler;
#setprop.sh (currently testing)
#various build.prop settings
setprop wifi.supplicant_scan_interval 600
These are few of the tweaks that I have tested(and using right now), I will update it every time I test something out and will eventually add some of FranciscoFranco's tweaks for you to try out.
You can get some useful scripts from here - Performance and battery tweaks - by Franciscofranco (just read along)
Note: These scripts are no different from the scripts in FranciscoFranco's thread, I just categorized each individual tweaks and separated them for you to be able to apply each one separately. I will be more inclined to describe only battery saving tweaks as I am only interested with tweaks that could extend battery life(this includes performance tweaks that doesn't seem to affect the battery behavior at all)
Here's the my initial script again: SD Tweakz v2
Here's the downloadable version of each tweak mentioned above:
non-rotational.sh
scheduler.sh
noatime.sh
setprop.sh
If anything bad happens, just flash this Undo.zip(unsigned so just toggle signature verification) and everything should be back as it was before.
Huge thanks to NervGaz for providing a solution to the mount point conflict issue and of course Franciscofranco for those lively discussions and ideas we exchange.
Awesome job, I already linked this on my first page
@Ungaze
what is the difference from Tweakz V2?
bluviper said:
@Ungaze
what is the difference from Tweakz V2?
Click to expand...
Click to collapse
almost everything. Flashing this script alone won't do anything. You need to get your tweaks from here first and save it to /sdcard/tweakz folder. reboot and this way it will do exactly what Tweakz V2 did. Now if you notice any lag or performance drop, apply each tweak/script one by one to debug/troubleshoot which one is causing it.
Additionally if you found anything useful, you can make your own script.sh and place it on the /tweakz folder to run it on every boot.
ungaze said:
almost everything. Flashing this script alone won't do anything. You need to get your tweaks from here first and save it to /sdcard/tweakz folder. reboot and this way it will do exactly what Tweakz V2 did. Now if you notice any lag or performance drop, apply each tweak/script one by one to debug/troubleshoot which one is causing it.
Additionally if you found anything useful, you can make your own script.sh and place it on the /tweakz folder to run it on every boot.
Click to expand...
Click to collapse
Yes please, keep posting feedback either here or the other thread. Anything is useful since some users say they suffer some ocasional lag, others don't notice improvements, others say their phone became super fast...
ok now i get it... so the first batch of scripts on zip cannot be run on boot...
thats why you created this...
..ok i have finally applied everything! hehehe since i love smorgasbords...
and its very hard to tell that its there.... hehehe.. seems like fine to me.
no hiccups whatsoever..
but i feel its OK... thanks again man..
ok now i get it... so the first batch of scripts on zip cannot be run on boot...
thats why you created this...
Click to expand...
Click to collapse
the first batch of scripts had to be manually moved to init.d and had to be in a specific filename with a specific header and containing all the tweaks altogether in order to run on boot.
now what I did with the update.zips(Tweakz V1, Tweakz V2) was make moving it to init.d, renaming and fixing the header all easier for you guys but it still contain all the tweaks with no option for you guys to modify/add/remove lines that you want. This time it already runs on boot.
with this tweak, everything is easily manipulated through the sd card and a simple file explorer for more flexibility and easy troubleshooting. This should also work on most phones with init.d support.
Yes please, keep posting feedback either here or the other thread.
Click to expand...
Click to collapse
And to make things neater, just post stuff regarding only this script here and everything about tweaks on the other thread mentioned above.
You don't really need to move the scripts to the data partition, just invoke the with sh, ie. "sh /sdcard/scriptz/script.sh" it would make your for loop something like this:
for script in $list
do
sh /sdcard/scriptz/$script
done
Also I'd be careful with mounting SD ahead of vold, atleast on /sdcard or /mnt/sdcard make a tempfolder somewhere as a mount point instead and you shouldn't to worry about vold throwing up on you... Just a thought.
You don't really need to move the scripts to the data partition, just invoke the with sh, ie. "sh /sdcard/scriptz/script.sh" it would make your for loop something like this:
Click to expand...
Click to collapse
didn't work last time i tried running the scripts directly from sdcard but will try it with your script.
Also I'd be careful with mounting SD ahead of vold, atleast on /sdcard or /mnt/sdcard make a tempfolder somewhere as a mount point instead and you shouldn't to worry about vold throwing up on you... Just a thought.
Click to expand...
Click to collapse
I don't really have a choice right now but to use the same method as "VOID rom" is using when loading modules. Any ideas?
BTW thanks so much
A quick and simple solution would be to just add something along the lines of
mount -o rw,remount auto /
mkdir /tmp
<mount the sdcard>
<run the scripts>
<unmount the sdcard>
rmdir /tmp
mount -o ro,remount auto /
Not the cleanest solution of all time, but it should work and no risk of conflicting mount points. Another solution is to just have people install the scripts on the /data partition in a directory there as /data is mounted rw.
Sent from my LG-P500 using Tapatalk
NervGaz said:
A quick and simple solution would be to just add something along the lines of
mount -o rw,remount auto /
mkdir /tmp
<mount the sdcard>
<run the scripts>
<unmount the sdcard>
rmdir /tmp
mount -o ro,remount auto /
Not the cleanest solution of all time, but it should work and no risk of conflicting mount points. Another solution is to just have people install the scripts on the /data partition in a directory there as /data is mounted rw.
Sent from my LG-P500 using Tapatalk
Click to expand...
Click to collapse
I was worried about the mount point traffic as well, but I guess I will be implementing the second solution instead, with a very different approach, and a more complex script.
You seem to know your trade, too bad we didn't get to collaborate before I made this script(from scratch, with no knowledge at all with scripting and how they work). Was asking and trolling on different threads with no help at all. Good thing mr. google was always there for anyone who needs help .
I'll start working and hope to hear from you about my next release as well.
You might want to look at the userinit script in the CM based ROM's around if you're going down that route, it does what you want and there's no point reinventing the wheel if you know what I mean.
Sent from my LG-P500 using Tapatalk
Great! Nice tip, never done that before. Thanks alot man.
so all in all, is this script really running on boot or not?
It runs, only problem encountered is with CM7 roms. (mount point traffic or something like that in a sense) will edit 1st page till I finish the reworked script.
Hey ungaze,I have just flashed the script and everything. I'm on CM7. What is the problem? Do I have to wait for a fix and do everything over again? Because I'm currently not experiencing any problems
Nope, it worked once, it should also work every time. Dunno which beta version of CM7 some people are having problem with. I still think this method is easier and faster for testing scripts to run on boot, but the next script will just be more lets say "compatible to a wider variety of ROMs and even other devices".
The issue can occur on rom's that mount the sdcard on /mnt/sdcard and symlink that to /sdcard as your mountpoint doesn't exist. If memory serves me right this is the correct mount procedure since 2.2 and is more in line with FHS. Potentially you can see issues with this if it mounts before vold runs as well as vold with throw an error if the mountpoint is in use. This can occur on rom's that mount to /sdcard. Hope that clears it up a bit.
Sent from my LG-P500 using Tapatalk
How does this look?
Code:
mount -o rw,remount auto /
mkdir /tmp
mount sd
mount -t vfat /dev/block/mmcblk0p1 /tmp
if [ -e /tmp/scriptz ]
then
list=`ls /tmp/scriptz/*.sh`
for script in $list
do
sh $script
done
fi
umount sd
umount /tmp
rmdir /tmp
mount -o ro,remount auto /
Also "ls /tmp/scriptz/*.sh" would show the complete path including /tmp/scriptz/------ and so I just used sh $script on line 10. is this ok?
No need to mount the sdcard in the script, vold handles all that and its not used anyway. Apart from that it looks good to me.
Sent from my LG-P500 using Tapatalk
Status: working!
The tar file has some binaries which work.
If you aren't a developer you probably don't care about this.
I'm working on getting FUSE working on my P500, and thought I'd share my experiences. FUSE is a mechanism to mount lots of filesystems (like fusecompress, sshfs, or unionfs) without needing to recompile the kernel or patch the kernel. My need is to have a writeable /system that can be 'cleaned' back to the original state with the push of a button.
The following details my initial attempt. I've had better success as detailed here:
http://forum.xda-developers.com/showpost.php?p=14619814&postcount=3
Steps:
1) get the kernel source and build it with the FUSE module enabled. this provides fuse.ko which should be usable on virtually all 2.6.32.xx kernels for the P500
2) get the fuse userspace libraries and compile. I had to use a very old version (2.4.2) because newer versions need support for statvfs which bionic doesn't have. I had to patch in apthread_rwlock which isn't in bionic for froyo, and a few other cleanups.
3) get a fuse filesystem to test. I'm using unionfs-fuse. I had to use a very old version (0.11) to go with my very old libfuse from (2)
4) Try it out:
* move the files from 1-fuse.ko, 2-fusercompress, and 3-unionfs to the p500
* become root
* make sure all files are executable and in the PATH
* load the kernel module: insmod fuse.ko
* try to use fuse: ./unionfs --roots=/sdcard /mnt/asec
The last step seems to work, but ps shows no unionfs process.
Next I try with debug enabled:
* ./unionfs --roots=/sdcard /mnt/asec -d
This gives a segfault
Lastly I try with strace to find the segfault:
* strace -ff -F ./unionfs --roots=/sdcard /mnt/asec -d
now the code no longer segfaults, and the mount works.
So my goal now is to figure out why it segfaults when not run via strace.
I found someone who got this working on the desire:
http://forum.xda-developers.com/showthread.php?t=763908
(I tried their binaries just for fun, but they're not compatible with the P500)
They did it by using scratchbox which imports glibc. I was trying to do a native bionic build, but it may be easier to try scratchbox, as it would let me have a modern libfuse. If I can't figure out this segfault, then I'll go there next. Has anyone tried building for the P500 using scratchbox?
Sweet idea man!
Ok, I have fuse fully working using the latest fuse version 2.8.5
In order to build, I got a copy of statvfs.c and statvfs.h from the shieldroid project. I had to modify the definition of f_fsid to be 'unsigned long' and adjust statvfs.c appropriately I also ended up disabling multi-threaded support in fuse as it made it made it easier to compile.
With a bunch of monkeying around, I got libfuse compiled with the apropriate utils. I verified the example filesystems worked, then went ahead and built unionfs-fuse (latest version).
Using the tar file in the 1st post you can now:
* copy all files to /data and make executable
* add the relevant directory to your path
* insmod fuse.ko
* ./unionfs /sdcard:/system/bin /data/local/tmp
* ls /data/local/tmp (should contain the contents of /system/bin and /sdcard in one merged dir)
When I get a chance, I'll build an installable zip that puts the files in the right place for easy use.
FYI, my goal is to create a utility that can temporarily enable root on a phone and then disable it when done. My idea is to move the 'su' command out of /system/bin onto /data, and then use unionfs to teporarily add it back onto /system/bin on command. When done, you'll be able to click to unmount it again, bringing the phone back to an unrooted state.
It'll work sort of like the 'temporary root' capability of z4root, but will be undoable without a reboot (it also won't inculde the code to actually break out of a stock ROM, the goal is to be able to toggle root on an already rooted phone).
I need this capability because I run some enterprise software that doesn't work on a rooted phone, and I don't want to be constantly booting to recovery for root tasks.
i dont understand most of wat u saying, but good going man.
im also computer science student but hate studying =(
I've been running Android M preview (3?) for a while on my Nexus 6.
2 months ago my USB-connector of the phone broke and only because I also have a wireless charger I was able to continue using my phone.
I therefore also never upgraded to the final version of Android-M, too afraid to get into trouble and unable to connect it to the computer.
Just now I tried a headphone and noticed that viper4android wasn't working, which it did a while ago.
I still had the file viper_aio_fixes.zip in my download folder I used to get it going a long time ago.
I never considered this zip to be less innocent as it turned out to be.
http://forum.xda-developers.com/nexu...droid-t2952137
I booted into recovery, flashed that zip and did a reboot.
Now it is stuck at the black screen with only the text "Google" and a padlock
I am able to boot into fastboot where I can go in the several modes including recovery mode (Team Win Recovery Project v2.8.5.0).
I have no idea how to fix this, especially because I don't have any possibility to connect it to my computer using an USB
The device does still have warranty, but I can't miss my phone.
If anyone has some tips to get it going, please help....
The spare phone (an LG G2) I kept for such an occasion also let me down. It all of a sudden has a touch screen that is slowly responsive (3 seconds each touch).
I currently don't have it with me anyhow.
The Nexus 6 was rooted and unlocked and ran fine all this time.
You could buy a replacement USB module on Ebay or something and swap it in.
EDIT: Ouch, just looked and the N6 doesnt use a USB module that gets screwed onto the mainboard like normal phones.
Id say your 2 options are to boot into recovery and restore a Nandroid or flash a ROM file you have saved on the phone, or try seeing if you can get the phone to boot by just wiping dalvik and cache. If you don't have a backup then that is just some really dumb flashing. In that case you are just going to have to get it repaired somewhere or buy a new phone.
Thanks for all input and efforts.
I have already tried wiping dalvik cache and cache, but that didn't help. I think I'm going to bring it in for a warranty repair regarding the USB.
I do hope they will not wipe the storage.
I have a Titanium backup in google drive, but it's already a month or 2 old.
I don't understand why I can't schedule a sync or did I miss that?
The install script has this in it....
Code:
ui_print("Mounting System");
show_progress(8.800000, 5);
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("system", "/system/");
package_extract_dir("tmp", "/tmp");
set_perm(0, 0, 0777, "/tmp/vipertweaks.sh");
ui_print("");
run_program("/tmp/vipertweaks.sh", "mytweak");
ui_print("");
ui_print("Applying ViPER4Android Build.prop Tweaks");
ui_print("");
ui_print("Deleting cache and davlik");
ui_print("Cache and davlik deleted");
delete_recursive("/cache");
delete_recursive("/data/dalvik-cache");
show_progress(8.800000, 5);
run_program("/sbin/busybox", "unmount", "/system");
vipertweak.sh
Code:
#!/sbin/sh
bp="/system/build.prop"
busybox mount /system
busybox mount /data
if [ -f /system/build.prop.bak ];
then
rm -rf $bp
cp $bp.bak $bp
else
cp $bp $bp.bak
fi
echo " " >> $bp
echo "# ViPER4Android Build.prop Tweaks" >> $bp
echo " " >> $bp
for mod in misc;
do
for prop in `cat /tmp/$mod`;do
export newprop=$(echo ${prop} | cut -d '=' -f1)
sed -i "/${newprop}/d" /system/build.prop
echo $prop >> /system/build.prop
done
done
This post is about a brick after loading this zip, so don't just flash it.
AFAIK it is not supposed to harm the system but on this occasion it did.
I still don't know why, especially as I ran it before and it fixed my viper install....
I have renamed /system/build.prop to /system/build.prop.mod and renamed /system/build.prop.bak to /system/build.prop
That didn't do it....
I don't think it's the problem...
I'm not getting the program that asks me for the unlock key. I believe it's sooner than this file is needed.
Viper4Android is just build.prop tweaks? I could have sworn last time I used it that the mod included /system file tweaks and a driver of it's own to hook into
EniGmA1987 said:
Viper4Android is just build.prop tweaks? I could have sworn last time I used it that the mod included /system file tweaks and a driver of it's own to hook into
Click to expand...
Click to collapse
It is more then build prop tweaks. It is a sound driver that is most likely not compatible with the OS.
zelendel said:
It is more then build prop tweaks. It is a sound driver that is most likely not compatible with the OS.
Click to expand...
Click to collapse
Please read my OP
I installed that package already months ago and it was working fine. So it's not that the driver is plain right incompatible.
Because I wasn't using my headphone lately I didn't notice that it stopped working (as in having no effect on sound anymore).
When I installed Viper4android the first time on Marshmallow I couldn't get it to work using the tricks I've acquired over the years to get it going.
I then ran this zip and all started to work,
I never found out what part of that zip did the thing to get it to process the audio.
That's also the reason why I ran that zip again now I noticed it stopped working.
But if something went wrong with that sound driver can't I just delete it somewhere? I can use the recovery mode and mount /system and rename/remove files.
I have already removed some APK's
I think it's strange it hangs in such an early stage before asking the code to unlock the data partition.
Anyone knows the name of the driver?
Where are drivers placed?
I brought it back for service to get the Nexus 6 repaired. The USB, I mean.
I don't know how I will receive it, but I will probably can get it going with that USB.
In the mean time I bought a Moto G 2015 for € 200,-
I can't be without a phone.... how pitiful..
I bought a tab S2 about a month ago to replace my HP touchpad i've had/been using since the firesale about 4 yrs ago. At the time of purchase, I discovered really quickly that lack of custom roms on the S2 at that time was to much of an issue, and I returned it.
I am however seeing an alpha of CyanogenMod for the tab S2 that's looking pretty close to usable. Given that the tab is also on sale this week, i'm very much inclined to repurchase it, however, question: Does cifs/smb mounting remote filesystems work with the tab s2 rom that was posted?
You can do that on the stock S2 with many different apps in the Play Store. ie. ES File Explorer, Solid Explorer, AndSMB
nrage23 said:
You can do that on the stock S2 with many different apps in the Play Store. ie. ES File Explorer, Solid Explorer, AndSMB
Click to expand...
Click to collapse
Correct me please if i'm wrong, but those applications just allow me to browse remote filesystems from the application itself. They don't smb mount them. It's the cifs.ko file i'm missing (which i'm assuming is included with cm12?)
The cifs.ko file would have to be done via a kernel module based on what I seen from other devices. I do not know if it is included in CM kernels or not.
Did you or anyone get cifs working?
I understand it may be possible to compile a cifs.ko and insmod it.
I don't know how possible that is but whilst I'm googling how to compile I thought I'd see if anyone had done it.
Cheers, Guy
I got CIFS mount working on my 710 by installing Neked_Nook_MM-710-V1 and my fork of @engine95 mm kernel which has the cifs module enabled.
Hi thanks for the reply
I don't suppose you have any tips or suggested posts/ guides I could use to recreate your setup?
I guess I could figure out how to get neked nook flashed based on the guides but the fork of the engine95 Kernel that includes cifs..? I can see a post about the permissive kernel by engine95..
Is your device fully functional and stable now?
Thanks a lot,
Guy
Neked nook is very stable. My tab s2 has not crashed so far with that rom, and my custom kernel. I have attached my boot image. This is a fork of engine95 kernel with just cifs module added. This kernel only works on MM.
Extract boot.zip and flash boot.img via twrp(boot image) or fastboot.
You can use the attached cifs manager to mount your smb/cifs drives on android as a directory.
I am only able to mount it to /mnt/drive. I could not get it to mount to /sdcard.
Awesome thanks
I use cifsmanager on a Chuwi hi12 that i've rooted, it already has the cifs modules and permissive kernel so I am able to mount the shares almost wherever I like - and I use cifsmanager to poke 1TB of satellite images into the map folder of my mapping app on the SD card. But I don't know if cifs was in the kernel (chuwi is on lollipop) already or part of the rooting process, would love to recreate the setup on my samsung as its a far superior device.
I'll give it a go this weekend, really appreciate you taking the time to upload the files you used.
Cheers,
Guy
Hi Currowth,
I know life is too short to help each noob, but can I trouble you for another pointer?
I used the full image of Neked Nook MM v1, and the boot image you provided, and the tablet is working great, and if I cat /proc/filesystems I can now see cifs listed....but..
I can't mount any cifs shares - to anywhere, including /mnt/drive. I get the mount failed Mount: I/O error.
(I think my process was along the lines of: ODIN to cf-autoroot (i'd actually done this a while before starting this thread so including in case its relevant, as i dont know if there is an issue with a /system or systemless root?) then I ODIN'd TWRP on, took a full backup with TWRP and then wiped data,cache, system etc and flashed Neked Nook on, booted into NNook, then went back to twrp and put the boot image you provided on.
Any help greatly appreciated.
If it means anything I'm not trying to watch Batman in bed, I'm trying to put together a repeatable solution for me and my overland traveller friends so we can take huge amounts of map and satellite image tiles completely offline when we're driving our landrovers, toyotas etc across deserts where sat navs or road maps are useless.
thanks again,
Guy
*Edited to add i've been googling the crap out of the mount i/o error, tried a patched version of cifsmanager, tried copying the apk to the system/apps folder and changing its permissions before reinstalling.. no joy
Looks like it can be a root issue. This is what i flashed to get root. "BETA-SuperSU-v2.74-2-20160519174328"
try to install busybox also and try again.
If that does not work:
Can you try to run this in adb shell as root?
mount -t cifs -o username="username",password="password" //smbpath/dir mnt/cifs/dir
replace "username,"password", and smbpath/dir
Guy009 said:
Hi Currowth,
I know life is too short to help each noob, but can I trouble you for another pointer?
I used the full image of Neked Nook MM v1, and the boot image you provided, and the tablet is working great, and if I cat /proc/filesystems I can now see cifs listed....but..
I can't mount any cifs shares - to anywhere, including /mnt/drive. I get the mount failed Mount: I/O error.
(I think my process was along the lines of: ODIN to cf-autoroot (i'd actually done this a while before starting this thread so including in case its relevant, as i dont know if there is an issue with a /system or systemless root?) then I ODIN'd TWRP on, took a full backup with TWRP and then wiped data,cache, system etc and flashed Neked Nook on, booted into NNook, then went back to twrp and put the boot image you provided on.
Any help greatly appreciated.
If it means anything I'm not trying to watch Batman in bed, I'm trying to put together a repeatable solution for me and my overland traveller friends so we can take huge amounts of map and satellite image tiles completely offline when we're driving our landrovers, toyotas etc across deserts where sat navs or road maps are useless.
thanks again,
Guy
*Edited to add i've been googling the crap out of the mount i/o error, tried a patched version of cifsmanager, tried copying the apk to the system/apps folder and changing its permissions before reinstalling.. no joy
Click to expand...
Click to collapse
Thanks for coming back Currowth,
Ok my SuperSU from the original cf-autoroot was 2.46. I assumed I needed to remove that so I ran the unroot function and then used twrp to flash the version you linked to, after reboot SuperSu is at 2.74.
Unfortunately i have the same I/O error.
I also ran adb root from my win10 machine and tried the manual mount command as you suggested - it returns I/O error also. Initially it said 'no such file or directory' so I manually created the dir, with the name the same as the share dir, in /mnt/cifs.
command output
255|[email protected]:/ # mount -t cifs -o username=admin,password=admin //10.10.10.254/Public1 /mnt/cifs/Public1
mount: No such file or directory
255|[email protected]:/ # cd /mnt/cifs
[email protected]:/mnt/cifs # mkdir Public1
255|[email protected]:/ # mount -t cifs -o username=admin,password=admin //10.10.10.254/Public1 /mnt/cifs/Public1
mount: I/O error
One other thing, in the NNook image thread, i see it says make sure you 'ODIN M' first. I'm embarrassed to say i don't know what that means!
update in mean time: i started again, based on doing all the flashing whilst rooted with the older supersu. So i've unrooted, rooted with your beta_xx linked above, wiped system, cache, data and dalvik, flashed the Neked Nook full MM V1 ROM, booted into that, then back to twrp to flash the boot.img you linked above, installed busybox, the linked cifsmanager, tried to mount, then updated supersu as recommended in NNook thread, rebooted and tried mount again but no joy, always getting i/o error.
just for further info, the shared folder does work on my chuwi with cifsmanager, so hopefully that is not the issue. Before I re-did the ROM and the boot image, i installed paragon ntfs and was able to successfully mount an NTFS formatted SD card into the /mnt/cifs/public1 directory.
interestingly cifsmanager couldn't create the directories under /mnt, but i was able to create them manually and then get an IO error. I changed permissions on the /mnt/cifs folder and now it can create the directory when attempting to mount but still gets IO error.
i'm beyond my depth, guess it feels like cifsmanager is either not working or not got permission - or something i've done prior to the NN and kernel flashes has caused an issue.
Its starting to feel like a lost cause. You know better than me - if this is the end of the easy flash-type fixes to try, perhaps I should just throw in the towel.
Thanks again for your help Currowth, you're a gent
I just did a clean install to replicate you issue, but was not able to reproduce it. 'ODIN M' means that install a marshmallow rom first via ODIN. If you already came from a marshmallow ROM, you can ignore it.
The steps i took to ensure that i am was able to get cifs were the following:
First i installed "Neked_Nook_MM-710-V1.zip"
Next I installed "BETA-SuperSU-v2.74-2-20160519174328.zip"
Last i installed "boot.img"
I did this all through twrp.
Reboot, dont setup knox if it asks you to.
Try to do a wipe, then reinstall the following and try again.
Guy009 said:
Thanks for coming back Currowth,
Ok my SuperSU from the original cf-autoroot was 2.46. I assumed I needed to remove that so I ran the unroot function and then used twrp to flash the version you linked to, after reboot SuperSu is at 2.74.
Unfortunately i have the same I/O error.
I also ran adb root from my win10 machine and tried the manual mount command as you suggested - it returns I/O error also. Initially it said 'no such file or directory' so I manually created the dir, with the name the same as the share dir, in /mnt/cifs.
command output
255|[email protected]:/ # mount -t cifs -o username=admin,password=admin //10.10.10.254/Public1 /mnt/cifs/Public1
mount: No such file or directory
255|[email protected]:/ # cd /mnt/cifs
[email protected]:/mnt/cifs # mkdir Public1
255|[email protected]:/ # mount -t cifs -o username=admin,password=admin //10.10.10.254/Public1 /mnt/cifs/Public1
mount: I/O error
One other thing, in the NNook image thread, i see it says make sure you 'ODIN M' first. I'm embarrassed to say i don't know what that means!
update in mean time: i started again, based on doing all the flashing whilst rooted with the older supersu. So i've unrooted, rooted with your beta_xx linked above, wiped system, cache, data and dalvik, flashed the Neked Nook full MM V1 ROM, booted into that, then back to twrp to flash the boot.img you linked above, installed busybox, the linked cifsmanager, tried to mount, then updated supersu as recommended in NNook thread, rebooted and tried mount again but no joy, always getting i/o error.
just for further info, the shared folder does work on my chuwi with cifsmanager, so hopefully that is not the issue. Before I re-did the ROM and the boot image, i installed paragon ntfs and was able to successfully mount an NTFS formatted SD card into the /mnt/cifs/public1 directory.
interestingly cifsmanager couldn't create the directories under /mnt, but i was able to create them manually and then get an IO error. I changed permissions on the /mnt/cifs folder and now it can create the directory when attempting to mount but still gets IO error.
i'm beyond my depth, guess it feels like cifsmanager is either not working or not got permission - or something i've done prior to the NN and kernel flashes has caused an issue.
Its starting to feel like a lost cause. You know better than me - if this is the end of the easy flash-type fixes to try, perhaps I should just throw in the towel.
Thanks again for your help Currowth, you're a gent
Click to expand...
Click to collapse
Thanks Currowth I will try and give it a go tomorrow
Just a thought, are you booting into Android after each step, or doing all the flashing in one twrp session then doing first boot once all items are flashed?
I flashed them in one session without rebooting.
Hi Currowth, I've had a breakthrough!
I re did the NNook/root/boot image in the order you advised.
I have been using a patriot node WiFi disk enclosure, that works with cifs manager on my other tablet. Today I was working away from the WiFi disk so I made do with a windows pc to provide a shared folder. After setting cifs manager up I was able to mount the share under /mnt, but not to any other location. I got back to my WiFi disk, and that continued to give an io error!? So windows worked but the patriot didn't. Weird. I'd ruled the patriot out as it works on my 5.1 lollipop tab.
So I continued to mess around... I had stumbled across another app called mount manager by Ryan conrad (I don't have the link but I have the apk) which has more noob-friendly options and found if I used the ntlmv2 option I could mount the patriot into /mnt !
I did try to get it to mount to other locations and although it succeeded in the app, the mounted folder was empty.
As my app - Osmand+ has the option to manually specify it data folders I created a 777 permission folder for it under /mnt, and then mounted the patriot containing my satellite images into the appropriate empty tile folder.
Working solution!!! If a little messy.
Thanks so much for your help, the Samsung s2 is about 400% faster and more practical than the other tablet so really happy
I don't know why android devices are so limited by manufacturers when the OS is capable of so much, but that's a different conversation haha
A follow up on this in case it is useful to others...
Using /mnt was a bad idea. /mnt is mounted / built on a system partition as a mount point for other file systems or devices (how I have explained it to myself). So anything you add here as a folder gets destroyed when you reboot.
So, I installed my osmand app to /data/osmand and then used a root terminal to run "chmod -R 777 /data/osmand/" to set permissions to 777 on that folder and all subfolders.
After doing this I was able to get mount manager to mount my cifs share into an empty subfolder in the apps folder tree.
I initially tried changing permissions on /data in case it was needed for folders further down the tree, but it was not needed - which is just as well because again, /data is mounted at boot with 771 permissions, so changes 777 back to 771 after reboot. To change that would involve unpacking the boot image in order to edit the init.rc file and then repacking. I didn't bother it was not required.
If anyone wants mount manager, Google 'ryan conrad mount manager' and take your chance with the apk sites, can't remember whigh site I used!