Get a Complete Set of Logs with Andy Log

The importance of proper logging is undeniable. No, we’re not talking about lumberjack work. … more

Try Some Android Lollipop Applications on Your Device

Android 5.0 Lollipop has been officially announced and lucky users of Google Nexus 5 … more

AutoCon Manages Your Connections to Perserve Battery Life

As we’ve talked about in the past, battery life is still somewhat of a sore … more

How to Unlock and Root a Nexus Device – XDA TV

It is official–Google has released the Nexus 6 and the Nexus 9. The Nexus family … more
Post Reply

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

OP int10h

26th April 2014, 11:34 PM   |  #1  
OP Junior Member
Flag Taipei
Thanks Meter: 0
 
5 posts
Join Date:Joined: Nov 2013
More
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
26th April 2014, 11:38 PM   |  #2  
rootSU's Avatar
Senior Member
Flag Oxenhope, West Yorkshire, UK
Thanks Meter: 12,149
 
23,137 posts
Join Date:Joined: Aug 2010
More
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
26th April 2014, 11:59 PM   |  #3  
OP Junior Member
Flag Taipei
Thanks Meter: 0
 
5 posts
Join Date:Joined: Nov 2013
More
Quote:
Originally Posted by rootSU

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)
27th April 2014, 12:02 AM   |  #4  
rootSU's Avatar
Senior Member
Flag Oxenhope, West Yorkshire, UK
Thanks Meter: 12,149
 
23,137 posts
Join Date:Joined: Aug 2010
More
What are you trying to do? Make /sdcard available as a location within your mounted arch.img?

Sent from my Nexus 5 using Tapatalk
27th April 2014, 12:16 AM   |  #5  
OP Junior Member
Flag Taipei
Thanks Meter: 0
 
5 posts
Join Date:Joined: Nov 2013
More
Quote:
Originally Posted by rootSU

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.......
27th April 2014, 12:19 AM   |  #6  
Senior Member
Flag Göd
Thanks Meter: 684
 
1,124 posts
Join Date:Joined: Nov 2011
More
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
27th April 2014, 12:36 AM   |  #7  
OP Junior Member
Flag Taipei
Thanks Meter: 0
 
5 posts
Join Date:Joined: Nov 2013
More
Quote:
Originally Posted by bitdomo

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....

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Nexus 5 Q&A, Help & Troubleshooting by ThreadRank