我有两个 bat 文件 a) 是 H:\AD009\APK_apps_OppoGallery2\OppoGallery2\OppoGallery3D_N1\123.bat
ant release
b) 是 D:\Users\Administrator\Desktop
@echo off
rem 关闭自动输出
rem 接收输入
:begin
set home=H:\N1_ROM_svn685\apq\linux
set target=msm8960
set psfile=c:/ps.log
set input=0
echo PROJECT=%home%
echo 0: adbshell
echo 1: vendor_server
echo 2: libcameraservice
echo 3: pushapk
echo 4: compileapk
echo -1: exit
set /p input=请输入字符串:
rem 输出得到的输入信息
echo 您输入的字符串是:%input%
adb remount
if %input%==0 goto adbshell
if %input%==1 goto vendor_server
if %input%==2 goto libcameraservice
if %input%==3 goto pushapk
if %input%==4 goto compileapk
if %input%==-1 goto exit
:libmmcamera_frameproc.so
echo libandroid_runtime.so
adb push %home%\out\target\product\%target%\system\lib\libmmcamera_frameproc.so /system/lib/
goto kill
:vendor_server
echo camera.msm8960.so
adb push %home%\out\target\product\%target%\system\lib\hw\camera.msm8960.so /system/lib/hw/
adb push %home%\out\target\product\%target%\system\lib\liboemcamera.so /system/lib
adb push %home%\out\target\product\%target%\system\lib\libmmcamera_3a_legacy.so /system/lib
adb push %home%\out\target\product\%target%\system\lib\libmmcamera_statsproc31.so /system/lib
adb push %home%\out\target\product\%target%\system\lib\libmmcamera_plugin.so /system/lib
adb push %home%\out\target\product\%target%\system\lib\libmmcamera_frameproc.so /system/lib
adb push %home%\out\target\product\%target%\system\lib\libmmcamera_cpp.so /system/lib
adb push %home%\out\target\product\%target%\system\lib\libmmcamera_interface.so /system/lib
adb push %home%\out\target\product\%target%\system\lib\libmmcamera_interface2.so /system/lib
adb push %home%\out\target\product\%target%\system\lib\libchromatix_imx135_default_video.so /system/lib
adb push %home%\out\target\product\%target%\system\lib\libchromatix_imx135_preview.so /system/lib
adb push %home%\out\target\product\%target%\system\lib\libchromatix_imx135_zsl.so /system/lib
adb push %home%\out\target\product\%target%\system\lib\libchromatix_imx135_hfr_120fps.so /system/lib
adb push %home%\out\target\product\%target%\system\lib\libchromatix_s5k6a3yx_default_video.so /system/lib
adb push %home%\out\target\product\%target%\system\lib\libchromatix_s5k6a3yx_preview.so /system/lib
adb push %home%\out\target\product\%target%\system\lib\libchromatix_s5k6a3yx_zsl.so /system/lib
adb push %home%\out\target\product\%target%\system\lib\libchromatix_s5k6a3yx_video_hd.so /system/lib
adb push %home%\out\target\product\%target%\system\lib\hw\camera.msm8960.so /system/lib/hw
goto kill
:libcameraservice
echo libcameraservice.so
adb push %home%\out\target\product\%target%\system\lib\libcameraservice.so /system/lib/
goto kill
:pushapk
echo oppogallery.apk
goto kill
:compileapk
cd /d H:\AD009\APK_apps_OppoGallery2\OppoGallery2\OppoGallery3D_N1
start H:\AD009\APK_apps_OppoGallery2\OppoGallery2\OppoGallery3D_N1\123.bat
goto kill
:kill
adb shell ps > %psfile%
python D:\Users\Administrator\Desktop\hello.py %psfile%
adb shell kill %errorlevel%
goto begin
:adbshell
adb shell
:end
set input = 0;
goto begin
:exit
echo good bye
pause
我输入4,我想执行标签“compileapk”,但是报can't find ant
当我输入“echo %path%”时,我可以发现 ant'spath 在输出中。
但是当我手动双击 123.bat 时,它可以执行。