corbindavenport / nexus-tools

Installer for ADB, Fastboot, and other Android tools on Linux, macOS, Chrome OS, and Windows
http://forum.xda-developers.com/general/general/tool-nexus-tools-2-8-featured-xda-t3258661
GNU General Public License v3.0
844 stars 86 forks source link

Universal Adb Driver installation fails on Windows #77

Closed corbindavenport closed 4 months ago

corbindavenport commented 4 months ago

Nexus Tools fails to install on a Snapdragon X Elite laptop with Windows 11 24H2:

[INFO] Nexus Tools 5.6
[ OK ] Created folder at C:\Users\Corbin\AppData\Roaming\NexusTools.
[INFO] You agree to the Terms & Conditions by installing this software: https://developer.android.com/studio/terms
[....] Downloading Platform Tools package, please wait.
[ OK ] Platform Tools now installed in C:\Users\Corbin\AppData\Roaming\NexusTools.
[ OK ] Added C:\Users\Corbin\AppData\Roaming\NexusTools to user %PATH.
Unhandled exception:
ProcessException: The system cannot find the file specified.

  Command: wmic product get Name
#0      _ProcessImpl._start (dart:io-patch/process_patch.dart:402)
#1      Process.start (dart:io-patch/process_patch.dart:38)
#2      _runNonInteractiveProcess (dart:io-patch/process_patch.dart:579)
#3      Process.run (dart:io-patch/process_patch.dart:49)
#4      installPlatformTools (file:///d:/a/nexus-tools/nexus-tools/bin/main.dart:106)
<asynchronous suspension>
#5      main (file:///d:/a/nexus-tools/nexus-tools/bin/main.dart:308)
<asynchronous suspension>
PS C:\Users\Corbin>

The wmic command used for checking if the drivers are installed isn't present, and Microsoft documentation says it was deprecated in Windows 10 21H1. There needs to be a different way to check if the driver package are installed.