Skip to content

Commit

Permalink
[docs] ADB error codes (dotnet#1919)
Browse files Browse the repository at this point in the history
Context: http://work.devdiv.io/641042
Context: xamarin/monodroid#804

Documented the current set of error codes we emit for ADB.
  • Loading branch information
jonathanpeppers authored and dellis1972 committed Jul 4, 2018
1 parent 5004d0f commit ba0db7d
Show file tree
Hide file tree
Showing 7 changed files with 141 additions and 8 deletions.
17 changes: 9 additions & 8 deletions Documentation/guides/messages/adb0000.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
# Compiler Error/Warning ADB0000

This message indicates that `adb` (Android Debug Bridge) reported an
error or warning. `adb` is part of the Android SDK and is used
internally by Xamarin.Android to communicate with Android emulators
and devices. Learn more about `adb` from the [Android
documentation](https://developer.android.com/studio/command-line/adb).
unhandled/unexpected error or warning. `adb` is part of the Android
SDK and is used internally by Xamarin.Android to communicate with
Android emulators and devices. Learn more about `adb` from the
[Android documentation][adb].

Note that nothing in the open source `xamarin-android` repository
emits `ADB0000`, as features such as debugging and "fast deployment"
are implemented in the proprietary Xamarin.Android bits.

Errors reported by `adb` are very much outside of Xamarin.Android's
control, so a general error code of `ADB0000` is used reporting the
exact message coming from `adb`.
control, so a general error code of `ADB0000` is used for unexpected
errors reporting the exact message coming from `adb`.

A few common messages include:
An example message would be:
- `error ADB0000: error: no devices/emulators found`
- `error ADB0000: Failure [INSTALL_FAILED_NO_MATCHING_ABIS]: Failed to extract native libraries`

[adb]: https://developer.android.com/studio/command-line/adb
18 changes: 18 additions & 0 deletions Documentation/guides/messages/adb0010.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Compiler Error/Warning ADB0010

This message indicates that `adb` (Android Debug Bridge) reported an
unhandled/unexpected error during APK installation. `adb` is part of
the Android SDK and is used internally by Xamarin.Android to
communicate with Android emulators and devices. Learn more about `adb`
from the [Android documentation][adb].

Note that nothing in the open source `xamarin-android` repository
emits `ADB0010`, as features such as debugging and "fast deployment"
are implemented in the proprietary Xamarin.Android bits.

Errors reported by `adb` are very much outside of Xamarin.Android's
control, so a general error code of `ADB0010` is used for unexpected
errors related to APK installation. An error message of the form
`[INSTALL_FAILED_*]` will emit this error code.

[adb]: https://developer.android.com/studio/command-line/adb
25 changes: 25 additions & 0 deletions Documentation/guides/messages/adb0020.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Compiler Error ADB0020

This message indicates that `adb` (Android Debug Bridge) reported an
error. `adb` is part of the Android SDK and is used internally by
Xamarin.Android to communicate with Android emulators and devices.
Learn more about `adb` from the [Android documentation][adb].

Note that nothing in the open source `xamarin-android` repository
emits `ADB0020`, as features such as debugging and "fast deployment"
are implemented in the proprietary Xamarin.Android bits.

`ADB0020` means that the built Android APK did not contain a matching
Android architecture for the emulator or device it was deployed to. A
solution is to add an additional architecture under the
`Supported architectures` in your project options.

You may also modify the MSBuild property, as in the following example
that includes all ABIs:

<AndroidSupportedAbis>armeabi;armeabi-v7a;x86;x86_64;arm64-v8a</AndroidSupportedAbis>

An example message would be:
- `error ADB0020: Failure [INSTALL_FAILED_NO_MATCHING_ABIS]: Failed to extract native libraries`

[adb]: https://developer.android.com/studio/command-line/adb
22 changes: 22 additions & 0 deletions Documentation/guides/messages/adb0030.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Compiler Error ADB0030

This message indicates that `adb` (Android Debug Bridge) reported an
error. `adb` is part of the Android SDK and is used internally by
Xamarin.Android to communicate with Android emulators and devices.
Learn more about `adb` from the [Android documentation][adb].

Note that nothing in the open source `xamarin-android` repository
emits `ADB0030`, as features such as debugging and "fast deployment"
are implemented in the proprietary Xamarin.Android bits.

`ADB0030` means that you must manually uninstall your APK before you
can deploy your Xamarin.Android application to the attached device or
emulator. This situation can happen if you had deployed your
Xamarin.Android application in the past, but it was signed with a
different Android keystore file.

An example message would be:
- `error ADB0030: Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]`
- `error ADB0030: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]`

[adb]: https://developer.android.com/studio/command-line/adb
26 changes: 26 additions & 0 deletions Documentation/guides/messages/adb0040.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Compiler Error ADB0040

This message indicates that `adb` (Android Debug Bridge) reported an
error. `adb` is part of the Android SDK and is used internally by
Xamarin.Android to communicate with Android emulators and devices.
Learn more about `adb` from the [Android documentation][adb].

Note that nothing in the open source `xamarin-android` repository
emits `ADB0040`, as features such as debugging and "fast deployment"
are implemented in the proprietary Xamarin.Android bits.

`ADB0040` means that you are trying to deploy to an emulator or device
that has an older Android version that what your Xamarin.Android
application supports.

Verify you are setting the appropriate values for `uses-sdk` in your
`AndroidManifest.xml`:

<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="27"/>

Your attached device must at least be able to support `minSdkVersion`.

An example message would be:
- `error ADB0040: Failure [INSTALL_FAILED_OLDER_SDK]`

[adb]: https://developer.android.com/studio/command-line/adb
21 changes: 21 additions & 0 deletions Documentation/guides/messages/adb0050.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Compiler Error ADB0050

This message indicates that `adb` (Android Debug Bridge) reported an
error. `adb` is part of the Android SDK and is used internally by
Xamarin.Android to communicate with Android emulators and devices.
Learn more about `adb` from the [Android documentation][adb].

Note that nothing in the open source `xamarin-android` repository
emits `ADB0050`, as features such as debugging and "fast deployment"
are implemented in the proprietary Xamarin.Android bits.

`ADB0050` is likely an error in the Xamarin.Android build chain, since
it means there was an absence of the `-r` flag during the
`adb install` command. Consider submitting a [bug][bug] if you are
getting this warning under normal circumstances.

An example message would be:
- `error ADB0050: Failure [INSTALL_FAILED_ALREADY_EXISTS]`

[adb]: https://developer.android.com/studio/command-line/adb
[bug]: https://github.com/xamarin/xamarin-android/wiki/Submitting-Bugs,-Feature-Requests,-and-Pull-Requests
20 changes: 20 additions & 0 deletions Documentation/guides/messages/adb0060.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Compiler Error ADB0060

This message indicates that `adb` (Android Debug Bridge) reported an
error. `adb` is part of the Android SDK and is used internally by
Xamarin.Android to communicate with Android emulators and devices.
Learn more about `adb` from the [Android documentation][adb].

Note that nothing in the open source `xamarin-android` repository
emits `ADB0060`, as features such as debugging and "fast deployment"
are implemented in the proprietary Xamarin.Android bits.

`ADB0060` means that the internal or external disk space is full on
your Android emulator or device. Consider uninstalling applications or
adding an SD card for additional storage.

An example message would be:
- `error ADB0060: Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]`
- `error ADB0060: Failure [INSTALL_FAILED_MEDIA_UNAVAILABLE]`

[adb]: https://developer.android.com/studio/command-line/adb

0 comments on commit ba0db7d

Please sign in to comment.