<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div>
<div id="appendonsend" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hi all,</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)">
much appreciated if anyone who knows the details can answer some of the questions below.  Would love to help with the portal support if we can.</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,</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Winnie</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Winnie Poon <winniepoon_home@hotmail.com><br>
<b>Sent:</b> December 2, 2019 5:36 PM<br>
<b>To:</b> Alexander Larsson <alexl@redhat.com><br>
<b>Cc:</b> Flatpak List <flatpak@lists.freedesktop.org><br>
<b>Subject:</b> possibility of contributing to portal support (USB mass storage)</font>
<div> </div>
</div>
<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><br>
</div>
<div>Best Regards,</div>
<div>Winnie<br>
</div>
</div>
<div>
<div id="x_appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Alexander Larsson <alexl@redhat.com><br>
<b>Sent:</b> November 28, 2019 7:41 AM<br>
<b>To:</b> Winnie Poon <winniepoon_home@hotmail.com><br>
<b>Cc:</b> Patrik Nilsson <asavartzeth@gmail.com>; Jan Grulich <jgrulich@redhat.com>; Flatpak List <flatpak@lists.freedesktop.org>; Matthias Clasen <mclasen@redhat.com>; Jorge GarcΓ­a <jgarciao@gmail.com>; Ryan <rymg19@gmail.com><br>
<b>Subject:</b> Re: flatpak portal example on github</font>
<div> </div>
</div>
<div>
<div dir="ltr">On Tue, Nov 26, 2019 at 8:29 PM Winnie Poon <<a href="mailto:winniepoon_home@hotmail.com">winniepoon_home@hotmail.com</a>> wrote:<br>
<div class="x_x_gmail_quote">
<blockquote class="x_x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div>
<div id="x_x_gmail-m_7380265818699827710appendonsend" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hi all,</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)">
that would be sad news <span id="x_x_gmail-m_7380265818699827710πŸ™">πŸ™</span>  I remember a while ago when I asked in this mailing list about usb drive access, a few developers including Alex suggested the device portal, that's why I looked into that, but now
 it seems like --device=all is the ONLY option?</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)">
So really my approach of using file chooser to grant permission to the right file e.g. /dev/bus/usb/001/010 would not go anywhere?  like even after if i can somehow solve the root owner issue?</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'm really hoping to have a better solution than using --device=all. <span id="x_x_gmail-m_7380265818699827710πŸ™">
πŸ™</span><br>
</div>
</div>
</div>
</blockquote>
</div>
<div><br>
</div>
<div>Yeah, this is a bit unfortunate. However, /dev access is something that is set up at sandbox setup time (i.e. app startup) and thus it has to be static. I.e. we can't change these after the fact, and that would be needed for usb which is highly dynamic.</div>
<div><br>
</div>
<div>The file chooser portal works by using a fuse filesystem that protects access to the files, but we can't use fuse for something like a device node, so this can't be done.</div>
<div><br>
</div>
<div>We don't have any generic portal that works for all usb devices, we're instead trying to abstract thing out on a higher per-device-type level. I.e. webcams via pipewire, joysticks via wayland, etc.
<br>
</div>
<div><br>
</div>
<div>However, for block devices we can't just pass things back as there are no way to do this safely, and in practice it will not work anyway because all block devices are typically only readable by root.<br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>