2
0
mirror of https://gitlab.com/Nanolx/NanoDroid synced 2024-10-31 09:20:23 +00:00

Initial commit

This commit is contained in:
Christopher Roy Bratusek 2018-01-23 21:11:52 +01:00
commit ec30353eac
246 changed files with 8418 additions and 0 deletions

1239
ChangeLog.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,32 @@
#!/sbin/sh
umask 022
OUTFD=${2}
ZIP=${3}
ZIPDIR=$(dirname "${ZIP}")
MODID=NanoDroid_FDroid
unzip -o "${ZIP}" nanodroid-functions -d "/tmp" || \
error " !! failed to load Common Installer"
source "/tmp/nanodroid-functions" || \
error " !! failed to load Common Installer"
detect_bootmode
detect_outfd
show_banner
check_system
unpack_zip
detect_arch
get_cfg_setup
detect_mode
install_fdroid
nanodroid_finalize
exit 0

View File

@ -0,0 +1 @@
#MAGISK

7
F-Droid/module.prop Normal file
View File

@ -0,0 +1,7 @@
id=NanoDroid_FDroid
name=NanoDroid (F-Droid sub module)
version=v15.90.99999999
versionCode=32
author=Nanolx
description=NanoDroid (F-Droid sub module) for LineageOS/AOSP based ROMs
minMagisk=1500

View File

@ -0,0 +1,47 @@
#!/sbin/sh
umask 022
OUTFD=${2}
ZIP=${3}
ZIPDIR=$(dirname "${ZIP}")
MODID=NanoDroid
unzip -o "${ZIP}" nanodroid-functions -d "/tmp" || \
error " !! failed to load Common Installer"
source "/tmp/nanodroid-functions" || \
error " !! failed to load Common Installer"
detect_bootmode
detect_outfd
show_banner
check_system
unpack_zip
detect_arch
get_cfg_setup
get_cfg_apps
get_cfg_overlay
detect_mode
install_microg
install_mapsv1
install_gsync
install_fdroid
install_store
install_apps
install_zelda
install_initd
install_swipe
install_bash
install_nano
install_novl
install_shell_utils
nanodroid_finalize
exit 0

View File

@ -0,0 +1 @@
#MAGISK

19
Full/common/service.sh Normal file
View File

@ -0,0 +1,19 @@
#!/system/bin/sh
# Please don't hardcode /magisk/modname/... ; instead, please use $MODDIR/...
# This will make your scripts compatible even if Magisk change its mount point in the future
MODDIR=${0%/*}
# Create private Log directory
LOGDIR="${MODDIR}"/.logs
[[ ! -d ${LOGDIR} ]] && mkdir "${LOGDIR}"
# Set current date in 20170607-12.07.25 format
CURDATE=$(date +%Y%m%d-%I.%M.%S)
# This script will be executed in late_start service mode
# More info in the main Magisk thread
for init in fstrim logscleaner sqlite external_sd permissions; do
"${MODDIR}/init.d/${init}" | \
tee -a "${LOGDIR}/${init}.log.${CURDATE}" &
done

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<exceptions>
<exception package="com.google.android.backuptransport"></exception>
<exception package="com.google.android.syncadapters.contacts">
<permission name="android.permission.READ_CONTACTS" fixed="false"></permission>
<permission name="android.permission.WRITE_CONTACTS" fixed="false"></permission>
<permission name="android.permission.GET_ACCOUNTS" fixed="false"></permission>
<permission name="android.permission.USE_CREDENTIALS" fixed="false"></permission>
<permission name="android.permission.READ_SYNC_SETTINGS" fixed="false"></permission>
<permission name="android.permission.WRITE_SYNC_SETTINGS" fixed="false"></permission>
</exception>
<exception package="com.google.android.syncadapters.calendar">
<permission name="android.permission.READ_CALENDAR" fixed="false"></permission>
<permission name="android.permission.WRITE_CALENDAR" fixed="false"></permission>
<permission name="android.permission.USE_CREDENTIALS" fixed="false"></permission>
<permission name="android.permission.READ_SYNC_SETTINGS" fixed="false"></permission>
<permission name="android.permission.WRITE_SYNC_SETTINGS" fixed="false"></permission>
</exception>
</exceptions>

7
Full/module.prop Normal file
View File

@ -0,0 +1,7 @@
id=NanoDroid
name=NanoDroid
version=v15.90.99999999
versionCode=34
author=Nanolx
description=NanoDroid: microG, FOSS apps, pseudo-debloat, Zelda ringtones, Shell utilities and more.
minMagisk=1500

1027
Full/nanodroid-functions Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
clear

41
Full/system/etc/bashrc Normal file
View File

@ -0,0 +1,41 @@
# /etc/bash/bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output. So make sure this doesn't display
# anything or bad things will happen !
export HOME=/sdcard
export HOSTNAME=$(getprop ro.cm.device)
export TERM=xterm
export TMPDIR=/data/local/tmp
export USER=$(id -un)
export PAGER=less
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi
# Bash won't get SIGWINCH if another process is in the foreground.
# Enable checkwinsize so that bash will check the terminal size when
# it regains control. #65623
# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
shopt -s checkwinsize
# Enable history appending instead of overwriting. #139609
shopt -s histappend
# enable colorful terminal
if [[ ${EUID} == 0 ]] ; then
PS1='\[\033[01;31m\]${HOSTNAME:=$(hostname)}\[\033[01;34m\] \W \$\[\033[00m\] '
else
PS1='\[\033[01;32m\]${USER:=$(id \-un)}@${HOSTNAME:=$(hostname)}\[\033[01;34m\] \w \$\[\033[00m\] '
fi
# correct the terminal size ;
# some OS' don't ship `resize`
resize >/dev/null

View File

@ -0,0 +1,47 @@
#!/system/bin/sh
echo "external_sd init script"
# retry 6 times, wait 5 seconds between each try
count=0
while [[ -z $(grep "^/dev/block.*/mnt/media_rw" /proc/mounts) ]]; do
count=$((count+1))
if [ "${count}" -lt 7 ]; then
sleep 5
else
echo ">> no SD Card found"
exit 1
fi
done
media_rw=$(grep "^/dev/block.*/mnt/media_rw" /proc/mounts \
| cut -d " " -f 2 \
| cut -d "/" -f 4)
storage="/storage/${media_rw}"
if [[ -d ${storage} ]]; then
echo ">> SD Card found"
echo ">> storage: \"${storage}\""
if [[ -e /external_sd ]]; then
link=$(ls -l /external_sd | sed -e 's/.*-> //g')
if [[ "${link}" != "${storage}" ]]; then
echo ">> removing old link: \"${link}\""
mount -orw,remount /
rm -f /external_sd
mount -oro,remount /
fi
fi
if [[ -e /external_sd ]]; then
echo ">> /external_sd link up to date"
else
echo ">> /external_sd link created"
mount -orw,remount /
ln -sf ${storage} /external_sd
mount -oro,remount /
fi
else
echo ">> no SD Card found"
fi

14
Full/system/etc/init.d/fstrim Executable file
View File

@ -0,0 +1,14 @@
#!/system/bin/sh
echo "fstrim init script"
if [ -e /init.fstrim.sh ]; then
echo "/init.fstrim.sh exists, trimming /preload only"
fstrim -v /preload
else
echo "/init.fstrim.sh does not exist, trimming /cache, /system, /data, /preload"
fstrim -v /cache
fstrim -v /system
fstrim -v /data
fstrim -v /preload
fi

View File

@ -0,0 +1,20 @@
#!/system/bin/sh
echo "logscleaner init script"
echo "Starting Automatic Cleaning $(date +"%m-%d-%Y %H:%M:%S")"
rm -f /data/data/*/*/*/*.tmp
rm -f /data/data/*/*/*/*/*.tmp
rm -f /data/local/*.apk
rm -f /data/local/tmp/*.apk
rm -f /data/log/*
rm -f /data/slog/*
rm -f /cache/*.*
rm -f /cache/recovery/*.*
rm -f /data/system/dropbox/*.*
rm -f /data/backup/pending/*.tmp
rm -f /data/tombstones/*
rm -f /data/system/usagestats/0/daily/*
rm -f /data/system/usagestats/0/monthly/*
rm -f /data/system/usagestats/0/weekly/*
rm -f /data/system/usagestats/0/yearly/*
echo "Automatic Cleaning finished at $(date +"%m-%d-%Y %H:%M:%S")"

28
Full/system/etc/init.d/sqlite Executable file
View File

@ -0,0 +1,28 @@
#!/system/bin/sh
echo "sqlite init script"
if which sqlite3 >/dev/null; then
echo "SQLite database VACUUM and REINDEX started at $(date +"%m-%d-%Y %H:%M:%S")"
for i in `find /data/* -iname "*.db"`; do
sqlite3 $i 'VACUUM;'
resVac=$?
if [ $resVac == 0 ]; then
resVac="SUCCESS"
else
resVac="ERRCODE-$resVac"
fi;
sqlite3 $i 'REINDEX;'
resIndex=$?
if [ $resIndex == 0 ]; then
resIndex="SUCCESS"
else
resIndex="ERRCODE-$resIndex"
fi
echo "Database $i: VACUUM=$resVac REINDEX=$resIndex"
done
echo "SQLite database VACUUM and REINDEX finished at $(date +"%m-%d-%Y %H:%M:%S")"
else echo "sqlite3 not installed, stop"
fi

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<permissions>
<library name="com.google.android.maps"
file="/system/framework/com.google.android.maps.jar" />
</permissions>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Full/system/xbin/aapt.arm Executable file

Binary file not shown.

BIN
Full/system/xbin/aapt.x86 Executable file

Binary file not shown.

21
Full/system/xbin/bash Executable file
View File

@ -0,0 +1,21 @@
#!/system/bin/sh
# bash: wrapper to set up and run bash from terminal
# osm0sis @ xda-developers
# adopted to GNU Bash setialpha @ xda-developers
dir="$(cd "$(dirname "$0")"; pwd)"
if [ "$1" == "--term" ]; then
term=$2;
shift 2;
else
term=xterm
fi
clear # empty the buffer
# correct the terminal size ;
# some OS' don't ship `resize`
resize >/dev/null
${dir}/bash.bin --rcfile /system/etc/bashrc $*

BIN
Full/system/xbin/bash.bin.arm Executable file

Binary file not shown.

BIN
Full/system/xbin/bash.bin.x86 Executable file

Binary file not shown.

272
Full/system/xbin/bashbug.arm Executable file
View File

@ -0,0 +1,272 @@
#!/system/bin/sh -
#
# bashbug - create a bug report and mail it to the bug address
#
# The bug address depends on the release status of the shell. Versions
# with status `devel', `alpha', `beta', or `rc' mail bug reports to
# chet@cwru.edu and, optionally, to bash-testers@cwru.edu.
# Other versions send mail to bug-bash@gnu.org.
#
# Copyright (C) 1996-2004 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# configuration section:
# these variables are filled in by the make target in Makefile
#
MACHINE="arm"
OS="linux-androideabi"
CC="arm-linux-androideabi-gcc"
CFLAGS=" -DPROGRAM='bash' -DCONF_HOSTTYPE='arm' -DCONF_OSTYPE='linux-androideabi' -DCONF_MACHTYPE='arm-unknown-linux-androideabi' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I/storage/projects/NanoMod/bash-on-android/bash-4.4 -I/storage/projects/NanoMod/bash-on-android/bash-4.4/include -I/storage/projects/NanoMod/bash-on-android/bash-4.4/lib -g -O2 -Wno-parentheses -Wno-format-security"
RELEASE="4.4"
PATCHLEVEL="12"
RELSTATUS="release"
MACHTYPE="arm-unknown-linux-androideabi"
PATH=/bin:/usr/bin:/usr/local/bin:$PATH
export PATH
# Check if TMPDIR is set, default to /tmp
: ${TMPDIR:=/tmp}
#Securely create a temporary directory for the temporary files
TEMPDIR=$TMPDIR/bbug.$$
(umask 077 && mkdir $TEMPDIR) || {
echo "$0: could not create temporary directory" >&2
exit 1
}
TEMPFILE1=$TEMPDIR/bbug1
TEMPFILE2=$TEMPDIR/bbug2
USAGE="Usage: $0 [--help] [--version] [bug-report-email-address]"
VERSTR="GNU bashbug, version ${RELEASE}.${PATCHLEVEL}-${RELSTATUS}"
do_help= do_version=
while [ $# -gt 0 ]; do
case "$1" in
--help) shift ; do_help=y ;;
--version) shift ; do_version=y ;;
--) shift ; break ;;
-*) echo "bashbug: ${1}: invalid option" >&2
echo "$USAGE" >&2
exit 2 ;;
*) break ;;
esac
done
if [ -n "$do_version" ]; then
echo "${VERSTR}"
exit 0
fi
if [ -n "$do_help" ]; then
echo "${VERSTR}"
echo "${USAGE}"
echo
cat << HERE_EOF
Bashbug is used to send mail to the Bash maintainers
for when Bash doesn't behave like you'd like, or expect.
Bashbug will start up your editor (as defined by the shell's
EDITOR environment variable) with a preformatted bug report
template for you to fill in. The report will be mailed to the
bug-bash mailing list by default. See the manual for details.
If you invoke bashbug by accident, just quit your editor without
saving any changes to the template, and no bug report will be sent.
HERE_EOF
exit 0
fi
# Figure out how to echo a string without a trailing newline
N=`echo 'hi there\c'`
case "$N" in
*c) n=-n c= ;;
*) n= c='\c' ;;
esac
BASHTESTERS="bash-testers@cwru.edu"
case "$RELSTATUS" in
alpha*|beta*|devel*|rc*) BUGBASH=chet@cwru.edu ;;
*) BUGBASH=bug-bash@gnu.org ;;
esac
case "$RELSTATUS" in
alpha*|beta*|devel*|rc*)
echo "$0: This is a testing release. Would you like your bug report"
echo "$0: to be sent to the bash-testers mailing list?"
echo $n "$0: Send to bash-testers? $c"
read ans
case "$ans" in
y*|Y*) BUGBASH="${BUGBASH},${BASHTESTERS}" ;;
esac ;;
esac
BUGADDR="${1-$BUGBASH}"
if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then
if [ -x /usr/bin/editor ]; then
DEFEDITOR=editor
elif [ -x /usr/local/bin/ce ]; then
DEFEDITOR=ce
elif [ -x /usr/local/bin/emacs ]; then
DEFEDITOR=emacs
elif [ -x /usr/contrib/bin/emacs ]; then
DEFEDITOR=emacs
elif [ -x /usr/bin/emacs ]; then
DEFEDITOR=emacs
elif [ -x /usr/bin/xemacs ]; then
DEFEDITOR=xemacs
elif [ -x /usr/contrib/bin/jove ]; then
DEFEDITOR=jove
elif [ -x /usr/local/bin/jove ]; then
DEFEDITOR=jove
elif [ -x /usr/bin/vi ]; then
DEFEDITOR=vi
else
echo "$0: No default editor found: attempting to use vi" >&2
DEFEDITOR=vi
fi
fi
: ${EDITOR=$DEFEDITOR}
: ${USER=${LOGNAME-`whoami`}}
trap 'rm -rf "$TEMPDIR"; exit 1' 1 2 3 13 15
trap 'rm -rf "$TEMPDIR"' 0
UN=
if (uname) >/dev/null 2>&1; then
UN=`uname -a`
fi
if [ -f /usr/lib/sendmail ] ; then
RMAIL="/usr/lib/sendmail"
SMARGS="-i -t"
elif [ -f /usr/sbin/sendmail ] ; then
RMAIL="/usr/sbin/sendmail"
SMARGS="-i -t"
else
RMAIL=rmail
SMARGS="$BUGADDR"
fi
INITIAL_SUBJECT='[50 character or so descriptive subject here (for reference)]'
cat > "$TEMPFILE1" <<EOF
From: ${USER}
To: ${BUGADDR}
Subject: ${INITIAL_SUBJECT}
Configuration Information [Automatically generated, do not change]:
Machine: $MACHINE
OS: $OS
Compiler: $CC
Compilation CFLAGS: $CFLAGS
uname output: $UN
Machine Type: $MACHTYPE
Bash Version: $RELEASE
Patch Level: $PATCHLEVEL
Release Status: $RELSTATUS
Description:
[Detailed description of the problem, suggestion, or complaint.]
Repeat-By:
[Describe the sequence of events that causes the problem
to occur.]
Fix:
[Description of how to fix the problem. If you don't know a
fix for the problem, don't include this section.]
EOF
cp "$TEMPFILE1" "$TEMPFILE2"
chmod u+w "$TEMPFILE1"
trap '' 2 # ignore interrupts while in editor
edstat=1
while [ $edstat -ne 0 ]; do
$EDITOR "$TEMPFILE1"
edstat=$?
if [ $edstat -ne 0 ]; then
echo "$0: editor \`$EDITOR' exited with nonzero status."
echo "$0: Perhaps it was interrupted."
echo "$0: Type \`y' to give up, and lose your bug report;"
echo "$0: type \`n' to re-enter the editor."
echo $n "$0: Do you want to give up? $c"
read ans
case "$ans" in
[Yy]*) exit 1 ;;
esac
continue
fi
# find the subject from the temp file and see if it's been changed
CURR_SUB=`grep '^Subject: ' "$TEMPFILE1" | sed 's|^Subject:[ ]*||' | sed 1q`
case "$CURR_SUB" in
"${INITIAL_SUBJECT}")
echo
echo "$0: You have not changed the subject from the default."
echo "$0: Please use a more descriptive subject header."
echo "$0: Type \`y' to give up, and lose your bug report;"
echo "$0: type \`n' to re-enter the editor."
echo $n "$0: Do you want to give up? $c"
read ans
case "$ans" in
[Yy]*) exit 1 ;;
esac
echo "$0: The editor will be restarted in five seconds."
sleep 5
edstat=1
;;
esac
done
trap 'rm -rf "$TEMPDIR"; exit 1' 2 # restore trap on SIGINT
if cmp -s "$TEMPFILE1" "$TEMPFILE2"
then
echo "File not changed, no bug report submitted."
exit
fi
echo $n "Send bug report to ${BUGADDR}? [y/n] $c"
read ans
case "$ans" in
[Nn]*) exit 0 ;;
esac
${RMAIL} $SMARGS < "$TEMPFILE1" || {
cat "$TEMPFILE1" >> $HOME/dead.bashbug
echo "$0: mail to ${BUGADDR} failed: report saved in $HOME/dead.bashbug" >&2
echo "$0: please send it manually to ${BUGADDR}" >&2
}
exit 0

272
Full/system/xbin/bashbug.x86 Executable file
View File

@ -0,0 +1,272 @@
#!/bin/sh -
#
# bashbug - create a bug report and mail it to the bug address
#
# The bug address depends on the release status of the shell. Versions
# with status `devel', `alpha', `beta', or `rc' mail bug reports to
# chet@cwru.edu and, optionally, to bash-testers@cwru.edu.
# Other versions send mail to bug-bash@gnu.org.
#
# Copyright (C) 1996-2004 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# configuration section:
# these variables are filled in by the make target in Makefile
#
MACHINE="i686"
OS="linux-android"
CC="i686-linux-android-gcc"
CFLAGS=" -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-android' -DCONF_MACHTYPE='i686-pc-linux-android' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I/storage/projects/bash-on-android/bash-4.4 -I/storage/projects/bash-on-android/bash-4.4/include -I/storage/projects/bash-on-android/bash-4.4/lib -g -O2 -Wno-parentheses -Wno-format-security"
RELEASE="4.4"
PATCHLEVEL="12"
RELSTATUS="release"
MACHTYPE="i686-pc-linux-android"
PATH=/bin:/usr/bin:/usr/local/bin:$PATH
export PATH
# Check if TMPDIR is set, default to /tmp
: ${TMPDIR:=/tmp}
#Securely create a temporary directory for the temporary files
TEMPDIR=$TMPDIR/bbug.$$
(umask 077 && mkdir $TEMPDIR) || {
echo "$0: could not create temporary directory" >&2
exit 1
}
TEMPFILE1=$TEMPDIR/bbug1
TEMPFILE2=$TEMPDIR/bbug2
USAGE="Usage: $0 [--help] [--version] [bug-report-email-address]"
VERSTR="GNU bashbug, version ${RELEASE}.${PATCHLEVEL}-${RELSTATUS}"
do_help= do_version=
while [ $# -gt 0 ]; do
case "$1" in
--help) shift ; do_help=y ;;
--version) shift ; do_version=y ;;
--) shift ; break ;;
-*) echo "bashbug: ${1}: invalid option" >&2
echo "$USAGE" >&2
exit 2 ;;
*) break ;;
esac
done
if [ -n "$do_version" ]; then
echo "${VERSTR}"
exit 0
fi
if [ -n "$do_help" ]; then
echo "${VERSTR}"
echo "${USAGE}"
echo
cat << HERE_EOF
Bashbug is used to send mail to the Bash maintainers
for when Bash doesn't behave like you'd like, or expect.
Bashbug will start up your editor (as defined by the shell's
EDITOR environment variable) with a preformatted bug report
template for you to fill in. The report will be mailed to the
bug-bash mailing list by default. See the manual for details.
If you invoke bashbug by accident, just quit your editor without
saving any changes to the template, and no bug report will be sent.
HERE_EOF
exit 0
fi
# Figure out how to echo a string without a trailing newline
N=`echo 'hi there\c'`
case "$N" in
*c) n=-n c= ;;
*) n= c='\c' ;;
esac
BASHTESTERS="bash-testers@cwru.edu"
case "$RELSTATUS" in
alpha*|beta*|devel*|rc*) BUGBASH=chet@cwru.edu ;;
*) BUGBASH=bug-bash@gnu.org ;;
esac
case "$RELSTATUS" in
alpha*|beta*|devel*|rc*)
echo "$0: This is a testing release. Would you like your bug report"
echo "$0: to be sent to the bash-testers mailing list?"
echo $n "$0: Send to bash-testers? $c"
read ans
case "$ans" in
y*|Y*) BUGBASH="${BUGBASH},${BASHTESTERS}" ;;
esac ;;
esac
BUGADDR="${1-$BUGBASH}"
if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then
if [ -x /usr/bin/editor ]; then
DEFEDITOR=editor
elif [ -x /usr/local/bin/ce ]; then
DEFEDITOR=ce
elif [ -x /usr/local/bin/emacs ]; then
DEFEDITOR=emacs
elif [ -x /usr/contrib/bin/emacs ]; then
DEFEDITOR=emacs
elif [ -x /usr/bin/emacs ]; then
DEFEDITOR=emacs
elif [ -x /usr/bin/xemacs ]; then
DEFEDITOR=xemacs
elif [ -x /usr/contrib/bin/jove ]; then
DEFEDITOR=jove
elif [ -x /usr/local/bin/jove ]; then
DEFEDITOR=jove
elif [ -x /usr/bin/vi ]; then
DEFEDITOR=vi
else
echo "$0: No default editor found: attempting to use vi" >&2
DEFEDITOR=vi
fi
fi
: ${EDITOR=$DEFEDITOR}
: ${USER=${LOGNAME-`whoami`}}
trap 'rm -rf "$TEMPDIR"; exit 1' 1 2 3 13 15
trap 'rm -rf "$TEMPDIR"' 0
UN=
if (uname) >/dev/null 2>&1; then
UN=`uname -a`
fi
if [ -f /usr/lib/sendmail ] ; then
RMAIL="/usr/lib/sendmail"
SMARGS="-i -t"
elif [ -f /usr/sbin/sendmail ] ; then
RMAIL="/usr/sbin/sendmail"
SMARGS="-i -t"
else
RMAIL=rmail
SMARGS="$BUGADDR"
fi
INITIAL_SUBJECT='[50 character or so descriptive subject here (for reference)]'
cat > "$TEMPFILE1" <<EOF
From: ${USER}
To: ${BUGADDR}
Subject: ${INITIAL_SUBJECT}
Configuration Information [Automatically generated, do not change]:
Machine: $MACHINE
OS: $OS
Compiler: $CC
Compilation CFLAGS: $CFLAGS
uname output: $UN
Machine Type: $MACHTYPE
Bash Version: $RELEASE
Patch Level: $PATCHLEVEL
Release Status: $RELSTATUS
Description:
[Detailed description of the problem, suggestion, or complaint.]
Repeat-By:
[Describe the sequence of events that causes the problem
to occur.]
Fix:
[Description of how to fix the problem. If you don't know a
fix for the problem, don't include this section.]
EOF
cp "$TEMPFILE1" "$TEMPFILE2"
chmod u+w "$TEMPFILE1"
trap '' 2 # ignore interrupts while in editor
edstat=1
while [ $edstat -ne 0 ]; do
$EDITOR "$TEMPFILE1"
edstat=$?
if [ $edstat -ne 0 ]; then
echo "$0: editor \`$EDITOR' exited with nonzero status."
echo "$0: Perhaps it was interrupted."
echo "$0: Type \`y' to give up, and lose your bug report;"
echo "$0: type \`n' to re-enter the editor."
echo $n "$0: Do you want to give up? $c"
read ans
case "$ans" in
[Yy]*) exit 1 ;;
esac
continue
fi
# find the subject from the temp file and see if it's been changed
CURR_SUB=`grep '^Subject: ' "$TEMPFILE1" | sed 's|^Subject:[ ]*||' | sed 1q`
case "$CURR_SUB" in
"${INITIAL_SUBJECT}")
echo
echo "$0: You have not changed the subject from the default."
echo "$0: Please use a more descriptive subject header."
echo "$0: Type \`y' to give up, and lose your bug report;"
echo "$0: type \`n' to re-enter the editor."
echo $n "$0: Do you want to give up? $c"
read ans
case "$ans" in
[Yy]*) exit 1 ;;
esac
echo "$0: The editor will be restarted in five seconds."
sleep 5
edstat=1
;;
esac
done
trap 'rm -rf "$TEMPDIR"; exit 1' 2 # restore trap on SIGINT
if cmp -s "$TEMPFILE1" "$TEMPFILE2"
then
echo "File not changed, no bug report submitted."
exit
fi
echo $n "Send bug report to ${BUGADDR}? [y/n] $c"
read ans
case "$ans" in
[Nn]*) exit 0 ;;
esac
${RMAIL} $SMARGS < "$TEMPFILE1" || {
cat "$TEMPFILE1" >> $HOME/dead.bashbug
echo "$0: mail to ${BUGADDR} failed: report saved in $HOME/dead.bashbug" >&2
echo "$0: please send it manually to ${BUGADDR}" >&2
}
exit 0

BIN
Full/system/xbin/col.arm Executable file

Binary file not shown.

BIN
Full/system/xbin/col.x86 Executable file

Binary file not shown.

BIN
Full/system/xbin/colcrt.arm Executable file

Binary file not shown.

BIN
Full/system/xbin/colcrt.x86 Executable file

Binary file not shown.

BIN
Full/system/xbin/colrm.arm Executable file

Binary file not shown.

BIN
Full/system/xbin/colrm.x86 Executable file

Binary file not shown.

BIN
Full/system/xbin/column.arm Executable file

Binary file not shown.

BIN
Full/system/xbin/column.x86 Executable file

Binary file not shown.

BIN
Full/system/xbin/findfs.arm Executable file

Binary file not shown.

BIN
Full/system/xbin/findfs.x86 Executable file

Binary file not shown.

BIN
Full/system/xbin/findmnt.arm Executable file

Binary file not shown.

BIN
Full/system/xbin/findmnt.x86 Executable file

Binary file not shown.

BIN
Full/system/xbin/hexdump.arm Executable file

Binary file not shown.

BIN
Full/system/xbin/hexdump.x86 Executable file

Binary file not shown.

23
Full/system/xbin/less Executable file
View File

@ -0,0 +1,23 @@
#!/system/bin/sh
# less: wrapper to set up and run less from terminal
# osm0sis @ xda-developers
# adopted to less setialpha @ xda-developers
dir="$(cd "$(dirname "$0")"; pwd)"
if [ "$1" == "--term" ]; then
term=$2
shift 2
else
term=xterm
fi
clear # empty the buffer
# correct the terminal size ;
# some OS' don't ship `resize`
resize &>/dev/null
[[ -d /system/etc/terminfo ]] && \
export TERMINFO=/system/etc/terminfo
TERM=$term ${dir}/less.bin $*

Some files were not shown because too many files have changed in this diff Show More