@@ -20,7 +20,6 @@ installed the NDK and SDK. Otherwise an error such as:
2020"The external label '//external: android /sdk' is not bound to anything" will
2121be reported.
2222
23-
2423To build the APK, run this from your workspace root:
2524```
2625bazel build //tensorflow/examples/android:tensorflow_demo -c opt --copt=-mfpu=neon
@@ -29,11 +28,19 @@ Note that "-c opt" is currently required; if not set, an assert (for an
2928otherwise non-problematic issue) in Eigen will halt the application during
3029execution. This issue will be corrected in an upcoming release.
3130
32- If adb debugging is enabled on your device, you may instead use the following
33- command from your workspace root to automatically build and install:
31+ If adb debugging is enabled on your Android 5.0 or later device, you may then
32+ use the following command from your workspace root to install the APK once
33+ built:
34+ '''
35+ adb install -r -g bazel-bin/tensorflow/examples/android/tensorflow_demo_incremental.apk
36+ '''
37+
38+ Alternatively, a streamlined means of building, installing and running in one
39+ command is:
3440```
35- bazel mobile-install //tensorflow/examples/android:tensorflow_demo -c opt --copt=-mfpu=neon
41+ bazel mobile-install //tensorflow/examples/android:tensorflow_demo -c opt --start_app -- copt=-mfpu=neon
3642```
3743
38- Add the "--start_app" flag if you wish to automatically start the app after
39- installing. Otherwise, find the application icon labeled "Tensorflow Demo".
44+ If camera permission errors are encountered (possible on Android Marshmallow or
45+ above), then the adb install command above should be used instead, as it
46+ automatically grants the required camera permissions with '-g'.
0 commit comments