Could not find adb. Please set the ANDROID_HOME environment variable with the Android SDK root directory path

Here I’m trying to set up the ANDROID SDK in my MAC Machine. When I try to run the code I’m getting an error like

A new session could not be created. (Original error: Could not find adb. Please set the ANDROID_HOME environment variable with the Android SDK root directory path.) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 350 milliseconds

I have done the environmental variables changes via VIM editor as follows

vi ~/.bash_profile
export ANDROID_HOME=/Applications/android-sdk-macosx
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
:wq

But still I couldn’t understand what could be the reason for this?

I have downloaded the SDK only for MAC from this site

Using the Eclipse LUNA to run the programs.

Environmental setup

Path details


Appium Doctor Verification

Appium log in eclipse Console

JAVA CODE

public class StartUp {

static WebDriver driver = null;
static Executor appiumProcess;

public static void main(String[] args) throws IOException, Exception {
    // TODO Auto-generated method stub
    stopAppiumServer();
    Thread.sleep(10000);
    startAppiumServer();
    Thread.sleep(10000);
    startApplication();
    stopAppiumServer();
}
public static void startAppiumServer() throws IOException, Exception{   
    CommandLine command = new CommandLine("/Applications/Appium.app/Contents/Resources/node/bin/node");
    command.addArgument("/Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js");  
    command.addArgument("--address", true);  
    command.addArgument("127.0.0.1");  
    command.addArgument("--port", true);  
    command.addArgument("4727");
    command.addArgument("--session-override", true);
    command.addArgument("--no-reset", true);  
    DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();
    ExecuteWatchdog watchdog = new ExecuteWatchdog(ExecuteWatchdog.INFINITE_TIMEOUT);
    appiumProcess = new DefaultExecutor();
    appiumProcess.setExitValue(0);
    appiumProcess.setWatchdog(watchdog);
    appiumProcess.execute(command, resultHandler);
}
    public static  void startApplication() throws Exception{
        System.out.println("Into Android");
        DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
        capabilities.setCapability("platformName", "Android");
        capabilities.setCapability("platformVersion", "4.2.2");
        capabilities.setCapability("avd", "Test1");
        capabilities.setCapability("deviceName", "");
        capabilities.setCapability("app","/Users/selvakumar/Documents/Apks/autoInsurance.apk");
        driver = new AppiumDriver(new URL("http://127.0.0.1:4727/wd/hub"), capabilities); 
        System.out.println("Appium SetUp for Android is successful and Appium Driver is launched successfully");
        Thread.sleep(10000);
        driver.findElement(By.name("ZIP Code")).sendKeys("12345");            
}
    public static  void stopAppiumServer() throws IOException {  
    CommandLine command = new CommandLine("/Applications/Appium.app/Contents/Resources/node/bin/node"); 
    command.addArgument("/Applications/Appium.app/Contents/Resources/node/bin/node");   
    command.addArgument("killall node");  
    DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();  
    DefaultExecutor executor = new DefaultExecutor();  
    executor.setExitValue(1);  
    executor.execute(command, resultHandler);    
    Runtime.getRuntime().exec("killall node");
    System.out.println("Appium process destroyed successfully");
}

}

Solutions are welcome!

2 Likes

@Hassan_Radi @0x1mason @SergeyTichomirov @Donald

@Prithivi @Sachin_Chauhan @bhaskar

Hi @ashokkumarg ,

Please make sure that there is no gap in between your words you’ve given in Path. Have a look once and let me know.

Thanks,
Bahskar.

1 Like

Thank you very much for your reply @bhaskar

There is no spaces in the path.
Screen shot is available in the question: Environmental setup

Do I need to add anything before the PATH
/Applications/android-sdk-macosx

PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Applications/android-sdk-macosx/tools:/Applications/android-sdk-macosx/platform-tools"

Screen shot attached in question: Path Details

If this things are correct. Do I need to change any settings in eclipse or Do I need to keep the android-sdk-macosx Folder on some other locatoins (Out of the Applications Folder)

@ashokkumarg : just try below things to verify your setup.

  1. echo $ANDROID_HOME with new terminal, not the one through you have exported.
  2. if it is showing result, then type android and click enter it should open android sdk.
  3. Open Appium and run appium doctor it will automatically check all your configuration
  4. Check my Video at 19:37 for more detials on appium doctor
    https://www.youtube.com/watch?v=BULjgsTpw2c

Can you try setting Path to complete path
Ex : /Users/rbaliga/android-sdk-macosx

@Appium_Master Thank you so much for your reply. Actually I’m starting the Appium server in a programmatic way. When I launch the Appium server through Manual way. It works well. But when I try to do by programmatic it fails.

As you said

  1. The echo $ANROID_HOME gives the correct path
  2. Typing the android opened the android sdk.
  3. Appium doctor checked the all configurations properly.

Screen shot attached in question: Appium Doctor Verification

All settings are correct and working when I run the appium server manual. What could be the problem when I run it via code:

public class StartUp {

static WebDriver driver = null;
static Executor appiumProcess;
    
    public static void main(String[] args) throws IOException, Exception {
        // TODO Auto-generated method stub
        stopAppiumServer();
        Thread.sleep(10000);
        startAppiumServer();
        Thread.sleep(10000);
        startApplication();
        stopAppiumServer();
    }
    
    
    public static void startAppiumServer() throws IOException, Exception{   
          
        CommandLine command = new CommandLine("/Applications/Appium.app/Contents/Resources/node/bin/node");
        command.addArgument("/Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js");  
        command.addArgument("--address", true);  
        command.addArgument("127.0.0.1");  
        command.addArgument("--port", true);  
        command.addArgument("4727");
        command.addArgument("--session-override", true);
        command.addArgument("--no-reset", true);  
               
        DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();
        ExecuteWatchdog watchdog = new ExecuteWatchdog(ExecuteWatchdog.INFINITE_TIMEOUT);
        appiumProcess = new DefaultExecutor();
        appiumProcess.setExitValue(0);
        appiumProcess.setWatchdog(watchdog);
        appiumProcess.execute(command, resultHandler);
    }
        
        public static  void startApplication() throws Exception{
            System.out.println("Into Android");

            DesiredCapabilities capabilities = new DesiredCapabilities();
            capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
            capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "4.2.2");
            capabilities.setCapability("avd", "Test1");
            capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "Test1");
            capabilities.setCapability(MobileCapabilityType.APP,"/Users/selvakumar/Documents/Apks/autoInsurance.apk");
            System.out.println("1");
            driver = new AppiumDriver(new URL("http://127.0.0.1:4727/wd/hub"), capabilities); 
            System.out.println("2");
            System.out.println("Appium SetUp for Android is successful and Appium Driver is launched successfully");
            Thread.sleep(10000);
            driver.findElement(By.name("ZIP Code")).sendKeys("12345");            
    }
        public static  void stopAppiumServer() throws IOException {  
        CommandLine command = new CommandLine("/Applications/Appium.app/Contents/Resources/node/bin/node"); 
        command.addArgument("/Applications/Appium.app/Contents/Resources/node/bin/node");   
        command.addArgument("killall node");  
      
        DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();  
        DefaultExecutor executor = new DefaultExecutor();  
        executor.setExitValue(1);  
        executor.execute(command, resultHandler);    
        Runtime.getRuntime().exec("killall node");
            
        System.out.println("Appium process destroyed successfully");
            
    }
    
}

In the mobile capabilities the device name is not finding the correct ADB I think so
TEST1 is the available adb devices

Appium server log in eclipse console:

Screen shot attached in question: Appium log in eclipse Console

In MAC,When I start the Appium server manually and running this code from eclipse. The emulator is automatically triggered and the functionality is running much better.

In Windows
When I try to start the Appium server in a programmatic way I used the same capabilities, command line tools it worked well in windows. But fails in MAC

Also,
In WINDOWS to run the .apk file
deviceName is not recognized and it is not working.
So I used
capabilities.setCapability(“avd”, “Test1”); This works well in Windows machine.

In MAC to run .ipa file
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, “iPad”);
Here the device name works well to start the simulator.

So, to start the ADB in MAC How can I achieve it?

Android Preference settings in eclipse

/Applications/android-sdk-macosx

Have you set the environment variables in the launch configuration you are using in Eclipse?

http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftasks-java-local-configuration.htm

Specifically:

The Environment tab defines the environment variable values to use when running or debugging a Java application. By default, the environment is inherited from the Eclipse runtime. You may override or append to the inherited environment. Variables specified in the tab always replace values in the underlying native environment. However, when “Append environment to native environment” is selected the launched environment is seeded with the native environment, after which variables in the tab replace (existing variables) or augment the set of environment variables. When “Replace native environment with specified environment” is selected, the launched environment is comprised only of the variables specified in the tab.

@wreed In my case, what I need to give in the environment tab.

@Donald @jonahss @kirill

Hi Ashok,

Can you please check if path to your apk is correct one.

Thanks,
Donald

Yeah @Donald it is right. Still I couldn’t find out what could be the issue.

Hi Ashok,

You mentioned that " When I launch the Appium server through Manual way. It works well. But when I try to do by programmatic it fails." my question here is, are you launching appium server UI application manually?

If yes , can you please try to launch server from command line.
Place appium app in Application folder(if not already done) and try execute /Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js --address 127.0.0.1 --port 4723 --full-reset --device-name "iPhone 6" --platform-name iOS --platform-version "8.3" --app "/AUT.app" --browser-name iOS -l change capabilities in case of Android.

Also if node executable is added to your system variables try executing

node /Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js --address 127.0.0.1 --port 4723 --full-reset 
    --device-name "iPhone 6" 
    --platform-name iOS 
    --platform-version "8.3" 
    --app "/AUT.app"
    --browser-name iOS -l

I believe that you need to tell Eclipse to use the local Environmental Variables.

@Donald Yeah Donald Manually refers to starting the UI application.
As you said I have tried with the node executable in my system with Android capabilities.
It worked very well. The emulator was launched and the application also opened.

I attached my terminal logs here:

CH1107:~ selvakumar$ node /Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js --address 127.0.0.1 --port 4723 --full-reset --device-name “” --platform-name Android --platform-version “4.2.2” --app “/Users/selvakumar/Documents/Apks/autoInsurance.apk” --avd “Test1” --browser-name Android -l

info: [debug] Starting Appium in pre-launch mode
info: Pre-launching app
info: [debug] No appActivity desired capability or server param. Parsing from apk.
info: [debug] No appPackage desired capability or server param. Parsing from apk.
info: [debug] Using local app from command line: /Users/selvakumar/Documents/Apks/autoInsurance.apk
info: [debug] Creating new appium session 524e7fea-f34c-45ab-952c-d62f6a1faf59
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.6.0_65
info: [debug] Checking whether adb is present
info: [debug] Using adb from /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb
info: [debug] Parsing package and activity from app manifest
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from /Users/selvakumar/Documents/android-sdk-macosx/build-tools/22.0.1/aapt
info: [debug] Extracting package and launch activity from manifest.
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/build-tools/22.0.1/aapt dump badging /Users/selvakumar/Documents/Apks/autoInsurance.apk
info: [debug] badging package: com.htcindia.autoinsurance
info: [debug] badging act: com.htcindia.autoinsurance.SplashActivity
info: [debug] Parsed package and activity are: com.htcindia.autoinsurance/com.htcindia.autoinsurance.SplashActivity
info: [debug] Using fast reset? false
info: [debug] Preparing device for session
info: [debug] Checking whether app is actually present
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Launching Emulator with AVD Test1, launchTimeout 120000ms and readyTimeout 120000ms
info: [debug] Checking whether emulator is present
info: [debug] Using emulator from /Users/selvakumar/Documents/android-sdk-macosx/tools/emulator
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
error: Unable to start Emulator: HAX is working and emulator runs in fast virt mode

info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 0 device(s) connected
info: [debug] 0 emulator(s) connected
info: [debug] Trying to find Test1 emulator
info: [debug] Getting connected emulators
info: [debug] Getting connected devices...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb devices
info: [debug] 1 device(s) connected
info: [debug] 1 emulator(s) connected
info: [debug] Sending telnet command to device: avd name
info: [debug] Getting running emulator port
info: [debug] Socket connection to device created
info: [debug] Socket connection to device ready
info: [debug] Telnet command got response: Test1
info: [debug] Found emulator Test1 in port 5554
info: [debug] Setting device id to emulator-5554
info: [debug] Waiting until emulator is ready
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "getprop init.svc.bootanim"
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 wait-for-device
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "echo 'ready'"
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 17
info: Device API level is: 17
info: [debug] Extracting strings for language: default
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "getprop persist.sys.language"
info: [debug] Current device persist.sys.language: en
info: [debug] java -jar "/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-adb/jars/appium_apk_tools_1.6.jar" "stringsFromApk" "/Users/selvakumar/Documents/Apks/autoInsurance.apk" "/tmp/com.htcindia.autoinsurance" en
info: [debug] No strings.xml for language 'en', getting default strings.xml
info: [debug] java -jar "/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-adb/jars/appium_apk_tools_1.6.jar" "stringsFromApk" "/Users/selvakumar/Documents/Apks/autoInsurance.apk" "/tmp/com.htcindia.autoinsurance"
warn: Error getting strings.xml from apk
info: [debug] Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
	at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:54)
	at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:540)
	at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:76)
	at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:68)
	at io.appium.apktools.StringsXML.run(StringsXML.java:84)
	at io.appium.apktools.Main.main(Main.java:31)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
	at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
	at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:43)
	at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:100)
	at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:81)
	at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
	... 5 more

warn: Could not get strings, continuing anyway
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "echo '{}' > /data/local/tmp/strings.json"
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from /Users/selvakumar/Documents/android-sdk-macosx/build-tools/22.0.1/aapt
info: [debug] Retrieving process from manifest.
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/build-tools/22.0.1/aapt dump xmltree /Users/selvakumar/Documents/Apks/autoInsurance.apk AndroidManifest.xml
info: [debug] Set app process to: com.htcindia.autoinsurance
info: [debug] Uninstalling com.htcindia.autoinsurance
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "am force-stop com.htcindia.autoinsurance"
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 uninstall com.htcindia.autoinsurance
info: [debug] App was uninstalled
info: [debug] Checking app cert for /Users/selvakumar/Documents/Apks/autoInsurance.apk.
info: [debug] executing cmd: java -jar /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-adb/jars/verify.jar /Users/selvakumar/Documents/Apks/autoInsurance.apk
info: [debug] App already signed.
info: [debug] Zip-aligning /Users/selvakumar/Documents/Apks/autoInsurance.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from /Users/selvakumar/Documents/android-sdk-macosx/build-tools/22.0.1/zipalign
info: [debug] Zip-aligning apk.
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/build-tools/22.0.1/zipalign -f 4 /Users/selvakumar/Documents/Apks/autoInsurance.apk /var/folders/np/5brtytwj00z2s9m_t7_09c5m0000gp/T/115526-404-qksl6z/appium.tmp
info: [debug] MD5 for app is 0558b16961dfb119afe15696d2e3ff60
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "ls /data/local/tmp/0558b16961dfb119afe15696d2e3ff60.apk"
info: [debug] Getting install status for com.htcindia.autoinsurance
info: [debug] Getting device API level
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 17
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "pm list packages -3 com.htcindia.autoinsurance"
info: [debug] App is not installed
info: Installing App
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "mkdir -p /data/local/tmp/"
info: [debug] Removing any old apks
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "ls /data/local/tmp/*.apk"
info: [debug] Found an apk we want to keep at /data/local/tmp/0558b16961dfb119afe15696d2e3ff60.apk
info: [debug] Couldn't find any apks to remove
info: [debug] Uninstalling com.htcindia.autoinsurance
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "am force-stop com.htcindia.autoinsurance"
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 uninstall com.htcindia.autoinsurance
info: [debug] App was not uninstalled, maybe it wasn't on device?
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "pm install -r /data/local/tmp/0558b16961dfb119afe15696d2e3ff60.apk"
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 push "/Applications/Appium.app/Contents/Resources/node_modules/appium/build/android_bootstrap/AppiumBootstrap.jar" /data/local/tmp/
info: [debug] Pushing settings apk to device...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 install "/Applications/Appium.app/Contents/Resources/node_modules/appium/build/settings_apk/settings_apk-debug.apk"
info: [debug] Pushing unlock helper app to device...
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 install "/Applications/Appium.app/Contents/Resources/node_modules/appium/build/unlock_apk/unlock_apk-debug.apk"
info: Starting App
info: [debug] Attempting to kill all 'uiautomator' processes
info: [debug] Getting all processes with 'uiautomator'
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "ps 'uiautomator'"
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.htcindia.autoinsurance -e disableAndroidWatchers false
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
info: [debug] [BOOTSTRAP] [debug] Loading json...
info: [debug] [BOOTSTRAP] [debug] json loading complete.
info: [debug] Waking up device if it's not alive
info: [debug] Pushing command to appium work queue: ["wake",{}]
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
info: [debug] [BOOTSTRAP] [debug] Client connected
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"wake","params":{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: wake
info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "dumpsys window"
info: Unlocking screen
info: [debug] Screen is locked, trying to unlock
info: [debug] Getting device API level
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 17
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n io.appium.unlock/.Unlock"
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "dumpsys window"
info: [debug] Screen is unlocked, continuing
info: [debug] Pushing command to appium work queue: ["getDataDir",{}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"getDataDir","params":{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":"\/data","status":0}
info: [debug] dataDir set to: /data
info: [debug] Pushing command to appium work queue: ["compressedLayoutHierarchy",{"compressLayout":false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"compressedLayoutHierarchy","params":{"compressLayout":false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: compressedLayoutHierarchy
info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":false,"status":0}
info: [debug] Getting device API level
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 17
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.htcindia.autoinsurance/com.htcindia.autoinsurance.SplashActivity"
info: [debug] Waiting for pkg "com.htcindia.autoinsurance" and activity "com.htcindia.autoinsurance.SplashActivity" to be focused
info: [debug] Getting focused package and activity
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "dumpsys window windows"
info: [debug] executing cmd: /Users/selvakumar/Documents/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell "getprop ro.build.version.release"
info: [debug] Device is at release version 4.2.2
info: [debug] Device launched! Ready for commands
info: [debug] Setting command timeout to the default of 60 secs
info: Welcome to Appium v1.4.1 (REV ce6220829063679bcccf5724515c29569c4a16d9)
info: Appium REST http interface listener started on 127.0.0.1:4723
info: [debug] Non-default server args: {"app":"/Users/selvakumar/Documents/Apks/autoInsurance.apk","address":"127.0.0.1","fullReset":true,"launch":true,"avd":"Test1","deviceName":"","platformName":"Android","platformVersion":"4.2.2","browserName":"Android"}
info: Console LogLevel: debug