question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to detect phone plugged in

See original GitHub issue

Currently, technology to detect USB Drives plugged in is by:

  1. Windows
    wmic logicaldisk get Caption,FreeSpace,Size,VolumeName,Description  /format:list
    
  2. Linux and Mac
    df -P | awk 'NR > 1'
    

However, those commands are unable to detect the phone when plugged in, and we need to find a new way to detect drives, using any programing language that can be plugged into node.js. Any comments will be appreciated 😃

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kimlimjustincommented, Dec 13, 2021

Hi, I am intrigued by the project. You mention that the browser can’t read the files, but do you think the new File System Access API can change that? And maybe removing eventually the need to use any backend task to read/write files?

The simple answer is No. Besides writing and reading files, Xplorer also takes care of reading drives, disks, networks (in the future), and many others which File System Access API does not allow to afaik, besides, it’s bad for UX when you download and app and it still asking you for those permissions.

1reaction
kimlimjustincommented, Sep 26, 2021

Usb detection in browsers is considered security issue.What are your thoughts?

Don’t forget that you can also run native code on it. You can import c++ code using node_api. Indeed, there is already a feature on Xplorer implemented using c++, you can take a look at the code here.

In addition, Electron is not all about browser applications on the desktop. If it does, there will be no Xplorer at all, since you won’t able to read files on the browser. Please differentiate between the node process and the browser process.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Your Android Phone Won't Connect to Your PC: 7 Fixes
1. Check the USB Connection Mode on Your Phone (Windows/Mac) · Connect your phone to your computer using a USB cable. · Pull...
Read more >
Windows 10 Doesn't Recognize Android Device
Can't see the developer options? In that case, you'll need to go to “Settings” > “About device” > “Software info” and tap on...
Read more >
Phone not Connecting to PC: How to Get it Recognized ...
1. Check USB computer connection settings. After you connect the phone, a notification will appear confirming whether you want to allow the ...
Read more >
How to Fix Android USB Device Not Recognized but ...
Try following methods. Go to Settings> Storage> More (three dots menu)> USB computer connection, choose Media device (MTP). For Android 6.0, go to...
Read more >
8 Fixes When Your Computer Doesn't Recognize ...
1. Restart Your Computer & Phone · 2. Use a Different USB Port And Cable · 3. Change the USB Connection Mode (Android)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found