Now Gesture Tweaks Replaces Google Now with Custom Action

On most modern Android devices with software navigation keys, swiping up from the … more

ToqAN Fixes Android 5.0 Notification Bug on Qualcomm Toq

The Qualcomm Toq is probably one of the lesser known smartwatches on the market … more

How to Root and Unlock the Google Nexus 6 on a Mac – XDA TV

In the past, XDA Developer TV Producer droidmodd3rx has shown you how to … more

Set Up Your MediaTek Device with Comprehensive Beginner’s Guide

As can be seen with the use of MediaTek chips in Android One devices … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP int10h

27th April 2014, 12:34 AM   |  #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
27th April 2014, 12:38 AM   |  #2  
rootSU's Avatar
Senior Member
Flag Oxenhope, West Yorkshire, UK
Thanks Meter: 13,838
 
25,028 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
27th April 2014, 12:59 AM   |  #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, 01:02 AM   |  #4  
rootSU's Avatar
Senior Member
Flag Oxenhope, West Yorkshire, UK
Thanks Meter: 13,838
 
25,028 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, 01: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, 01:19 AM   |  #6  
Senior Member
Flag Göd
Thanks Meter: 714
 
1,148 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, 01: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