Skip to content

Commit

Permalink
Fresh New Update 8 with all the apps and firmware updated
Browse files Browse the repository at this point in the history
  • Loading branch information
XXH3X authored and XXH3X committed Apr 9, 2019
1 parent 5c4b961 commit 5f2549b
Show file tree
Hide file tree
Showing 22 changed files with 317 additions and 369 deletions.
278 changes: 19 additions & 259 deletions META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
@@ -1,266 +1,26 @@
#!/sbin/sh

ui_print "##################################################"
ui_print "## ##"
ui_print "## 88 a8P db 88 88 ##"
ui_print "## 88 .88' d88b 88 88 ##"
ui_print "## 88 88' d8''8b 88 88 ##"
ui_print "## 88 d88 d8' '8b 88 88 ##"
ui_print "## 8888'88. d8YaaaaY8b 88 88 ##"
ui_print "## 88P Y8b d8''''''''8b 88 88 ##"
ui_print "## 88 '88. d8' '8b 88 88 ##"
ui_print "## 88 Y8b d8' '8b 888888888 88 ##"
ui_print "## ##"
ui_print "################### NetHunter ####################"
ui_print "******************************"
ui_print "Powered by Magisk (@topjohnwu)"
ui_print "******************************"

OUTFD=/proc/self/fd/$2;
ZIPFILE="$3";

# embedded mode support
readlink /proc/$$/fd/$2 2>/dev/null | grep /tmp >/dev/null;
if [ "$?" -eq "0" ]; then
# rerouted to log file, so suppress recovery ui commands
OUTFD=/proc/self/fd/0;
# try to find the actual fd (pipe with parent updater likely started as 'update-binary 3 fd zipfile')
for FD in `ls /proc/$$/fd`; do
readlink /proc/$$/fd/$FD 2>/dev/null | grep pipe >/dev/null;
if [ "$?" -eq "0" ]; then
ps | grep " 3 $FD " | grep -v grep >/dev/null;
if [ "$?" -eq "0" ]; then
OUTFD=/proc/self/fd/$FD;
break;
fi;
fi;
done;
fi;

# Magisk boot mode support
test -e /data/adb/magisk && adb=adb;
ps | grep zygote | grep -v grep >/dev/null && BOOTMODE=true || BOOTMODE=false;
$BOOTMODE || ps -A 2>/dev/null | grep zygote | grep -v grep >/dev/null && BOOTMODE=true;
if $BOOTMODE; then
OUTFD=/proc/self/fd/0;
dev=/dev;
devtmp=/dev/tmp;
if [ ! -f /data/$adb/magisk_merge.img ]; then
(/system/bin/make_ext4fs -b 4096 -l 64M /data/$adb/magisk_merge.img || /system/bin/mke2fs -b 4096 -t ext4 /data/$adb/magisk_merge.img 64M) >/dev/null;
fi;
fi;

ui_print() { $BOOTMODE && echo "$1" || echo -e "ui_print $1\nui_print" >> $OUTFD; }
show_progress() { echo "progress $1 $2" >> $OUTFD; }
set_progress() { echo "set_progress $1" >> $OUTFD; }
file_getprop() { grep "^$2" "$1" | head -n1 | cut -d= -f2; }
abort() {
ui_print " ";
ui_print "Your system has not been changed.";
ui_print " ";
ui_print "Script will now exit...";
ui_print " ";
umount $mnt;
umount /system;
umount /data;
umount /cache;
exit 1;
}

ui_print " ";
ui_print "Installing Kali Linux Busybox";
modname=KaliNethunter;
show_progress 1.34 0;

ui_print "##################################################";
ui_print "## ##";
ui_print "## 88 a8P db 88 88 ##";
ui_print "## 88 .88' d88b 88 88 ##";
ui_print "## 88 88' d8''8b 88 88 ##";
ui_print "## 88 d88 d8' '8b 88 88 ##";
ui_print "## 8888'88. d8YaaaaY8b 88 88 ##";
ui_print "## 88P Y8b d8''''''''8b 88 88 ##";
ui_print "## 88 '88. d8' '8b 88 88 ##";
ui_print "## 88 Y8b d8' '8b 888888888 88 ##";
ui_print "## ##";
ui_print "################### NetHunter ####################";
ui_print " ******************************";
ui_print " Powered by Magisk (@topjohnwu)";
ui_print " ******************************";
ui_print " ";
ui_print "Mounting...";
mount -o ro /system;
mount /data;
mount /cache;
set_progress 0.2;

case $(basename "$ZIPFILE") in
*uninstall*|*Uninstall*) action=uninstallation;;
*) action=installation;;
esac;

case $(basename "$ZIPFILE") in
*system*) system=1; ui_print " "; ui_print "Warning: Forcing a system $action!";;
esac;

if [ "$action" == "installation" ]; then
ui_print " ";
ui_print "Extracting files...";
mkdir -p $dev/tmp/$modname;
cd $dev/tmp/$modname;
unzip -o "$ZIPFILE";
set_progress 0.3;

ui_print " ";
ui_print "Installing...";
rm -rf /system/xbin/busybox_nh
abi=`getprop ro.product.cpu.abi`;
case $abi in
arm64*) arch=arm64;;
arm*) arch=arm;;
*) ui_print "Unknown architecture: $abi"; abort;;
esac;
ui_print "Using architecture: $arch";
else
ui_print " ";
ui_print "Uninstalling...";
fi;

# Magisk clean flash support
if [ -e /data/$adb/magisk -a ! -e /data/$adb/magisk.img ]; then
/system/bin/make_ext4fs -b 4096 -l 64M /data/$adb/magisk.img || /system/bin/mke2fs -b 4096 -t ext4 /data/$adb/magisk.img 64M;
fi;
mkdir -p /dev/tmp;
cd /dev/tmp;

# allow forcing a system installation regardless of su.img/magisk.img detection
if [ ! "$system" ]; then
suimg=$(ls /data/$adb/magisk_merge.img || ls /data/su.img || ls /cache/su.img || ls /data/$adb/magisk.img || ls /cache/magisk.img) 2>/dev/null;
mnt=$devtmp/$(basename $suimg .img);
fi;
if [ "$suimg" ]; then
umount $mnt;
test ! -e $mnt && mkdir -p $mnt;
mount -t ext4 -o rw,noatime $suimg $mnt;
for i in 0 1 2 3 4 5 6 7; do
test "$(mount | grep " $mnt ")" && break;
loop=/dev/block/loop$i;
if [ ! -f "$loop" -o ! -b "$loop" ]; then
mknod $loop b 7 $i;
fi;
losetup $loop $suimg && mount -t ext4 -o loop,noatime $loop $mnt;
done;
case $mnt in
*/magisk*) magisk=/$modname/system;;
esac;
if [ -d "$mnt$magisk/xbin" -o "$magisk" -a -d "$root/system/xbin" ]; then
target=$mnt$magisk/xbin;
else
target=$mnt$magisk/bin;
fi;
else
# SuperSU BINDSBIN support
mnt=$(dirname `find /data -name supersu_is_here | head -n1`);
if [ -e "$mnt" -a ! "$system" ]; then
target=$mnt/xbin;
else
mount -o rw,remount /system;
mount /system;
if -d [ "$root/system/xbin" ]; then
target=$root/system/xbin;
else
target=$root/system/bin;
fi;
fi;
fi;
ui_print "Using path: $target";
if [ "$action" == "uninstallation" ]; then
if [ ! -f "$target/busybox" ]; then
ui_print " ";
ui_print "No busybox installation found!";
abort;
fi;
else
mkdir -p $target;
cp -f busybox-$arch $target/busybox;
chown 0:0 "$target/busybox";
chmod 755 "$target/busybox";
if [ "$magisk" ]; then
cp -f module.prop $mnt/$modname/;
touch $mnt/$modname/auto_mount;
if $BOOTMODE; then
test -e /magisk && imgmnt=/magisk || imgmnt=/sbin/.core/img;
if [ "$suimg" == "/data/$adb/magisk_merge.img" ]; then
mkdir -p "$imgmnt/$modname";
touch "$imgmnt/$modname/update";
cp -f module.prop "$imgmnt/$modname/";
fi;
fi;
fi;
set_progress 0.8;
unzip -o "$3" install.sh;

ui_print " ";
ui_print "Cleaning...";
fi;
cleanup="$target";
if [ "$target" == "$mnt$magisk/xbin" -a -f "$mnt$magisk/bin/busybox" ]; then
$target/busybox rm -f $mnt$magisk/bin/busybox;
cleanup="$mnt$magisk/bin $target";
fi;
for dir in $cleanup; do
cd $dir;
for i in $(ls -al `find -type l` | $target/busybox awk '{ print $(NF-2) ":" $NF }'); do
case $(echo $i | $target/busybox cut -d: -f2) in
*busybox) list="$list $dir/$(echo $i | $target/busybox cut -d: -f1)";;
esac;
done;
done;
test "$action" == "uninstallation" && list="$list busybox";
$target/busybox rm -f $list;

if [ "$action" == "installation" ]; then
ui_print " ";
ui_print "Creating symlinks...";
sysbin="$(ls $root/system/bin)";
test $BOOTMODE && existbin="$(ls $imgmnt/$modname/system/bin 2>/dev/null)";
for applet in `$target/busybox --list`; do
case $target in
*/bin)
if [ "$(echo "$sysbin" | grep "^$applet$")" ]; then
if $BOOTMODE && [ "$(echo "$existbin" | grep "^$applet$")" ]; then
$target/busybox ln -sf busybox $applet;
fi;
else
$target/busybox ln -sf busybox $applet;
fi;
;;
*) $target/busybox ln -sf busybox $applet;;
esac;
done;
test "$magisk" && chcon -hR 'u:object_r:system_file:s0' "$mnt/$modname";
else
test "$magisk" && rm -rf /magisk/$modname /sbin/.core/img/$modname;
fi;
print "Symlinking..."
ln -s /system/xbin/busybox /system/xbin/busybox_nh

pm install $dev/tmp/$modname/apps/BlueNMEA.apk
pm install $dev/tmp/$modname/apps/cSploit-release.apk
pm install $dev/tmp/$modname/apps/Drivedroid.apk
pm install $dev/tmp/$modname/apps/Hackerskeyboard.apk
pm install $dev/tmp/$modname/apps/OpenVPN.apk
pm install $dev/tmp/$modname/apps/RFAnalyzer.apk
pm install $dev/tmp/$modname/apps/RouterKeygen.apk
pm install $dev/tmp/$modname/apps/Shodan.apk
pm install $dev/tmp/$modname/apps/Term-nh.apk
pm install $dev/tmp/$modname/apps/USBKeyboard.apk
pm install $dev/tmp/$modname/apps/VNC-nh.apk
pm install $dev/tmp/$modname/apps/droidducky.apk
pm install $dev/tmp/$modname/apps/nethunter.apk

ui_print "Installing wireless firmware..."
cp -rf $dev/tmp/$modname/system/etc/ /system/

ui_print "Cleaning Up..."
rm -rf /data/local/nhsystem/kali*

set_progress 1.0;

ui_print " ";
ui_print "Unmounting...";
cd /;
test "$suimg" && umount $mnt;
test "$loop" && losetup -d $loop;
umount /system;
umount /data;
umount /cache;
set_progress 1.2;

rm -rf /tmp/$modname /dev/tmp;
ui_print " ";
ui_print "Done!";
set_progress 1.34;
exit 0;
. /dev/tmp/install.sh;
Binary file modified apps/OpenVPN.apk
Binary file not shown.
Binary file modified apps/Term-nh.apk
Binary file not shown.
Binary file modified apps/droidducky.apk
Binary file not shown.
Binary file modified apps/nethunter.apk
Binary file not shown.
Binary file added busybox-amd64
Binary file not shown.
Binary file added busybox-i386
Binary file not shown.
108 changes: 0 additions & 108 deletions config.sh

This file was deleted.

Loading

0 comments on commit 5f2549b

Please sign in to comment.