How to resolve / what is htcfs-main - HD2 Android Q&A, Help & Troubleshooting and Genera

Hi, I have problem with porting htc bliss rom, I getting logcat message "htcfs-main no mountpoint", what is htcfs and how to resolve problem with it, anyone know??

I could be wrong but it is specific to HTC and Sense based roms. htcfs-main is HTC the corporation name or handleTextchange from what i gathered from googling
http://sixgun.org/bugs/show_bug.cgi?format=multiple&id=14 and fs is file system and -main is probably the main file system. But read thru this and you can probably decipher it better than me. http://www.google.com/search?gcx=c&sourceid=chrome&ie=UTF-8&q=what+is+htcfs-main? once again Google is your friend. Hope this helps since this thread had over 40 veiws and no one bother to even respond.

Read through the init for the kernel, and look for anything relating to htcfs-main, and change it to "system" or whatever your sys fs is designated as.
I.e.
mount -t htcfs-main sys /sys
Or something along those lines.
Hopethis helps
Sent from my HD2 using xda premium

z3nful said:
Read through the init for the kernel, and look for anything relating to htcfs-main, and change it to "system" or whatever your sys fs is designated as.
I.e.
mount -t htcfs-main sys /sys
Or something along those lines.
Hopethis helps
Sent from my HD2 using xda premium
Click to expand...
Click to collapse
Resolved!
insmod fuse.ko
mkdir /data/htcfs
mounted without problem:
service htcfs /system/bin/htcfs /data/htcfs -f -o allow_other
onrestart restart fusermount
onrestart restart umount

Related

How can I mount a NFS share?

Hi,
Im using Cyanogenmod 5.0.8 on my htc Dream (G1).
I want to mount my NFS share with my music collection just as i do it with my pcs.
Code:
su
mount -t nfs 192.168.1.102:/media/media /sdcard/media
mount: mounting //192.168.1.102/media/media on /sdcard/media failed: No such device
Whats wrong?
Is there no NFS client support in the kernel?
Thanks,
Foyaxe
Unfortunately, this post probably comes way too late for the original poster, but it may be useful for anyone else, like me, who stumbles across this thread looking for a way to mount nfs on Android devices.
The answer is to use busybox.
There is support for nfs version 3 in the kernel, but the standard mount command seems to have been hobbled. The busybox mount command seems to work exactly the same as the standard linux mount command (except that it actually works on Android )
After downloading busybox from the Android Market, this is the command I use:
Code:
busybox mount -o nolock,ro,hard,intr,vers=3 -t nfs 192.xxx.xxx.x.x:/your/nfs/share /mnt/sdcard/YourLocalFolder
I'm not sure how important all the options are, but I suspect that vers=3 is important at least. nolock, hard and intr are also useful when having problems mounting according to the mount man page.
Thailandian said:
Unfortunately, this post probably comes way too late for the original poster, but it may be useful for anyone else, like me, who stumbles across this thread looking for a way to mount nfs on Android devices.
The answer is to use busybox.
There is support for nfs version 3 in the kernel, but the standard mount command seems to have been hobbled. The busybox mount command seems to work exactly the same as the standard linux mount command (except that it actually works on Android )
After downloading busybox from the Android Market, this is the command I use:
Code:
busybox mount -o nolock,ro,hard,intr,vers=3 -t nfs 192.xxx.xxx.x.x:/your/nfs/share /mnt/sdcard/YourLocalFolder
I'm not sure how important all the options are, but I suspect that vers=3 is important at least. nolock, hard and intr are also useful when having problems mounting according to the mount man page.
Click to expand...
Click to collapse
I am getting 'failed invalid argument' ;(
Trying since quite a while now but won't work. Any more hints?
cheers,
ArneAC said:
I am getting 'failed invalid argument' ;(
Click to expand...
Click to collapse
Well the good news is that 'failed invalid argument' probably means that it's just a typing mistake or something similar. This should be fairly easy to solve.
One idea to check first - you need to create the directory that you want to mount your NFS share onto before you can mount it. If I remember rightly, failing to do that will give you an 'invalid argument' error.
Also, you will need to give the command root privileges - but I think you must have already done that or you would be getting a 'permissions' error rather than 'invalid argument'.
Failing that, I suggest that you copy and paste the command you are using here - although you should replace your server's ip address with x's as I did for security.
Then I can have a look at it to see if there's anything obvious.
Cheers
You can also use AndSmb from Market to connect to Windows shares or Samba shares on Linux.
ArneAC said:
I am getting 'failed invalid argument' ;(
Trying since quite a while now but won't work. Any more hints?
cheers,
Click to expand...
Click to collapse
I'm getting the same invalid argument. It is not a typo, but I don't know what the cause of the problem is.
in busybox, my commands are:
Code:
su
mount -t nfs 192.168.1.1:/DataVolume/Public ~/Downloads/temp/
adding or removing the various options such as "-o nolock,ro,hard,intr,vers=3"
does not make a difference.
It is not a problem with the local mount point -- that error is "no such file or directory".
This error is "failed: invalid argument" -- even with no arguments other than "-t nfs".
lsmod shows the modules loaded:
nfs 104232 0 - Live 0xbf036000
lockd 42336 1 nfs, Live 0xbf028000
sunrpc 150792 3 nfs,lockd, Live 0xbf000000
Can anyone help? Thanks.
P.S. I'm testing with NFS v3, but my ultimate goal is to connect to an NFSv4 server. Does busybox support NFSv4 mounts?
EDIT: it looks like this error "invalid argument" may be due to a conflict between versions of busybox and linux.
Found this here
This is how I interpret it.
kernel is newer - recompile mount command (i.e. busybox etc)
Make sure that it uses the headers from the kernel it will run with.
Click to expand...
Click to collapse
My linux is 3.0.8-GLaDOS-V1-15
My busybox is 1.19.3-Stericson
Any idea how to proceed?
I ran into this same issue on my new Acer A200 (busybox 1.19.3-Stericson) and my host server is using NFS V3. I'm wondering if your 3.0 server might be using NFS V4 and support is not enabled? Here is an excerpt from my /proc/config.gz on the Acer. Ideally V3 and V4 would have been set.
CONFIG_LOCKD=y
CONFIG_SUNRPC=y
CONFIG_NFS_FS=y
# CONFIG_NFS_V3 is not set
# CONFIG_NFS_V4 is not set
CONFIG_ROOT_NFS=y
# CONFIG_NFSD is not set
CONFIG_NFS_COMMON=y
Now I suppose in my case that if I really want this to work that I'd have to learn how to create a build environment and compile a nfs.ko myself.
EDIT: I just seen that you specifically stated you are testing w/NFS v3
acertabuser said:
Now I suppose in my case that if I really want this to work that I'd have to learn how to create a build environment and compile a nfs.ko myself.
Click to expand...
Click to collapse
That's what I'm thinking too.
In the mean time the short term solutions I'm considering are either samba (CIFS) or SFTP (i.e., the SSH file system). I've been using SFTP in the other direction (PC to phone) and it works great. I haven't test using it on the phone to mount the share from the PC yet, but I hope to do that this weekend.
Tried to nfs mount from a CM9 running galaxy nexus, kernel self compiled and surely contains NFS (client and server).
Doesn't work, the same way already described here.
Looking at the source and build intermediates, it appears to me that
1) the CM9 compiled busybox does not contain NFS mounting code.
2) busybox does not support mounting NFS v4 at all
Trying to compile busybox with nfs support builtin, breaks because several header files related to
RPC and portmapper appear to be missing from the android sources. Which is probably the reason why
NFS in not in the standard busybox mount...
Oh, how I wish nfs mounting were handled by the kernel, instead of relying on magic code in the userlevel mount...
brian_o'fish said:
Tried to nfs mount from a CM9 running galaxy nexus, kernel self compiled and surely contains NFS (client and server).
Doesn't work, the same way already described here.
Looking at the source and build intermediates, it appears to me that
1) the CM9 compiled busybox does not contain NFS mounting code.
2) busybox does not support mounting NFS v4 at all
Trying to compile busybox with nfs support builtin, breaks because several header files related to
RPC and portmapper appear to be missing from the android sources. Which is probably the reason why
NFS in not in the standard busybox mount...
Oh, how I wish nfs mounting were handled by the kernel, instead of relying on magic code in the userlevel mount...
Click to expand...
Click to collapse
Thanks for sharing your findings. Very interesting. I guess the next option would be to compile the mount command and use that rather than using the BusyBox mount...
works for me
MountainX said:
I guess the next option would be to compile the mount command and use that rather than using the BusyBox mount...
Click to expand...
Click to collapse
Well, there already _is_ nfs mount code in busybox, but it was configured away, because it needs the SUN RPC library, which is missing from Android / Bionic. That issue would probably also exist for mount.nfs from other sources, which would most likely also need additional porting work.
Thus, I snatched the librpc code from uClibc today, and meddled with it until it compiled in my copy of the CM9 sources. Got it to work! I can now NFS mount on my GNex, and the freshly built and installed update.zip was copied onto the device via NFS
I sent the changes to the cyanogen review system. That was my first contribution ever - I have no idea whether they will like it or not.
If you would like to try it out - and have a KERNEL with NFS support compiled in - send me an E-Mail, and I'll send you a statically compiled busybox (approx. 800k) back that you can play with.
brian_o'fish said:
Well, there already _is_ nfs mount code in busybox, but it was configured away, because it needs the SUN RPC library, which is missing from Android / Bionic. That issue would probably also exist for mount.nfs from other sources, which would most likely also need additional porting work.
Thus, I snatched the librpc code from uClibc today, and meddled with it until it compiled in my copy of the CM9 sources. Got it to work! I can now NFS mount on my GNex, and the freshly built and installed update.zip was copied onto the device via NFS
I sent the changes to the cyanogen review system. That was my first contribution ever - I have no idea whether they will like it or not.
If you would like to try it out - and have a KERNEL with NFS support compiled in - send me an E-Mail, and I'll send you a statically compiled busybox (approx. 800k) back that you can play with.
Click to expand...
Click to collapse
Congratulations! That's very cool! I just sent you my email address. I'm looking forward to trying your busybox. Good job getting this to work!
brian_o'fish said:
If you would like to try it out - and have a KERNEL with NFS support compiled in - send me an E-Mail, and I'll send you a statically compiled busybox (approx. 800k) back that you can play with.
Click to expand...
Click to collapse
I got it. Thank you! How do I use it? Do I just replace /system/xbin/busybox with your (renamed) statically compiled file?
I'm running the GLaDOS kernel which claims to have NFS support, so we'll see what happens. Since you and I have the same phone (GSM GNex), if this doesn't work, my next step will be to do exactly what you did and compile my own CM9. I have never done that before, so I would appreciate anything you can share about the steps you did. Thanks again!
MountainX said:
I got it. Thank you! How do I use it? Do I just replace /system/xbin/busybox with your (renamed) statically compiled file?
I'm running the GLaDOS kernel which claims to have NFS support, so we'll see what happens.
Click to expand...
Click to collapse
There is also the question of where you would put the mountpoint.
To test it out, (as root) I made a directory /data/data/de.bof.mounts/, copied
the busybox file there and made it executable (chmod 700 file), made a
subdirectory mnt there, and then ran './busybox mount -o nolock -t nfs SER.VER.I.P:/export/path ./mnt'
You can use the normal 'umount' command to unmount later.
Since you and I have the same phone (GSM GNex), if this doesn't work, my next step will be to do exactly what you did and compile my own CM9. I have never done that before, so I would appreciate anything you can share about the steps you did. Thanks again!
Click to expand...
Click to collapse
If you want to go down that road, here's the feedback I got when I asked about that 10 days ago:
http://forum.xda-developers.com/showpost.php?p=22706426&postcount=352
In comment 360 there, I write a bit about the amount of source fetched from the net, and how much disk space you would need.
The most problematic part will be setting up your compile host with all the neccessary development packages, which is very dependant on what kind of host system / distribution you use. Google describes it here for an Ubuntu 10.04 install: http://s.android.com/source/initializing.html - which fortunately gave me enough hints to get my openSUSE 11.4 system into working order after half a day of builds aborting in mid-flight...
Your best bet is probably setting up a fresh Ubuntu 10.04 virtual server with approx. 64 GB hard disk and 8 GB RAM, as that is what google appears to use.
Thanks again. That's great info.
I'm testing the first option, which is using busybox the same way you used it.
For me, that involves two steps (loading modules and issuing the mount command).
Here's what I'm doing. I realize I probably don't need to load all these modules, but I'm doing it anyway.
My statically compiled busybox (which you supplied) is in /system/xbin/ and it is executable.
cd /system/xbin/
insmod /system/modules/sunrpc.ko
insmod /system/modules/lockd.ko
insmod /system/modules/nfs.ko
./busybox mount -t nfs 192.168.1.11:/Public /sdcard/nfs/Public
The error is:
mount: Mounting 192.168.1.11:/Public on yigit failed: Protocol not supported
My guess is that the kernel (GLaDOS) which claims to have NFS support may not actually have it (even though it does ship with both nfs.ko and nfsd.ko). Hopefully, I'm wrong on that point and there is a simple mistake I'm making.
For mount commands I have tried all these:
mount -o nolock -t nfs 192.168.1.11:/Public /sdcard/nfs/Public
mount -o vers=3 -t nfs 192.168.1.11:/Public /sdcard/nfs/Public
mount -o prot=17 -t nfs 192.168.1.11:/Public /sdcard/nfs/Public
mount -o prot=6 -t nfs 192.168.1.11:/Public /sdcard/nfs/Public
I had no success with any of them (although the errors were different with some of them). The last two simply report "failed" with no additional detail.
MountainX said:
Here's what I'm doing. I realize I probably don't need to load all these modules, but I'm doing it anyway.
Click to expand...
Click to collapse
Well, I built my kernel nonmodular / have NFS compiled in, as CM9 does not
even have a modules directory + I don't want to hassle with loading modules
before use.
Anyway - to check that after loading the modules, the kernel thinks it has
an nfs client filesystem type, have a look at /proc/filesystems. For NFS v3,
you need an entry reading nodev nfs there.
./busybox mount -t nfs 192.168.1.11:/Public /sdcard/nfs/Public
The error is:
mount: Mounting 192.168.1.11:/Public on yigit failed: Protocol not supported
Click to expand...
Click to collapse
Hmm. Did you check that the NFS server supports the NFS v3 protocol?
Try mounting it using mount -t nfs -o vers=3 ... from your desktop box.
If that does not help - do you have an "strace" program? Then you might try
to run (on device) something like
strace -o /sdcard/mount.nfs.trc /system/xbin/busybox.static mount -t nfs -o vers=3,nolock ...
Click to expand...
Click to collapse
and then e-mail me the /sdcard/mount.nfs.trc file? That will give a hint about
which step in the mounting receives the error.
Would you mind sharing your busybox binary? I got my modules compiled for the kernel and they are loading just fine but the busybox binary I have is missing the nfs functionality as previously mentioned in this thread. And I currently don't have the ressources to build half the android framework.
cyanogenmod NFS mount testing
xywin said:
Would you mind sharing your busybox binary? I got my modules compiled for the kernel and they are loading just fine but the busybox binary I have is missing the nfs functionality as previously mentioned in this thread. And I currently don't have the ressources to build half the android framework.
Click to expand...
Click to collapse
There are now available for testing, several cyanogenmod static busybox
binaries, as well as a CM9 kernel with NFS support.
Visit http://bei.bof.de/droid/mykernel/ for directions and download links.
brian_o'fish said:
There are now available for testing, several cyanogenmod static busybox
binaries, as well as a CM9 kernel with NFS support.
Visit http://bei.bof.de/droid/mykernel/ for directions and download links.
Click to expand...
Click to collapse
Okay I tried your busybox version and it works pretty good. After I realized I forgot to add nfs v3 and v4 support in the module >.>. But yeah it works. The nolock switch is of course mandatory for the mount. Unless you intend to start a portmap daemon.
MountainX said:
Thanks again. That's great info.
I'm testing the first option, which is using busybox the same way you used it.
For me, that involves two steps (loading modules and issuing the mount command).
Here's what I'm doing. I realize I probably don't need to load all these modules, but I'm doing it anyway.
My statically compiled busybox (which you supplied) is in /system/xbin/ and it is executable.
The error is:
mount: Mounting 192.168.1.11:/Public on yigit failed: Protocol not supported
My guess is that the kernel (GLaDOS) which claims to have NFS support may not actually have it (even though it does ship with both nfs.ko and nfsd.ko). Hopefully, I'm wrong on that point and there is a simple mistake I'm making.
Click to expand...
Click to collapse
I got that error in the beginning. As mentioned I forgot to tick the boxes for v3 and v4 support in the nfs module. If you have the kernelconfig you can just add the the functionality and push the kernel modules. No need to flash a new kernel. For NFSv4 support you also need to add auth_rpcgss.ko and rpcsec_gss_krb5.ko in that order before loading nfs.ko
A little speed test:
Procedure: Copying a 1GB file via WLAN (n-Wlan) over both the CIFS and NFS mount. Timed with `time` and using a simple `cp`
Result: CIFS comes in at 1.654MB/s and NFSv3 at 3.219MB/s. So with NFS it's actually possible to watch HD-movies over the network. Finally
CIFSManager:
If you want to use CIFSManager you have to do the following (as root):
Code:
rm /system/bin/mount
ln -sf /system/bin/busybox.static /system/bin/mount
To autoload the modules with CIFSManager open the options and tick every box and change the value of the "Path to cifs.ko" to the following value:
Code:
/system/lib/modules/sunrpc.ko:/system/lib/modules/auth_rpcgss.ko:/system/lib/modules/rpcseg_gss_krb5.ko:/system/lib/modules/lockd.ko:/system/lib/modules/nfs.ko:/system/lib/modules/cifs.ko
Now you can add NFS mounts using the following syntax when creating a new share:
Code:
XXX.XXX.XXX.XXX:/path/to/your/export
Don't forget the colon. In the option parameter for the new mount add "nolock" without the " of course.
Thanks xywin for testing and reporting!
One question though: you talk about NFSv4. I had the impression that my static busybox contains no code at all to do v4 mounting. It tells me "NFSv4 not supported" when trying to force v4 mounts.
Are you sure you have it work with v4?

Minimal UI for LUKS encryption on the Wildfire

This is a basic gui I wrote to unlock my encrypted partitions during boot.
I'm running my /data and /sdcard partitions encrypted, and the "luksunlock" binary is launched from init.rc to read the password and unlock the encrypted partitions.
I have included my somewhat modified init.rc for those interested.
For more information about LUKS on Android see this blogpost, written by shawn (Seems I'm not allowed to have urls in the post, but Google for 'android luks' , first hit)
This works good on Wildfire, altough it should work fine on other phones as well. Just remember that you need to set up your partitions as in the luksunlock.c (or change the defines).
Dont forget to backup before you start playing around!
Good luck!
Thanks! i'll give a try!
Hi,
I tried to use your cryptsetup binary from your blog, but I have some issues that you'll sure have an answer:
I run ./cryptsetup luksFormat -c aes-plain /dev/block/loop2 and after i put the luks password it says 'Command failed', no logs, no other output, even using the -v flag...
Any clue?
Thanks in advance!
PS: the module dm-crypt is necessary for cryptsetup? could be this the error? I don't have it installed on the system because I can't find it for 2.6.35.9-cyanogenmod
tusabe said:
Hi,
I tried to use your cryptsetup binary from your blog, but I have some issues that you'll sure have an answer:
I run ./cryptsetup luksFormat -c aes-plain /dev/block/loop2 and after i put the luks password it says 'Command failed', no logs, no other output, even using the -v flag...
Any clue?
Thanks in advance!
PS: the module dm-crypt is necessary for cryptsetup? could be this the error? I don't have it installed on the system because I can't find it for 2.6.35.9-cyanogenmod
Click to expand...
Click to collapse
CM6.1 for wildfire uses a 2.6.32 kernel (see HCDR.jacob's post about his custom kernel for more info)
tusabe said:
PS: the module dm-crypt is necessary for cryptsetup? could be this the error? I don't have it installed on the system because I can't find it for 2.6.35.9-cyanogenmod
Click to expand...
Click to collapse
Yeah you really need dm-crypt support, either compiled into the kernel or as a module. You also need the AES ciphers support.
sigkill1337 said:
Yeah you really need dm-crypt support, either compiled into the kernel or as a module. You also need the AES ciphers support.
Click to expand...
Click to collapse
Hi! Yeah, that's what I was afraid of.... ok, but the problem is that i'm running CM6.1 with 2.6.35.9 which has no dm-crypt module neither compiled in kernel... where can i find some kernel with this modules included? Is for an HTC Desire (@Sympnotic )
Thanks in advance!
Great work and thanks for sharing @Sigkill. Working on building it here for my NexusOne with CM6.1.
BTW, I’m the lead on a project working on general secure Android distro – we’ve ported Tor, have an OTR IM app, and have supported other projects along those lines. Would love to talk more about supporting anyone working on this specific capability.
wow! awesome work!!! Very exciting news. Gonna give this a go on my MyTouch Slide
NathanFreitas said:
Great work and thanks for sharing @Sigkill. Working on building it here for my NexusOne with CM6.1.
BTW, I’m the lead on a project working on general secure Android distro – we’ve ported Tor, have an OTR IM app, and have supported other projects along those lines. Would love to talk more about supporting anyone working on this specific capability.
Click to expand...
Click to collapse
Seems really nice. I like the secure phone concept.
New Makefile and wiki info up
_hc from the @guardianproject has a new build process up for Crypsetup/LUKS which includes a Makefile compatible with Android NDK r5.
We have new instructions up on our wiki, as well.
I cannot post links under this account, but you can find the info on github if you search "LUKS" or just under our guardianproject account.
How did you create the encrypted partitions? Could you give some pointers for that. I am familiar with using dmcrypt/cryptsetup on desktop linux, I guess this works similar. What are the relevant device names? Did you run into any problems?
Calavera1 said:
How did you create the encrypted partitions? Could you give some pointers for that. I am familiar with using dmcrypt/cryptsetup on desktop linux, I guess this works similar. What are the relevant device names? Did you run into any problems?
Click to expand...
Click to collapse
Hi, sorry for the late answer,
/dev/block/mtdblock5 is the "userdata" partition. I formatted it and mount it to /encrypted-data during init:
mount yaffs2 [email protected] /encrypted-data nosuid nodev
The only file on this partition is "data.encrypted" file, which gets created in init.rc as a loopback device:
exec /system/bin/losetup /dev/block/loop0 /encrypted-data/data.encrypted
I created the "data.encrypted" file on my computer with cryptsetup and losetup, and copied all files from my old unencrypted userdata partition to it and then copied it back as a file to the formated userdata partition.
The sdcard "/dev/block/mmcblk0p2" partition is formated with "cryptsetup luksFormat", I did this also on my computer, saves some time. And then copy everything from the old unencrypted sdcard.
I did run in to one problem recently, my phone hung during boot, about 4 months after I started encrypting my phone.
Had to copy my data.encrypted file to my computer, mount it as a loopback device and do a fsck, and then copy it back to my phone.
I suspect this has to do with the filesystem not being umounted properly. (I have had this on my to do list for a while hehe)
Probably should make a script run during shutdown to cleanly "luksClose" the encrypted partition and then umount them. Not doing this is probably very crazy
I also want to fix it so my "/dev/block/mmcblk0p2" partition gets presented to my computer when i attach my usb cable (as it should do), so i can unlock it in ubuntu and copy images and files. Right now i have to take my memorycard out and put it into the computer.
I hope this post makes sense, it was written in haste =) Good luck!
sigkill1337 said:
Hi, sorry for the late answer,
/dev/block/mtdblock5 is the "userdata" partition. I formatted it and mount it to /encrypted-data during init:
mount yaffs2 [email protected] /encrypted-data nosuid nodev
The only file on this partition is "data.encrypted" file, which gets created in init.rc as a loopback device:
exec /system/bin/losetup /dev/block/loop0 /encrypted-data/data.encrypted
I created the "data.encrypted" file on my computer with cryptsetup and losetup, and copied all files from my old unencrypted userdata partition to it and then copied it back as a file to the formated userdata partition.
The sdcard "/dev/block/mmcblk0p2" partition is formated with "cryptsetup luksFormat", I did this also on my computer, saves some time. And then copy everything from the old unencrypted sdcard.
I did run in to one problem recently, my phone hung during boot, about 4 months after I started encrypting my phone.
Had to copy my data.encrypted file to my computer, mount it as a loopback device and do a fsck, and then copy it back to my phone.
I suspect this has to do with the filesystem not being umounted properly. (I have had this on my to do list for a while hehe)
Probably should make a script run during shutdown to cleanly "luksClose" the encrypted partition and then umount them. Not doing this is probably very crazy
I also want to fix it so my "/dev/block/mmcblk0p2" partition gets presented to my computer when i attach my usb cable (as it should do), so i can unlock it in ubuntu and copy images and files. Right now i have to take my memorycard out and put it into the computer.
I hope this post makes sense, it was written in haste =) Good luck!
Click to expand...
Click to collapse
I figured most of that out without your post and tried it on my desire (I created the luks partitions with adb on the phone though, worked anyway ). Then I couldn't figure out where my regular init.rc is stored (I could only find the one used by Clockwork Recovery), and then I figured I already spent enough time, tried a reboot (which of course didn't work). Then I couldn't even get into recovery (probably because its init.rc tries to mount /data which doesn't work? I didn't investigate any further). Flashed my backup with fastboot and was stuck again with my un-encrypted pre-experiment state
Oddly enough, it was no problem to unlock my encrypted SD-card from my computer (running ubuntu) while in recovery (clockword has an option to present the sd card to a computer connected via usb). Maybe the booted system handles this differently than recovery though? I didn't get a chance to try, as I couldn't boot after my encryption attempt.
I will try again after my algorithm and data structure exam this friday and report back
Is anybody using the UI on another device than the Wildfire? Does it work?
How much is the performance drain when using an encrypted /data partition?
Amazing work!
Did anyone manage to make sigkill1337's luksunlock build from source ?
I would like to change the path of the data/sdcard partitions to match my device but I tried many ways using the NDK and I can't get it to compile properly.
Is there any way to do this ?
I have been trying for days, I am getting literaly insane !
@sigkill1337 : could you give me some pointers ? I would appreciate a lot.
mount manpage said:
The bind mounts.
Since Linux 2.4.0 it is possible to remount part of the file hierarchy somewhere else. The call is
mount --bind olddir newdir
or shortoption
mount -B olddir newdir
or fstab entry is:
/olddir /newdir none bind
After this call the same contents is accessible in two places. One can also remount a single file (on a single file).
This call attaches only (part of) a single filesystem, not possible submounts. The entire file hierarchy including submounts is attached a second place using
mount --rbind olddir newdir
or shortoption
mount -R olddir newdir
Note that the filesystem mount options will remain the same as those on the original mount point, and cannot be changed by passing the -o option along with --bind/--rbind. The mount options can be changed by a separate remount command, for example:
mount --bind olddir newdir
mount -o remount,ro newdir
Click to expand...
Click to collapse
If nothing helps, you should always be able to bindmount it
I'd rather get sigkill1337's UI to compile...
Lots of nice security tweaks and settings could be done with a pre-boot GUI
Anyway, concerning encryption, I'll use the bind option for now, thanks for the tip.
But if anyone here could give me some pointers about compiling this stuff it would be great.
I managed to compile it by integrating luksunlock in Android source externals and main.mk but when I push it to my phone and modify init.rc to call it, it just does not work...
Other modifications are working (mount, mkdir, etc.) but the GUI won't show up
Sorry for the late reply.. But you could try running it from a shell when the phone is booted, just to verify that the binary starts (thats how I tested it without having to reboot my phone all the time)
My environment for building the source was setup using one of the tutorials online, nothing out of the ordinary
Im still running this on my phone, for almost 8 months now, I havent noticed that much in performance problems, the Wildfire was slow before i started using luks.
When i get a new phone (maybe SE Arc) i will be easier to see if performance is affected
There is an Issue for getting CM support for encrypted filesystems during boot:
Issue 2736: support encrypted filesystem from boot
If you want to get that feature, just "star" it, so it may get more attention.

Deleted for obvious reasons

Deleted for obvious reasons
Dude, really???
Sorry, i re read your post, and read it wrong the first time.
Do you have a recovery disk for your computer?
Sent from my X10a using XDA App
In sys folder there is looong kernel loop, that is the reason for so much files...
Sent from my E15i using XDA App
opposite of the /bro folder
ROFL! Dude.. reload your computer, try running Linux if you have at least dual core and download VirtualBox 4 - it's free - load Windaz as a virtual appliance and then your problem is only to back up to an external drive and keep a disc handy in case you crack your own bootloader by accident
<waffle>
If your really feel brave try open solaris, the Z file system is the Shizm! And runs VirtualBox.. Blades.. also has a better C implementation which is more compatible with Android, for that matter so does Free BSD.. yes aye
</waffle>
EDIT: This is a joke! - haha
on boot
export PATH /sbin:/system/sbin:/system/bin
export LD_LIBRARY_PATH /system/lib
mkdir /dev
mkdir /proc
mkdir /sys
mount tmpfs tmpfs /dev
mkdir /dev/pts
mkdir /dev/socket
mount devpts devpts /dev/pts
mount proc proc /proc
mount sysfs sysfs /sys'
ok so everytime you make a system call guess what? your appending to the /sys directory - your looking at processes between the kernel - It's like a infinite series of softlinks.. the only thing to worry about.. is when you hit the end!
Deleted for obvious reasons
Deleted for obvious reasons
I'm pretty good with computers and I can not fathom the epic screw up you have accomplished. Sorry for not being of help.
Sent from my Delorean using a flux capacitor!
Deleted for obvious reasons
Might as well post some screens. Worst case a dev will inform you that you haven't cracked anything.
Sent from my Delorean using a flux capacitor!
Deleted for obvious reasons
You need to get real. You haven't cracked anything and it does not skip anything mate.
People will get annoyed if you do this again. Please try to refrain from such statements, without adequate support of you're claims.
j.anderson618 said:
Well it skips the Sony Ericsson bootloader so I'm pretty sure
Sent from my X10i using XDA App
Click to expand...
Click to collapse
You have no idea what is the /sys and you crack the bootloader?
Perhaps you dont know what the bootloader is and missunderstoud something.
ps: if you have rw acces to the fs you can copy files to /system with astro and not with ghost com, plus the drocap2 will not need su rights to take a screen shot.
Maybe its time to start the "reading about *nix systems" procces. With su rights.
I would just change your name and start anew because you pretty much have everyone hating you right now.
Mister J said:
I would just change your name and start anew because you pretty much have everyone hating you right now.
Click to expand...
Click to collapse
Dont give him ideas lol
Sent from my X10a Running FreeX10

Symlinking the CACHE partition for extra space.

FAO stratosk and others.
I was not permitted to reply in the main dev thread, but I thought I'd share what I found that works for my Galaxy S.
Your original script worked perfectly apart from the changing ownership / group. For some reason on my rom, system.cache does not resolve into the correct UID / GID - which makes /cache eventually have a 'root' ownership and thus the market cannot access it.
The solution is to use
chown 1000:2001 /cache
chown -h 1000:2001 /cache
The second one changes the symlink as well as the target.
This has already been pointed out in a reply but it may have got lost amongst the others!
Will.
original thread - http://forum.xda-developers.com/showthread.php?t=1188972
torrentship said:
FAO stratosk and others.
I was not permitted to reply in the main dev thread, but I thought I'd share what I found that works for my Galaxy S.
Your original script worked perfectly apart from the changing ownership / group. For some reason on my rom, system.cache does not resolve into the correct UID / GID - which makes /cache eventually have a 'root' ownership and thus the market cannot access it.
The solution is to use
chown 1000:2001 /cache
chown -h 1000:2001 /cache
The second one changes the symlink as well as the target.
This has already been pointed out in a reply but it may have got lost amongst the others!
Will.
original thread - http://forum.xda-developers.com/showthread.php?t=1188972
Click to expand...
Click to collapse
Yeah, I had the same issue. Was surprised how it worked for others without changing the ownership.. I guess you were referring to my reply? ..
Btw, may I know why you can't post in the dev thread?
Hi,
I had seen someone make the same observation I did but I wondered if people had noticed because they were still saying the same thing; I thought it'd help saying it again but I get a feeling a lot of people probably don't know what symlinking is!
I'm surprised though as more and more games are over 30mb now. maybe done custom roms do this automatically?
I can't post in the dev forum because I would guess I don't have a high enough overall post-count.
will.
Sent from my GT-I9000 using XDA Premium App
I wonder how the "old" Market can download files larger then /cache partition, but the new one doesn't (version 3.0.27)? So Google could fix this using some other download location, if cache is small.

[Q] Error mounting CIFS shares on N4 CM10.1

Hi folks
My issue that I cannot seem to resolve is one of CIFS share mounting. I have trawled the XDA forums, google, and many many other android sites with no luck.
Current state
Nexus 4
CyanogenMod 10.1 RC4 (but have been running nightlies and RCs almost since release)
Latest version of CifsManager
Folders created:
/mnt/cifs/*
Where * is various folder names matched to my CIFS shares being served from an OpenMediaVault storage PC.
My understanding is that CM10.1 has CIFS support built into the kernel, as there are no cifs modules in the usual places one would expect to find them.
No matter what I try in CifsManager, the mount fails with:
Code:
Mounting the share has failed with an error. mount: Invalid argument
I thought this may be an issue with CifsManager, so I hopped into the shell to see what I could find. I am no *nix guru, but am comfortable (mostly) in the commandline.
I fired up ADB, connected the device and entered an ADB shell with root access via su.
I issued a BUNCH of different mount commands, with no luck, some of which were:
Code:
mount -t cifs //192.168.1.3/share1 /mnt/cifs/share1
mount -o username=<username> -t cifs //192.168.1.3/share1 /mnt/cifs/share1
mount -o username=<username>,password=<password> -t cifs //192.168.1.3/share1 /mnt/cifs/share1
I tried variations of these with the options after the type and vice versa, and with one/both of those after the device/mount point pieces.
All consistently gave the same error as CifsManager:
Code:
mount: Invalid argument
I even tried using
Code:
-t smbfs
and get the following error:
Code:
mount: No such device
The only additional note I could find that I thought worth mentioning is this entry in dmesg:
Code:
<3>[14314.292444] CIFS VFS: Connecting to DFS root not implemented yet
At this point I am officially out of ideas and operating beyond my capabilities so if you have any suggestions or advice, please let me know what additional information I can provide here.
I should note that I have two Xoom's and an SGS2 all of which mount these shares fine. The Xooms are running EOS4 and the SGS2 was also running CM10.x - interestingly both of these ROMS had cifs modules rather than having them built into the kernel.
Thanks in advance.
/system/xbin/mount (soft-linked to busybox) rather than /system/bin/mount (linked to toolbox) works for me. I'm not sure that it's entirely safe to point the link in "bin" to busybox (which is necessary if you're using CifsManager as it has no option to set a path to "mount"), but everything seems to be alright, except that the busybox'es "mount" refuses to remount root read-write sometimes, and you need to specify a different dir for CifsManager (e.g. /data/cifs instead of /mnt/cifs).
[SOLVED]
OK,
so with a bit of luck, I seem to have got to the bottom of this.
Within CifsManager, the following configuration for a share works:
Share Path
<IP address>/<share>
Mount Point
/mnt/cifs/<share>
Username
<username>
Password
Leave blank - if this is populated, it causes the "Invalid argument" error when mounting the CIFS share.
Options
Code:
unc=\\\\<IP address>\\<share>,pass=<password>
Now that I have it working, I remember reading on a post long time ago, that if the CIFS module is built into the kernel it required the unc= option to work.
Would it be worth getting in touch with the CifsManager devs and logging this as a bug do you think?
[keywords]
How to mount a cifs share on Google Nexus 4 with CifsManager and CyanogenMod 10
Does it still works? I am using CM 10.1 nightly based on Android 4.2.2 and I am unable to make it work.
Do you use a kernel other than CM default?
Why do i want to mount cifs? Any specific reason?
Sent from my Nexus 4
kewlfais said:
Why do i want to mount cifs? Any specific reason?
Sent from my Nexus 4
Click to expand...
Click to collapse
I want to conect to my samba share over wifi. I'd prefer to mount them because, If I can mount them, I am free to use all programs/file explorers etc. to browse files/watch movies etc.
Well basically nexus talks only on mtp protocol.
U have options of connecting ur device via ssh by installing ssh server on phone but for me it wss slow so i dropped that.
Even there is a app name software data cable which connects via ftp.
Sent from my Nexus 4
---------- Post added at 02:08 AM ---------- Previous post was at 02:07 AM ----------
Or use airdroid that is also good app
Sent from my Nexus 4
gergefil said:
Does it still works? I am using CM 10.1 nightly based on Android 4.2.2 and I am unable to make it work.
Do you use a kernel other than CM default?
Click to expand...
Click to collapse
Hi
yes this still works. Please note my original post got screwed up by the forums - it removed some of the \'s. I have fixed this now in the original post, but by explanation there should be double the number of normal \'s in the UNC path (as escape characters I guess) so \ \ \ \ unc \ \ path
I do not use any custom kernel, just what is in the standard nightly CM builds (I also update to most nightlies..)
I hope this is clear
Swaziboy said:
Hi
yes this still works. Please note my original post got screwed up by the forums - it removed some of the \'s. I have fixed this now in the original post, but by explanation there should be double the number of normal \'s in the UNC path (as escape characters I guess) so \ \ \ \ unc \ \ path
I do not use any custom kernel, just what is in the standard nightly CM builds (I also update to most nightlies..)
I hope this is clear
Click to expand...
Click to collapse
I am now able to make it work. Thanks.
Hey Swaziboy,
I have one more question:
Did you try to mount cifs share anywhere other than /mnt/cifs/SHARE
I want all applications to see my share, so I try to mount them into /mnt/sdcard/SHARE When I mount it to /mnt/cifs/ everything is perfect. However when I try to mount it into /mnt/sdcard/SHARE, cifs manager says it is mounted, however I can't see it on mount list and, it is not mounted at all.
Do you have any idea/suggestions?

Categories

Resources