From de2a5ed325de31caf0a9aa1a98717a4280a6ea0b Mon Sep 17 00:00:00 2001 From: Zhuang Ma Date: Wed, 28 Jun 2017 13:45:46 +0800 Subject: [PATCH] Add a case of install apk failed caused by signatures do not match --- README.en.md | 107 ++++++++++++++++++++++++++------------------------- README.md | 107 ++++++++++++++++++++++++++------------------------- 2 files changed, 108 insertions(+), 106 deletions(-) diff --git a/README.en.md b/README.en.md index 1771a84..4593029 100644 --- a/README.en.md +++ b/README.en.md @@ -522,59 +522,60 @@ Failure [INSTALL_FAILED_ALREADY_EXISTS] Common Installation failed output code, the meaning and possible solutions are as follows: -| Output | Meaning | solutions | -|----------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------| -| INSTALL\_FAILED\_ALREADY\_EXISTS | application already exists | use `-r` parameters | -| INSTALL\_FAILED\_INVALID\_APK | invalid APK file | | -| INSTALL\_FAILED\_INVALID\_URI | invalid filename APK | APK file names to ensure no Chinese | -| INSTALL\_FAILED\_INSUFFICIENT\_STORAGE | lack of space | cleanup space | -| INSTALL\_FAILED\_DUPLICATE\_PACKAGE | program of the same name already exists | | -| INSTALL\_FAILED\_NO\_SHARED\_USER | shared user requested does not exist | | -| INSTALL\_FAILED\_UPDATE\_INCOMPATIBLE | already installed signature is not the same application with the same name, and the data is not removed | | -| INSTALL\_FAILED\_SHARED\_USER\_INCOMPATIBLE | shared user request exists but the signatures do not match | | -| INSTALL\_FAILED\_MISSING\_SHARED\_LIBRARY | installation package used on the device unusable shared library | | -| INSTALL\_FAILED\_REPLACE\_COULDNT\_DELETE | can not be deleted when replacing | | -| INSTALL\_FAILED\_DEXOPT | dex optimization validation failure or lack of space | | -| INSTALL\_FAILED\_OLDER\_SDK | equipment system version is lower than the application requirements | | -| INSTALL\_FAILED\_CONFLICTING\_PROVIDER | equipment already exists with the same name in application content provider | | -| INSTALL\_FAILED\_NEWER\_SDK | equipment system version higher than the application requirements | | -| INSTALL\_FAILED\_TEST\_ONLY | test-only applications, but when you install `-t` parameter is not specified | | -| INSTALL\_FAILED\_CPU\_ABI\_INCOMPATIBLE | contains incompatible device CPU Application Binary Interface for native code | | -| INSTALL\_FAILED\_MISSING\_FEATURE | application uses device features that are unavailable | | -| INSTALL\_FAILED\_CONTAINER\_ERROR | sdcard access failure | confirm sdcard is available, or to install built-in storage | -| INSTALL\_FAILED\_INVALID\_INSTALL\_LOCATION | can not be installed to the specified location | switch mounting position, add or delete `-s` parameters | -| INSTALL\_FAILED\_MEDIA\_UNAVAILABLE | installation location is unavailable | generally sdcard, confirm sdcard is available or to install built-in storage | -| INSTALL\_FAILED\_VERIFICATION\_TIMEOUT | Installation Timeout verify | | -| INSTALL\_FAILED\_VERIFICATION\_FAILURE | verify the installation package fails | | -| INSTALL\_FAILED\_PACKAGE\_CHANGED | calling application program expects inconsistent | | -| INSTALL\_FAILED\_UID\_CHANGED | previously installed the app, and this assignment UID inconsistent | remove residual files previously installed | -| INSTALL\_FAILED\_VERSION\_DOWNGRADE | already installed the application later | use `-d` parameters | -| INSTALL\_FAILED\_PERMISSION\_MODEL\_DOWNGRADE | installed target SDK runtime support for application permissions of the same name, to install the runtime version does not support permission | | -| INSTALL\_PARSE\_FAILED\_NOT\_APK | specified path is not a file or not to `.apk` end | | -| INSTALL\_PARSE\_FAILED\_BAD\_MANIFEST | unresolved AndroidManifest.xml file | | -| INSTALL\_PARSE\_FAILED\_UNEXPECTED\_EXCEPTION | parser encounters an exception | | -| INSTALL\_PARSE\_FAILED\_NO\_CERTIFICATES | installation package is not signed | | -| INSTALL\_PARSE\_FAILED\_INCONSISTENT\_CERTIFICATES | already installed the app, and signed with the APK files are inconsistent | first uninstall the application on the device, then install | -| INSTALL\_PARSE\_FAILED\_CERTIFICATE\_ENCODING | encountered while parsing APK file `CertificateEncodingException` | | -| INSTALL\_PARSE\_FAILED\_BAD\_PACKAGE\_NAME | manifest file no or an invalid package name | | -| INSTALL\_PARSE\_FAILED\_BAD\_SHARED\_USER\_ID | manifest file specifies an invalid shared user ID | | -| INSTALL\_PARSE\_FAILED\_MANIFEST\_MALFORMED | encountered while parsing file manifest error structural | | -| INSTALL\_PARSE\_FAILED\_MANIFEST\_EMPTY | in the manifest file can not be found to find operable label (instrumentation or application) | | -| INSTALL\_FAILED\_INTERNAL\_ERROR | installation fails because of system problems | | -| INSTALL\_FAILED\_USER\_RESTRICTED | Users are limited to installing applications | | -| INSTALL\_FAILED\_DUPLICATE\_PERMISSION | application attempts to define an existing permission name | | -| INSTALL\_FAILED\_NO\_MATCHING\_ABIS | applications include device application binary interface does not support the native code | | -| INSTALL\_CANCELED\_BY\_USER | applications installed on the device needs confirmation, but not operate the device or the point of cancellation | agree to install on the device | -| INSTALL\_FAILED\_ACWF\_INCOMPATIBLE | applications are not compatible with the device | | -| Does not contain AndroidManifest.xml | invalid APK file | | -| Is not a valid zip file | invalid APK file | | -| Offline | device is not connected successfully | first device with adb successful connection | -| Unauthorized | unauthorized device allows debugging | | -| Error: device not found | not successfully connected equipment | equipment and adb first successful connection | -| Protocol failure | device is disconnected | first device with adb successful connection | -| Unknown option: -s | Android 2.2 does not support the following installation to sdcard | do not use `-s` parameters | -| No space left on devicerm | lack of space | cleanup space | -| Permission denied ... sdcard ... | sdcard unavailable | | +| Output | Meaning | solutions | +|---------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------| +| INSTALL\_FAILED\_ALREADY\_EXISTS | application already exists | use `-r` parameters | +| INSTALL\_FAILED\_INVALID\_APK | invalid APK file | | +| INSTALL\_FAILED\_INVALID\_URI | invalid filename APK | APK file names to ensure no Chinese | +| INSTALL\_FAILED\_INSUFFICIENT\_STORAGE | lack of space | cleanup space | +| INSTALL\_FAILED\_DUPLICATE\_PACKAGE | program of the same name already exists | | +| INSTALL\_FAILED\_NO\_SHARED\_USER | shared user requested does not exist | | +| INSTALL\_FAILED\_UPDATE\_INCOMPATIBLE | already installed the app, but signature is not the same; or uninstalled, but data is not removed. | | +| INSTALL\_FAILED\_SHARED\_USER\_INCOMPATIBLE | shared user request exists but the signatures do not match | | +| INSTALL\_FAILED\_MISSING\_SHARED\_LIBRARY | installation package used on the device unusable shared library | | +| INSTALL\_FAILED\_REPLACE\_COULDNT\_DELETE | can not be deleted when replacing | | +| INSTALL\_FAILED\_DEXOPT | dex optimization validation failure or lack of space | | +| INSTALL\_FAILED\_OLDER\_SDK | equipment system version is lower than the application requirements | | +| INSTALL\_FAILED\_CONFLICTING\_PROVIDER | equipment already exists with the same name in application content provider | | +| INSTALL\_FAILED\_NEWER\_SDK | equipment system version higher than the application requirements | | +| INSTALL\_FAILED\_TEST\_ONLY | test-only applications, but when you install `-t` parameter is not specified | | +| INSTALL\_FAILED\_CPU\_ABI\_INCOMPATIBLE | contains incompatible device CPU Application Binary Interface for native code | | +| INSTALL\_FAILED\_MISSING\_FEATURE | application uses device features that are unavailable | | +| INSTALL\_FAILED\_CONTAINER\_ERROR | sdcard access failure | confirm sdcard is available, or to install built-in storage | +| INSTALL\_FAILED\_INVALID\_INSTALL\_LOCATION | can not be installed to the specified location | switch mounting position, add or delete `-s` parameters | +| INSTALL\_FAILED\_MEDIA\_UNAVAILABLE | installation location is unavailable | generally sdcard, confirm sdcard is available or to install built-in storage | +| INSTALL\_FAILED\_VERIFICATION\_TIMEOUT | Installation Timeout verify | | +| INSTALL\_FAILED\_VERIFICATION\_FAILURE | verify the installation package fails | | +| INSTALL\_FAILED\_PACKAGE\_CHANGED | calling application program expects inconsistent | | +| INSTALL\_FAILED\_UID\_CHANGED | previously installed the app, and this assignment UID inconsistent | remove residual files previously installed | +| INSTALL\_FAILED\_VERSION\_DOWNGRADE | already installed the application later | use `-d` parameters | +| INSTALL\_FAILED\_PERMISSION\_MODEL\_DOWNGRADE | installed target SDK runtime support for application permissions of the same name, to install the runtime version does not support permission | | +| INSTALL\_PARSE\_FAILED\_NOT\_APK | specified path is not a file or not to `.apk` end | | +| INSTALL\_PARSE\_FAILED\_BAD\_MANIFEST | unresolved AndroidManifest.xml file | | +| INSTALL\_PARSE\_FAILED\_UNEXPECTED\_EXCEPTION | parser encounters an exception | | +| INSTALL\_PARSE\_FAILED\_NO\_CERTIFICATES | installation package is not signed | | +| INSTALL\_PARSE\_FAILED\_INCONSISTENT\_CERTIFICATES | already installed the app, and signed with the APK files are inconsistent | first uninstall the application on the device, then install | +| INSTALL\_PARSE\_FAILED\_CERTIFICATE\_ENCODING | encountered while parsing APK file `CertificateEncodingException` | | +| INSTALL\_PARSE\_FAILED\_BAD\_PACKAGE\_NAME | manifest file no or an invalid package name | | +| INSTALL\_PARSE\_FAILED\_BAD\_SHARED\_USER\_ID | manifest file specifies an invalid shared user ID | | +| INSTALL\_PARSE\_FAILED\_MANIFEST\_MALFORMED | encountered while parsing file manifest error structural | | +| INSTALL\_PARSE\_FAILED\_MANIFEST\_EMPTY | in the manifest file can not be found to find operable label (instrumentation or application) | | +| INSTALL\_FAILED\_INTERNAL\_ERROR | installation fails because of system problems | | +| INSTALL\_FAILED\_USER\_RESTRICTED | Users are limited to installing applications | | +| INSTALL\_FAILED\_DUPLICATE\_PERMISSION | application attempts to define an existing permission name | | +| INSTALL\_FAILED\_NO\_MATCHING\_ABIS | applications include device application binary interface does not support the native code | | +| INSTALL\_CANCELED\_BY\_USER | applications installed on the device needs confirmation, but not operate the device or the point of cancellation | agree to install on the device | +| INSTALL\_FAILED\_ACWF\_INCOMPATIBLE | applications are not compatible with the device | | +| Does not contain AndroidManifest.xml | invalid APK file | | +| Is not a valid zip file | invalid APK file | | +| Offline | device is not connected successfully | first device with adb successful connection | +| Unauthorized | unauthorized device allows debugging | | +| Error: device not found | not successfully connected equipment | equipment and adb first successful connection | +| Protocol failure | device is disconnected | first device with adb successful connection | +| Unknown option: -s | Android 2.2 does not support the following installation to sdcard | do not use `-s` parameters | +| No space left on device | lack of space | cleanup space | +| Permission denied ... sdcard ... | sdcard unavailable | | +| signatures do not match the previously installed version; ignoring! | already installed this app, but signatures do not match | uninstall previous installed, then install this one | Reference: [PackageManager.java](https://github.com/android/platform_frameworks_base/blob/master/core%2Fjava%2Fandroid%2Fcontent%2Fpm%2FPackageManager.java) diff --git a/README.md b/README.md index b0451b7..466434c 100644 --- a/README.md +++ b/README.md @@ -533,59 +533,60 @@ Failure [INSTALL_FAILED_ALREADY_EXISTS] 常见安装失败输出代码、含义及可能的解决办法如下: -| 输出 | 含义 | 解决办法 | -|----------------------------------------------------|--------------------------------------------------------------------------|-----------------------------------------------------------------------------| -| INSTALL\_FAILED\_ALREADY\_EXISTS | 应用已经存在,或卸载了但没卸载干净 | `adb install` 时使用 `-r` 参数,或者先 `adb uninstall ` 再安装 | -| INSTALL\_FAILED\_INVALID\_APK | 无效的 APK 文件 | | -| INSTALL\_FAILED\_INVALID\_URI | 无效的 APK 文件名 | 确保 APK 文件名里无中文 | -| INSTALL\_FAILED\_INSUFFICIENT\_STORAGE | 空间不足 | 清理空间 | -| INSTALL\_FAILED\_DUPLICATE\_PACKAGE | 已经存在同名程序 | | -| INSTALL\_FAILED\_NO\_SHARED\_USER | 请求的共享用户不存在 | | -| INSTALL\_FAILED\_UPDATE\_INCOMPATIBLE | 以前安装过同名应用,但卸载时数据没有移除 | 先 `adb uninstall ` 再安装 | -| INSTALL\_FAILED\_SHARED\_USER\_INCOMPATIBLE | 请求的共享用户存在但签名不一致 | | -| INSTALL\_FAILED\_MISSING\_SHARED\_LIBRARY | 安装包使用了设备上不可用的共享库 | | -| INSTALL\_FAILED\_REPLACE\_COULDNT\_DELETE | 替换时无法删除 | | -| INSTALL\_FAILED\_DEXOPT | dex 优化验证失败或空间不足 | | -| INSTALL\_FAILED\_OLDER\_SDK | 设备系统版本低于应用要求 | | -| INSTALL\_FAILED\_CONFLICTING\_PROVIDER | 设备里已经存在与应用里同名的 content provider | | -| INSTALL\_FAILED\_NEWER\_SDK | 设备系统版本高于应用要求 | | -| INSTALL\_FAILED\_TEST\_ONLY | 应用是 test-only 的,但安装时没有指定 `-t` 参数 | | -| INSTALL\_FAILED\_CPU\_ABI\_INCOMPATIBLE | 包含不兼容设备 CPU 应用程序二进制接口的 native code | | -| INSTALL\_FAILED\_MISSING\_FEATURE | 应用使用了设备不可用的功能 | | -| INSTALL\_FAILED\_CONTAINER\_ERROR | 1. sdcard 访问失败; 2. 应用签名与 ROM 签名一致,被当作内置应用 | 1. 确认 sdcard 可用,或者安装到内置存储; 2. 打包时不与 ROM 使用相同签名 | -| INSTALL\_FAILED\_INVALID\_INSTALL\_LOCATION | 1. 不能安装到指定位置; 2. 应用签名与 ROM 签名一致,被当作内置应用 | 1. 切换安装位置,添加或删除 `-s` 参数; 2. 打包时不与 ROM 使用相同签名 | -| INSTALL\_FAILED\_MEDIA\_UNAVAILABLE | 安装位置不可用 | 一般为 sdcard,确认 sdcard 可用或安装到内置存储 | -| INSTALL\_FAILED\_VERIFICATION\_TIMEOUT | 验证安装包超时 | | -| INSTALL\_FAILED\_VERIFICATION\_FAILURE | 验证安装包失败 | | -| INSTALL\_FAILED\_PACKAGE\_CHANGED | 应用与调用程序期望的不一致 | | -| INSTALL\_FAILED\_UID\_CHANGED | 以前安装过该应用,与本次分配的 UID 不一致 | 清除以前安装过的残留文件 | -| INSTALL\_FAILED\_VERSION\_DOWNGRADE | 已经安装了该应用更高版本 | 使用 `-d` 参数 | -| INSTALL\_FAILED\_PERMISSION\_MODEL\_DOWNGRADE | 已安装 target SDK 支持运行时权限的同名应用,要安装的版本不支持运行时权限 | | -| INSTALL\_PARSE\_FAILED\_NOT\_APK | 指定路径不是文件,或不是以 `.apk` 结尾 | | -| INSTALL\_PARSE\_FAILED\_BAD\_MANIFEST | 无法解析的 AndroidManifest.xml 文件 | | -| INSTALL\_PARSE\_FAILED\_UNEXPECTED\_EXCEPTION | 解析器遇到异常 | | -| INSTALL\_PARSE\_FAILED\_NO\_CERTIFICATES | 安装包没有签名 | | -| INSTALL\_PARSE\_FAILED\_INCONSISTENT\_CERTIFICATES | 已安装该应用,且签名与 APK 文件不一致 | 先卸载设备上的该应用,再安装 | -| INSTALL\_PARSE\_FAILED\_CERTIFICATE\_ENCODING | 解析 APK 文件时遇到 `CertificateEncodingException` | | -| INSTALL\_PARSE\_FAILED\_BAD\_PACKAGE\_NAME | manifest 文件里没有或者使用了无效的包名 | | -| INSTALL\_PARSE\_FAILED\_BAD\_SHARED\_USER\_ID | manifest 文件里指定了无效的共享用户 ID | | -| INSTALL\_PARSE\_FAILED\_MANIFEST\_MALFORMED | 解析 manifest 文件时遇到结构性错误 | | -| INSTALL\_PARSE\_FAILED\_MANIFEST\_EMPTY | 在 manifest 文件里找不到找可操作标签(instrumentation 或 application) | | -| INSTALL\_FAILED\_INTERNAL\_ERROR | 因系统问题安装失败 | | -| INSTALL\_FAILED\_USER\_RESTRICTED | 用户被限制安装应用 | | -| INSTALL\_FAILED\_DUPLICATE\_PERMISSION | 应用尝试定义一个已经存在的权限名称 | | -| INSTALL\_FAILED\_NO\_MATCHING\_ABIS | 应用包含设备的应用程序二进制接口不支持的 native code | | -| INSTALL\_CANCELED\_BY\_USER | 应用安装需要在设备上确认,但未操作设备或点了取消 | 在设备上同意安装 | -| INSTALL\_FAILED\_ACWF\_INCOMPATIBLE | 应用程序与设备不兼容 | | -| does not contain AndroidManifest.xml | 无效的 APK 文件 | | -| is not a valid zip file | 无效的 APK 文件 | | -| Offline | 设备未连接成功 | 先将设备与 adb 连接成功 | -| unauthorized | 设备未授权允许调试 | | -| error: device not found | 没有连接成功的设备 | 先将设备与 adb 连接成功 | -| protocol failure | 设备已断开连接 | 先将设备与 adb 连接成功 | -| Unknown option: -s | Android 2.2 以下不支持安装到 sdcard | 不使用 `-s` 参数 | -| No space left on devicerm | 空间不足 | 清理空间 | -| Permission denied ... sdcard ... | sdcard 不可用 | | +| 输出 | 含义 | 解决办法 | +|---------------------------------------------------------------------|--------------------------------------------------------------------------|-----------------------------------------------------------------------------| +| INSTALL\_FAILED\_ALREADY\_EXISTS | 应用已经存在,或卸载了但没卸载干净 | `adb install` 时使用 `-r` 参数,或者先 `adb uninstall ` 再安装 | +| INSTALL\_FAILED\_INVALID\_APK | 无效的 APK 文件 | | +| INSTALL\_FAILED\_INVALID\_URI | 无效的 APK 文件名 | 确保 APK 文件名里无中文 | +| INSTALL\_FAILED\_INSUFFICIENT\_STORAGE | 空间不足 | 清理空间 | +| INSTALL\_FAILED\_DUPLICATE\_PACKAGE | 已经存在同名程序 | | +| INSTALL\_FAILED\_NO\_SHARED\_USER | 请求的共享用户不存在 | | +| INSTALL\_FAILED\_UPDATE\_INCOMPATIBLE | 以前安装过同名应用,但卸载时数据没有移除;或者已安装该应用,但签名不一致 | 先 `adb uninstall ` 再安装 | +| INSTALL\_FAILED\_SHARED\_USER\_INCOMPATIBLE | 请求的共享用户存在但签名不一致 | | +| INSTALL\_FAILED\_MISSING\_SHARED\_LIBRARY | 安装包使用了设备上不可用的共享库 | | +| INSTALL\_FAILED\_REPLACE\_COULDNT\_DELETE | 替换时无法删除 | | +| INSTALL\_FAILED\_DEXOPT | dex 优化验证失败或空间不足 | | +| INSTALL\_FAILED\_OLDER\_SDK | 设备系统版本低于应用要求 | | +| INSTALL\_FAILED\_CONFLICTING\_PROVIDER | 设备里已经存在与应用里同名的 content provider | | +| INSTALL\_FAILED\_NEWER\_SDK | 设备系统版本高于应用要求 | | +| INSTALL\_FAILED\_TEST\_ONLY | 应用是 test-only 的,但安装时没有指定 `-t` 参数 | | +| INSTALL\_FAILED\_CPU\_ABI\_INCOMPATIBLE | 包含不兼容设备 CPU 应用程序二进制接口的 native code | | +| INSTALL\_FAILED\_MISSING\_FEATURE | 应用使用了设备不可用的功能 | | +| INSTALL\_FAILED\_CONTAINER\_ERROR | 1. sdcard 访问失败; 2. 应用签名与 ROM 签名一致,被当作内置应用 | 1. 确认 sdcard 可用,或者安装到内置存储; 2. 打包时不与 ROM 使用相同签名 | +| INSTALL\_FAILED\_INVALID\_INSTALL\_LOCATION | 1. 不能安装到指定位置; 2. 应用签名与 ROM 签名一致,被当作内置应用 | 1. 切换安装位置,添加或删除 `-s` 参数; 2. 打包时不与 ROM 使用相同签名 | +| INSTALL\_FAILED\_MEDIA\_UNAVAILABLE | 安装位置不可用 | 一般为 sdcard,确认 sdcard 可用或安装到内置存储 | +| INSTALL\_FAILED\_VERIFICATION\_TIMEOUT | 验证安装包超时 | | +| INSTALL\_FAILED\_VERIFICATION\_FAILURE | 验证安装包失败 | | +| INSTALL\_FAILED\_PACKAGE\_CHANGED | 应用与调用程序期望的不一致 | | +| INSTALL\_FAILED\_UID\_CHANGED | 以前安装过该应用,与本次分配的 UID 不一致 | 清除以前安装过的残留文件 | +| INSTALL\_FAILED\_VERSION\_DOWNGRADE | 已经安装了该应用更高版本 | 使用 `-d` 参数 | +| INSTALL\_FAILED\_PERMISSION\_MODEL\_DOWNGRADE | 已安装 target SDK 支持运行时权限的同名应用,要安装的版本不支持运行时权限 | | +| INSTALL\_PARSE\_FAILED\_NOT\_APK | 指定路径不是文件,或不是以 `.apk` 结尾 | | +| INSTALL\_PARSE\_FAILED\_BAD\_MANIFEST | 无法解析的 AndroidManifest.xml 文件 | | +| INSTALL\_PARSE\_FAILED\_UNEXPECTED\_EXCEPTION | 解析器遇到异常 | | +| INSTALL\_PARSE\_FAILED\_NO\_CERTIFICATES | 安装包没有签名 | | +| INSTALL\_PARSE\_FAILED\_INCONSISTENT\_CERTIFICATES | 已安装该应用,且签名与 APK 文件不一致 | 先卸载设备上的该应用,再安装 | +| INSTALL\_PARSE\_FAILED\_CERTIFICATE\_ENCODING | 解析 APK 文件时遇到 `CertificateEncodingException` | | +| INSTALL\_PARSE\_FAILED\_BAD\_PACKAGE\_NAME | manifest 文件里没有或者使用了无效的包名 | | +| INSTALL\_PARSE\_FAILED\_BAD\_SHARED\_USER\_ID | manifest 文件里指定了无效的共享用户 ID | | +| INSTALL\_PARSE\_FAILED\_MANIFEST\_MALFORMED | 解析 manifest 文件时遇到结构性错误 | | +| INSTALL\_PARSE\_FAILED\_MANIFEST\_EMPTY | 在 manifest 文件里找不到找可操作标签(instrumentation 或 application) | | +| INSTALL\_FAILED\_INTERNAL\_ERROR | 因系统问题安装失败 | | +| INSTALL\_FAILED\_USER\_RESTRICTED | 用户被限制安装应用 | | +| INSTALL\_FAILED\_DUPLICATE\_PERMISSION | 应用尝试定义一个已经存在的权限名称 | | +| INSTALL\_FAILED\_NO\_MATCHING\_ABIS | 应用包含设备的应用程序二进制接口不支持的 native code | | +| INSTALL\_CANCELED\_BY\_USER | 应用安装需要在设备上确认,但未操作设备或点了取消 | 在设备上同意安装 | +| INSTALL\_FAILED\_ACWF\_INCOMPATIBLE | 应用程序与设备不兼容 | | +| does not contain AndroidManifest.xml | 无效的 APK 文件 | | +| is not a valid zip file | 无效的 APK 文件 | | +| Offline | 设备未连接成功 | 先将设备与 adb 连接成功 | +| unauthorized | 设备未授权允许调试 | | +| error: device not found | 没有连接成功的设备 | 先将设备与 adb 连接成功 | +| protocol failure | 设备已断开连接 | 先将设备与 adb 连接成功 | +| Unknown option: -s | Android 2.2 以下不支持安装到 sdcard | 不使用 `-s` 参数 | +| No space left on device | 空间不足 | 清理空间 | +| Permission denied ... sdcard ... | sdcard 不可用 | | +| signatures do not match the previously installed version; ignoring! | 已安装该应用且签名不一致 | 先卸载设备上的该应用,再安装 | 参考:[PackageManager.java](https://github.com/android/platform_frameworks_base/blob/master/core%2Fjava%2Fandroid%2Fcontent%2Fpm%2FPackageManager.java)