Dana Posted January 26, 2016 Share Posted January 26, 2016 I'm working on a script intended to work with files stored on my [android 5.1] smartphone. Problem is, I can't get a valid path. If I plug in the phone, Windows sees it, I can view and manipulate files, and Explorer says the path is, for example, Computer\XT1254\Internal storage\Music. However, if I try to access it with AutoIT, e.g.: $path = FileSelectFolder("Select folder for music files", "") If @error Then Exit ConsoleWrite($path & @crlf) $filelist = _FileListToArrayRec($path, "*.mp3;*.wma", $FLTAR_FILES, $FLTAR_RECUR, $FLTAR_NOSORT, $FLTAR_FULLPATH) I get ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\\?\usb#vid_22b8&pid_2ea4#zx1f42cdvh#{6ac27878-a6fa-4155-ba85-f98f491d4f33}\SID-{10001,,56161665024}\{00000001-0001-0001-0000-000000000000} for $path (the first ConsoleWrite), and _FileListToArrayRec returns extended error 1 (Path not found or invalid). Is there any way to access files on such a device? There doesn't seem any to get Windows to assign a drive letter to it like it did with my old phones. There do seem to be some ways to do it involving setting up the android device as a server but I was hoping for a simpler solution using USB. Link to comment Share on other sites More sharing options...
careca Posted January 26, 2016 Share Posted January 26, 2016 The path for it is: ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\\?\usb#vid_22b8&pid_2ea4#zx1f42cdvh#{6ac27878-a6fa-4155-ba85-f98f491d4f33}\ You can paste that in any window, and it will put you on the smartphone dir. As for the function to work, idk, maybe it doesn't assume a path like that. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
Dana Posted January 27, 2016 Author Share Posted January 27, 2016 Well, Windows may accept that, but _FileListToArrayRec does not. Link to comment Share on other sites More sharing options...
AutoBert Posted January 27, 2016 Share Posted January 27, 2016 Explore the the registry, there must be a way how Explorer knows how Computer\XT1254\Internal storage\Music <==> ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\\?\usb#vid_22b8&pid_2ea4#zx1f42cdvh#{6ac27878-a6fa-4155-ba85-f98f491d4f33}\SID-{10001,,56161665024}\{00000001-0001-0001-0000-000000000000} correspending. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 27, 2016 Moderators Share Posted January 27, 2016 (edited) Dana, Try using this as the path in _FileToArrayRec: \\?\usb#vid_22b8&pid_2ea4#zx1f42cdvh#{6ac27878-a6fa-4155-ba85-f98f491d4f33}\ M23 Edited January 27, 2016 by Melba23 Typo Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Dana Posted January 27, 2016 Author Share Posted January 27, 2016 I looked in the registry, XT1254 shows up numerous places, and at least one of them has part of the string returned by FileSelectFolder: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\KnownDevices\WpdDeviceHandler_USB#VID_22B8&PID_2EA4#ZX1F42CDVH] "Label"="XT1254" "Icon"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\ 00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,77,00,\ 70,00,64,00,73,00,68,00,65,00,78,00,74,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,\ 00,37,00,30,00,34,00,00,00 More interesting was this one: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Portable Devices\Devices\USB#VID_22B8&PID_2EA4#ZX1F42CDVH] "FriendlyName"="XT1254" I changed FriendlyName to "Z:\", and now typing Z: in windows explorer takes me to the device... but _FileListToArrayRec still doesn't like it. M23, I tried that, along with other combinations and subsets, no joy anywhere. Link to comment Share on other sites More sharing options...
AdamUL Posted January 27, 2016 Share Posted January 27, 2016 Have you tried the Android UDF? I haven't used it, but it may help you. Adam Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now