-1

I am trying to use monkey for Testing in android (http://developer.android.com/tools/help/monkey.html). I understand that for this to work, I need to configure adb on my command line. I have added the adb.exe to my system's environment variables (Control Panel->System->Advanced System Settings->Adcanced->Environment Variables->path) as described here How to open adb and use it to send commands. When I tried to run it afterwards, I got a message stating " adb.exe is not a valid Win32 application". I looked at some posts for other files that were reported as not being valid win32 applications, and the common themes are that the .exe file is either corrupted or incompattable (for example: 64bit vs 32 bit.) However, after I close the error dialog, "Access is denied" is displayed on the command prompt, suggesting that the error is one of missing permissions. I'm not sure if the file is invalid or if it is valid but some permission is making it not accessible. Has anyone seen this before and knows how to fix it? Thanks in advance for any help.

Here are some pieces of information that might be helpful

Access Denied Message enter image description here

Not Valid Win32 Application Message. enter image description here

location of the adb.exe file
C:\Users\mfarnsworth\android-sdks\platform-tools\adb.exe

location as it apears in the Environment Variables
C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Users\mfarnsworth\android-sdks\platform-tools

Community
  • 1
  • 1
wolfaviators
  • 503
  • 1
  • 7
  • 21
  • `H:\adb.exe` is not a valid Win32 application. Because it's an empty file you created with your second command on the first screenshot. – Alex P. Jun 01 '15 at 17:01
  • I'm looking at the file location and see that adb.exe has a size of 988 KB. – wolfaviators Jun 01 '15 at 17:06
  • The commands you are looking at are previous attempts. to your point, I should have cleared them before taking the screenshot. – wolfaviators Jun 01 '15 at 17:07
  • My assigning the Environment Variables happened between command 2 and command 3. – wolfaviators Jun 01 '15 at 17:08
  • I've edited my post to have the extranious, confusing command prompt commands removed. – wolfaviators Jun 01 '15 at 17:11
  • Too bad that covering your tracks does not undo the thing you did. Keep reading my first comment till it makes sense. – Alex P. Jun 01 '15 at 17:19
  • Would you agree that if your assertion is true, I would be able to navigate to the location of my platform-tools and see that the adb.exe is 0? – wolfaviators Jun 01 '15 at 17:21
  • You said that adb.exe is an empty file. If that is true, than the file should have a size of 0. However, In the directory, the size is 988KB. Would you agree that at least from a beginners perspective, there apears to be an inconsistancy in your claim? – wolfaviators Jun 01 '15 at 17:31
  • Windows and I are spelling it out for you... you are trying to run `H:\adb.exe` and not the file in the `platform-tools` – Alex P. Jun 01 '15 at 17:31
  • So what you are saying then is that Windows is looking in a different location than the platform tools. is that correct? – wolfaviators Jun 01 '15 at 17:32
  • I was lead to believe that by setting the Path attribute in the Environment variables to point to the platform-tools folder, that typing H:\adb in the command line would point to the adb.exe located in the platform-tools. Is this an incorrect assumption? – wolfaviators Jun 01 '15 at 17:35

1 Answers1

0

Found my problem.

I was Operating under the false assumption that adding something to the Enviroment Variables path would make it accessable anywhere. I also was working in the "H:\" directory. Not sure what I did to get there, but I looked up the command to change it to the "C:\" drive https://superuser.com/questions/361802/cd-doesnt-change-directory-in-windows-7 and changed directories to get into the my platform-tools folder. problem solved. I can now interact with the adb.

Community
  • 1
  • 1
wolfaviators
  • 503
  • 1
  • 7
  • 21