Access flles on a Android device from Windows PC
Hi I want to write little program that my friend can run - he'll plug a USB drive into his Windows 7 PC, plug his phone in a USB port on same PC, then run my program and it'll xfer some audiobook files over for him. I plugged the USB drive in and it became "G:\", but the phone plugged in and became just "SAMSUNG-SM-G930V", no drive designation, just a Portable Media Device. Windows Explore can go there so the files are accessible, the phone isn't looking him out, but what do I use for a path? I tried several different listdir()'s nothing worked. Thoughts? thanks, Freddie -- https://mail.python.org/mailman/listinfo/python-list
Re: Access flles on a Android device from Windows PC << YES! Thanks
Yup, that seems to be the deal, and there doesn't seem tpo be a really simple way to deal with this. ...but at least I know what I need to look for. thanks! Freddie eryk sun wrote: >On Tue, Jun 6, 2017 at 7:36 PM, Fred Fishbin wrote: >> >> I want to write little program that my friend can run - he'll plug a USB >>drive >> into his Windows 7 PC, plug his phone in a USB port on same PC, then run my >> program and it'll xfer some audiobook files over for him. >> >> I plugged the USB drive in and it became "G:\", but the phone plugged in and >> became just "SAMSUNG-SM-G930V", no drive designation, just a Portable Media >> Device. Windows Explore can go there so the files are accessible, the phone >> isn't looking him out, but what do I use for a path? I tried several >>different >> listdir()'s nothing worked. > >The shell is probably mounting the device via the Windows Portable >Devices (WPD) API. It isn't mounted as a USB disk with a file system, >so it won't be assigned a drive letter that you can simply use via >file-system APIs such as open (CreateFile), listdir (FindFirstFile), >etc. You can look into using WPD Automation via win32com [1]. I >haven't used WPD, so I can't offer specific help. > >https://msdn.microsoft.com/library/dd389295 -- https://mail.python.org/mailman/listinfo/python-list
Re: Access flles on a Android device from Windows PC
Um, no. I *now* understand that USB Mass drive is no longer supported, but it was a legit question. I'd still love if someone could post a code sample, or point me in the direction to a code snippet that would show me how to access the phone. I know it can be done, its just not simple anymore. Freddie wxjmfa...@gmail.com wrote: Le mardi 6 juin 2017 21:37:24 UTC+2, Fred Fishbin a écrit : >> Hi >> >> I want to write little program that my friend can run - he'll plug a USB >>drive >> into his Windows 7 PC, plug his phone in a USB port on same PC, then run my >> program and it'll xfer some audiobook files over for him. >> >> I plugged the USB drive in and it became "G:\", but the phone plugged in and >> became just "SAMSUNG-SM-G930V", no drive designation, just a Portable Media >> Device. Windows Explore can go there so the files are accessible, the phone >> isn't looking him out, but what do I use for a path? I tried several >>different >> listdir()'s nothing worked. >> >> Thoughts? >> >> thanks, Freddie > >I hope your mounted external device is full of file names >with plenty of Emojis... >It will be very funny. -- https://mail.python.org/mailman/listinfo/python-list
Re: Access flles on a Android device from Windows PC (Posting On Python-List Prohibited)
Lawrence_D?Oliveiro wrote: >On Thursday, June 8, 2017 at 3:41:35 PM UTC+12, Fred Fishbin wrote: >> Yup, that seems to be the deal, and there doesn't seem tpo be a really >>simple >> way to deal with this. > >The preferred way to do file transfers to/from Android devices over USB seems >to be via MTP nowadays <https://github.com/ldo/mtpy>. Excellent! Exactly what I was looking for! thank you, Freddie -- https://mail.python.org/mailman/listinfo/python-list
Re: Access flles on a Android device from Windows PC (Posting On Python-List Prohibited)
Lawrence_D?Oliveiro wrote: >On Thursday, June 8, 2017 at 3:41:35 PM UTC+12, Fred Fishbin wrote: >> Yup, that seems to be the deal, and there doesn't seem tpo be a really >>simple >> way to deal with this. > >The preferred way to do file transfers to/from Android devices over USB seems >to be via MTP nowadays <https://github.com/ldo/mtpy>. Excellent! Exactly what I was looking for! thank you, Freddie -- https://mail.python.org/mailman/listinfo/python-list