- Supports any APK format.
- Supports any language.
- Very safe on files.
- Detect category of APK.
- Detect signatrue of APK.
- Store various versions of same APK by creating a library.
1. Install AAPT:
- Linux:
curl -L https://dl.google.com/android/repository/build-tools_r34-rc3-linux.zip -o ~/build-tools.zip
unzip -x ~/build-tools.zip aapt -d ~
rm ~/build-tools.zip
chmod +x ~/build-tools/aapt
sudo cp ~/build-tools/aapt /usr/bin/aapt
- macOS:
curl -L https://dl.google.com/android/repository/build-tools_r34-rc3-macosx.zip -o ~/build-tools.zip
unzip -x ~/build-tools.zip aapt -d ~
rm ~/build-tools.zip
chmod +x ~/build-tools/aapt
sudo cp ~/build-tools/aapt /usr/bin/aapt
- Windows:
- Install MSYS2.
- Download build-tools:
https://dl.google.com/android/repository/build-tools_r34-rc3-windows.zip
- Open downloaded archive and extract
aapt
into:C:\msys2\usr\bin
2. Install depends:
- Linux:
apt-get update && apt install unzip
- macOS (brew):
brew install unzip
- Windows (MSYS2):
pacman -S unzip
- termux-android.
pkg update && pkg install file unzip aapt -y
3. Install APK-Sorter:
git clone https://github.com/mast3rz3ro/apksorter ~/apksorter/apksorter && chmod +x ~/apksorter/apksorter.sh && cp ~/apksorter/apksorter.sh "$PREFIX/bin/apksorter"
Current parameters:
Usage: apksorter [parameters]
Parameters: Description:
-i Input directory (place where to find APK).
-o Output directory (place to store APK after renamed).
-a Archive mode (store APK in more reliable way).
-c Clean empty dirs (only used with archive mode).
-g generate identifiers (used for db).
# Note: by default apksorter renames apk into their own directory
# however you can override this behaivor by using -o switch
Examples:
- Rename within any place where
input
directory exists.
$ ls
input
$ apksorter
$ ls
input renamed
- Rename without creating the
input
directory:
$ apksorter -i /some/folder
- Override the output directory:
d$ apksorter -i /some/folder -o /some/other/newdir
- Archive APK in default directory of apk-sorter:
$ apksorter -a -i /somedir/otherdir
# Android: /sdcard/Android/media/APK-Library
# Linux: ~/APK-Library
- Enable archive mode:
$ apksorter -i /some/folder -o /some/other/newdir -a
- Enable verbosity mode:
$ export verbose=yes
# Note: To detect errors quickly see: "opertion.log" which is stored on ~tmp directory.
-
Please keep note that the
apksorter
must remain efficient, lightwight and simple. and by lightwight I mean to not use any heavy size external tools such asapksigner
which relies onjdk
. -
Improve signatrue detection.
-
Improve category detection.
-
json file for categories
-
Add workaround to identify & repack Split-APK folder.
-
Add repack feature.