Skip to content

Commit faf16dd

Browse files
authored
Android Emulator job:minor fix,comments (#865)
Add minor fix for script compatibility on MacOS and Ubuntu. Add more extended comments for developers. Relates-To: OLPEDGE-1774 Signed-off-by: Yaroslav Stefinko <[email protected]>
1 parent ad96dcb commit faf16dd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/android/build-test-emulator.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ echo ""
2828
echo "*************** $VARIANT Build SDK for C++ ********** Start ***************"
2929
CMAKE_COMMAND="cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=$NDK_ROOT/build/cmake/android.toolchain.cmake \
3030
-DANDROID_PLATFORM=android-$ANDROID_API -DANDROID_STL=c++_static -DANDROID_ABI=$ANDROID_ABI"
31-
NINJA_COMMAND="ninja -j$(nproc)"
31+
NINJA_COMMAND="ninja -j4"
3232

3333
echo ""
3434
echo " ---- Calling $CMAKE_COMMAND"
@@ -61,19 +61,19 @@ nohup $ANDROID_HOME/emulator/emulator -avd android_emulator -no-snapshot -noaudi
6161
-no-boot-anim -gpu off -no-accel -no-window -camera-back none -camera-front none -selinux permissive \
6262
-qemu -m 2048 > /dev/null 2>&1 &
6363

64-
64+
# Below are special commands for wait until emulator actually loads and boot completed
6565
$ANDROID_HOME/platform-tools/adb wait-for-device
66-
6766
A=$($ANDROID_HOME/platform-tools/adb shell getprop sys.boot_completed | tr -d '\r')
6867
while [ "$A" != "1" ]; do
6968
sleep 2
7069
A=$($ANDROID_HOME/platform-tools/adb shell getprop sys.boot_completed | tr -d '\r')
7170
done
7271

72+
# At this moment we assume that Android Virtual Device is started in emulation, ready for our commands.
7373
# Running some trivial command like pressing Menu button.
7474
$ANDROID_HOME/platform-tools/adb shell input keyevent 82
7575

76-
#Showing list of devices connected to host
76+
# Showing list of devices connected to host
7777
$ANDROID_HOME/platform-tools/adb devices
7878

7979
### In this place, we plan to run .apk as test application inside emulator.

0 commit comments

Comments
 (0)