- Download Android Command Line Tools For Windows 12
- Android Studio Command Line
- Download Android Command Line Tools For Windows 10
- Download Android Command Line Tools For Windows 6
Didn't make the
#ChromeDevSummit
this year? Catch all the content (and more!) in the Chrome Dev Summit 2019 playlist on our Chrome Developers YouTube Channel. How to root your Android phone using Windows 10 and TWRP Recovery. Which let you control your phone through a command prompt or terminal, and sideload software onto it. Jan 27, 2016 This video will show how to install Android SDK Platform Tools only. Go this route if you simply need Android SDK for rooting, unlocking bootloader, or fastboot command purposes. You do not need. Dec 02, 2012 What's new in Command-Line Tools For Android Apps 1.4 Beta: Push support: If your Android app uses Cloud to Device Messaging (C2DM), when you repackage your app for BlackBerry devices, you can use.
As devs who spend the majority of our time coding on OSX and Linux, we were curious what a modern command-line setup might look like on Windows.
A StackOverflow developer survey reminded us that there are more devs using Windows than any other OS so we were curious if the tooling there was on par with what we were used to in *nix land.
After spending some time evaluating the landscape of Windows CLI tooling, we settled on a set of tools we think gets us 95% of the way there.
At the end of the day, we landed on a combination of:
- PowerShell
- ConEmu
- PSReadLine
- PSGet
- Chocolatey
- Babun (optional)
See below for some more notes on what these different pieces of machinery give you.
PowerShell (shell)
- Significantly closer to a real 'shell' than cmd.exe, offering us a powerful scripting environment for task automation. It's fair to compare it to Bash or zsh.
- Autocompletes directory and filenames
- Autocompletes application names
- Has integrated aliases and commands (called cmdlets - e.g
Select-String
is likegrep
,Invoke-Elevated
is likesudo
,Sort-Object
is likesort
,Get-Process
lists all active processes). If moving from another shell to PS,Set-Alias
lets you map aliases you're used to to Windows equivalents. For example:Set-Alias server python -m http.server 8000
launches a Python server when theserver
alias is used. - Aliases can be persisted in a PowerShell profile
- Supports piping, like Unix. Unlike Unix, it pipes objects rather than text streams. This requires getting used to but avoids reparsing when you want to get out a property.
- Supports modules. PSGet is a package manager for PowerShell allowing you to easily extend it.
- Optionally consider Posh-Git, a PowerShell script for git to gain contextual tab-completion.
If you're interested in trivia, here's an answer to why MS created PowerShell from the lead architect.
PSReadLine (console editing helpers)
- Significantly improves the console editing experience
- Syntax highlighting whenever you start typing commands. Clearly indicates syntax errors with a red '>' character.
- Highly customizable key bindings
- Bash-style autocompletion
- Bash/zsh interactive history search (Ctrl + R). Powerful command history traversal too. Easily view previous multi-line commands using arrow keys rather than just the last line of the command.
- Proper support for copy/paste/cut (Ctrl+C/X/V should all work just fine)
- Good support for undo/redo
- History saving is automatic
Alternatively, you can use Clink, which has a similar set of features but wasn't strictly written for PowerShell.
ConEmu (console host)
- An advanced console emulator where you can run your shell of choice.
- Supports opening multiple terminals in different tabs. Makes it trivial to launch terminals as different users.
- Extremely customizable - everything from shortcuts to text selection and status bar colors can be changed.
- Supports a split-screen view
- Simple GUI apps can be run in tabs
- Support for Windows 7+ Jump Lists
- Supports smooth window resizing
- Windows font anti-aliasing
- Starting tabs can be fully customized to start in a particular directory
- Intelligent copy/paste
Some folks still enjoy using Console2 and Scott Hanselman has a blog post written about it.
Cmder
Worth a passing note is Cmder - a console emulation package that combines ConEmu, Clink and msysgit - giving you Git helpers. Cmder basically gives you a prettier experience to ConEmu by default via it's Monokai color scheme.
Cmder also includes some other little benefits, like integration with GUI apps such as Sublime Text.
Chocolatey (package manager)
- Basically homebrew for Windows, allowing you to pull in your favorite Windows apps conveniently. There are currently ~3K packages available that can be updated using Chocolatey directly.
- Differs from Nuget. NuGet is for development libraries. Chocolatey is a binary machine package manager and is built on NuGet infrastructure.
- Offers effectively silent builds
You may also be interested in learning about OneGet, Microsoft's package manager..manager, which should work with Chocolatey under Windows 10.
Babun (Cygwin preconfigured)
- Cygwin (the Linux-like env for Windows) minus some of the historically known quirks. The overall setup is significantly more straight-forward using the Babun installer. If you're particularly experienced with Unix and would prefer to avoid learning PowerShell, cygwin/Babun are worth considering.
- Includes a package manager called
pact
(a little similar tobrew
) similar toapt-get
. This is a big deal as you currently have to re-run the Cygwin installer when adding packages vs. just using pact. - Vim pre-installed and pre-configured
- Integrated support for oh-my-zsh
- Auto-updates
Further Reading
If you are like me and do not like to install unnecessary software on your machine, then you’re at the right place. We are going to install Android emulator in Windows without installing Android Studio at all. If you are a react-native developer you’re gonna find this extremely useful.
Download Android Command Line Tools For Windows 12
NOTE: Of course you can just run the emulator with Android Studio without going through all these troubles. But this method will save you your computer memory and speed.
Let’s start at the beginning.
Pre-requisites to install Android emulator
1. Java JDK 1.8 or above
2. Android SDK (command line tools)
3. Intel® Hardware Accelerated Execution Manager (Intel® HAXM)
Step 1: Install Java
As you might know, you need Java before doing anything else related to Android. 😉 So, go to Oracle Java Download page and download the JDK (not JRE) appropriate for your computer (32-bit or 64-bit version).
Follow installation wizard and install Java on your computer using default settings. If it’s successful, the JDK software should be installed on your computer, for example, at C:Program FilesJavajdk1.8.0_141.
Set JAVA_HOME environment variable and add it to path variable.
In Windows 10 search for “Environment Variables” by clicking on Windows logo on TaskBar OR follow below path and screenshot steps 1 to 11.
This PC > Properties > Advanced System Settings > (see below screenshot)
Note for Java JDK versions 9 or 10
If you have installed Java 9 or later versions, as of 2018 July Android SDK still does not support those Java versions. So if you try to do the 3rd step below (sdkmanager –list) you will get an error. Check here how to fix it.
Step 2: Install Android SDK
Then you need to download Android SDK command line tools and Android Platform Tools from the official website.
Go to this page and scroll down until you see the heading “Command line tools only”. Download SDK tools package for Windows.
Then go to “C:UsersPabaAppDataLocal” and create a new folder named Android. This will be your Android SDK location (ANDROID_HOME).
Just as you set up JAVA_HOME, you need to create a new User Environment Variable for ANDROID_HOME.
Android Home environment variable
Then extract the contents of the “sdk-tools-windows-xxxxxxx.zip” file to created Android folder (eg: C:UsersPabaAppDataLocalAndroid. After extracting your Android folder should have a subfolder named “tools”.
If you go to C:UsersPabaAppDataLocalAndroidtoolsbin there should be 2 files called “sdkmanager.bat” and “avdmanager.bat”. We will be using these 2 to install Android packages and AVDs (Android Virtual Devices).
Step 3: Installing an Android Platform
What are SDK Platforms?
SDK Platforms are the packages that include the Android platform and sources pertaining to an API level. For example, the package we will be installing is Android API Level 26 (also known as Android 8.0 or Oreo). You can also find more details on various SDK Platforms on the official Android website.
Pre-requisite: Run command prompt as Administrator
Open a command prompt as Administrator and navigate to C:UsersPabaAppDataLocalAndroidtoolsbin
Okay!
First of all, you need to find out what are the platforms you can download. So run below command to find them.
This command will list all the installed packages and available packages. Packages could be add-ons, build-tools, platforms, sources, system-images, extras, and etc. What we are interested here is Platforms. In the long list that came up on your command line, you will see a set of lines like “platforms;android-28” etc.
You need to add “platform-tools” and one of the platforms to proceed. So lets select android-26 as our platform and run below command to download and install them to our SDK.
Above command will create 2 new subfolders inside ANDROID_HOME as “platform-tools” and “platforms”.
Accept licence agreement when prompted.
Bonus Step: Troubleshooting 😉
1. Java version incompatibility errors
If you have installed a JDK version higher than 8, then you will get Exception in thread “main” java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema when trying to run any command using sdkmanager.
You can fix it without changing your JDK by using this fix. Open the sdkmanager.bat file in ANDROID_HOMEtoolsbin directory in a text editor. Find the word “DEFAULT_JVM_OPTS” in it. You will see a comment above that line saying “Add default JVM options here. You can also use JAVA_OPTS and SDKMANAGER_OPTS to pass JVM options to this script.” Like so, add below command to the script.
and after that, the script should look like below.
2. Accepting License
Android Studio Command Line
You need to accept Android License or otherwise, you’d find an error in your command prompt. Run below command and type “y” to all prompts to proceed with the installation.
Now you will see a new subfolder called “licenses” inside ANDROID_HOME.
3. Warning: File C:UsersPaba.androidrepositories.cfg could not be loaded
If there’s a warning as “Warning: File C:UsersPaba.androidrepositories.cfg could not be loaded.” then go to that location and create an empty file named “repositories.cfg”.
If you managed to come to this point, then you have successfully installed the Android SDK in your machine. Yey!!! 😀
Next thing you have to install is the Android Emulator. We have done all the above just to get to this!!
But, there’s one last thing before moving on to emulator stuff. (Duh!)
That is, you have to have a system image if you want to create an emulator. A system image is a file with an extension “.img”. These are also different from Android API level to level.
So let’s add a system image before moving on to creating an emulator.
You can find the available system images in the long list we got earlier by running “sdkmanager –list”. Run below command to add a system image relevant to the platform we earlier installed.
Now you will be able to see a new subfolder at ANDROID_HOME called “system_images”.
Download Android Command Line Tools For Windows 10
Finally, download the “emulator” package. You will see a new subfolder “emulator” in ANDROID_HOME. This is where the Android emulator resides.
Step 4: Installing HAXM
Download HAXM from intel website and install. This page has a nice documentation on how to install standalone Intel HAXM on Windows. Please follow it if you’re unsure what to do. That is not a complicated installation. Before creating the emulator Windows users need to have this installed. Otherwise, you will see below error.
Download Android Command Line Tools For Windows 6
Step 5: Create an Android Emulator
Up to now, we have only used Android’s sdkmanager command line tool. From now on we will be using the avdmanager command line tool as well. Run below command for help.
In order to create an AVDÂ (Android Virtual Device) you must provide a name for the AVD and specify the ID of the SDK package to use for the AVD using wrapped in quotes. Run below command to create one.
“test_avd_26” is the name. I used “26” in the name itself so that I can instantly find out which API this emulator use.
It’ll ask “Do you wish to create a custom hardware profile?” for now select the default (no).
This will list available AVDs. You will see the one you created just now.
Now go to C:UsersPabaAppDataLocalAndroidemulator and run;
If all is well, you will see the Android emulator after a moment. Tada!
If you come across any issues please drop a comment below. I’ll help you out. Have fun developing Android apps!!! :)3