Skip to content

Instantly share code, notes, and snippets.

@CFM880
Last active April 27, 2019 04:48
Show Gist options
  • Save CFM880/2bcde3914876833951e839617a83a010 to your computer and use it in GitHub Desktop.
Save CFM880/2bcde3914876833951e839617a83a010 to your computer and use it in GitHub Desktop.
android系统打包,替换编译时间脚本
#!/bin/bash
function replaceDate() {
formfat_date="`LC_ALL='C' TZ='Asia/Shanghai' date -u`"
date_long="`date +%s`"
echo ${formfat_date}
echo ${date_long}
sed -i "s/ro.build.date=.*/ro.build.date=$formfat_date/g" build.prop
sed -i "s/ro.build.date.utc=.*/ro.build.date.utc=$date_long/g" build.prop
}
replaceDate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment