Tuesday, April 30, 2013

ADB is Not Recognized as an internal or external command Fix


ADB is Not Recognized as an internal or external command Fix


Some of you are facing problems with Path, because of that you will see the error as below. Even though it is basic lot of people asking this same question. Hence posting this tutorial to fix this error.

In Windows --> Click Start --> Run --> cmd

When you run adb in the command prompt you will see an error as below

Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.

C:\Users\MOHAMMED>adb
'adb' is not recognized as an internal or external command,
operable program or batch file.


To fix this error you need the Android SDK if you don't have it please follow the steps below,


Open the browser and navigate to http://developer.android.com/index.html


Click the Get the SDK as shown in the above image


Click Download the SDK as shown in the above image


Check the checkbox for the license agreement, Select 32 or 64 bit based on your operating systtem.
Click the download SDK link.

Wait patiently until the download is complete.

My machine is a 64 bit Windows, hence the file downloaded is adt-bundle-windows-x86_64-20130219.zip

The zip file contains the following folders eclipse & sdk.

I have extracted to the following location in my machine

Hence i have the following in the path 

C:\Users\MOHAMMED\Downloads\adt-bundle-windows-x86_64\sdk\platform-tools


C:\Users\MOHAMMED\Downloads\adt-bundle-windows-x86_64\sdk\tools


You can see that adb.exe is in the location C:\Users\MOHAMMED\Downloads\adt-bundle-windows-x86_64\sdk\platform-tools



Execute the following commands in the command prompt and run adb it will be recognized now.

set ANDROID_PLATFORM_TOOLS="C:\Users\MOHAMMED\Downloads\adt-bundle-windows-x86_64\sdk\platform-tools"

set ANDROID_TOOLS="C:\Users\MOHAMMED\Downloads\adt-bundle-windows-x86_64\sdk\tools"

set path=%path%;%ANDROID_PLATFORM_TOOLS%;%ANDROID_TOOLS%



To Fix it permanently set in the environment variable 


Right Click My Computer --> Click Properties 


Click Advanced System Settings 

Click Environment Variables


Click New  as below, 


Variable name: ANDROID_PLATFORM_TOOLS

Variable Value: C:\Users\MOHAMMED\Downloads\adt-bundle-windows-x86_64\sdk\platform-tools


Variable name: ANDROID_TOOLS

Variable Value: C:\Users\MOHAMMED\Downloads\adt-bundle-windows-x86_64\sdk\tools



Edit the Path variable if it exist, else create a new variable Path 

Variable name: Path

Variable Value: %Path%;%ANDROID_PLATFORM_TOOLS%;%ANDROID_TOOLS%



adb should be working on command prompt and 'adb' is not recognized as an internal or external command,
operable program or batch file is resolved now.





Friday, March 15, 2013

Enabling Developer Options in Android 4.2.1 for Galaxy Nexus or Nexus 7

Enabling Developer Options in Android 4.2.1 for Galaxy Nexus or Nexus 7

In Android 4.2.1 the developer options in the Galaxy Nexus and Nexus 7 will not be visible by default as in the below image.


The following are the steps to enable the developer options for Galaxy Nexus or Nexus 7 for Android 4.2.1

Step1:  Click on the View All Apps Dashboard



Step2:  Click on the Settings 



Step3: Click on About Phone 




Step4: Click on the Build number for 7 Times (Tap on the Build number for 7 Times)




Step5: Congrats you will see a message as below, (You are now a developer!)


Step6: You can see the developer options in the settings screen as below




Sunday, August 19, 2012

nexus7 android development

nexus7 android development 

I had problems with nexus7 and i don't found any useful article in the web. Hence thought of writing this blog for Android brothers and sister.

Here you go, if you are planning to deploy your applications in nexus7 for testing in Windows. The following is the process.

Setup the Nexus7 Settings

1. Unlock the main screen

2. Click on the View APPS Menu as highlighted below

3. Click on the settings in the APPS menu page (See the highlighted settings)



4. Click on the Device - Storage as highlighted below


5. Click on the view more options in the storage as highlighted in yellow below


6. Click on the USB Computer connection

7. Select the option Camera(PTP) option.
Your android device can be deducted only if this mode is selected.

Don't choose the option Media device (MTP) which is highly supported in Mac OS.


Enable Developer Option Settings

1. Unlock the main screen



2. Click on the View APPS Menu as highlighted below



3. Click on the settings in the APPS menu page (See the highlighted settings)



4. Select Developer Options


Note: If you are using Android 4.2.2 and not able to find Developer Options please check this link for more details http://zacktutorials.blogspot.ca/2013/03/enabling-developer-options-in-android.html

5. Select the following options


  1. Stay awake
  2. USB debugging
  3. Allow mock locations


Where is your USB driver for windows located

<Your Android SDK location>\extras\google\usb_driver

Ex: In my PC it is stored in the location below
C:\STRP\android-sdk-windows\extras\google\usb_driver


What to do if my extra usb_driver is not available 

In Eclipse open the Android SDK Manager  and check the Extras --> Google USB Driver.

Install the package and check in <Your Android SDK location>\extras\google\usb_driver






Windows7 USB Driver installation for nexus7

1. Device driver software was not successfully installed message will be seen as below,


2. Click Start -- Control Panel

3. Search for Device Manager


4. Check the Other devices and Nexus where it is missing driver
5.  Right Click Nexus and select Update Driver Software 


6. Click Browse my computer for driver software option



7.  Select the android driver location 

<Your Android SDK location>\extras\google\usb_driver

Ex: In my PC it is stored in the location below 
C:\Data\android-sdk-windows\extras\google\usb_driver


8. Check always trust software from "Google Inc". and Click Install


9. Your Android device is installed and message will be displayed as below,


10.  Use this option

adb kill-server
adb start-server
adb devices


Note: In case you get error 'adb' is not recognized as an internal or external command,
operable program or batch file. Please read the link http://zacktutorials.blogspot.ca/2013/04/adb-is-not-recognized-as-internal-or.html

11.  Make sure adb devices lists your device and your device is connected to USB




WindowsXP USB Driver installation for nexus7

1.  When you connect the nexus7 device the following screen will be prompted

2.  Select the option Yes, this time only and Click Next>

3.  Select the option Install from a list or specific location (Advanced)

4.  Select the Location and Click Next >


<Your Android SDK location>\extras\google\usb_driver

Ex: In my PC it is stored in the location below
C:\Data\android-sdk-windows\extras\google\usb_driver



5.  Wait for the ADB Interface driver is completely installed


6.  On Successfully Installation, you will see the screen below, 


7.  Open Command prompt and execute the adb commands as below 


adb kill-server
adb start-server
adb devices




8. If your driver is not installed. Go to Start --> My Computer --> Properties


9. Hardware --> Device Manager


10. Other --> Nexus --> Update Driver





Follow all the steps, for driver for Samsung Galaxy Nexus just download the driver below,


In case of any problem with you can download the driver directly from the link below,







Thursday, February 23, 2012

Windows Dos batch file Date and Time Split


SET currdt=%DATE:~4,2%_%DATE:~7,2%_%DATE:~-4%_%time:~0,2%_%time:~3,2%_%time:~6,2%

SET month=%DATE:~4,2%
SET day=%DATE:~7,2%
SET year=%DATE:~-4%
SET hour=%time:~0,2%
SET sec=%time:~3,2%
SET millis=%time:~6,2%

echo %currdt%
echo %day%
echo %month%
echo %year%
echo %hour%
echo %sec%
echo %millis%

echo %year%_%month%_%day%_%hour%_%sec%_%millis%

The above batch script can extract day, month, year, hour, sec, millisecond.

You can use this in Windows Batch Script for saving files with Date TimeStamp