Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,733,293 Members 39,050 Now Online
XDA Developers Android and Mobile Development Forum

[Q] How to make a sshfs mounted dir exposed to outside?

Tip us?
 
int10h
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Nov 2013
Location: Taipei
Question [Q] How to make a sshfs mounted dir exposed to outside?

I've managed to set up a chrooted Arch Linux on my Nexus5.

Everything works perfectly ; except that the chroot mount point looks "empty" from outside world (Media player,Root Explorer, and even the Terminal Emulator sessions without root permission).

I thought that might be nothing to worry until I tried to wath a HD movie on my server.

SSHFS inside the chroot world could succesfully mount the target directory ; yet none of my App could go there.

And ln command is not working as I typed :
ln -s /sdcards/archlinux/sshfs_mountpoint /sdcard/whatever_outside

Scenario:
mknod /dev/block/loop255 b 7 255)
losetup /dev/block/loop255 /sdcard/archlinux.img
(archlinux.img is ext4 formated with functional binaries and libraries from arch linux arm image)
mount /dev/block255 /sdcard/archlinux

And then mount dev,devpts,proc,sysfs ; set PATH,USER,TERM,SHELL...etc

It is also really strange that if I make a directory into the chroot directory from Terminal Emulator before getting chrooted ; it could be seen from both outside and inside .

So ai guessed this could be permission problem ; yet the files and directories are all readible for "others" ......

Any help or advices are apreciated.
Thanks in advance and I'm sorry for my bad English .

Sent from my Nexus 5 using xda app-developers app
 
rootSU
Old
#2  
rootSU's Avatar
Senior Member
Thanks Meter 9846
Posts: 20,988
Join Date: Aug 2010
Location: Oxenhope, West Yorkshire, UK
I don't know the answer to your problem but FYI, you cannot symlink (ln -s) on /sdcard. It's a FUSE fs. You can only symlink on ext fs. Even on devices with removable sdcards, it's not possible, without formatting to ext
Want to root/unroot? All important guides and info threads are contained within the "Sticky Roll-up" thread in General. Click the link below to get there!



Philz Touch Recovery with passkey secure lock

I do NOT reply to support queries over PM.
 
int10h
Old
#3  
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Nov 2013
Location: Taipei
Quote:
Originally Posted by rootSU View Post
I don't know the answer to your problem but FYI, you cannot symlink (ln -s) on /sdcard. It's a FUSE fs. You can only symlink on ext fs. Even on devices with removable sdcards, it's not possible, without formatting to ext
Thanks for correcting me , I haven't noticed that before.
As you mentioned , I double checked the situation; any operation after chroot seemed to be "immutable."

Is it possible to mount mmcblk[1-9] to be ext[y] as boot up for stock rom ? Or should I flash 3rd party rom such as CM or Omni ...etc ?
I'm used to use fstab on desktop Linux ;yet Android is a land pretty
mystery for me. (Sigh)
 
rootSU
Old
#4  
rootSU's Avatar
Senior Member
Thanks Meter 9846
Posts: 20,988
Join Date: Aug 2010
Location: Oxenhope, West Yorkshire, UK
What are you trying to do? Make /sdcard available as a location within your mounted arch.img?

Sent from my Nexus 5 using Tapatalk
Want to root/unroot? All important guides and info threads are contained within the "Sticky Roll-up" thread in General. Click the link below to get there!



Philz Touch Recovery with passkey secure lock

I do NOT reply to support queries over PM.
 
int10h
Old
#5  
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Nov 2013
Location: Taipei
Quote:
Originally Posted by rootSU View Post
What are you trying to do? Make /sdcard available as a location within your mounted arch.img?

Sent from my Nexus 5 using Tapatalk
Yes , I used to have a TF101 before , and I thought I've done such a symlink before.

After all , if a chroot is not exposable to its host , it could be less useful for me . (I know mount -o bind is a solution ,yet it won't work for me this time since it will break sshfs...)

BTW,captcha is soooooo annoying.......
 
bitdomo
Old
#6  
Senior Member
Thanks Meter 603
Posts: 968
Join Date: Nov 2011
Location: Göd
Hi! I have experienced same problem when I made a kernel with exfat support. The only solution for me was to decompile stickmoint and figure out how it mounts the partition to every app.

Here is an example based on stickmount to mount drives to all http://forum.xda-developers.com/show...6&postcount=16

Tapatalk-kal küldve az én Nexus 5-el
 
int10h
Old
#7  
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Nov 2013
Location: Taipei
Quote:
Originally Posted by bitdomo View Post
Hi! I have experienced same problem when I made a kernel with exfat support. The only solution for me was to decompile stickmoint and figure out how it mounts the partition to every app.

Here is an example based on stickmount to mount drives to all http://forum.xda-developers.com/show...6&postcount=16


Tapatalk-kal küldve az én Nexus 5-el
Thanks for the information ;pretty glad that I'm not the only one who tried to do so.
I was trying to watch a video on my bed before I sleep ; and now is 7:35 a.m. in the morning....

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


TRENDING IN THEMER...