[KERNEL](31/7/2013) NFS & CIFS modules - Xperia Z Android Development

Here are NFS and CIFS modules compiled for use against the STOCK KERNEL ONLY.
Works for me on my Xperia Z.
Notes:
---------
NFS: supports NFSv3 only.
CIFS: Has the known kernel bug that affected all versions after 3.3.8 until ~3.5, which requires you to manually specify the unc parameter in the mount options.
I have included lockd.ko, sunrpc.ko for use with NFS, and nls_utf8.ko (only needed for .350, .432 has it compiled in to the kernel) for use with either.
I have only tested from the command line, so I won't offer any support for use from MountManager/CIFSManager. You are welcome to try to use them from there if you prefer.
4.2 introduced a more complicated multi-user storage system. (Details here). This may make it more difficult for you to use the mounted storage in your other apps (simply appearing as an empty folder). The only known workaround (please correct me if you know a better way) is to perform the mount via adb (yes, this you can do this from a script on your local device) so that all open apps get permissions to 'see' the mount.
Usage:
----------
Code:
insmod nfs.ko/cifs.ko/whatever
mount -t nfs -o vers=3,nolock,hard,intr 1.2.3.4:/yourmount /path/to/mount/to
mount -t cifs -o username=youruser,password=yourpassword,unc=\\\\1.2.3.4\\yourshare //1.2.3.4/yourshare /path/to/mountpoint/
Current Versions:
-------------------------
10.1.A.1.350 tar zip
10.3.A.0.423 tar zip
SHA512 sums:
---------------------
10.3.A.0.423
Code:
2b6109a329ed825b358607cd0f6218e064bd368c45bbecde38fd103f30c8cb323bfa4374ee4d85a77e70f52bf81109044f9f6a2e01ea4d521cb27a274a941d1b cifs.ko
20af544d34cc83b4955503d7232e8ea575c1d35abfd5e6c5c9726990ef9f945eaea9d22c91c95f6c03e366e9837fd30e60e3a09995c4d96bb7d4d93ca96edb6c config_nfscifs
6900aa64ce563f1d1c03e91aec2cbf89a69c902bbfdc78f3dca4bba2045e7106633d920da5ca285ebab7c26097e8ecc0b29c967fa14d28f057ada39dc8c8a294 lockd.ko
4760decf2cf3828af937ed844f436133c429a6db33bbdcd7563f8e6613414850fa13245e102115811196c1714522ec1c932ee7ea99ae9d4c4041425e63cf3a91 nfs.ko
4e0cdd708973ee1a90de490b9f2d0fc345447668d05539ebb97514997733be7421efbede2c0235414a3ad6be730bc1dfe20359ac285ccb9ff4038a7d34e2d4dd sunrpc.ko
10.1.A.1.350
Code:
5d6c29f519b3b85a08b0380271a64e52d23d641f030639ff560c7966811f2ec4b782a32f52b615d57463324169e7b410f51639513c038ddcf79895bcd7ca070a cifs.ko
34b767fce2c55fe5c3eb711df2ac7e450903901cecd21c165d5a1471da91f3a27c37c1d4c0530647064c1b92eac1b11751c2a829a1dbd0efec881a60be07477f config_nfs
eff854c9b28ae50d2b305ca4e230abbe8305d609783cc1ceb6b01a6d36ea55131cca29ab64cb3acf584fefb7c7bb6292e66f441333691da113f2c81d894ddbf9 config_nfscifs
6632ffd08354ee9b5e36615e19754696e8c497a8ce3639846b929b3d7085008f0c225bece20c6c96351c4e8612fc59084db975d71f44bd76b2c96b71d4ecef23 lockd.ko
278886d1a3684e1274477617b501b75d1a0d8caafc15d195564a3ef17dedbab90aa9e22eda7ec2d50e0e23206346d60b0f7b71a241e46252fb32ab2ad9ff088f nfs.ko
42c0bd96555a6396e24ea20e35305980a13cbf08bdc02fe660da5b23a641e70a38361c769f7d722bf116a8bc586ab20d278e3e8210b008524e5566fb46b740bb nls_utf8.ko
4a4b3bf6289904a0dedd889aacbb22a1a562fbaa7b78e714f9e1739ff7809187210b1cfac5632f740f81f4bb8213589707dc298319d7affb9910a33af1cd5d8a sunrpc.ko

Cool !
I always use CIFS previously on my old samsung.
Tks a Lot !
:good:
Using script is fine for me, so that I don't need to install anything.

[KERNEL] NFS & CIFS modules
For which kernel version are these modules?
I'm looking nfs (version 2), maybe cifs for 3.0.21

thank you for making this. Can you make one for the 10.3.A.0.423 kernel? and does it work for both 6602 and 6603?
thanks

Sorry for my ignorance, but what this things are needed for?

rregn said:
For which kernel version are these modules?
I'm looking nfs (version 2), maybe cifs for 3.0.21
Click to expand...
Click to collapse
These are for the kernel included with 10.1.A.1.350 which is 3.4.0-g298631f-01992-g95474bc.
deligoz said:
thank you for making this. Can you make one for the 10.3.A.0.423 kernel? and does it work for both 6602 and 6603?
Click to expand...
Click to collapse
I will add it to my list of tasks to do... If I don't do it within a few days, feel free to bump me to do it.
I think it should work with both C6602 and C6603, but I only have a C6603 so can't test...
xNAPx said:
Sorry for my ignorance, but what this things are needed for?
Click to expand...
Click to collapse
These modules are used to access NFS/CIFS mounts from your phone, since Sony didn't compile them in by default. (If you don't know what NFS/CIFS is, you don't need this. )

modsRule said:
I will add it to my list of tasks to do... If I don't do it within a few days, feel free to bump me to do it.
I think it should work with both C6602 and C6603, but I only have a C6603 so can't test...
Click to expand...
Click to collapse
Bump?
I'm looking for these very modules for 10.3.A.0.423 kernel.

Dr_SUSE said:
Bump?
I'm looking for these very modules for 10.3.A.0.423 kernel.
Click to expand...
Click to collapse
Thanks for the bump. This task did get lost under everything else I do.
I am downloading the source package now so that I can do this.

modsRule said:
Thanks for the bump. This task did get lost under everything else I do.
I am downloading the source package now so that I can do this.
Click to expand...
Click to collapse
Done. Check the first post for downloads.

modsRule said:
Done. Check the first post for downloads.
Click to expand...
Click to collapse
Thanks for that!
Good news is that the module's loaded:
Code:
[email protected]:/ # lsmod
cifs 243687 0 - Live 0x00000000
wlan 2559132 0 - Live 0x00000000 (O)
texfat 121149 0 - Live 0x00000000 (PO)
cfg80211 128293 1 wlan, Live 0x00000000
hid_sony 1984 0 - Live 0x00000000 (O)
Code:
[email protected]:/ # modinfo /system/lib/modules/cifs.ko
filename: /system/lib/modules/cifs.ko
license: GPL
author: Steve French <[email protected]>
description: VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows
version: 1.78
version: %s
srcversion: 3F86E0A9406EADE34D14793
depends:
vermagic: 3.4.0-gba62870 SMP preempt mod_unload modversions ARMv7
parm: enable_oplocks:Enable or disable oplocks (bool). Default:y/Y/1
parm: cifs_max_pending:Simultaneous requests to server. Default: 32767 Range: 2 to 32767.
parm: cifs_min_small:Small network buffers in pool. Default: 30 Range: 2 to 256
parm: cifs_min_rcv:Network buffers in pool. Default: 4 Range: 1 to 64
parm: CIFSMaxBufSize:Network buffer size (not including header). Default: 16384 Range: 8192 to 130048
The bad news is I still can't get the share to mount.
Code:
mount -t cifs -o username=un,password=pw,unc=\\\\10.0.0.7\\Music \\10.0.0.7\Music /sdcard/Music
mount: Invalid argument
255|[email protected]:/ #
Code:
mount -t cifs -o username=un,password=pw \\10.0.0.7\Music /sdcard/Music
mount: Invalid argument
Code:
mount -t cifs -o username=un,password=pw,unc=\\\\10.0.0.7\\Music /sdcard/Music
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Code:
mount -t cifs -o username=un,password=pw unc=\\\\10.0.0.7\\Music /sdcard/Music
mount: Invalid argument
Code:
mount -t cifs -o username=un,password=pw, \\10.0.0.7\Music /sdcard/Music
mount: Invalid argument
mount -t cifs -o username=un,password=pw,\\10.0.0.7\Music /sdcard/Music
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Code:
dmesg
<3>[ 1619.729064] CIFS VFS: Connecting to DFS root not implemented yet
<3>[ 1720.159484] CIFS VFS: Connecting to DFS root not implemented yet
<3>[ 1880.073638] CIFS VFS: Connecting to DFS root not implemented yet
<3>[ 1931.261993] CIFS VFS: Connecting to DFS root not implemented yet
<3>[ 1963.688110] CIFS VFS: Connecting to DFS root not implemented yet
I've tried every reasonable variation I can think of in the syntax. Can you help me figure out what I'm doing wrong here?
Of interest?
Busybox /CIFS Bug/Patch

When you run 'mount', is that the busybox version or the android version?
Try again using 'busybox mount [parameters]'.

modsRule said:
When you run 'mount', is that the busybox version or the android version?
Try again using 'busybox mount [parameters]'.
Click to expand...
Click to collapse
Same result. Slightly different error message:
Code:
mount: mounting \10.0.0.7Music on /mnt/Music failed: Invalid argument
but same return from dmesg.
Notice the missing "\" between 7 and Music. I'm copying your syntax letter for letter.

Dr_SUSE said:
Same result. Slightly different error message:
Code:
mount: mounting \10.0.0.7Music on /mnt/Music failed: Invalid argument
but same return from dmesg.
Notice the missing "\" between 7 and Music. I'm copying your syntax letter for letter.
Click to expand...
Click to collapse
Sounds like the syntax may have changed slightly, grr... [I will check when I am next at my dev machine].
In the meantime, you may find it easiest to use the script here, which also handles the multi-user problems I explained in the OP, for you.

modsRule said:
Sounds like the syntax may have changed slightly, grr... [I will check when I am next at my dev machine].
In the meantime, you may find it easiest to use the script here, which also handles the multi-user problems I explained in the OP, for you.
Click to expand...
Click to collapse
I checked out the script as is, with my information in the header, and I got an invalid argument error. I got the same when I changed the script to use busybox mount. Nothing even logged in dmesg after running the script.
I did notice that I do not have these two modules indicated in the script. Do I need them? Nothing (CIFS Manager, Mount Manager) seems to have installed them.
insmod /system/lib/modules/md4.ko;
insmod /system/lib/modules/nls_utf8.ko;
edit: I used the nexus modules provided with the script (md4, nls-utf8), but it wasn't useful: (Exec format error)

Dr_SUSE said:
I checked out the script as is, with my information in the header, and I got an invalid argument error. I got the same when I changed the script to use busybox mount. Nothing even logged in dmesg after running the script.
Click to expand...
Click to collapse
That is strange. What version of busybox do you have?
Dr_SUSE said:
insmod /system/lib/modules/md4.ko;
insmod /system/lib/modules/nls_utf8.ko;
Click to expand...
Click to collapse
These are not included because they are compiled into this kernel version by Sony.
Dr_SUSE said:
edit: I used the nexus modules provided with the script (md4, nls-utf8), but it wasn't useful: (Exec format error)
Click to expand...
Click to collapse
Surprise!</sarcasm>

Busybox v1.20.2-jb static 2012-11-25
Sent from my C6502 using xda app-developers app
edit: Updated to 1.21, no difference.
Code:
busybox mount -t cifs -o username=xxxxx,password=xxxxxx,unc=\\\\10.0.0.7\\Music \\\\10.0.0.7\\Music /storage/emulated/legacy/Music
mount: mounting \\10.0.0.7\Music on /storage/emulated/legacy/Music/ failed: Invalid argument
Sometimes it tells me it can't read fstab. I don't know if that means I'm getting warmer or colder.

Dr_SUSE said:
Busybox v1.20.2-jb static 2012-11-25
Click to expand...
Click to collapse
I am using this version too.
I can confirm CIFS is working here with these modules using this syntax: (Updated first post to this too)
As superuser:
Code:
busybox mount -t cifs //x.x.x.x/share /path/to/mount -o unc=\\\\x.x.x.x\\share,username=myuser,password=mypass

modsRule said:
I am using this version too.
I can confirm CIFS is working here with these modules using this syntax: (Updated first post to this too)
As superuser:
Code:
busybox mount -t cifs //x.x.x.x/share /path/to/mount -o unc=\\\\x.x.x.x\\share,username=myuser,password=mypass
Click to expand...
Click to collapse
That seems right, because now I'm getting a failure to mount on "Operation now in progress". That usually means the syntax is right, now I just have to see what I can figure out.
Does this module work with custom recoveries, such as CWM or TWRP? I'm asking because I saw another thread on XDA (OP was NUT) about how mounting and remounting /system as RO or RW was causing some devices to reboot, and one of the fixes, changing permissions on /sbin/ric, caused devices to send out dmesg's every 5 seconds complaining about denied permissions to /sbin/ric.
Well, second time I tried your new syntax to mount, my device rebooted, then I started seeing the dmesg's about /sbin/ric. Fixed that by resetting permissions.
Any relationship there?
I've been looking at a power consumption issue since.

Dr_SUSE said:
That seems right, because now I'm getting a failure to mount on "Operation now in progress". That usually means the syntax is right, now I just have to see what I can figure out.
Does this module work with custom recoveries, such as CWM or TWRP? I'm asking because I saw another thread on XDA (OP was NUT) about how mounting and remounting /system as RO or RW was causing some devices to reboot, and one of the fixes, changing permissions on /sbin/ric, caused devices to send out dmesg's every 5 seconds complaining about denied permissions to /sbin/ric.
Well, second time I tried your new syntax to mount, my device rebooted, then I started seeing the dmesg's about /sbin/ric. Fixed that by resetting permissions.
Any relationship there?
I've been looking at a power consumption issue since.
Click to expand...
Click to collapse
I am running TWRP on a locked BL here. My dmesg is also full with messages about /sbin/ric (mine has mode 0644). Yet this mounting works.
I am not sure why you would get "Operation now in progress" when trying to mount.

This stuff here also works on the Xperia Tablet Z!
On my tablet with Android 4.1.2 the first version (for 10.1.A.1.350) works. :good::good:
(But only CIFS; when trying to insmod nfs.ko, I get an error.)
Opposed to what seems the case on the Xperia Z, it's even not necessary to have the "unc:////" stuff in the mount command.
And one important addition: The mount command should always include the option "iocharset=utf8" because otherwise filenames with special characters cannot be processed correctly.
Best Wishes,
Hasenbein

Related

[SOLVED] install-recovery.sh - The undeletable script from the dark side...

Greeting all,
First of, I would like to thanks all of you for the amount of info I have found in this forum.
This is trully amazing and, so far, allowed me to sucessfully:
- Unlock my phone
- Root my phone
- Install a custom recovery image
I know that I am creating a new post on a very known and discussed subject BUT after 2 days of google seach nothing I have tried has permitted me to sucessfuly delete this £$%^&*() of script.
As you all know, it needs to be deleted to launch the custome recovery image (at the moment, I am stucked with the exclamation mark with the little Droid when I try).
IMPORTANT: I currently run the Froyo android 2.2 official ROM.
To delete this scipt, I have tried 2 approaches:
- Console mode from windows using ADB
- directly form the phone using a File explorer
#1: From the console:
As mentionned in many previous posts, I have tried the following commands once connected to the nexus
adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
I beleive this command is either incorrect OR no longer working with Froyo 2.2 as I get the following message which looks fishy (I am not a Linux specialist...):
Usage: mount [-r] [-w] [-o options] [-t type] device directory
When I try to delete the scripe with the commande below, I am kindly informed that it failed as it is still a read only file system
rm /system/etc/install-recovery.sh
#2: From the phone
I read that SUFBS, a very nice file explorer was available on the market allowing to mount both system AND data in RW would allow me to do it.
I have had several try at it enabling RW at different moment (System then etc then directly when I am in the folder and see the script I want to delete) and whatever I do, each time I select the command delete, it looks like it works (little pacman eating) but the script from the dark side is sill there like nothing happened...
As I am close to give it the microwave treatment to see if it works better ;-) I thought I give it a try on the forum to see if any Android/Linux god would spend 5 minutes to explain to me what I am doing wrong...
Thanks a lot in advance!
BooToo
Try this:
mount -o rw,remount /system
I can't guarantee that works with Froyo but it's all I've ever used and I don't remember it giving me any problem when I used Froyo.
Umm I think it should be mount -o remount,rw then type the rest
You can also try this mount -o remount,rw /dev/block/mtdblock3 /system
Sent from my Nexus One using XDA App
adb is supposed to have it's own remount command for doing this, but I've only used adb once when I rooted so I'm no help there.
Other than that, try doing: ls -l /system/xbin/mount to see if mount is a link to busybox. If it is, the last part of the output will look like this: /system/xbin/mount -> busybox
If it is, type busybox | head -n1 to see what version of busybox you have.
ilostchild said:
Umm I think it should be mount -o remount,rw then type the rest
Click to expand...
Click to collapse
Heh, I never realized I had those backwards compared to how people usually do it, but the order doesn't actually matter. It's not necessary to specify the device as the remount option doesn't change the mount point or device.
# mount | grep system
/dev/block/mtdblock3 on /system type yaffs2 (ro,relatime)
# mount -o rw,remount /system
# mount | grep system
/dev/block/mtdblock3 on /system type yaffs2 (rw,relatime)
Well...
I am an ass...
I did not have enabled the "USB debugging" on the phone...
Problem soved with the exact command lines I put at the beginning...
After rooting, flashing clockworkmod through ROM manager it was still going into stock recovery mode. Then I deleted /system/etc/install-recovery.sh and got my phone(HTC magic - 32A) bricked. Now it starts, shows rogers logo for 5-6 seconds and restarts and repeats untill i take out battery. I tried all combinations(power+back , power+home, Power+volume, Menu+home+power, menu+call+power) for quickboot and recovery mode but no success. Anyone has any idea about this issue?
If you have an HTC Magic, you're in the wrong forum...
Sent from my Nexus One using XDA App
just rename the script and you're done!
1) Bump 6 month old thread
2) Post in the completely wrong forum
3) Posts: 1 Join Date: Feb 2011
UGH.
error while loading new compiled Linux kernel image into the android emulator(1.5)
I am sorry, that i am asking my question in "reply" but i am not able to make a new post.
I have successfully compiled Linux kernel for android:
[email protected]:~/common# ARCH=arm CROSS_COMPILE=~/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
.
.
.
SYMLINK include/asm -> include/asm-arm
CALL scripts/checksyscalls.sh
<stdin>:1097:2: warning: #warning syscall fadvise64 not implemented
<stdin>:1265:2: warning: #warning syscall migrate_pages not implemented
<stdin>:1321:2: warning: #warning syscall pselect6 not implemented
<stdin>:1325:2: warning: #warning syscall ppoll not implemented
<stdin>:1365:2: warning: #warning syscall epoll_pwait not implemented
CHK include/linux/compile.h
Kernel: arch/arm/boot/Image is ready
Kernel: arch/arm/boot/zImage is ready
Building modules, stage 2.
MODPOST 157 modules
[email protected]:~/common#
but i get the following error while loading this images in the emulator:
[email protected]:~/android-sdk-linux_x86/tools# ./emulator -avd avd1.5 -kernel ~/common/arch/arm/boot/zImage -show-kernel -verbose
emulator: found SDK root at /home/preetam/android-sdk-linux_x86
emulator: root virtual device file at /home/preetam/.android/avd/avd1.5.ini
.
.
.
yaffs_read_super: isCheckpointed 0
sh: can't access tty; job control turned off
# init: cannot find '/system/bin/playmp3', disabling 'bootsound'
init: cannot find '/system/bin/dbus-daemon', disabling 'dbus'
eth0: link up
init: untracked pid 578 exited
init: untracked pid 579 exited
warning: `rild' uses 32-bit capabilities (legacy support in use)
init: untracked pid 601 exited
init: untracked pid 592 exited
init: untracked pid 605 exited
init: untracked pid 602 exited
init: untracked pid 609 exited
init: untracked pid 606 exited
init: critical process 'servicemanager' exited 4 times in 4 minutes; rebooting into recovery mode
save exit: isCheckpointed 1
save exit: isCheckpointed 1
Restarting system with command 'recovery'.
Reboot failed -- System halted
and the emulator didn't start with the new kernel image(emulator didn't reboot). what is the problem here..?? and how can i replace my emulator's image with newly compiled Linux permanently??
please help. thank you!
I did everything as the guy who initiated this post under windows vista, and I have the same problem. However, I don't know how to go about deleting or renaming that scrip. Can you, give me a step by step procedure? Thank you
Flash this through recovery to delete the script...
http://db.tt/ooDaCnU
Hi,
I am sort of new to this. how do I flash using the above script?

Droid 3 cifs.ko

This is in response to this thread in the developers forum.
I have compiled the cifs.ko kernel module for the Droid 3 from the source code for build 5.5.1_84_D3G-20_TA-9 with kernel version 2.6.35.7-g790a33c found here. Slow-work.ko is not needed as it is built into the Droid 3 kernel.
Thanks, did it work for you?
I could insmod your cifs.ko, but the mount errored:
[email protected]_solana:/# insmod /system/lib/modules/cifs.ko
[email protected]_solana:/# busybox mkdir /sdcard/winshares
[email protected]_solana:/# busybox mount -t cifs //192.168.1.3/droid /sdcard/winshares
mount: mounting //192.168.1.3/droid on /sdcard/winshares failed: Invalid argument
Looks like my kernel version is the same: 2.6.35.7-g790a33c, but my Build# is slightly different: 5.5.1_84_D3G-55.
Could it be that?
Total noob question, but I thought we couldn't load cusom kernels with the phone being locked. What gives?
Well, it's only loading a module into the kernel, you can do that once you have root.
I think the mount needs a username. Please add "-o username=guest" to your mount command.
Yes, thanks, that did it. Looks like username is not optional.
do you have the .config from the stock rom?
It was posted here:
http://forum.xda-developers.com/showpost.php?p=17088489&postcount=10
can you provide loop and ext2 ext3 support ko? thanks

[Q] Compiling kernel modules

Hi
I'm a new owner to a Galaxy tab 8.9 and trying to make it able to mount NFS exports.
So I've rooted the device, installed SuperUser and terminal emulator. Then I downloaded the kernel source tree from Samsung, I compiled the NFS module on my desktop computer moved it to /system/lib/modules on the tab. But it doesn't work, when I do 'insmod nfs.ko' it gives back 'insmod: init_module nfs.ko failed (No such file or directory)'
Is it possible at all to add modules to the standard kernel that comes with the device?
Is my device completely rooted because when I try 'adb root' I get 'adbd cannot run as root in production builds'
me too...
I just encountered the exact same problem on my LG Revolution, except I'm trying to load nfsd.ko for server support.
I know I built it correctly because I've already succeeded in getting tun.ko working properly...
Code:
root # /system/bin/insmod /system/lib/modules/nfsd.ko
insmod: init_module '/system/lib/modules/nfsd.ko' failed (No such file or directory)
root # ls /system/lib/modules
... nfsd.ko
Very odd...
When you do the insmod are you actually in the /system/lib/modules directory? If not, you have to use the full path to the module.
The message with "adb root" is normal even on a rooted device. If you can do "adb shell" followed by "su" you should be ok.
edit...
Now that I think of it...that message usually means the module file was found but a dependency wasn't.
gtj0 said:
Now that I think of it...that message usually means the module file was found but a dependency wasn't.
Click to expand...
Click to collapse
Yep that was my problem. My nfsd.ko needed dependencies that didn't exist...
To the OP: try to insmod the nfs.ko module again and then look at the output of dmesg. You should see messages complaining about the dependencies required by the nfs module.
Then you ought to be able to either remove the requirement for them from your module (my nfsd.ko wanted posix_acl support so I just got rid of that option and rebuilt the module) or if it's something you need/want you might be able to add support for whatever it is as another module...
Good luck and I hope I didn't intrude upon your thread too much
Thanks, I had indeed a dependency problem. Now I managed to load nfs.ko and sunrpc.ko and lockd.ko that were needed because of dependency.
Although I'm still having problems at mounting an nfs export. Previously, before kernel module problem was solved, I got the error message 'No such device' when I tried to mount, now I get 'Invalid argument' instead.
I've tried commands like
busybox mount -t nfs 192.168.1.100:/mnt/raid/media /sdcard/nfs
and
busybox mount -o nolock,ro,hard,intr,vers=3 -t nfs 192.168.1.100:/mnt/raid/media /sdcard/nfs
Any thoughts?
NFS Share - Invalid Argument
Marlin79 said:
........... now I get 'Invalid argument' instead.
I've tried commands like
busybox mount -t nfs 192.168.1.100:/mnt/raid/media /sdcard/nfs
and
busybox mount -o nolock,ro,hard,intr,vers=3 -t nfs 192.168.1.100:/mnt/raid/media /sdcard/nfs
Any thoughts?
Click to expand...
Click to collapse
Seems like an Old thread, and I would assume you've gotten this fixed already, but in case it ISN'T fixed...
>Double check your NFS config (/etc/exports file) and confirm that you are sharing:
* /exports/mnt/raid/media *
If you specified something else in your /etc/exports file, check to make sure your Hard drive (I assume /mnt/raid/media) is soft-linked to the share name you wanted to give it, or that at least the subfolders/files you want shared are softlinked to the /exports/share directory.
**e.g.**
# ln -s /exports/media/ /mnt/raid/media
-OR-
# ln -s /exports/media/shared_media_1.mp4 /mnt/raid/media/actual_file.mp4

[WIP/DEV Only] Ubuntu Touch on Nexus S

This topic is for developers and future testers, we are at least 3-4 people that try to boot Ubuntu Touch on Nexus S. Joint work would be better, don't you think?
IRC Channel: irc.androidirc.com #ubuntu-touch-crespo
Mibbit: http://client00.chat.mibbit.com/?server=irc.androidirc.org&channel=#ubuntu-touch-crespo
So now I am here: http://pastebin.com/RnvjqMBx
Blobs list: https://github.com/CyanogenMod/android_device_samsung_crespo/blob/cm-10.2/proprietary-blobs.txt
nyl said:
So now I am here: http://pastebin.com/RnvjqMBx
Blobs list: https://github.com/CyanogenMod/android_device_samsung_crespo/blob/cm-10.2/proprietary-blobs.txt
Click to expand...
Click to collapse
You can have tricks on the REAME-20130807 https://drive.google.com/#folders/0B_fPIBhY3pcRSVVBSDY1TjJKQXc
---------- Post added at 07:59 PM ---------- Previous post was at 07:54 PM ----------
Tygerlord said:
You can have tricks on the REAME-20130807 https://drive.google.com/#folders/0B_fPIBhY3pcRSVVBSDY1TjJKQXc
Click to expand...
Click to collapse
First step I think is trouble of data space (up to 1Go) seems too small
My goals is to modify script of saucy-preinstalled-touch-armhf.zip to
1 ) create /sdcard/tubuntu.img, ext4 image disk of up to 4 Go
2 ) mount loop /sdcard/tubuntu.img to /data/tubuntu
3 ) create symlink betwen /data/tubuntu/ubuntu /data/ubuntu
Q: Why I don't mount directly tubuntu.img to /data/ubuntu
A: deploy script use temp directories that need to be moved.
Currently process fail on creating file system tubuntu.img with code:
busybox mkfs.ext2 -F /sdcard/tubuntu.img
mkfs.ext2: lseek: Value too large for defined data type :crying::crying:
My saucy-preinstalled-touch-armhf+crespo.zip can be found here:
https://drive.google.com/#folders/0B_fPIBhY3pcRSVVBSDY1TjJKQXc
This can be installed with recovery (and should break anything). It take up to 10 minutes to install.
try making it vfat (not sure if ubuntu reads vfat), anyway something like this should be for a 4gb vfat i think.
Code:
mkdir /data/tubuntu
su
dd if=/dev/zero of=/sdcard/tubuntu.img bs=1024 count=4194340
busybox mkfs.vfat /sdcard/tubuntu.img
mount -o loop -t vfat /sdcard/tubuntu.img /data/tubuntu
Edit: http://e2fsprogs.sourceforge.net/ would be better for creating ext4 image
nyl said:
try making it vfat (not sure if ubuntu reads vfat), anyway something like this should be for a 4gb vfat i think.
Code:
mkdir /data/tubuntu
su
dd if=/dev/zero of=/sdcard/tubuntu.img bs=1024 count=4194340
busybox mkfs.vfat /sdcard/tubuntu.img
mount -o loop -t vfat /sdcard/tubuntu.img /data/tubuntu
Edit: http://e2fsprogs.sourceforge.net/ would be better for creating ext4 image
Click to expand...
Click to collapse
vfat can't support linux os...
Never mind, I've solved my problem.
Now I've a disk image tubuntu.img with saucy-preinstalled-touch-armhf expended on it.
I've /data/tubuntu to mount this image and symbolic link /data/ubuntu -> /data/tubuntu/ubuntu :good:
Next step, build kernel for crespo with mounting /sdcard/tubuntu.img and use root dir /data/ubuntu...
Tygerlord said:
vfat can't support linux os...
Never mind, I've solved my problem.
Now I've a disk image tubuntu.img with saucy-preinstalled-touch-armhf expended on it.
I've /data/tubuntu to mount this image and symbolic link /data/ubuntu -> /data/tubuntu/ubuntu :good:
Next step, build kernel for crespo with mounting /sdcard/tubuntu.img and use root dir /data/ubuntu...
Click to expand...
Click to collapse
almost done with the kernel hope it will work )
edit, find kernel here: https://drive.google.com/?tab=wo&authuser=0#folders/0B34Kseus4HL2ZEM5Mjd4YzNyREE
nyl said:
almost done with the kernel hope it will work )
Click to expand...
Click to collapse
Previous link for shared documents seems not working, this one should work better... I hope
okay i got into adb shell tried to manually mount /data/ubuntu, didn't work
Current test
nyl said:
okay i got into adb shell tried to manually mount /data/ubuntu, didn't work
Click to expand...
Click to collapse
mount -t ext4 /sdcard/tubuntu.img /data/tubuntu
This work for me, but my kernel build don't. Seem having trouble mounting system partition see attached file for dmesg.
Ok after lot of efforts I've install script creating ubuntu.img (based on saucy-preinstalled-touch-armhf.zip) on sdcard and kernel,
kernel mount correctly ubuntu.img but stay locked on google logo...
Adb is working and I retreive dmesg (see debug.txt file)
There are plenty of error and I can't understand what happen , missing knowledge on ubuntu touch process to debug that...
Since first release start on october 17 I think that developpers will be too busy for help now...
I can't progress anymore, current developments are available here
So I wait for help or more documentations on ubuntu touch process to continue...
Tygerlord said:
Ok after lot of efforts I've install script creating ubuntu.img (based on saucy-preinstalled-touch-armhf.zip) on sdcard and kernel,
kernel mount correctly ubuntu.img but stay locked on google logo...
Adb is working and I retreive dmesg (see debug.txt file)
There are plenty of error and I can't understand what happen , missing knowledge on ubuntu touch process to debug that...
Since first release start on october 17 I think that developpers will be too busy for help now...
I can't progress anymore, current developments are available here
So I wait for help or more documentations on ubuntu touch process to continue...
Click to expand...
Click to collapse
Last kernel seem produce less errors.. (but display still not working). I've message on log lxc-android-boot.log,
cp: cannot stat '/usr/lib/lxc-android-config/70-crespo.rules': No such file or directory
but I've created file (make a copy of other) and error still present, very strange!!!
Matsca09 Any news??

Question Fork Magisk for Vivo Devices

This post seeks attention of Senior XDA developers who are contributors of Magisk:
I have been struggling to fix Magisk mount and SU execution on VIVO devices.
Magisk issue #5148
VIVO/iQOO kernel restictions: "Operation not permitted" when executing `su` or mounting to `/system`, or bootloops if rooted · Issue #5148 · topjohnwu/Magisk
Device: iQOO Z1/VIVO X70 PRO/iQOO NEO3, and more Android version: N/A Magisk version name: N/A Magisk version code: N/A, but more serious since 24302 Magisk fails to mount /system on some Vivo/iQOO...
github.com
I am ready to work together to the best of my technical capacity.
I will pay for your test device and a special bounty for your hard work and development efforts.
Interested developers please reach out to me.
Actual problem is on Vivo devices only. Tested on Vivo Y33s and Y21.
When you call su, it returns: "Operation not permitted"
Trying to run /dev/xxxx/Magisk --daemon: "No daemon is currently running"
Previous attempts:
Problem seems to be SELinux policy, if you attempt to manually run from android debug builds, then the daemon is properly loaded.
2109:/dev/9Lgz # ./supolicy --magisk
Load policy from: /sys/fs/selinux/policy
2109:/dev/9Lgz # magisk --daemon
2109:/dev/9Lgz # magisk --path
/system/bin
2109:/dev/9Lgz # su
2109:/dev/9Lgz # id
uid=0(root) gid=0(root) groups=0(root),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),1078(ext_data_rw),1079(ext_obb_rw),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid) context=u:r:magisk:s0
With this solution, the problem is that we need to run this from "adb root" shell after every boot.
Is there any way to run this locally on a the device having debug build?
Where should I post this thread to find the right developers to solve this problem?
I would highly appreciate some help here.
Maybe you can try change 'su' to 'suu' or 'timesu', as the [ref](http://bbs.ydss.cn/thread-1528844-1-1.html) said.
Good luck and success to you!
JuanLv said:
Maybe you can try change 'su' to 'suu' or 'timesu', as the [ref](http://bbs.ydss.cn/thread-1528844-1-1.html) said.
Good luck and success to you!
Click to expand...
Click to collapse
I tried but no luck (
Looking for developers who have good knowledge of Magisk mount and magiskinit.
NextGenMagisk said:
Looking for developers who have good knowledge of Magisk mount and magiskinit.
Click to expand...
Click to collapse
The developer has made restrictions in the kernel as ref
| https://github.com/topjohnwu/Magisk/issues/5148#issuecomment-1167697477
Maybe we can make a workaround by kernel patch.
I'm not too familiar with these.
Do you have any idea?
JuanLv said:
The developer has made restrictions in the kernel as ref
| https://github.com/topjohnwu/Magisk/issues/5148#issuecomment-1167697477
Maybe we can make a workaround by kernel patch.
I'm not too familiar with these.
Do you have any idea?
Click to expand...
Click to collapse
Thanks for the update. Looks like this issue is not easy to fix and it depends on access to kernel sources for each device model. I am not familiar with Kernel patching.
My ideas are focused around leveraging debug builds to execute SU locally and then make it persist across reboots.
NextGenMagisk said:
Is there any way to run this locally on a the device having debug build?
Click to expand...
Click to collapse
vivo y31, LineageOS 19.1, userdebug
magisk 24.3 can inject code in init.rc, can't mount /system /vendor /oem
magisk >24.3 can't inject code, because magisk switched to new method wich requires mounting /system. Zygisk is broken since 2431*
If you want to have adb root, then you can use phh-su(if you use gsi) and execute in termux
su -c setprop service.adb.root 1
su -c setprop service.adb.tcp.port 5555
su -c stop adbd
su -c start adbd
adb wait-for-device
adb shell whoami
Without phh-su you would need to split screen [termux + developer options/wifi debugging] and pair with code
one time in termux
adb pair localhostort code
no need to split screen anymore
then off -on wifi debugging
adb connect localhost:newport
adb root
off-on wifi debugging again
adb kill-server
adb connect localhost:newnewport
gz! you're root
Another way is to edit init.rc. Just look at magiskrc.inc from the source code.
I have no problems with zygisk and modules on 24.3 magisk. I just mounting overlayfs on top of /system and then just copy all modules into /system.
Here is my .rc script which I pushed in boot.img like this
./magiskboot unpack boot.img
./magiskboot cpio ramdisk.cpio 'add 0644 overlay.d/ofs.rc ofs.rc'
./magiskboot repack boot newboot.img
script
on load_persist_props_action
exec u:r:su:s0 -- /system/bin/mount -t overlay overlay -o lowerdir=/system,upperdir=/data/system/ou,workdir=/data/system/ow /system
on zygote-start
exec u:r:su:s0 -- /system/bin/mount /sbin/.magisk/zygisk/app_process32 /system/bin/app_process32
exec u:r:su:s0 -- /system/bin/mount /sbin/.magisk/zygisk/app_process64 /system/bin/app_process64
Then just create two folders
/data/system/ou
/data/system/ow
And copy modules files in upper layer(real system will not be modified)
su -c cp -r /sbin/.magisk/modules/*/system/* /system
If you need to revert changes then you can delete two folders and create them again. Or you can delete module files like this
cd /sbin/.magisk/modules/{Module Name}/system/
find -exec rm /system/{} \;
cd /data/system/ou
find . -type d -empty -delete
If you want to boot with real /system then just rename two folders
mount -t overlay
overlay on /system type overlay (rw,seclabel,relatime,lowerdir=/system,upperdir=/data/system/ou,workdir=/data/system/ow)
mount | grep " / "
/dev/block/dm-0 on / type ext4 (ro,seclabel,nodev,relatime,discard)
Pervokur said:
mount -t overlay
overlay on /system type overlay (rw,seclabel,relatime,lowerdir=/system,upperdir=/data/system/ou,workdir=/data/system/ow)
mount | grep " / "
/dev/block/dm-0 on / type ext4 (ro,seclabel,nodev,relatime,discard)
Click to expand...
Click to collapse
This is extremely helpful and has given me a very clear path to solve problems with Vivo root. I will implement these suggestions. Thanks a lot.
NextGenMagisk said:
This is extremely helpful and has given me a very clear path to solve problems with Vivo root. I will implement these suggestions. Thanks a lot.
Click to expand...
Click to collapse
Another tip from me. There is a way to have system rw for magisk root. At least it works for me on LOS19.1 userdebug gsi, vndklite variant, magisk24.3
Normaly
magisk-su: mount -o rw,remount /
operation not permitted
adb root:mount -o rw,remount /
ok
but / is still ro for magisk-su
Then I just kill surfaceflinger which leads to zygote restart(aka soft reboot)
su -c killall surfaceflinger
After booting / is rw for magisk-su and you can work with partition in file manager like Total Commander.
Pervokur said:
Another tip from me. There is a way to have system rw for magisk root. At least it works for me on LOS19.1 userdebug gsi, vndklite variant, magisk24.3
Normaly
magisk-su: mount -o rw,remount /
operation not permitted
adb root:mount -o rw,remount /
ok
but / is still ro for magisk-su
Then I just kill surfaceflinger which leads to zygote restart(aka soft reboot)
su -c killall surfaceflinger
After booting / is rw for magisk-su and you can work with partition in file manager like Total Commander.
Click to expand...
Click to collapse
Again a great tip, thanks!
I am currently testing your previous suggestions to inject custom init script on Y33s.
you can test this with adb root without editing boot.img or init.rc
NextGenMagisk said:
Again a great tip, thanks!
I am currently testing your previous suggestions to inject custom init script on Y33s.
Click to expand...
Click to collapse
adb shell
mount -t overlay overlay -o lowerdir=/system,upperdir=/data/system/ou,workdir=/data/system/ow /system
mount /sbin/.magisk/zygisk/app_process32 /system/bin/app_process32
mount /sbin/.magisk/zygisk/app_process64 /system/bin/app_process64
then restart zygote
killall surfaceflinger
zygote will restart, but mounts will still be there
Pervokur said:
you can test this with adb root without editing boot.img or init.rc
adb shell
mount -t overlay overlay -o lowerdir=/system,upperdir=/data/system/ou,workdir=/data/system/ow /system
mount /sbin/.magisk/zygisk/app_process32 /system/bin/app_process32
mount /sbin/.magisk/zygisk/app_process64 /system/bin/app_process64
Click to expand...
Click to collapse
mount overlay is working when executed from adb root.
but i cant get past the second step:
2109:/data/system/ow # mount /sbin/.magisk/zygisk/app_process32 /system/bin/app_process32
mount: '/sbin/.magisk/zygisk/app_process32'->'/system/bin/app_process32': No such file or directory
1|2109:/data/system/ow #
1|2109:/data/system/ow # mount /sbin/.magisk/zygisk/app_process64 /system/bin/app_process64
mount: '/sbin/.magisk/zygisk/app_process64'->'/system/bin/app_process64': No such file or directory
what must be causing this?
NextGenMagisk said:
mount overlay is working when executed from adb root.
but i cant get past the second step:
2109:/data/system/ow # mount /sbin/.magisk/zygisk/app_process32 /system/bin/app_process32
mount: '/sbin/.magisk/zygisk/app_process32'->'/system/bin/app_process32': No such file or directory
1|2109:/data/system/ow #
1|2109:/data/system/ow # mount /sbin/.magisk/zygisk/app_process64 /system/bin/app_process64
mount: '/sbin/.magisk/zygisk/app_process64'->'/system/bin/app_process64': No such file or directory
what must be causing this?
Click to expand...
Click to collapse
you didn't activate zygisk in magisk settings, so there are no files /sbin/.magisk/zygisk/app_process32
/sbin/.magisk/zygisk/app_process64
Pervokur said:
you didn't activate zygisk in magisk settings, so there are no files /sbin/.magisk/zygisk/app_process32
/sbin/.magisk/zygisk/app_process64
Click to expand...
Click to collapse
I cant enable it because Magisk daemon does not run at boot. Superuser tab in the app is greyed out.
testing this on a Vivo PD2147F debug build with Magisk patched boot and ofs.rc entry included.
NextGenMagisk said:
I cant enable it because Magisk daemon does not run at boot. Superuser tab in the app is greyed out.
testing this on a Vivo PD2147F debug build with Magisk patched boot and ofs.rc entry included.
Click to expand...
Click to collapse
even with magisk 24.3?
Pervokur said:
even with magisk 24.3?
Click to expand...
Click to collapse
Yes, patched magisk 24306. tmp dir with random name under /dev is created with root rights but the magic mount fails and hence the superuser tab is greyed out.
Magisk issue #5148
VIVO/iQOO kernel restictions: "Operation not permitted" when executing `su` or mounting to `/system`, or bootloops if rooted · Issue #5148 · topjohnwu/Magisk
Device: iQOO Z1/VIVO X70 PRO/iQOO NEO3, and more Android version: N/A Magisk version name: N/A Magisk version code: N/A, but more serious since 24302 Magisk fails to mount /system on some Vivo/iQOO...
github.com
Then you should manually add something like this to the end of init.rc
on load_persist_props_action
exec u:r:su:s0 -- /system/bin/mount -t overlay overlay -o lowerdir=/system,upperdir=/data/system/ou,workdir=/data/system/ow /system
on zygote-start
exec u:r:su:s0 -- /system/bin/mount /sbin/.magisk/zygisk/app_process32 /system/bin/app_process32
exec u:r:su:s0 -- /system/bin/mount /sbin/.magisk/zygisk/app_process64 /system/bin/app_process64
on post-fs-data
start logd
rm /dev/.magisk_unblock
start mqVxwb7J
wait /dev/.magisk_unblock 40
rm /dev/.magisk_unblock
service mqVxwb7J /sbin/magisk --post-fs-data
user root
seclabel u:r:magisk:s0
oneshot
service DC83jQtNHiJDw8 /sbin/magisk --service
class late_start
user root
seclabel u:r:magisk:s0
oneshot
on property:sys.boot_completed=1
start Zaw2TLXyH
service Zaw2TLXyH /sbin/magisk --boot-complete
user root
seclabel u:r:magisk:s0
oneshot

Categories

Resources