Peek from file explorer on android device
Microsoft PowerToys version
0.81.0
Installation method
WinGet
Running as admin
No
Area(s) with issue?
File Explorer: Thumbnail preview, Peek
Steps to reproduce
when I press the shortcut, the preview send me an error
✔️ Expected Behavior
the preview was open
❌ Actual Behavior
No response
Other Software
No response
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Open similar issues:
- Fails when trying to preview a jpg on my android phone (#26969), similarity score: 0.83
Closed similar issues:
- We have a problem with peek feature (#29385), similarity score: 0.85
- Peek not working (#32574), similarity score: 0.84
- Not open prewiew (#26169), similarity score: 0.83
- Issue occurred in peek (#26676), similarity score: 0.82
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
hey i wanna work on this issue ... anyone want to help because i m new on this codebase.
@Agnibaan Feel free to open a PR. Your contribution is welcome. Thank you for your work on this. If you have any questions don't worry to ask them.
@Agnibaan Feel free to open a PR. Your contribution is welcome. Thank you for your work on this. If you have any questions don't worry to ask them.
Can u give me some file reference like where should I work to address this issue?
@Agnibaan Feel free to open a PR. Your contribution is welcome. Thank you for your work on this. If you have any questions don't worry to ask them.
Can u give me some file reference like where should I work to address this issue?
No, sory. Thought you know this.
@jaimecbernardo any ideas?
@Agnibaan Feel free to open a PR. Your contribution is welcome. Thank you for your work on this. If you have any questions don't worry to ask them.
Can u give me some file reference like where should I work to address this issue?
No, sory. Thought you know this.
@jaimecbernardo any ideas?
I have the idea but I just new to this codebase so I asked to save some time for searching... it's okay let me try ...
@Agnibaan Ah. Sory for the misunderstanding. Thought you expected an exact file path.
You find the Peek files here: https://github.com/microsoft/PowerToys/tree/main/src%2Fmodules%2Fpeek .
@Agnibaan Ah. Sory for the misunderstanding. Thought you expected an exact file path.
You find the Peek files here: https://github.com/microsoft/PowerToys/tree/main/src%2Fmodules%2Fpeek .
i think there is no file handler which is handling the connected android device files for peek right? or i m missing something?
@Agnibaan Ah. Sory for the misunderstanding. Thought you expected an exact file path.
You find the Peek files here: https://github.com/microsoft/PowerToys/tree/main/src%2Fmodules%2Fpeek .
i think there is no file handler which is handling the connected android device files for peek right? or i m missing something?
Don't know. Thought @jaimecbernardo ?
@Agnibaan Ah. Sory for the misunderstanding. Thought you expected an exact file path. You find the Peek files here: https://github.com/microsoft/PowerToys/tree/main/src%2Fmodules%2Fpeek .
i think there is no file handler which is handling the connected android device files for peek right? or i m missing something?
Don't know. Thought @jaimecbernardo ?
File handlers are usually for file types. This might be something in terms of file resolution when we select it. Not sure about what specificities happen when File Explorer opens files inside of an Android file system, but maybe those are being hit. I think the best way to check what's happening might be first looking into the logs in "%localappdata\Microsoft\PowerToys\Peek" to check what errors Peek is actually reporting.
It looks like modern Android devices tend to mount as "devices" rather than as regular drives. Explorer provides special handling for browsing these devices, but the files on their file-systems, unlike with drive-mounting, don't have regular paths that are usable for reading their contents from within Windows applications. All Peek previewers currently need usable paths for reading files.
File-Explorer add-ons don't seem to have this problem as Explorer seems to be very helpfully creating temporary copies of these files on the local file system (in the Temporary Internet Files folder, to be exact) before handing them to preview handlers.
Two potential ways we can fix this in Peek are:
- Create a local copy of these files the way Explorer does it for File-Explorer add-ons. But we should further investigate what exactly Explorer is doing here - I'm not able to find any documentation / discussion around this.
- Get Peek to use shell32 interop to directly read these files - the downside of this approach is that it will likely require changes to all our preview handlers.
@Agnibaan Did you complete this work?
@htcfreek I'm happy to take this on, if Agnibaan is OK with that. I have some MTP code from another project which I could translate.