Android修改FOTA的各个系统属性值

 /vendor/mediatek/proprietary/packages/apps/AdupsFotaApp/FotaInfo.sh

#!/bin/bash

#********Do not modify this file. If you want modify this file, pls contact our FAE*******
echo ""
echo "# begin fota properties"
echo "ro.fota.platform=$FOTA_INFO_PLATFORM"

#type info: phone, pad ,box, tv
echo "ro.fota.type=phone"
echo "ro.fota.app=5"
echo "ro.fota.gms=2"
echo "ro.fota.battery=30"
echo "ro.boot.vendor.overlay.theme=com.adups.fota.overlay"

#oem info
echo "ro.fota.oem=$FOTA_INFO_OEM"
#model info, Settings->About phone->Model number
if [ -n "`grep "ro.product.model=" $1`" ] ; then
FotaDevice=$(grep "ro.product.model=" "$1"|awk -F "=" '{print $NF}' )
elif [ -n "`grep "ro.product.system.model=" $1`" ] ; then
FotaDevice=$(grep "ro.product.system.model=" "$1"|awk -F "=" '{print $NF}' )
elif [ -n "`grep "ro.product.system.device=" $1`" ] ; then
FotaDevice=$(grep "ro.product.system.device=" "$1"|awk -F "=" '{print $NF}' )
else
echo "ERROR: model do not exist in system/build.prop,Please define it"
exit 0
fi
echo "ro.fota.device=$FotaDevice" | sed  's/[^0-9a-zA-Z= ._-]//g'

#version number, Settings->About phone->Build number
#FotaVersion=$(grep "ro.build.display.id=" "$1"|awk -F "=" '{print $NF}' )
FotaVersion=$(grep "ro.build.display.id=" "$1"|awk -F "=" '{print $NF}' )`date +_%Y%m%d-%H%M`
echo "ro.fota.version=$FotaVersion" | sed  's/[^0-9a-zA-Z= ._-]//g'
echo "# end fota properties"

#********Do not modify this file. If you want modify this file, pls contact our FAE*******

 尽量不要在system.porp里面添加!

因为这样

adb shell

getprop |grep fota

可能查看不到!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值