@echo off
:miniAST
color 0c
taskkill -f -IM adb.exe>null
:checking
%~dp0\tool\reg.exe query HKEY_CLASSES_ROOT\Installer\Dependencies\{95716cce-fc71-413f-8ad5-56c2892d4b3a}
if %errorlevel%==0 goto driver
cls
  echo =========================
  echo  Installing vcredist_x86
  echo ========================= 
prerequired\vcredist_x86.exe
goto checking
=========================================================================
:driver
cls
%~dp0\tool\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f
%~dp0\tool\google\adb shell getprop ro.product.model
if %errorlevel%==0 goto start

systeminfo|find "XP"
if not %errorlevel%==0 goto driver1
cls
echo ===================================
echo Not support auto install adb driver
echo Please install adb driver manually
echo ===================================
timeout /t 10>null
taskkill -f -IM cmd.exe>null

:driver1
%~dp0\tool\google\adb shell getprop ro.product.model
if %errorlevel%==0 goto start
systeminfo|find "x64-based PC"
if not %errorlevel%==0 goto driver2
del %~dp0\tool\device.txt
%~dp0\tool\devcon_x64.exe status USB\VID_18D1*>>%~dp0\tool\device.txt
%~dp0\tool\devcon_x64.exe status USB\VID_0B05*>>%~dp0\tool\device.txt
%~dp0\tool\devcon_x64.exe status USB\VID_05C6*>>%~dp0\tool\device.txt
%~dp0\tool\devcon_x64.exe status USB\VID_0BB4*>>%~dp0\tool\device.txt
%~dp0\tool\devcon_x64.exe status USB\VID_8087*>>%~dp0\tool\device.txt
findstr "Device has a problem" %~dp0\tool\device.txt
if not %errorlevel%==0 goto driver1

cls
  echo =======================
  echo  Installing ADB driver
  echo ======================= 
:pnputil -a ADB_driver\*.inf
set DEVCON_PATH=devcon\x86\devcon.exe
if defined ProgramFiles(x86) (
	set DEVCON_PATH=devcon\x64\devcon.exe
)

echo ************************
echo   USB Driver Installer
echo ************************
echo DEVCON_PATH= "%DEVCON_PATH%"

%~dp0\ADB_driver\USBDriverInstaller\%DEVCON_PATH% dp_add %~dp0\ADB_driver\USBDriverInstaller\ASUS_USB\Windows_XP_VISTA_7_8_8.1\Android\android_winusb.inf
%~dp0\ADB_driver\USBDriverInstaller\%DEVCON_PATH% dp_add %~dp0\ADB_driver\USBDriverInstaller\QCOM_USB\adbandroid_winusb.inf
%~dp0\ADB_driver\USBDriverInstaller\%DEVCON_PATH% dp_add %~dp0\ADB_driver\USBDriverInstaller\ASUS_USB\Windows_XP_VISTA_7_8_8.1\Android\intc_adb.inf

%~dp0\tool\devcon_x64.exe restart "USB\VID_0B05*">null
%~dp0\tool\devcon_x64.exe restart "USB\VID_05C6*">null
%~dp0\tool\devcon_x64.exe restart "USB\VID_18D1*">null
%~dp0\tool\devcon_x64.exe restart "USB\VID_0BB4*">null
%~dp0\tool\devcon_x64.exe restart "USB\VID_8087*">null
timeout /t 20>null
del null
goto driver1

:driver2
del %~dp0\tool\device.txt
%~dp0\tool\devcon_x86.exe status USB\VID_18D1*>>%~dp0\tool\device.txt
%~dp0\tool\devcon_x86.exe status USB\VID_0B05*>>%~dp0\tool\device.txt
%~dp0\tool\devcon_x86.exe status USB\VID_05C6*>>%~dp0\tool\device.txt
%~dp0\tool\devcon_x86.exe status USB\VID_0BB4*>>%~dp0\tool\device.txt
%~dp0\tool\devcon_x86.exe status USB\VID_8087*>>%~dp0\tool\device.txt
findstr "Device has a problem" %~dp0\tool\device.txt
if not %errorlevel%==0 goto driver1
cls
  echo =======================
  echo  Installing ADB driver
  echo ======================= 
:pnputil -a ADB_driver\*.inf
:%~dp0\ADB_driver\USBDriverInstaller\install_drivers.bat
%~dp0\ADB_driver\USBDriverInstaller\%DEVCON_PATH% dp_add %~dp0\ADB_driver\USBDriverInstaller\ASUS_USB\Windows_XP_VISTA_7_8_8.1\Android\android_winusb.inf
%~dp0\ADB_driver\USBDriverInstaller\%DEVCON_PATH% dp_add %~dp0\ADB_driver\USBDriverInstaller\QCOM_USB\adbandroid_winusb.inf
%~dp0\ADB_driver\USBDriverInstaller\%DEVCON_PATH% dp_add %~dp0\ADB_driver\USBDriverInstaller\ASUS_USB\Windows_XP_VISTA_7_8_8.1\Android\intc_adb.inf

%~dp0\tool\devcon_x86.exe restart "USB\VID_0B05*">null
%~dp0\tool\devcon_x86.exe restart "USB\VID_05C6*">null
%~dp0\tool\devcon_x86.exe restart "USB\VID_18D1*">null
%~dp0\tool\devcon_x86.exe restart "USB\VID_0BB4*">null
%~dp0\tool\devcon_x86.exe restart "USB\VID_8087*">null
timeout /t 20>null
del null
goto driver1
=========================================================================
:start
CLS
for /f "delims={,} tokens=1" %%a in ('%~dp0\tool\google\adb shell getprop ro.product.model') do set model=%%a
for /f "tokens=1-4 delims= " %%a in ("%model%") do set tmp=%%a%%b%%c%%d
cls
echo %tmp%
goto %tmp%
=====================================================================================
:TransformerTF101
:TF101
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_JP_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\[Transformer TF101]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:TransformerTF101G
:TF101G
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_JP_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\[Transformer TF101G]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:TransformerSL101
:SliderSL101
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_JP_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\[Slider SL101]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:TransformerPrimeTF201
:TF201
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_JP_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\[Transformer Prime TF201]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:ASUSTransformerPadTF300T
:ASUSPadTF300T
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_JP_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\[ASUS Transformer Pad TF300T]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:ASUSTransformerPadTF300TL
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_NS_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\[ASUS Transformer Pad TF300TL]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null*
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:ASUSTransformerPadTF300TG
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_NS_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\[ASUS Transformer Pad TF300TG]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:ASUSTransformerPadTF700T
:ASUSPadTF700T
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_JP_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\[ASUS Transformer Pad TF700T]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:ME301T
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_NS_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\[ME301T]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:ASUSTransformerPadTF700KL
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_NS_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\[ASUS Transformer Pad TF700KL]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:ME172V
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb shell debug_en -s 1
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_NS_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\[ME172V]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:ME173X
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_NS_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\[ME173X]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:ME302C
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_NS_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\[ME302C]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:ME302KL
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_NS_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\[ME302KL]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:ME371MG
:K004
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb shell setprop persist.sys.uart 0
%~dp0\tool\google\adb install -r %~dp0\SMMI\SMMI_TEST_NS_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\[ME371MG]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:Nexus7
cls
echo ********************************************
echo         1. Nexus 7      (ME370T)
echo         2. Nexus 7 C    (ME370TG)
echo         3. Nexus 7 2013 (ME571K) 
echo         4. Nexus 7 2013 (ME571KL)
echo ********************************************
set %errorlevel%=
choice /C 1234 /M "Please select model:"
if %errorlevel%== 1 goto ME370T
if %errorlevel%== 2 goto ME370TG
if %errorlevel%== 3 goto ME571K
if %errorlevel%== 4 goto ME571KL

:ME370T
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_NS_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
copy "%~dp0\XML\Nexus 7\[ME370T]-config.xml" "%~dp0\XML\[Nexus 7]-config.xml"
%~dp0\tool\google\adb push "%~dp0\XML\[Nexus 7]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:ME370TG
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_NS_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
copy "%~dp0\XML\Nexus 7\[ME370TG]-config.xml" "%~dp0\XML\[Nexus 7]-config.xml"
%~dp0\tool\google\adb push "%~dp0\XML\[Nexus 7]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:ME571K
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_ME571_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
copy "%~dp0\XML\Nexus 7\[ME571K]-config.xml" "%~dp0\XML\[Nexus 7]-config.xml"
%~dp0\tool\google\adb push "%~dp0\XML\[Nexus 7]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:ME571KL
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_ME571_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
copy "%~dp0\XML\Nexus 7\[ME571KL]-config.xml" "%~dp0\XML\[Nexus 7]-config.xml"
%~dp0\tool\google\adb push "%~dp0\XML\[Nexus 7]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:K00C
cls
echo **********************************************************************
echo  Noted: 
echo  Please refer to SOP(GaugeIC_test_setting_TF701T_under_user_image)
echo  before test
echo **********************************************************************
pause
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_TF701T_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\[K00C]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:K00E
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_ME372CG_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\[K00E]-config_NoSign.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:K00L
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_ME102A_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\[K00L]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:K00F
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_ME102A_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:K00G
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_ME560CG_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:ASUSTransformerPadTF502T
:ASUSTransformerPadTF502TG
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_TF502T_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:ME171
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_ME560CG_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb push "%~dp0\XML\[ME171]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:ASUSK00S
%~dp0\tool\google\adb shell getprop ro.build.version.incremental|find "4G"
if %errorlevel%==0 goto 4G
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_ME175KG_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
copy "%~dp0\XML\[ASUS K00S 8G]-config.xml" "%~dp0\XML\[ASUS K00S]-config.xml" > null
%~dp0\tool\google\adb push "%~dp0\XML\[ASUS K00S]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit

:4G
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_ME175KG_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
copy "%~dp0\XML\[ASUS K00S 4G]-config.xml" "%~dp0\XML\[ASUS K00S]-config.xml" > null
%~dp0\tool\google\adb push "%~dp0\XML\[ASUS K00S]-config.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:K00U
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_ME173XX_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:ME175CG
:K00Z
  echo =====================
  echo     Start SMMI....
  echo =====================
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN > null
goto exit
=====================================================================================
:PadFone
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\User_A66.apk
:%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
:PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:PadFone2
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\User_A68.apk
:%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
:PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:PadFoneInfinity
:ASUSA80
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\User_A80.apk
:%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
:PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:PadFoneT004
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\User_A86.apk
:%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
:PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit

=====================================================================================
:A11
:PadFoneT00C
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest
%~dp0\tool\google\adb install %~dp0\SMMI\User_A11.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:A68M
:PadFoneT008
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest
%~dp0\tool\google\adb install %~dp0\SMMI\User_A68M.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:PF400CG
:ASUS_T00E
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:A500CG
:ASUS_T00F
  echo ==================
  echo   Start SMMI....
  echo ==================
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
PING 127.0.0.1 -n 5 > null
goto exit
=====================================================================================
:A600CG
:ASUS_T00G
  echo ==================
  echo   Start SMMI....
  echo ==================
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
PING 127.0.0.1 -n 5 > null
goto exit
=====================================================================================
:A501CG
:ASUS_T00J
  echo ==================
  echo   Start SMMI....
  echo ==================
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
PING 127.0.0.1 -n 5 > null
goto exit
=====================================================================================
:A91
:ASUSPadFoneX
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:ASUSTabletP1802-T
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_P1802-T_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:TX201LA
  echo =====================
  echo   Install SMMI....
  echo =====================
%~dp0\tool\google\adb uninstall com.asus.atd.smmitest>null
%~dp0\tool\google\adb install %~dp0\SMMI\SMMI_TEST_TX201LA_USER.apk
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
%~dp0\tool\google\adb push "%~dp0\XML\smmitest_settings.xml" "/data/data/com.asus.atd.smmitest/files"
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/com.asus.atd.ast.AST > null
PING 127.0.0.1 -n 3 > null
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
goto exit
=====================================================================================
:FE170CG
:K012
  echo ==================
  echo   Start SMMI....
  echo ==================
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
PING 127.0.0.1 -n 5 > null
goto exit
=====================================================================================
:ME372CL
:K00Y
  echo ==================
  echo   Start SMMI....
  echo ==================
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
PING 127.0.0.1 -n 5 > null
goto exit
=====================================================================================
:ME170C
:K017
  echo ==================
  echo   Start SMMI....
  echo ==================
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
PING 127.0.0.1 -n 5 > null
goto exit
=====================================================================================
:TF103C
:K010
  echo ==================
  echo   Start SMMI....
  echo ==================
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
PING 127.0.0.1 -n 5 > null
goto exit
=====================================================================================
:ME181C/CX
:K011
  echo ==================
  echo   Start SMMI....
  echo ==================
%~dp0\tool\google\adb shell am start -n com.asus.atd.smmitest/.main.MAIN
PING 127.0.0.1 -n 5 > null
goto exit
=====================================================================================
:exit
taskkill -f -IM cmd.exe