Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mount / instead of /storage/emulated/0/ #166

Open
bphd opened this issue Feb 21, 2024 · 5 comments
Open

Mount / instead of /storage/emulated/0/ #166

bphd opened this issue Feb 21, 2024 · 5 comments

Comments

@bphd
Copy link

bphd commented Feb 21, 2024

No description provided.

@asaf400
Copy link

asaf400 commented Jul 25, 2024

@bphd is that even possible?

MTP android host daemon runs under the user's permissions, I think the /storage/emulated/0/ is a limitations of those permissions, unless you manage to haxxor the daemon and run it as root, I don't think this issue is a feature that can be implemented under go-mtpfs

edit: it may be possible to maybe mount / but only as read-only, just as some 'file explorer' enable.

@bphd
Copy link
Author

bphd commented Aug 4, 2024

Many apps have root capacities, that execute when you give root priviledges to the application. So it should ask for root and then let mount whatever path we want

@asaf400
Copy link

asaf400 commented Aug 4, 2024

That is true, apps CAN have root capacities, but it's not the point of my comment,
go-mtpfs is not an android app, and it doesn't matter if you run it as root on linux,

the MTP service that runs inside Android 'sandboxed' linux processes runs under the current logged-in user permissions unless you modify your android permissions manifests xmls or something, that's why I asked, is this issue even relevant to go-mtpfs?

My thinking is that your suggestion should go to AOSP, or Lineageos

Edit: I commented because this is something I would find useful too, but was surprised seeing this issue here

@bphd
Copy link
Author

bphd commented Aug 6, 2024

If it's not an Android app, then why you mount per default /storage/emulated/0/ that is indeed an Android path? And why not mounting / per default if it's not an Android app, considering that outside of Android ecosystem it's generally easily done?

@bphd
Copy link
Author

bphd commented Aug 6, 2024

You're right that if upstream OSes would modify MTP behaviour that would resolve the problem from root, but maybe they wouldn't want because they don't consider root priviledges concerns and don't want to risk security. Where downstream, like in that project, we could add that without problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants