Bug Report: 1.0.1.1153 - batch files

A Arsen Bandurian 3 years ago
1 0 0

Hi.

1.Filecontent.bat
I’ve found a bug with the Filecontent.bat file (created in staging profile folder to push files to device).
It should read
adb %~1 push  …

instead of
adb %1 push  …

The tilde sign allows passing the empty string correctly, otherwise it fails (incorrect parameters passed to ADB), if the device serial number is not specified (single device situation).

2. ADBatch.bat
Found additional bugs in ADBatch.bat: doesn't like paths with spaces and special characters (&, etc); does not work when the 2nd parameter (S/N) is omitted.

From the structure of the file, it is clear, that it is supposed to work without the 2nd parameter as well (tries to redefine a few things), however, in some lines the checks are not in place, like here:

echo Launching MSC to process the staging profile.
adb %var_device_Specific% shell am start -n "%var_MSC_package_Name%/.%var_MSC_activity_Name%" --es DeviceID %2

If %2 is not specified, the script will fail. I think the easiest would be to make a check for %2 at the start, and if it's not present - actually set it to the 1st serial no or run adb devices and return an error when 0 or 2+ devices are present (alternatively, use top device on the list or ALL devices - just document as a feature and add a log entry).

Thanks.

CONTACT
Can’t find what you’re looking for?