<div dir="ltr">On Tue, Dec 3, 2019 at 2:37 AM Winnie Poon <<a href="mailto:winniepoon_home@hotmail.com">winniepoon_home@hotmail.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi Alex,</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks for making things clear. <br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I would like to explore the possibility of contributing to the portal support for USB mass storage.   A few questions below to help myself and my teammates to get a better idea.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<ul>
<li>i understand there's no general portal that works for all USB devices, may i know what USB device types we currently have portal support?</li><li>from what you said below, it seems like making it work for USB mass storage would be difficult, but would it be possible to come up with a secured solution for that given we have the time and resources to put into it?<br>
</li><li>if we would like to contribute to the portal support for USB mass storage, we definitely need help from the flatpak developers, what're the general steps/process?</li><li>based on your experience from other portal support,  what would be the risks or you have a rough estimate how much time it may take to implement the portal support for USB mass storage?</li></ul>
<div><br>
</div>
<div>Your inputs  (or from others who have the experience) would be greatly appreciated.</div>
</div></div></blockquote><div><br></div><div>There is no specific "usb devices" portal, but things like usb webcams are supported via pipewire, usb printers via the printing portal, and the goal for e.g. usb joypads is to deliver input events via wayland. Basically we want to target the solution on the highest level, rather than focusing on transmission details like what bus is sending the data. This way the portals are easier to develop against, easier to make a nice user experience for, and it is easier to reason about their security.</div><div><br></div><div>I'm not sure exactly what it is you want to do with USB mass storage, but generally it is *completely* unsafe to allow any user process access to block devices, even in a non-sandboxed environment (you need root access). The "proper" way to handle them is for the host operating system to mount them (automatically or via some interaction) and then access them via the filesystem, using whatever permissions system we have for the files (like the document portal and --filesystem access permissions).<br></div></div><div><br></div><div>Can you explain your goals at a higher level? What is it the user want to do in a sandboxed app that you want to facilitate?<br></div><div><br></div></div>