-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- [`copyToLocal(file,folder)`]: *NEW* command to copy file from host to connected device - [`selectLocalFile(device,folder,filename)`]: *NEW* command to select file from device's local storage - [`bin/mobile/copy-to-android.cmd|sh`]: *NEW* utility script to copy file from host to connected Android device - [`bin/mobile/copy-to-ios.sh`]: *NEW* utility script to copy file from host to connected iOS device Nexial v4.2 release candidate Signed-off-by: automike <[email protected]>
- Loading branch information
Showing
11 changed files
with
182 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@echo off | ||
setlocal enableextensions | ||
|
||
REM ----------------------------------------------------------------------------------------------- | ||
REM Copy local file to connected Android device | ||
REM ----------------------------------------------------------------------------------------------- | ||
|
||
if "%2"=="" ( | ||
echo ERROR: No source file or target folder specified! | ||
echo USAGE: %0 [source file] [target folder] | ||
echo. | ||
exit /b -1 | ||
) | ||
|
||
set ANDROID_SDK_ROOT=%USERPROFILE%\.nexial\android\sdk | ||
cd /d %ANDROID_SDK_ROOT%\platform-tools | ||
adb push "%1" "/storage/self/primary/%2" | ||
if %ERRORLEVEL% EQU 0 ( | ||
exit /b 0 | ||
) else ( | ||
echo ERROR: File copy from %1 to %2 failed: %errorlevel% | ||
exit /b %errorlevel% | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
# ----------------------------------------------------------------------------------------------- | ||
# Copy local file to connected Android device | ||
# ----------------------------------------------------------------------------------------------- | ||
|
||
if [[ "$2" = "" ]]; then | ||
echo | ||
echo "ERROR: No source file or target folder specified!" | ||
echo "USAGE: $0 [source file] [target folder]" | ||
echo | ||
exit 254 | ||
fi | ||
|
||
ANDROID_SDK_ROOT=~/.nexial/android/sdk | ||
cd $ANDROID_SDK_ROOT/platform-tools || exit | ||
./adb push "$1" "/storage/self/primary/$2" | ||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
# ----------------------------------------------------------------------------------------------- | ||
# Copy local file to connected iOS device | ||
# ----------------------------------------------------------------------------------------------- | ||
|
||
if [[ "$1" = "" ]]; then | ||
echo | ||
echo "ERROR: No source file specified!" | ||
echo "USAGE: $0 [source file]" | ||
echo | ||
exit 254 | ||
fi | ||
|
||
echo | ||
if whereis xcrun > /dev/null 2>&1 ; then | ||
xcrun simctl addmedia booted "$1" | ||
exit $? | ||
else | ||
echo "ERROR: Required utility 'xcrun' not found; Unable to proceed" | ||
exit 253 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.