在Android上运行可执行文件bat

这个bat是用来push可执行文件到Android device上,然后执行这个文件

@echo off
 
if "%1" == "" goto noinput
if not EXIST %1 goto nofile
 
:run
echo adb push %1 /data
adb push %1 /data
echo adb shell chmod 777 /data/%1
adb shell chmod 777 /data/%1
echo adb shell ./data/%1
adb shell ./data/%1
goto exit
 
:noinput
echo Usage:
echo       adbrun binfile
goto exit
 
:nofile
echo The file:%1 doesn't exist,please check it and try again!
goto exit
 
:exit