Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- working=/home/bigrushdog/Desktop/system_dump
- #classpath=$working"/framework"
- classpath=":com.android.location.provider.jar:javax.obex.jar:core.jar:apache-xml.jar:bouncycastle.jar"
- apps=$working"/app"
- app_done=$working"/app_done"
- outdir=temp1
- cd $apps
- for odexFile in `ls -m1 *.odex`
- do
- echo `baksmali -c $classpath -o $outdir -x $odexFile`
- if [ -d $outdir ]
- then
- echo "$odexFile has been baksmalied"
- cd $outdir
- find ./ -type f -exec sed -i 's/return-void-barrier/return-void/g' {} \;
- echo "$odexFile has been patched"
- cd $apps
- echo `smali -o classes.dex $outdir`
- if [ -e classes.dex ]
- then
- echo "$odexFile has been deodexed"
- apkname=`basename $odexFile .odex`.apk
- zip -r -q $apkname classes.dex
- cp $apkname $app_done
- rm -rf $outdir
- rm -f $odexFile
- rm -f classes.dex
- fi
- fi
- done
- echo "System Apps done!"
- ****************************************************************************************
- #!/bin/sh
- working=/home/bigrushdog/Desktop/system_dump
- #classpath=$working"/framework"
- classpath=":com.android.location.provider.jar:javax.obex.jar:core.jar:apache-xml.jar:bouncycastle.jar"
- apps=$working"/app"
- fw_done=$working"/fw_done"
- app_done=$working"/app_done"
- fw_working=$working"/fw_working"
- outdir=temp1
- cd $fw_working
- for odexFile in `ls -m1 *.odex`
- do
- echo `baksmali -c $classpath -o $outdir -x $odexFile`
- echo "$odexFile has been baksmalied"
- cd $outdir
- find ./ -type f -exec sed -i 's/return-void-barrier/return-void/g' {} \;
- echo "$odexFile has been patched"
- cd $fw_working
- echo `smali -o classes.dex $outdir`
- if [ -e classes.dex ]
- then
- echo "$odexFile has been deodexed"
- jarname=`basename $odexFile .odex`.jar
- zip -r -q $jarname classes.dex
- mv $jarname $fw_done
- rm -rf $outdir
- rm -f $odexFile
- rm -f classes.dex
- rm -f $jarname
- fi
- done
- echo "Framework done!"
Advertisement
Add Comment
Please, Sign In to add comment