Skip to content

Commit

Permalink
Merge branch 'testing'
Browse files Browse the repository at this point in the history
Signed-off-by: Yash D. Saraf <[email protected]>
  • Loading branch information
yashdsaraf committed Jul 31, 2017
2 parents f1f413e + 050b791 commit 6eb6b82
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 57 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ scripts/misc
bbx/workspace/**
bbx/Bins/*/**
!bbx/Bins/*/xzdec
scripts/signapk/certificate.pem
scripts/sf_private_key*
files.tar
20 changes: 11 additions & 9 deletions bbx/common_install_code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,17 @@ is_mounted() {
}

mount_() {
( /sbin/mount $* || toolbox mount $* ||
toybox mount $* || return 1 ) 2>/dev/null
( mount $* || /sbin/mount $* || toolbox mount $* ||
toybox mount $* || return 1 ) >/dev/null 2>&1
}

mount_systemless () {
mount_systemless() {
#Following code to mount su.img is borrowed from supersu update-binary
mkdir -p $2
chmod 755 $2
if [ ! -d $2 ]
then
mkdir $2 2>/dev/null
chmod 755 $2
return
fi
LOOPDEVICE=
for LOOP in 0 1 2 3 4 5 6 7
Expand Down Expand Up @@ -119,7 +120,7 @@ if readlink /proc/$$/fd/$OPFD 2>/dev/null | grep /tmp >/dev/null
done
fi

mount_ /data 2>/dev/null
mount_ /data

#Redirect all errors to LOGFILE
for partition in /sdcard /data /cache
Expand Down Expand Up @@ -462,7 +463,6 @@ fi
# cd to the root directory to avoid "device or resource busy" errors while unmounting
cd /

ui_print_ "Unmounting /system --"
if [ ! -z $SULOOPDEV ]
then umount /su
losetup -d $SULOOPDEV
Expand All @@ -482,9 +482,11 @@ if $MAGISKINSTALL
fi

$BOOTMODE || recovery_cleanup
else
ui_print_ "Unmounting /system --"
umount /system
fi
umount /system
rm -rf $INSTALLER 2>/dev/null
ui_print_ " "
ui_print_ "All DONE! -- Check $LOGFILE for more info"
sleep 0.5
sleep 0.5
Binary file modified files.tar.enc
Binary file not shown.
19 changes: 7 additions & 12 deletions scripts/SEE.template
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ if (which trap || type trap) >/dev/null 2>&1
fi

mount_() {
( toolbox mount $* ||
toybox mount $* || busybox mount $* || return 1 ) >/dev/null 2>&1
( mount $* || toolbox mount $* || toybox mount $* || return 1 ) >/dev/null 2>&1
}

sysrw="mount_ -o rw,remount -t auto /system"
Expand Down Expand Up @@ -473,9 +472,6 @@ fi
if [ $ONLYCLEAN -ne 1 ]
then
echo "Installing busybox to $INSTALLDIR --"
if [ $INSTALLDIR == "/magisk/phh/bin" ]
then echo "Note: A reboot is recommended when installing busybox to $INSTALLDIR"
fi

cd $INSTALLDIR
$BBX cp $BBX busybox
Expand All @@ -490,13 +486,12 @@ if [ $ONLYCLEAN -ne 1 ]
# Only install applets which are not present in the system
# Fixes the error of busybox applets being called instead of system's default applets
# since magisk installs bins to /sbin which precedes /system
if [ "$INSTALLDIR" == "/magisk/phh/bin" ] &&
for dir in $POSSIBLE_CLEANDIRS
do
[ -e $dir/$i ] && break
done
then continue
fi
# if for dir in $POSSIBLE_CLEANDIRS
# do
# [ -e $dir/$i ] && break
# done
# then continue
# fi
./busybox ln -s busybox $i 2>/dev/null
if [ ! -e $i ]
then
Expand Down
16 changes: 9 additions & 7 deletions scripts/mkzip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,25 @@
# You should have received a copy of the GNU General Public License
# along with BB-Bot. If not, see <http://www.gnu.org/licenses/>.

#FLASHABLE ZIP CREATOR
# FLASHABLE ZIP CREATION
SCRIPTDIR=$(realpath `dirname $0`)
SIGNAPKDIR=$SCRIPTDIR/signapk
cd "$SCRIPTDIR/../bbx"
# ZIPALIGN=~/opt/android-sdk-linux/build-tools/25.0.2/zipalign
PEM=$SIGNAPKDIR/certificate.pem
# Uncomment this line to activate test certificate for signing
# PEM=$SIGNAPKDIR/testkey.x509.pem
PK8=$SIGNAPKDIR/testkey.pk8
SIGNAPKJAR=$SIGNAPKDIR/signapk.jar #Provided by @mfonville and @TheCrazyLex
PK8=$SIGNAPKDIR/key.pk8
SIGNAPKJAR=$SIGNAPKDIR/signapk.jar # Provided by https://github.com/appium/sign
# Provided by https://github.com/omnirom/android_packages_apps_OpenDelta
ZIPADJUST=$SIGNAPKDIR/zipadjust
MINSIGNAPKJAR=$SIGNAPKDIR/minsignapk.jar

mkzip() {
ZIPNAME="Busybox-$1.zip"
7za a -tzip -mx=0 $ZIPNAME * >/dev/null
# $ZIPALIGN -f -v 4 $ZIPNAME $ZIPNAME.aligned
# mv -fv $ZIPNAME.aligned $ZIPNAME
java -Djava.library.path=$SIGNAPKDIR -jar $SIGNAPKJAR -w $PEM $PK8 $ZIPNAME $ZIPNAME.signed
java -jar $SIGNAPKJAR $PEM $PK8 $ZIPNAME $ZIPNAME.signed
$ZIPADJUST $ZIPNAME.signed $ZIPNAME
java -jar $MINSIGNAPKJAR $PEM $PK8 $ZIPNAME $ZIPNAME.signed
mv $ZIPNAME.signed ../out/$ZIPNAME
rm $ZIPNAME
}
Expand Down
Binary file removed scripts/signapk/libLLVM.so
Binary file not shown.
Binary file removed scripts/signapk/libbcc.so
Binary file not shown.
Binary file removed scripts/signapk/libbcinfo.so
Binary file not shown.
Binary file removed scripts/signapk/libc++.so
Binary file not shown.
Binary file removed scripts/signapk/libclang.so
Binary file not shown.
Binary file removed scripts/signapk/libconscrypt_openjdk_jni.so
Binary file not shown.
Binary file added scripts/signapk/minsignapk.jar
Binary file not shown.
Binary file modified scripts/signapk/signapk.jar
Binary file not shown.
Binary file removed scripts/signapk/testkey.pk8
Binary file not shown.
27 changes: 0 additions & 27 deletions scripts/signapk/testkey.x509.pem

This file was deleted.

Binary file added scripts/signapk/zipadjust
Binary file not shown.

0 comments on commit 6eb6b82

Please sign in to comment.