T
TheMafia
Neues Mitglied
- 1
bei mir ist glaub der root weg. super user white list ist nicht mehr da
Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion erfordert derzeit den Zugriff auf die Seite über den integrierten Safari-Browser.
#!/sbin/sh
#origin by drakaz RECTOOLS v4.4
#all credits to him.
SCRIPT_VERSION="0.1"
SCRIPT_UNIT="unknown"
FULL_SIZE="unknown"
EXT2_SIZE="[B]2048[/B]"
DEFAULT_FATSIZE="[B]14000[/B]MB"
BLK_DEVICE="/dev/block/mmcblk0"
BIN_PATH="./bin"
usage()
{
echo "app2sd $0 $VER"
echo ""
echo "Usage: $0 [OPTION]..."
echo ""
echo "Options:"
echo " -h --help Display this help"
echo " -p --print Display SD partitions"
echo " -s --split Create [B]2048[/B]MB ext2 and fill remaining"
echo " space with a fat32 partition"
echo " -c --clean Delete partition table and create 1 single fat32 partition"
echo ""
}
do_exit()
{
exit $1
}
if [ "$1" == "" ]; then
usage
do_exit 0
fi
case $1 in
-h|--help)
usage
;;
-p|--print)
"$BIN_PATH/parted" -s "$BLK_DEVICE" print
;;
-c|--clean|-s|--split)
if [ -e "$BLK_DEVICE"p1 ]; then
"$BIN_PATH/busybox" umount /sdcard > /dev/null 2>&1
fi
NUM=`"$BIN_PATH/parted" -s "$BLK_DEVICE" print | tail -2 | cut -d " " -f 2`
if [ "$NUM" == "" ]; then
NUM=0
fi
while [ $NUM != 0 ]; do
"$BIN_PATH/parted" -s $BLK_DEVICE rm $NUM
NUM=`expr $NUM - 1`
done
FULL_SIZE=`"$BIN_PATH/parted" -s "$BLK_DEVICE" print | grep "Disk $BLK_DEVICE" | cut -f 3 -d " "`
if [ "$FULL_SIZE" == "" ]; then
echo "Error: Unable to get SDcard-size, try to clean first, aborting"
do_exit 1
fi
case $1 in
-c|--clean)
echo "Creating full sized clean fat32 partition on card 0"
"$BIN_PATH/parted" -s "$BLK_DEVICE" mkpartfs primary fat32 0 $FULL_SIZE
echo "SDcard cleaned (now fat32 only)"
;;
-s|--split)
UNIT=`echo $FULL_SIZE | sed -e "s/[0-9]*\.*[0-9]*//"`
if [ "$UNIT" != "MB" ]; then
if [ "$UNIT" != "GB" ]; then
echo "Error: Unknown unit, aborting"
do_exit 1
fi
fi
SIZE=`echo $FULL_SIZE |sed -e "s/[A-Z][A-Z]//"`
if [ "$SIZE" == "" ]; then
echo "Error: Unable to get SDcard-size, aborting"
do_exit 1
fi
if [ "$UNIT" == "MB" ]; then
EXT2_START=`expr $SIZE - $EXT2_SIZE`
else
EXT2_START=$DEFAULT_FATSIZE
fi
echo "Creating fat32-partition on card 0. This may take a while..."
$BIN_PATH/parted -s $BLK_DEVICE mkpartfs primary fat32 0 $EXT2_START
echo "Creating ext2-partition on card 0. This may take a while..."
$BIN_PATH/parted -s $BLK_DEVICE mkpartfs primary ext2 $EXT2_START $FULL_SIZE
echo "SDcard splitted (fat32+ext2)"
;;
esac
;;
*)
usage
;;
esac
do_exit 0
1. SDCard partitonieren (1GB ext2 + rest fat)