diff --git a/LICENSE b/LICENSE index 7abc126..d159169 100644 --- a/LICENSE +++ b/LICENSE @@ -290,8 +290,8 @@ to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - The application is an BusyBox installer for Android. - Copyright (C) 2015 Anton Skshidlevsky + + Copyright (C) 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 @@ -312,23 +312,28 @@ Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - BusyBox Copyright (C) 2012 Anton Skshidlevsky - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/README.md b/README.md index 8b7392f..67729ee 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,22 @@ # BusyBox -Copyright (C) 2015-2022 Anton Skshidlevsky, GPLv2 +Copyright (C) 2015 Anton Skshidlevsky, GPLv2 -This application is an BusyBox installer for Android. +This application is a BusyBox installer for Android. [BusyBox](http://busybox.net) combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete environment for any small or embedded system. -The app is available for download in Google Play and GitHub. +The app is available for download on Google Play and GitHub: Get it on Google Play Get it on Github +**Requirements**: + +- Device with architecture arm, arm64, x86, x86_64 +- Android 5 (API 21) or later +- Superuser permissions (root) + Latest BusyBox v1.34.1, supported 378 applets: [, [[, acpid, adjtimex, ar, arch, arp, ascii, ash, awk, base32, base64, basename, @@ -48,15 +54,3 @@ Latest BusyBox v1.34.1, supported 378 applets: unexpand, uniq, unix2dos, unlink, unlzma, unlzop, unshare, unxz, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, volname, watch, watchdog, wc, wget, which, whoami, whois, xargs, xxd, xz, xzcat, yes, zcat, zcip - -**Requirements**: - -* Device with architecture arm, arm64, x86, x86_64 -* Android 8 (API 26) or later -* Superuser permissions (root) - -**References**: - -* [Source code](https://github.com/meefik/busybox) -* [Releases](https://github.com/meefik/busybox/releases) -* [Donations](https://meefik.github.io/donate) diff --git a/app/build.gradle b/app/build.gradle index 8d126d1..1866080 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,14 +1,14 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 31 - buildToolsVersion '31.0.0' + compileSdkVersion 33 + buildToolsVersion '33.0.2' defaultConfig { applicationId 'ru.meefik.busybox' - minSdkVersion 26 - targetSdkVersion 31 - versionCode 51 + minSdkVersion 21 + targetSdkVersion 33 + versionCode 52 versionName '1.34.1' } buildTypes { @@ -18,21 +18,24 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } - lintOptions { - disable 'MissingTranslation' - disable 'ExtraTranslation' - } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } packagingOptions { - doNotStrip '**/*' - exclude 'jniLibs/all/*' jniLibs { useLegacyPackaging true + keepDebugSymbols += ['**/*'] + excludes += ['jniLibs/all/*'] + } + resources { + excludes += ['jniLibs/all/*'] } } + namespace 'ru.meefik.busybox' + lint { + disable 'MissingTranslation', 'ExtraTranslation' + } } repositories { @@ -40,8 +43,8 @@ repositories { } dependencies { - implementation 'androidx.appcompat:appcompat:1.4.0' - implementation 'com.github.topjohnwu.libsu:core:3.2.1' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.github.topjohnwu.libsu:core:5.0.5' } tasks.matching { it.name == "extractReleaseNativeSymbolTables" }.configureEach { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index f371200..7e51f19 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ @@ -21,7 +20,6 @@ diff --git a/app/src/main/_libs/all/addon_d.sh b/app/src/main/_libs/all/addon_d.sh deleted file mode 100644 index f495448..0000000 --- a/app/src/main/_libs/all/addon_d.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/sbin/sh -# -# /system/addon.d/99-busybox.sh -# Backup and restore busybox -# - -. /tmp/backuptool.functions - -do_action() { - action="$1" - bb_install=$(cat "$2") - bb="$bb_install/busybox" - - [ -z "$bb_install" ] && exit 1 - - if [ "$action" = "backup" ]; then - local_bb="$bb" - [ ! -f "$local_bb" ] && exit 1 - backup_file "$bb" - backup_file "$bb_install/ssl_helper" - echo "$bb_install" > /tmp/busybox-install-dir - elif [ "$action" = "restore" ]; then - local_bb="$C/$bb" - [ ! -f "$local_bb" ] && exit 1 - restore_file "$bb" - restore_file "$bb_install/ssl_helper" - fi - - "$local_bb" --list | while read applet; do - file="$bb_install/$applet" - - if [ "$action" = "backup" ]; then - link=$(readlink -f "$file") - [ -f "$file" -a "$link" = "$bb" ] && backup_file "$file" - elif [ "$action" = "restore" ]; then - [ -f "$C/$file" ] && restore_file "$file" - fi - done -} - -case "$1" in - backup) - do_action backup "$S/addon.d/busybox-install-dir" - ;; - - restore) - do_action restore "/tmp/busybox-install-dir" - ;; - - pre-backup) - # Stub - ;; - post-backup) - # Stub - ;; - pre-restore) - # Stub - ;; - post-restore) - # Stub - ;; -esac diff --git a/app/src/main/_libs/all/info.sh b/app/src/main/_libs/all/info.sh deleted file mode 100644 index 5446da0..0000000 --- a/app/src/main/_libs/all/info.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/system/bin/sh -# BusyBox information -# (c) 2015-2022 Anton Skshidlevsky , GPLv3 - -[ "$TRACE_MODE" != "true" ] || set -x - -printf "System:\n" -DEVICE=$(getprop ro.product.model) -printf "* device: $DEVICE\n" -ANDROID=$(getprop ro.build.version.release) -printf "* android: $ANDROID\n" -ARCH=$(uname -m) -printf "* architecture: $ARCH\n" -if test -d /system/addon.d -then - printf "* addon.d: supported\n" -else - printf "* addon.d: unsupported\n" -fi - -printf "\nLatest BusyBox:\n" -BB_BIN=$(which busybox.so) -BB_VERSION=$($BB_BIN| head -1 | awk '{print $2}') -printf "* version: $BB_VERSION\n" -BB_APPLETS=$($BB_BIN --list | wc -l) -printf "* applets: $BB_APPLETS items\n" -BB_SIZE=$(stat -c '%s' "$BB_BIN") -printf "* size: $BB_SIZE bytes\n" -BB_MD5=$(md5sum "$BB_BIN" | awk '{print $1}') -printf "* md5: $BB_MD5\n" -if test -e "$(which ssl_helper.so)" -then - printf "* ssl_helper: yes\n" -else - printf "* ssl_helper: no\n" -fi - -printf "\nInstalled BusyBox:\n" -if test -e "$INSTALL_DIR/busybox" -then - BB_PATH="$INSTALL_DIR" -elif test -e "/system/bin/busybox" -then - BB_PATH="/system/bin" -elif test -e "/system/xbin/busybox" -then - BB_PATH="/system/xbin" -fi -BB_BIN="$BB_PATH/busybox" -if test -e "$BB_BIN" -then - printf "* location: $BB_PATH\n" - BB_VERSION=$("$BB_BIN" | head -1 | awk '{print $2}') - printf "* version: $BB_VERSION\n" - BB_APPLETS=$("$BB_BIN" --list | wc -l) - printf "* applets: $BB_APPLETS items\n" - BB_SIZE=$(stat -c '%s' "$BB_BIN") - printf "* size: $BB_SIZE bytes\n" - BB_MD5=$(md5sum "$BB_BIN" | awk '{print $1}') - printf "* md5: $BB_MD5\n" - if test -e "$BB_PATH/ssl_helper" - then - printf "* ssl_helper: yes\n" - else - printf "* ssl_helper: no\n" - fi - if test -d /system/addon.d - then - if test -f /system/addon.d/99-busybox.sh - then - printf "* addon.d: yes\n" - else - printf "* addon.d: no\n" - fi - fi -else - printf "* not installed\n" -fi diff --git a/app/src/main/_libs/all/install.sh b/app/src/main/_libs/all/install.sh deleted file mode 100644 index 3b85a1a..0000000 --- a/app/src/main/_libs/all/install.sh +++ /dev/null @@ -1,113 +0,0 @@ -#!/system/bin/sh -# BusyBox installer -# (c) 2015-2022 Anton Skshidlevsky , GPLv3 - -[ "$TRACE_MODE" != "true" ] || set -x - -echo "### BEGIN INSTALL" -echo - -IS_SYSTEM_DIR=$(printf "$INSTALL_DIR" | grep -c "^/system/") - -if test "$MOUNT_RAMDISK" = "true" -then - IS_RAM=$(grep -c "^tmpfs $INSTALL_DIR" /proc/mounts) - if test "$IS_RAM" -eq 0 - then - printf "Mounting $INSTALL_DIR as tmpfs ... " - mount -o size=50M -t tmpfs tmpfs "$INSTALL_DIR" - if test $? -eq 0 - then - printf "done\n" - else - printf "fail\n" - fi - fi -elif test "$IS_SYSTEM_DIR" -gt 0 -then - printf "Remounting /system to rw ... " - mount -o rw,remount /system 2>/dev/null || mount -o rw,remount / 2>/dev/null - if test $? -eq 0 - then - printf "done\n" - else - printf "fail\n" - fi -fi - -for fn in busybox ssl_helper -do - printf "Copying $fn to $INSTALL_DIR ... " - SOURCE_BIN=$(which $fn.so) - if test -e "$INSTALL_DIR/$fn" - then - rm "$INSTALL_DIR/$fn" - fi - cp "$SOURCE_BIN" "$INSTALL_DIR/$fn" - if test $? -eq 0 - then - printf "done\n" - else - printf "fail\n" - fi - - printf "Changing permissions for $fn ... " - chown 0:0 "$INSTALL_DIR/$fn" - chmod 755 "$INSTALL_DIR/$fn" - if test $? -eq 0 - then - printf "done\n" - else - printf "fail\n" - fi -done - -if test "$REPLACE_APPLETS" = "true" -then - printf "Removing old applets ... " - #busybox.so --list | xargs -I APPLET rm $INSTALL_DIR/APPLET - busybox.so --list | grep -v busybox | while read fn - do - if test -e "$INSTALL_DIR/$fn" -o -L "$INSTALL_DIR/$fn" - then - rm "$INSTALL_DIR/$fn" - fi - done - if test $? -eq 0 - then - printf "done\n" - else - printf "fail\n" - fi -fi - -if test "$INSTALL_APPLETS" = "true" -then - printf "Installing new applets ... " - "$INSTALL_DIR/busybox" --install -s "$INSTALL_DIR" - if test $? -eq 0 - then - printf "done\n" - else - printf "fail\n" - fi -fi - -if test "$IS_SYSTEM_DIR" -gt 0 -a -d /system/addon.d -a "$MOUNT_RAMDISK" != "true" -then - printf "Installing addon.d script ... " - echo "$INSTALL_DIR" > /system/addon.d/busybox-install-dir - chmod 644 /system/addon.d/busybox-install-dir - cp $(which addon_d.so) /system/addon.d/99-busybox.sh - chown 0:0 /system/addon.d/99-busybox.sh - chmod 755 /system/addon.d/99-busybox.sh - if test $? -eq 0 - then - printf "done\n" - else - printf "fail\n" - fi -fi - -echo -echo "### END INSTALL" diff --git a/app/src/main/_libs/all/recovery.sh b/app/src/main/_libs/all/recovery.sh deleted file mode 100644 index 691b3a9..0000000 --- a/app/src/main/_libs/all/recovery.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/sbin/sh -INSTALL_DIR=/system/xbin -archive=$3 -fdout=/proc/self/fd/$2 -ui_print() -{ - echo "ui_print $1" > $fdout - echo "ui_print" > $fdout -} -ui_print "Making a temporary directory..." -mkdir -p /tmp/busybox -cd /tmp/busybox -unzip -o $archive -ui_print "Mounting /system part..." -mount /system -ui_print "Removing BusyBox from $INSTALL_DIR..." -for link in $(find $INSTALL_DIR -type l) -do - if readlink $link | grep busybox - then - rm $link - fi -done -for fn in busybox ssl_helper -do - if [ -e $INSTALL_DIR/$fn ] - then - rm $INSTALL_DIR/$fn - fi -done -ui_print "Installing BusyBox to $INSTALL_DIR..." -for fn in busybox ssl_helper -do - cp $fn $INSTALL_DIR - chmod 755 $INSTALL_DIR/$fn -done -$INSTALL_DIR/busybox --install -s $INSTALL_DIR -if [ -d /system/addon.d ]; then - cp addon_d.sh /system/addon.d/99-busybox.sh - chmod 755 /system/addon.d/99-busybox.sh - echo "$INSTALL_DIR" > /system/addon.d/busybox-install-dir - chmod 644 /system/addon.d/busybox-install-dir -fi -ui_print "Unmounting /system part..." -umount /system -exit 0 diff --git a/app/src/main/_libs/all/remove.sh b/app/src/main/_libs/all/remove.sh deleted file mode 100644 index 78156a1..0000000 --- a/app/src/main/_libs/all/remove.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/system/bin/sh -# BusyBox uninstaller -# (c) 2015-2022 Anton Skshidlevsky , GPLv3 - -[ "$TRACE_MODE" != "true" ] || set -x - -echo "### BEGIN REMOVE" -echo - -if test "$MOUNT_RAMDISK" = "true" -then - IS_RAM=$(grep -c "^tmpfs $INSTALL_DIR" /proc/mounts) - printf "Unmounting $INSTALL_DIR as tmpfs ... " - if test "$IS_RAM" -gt 0 - then - umount "$INSTALL_DIR" - if test $? -eq 0 - then - printf "done\n" - else - printf "fail\n" - fi - else - printf "skip\n" - fi -else - IS_SYSTEM_DIR=$(printf "$INSTALL_DIR" | grep -c "^/system/") - - if test "$IS_SYSTEM_DIR" -gt 0 - then - printf "Remounting /system to rw ... " - mount -o rw,remount /system 2>/dev/null || mount -o rw,remount / 2>/dev/null - if test $? -eq 0 - then - printf 'done\n' - else - printf 'fail\n' - fi - fi - - printf "Removing BusyBox from $INSTALL_DIR: \n" - if test -d "$INSTALL_DIR" - then - for fn in busybox ssl_helper - do - printf "* $fn ... " - if test -e "$INSTALL_DIR/$fn" - then - rm "$INSTALL_DIR/$fn" - fi - if test $? -eq 0 - then - printf "done\n" - else - printf "fail\n" - fi - done - printf "* applets ... " - ls "$INSTALL_DIR" | while read f - do - if test "$(readlink $INSTALL_DIR/$f)" = "$INSTALL_DIR/busybox" - then - rm "$INSTALL_DIR/$f" - fi - done - if test $? -eq 0 - then - printf "done\n" - else - printf "fail\n" - fi - else - printf "... path not found.\n" - fi - - if test -e /system/addon.d/99-busybox.sh - then - printf "Removing addon.d script ... " - rm /system/addon.d/busybox-install-dir - rm /system/addon.d/99-busybox.sh - if test $? -eq 0 - then - printf "done\n" - else - printf "fail\n" - fi - fi -fi - -echo -echo "### END REMOVE" diff --git a/app/src/main/_libs/arm64-v8a/busybox b/app/src/main/_libs/arm64-v8a/busybox deleted file mode 100755 index ae75449..0000000 Binary files a/app/src/main/_libs/arm64-v8a/busybox and /dev/null differ diff --git a/app/src/main/_libs/arm64-v8a/ssl_helper b/app/src/main/_libs/arm64-v8a/ssl_helper deleted file mode 100755 index 8ad3885..0000000 Binary files a/app/src/main/_libs/arm64-v8a/ssl_helper and /dev/null differ diff --git a/app/src/main/_libs/armeabi-v7a/busybox b/app/src/main/_libs/armeabi-v7a/busybox deleted file mode 100755 index 2862eaf..0000000 Binary files a/app/src/main/_libs/armeabi-v7a/busybox and /dev/null differ diff --git a/app/src/main/_libs/armeabi-v7a/ssl_helper b/app/src/main/_libs/armeabi-v7a/ssl_helper deleted file mode 100755 index dbb8ccb..0000000 Binary files a/app/src/main/_libs/armeabi-v7a/ssl_helper and /dev/null differ diff --git a/app/src/main/_libs/x86/busybox b/app/src/main/_libs/x86/busybox deleted file mode 100755 index 961803a..0000000 Binary files a/app/src/main/_libs/x86/busybox and /dev/null differ diff --git a/app/src/main/_libs/x86/ssl_helper b/app/src/main/_libs/x86/ssl_helper deleted file mode 100755 index 9c8de07..0000000 Binary files a/app/src/main/_libs/x86/ssl_helper and /dev/null differ diff --git a/app/src/main/_libs/x86_64/busybox b/app/src/main/_libs/x86_64/busybox deleted file mode 100755 index 5d100c7..0000000 Binary files a/app/src/main/_libs/x86_64/busybox and /dev/null differ diff --git a/app/src/main/_libs/x86_64/ssl_helper b/app/src/main/_libs/x86_64/ssl_helper deleted file mode 100755 index 3eb32f5..0000000 Binary files a/app/src/main/_libs/x86_64/ssl_helper and /dev/null differ diff --git a/app/src/main/busybox-banner.png b/app/src/main/busybox-banner.png index 4aa022c..d3421b2 100644 Binary files a/app/src/main/busybox-banner.png and b/app/src/main/busybox-banner.png differ diff --git a/app/src/main/java/ru/meefik/busybox/AboutActivity.java b/app/src/main/java/ru/meefik/busybox/AboutActivity.java index fcd7624..3f8a0af 100644 --- a/app/src/main/java/ru/meefik/busybox/AboutActivity.java +++ b/app/src/main/java/ru/meefik/busybox/AboutActivity.java @@ -25,4 +25,5 @@ public void onResume() { super.onResume(); setTitle(R.string.title_activity_about); } + } diff --git a/app/src/main/java/ru/meefik/busybox/AssetsUtils.java b/app/src/main/java/ru/meefik/busybox/AssetUtils.java similarity index 71% rename from app/src/main/java/ru/meefik/busybox/AssetsUtils.java rename to app/src/main/java/ru/meefik/busybox/AssetUtils.java index 14eb835..d28fce9 100644 --- a/app/src/main/java/ru/meefik/busybox/AssetsUtils.java +++ b/app/src/main/java/ru/meefik/busybox/AssetUtils.java @@ -5,9 +5,6 @@ import android.system.ErrnoException; import android.system.Os; -import com.topjohnwu.superuser.CallbackList; -import com.topjohnwu.superuser.Shell; - import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.Closeable; @@ -18,15 +15,19 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.util.List; +import java.util.Objects; + +class AssetUtils { -class AssetsUtils { final private Context context; - final private Logger logger; - AssetsUtils(Context context, Logger logger) { + /** + * AssetsUtils constructor + * + * @param context application context + */ + AssetUtils(Context context) { this.context = context; - this.logger = logger; } /** @@ -34,7 +35,7 @@ class AssetsUtils { * * @param c closable object */ - static void close(Closeable c) { + private void close(Closeable c) { if (c != null) { try { c.close(); @@ -51,7 +52,7 @@ static void close(Closeable c) { * @param path path to asset file * @return false if error */ - boolean extractFile(String rootAsset, String path) { + private void extractFile(String rootAsset, String path) { AssetManager assetManager = context.getAssets(); InputStream in = null; OutputStream out = null; @@ -66,13 +67,11 @@ boolean extractFile(String rootAsset, String path) { } out.flush(); } catch (IOException e) { - e.printStackTrace(); - return false; + // ignore } finally { close(in); close(out); } - return true; } /** @@ -82,7 +81,7 @@ boolean extractFile(String rootAsset, String path) { * @param path path to asset directory * @return false if error */ - boolean extractDir(String rootAsset, String path) { + private boolean extractDir(String rootAsset, String path) { AssetManager assetManager = context.getAssets(); try { String[] assets = assetManager.list(rootAsset + path); @@ -96,7 +95,7 @@ boolean extractDir(String rootAsset, String path) { if (!extractDir(rootAsset, path + "/" + asset)) return false; } } else { - if (!extractFile(rootAsset, path)) return false; + extractFile(rootAsset, path); } } catch (IOException e) { e.printStackTrace(); @@ -110,7 +109,7 @@ boolean extractDir(String rootAsset, String path) { * * @param path path to directory */ - void cleanDirectory(File path) { + private void cleanDirectory(File path) { if (path == null) return; if (path.exists()) { File[] list = path.listFiles(); @@ -127,7 +126,7 @@ void cleanDirectory(File path) { * * @param path path to directory */ - void setPermissions(File path) { + private void setPermissions(File path) { if (path == null) return; if (path.exists()) { path.setReadable(true, false); @@ -147,7 +146,7 @@ void setPermissions(File path) { * * @return false if error */ - boolean setVersion() { + private boolean setVersion() { boolean result = false; String f = PrefStore.getFilesDir(context) + "/version"; BufferedWriter bw = null; @@ -168,7 +167,7 @@ boolean setVersion() { * * @return false if error */ - boolean isLatestVersion() { + private boolean isLatestVersion() { File f = new File(PrefStore.getFilesDir(context) + "/version"); if (!f.exists()) return false; BufferedReader br = null; @@ -191,73 +190,57 @@ boolean isLatestVersion() { * @return false if error */ boolean extractAssets() { - if (isLatestVersion()) return true; + if (isLatestVersion()) return false; // prepare bin directory String binDir = PrefStore.getFilesDir(context) + "/bin"; - File fd = new File(binDir); - if (!fd.exists()) { - if (!fd.mkdirs()) return false; + File binFd = new File(binDir); + if (!binFd.exists()) { + if (!binFd.mkdirs()) return false; } - cleanDirectory(fd); + cleanDirectory(binFd); - // create .nomedia - File noMediaFd = new File(PrefStore.getFilesDir(context) + "/.nomedia"); - if (!noMediaFd.exists()) { - try { - noMediaFd.createNewFile(); - } catch (IOException e) { - e.printStackTrace(); - } + // extract assets + if (!extractDir("all", "")) { + return false; } - - // create symlink to busybox - String libDir = PrefStore.getLibDir(context); - File busybox = new File(binDir + "/busybox"); - if (!busybox.exists()) { - try { - Os.symlink(libDir + "/libbusybox.so", binDir + "/busybox"); - } catch (ErrnoException e) { - e.printStackTrace(); - } + String mArch = PrefStore.getArch(); + if (!extractDir(mArch, "")) { + return false; } - // create symlink to ssl_helper - File sslHelper = new File(binDir + "/ssl_helper"); - if (!sslHelper.exists()) { + // create symlinks for libs + String libDir = PrefStore.getLibDir(context); + File libFd = new File(libDir); + File [] files = libFd.listFiles(); + for (int i = 0; i < Objects.requireNonNull(files).length; i++) { + File f = files[i]; + String libName = f.getName(); + String binName = libName + .replaceAll("^lib","") + .replaceAll ("\\.so$", ""); try { - Os.symlink(libDir + "/libssl_helper.so", binDir + "/ssl_helper"); + File targetFd = new File(binDir + "/" + binName); + targetFd.delete(); + Os.symlink(libDir + "/" + libName, binDir + "/" + binName); } catch (ErrnoException e) { e.printStackTrace(); + return false; } } - // extract assets - extractDir("all", ""); - String mArch = PrefStore.getArch(); - switch (mArch) { - case "arm": - extractDir("arm", ""); - break; - case "arm64": - extractDir("arm64", ""); - break; - case "x86": - extractDir("x86", ""); - break; - case "x86_64": - extractDir("x86_64", ""); - break; + // create .nomedia + File noMediaFd = new File(PrefStore.getFilesDir(context) + "/.nomedia"); + try { + noMediaFd.createNewFile(); + } catch (IOException ignored) { } // set permissions - setPermissions(fd); - - // install applets - String cmd = String.format("busybox --install -s %s", binDir); - Shell.sh(cmd).exec(); + setPermissions(binFd); // update version return setVersion(); } -} \ No newline at end of file + +} diff --git a/app/src/main/java/ru/meefik/busybox/BaseActivity.java b/app/src/main/java/ru/meefik/busybox/BaseActivity.java index 80c8c33..c3d30b3 100644 --- a/app/src/main/java/ru/meefik/busybox/BaseActivity.java +++ b/app/src/main/java/ru/meefik/busybox/BaseActivity.java @@ -16,4 +16,5 @@ protected void onCreate(Bundle savedInstanceState) { public void setTheme(int resId) { super.setTheme(PrefStore.getTheme(this)); } -} \ No newline at end of file + +} diff --git a/app/src/main/java/ru/meefik/busybox/BasePreferenceActivity.java b/app/src/main/java/ru/meefik/busybox/BasePreferenceActivity.java index 8ee3104..1f8b035 100644 --- a/app/src/main/java/ru/meefik/busybox/BasePreferenceActivity.java +++ b/app/src/main/java/ru/meefik/busybox/BasePreferenceActivity.java @@ -1,18 +1,3 @@ -/* - * Copyright (C) 2014 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. - */ package ru.meefik.busybox; import android.content.SharedPreferences; @@ -40,6 +25,7 @@ */ public abstract class BasePreferenceActivity extends PreferenceActivity implements SharedPreferences.OnSharedPreferenceChangeListener, Preference.OnPreferenceClickListener { + private AppCompatDelegate mDelegate; @Override @@ -120,6 +106,11 @@ public void onConfigurationChanged(Configuration newConfig) { getDelegate().onConfigurationChanged(newConfig); } + @Override + public boolean onPreferenceClick(Preference preference) { + return false; + } + @Override protected void onStop() { super.onStop(); @@ -152,4 +143,5 @@ private AppCompatDelegate getDelegate() { } return mDelegate; } -} \ No newline at end of file + +} diff --git a/app/src/main/java/ru/meefik/busybox/Logger.java b/app/src/main/java/ru/meefik/busybox/Logger.java index f404e12..c2599a1 100644 --- a/app/src/main/java/ru/meefik/busybox/Logger.java +++ b/app/src/main/java/ru/meefik/busybox/Logger.java @@ -1,124 +1,122 @@ package ru.meefik.busybox; import android.content.Context; -import android.text.method.LinkMovementMethod; -import android.util.TypedValue; -import android.view.View; -import android.widget.ScrollView; -import android.widget.TextView; -import java.io.BufferedWriter; -import java.io.Closeable; -import java.io.FileWriter; +import java.io.FileOutputStream; import java.io.IOException; import java.text.SimpleDateFormat; +import java.util.ArrayList; import java.util.Date; +import java.util.List; import java.util.Locale; -class Logger { +public class Logger { - final private Context context; - final private TextView output; - final private ScrollView scroll; - - /** - * Logger constructor - * - * @param context - * @param output - * @param scroll - */ - Logger(Context context, TextView output, ScrollView scroll) { - this.context = context; - this.output = output; - this.scroll = scroll; - // enable context clickable - output.setMovementMethod(LinkMovementMethod.getInstance()); -// output.setMaxLines(PrefStore.getMaxLines(context)); - output.setTextSize(TypedValue.COMPLEX_UNIT_SP, PrefStore.getFontSize(context)); - } + private static final List protocol = new ArrayList<>(); + private static boolean fragment = false; /** * Generate timestamp * * @return timestamp */ - private String getTimeStamp() { + private static String getTimeStamp() { return "[" + new SimpleDateFormat("HH:mm:ss", Locale.ENGLISH).format(new Date()) + "] "; } /** * Append the message to protocol and show * - * @param line message + * @param c context + * @param msg message */ - public synchronized void log(final String line) { - if (line.length() == 0) return; - // show line - appendLine(line); - // write log to file - if (PrefStore.isLogger(context)) { - write(line); + private static synchronized void appendMessage(final Context c, final String msg) { + final int msgLength = msg.length(); + if (msgLength > 0) { + final boolean timestamp = PrefStore.isTimestamp(c); + String[] tokens = {""}; + if (!"\n".equals(msg)) { + tokens = msg.split("\\n"); + } + int lastIndex = protocol.size() - 1; + for (int i = 0, l = tokens.length; i < l; i++) { + String token = tokens[i]; + // update last record from List if fragment + if (i == 0 && fragment && lastIndex >= 0) { + String last = protocol.get(lastIndex); + protocol.set(lastIndex, last + token); + continue; + } + // add the message to List + if (timestamp) protocol.add(getTimeStamp() + token); + else protocol.add(token); + // remove first line if overflow + if (protocol.size() > PrefStore.getMaxLines(c)) { + protocol.remove(0); + } + } + // set fragment + fragment = (msg.charAt(msgLength - 1) != '\n'); + // show log + MainActivity.showLog(get()); + // save the message to file + if (PrefStore.isLogger(c)) { + saveToFile(c, msg); + } } } /** - * Clear protocol + * Append message to file + * + * @param c context + * @param msg message */ - void clear() { - output.setText(""); + private static void saveToFile(Context c, String msg) { + byte[] data = msg.getBytes(); + FileOutputStream fos = null; + try { + fos = new FileOutputStream(PrefStore.getLogFile(c), true); + fos.write(data); + fos.flush(); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (fos != null) { + try { + fos.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } } /** - * Show log on main activity - * - * @param line + * Clear protocol */ - private void appendLine(String line) { - output.post(() -> { - if (PrefStore.isTimestamp(context)) { - output.append(getTimeStamp() + line); - } else { - output.append(line); - } - // scroll TextView to bottom - scroll.post(() -> { - scroll.fullScroll(View.FOCUS_DOWN); - scroll.clearFocus(); - }); - }); + static void clear() { + protocol.clear(); + fragment = false; } /** - * Closeable helper + * Get protocol * - * @param c closable object + * @return protocol as text */ - private void close(Closeable c) { - if (c != null) { - try { - c.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } + static String get() { + return android.text.TextUtils.join("\n", protocol); } /** - * Write to log file + * Append message to protocol * + * @param c context * @param msg message */ - private void write(String msg) { - String logFile = PrefStore.getLogFile(context); - BufferedWriter writer = null; - try { - writer = new BufferedWriter(new FileWriter(logFile, true)); - writer.write(msg); - } catch (IOException e) { - e.printStackTrace(); - } finally { - close(writer); - } + static void log(Context c, String msg) { + appendMessage(c, msg); } + } diff --git a/app/src/main/java/ru/meefik/busybox/MainActivity.java b/app/src/main/java/ru/meefik/busybox/MainActivity.java index 23997fe..9db105c 100644 --- a/app/src/main/java/ru/meefik/busybox/MainActivity.java +++ b/app/src/main/java/ru/meefik/busybox/MainActivity.java @@ -2,10 +2,13 @@ import android.Manifest; import android.annotation.SuppressLint; +import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Bundle; import android.os.Environment; +import android.text.method.LinkMovementMethod; +import android.util.TypedValue; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -34,9 +37,8 @@ public class MainActivity extends BaseActivity { - private static final int REQUEST_WRITE_STORAGE = 112; - private Logger logger; - private AssetsUtils assets; + public static TextView output; + public static ScrollView scroll; static { Shell.enableVerboseLogging = BuildConfig.DEBUG; @@ -49,22 +51,57 @@ public class MainActivity extends BaseActivity { ); } + /** + * Show message in TextView, used from Logger + * + * @param log message + */ + public static void showLog(final String log) { + // show log in TextView + output.post(() -> { + output.setText(log); + // scroll TextView to bottom + scroll.post(() -> { + scroll.fullScroll(View.FOCUS_DOWN); + scroll.clearFocus(); + }); + }); + } + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); - TextView output = findViewById(R.id.outputView); - ScrollView scroll = findViewById(R.id.scrollView); + scroll = findViewById(R.id.scrollView); + output = findViewById(R.id.outputView); + // enable context clickable + output.setMovementMethod(LinkMovementMethod.getInstance()); + AssetUtils assets = new AssetUtils(this); + + String binDir = PrefStore.getFilesDir(this) + "/bin"; Shell.getShell(shell -> { - logger = new Logger(this, output, scroll); - assets = new AssetsUtils(this, logger); - assets.extractAssets(); + if (assets.extractAssets()) { + String cmd = String.format("busybox --install -s %s", binDir); + Shell.cmd(cmd).exec(); + } execScript("info.sh", false); }); } + @Override + public void onResume() { + super.onResume(); + // restore font size + output.setTextSize(TypedValue.COMPLEX_UNIT_SP, PrefStore.getFontSize(this)); + // restore logs + String log = Logger.get(); + if (log.length() > 0) { + showLog(log); + } + } + @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); @@ -121,27 +158,32 @@ public void removeBtnOnClick(final View view) { /** * Execute a shell script. - * @param script shell script + * + * @param script shell script * @param root from superuser */ private void execScript(String script, Boolean root) { - logger.clear(); + Logger.clear(); + String traceMode = String.format("export TRACE_MODE=\"%s\"", PrefStore.isTraceMode(this)); + String installDir = String.format("export INSTALL_DIR=\"%s\"", PrefStore.getInstallDir(this)); + String ramDisk = String.format("export MOUNT_RAMDISK=\"%s\"", PrefStore.isRamDisk(this)); + String replaceApplets = String.format("export REPLACE_APPLETS=\"%s\"", PrefStore.isReplaceApplets(this)); + String installApplets = String.format("export INSTALL_APPLETS=\"%s\"", PrefStore.isInstallApplets(this)); String absoluteScriptPath = PrefStore.getFilesDir(this) + "/bin/" + script; String cmd = String.format("busybox ash \"%s\"", absoluteScriptPath); + Context context = getApplicationContext(); List callbackList = new CallbackList() { @Override public void onAddElement(String s) { - logger.log(s + '\n'); + Logger.log(context, s + '\n'); } }; - if (root) { - if (Shell.rootAccess()) { - Shell.su(cmd).to(callbackList).submit(); - } else { - logger.log("Require superuser privileges (root).\n"); - } + if (root && Boolean.FALSE.equals(Shell.isAppGrantedRoot())) { + Logger.log(this, "Require superuser privileges (root).\n"); } else { - Shell.sh(cmd).to(callbackList).submit(); + Shell.cmd(traceMode, installDir, ramDisk, replaceApplets, installApplets, cmd) + .to(callbackList) + .submit(); } } @@ -255,6 +297,7 @@ private void makeZipArchiveDialog() { * Request permission to write to storage. */ private void requestWritePermissions() { + int REQUEST_WRITE_STORAGE = 112; boolean hasPermission = (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED); if (!hasPermission) { @@ -267,6 +310,7 @@ private void requestWritePermissions() { @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { + int REQUEST_WRITE_STORAGE = 112; super.onRequestPermissionsResult(requestCode, permissions, grantResults); if (requestCode == REQUEST_WRITE_STORAGE) { if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { diff --git a/app/src/main/java/ru/meefik/busybox/PrefStore.java b/app/src/main/java/ru/meefik/busybox/PrefStore.java index b195fb8..2581b43 100644 --- a/app/src/main/java/ru/meefik/busybox/PrefStore.java +++ b/app/src/main/java/ru/meefik/busybox/PrefStore.java @@ -21,6 +21,7 @@ static String getFilesDir(Context c) { } static String getLibDir(Context c) { + // return c.getApplicationInfo().dataDir + "/lib"; return c.getApplicationInfo().nativeLibraryDir; } @@ -296,4 +297,4 @@ static void setLocale(Context c) { c.getResources().updateConfiguration(config, c.getResources().getDisplayMetrics()); } -} \ No newline at end of file +} diff --git a/app/src/main/java/ru/meefik/busybox/SettingsActivity.java b/app/src/main/java/ru/meefik/busybox/SettingsActivity.java index f46339c..656641c 100644 --- a/app/src/main/java/ru/meefik/busybox/SettingsActivity.java +++ b/app/src/main/java/ru/meefik/busybox/SettingsActivity.java @@ -24,30 +24,12 @@ public void onCreate(Bundle savedInstanceState) { initSummaries(getPreferenceScreen()); } - @Override - public boolean onPreferenceClick(Preference preference) { - return false; - } - @Override public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { Preference pref = findPreference(key); setSummary(pref, true); } - /** - * Request permission to write to storage. - */ - private void requestWritePermissions() { - int REQUEST_WRITE_STORAGE = 112; - boolean hasPermission = (ContextCompat.checkSelfPermission(this, - Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED); - if (!hasPermission) { - ActivityCompat.requestPermissions(this, - new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, REQUEST_WRITE_STORAGE); - } - } - /** * Recursive set summaries * @@ -95,4 +77,18 @@ private void setSummary(Preference pref, boolean init) { } } } + + /** + * Request permission to write to storage. + */ + private void requestWritePermissions() { + int REQUEST_WRITE_STORAGE = 112; + boolean hasPermission = (ContextCompat.checkSelfPermission(this, + Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED); + if (!hasPermission) { + ActivityCompat.requestPermissions(this, + new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, REQUEST_WRITE_STORAGE); + } + } + } \ No newline at end of file diff --git a/app/src/main/java/ru/meefik/busybox/ShellInitializer.java b/app/src/main/java/ru/meefik/busybox/ShellInitializer.java index e64f1c2..c324329 100644 --- a/app/src/main/java/ru/meefik/busybox/ShellInitializer.java +++ b/app/src/main/java/ru/meefik/busybox/ShellInitializer.java @@ -7,23 +7,13 @@ import com.topjohnwu.superuser.Shell; public class ShellInitializer extends Shell.Initializer { + @Override public boolean onInit(@NonNull Context context, Shell shell) { String binDir = PrefStore.getFilesDir(context) + "/bin"; String path = String.format("PATH=%s:$PATH", binDir); - String traceMode = String.format("export TRACE_MODE=\"%s\"", PrefStore.isTraceMode(context)); - String installDir = String.format("export INSTALL_DIR=\"%s\"", PrefStore.getInstallDir(context)); - String ramDisk = String.format("export MOUNT_RAMDISK=\"%s\"", PrefStore.isRamDisk(context)); - String replaceApplets = String.format("export REPLACE_APPLETS=\"%s\"", PrefStore.isReplaceApplets(context)); - String installApplets = String.format("export INSTALL_APPLETS=\"%s\"", PrefStore.isInstallApplets(context)); - shell.newJob() - .add(traceMode) - .add(path) - .add(installDir) - .add(ramDisk) - .add(replaceApplets) - .add(installApplets) - .exec(); + shell.newJob().add(path).exec(); return true; } + } diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml index 37dbada..6689b23 100644 --- a/app/src/main/res/menu/menu_main.xml +++ b/app/src/main/res/menu/menu_main.xml @@ -5,12 +5,12 @@ android:id="@+id/action_help" android:title="@string/action_help" app:showAsAction="ifRoom|withText" /> - + diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index 3e1f32d..28eeb85 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -43,7 +43,7 @@ Файл лога Дадатку забаронена запісваць у памяць прылады Загрузка... - Гэты дадатак – усталёўшчык BusyBox для Android.\n\nBusyBox змяшчае ў сабе маленькія версіі утыліт UNIX. Гэта адпаведнікі многіх утыліт з GNU fileutils, shellutils, і т. п. Утыліты з BusyBox менш фукцыянальныя, аднак сумяшчальныя з функцыямі утыліт GNU. BusyBox прадстаўляе неблагое асяроддзе для большасці мабільных сістэм.\n\nЗа дадатковай інфармацыяй наведайце сайт праекта, форум альбо сайт распрацоўшчыка.\n\n© 2015–2022 Anton Skshidlevsky, GPLv2 + Гэты дадатак – усталёўшчык BusyBox для Android.\n\nBusyBox змяшчае ў сабе маленькія версіі утыліт UNIX. Гэта адпаведнікі многіх утыліт з GNU fileutils, shellutils, і т. п. Утыліты з BusyBox менш фукцыянальныя, аднак сумяшчальныя з функцыямі утыліт GNU. BusyBox прадстаўляе неблагое асяроддзе для большасці мабільных сістэм.\n\nЗа дадатковай інфармацыяй наведайце сайт праекта альбо сайт распрацоўшчыка.\n\n© 2015 Anton Skshidlevsky, GPLv2 Цёмная diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 65040cc..0cd254b 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -43,7 +43,7 @@ Log Datei Die App war nicht berechtigt auf deinen Speicher zu schreiben Läd... - Diese Anwendung ist ein BusyBox Installer für Android.\n\nBusyBox kombiniert kleine Versionen vieler üblicher UNIX Werkzeuge in eine einzige kleine ausführbare Datei. Es bietet Ersatz für die meisten der Werkzeuge, die du normalerweise in GNU fileutils, shellutils, usw. findest. Die Werkzeuge in BusyBox haben normalerweise weniger Optionen als ihre vollfunktionalen GNU Pendante; Dennoch, die Optionen, die enthalten sind bieten die erwartete Funktionalität und verhalten sich sehr, wie ihre GNU Pendante. BusyBox bietet eine nahezu komplette Umgebung für jedes kleine oder integrierte System.\n\nFür mehr Informationen siehe auf die Projekt Seite, das Forum oder die Entwickler-Seite.\n\n© 2015–2022 Anton Skshidlevsky, GPLv2 + Diese Anwendung ist ein BusyBox Installer für Android.\n\nBusyBox kombiniert kleine Versionen vieler üblicher UNIX Werkzeuge in eine einzige kleine ausführbare Datei. Es bietet Ersatz für die meisten der Werkzeuge, die du normalerweise in GNU fileutils, shellutils, usw. findest. Die Werkzeuge in BusyBox haben normalerweise weniger Optionen als ihre vollfunktionalen GNU Pendante; Dennoch, die Optionen, die enthalten sind bieten die erwartete Funktionalität und verhalten sich sehr, wie ihre GNU Pendante. BusyBox bietet eine nahezu komplette Umgebung für jedes kleine oder integrierte System.\n\nFür mehr Informationen siehe auf die Projekt Seite oder die Entwickler-Seite.\n\n© 2015 Anton Skshidlevsky, GPLv2 Dunkel diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 225be2d..433e09e 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -43,7 +43,7 @@ Archivo de registro La aplicación no puede escribir en la tarjeta de memoria Cargando... - Esta aplicación es un instalador de Busybos para Android.\n\nBusybox combina algunas versiones de la mayoría de utilidades UNIX dentro de un simple ejecutable. Así puede servir de reemplazo para muchas de las utilidades que tu normalmente buscas en utilidades GNU de archivos y shell. Las utilidades en Busybox generalmente tienen menos opciones que sus versiones completas GNU; de todos modos, las opciones que están incluidas proporcionan la funcionalidad y comportamiento esperados como sus versiones completas GNU. Busybox proporciona un ambiente de variedad completa para cualquier sistema embebido.\n\nPara mas información ver Página del proyecto, forum ó Sitio del desarrollador.\n\n© 2015–2022 Anton Skshidlevsky, GPLv2 + Esta aplicación es un instalador de Busybos para Android.\n\nBusybox combina algunas versiones de la mayoría de utilidades UNIX dentro de un simple ejecutable. Así puede servir de reemplazo para muchas de las utilidades que tu normalmente buscas en utilidades GNU de archivos y shell. Las utilidades en Busybox generalmente tienen menos opciones que sus versiones completas GNU; de todos modos, las opciones que están incluidas proporcionan la funcionalidad y comportamiento esperados como sus versiones completas GNU. Busybox proporciona un ambiente de variedad completa para cualquier sistema embebido.\n\nPara mas información ver Página del proyecto ó Sitio del desarrollador.\n\n© 2015 Anton Skshidlevsky, GPLv2 Oscuro diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 95e13a5..9e750b2 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -43,7 +43,7 @@ Fichier journal L\'application n\'a pas été autorisée à écrire sur votre stockage Chargement... - Cette application est un installateur BusyBox pour Android.\n\nBusyBox combine des versions allégées de nombreux utilitaires UNIX en un seul petit exécutable. Il fournit un remplaçant pour la plupart des utilitaires que vous trouvez habituellement dans GNU fileutils, shellutils, etc. Les utilitaires dans BusyBox ont généralement moins d\'options que leurs cousins GNU complets ; toutefois, les options qui sont incluses fournissent la fonctionnalité attendue et se comportent comme leurs homologues GNU. BusyBox fournit un environnement assez complet pour tout système petit ou intégré.\n\nPour plus d\'informations, aller sur la page du projet, le forum ou le site du développeur.\n\n© 2015–2022 Anton Skshidlevsky, GPLv2 + Cette application est un installateur BusyBox pour Android.\n\nBusyBox combine des versions allégées de nombreux utilitaires UNIX en un seul petit exécutable. Il fournit un remplaçant pour la plupart des utilitaires que vous trouvez habituellement dans GNU fileutils, shellutils, etc. Les utilitaires dans BusyBox ont généralement moins d\'options que leurs cousins GNU complets ; toutefois, les options qui sont incluses fournissent la fonctionnalité attendue et se comportent comme leurs homologues GNU. BusyBox fournit un environnement assez complet pour tout système petit ou intégré.\n\nPour plus d\'informations, aller sur la page du projet ou le site du développeur.\n\n© 2015 Anton Skshidlevsky, GPLv2 Sombre diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index 1bed552..f8c079f 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -43,7 +43,7 @@ 기록 파일 이 앱이 사용자 저장소에 쓰기작업을 할 수 없습니다. 불러오는중... - 이 앱은 Android 에 Busybox 를 설치하는 앱입니다.\n\nusyBox는 하나의 작은 실행파일에 많은 일반적인 유닉스 유틸리티의 작은 버전을 결합한 것입니다. 그것은 일반적으로 GNU fileutils, shellutils 등등에서 찾을 유틸리티의 대부분에 대한 기능을 제공합니다. BusyBox에 유틸리티는 일반적으로 GNU Linux의 모든 기능을 갖추며 보다 적은 옵션을가지고 있으나, 최대한 GNU Linux 의 기능을 따라 할 것입니다. BusyBox는 임베디드 시스템에 대한 상당한 환경을 제공합니다.\n\n더 많은 정보는 프로젝트 사이트, 포럼(러시아어) 또는 개발자 사이트(러시아어). 에서 찾아보실 수 있습니다.\n\n© 2015–2022 Anton Skshidlevsky, GPLv2 + 이 앱은 Android 에 Busybox 를 설치하는 앱입니다.\n\nusyBox는 하나의 작은 실행파일에 많은 일반적인 유닉스 유틸리티의 작은 버전을 결합한 것입니다. 그것은 일반적으로 GNU fileutils, shellutils 등등에서 찾을 유틸리티의 대부분에 대한 기능을 제공합니다. BusyBox에 유틸리티는 일반적으로 GNU Linux의 모든 기능을 갖추며 보다 적은 옵션을가지고 있으나, 최대한 GNU Linux 의 기능을 따라 할 것입니다. BusyBox는 임베디드 시스템에 대한 상당한 환경을 제공합니다.\n\n더 많은 정보는 프로젝트 사이트 또는 개발자 사이트(러시아어). 에서 찾아보실 수 있습니다.\n\n© 2015 Anton Skshidlevsky, GPLv2 어두움 diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index 099181f..dc76300 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -43,7 +43,7 @@ Loggføringsfil Appen ble ikke gitt tillatelse til å skrive til minnet ditt Laster inn … - Denne appen er en BusyBox–installatør for Android.\n\nBusybox kombinerer bittesmå versjoner av mange vanlige UNIX-verktøy i én liten iverksettbar fil. Den sørger for erstatninger for mange av verktøyene som du vanligvis ville funnet i GNU-«fileutil»-er, «shellutil»-er, osv. Verktøyene i BusyBox har generelt færre innstillinger enn sine tilsvarende GNU-verktøy; men de innstillingene som er inkludert, oppfører og fungerer ganske likt GNU-versjonene. BusyBox sørger for et forholdsvis komplett miljø for ethvert lite eller innebygget system.\n\nFor mere informasjon, se projectsiden, forumet, eller utviklernettstedet.\n\n© 2015–2022 Anton Skshidlevsky, GPLv2 + Denne appen er en BusyBox–installatør for Android.\n\nBusybox kombinerer bittesmå versjoner av mange vanlige UNIX-verktøy i én liten iverksettbar fil. Den sørger for erstatninger for mange av verktøyene som du vanligvis ville funnet i GNU-«fileutil»-er, «shellutil»-er, osv. Verktøyene i BusyBox har generelt færre innstillinger enn sine tilsvarende GNU-verktøy; men de innstillingene som er inkludert, oppfører og fungerer ganske likt GNU-versjonene. BusyBox sørger for et forholdsvis komplett miljø for ethvert lite eller innebygget system.\n\nFor mere informasjon, se projectsiden, eller utviklernettstedet.\n\n© 2015 Anton Skshidlevsky, GPLv2 Mørkt diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 8a75f30..306855c 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -43,7 +43,7 @@ Plik dziennika Aplikacja nie ma pozwolenia na zapis do pamięci Ładowanie... - Ta aplikacja jest instalatorem BusyBox dla systemu Android.\n\nBusyBox łączy malutkie wersje wielu popularnych narzędzi UNIX w jednym niewielkim pliku wykonywalnym. Zastępuje on większość narzędzi, które zwykle znajdują się w GNU fileutils, shellutils itp. Narzędzia w BusyBox mają na ogół mniej opcji niż ich w pełni wyposażeni kuzyni GNU, pomimo tego zapewniają oczekiwaną funkcjonalność i zachowują się bardzo podobnie do ich odpowiedników GNU. BusyBox zapewnia dość kompletne środowisko dla każdego małego lub wbudowanego systemu.\n\nAby uzyskać więcej informacji, zobacz stronę projektu, forum lub stronę dewelopera.\n\n© 2015–2022 Anton Skshidlevsky, GPLv2 + Ta aplikacja jest instalatorem BusyBox dla systemu Android.\n\nBusyBox łączy malutkie wersje wielu popularnych narzędzi UNIX w jednym niewielkim pliku wykonywalnym. Zastępuje on większość narzędzi, które zwykle znajdują się w GNU fileutils, shellutils itp. Narzędzia w BusyBox mają na ogół mniej opcji niż ich w pełni wyposażeni kuzyni GNU, pomimo tego zapewniają oczekiwaną funkcjonalność i zachowują się bardzo podobnie do ich odpowiedników GNU. BusyBox zapewnia dość kompletne środowisko dla każdego małego lub wbudowanego systemu.\n\nAby uzyskać więcej informacji, zobacz stronę projektu lub stronę dewelopera.\n\n© 2015 Anton Skshidlevsky, GPLv2 Ciemny diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index edc9c0f..538c040 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -45,7 +45,7 @@ Файл журнала Приложению была запрещена запись в память устройства Загрузка... - Данное приложение представляет собой инсталлятор BusyBox для Android.\n\nBusyBox содержит крошечные версии многих утилит UNIX в одном маленьком исполняемом файле. Он обеспечивает замену для большинства утилит, которые можно найти в GNU fileutils, shellutils и др. Утилиты BusyBox обычно имеют меньше возможностей, чем их полнофункциональные собратья GNU, однако те функции, которые включены в BusyBox, совместимы с аналогичными функциями утилит GNU. BusyBox предоставляет довольно полное окружение для любых мобильных или встраиваемых систем.\n\nЗа дополнительной информацией обращайтесь на страницу проекта, форум или сайт разработчика.\n\n© 2015–2022 Антон Скшидлевский, GPLv2 + Данное приложение представляет собой инсталлятор BusyBox для Android.\n\nBusyBox содержит крошечные версии многих утилит UNIX в одном маленьком исполняемом файле. Он обеспечивает замену для большинства утилит, которые можно найти в GNU fileutils, shellutils и др. Утилиты BusyBox обычно имеют меньше возможностей, чем их полнофункциональные собратья GNU, однако те функции, которые включены в BusyBox, совместимы с аналогичными функциями утилит GNU. BusyBox предоставляет довольно полное окружение для любых мобильных или встраиваемых систем.\n\nЗа дополнительной информацией обращайтесь на страницу проекта или сайт разработчика.\n\n© 2015 Антон Скшидлевский, GPLv2 Темная diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 80a7865..3acbbbe 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -1,5 +1,5 @@ - Цей додаток являє собою інсталятор BusyBox для Android.\n\nBusyBox містить крихітні версії багатьох утиліт UNIX в одному маленькому виконуваному файлі. Він забезпечує заміну для більшості утиліт, які можна знайти в GNU fileutils, shellutils та ін. Утиліти BusyBox зазвичай мають менше можливостей, ніж їх повнофункціональні побратими GNU, проте ті функції, які включені в BusyBox, сумісні з аналогічними функціями утиліт GNU. BusyBox надає досить повне оточення для будь–яких мобільних або вбудовуваних систем.\n\nЗа додатковою інформацією звертайтеся на сторінку проекту, форум або сайт розробника.\n\n© 2015–2022 Антон Скшидлевский, GPLv2 + Цей додаток являє собою інсталятор BusyBox для Android.\n\nBusyBox містить крихітні версії багатьох утиліт UNIX в одному маленькому виконуваному файлі. Він забезпечує заміну для більшості утиліт, які можна знайти в GNU fileutils, shellutils та ін. Утиліти BusyBox зазвичай мають менше можливостей, ніж їх повнофункціональні побратими GNU, проте ті функції, які включені в BusyBox, сумісні з аналогічними функціями утиліт GNU. BusyBox надає досить повне оточення для будь–яких мобільних або вбудовуваних систем.\n\nЗа додатковою інформацією звертайтеся на сторінку проекту або сайт розробника.\n\n© 2015 Антон Скшидлевский, GPLv2 Про програму Інформація Налаштування diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index eaafcee..46aaf2e 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -43,7 +43,7 @@ 日志文件 本应用不被允许写入您的存储 加载中... - This application is an BusyBox installer for Android.\n\nBusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full–featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete environment for any small or embedded system.\n\nFor more information see project page, forum or developer site.\n\n© 2015–2022 Anton Skshidlevsky, GPLv2 + This application is a BusyBox installer for Android.\n\nBusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full–featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete environment for any small or embedded system.\n\nFor more information, see the project page or the developer\'s site.\n\n© 2015 Anton Skshidlevsky, GPLv2 深色主题 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index b8d8377..b573c5d 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -43,7 +43,7 @@ 記錄檔 本應用不被允許寫入您的儲存設備 載入中... - This application is an BusyBox installer for Android.\n\nBusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full–featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete environment for any small or embedded system.\n\nFor more information see project page, forum or developer site.\n\n© 2015–2022 Anton Skshidlevsky, GPLv2 + This application is a BusyBox installer for Android.\n\nBusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full–featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete environment for any small or embedded system.\n\nFor more information, see the project page or the developer\'s site.\n\n© 2015 Anton Skshidlevsky, GPLv2 深色主題 diff --git a/app/src/main/res/values/defaults.xml b/app/src/main/res/values/defaults.xml index c39a56d..36d5691 100644 --- a/app/src/main/res/values/defaults.xml +++ b/app/src/main/res/values/defaults.xml @@ -1,5 +1,5 @@ - 14 + 12 100 false diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1d2ed5c..42cb414 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -2,7 +2,7 @@ BusyBox version %1$s Settings - Information + Info Zip archive About About @@ -48,7 +48,7 @@ Log file The app was not allowed to write to your storage Loading... - This application is an BusyBox installer for Android.\n\nBusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full–featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete environment for any small or embedded system.\n\nFor more information see project page, forum or developer site.\n\n© 2015–2022 Anton Skshidlevsky, GPLv2 + This application is a BusyBox installer for Android.\n\nBusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full–featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete environment for any small or embedded system.\n\nFor more information, see the project page or the developer\'s site.\n\n© 2015 Anton Skshidlevsky, GPLv2 Беларускі diff --git a/build.gradle b/build.gradle index 9ff2207..e135e07 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.0.4' + classpath 'com.android.tools.build:gradle:8.0.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle.properties b/gradle.properties index 1318a72..f0feb58 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,3 +18,6 @@ # org.gradle.parallel=true android.useAndroidX=true android.bundle.enableUncompressedNativeLibs=false +android.defaults.buildfeatures.buildconfig=true +android.nonTransitiveRClass=false +android.nonFinalResIds=false diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1008a2b..082b7bf 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Wed Jan 05 00:48:25 MSK 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME