Android 13 QSSI和TARGET编译时间不一致导致recovery升级失败

环境

$ cat /etc/os-release

NAME="Ubuntu"

VERSION="20.04.4 LTS (Focal Fossa)"

ID=ubuntu

ID_LIKE=debian

PRETTY_NAME="Ubuntu 20.04.4 LTS"

VERSION_ID="20.04"

HOME_URL="https://www.ubuntu.com/"

SUPPORT_URL="https://help.ubuntu.com/"

BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"

PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"

VERSION_CODENAME=focal

UBUNTU_CODENAME=focal

调查过程

$ mgrep buildDateTime

./build/soong/ui/metrics/metrics_proto/metrics.pb.go:285: BuildDateTimestamp *int64 `protobuf:"varint,1,opt,name=build_date_timestamp,json=buildDateTimestamp" json:"build_date_timestamp,omitempty"`

./build/soong/ui/build/config.go:54: buildDateTime string

./build/soong/ui/build/config.go:417: buildDateTimeFile := filepath.Join(outDir, "build_date.txt")

./build/soong/ui/build/config.go:418: if buildDateTime, ok := ret.environ.Get("BUILD_DATETIME"); ok && buildDateTime != "" {

./build/soong/ui/build/config.go:419: ret.buildDateTime = buildDateTime

./build/soong/ui/build/config.go:421: ret.buildDateTime = strconv.FormatInt(time.Now().Unix(), 10)

./build/soong/ui/build/config.go:424: ret.environ.Set("BUILD_DATETIME_FILE", buildDateTimeFile)

./build/soong/ui/build/config.go:1388: return c.buildDateTime

./build/soong/ui/build/build.go:51: if buildDateTimeFile, ok := config.environ.Get("BUILD_DATETIME_FILE"); ok {

./build/soong/ui/build/build.go:52: err := ioutil.WriteFile(buildDateTimeFile, []byte(config.buildDateTime), 0666) // a+rw

./build/soong/ui/build/upload_test.go:138: buildDateTime: strconv.FormatInt(time.Now().UnixNano()/int64(time.Millisecond), 10),

结论

编译target的时候

export BUILD_DATETIME=`cat QSSI.13/out/build_date.txt`

<完>

相关推荐
- 羊羊不超越 -9 分钟前
App渠道来源追踪方案全面分析(iOS/Android/鸿蒙)
android·ios·harmonyos
wk灬丨1 小时前
Android Kotlin Flow 冷流 热流
android·kotlin·flow
千雅爸爸1 小时前
Android MVVM demo(使用DataBinding,LiveData,Fresco,RecyclerView,Room,ViewModel 完成)
android
时差9531 小时前
【面试题】Hive 查询:如何查找用户连续三天登录的记录
大数据·数据库·hive·sql·面试·database
让学习成为一种生活方式1 小时前
R包下载太慢安装中止的解决策略-R语言003
java·数据库·r语言
晨曦_子画1 小时前
编程语言之战:AI 之后的 Kotlin 与 Java
android·java·开发语言·人工智能·kotlin
秋意钟2 小时前
MySQL日期类型选择建议
数据库·mysql
孤客网络科技工作室2 小时前
AJAX 全面教程:从基础到高级
android·ajax·okhttp
Dxy12393102163 小时前
python下载pdf
数据库·python·pdf
Mr Lee_3 小时前
android 配置鼠标右键快捷对apk进行反编译
android