67 lines
1.8 KiB
Bash
67 lines
1.8 KiB
Bash
|
|
|||
|
##<23>滻<EFBFBD><E6BBBB>Դ(Ŀǰֻ<C7B0><D6BB>֤jpgͼƬ<CDBC><C6AC><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>滻)
|
|||
|
function do_chiphd_res_overlay_replace()
|
|||
|
{
|
|||
|
local thisAAPT=
|
|||
|
local thisTop=`gettop`
|
|||
|
if [ "$thisTop" -a -d "$thisTop" ]; then
|
|||
|
thisAAPT=$thisTop/out/host/linux-x86/bin/aapt
|
|||
|
else
|
|||
|
thisAAPT=$thisTop/device/softwinner/zzzzz-chiphd/apktool/aapt
|
|||
|
fi
|
|||
|
|
|||
|
if [ -f $thisAAPT ]; then
|
|||
|
: #echo "use aapt : $thisAAPT"
|
|||
|
else
|
|||
|
return 1
|
|||
|
fi
|
|||
|
|
|||
|
##Ϊ<>ָ<EFBFBD>Ŀ¼״̬<D7B4><CCAC><EFBFBD><EFBFBD>
|
|||
|
local OldPath0=$(echo $OLDPWD)
|
|||
|
local OldPath1=$(echo $PWD)
|
|||
|
##<23><><EFBFBD><EFBFBD><EFBFBD>滻apk<70>Ķ<EFBFBD><C4B6><EFBFBD>Ŀ¼
|
|||
|
local MyTargeTopPath=`echo $OUT/obj/APPS`
|
|||
|
##<23>滻apk<70><6B>Դ<EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD>Ŀ¼
|
|||
|
local MyResOverlayTopPath=`echo $DEVICE/res-chiphd-overlay`
|
|||
|
if [ "$MyTargeTopPath" -a -d $MyTargeTopPath -a "$MyResOverlayTopPath" -a -d $MyResOverlayTopPath ]; then
|
|||
|
local SubF=`ls -A $MyResOverlayTopPath`
|
|||
|
if [ "$SubF" ]; then
|
|||
|
##<23><><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF>APKҪ<4B>滻<EFBFBD><E6BBBB><EFBFBD><EFBFBD>Դ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
|||
|
for f in $SubF
|
|||
|
do
|
|||
|
#echo "overlay replace $f"
|
|||
|
if [ -d $MyResOverlayTopPath/$f ]; then
|
|||
|
##<23><>ȡĿ<C8A1><C4BF>apk·<6B><C2B7>
|
|||
|
MyTargePath=`find $MyTargeTopPath -name "${f}*intermediates" -type d`
|
|||
|
if [ "$MyTargePath" -a -d "$MyTargePath" ]; then
|
|||
|
##<23><>ȡĿ<C8A1><C4BF>apk
|
|||
|
MyTarge=`find $MyTargePath -name "*.apk"`
|
|||
|
if [ "$MyTarge" -a -f "$MyTarge" ]; then
|
|||
|
##ʵ<><CAB5><EFBFBD>滻
|
|||
|
cd $MyResOverlayTopPath/$f
|
|||
|
MyNewFiles=`find res -name "*.*" -type f`
|
|||
|
if [ "$MyNewFiles" ]; then
|
|||
|
$thisAAPT remove -v $MyTarge $MyNewFiles
|
|||
|
$thisAAPT add -v $MyTarge $MyNewFiles
|
|||
|
#echo "$thisAAPT remove -v $MyTarge $MyNewFiles"
|
|||
|
#echo "$thisAAPT add -v $MyTarge $MyNewFiles"
|
|||
|
fi
|
|||
|
else
|
|||
|
echo "no result about $f"
|
|||
|
fi
|
|||
|
fi
|
|||
|
fi
|
|||
|
done
|
|||
|
fi
|
|||
|
fi
|
|||
|
|
|||
|
##<23><>Ŀ¼
|
|||
|
if [ "$OldPath0" -a -d "$OldPath0" ]; then
|
|||
|
cd $OldPath0
|
|||
|
fi
|
|||
|
if [ "$OldPath1" -a -d "$OldPath1" ]; then
|
|||
|
cd $OldPath1
|
|||
|
fi
|
|||
|
}
|
|||
|
|