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

crashes when trying to add path to external usb drive #255

Open
FurhadTheNerd opened this issue Nov 23, 2023 · 8 comments
Open

crashes when trying to add path to external usb drive #255

FurhadTheNerd opened this issue Nov 23, 2023 · 8 comments

Comments

@FurhadTheNerd
Copy link

i don't know what happened or how to describe it, so, here's a video and a logcat

screen-20231123-212752.mp4

droidfs23-11_21-26-48.log

@hardcore-sushi
Copy link
Owner

Thank you very much for this good bug report. Unfortunately, the major part of the recording is just black. You have to enable the "Allow screenshots" unsafe feature to be able to record DroidFS.

Nevertheless, according to the logcat, it looks like the app gets killed by SELinux:

1700764044.703 10242 31642 31642 W mount   : type=1400 audit(0.0:9823): avc:  denied  { search } for  name="vendor" dev="tmpfs" ino=2 scontext=u:r:untrusted_app_32:s0:c242,c256,c512,c768 tcontext=u:object_r:mnt_vendor_file:s0 tclass=dir permissive=0 app=sushi.hardcore.droidfs

This is because DroidFS failed to retrieve the directory path by conventional ways. Try to enter the path manually in the text field to see if DroidFS is still killed.

@FurhadTheNerd
Copy link
Author

you're welcome, I'm always trying to help opensoruce development :3
about the blank part of the video, that is when i got to the settings and allowed screenshots from the unsafe settings menu
I'll try setting a path manually, if that didn't work, I'll try a different kernel
i will update you soon

@FurhadTheNerd
Copy link
Author

alrighty so, adding the path manually worked "/mnt/media_rw/827A-1CEA/Container 1"
but when i add something there, then eject the usb drive and mount it again? non of the files i added show up, and trying to add anything results in this error
Screenshot_20231125-164911
i checked the mount points, they're all the same, i checked the drive and there wasn't any restrictions, it keeps getting mounted as RW, i could see the encrypted files in the container from the first time, but they don't show up anymore

@hardcore-sushi
Copy link
Owner

If you've seen the encrypted files on the drive but they've disappeared after remount, this is rather strange, but it's probably not a DroidFS bug. What's the file system on your drive? What's your ROM? Does it also happen with files from other apps?

The "Import failed" error looks like DroidFS has no write access to the volume. Are you able to take pictures or create files or folders inside the app?

@FurhadTheNerd
Copy link
Author

i believe the usb format is fat32? i formatted it using the android format
I'm running the stock pixel rom, i have a pixel 6 running android 14 with the novmber security patch, but I'm rooted (magisk) and i have a couple of lsposed modules, but none of them interfere with this issue i guess
i made sure that the drive is mounted as r/w from the file explorer by creating a file and deleting it

@hardcore-sushi
Copy link
Owner

Is it a gocryptfs or a CryFS volume? Do you unmount the drive before ejecting it? You can also provide your logcat when the "Import failed" error shows up to help debugging this issue, and try creating files with other apps to see if they disappear too.

Are you able to take pictures or create files or folders inside DroidFS?

@FurhadTheNerd
Copy link
Author

its gocryptfs, and yes, i unmount the drive and lock the container beforehand
also i noticed something, this issue is very inconsistent, i made like 6 containers sometimes it happens, and sometimes it doesn't, but now i noticed another thing, if you leave a container unlocked and exit Droidfs to the background, it crashes, especially when importing large files into the encrypted container, logfox caught me these two crash logs
droidfscrash1.txt
droidfscrash2.txt
i honestly don't know what to do, guide me on how to debug it

@hardcore-sushi
Copy link
Owner

Crash when going to background is expected in this situation, check #157 for details.

Can you reproduce the "Import failed" error you showed earlier? If so, please record your logcat while reproducing so that we can find out what went wrong.

Also, try creating files on your USB drive with other applications and see if they disappear too. This may not only affect DroidFS.

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