os-issue-tracker
os-issue-tracker copied to clipboard
Add option for computer to only see certain files over MTP
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.
You can also transfer the files with a flash drive instead. We recommend this already:
https://grapheneos.org/faq#file-transfer
@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.
exFAT will be supported too for Pixel 6 and beyond with Android 13.
@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.
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.
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.
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..