Jump to content
Dana

acces files on smartphone via usb?

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Dana,

Try using this as the path in _FileToArrayRec:

\\?\usb#vid_22b8&pid_2ea4#zx1f42cdvh#{6ac27878-a6fa-4155-ba85-f98f491d4f33}\

M23

Edited by Melba23
Typo

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...