[Powershell][Windows][Script]Get & Install Latest Official ADB & Fastboot Drivers - Android Q&A, Help & Troubleshooting

Google has made it easy to use ADB in Windows these days, but the ADB commands can only be used in a directory. This a Powershell script for Windows that will download the latest ADB from the Official repositories and install it System-wide or User-Wide, this script will also install latest Google drivers also from from the Official repositories. This script will help to install ADB and the drivers in an easy way. Most ADB installers come in exe format where you cannot see exactly what they do exactly. So I decided to write the whole thing as a Windows Poweshell script.
On my github page you can download the script and you can also find an explanation how to use the script. The big difference to others is that ADB & Fastboot drivers are updated in real time when this tool is used. For the drivers i have to update a link I'll do my best when a new driver comes out to update the link as soon as possible.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Notes:
System-wide: ADB and Fastboot are installed to HOMEDRIVE\ADB directory, and added system-wide path.
HOMEDRIVE=C:\ so in case of the system-wide install option ADB will copy over to C:\ADB
Current user only: ADB and Fastboot are installed to UserProfile\ADB directory, and added path for current user. UserProfile=%SystemDrive%\Users{username} so in case of the Userwide-wide install option ADB will copy over to C:\Users\username\ADB
CMD or Powershell can use ADB and Fastboot from any directory.
If you are using this tool and you having problems leave a comment and I will try to help you

ķANKAN

Related

adb logcat waiting for device + AdbCommandRejectedException

Hello,
At the beggining I had SDK Tools Only and everything was ok, after typing adb logcat I got logs. Then I installed ADT Bundle and run eclipse -> DDMS and in logcat tab I got logs. Then I installed a couple of programs to make screencasts. The next day I run eclipse -> DDMS and I got this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Code:
[2013-05-18 08:46:16 - ddms] ADB rejected shell command (getprop): closed
[2013-05-18 08:46:29 - ddms] ADB rejected shell command (logcat -v long): closed
[2013-05-18 08:46:29 - Unexpected error while launching logcat. Try reselecting the device.] closed
com.android.ddmlib.AdbCommandRejectedException: closed
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:381)
at com.android.ddmlib.Device.executeShellCommand(Device.java:462)
at com.android.ddmuilib.logcat.LogCatReceiver$1.run(LogCatReceiver.java:110)
at java.lang.Thread.run(Unknown Source)
When I run adb logcat from console I got this message: waiting for device.
adb devices detect my phone
I have windows vista home premium
android 4.1.2
What I did:
- uninstalled SDK Tools Only
- reset adb / unplug and plugin my device
- I tried this one: adb -s emulator-5037 logcat but still waiting for device
- adt bundle - sdk manager -
- windows task manager - there is just one adb.exe running
but still I get waiting for device and the exception in eclipse.
thx in advance
c'mon guys help me out with this

ADB 'Not Recognized'

Okay so I have been trying to push/install/anything to an .apk file.
all I get is the error:
'adb' is not recognized as an internal or external command,
operable program or batch file.
which I have rooted my phone and pushed files before.
I have also noticed the .apk files do not appear as their usual file images.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Run the commands from your android sdk/platform tools folder
Or any folder that has adb/fastboot .exe
bigdaddy619 said:
Run the commands from your android sdk/platform tools folder
Or any folder that has adb/fastboot .exe
Click to expand...
Click to collapse
I have attempted, the error still shows up.
What seems to have fixed my adb issue (at least for flashing not sure about pushing/installing yet)
was that I uninstalled my version and reinstalled the tools.
I will attempt pushing and installing tomorrow or in a few hours.
Has that error ever happened to you just randomly?
I ALWAYS run the commands from my sdk files holding the adb.exe
Only time I got those errors was when I was using the wrong folder to run them.
bigdaddy619 said:
Only time I got those errors was when I was using the wrong folder to run them.
Click to expand...
Click to collapse
Fair enough.
I did make sure I did it in the right folder I even tried in another folder with a adb.exe and fastboot.exe
The same result until I uninstalled and reinstalled

[TOOL] [LINUX/MAC] Nexus Tools 2.8 (Featured by XDA)

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Nexus Tools is an installer for the Android debug/development command-line tools ADB (Android Device Bridge) and Fastboot for Mac OS X and Linux. The script does not need to be downloaded, simply copy and paste this command into the terminal and run it to install ADB/Fastboot:
Code:
bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh)
and this command to un-install Nexus Tools:
Code:
bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/uninstall.sh)
Nexus Tools requires sudo privileges to install/uninstall the adb and fastboot tools to /usr/local/bin, so they can be run without typing the full directory. Nexus Tools is licensed under the GPLv3 license, and the source code is at the GitHub project below.
If you have a problem with Nexus Tools, leave a reply below or as an issue on the GitHub project!
GitHub Project
XDA News Article
So you deleted my post by asking you for the code which could be malicious?. I mean I'm smart enough to check it my self but links should be provided so people don't have to hunt for your code.
I haven't deleted any posts. And if you have any concern about the code, you can directly view it on GitHub first.
New in Nexus Tools 2.6:
Major code cleanup
Better error handling
Fixes for asking sudo permission
Other improvements
New in Nexus Tools 2.7 [9-11-15]:
Updated ADB binary for Mac and x86 Linux to 1.0.32 platform-tools 23rc_2 (should work with Android M preview)
New in Nexus Tools 2.8:
(Hopefully) fixed all problems on Mac OS X 10.11 El Capitan
Changed installation directory to /usr/local/bin/
Removed Mac OS X 10.11 warnings
Now downloads binaries over HTTPS

[GUIDE] Unbrick / Return OnePlus2 to stock

Source:
http://www.oneplusbbs.com/thread-862640-1-1.html
Will be translating the content and tools later on and update this post.
When to use:
When you want to go back to stock
When your phone is in a miserable software state that it can't even boot to recovery.
Warnings:
DO NOT USE THIS ON THE OnePlus One
THIS WILL ERASE ALL EXISTING DATA ON YOUR PHONE, EVEN THE eMMC
Instructions:
Connect your phone to the computer, making sure all the drivers are installed.
Enter fastboot by pressing the Volume Up + Power Button
Unzip the unlock.zip package to a folder and then run FastBootXXXXOS.bat
Your system should be able to bypass any bootloops/problems and enter the OS, during this time it is recommended to backup all your important data and prepare for the next few steps.
Re-enter fastboot mode, we will now begin to reflash the system flash memory, which will erase everything.
Connect your phone to the PC if not already connected, then go to Device Manager and check whether or not a device named QHSUSB_BULK APPEARS like below:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
It should say that it doesn't have any drivers installed. So inside the archive there should be a inf driver file, to install it right click on the device > Update Driver Software > Browse My Computer for driver software > click on inf file.
The driver should be installed now.
Using the QCom Download tool you should now be able to see the device appear in one of the slots. Just press start and it should start flashing! And when it finishes it should be good as new!
Some mod please help me fix the title XD
Edit: nvm I didn't know you could edit the title....fail

RN2 not recognized in adb

When I connect my Note 2, it's not seen by the PC. When I list the devices, nothing's there. I tried adding vendor and model ids in udev (I'm on Linux), but it didn't help. Anyone knows how to fix this?
Update your adb.
You need 1.0.32
First check if your version is older (e.g. 1.0.31):
Code:
$ adb version
Android Debug Bridge version 1.0.32
Then upgrade, following #3 from this guide: Ubuntu 14.04 - Install Android Tools
Tried on a Windows PC and I get the same result, adb version 1.0.32. However, I was able to flash TWRP before, but now it doesn't see the device at all. I'm on xiaomi.eu dev 5.9.24.
Edit: Just realized that this happens on Windows:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Apparently, the drivers are not installed, however I DID install adb drivers, but whenever I try to install Xiaomi USB drivers (manual installation through Device Manager), Windows say they didn't find any compatible drivers for my device. But they ARE there in the folder specified. This is driving me crazy.
Edit edit: found solution for adb drivers problem here, however, I still cannot install drivers for "Redmi".
Anyway, adb works now on this Windows machine, the question is whether I'll be able to achieve this on my Linux PC, too.
I.nfraR.ed said:
Update your adb.
You need 1.0.32
First check if your version is older (e.g. 1.0.31):
Code:
$ adb version
Android Debug Bridge version 1.0.32
Then upgrade, following #3 from this guide: Ubuntu 14.04 - Install Android Tools
Click to expand...
Click to collapse
Thanks a lot! Worked perfectly.

Categories

Resources