For Android 2.3, I use this command line to enter CTS console:
java -Xmx512M -cp %CTS_ROOT%\tools\ddmlib-prebuilt.jar;%CTS_ROOT%\tools\cts.jar;%CTS_ROOT%\tools\junit.jar; %CTS_ROOT%\tools\hosttestlib.jar com.android.cts.TestHost %CTS_ROOT%\repository/host_config.xml
Is there a similar way of running Android 4.0 CTS like this without cygwin-like thing?
For run Android 4.0+ CTS on Windows
here is my solution:(I assume all path(adb)/classpath(Java) is set correct)
1.download and unzip CTS file(for example,I put all unzipped files into D:\cts , the folder will look like D:\cts\android-cts)
http://source.android.com/compatibility/downloads.html
2.make cts_windows.bat file and put into tools folder. (that is D:\cts\android-cts\tools\cts_windows.bat in my case)
edit cts_windows.bat file with code below (remember to use your own -DCTS_ROOT
path):
java -cp ddmlib-prebuilt.jar;tradefed-prebuilt.jar;hosttestlib.jar;cts-tradefed.jar -DCTS_ROOT=D:\cts com.android.cts.tradefed.command.CtsConsole
for more instructions, read manual at http://source.android.com/compatibility/android-cts-manual-r4.pdf