Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: ics
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 41 lines (35 sloc) 1.095 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
#!/bin/bash
#
# $1: dir for miui
# $2: dir for original
#

APKTOOL=$PORT_ROOT/tools/apktool
 
if [ $2 = "out/framework" ];then
echo "delete framework redundance files"
rm -rf "out/framework/smali/com/"

echo "make framework-ext.jar"
mkdir -p "out/ZIP/system/framework"
cp -r "framework-ext.jar.out" "out/framework-ext.jar.out"
mv "out/framework/smali/miui" "out/framework-ext.jar.out/smali"

for file in `find "$1/smali/com/" -name "*.smali"`
do
newfile=${file/$1/"out/framework-ext.jar.out"}
         if [ ! -f "$newfile" ]
         then
mkdir -p `dirname $newfile`
         echo "add widget smali from miui: $file"
         cp $file $newfile
        fi
done
$APKTOOL b "out/framework-ext.jar.out" "out/framework-ext.jar"
cp "out/framework-ext.jar" "out/ZIP/system/framework/framework-ext.jar"

elif [ $2 = "out/android.policy" ];then
curdir=`pwd`
    cd overlay/android.policy.jar.out
    for file in `find . -name *.smali`
    do
dstfile="$curdir/out/android.policy/$file"
        cat $file >> $dstfile
    done
cd -
fi
Something went wrong with that request. Please try again.