os-issue-tracker icon indicating copy to clipboard operation
os-issue-tracker copied to clipboard

Add option for computer to only see certain files over MTP

Open FieryBinary opened this issue 2 years ago • 7 comments

Currently, when transferring files over MTP, the computer can see all the files on the phone. This is insecure. If you want to transfer files, you must trust that the computer you connect to is not compromised or malicious, which is especially bad if you are connecting to someone else's computer or a public computer.

This could be solved by only allowing the computer access to certain directories, like Storage Scopes. When connecting, the user would be prompted to "configure Transfer Scopes" and select a directory that the computer can access. The computer would be none the wiser, and the user can securely transfer files without letting it see everything.

This would be fairly easy to do since it just applies Storage Scopes to MTP, but it would be a very useful feature.

FieryBinary avatar Aug 16 '22 16:08 FieryBinary

You can also transfer the files with a flash drive instead. We recommend this already:

https://grapheneos.org/faq#file-transfer

thestinger avatar Aug 16 '22 16:08 thestinger

@thestinger

That's true, but connecting the phone and computer is simpler and quicker. Also, the user might not have a flash drive, or have a non-FAT32 drive that he cannot reformat.

FieryBinary avatar Aug 16 '22 17:08 FieryBinary

exFAT will be supported too for Pixel 6 and beyond with Android 13.

thestinger avatar Aug 16 '22 17:08 thestinger

@thestinger

The exact filesystem doesn't matter - if the drive filesystem is not one of the Android-supported filesystems, the user is unable to transfer files to it. There are thousands of filesystems out there, and it's not feasible to support even the common ones like NTFS, BTRFS, HFS+, ext4...you get the point. It is far easier to connect to the computer, which currently poses security risks.

FieryBinary avatar Aug 16 '22 18:08 FieryBinary

exFAT / FAT32 are the only sensible filesystems for portable (as in cross-platform) external drives though and I don't think it's that much harder to use a USB drive.

thestinger avatar Aug 16 '22 18:08 thestinger

Regardless of how sensible other filesystems are, people do use other filesystems on flash drives. They often don't know or consider portability when formatting the drive, and once the drive is in use, are unable to format it since there is data on it.

The user might not have a flash drive on him. He could be out somewhere (an internet cafe, a library, a hotel...anywhere) without a flash drive in his pocket and cannot safely transfer files. Or the drive doesn't have enough space for a file - I cannot transfer a 2GB video if I only have 1 GB left. There are many possible things that prevent a user from using a flash drive and make connecting to the computer the only reliable way to transfer files.

FieryBinary avatar Aug 16 '22 18:08 FieryBinary

Just the idea that you're also having to transfer things twice should be a massive negative to using a USB stick if you have bigger files to transfer. Although the feature might be too hard to implement and probably a low priority just like the AOSP 13 apps are..

dweee avatar Aug 22 '22 16:08 dweee