Skip to content

Commit

Permalink
Add changes to support windows 7
Browse files Browse the repository at this point in the history
  • Loading branch information
fawazahmed0 committed Nov 22, 2019
1 parent 3ff3d67 commit db3ce8f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Latest-ADB-Installer.bat
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ PowerShell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.github

::Fetching devcon.exe and powershell script
PowerShell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/fawazahmed0/Latest-adb-fastboot-installer-for-windows/master/files/fetch_hwid.ps1', 'fetch_hwid.ps1')"
PowerShell -Command "(New-Object Net.WebClient).DownloadFile('https://github.com/fawazahmed0/Latest-adb-fastboot-installer-for-windows/raw/master/files/devcon.exe', 'devcon.exe')"
PowerShell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/fawazahmed0/Latest-adb-fastboot-installer-for-windows/master/files/devcon.exe', 'devcon.exe')"

:: Uninstalling/removing the platform tools older version, if they exists and killing instances of adb if they are running
echo Uninstalling older version
Expand All @@ -71,7 +71,8 @@ PowerShell -Command "& {$shell_app=new-object -com shell.application; $filename

:: Source: https://stackoverflow.com/questions/1804751/use-bat-to-start-powershell-script
:: Calling powershell script to fetch the unknown usb driver hwids and inserting that in inf file
powershell .\fetch_hwid.ps1
:: Source: https://stackoverflow.com/questions/19335004/how-to-run-a-powershell-script-from-a-batch-file
powershell -executionpolicy remotesigned .\fetch_hwid.ps1

:: Source: https://github.com/koush/UniversalAdbDriver
:: Source: https://forum.xda-developers.com/google-nexus-5/development/adb-fb-apx-driver-universal-naked-t2513339
Expand Down
Binary file removed files/adbfiles.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion files/fetch_hwid.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Using devcon to fetch unknown devices hwids to put in inf file
# Source: https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/devcon-examples#ddk_example_1_find_all_hardware_ids_tools
$result = ./devcon.exe drivernodes @USB\VID* @USB\SAMSUNG* | select-string -pattern 'No driver nodes found for this device' -Context 2,0 | findstr USB* | Out-String;
$result = ./devcon.exe drivernodes "@USB\VID*" "@USB\SAMSUNG*" | select-string -pattern 'No driver nodes found for this device' -Context 2,0 | findstr USB* | Out-String;
if($result.length -gt 0){
$result = $result.Substring(0,$result.LastIndexOf('\')).trim();
$result = "%CompositeAdbInterface% = USB_Install, " + $result
Expand Down

0 comments on commit db3ce8f

Please sign in to comment.