android - 从 Android 源代码创建 flashable zip

标签 android android-source android-6.0-marshmallow android-build

我使用官方指南成功编译了最新的 Android 源代码,但我不想使用 fastboot flashall 将操作系统刷新到设备上。我无法通过 USB 访问用于编译的服务器。我想要我构建的代码的二进制输出。

知道如何从 Android 源代码创建可刷新的邮政编码吗?

最佳答案

如果您要创建完整的更新 zip 包(系统、启动和恢复分区),则可以用于假设的 tardis 设备:

# first, build the target-files .zip
% . build/envsetup.sh && lunch tardis-eng
% mkdir dist_output
% make dist DIST_DIR=dist_output
  [...]
% ls -l dist_output/*target_files*
-rw-r----- 1 user eng  69965275 Sep 29 15:51 tardis-target_files.zip

目标文件 .zip 包含构建 OTA 包所需的所有内容。现在您可以使用以下方法构建它:

% ./build/tools/releasetools/ota_from_target_files \
    dist_output/tardis-target_files.zip ota_update.zip
unzipping target target-files...
done.
% ls -l ota_update.zip
-rw-r----- 1 user eng 62236561 Sep 29 15:58 ota_update.zip

ota_update.zip 现在已准备好发送到测试设备(所有内容均使用测试 key 进行签名)。对于用户设备,生成并使用您自己的私钥

更多信息https://source.android.com/devices/tech/ota/tools

关于android - 从 Android 源代码创建 flashable zip,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36949605/

相关文章:

android - 请求的 Android 权限未显示在应用权限设置中

android - 失败的Sepolicy检查-Android 10建筑-Pixel 3a XL

Android 在运行时抛出异常时询问权限

android - 如何在android(棉花糖及23岁以上)中更改状态栏通知图标的颜色/色调?

android - 背景大小 : auto not working as expected on android 6

java - 重新安装 Eclipse ADT 保持工作区的状态

android - 选项卡更改时如何避免重新加载数据?

android - 在哪里可以找到createsample.exe实用程序?

Android 4 ICS 构建源代码 - 最低系统要求

c++ - AOSP : arm-linux-androideabi-gcc: command not found even though it is present in prebuilts folder