2
0
mirror of https://gitlab.com/Nanolx/NanoDroid synced 2024-11-17 21:26:22 +00:00

Merge branch 'master' into 'master'

Numerous fixes and more respect of the general rule of avoiding uppercase variables

See merge request Nanolx/NanoDroid!23
This commit is contained in:
Christopher Roy Bratusek 2019-08-10 12:47:29 +00:00
commit 82f4c4509a
7 changed files with 587 additions and 434 deletions

29
.gitignore vendored Normal file
View File

@ -0,0 +1,29 @@
BromiteWebView/system/
BromiteWebView/system
Full/gsync/K/
Full/gsync/K
Full/gsync/L/
Full/gsync/L
Full/gsync/M/
Full/gsync/M
Full/gsync/N/
Full/gsync/N
Full/gsync/O/
Full/gsync/O
Full/gsync/P/
Full/gsync/P
Full/gsync/common/
Full/gsync/common
Full/swipe/
Full/swipe
Full/system/app/
Full/system/app
Full/system/priv-app/
Full/system/priv-app
NanoDroid-*.zip
NanoDroid-*.zip.sha256
NanoDroid-*.zip.sha256.sig
OsmAnd/system/
OsmAnd/system
data/repo/
data/repo

View File

@ -4,8 +4,28 @@ VERSION=22.3.20190805
CWD=$(readlink -m "${BASH_SOURCE[0]}") CWD=$(readlink -m "${BASH_SOURCE[0]}")
CWD=$(dirname "${CWD}") CWD=$(dirname "${CWD}")
# DIRS
datafolder="${CWD}/data"
repofolder="$datafolder/repo"
# AppsFolder
appsfolder[0]="Full"
appsfolder[1]="${appsfolder[0]}/system"
appsfolder[2]="${CWD}/${appsfolder[1]}"
appsfolder[3]="${appsfolder[1]}/app"
appsfolder[4]="${appsfolder[1]}/priv-app"
appsfolder[5]="${appsfolder[0]}/gsync"
appsfolder[6]="${CWD}/${appsfolder[5]}"
appsfolder[7]="${appsfolder[0]}/swipe"
appsfolder[8]="${CWD}/${appsfolder[7]}"
appsfolder[9]="OsmAnd/system"
appsfolder[10]="${CWD}/${appsfolder[9]}"
appsfolder[11]="BromiteWebView/system"
appsfolder[12]="${CWD}/${appsfolder[11]}"
for funcfile in pkg update common download database report; do for funcfile in pkg update common download database report; do
source "${CWD}/data/build-package.${funcfile}" || exit 1 source "$datafolder/build-package.${funcfile}" || exit 1
done done
[[ -z ${1} ]] && show_help [[ -z ${1} ]] && show_help
@ -82,29 +102,34 @@ for opt in ${@}; do
pull ) pull )
update_indices update_indices
nanodroid_pull nanodroid_pull
update_master
check_nanodroid check_nanodroid
;; ;;
u-microg ) u-microg )
update_indices update_indices
update_microg update_microg
update_master
check_nanodroid check_nanodroid
;; ;;
u-fdroid ) u-fdroid )
update_indices update_indices
update_fdroid update_fdroid
update_master
check_nanodroid check_nanodroid
;; ;;
u-apps ) u-apps )
update_indices update_indices
update_apps update_apps
update_master
check_nanodroid check_nanodroid
;; ;;
u-swipe ) u-swipe )
update_swipe update_swipe
update_master
check_nanodroid check_nanodroid
;; ;;

View File

@ -1,13 +1,17 @@
#!/bin/bash #!/bin/bash
NANODROID_MISSING_FILES=0 nanodroid_missing_files=0
NANODROID_BROKEN_FILES=0 nanodroid_broken_files=0
missing_database="" missing_database=""
debug_message () {
[ "$DEBUG" = '1' ] && echo "$2$(tput setaf 3)$1$(tput sgr 0)"
}
check_nanodroid () { check_nanodroid () {
for file in ${file_database[@]}; do for file in ${file_database[@]}; do
if [[ ! -f ${CWD}/${file} ]]; then if [[ ! -f ${CWD}/${file} ]]; then
NANODROID_MISSING_FILES=1 nanodroid_missing_files=1
missing_database=(${missing_database[@]} ${file}) missing_database=(${missing_database[@]} ${file})
else else
case ${file} in case ${file} in
@ -32,7 +36,7 @@ check_nanodroid () {
;; ;;
* ) * )
NANODROID_BROKEN_FILES=1 nanodroid_broken_files=1
broken_database=(${broken_database[@]} ${file}) broken_database=(${broken_database[@]} ${file})
rm -f ${CWD}/${file} rm -f ${CWD}/${file}
;; ;;
@ -48,7 +52,7 @@ check_nanodroid () {
;; ;;
* ) * )
NANODROID_BROKEN_FILES=1 nanodroid_broken_files=1
broken_database=(${broken_database[@]} ${file}) broken_database=(${broken_database[@]} ${file})
rm -f ${CWD}/${file} rm -f ${CWD}/${file}
;; ;;
@ -56,17 +60,17 @@ check_nanodroid () {
fi fi
done done
if [[ ${NANODROID_MISSING_FILES} -ne 0 ]]; then if [[ ${nanodroid_missing_files} -ne 0 ]]; then
echo -e "\nThe following files are missing:\n" echo -e "\nThe following files are missing:\n"
printf '%s\n' ${missing_database[@]} | uniq printf '%s\n' ${missing_database[@]} | uniq
fi fi
if [[ ${NANODROID_BROKEN_FILES} -ne 0 ]]; then if [[ ${nanodroid_broken_files} -ne 0 ]]; then
echo -e "\nThe following files are broken (and will be removed):\n" echo -e "\nThe following files are broken (and will be removed):\n"
printf '%s\n' ${broken_database[@]} | uniq printf '%s\n' ${broken_database[@]} | uniq
fi fi
if [[ ${NANODROID_MISSING_FILES} -eq 0 && ${NANODROID_BROKEN_FILES} -eq 0 ]]; then if [[ ${nanodroid_missing_files} -eq 0 && ${nanodroid_broken_files} -eq 0 ]]; then
echo -e "\nNanoDroid correctly populated\n" echo -e "\nNanoDroid correctly populated\n"
return 0 return 0
else return 1 else return 1
@ -92,18 +96,18 @@ progress () {
} }
zip_add () { zip_add () {
FILE_PATH="${CWD}/${1}" local file_path="${CWD}/${1}"
FILE_MASK="${2}" local file_mask="${2}"
ZIP_PATH="${CWD}/${ZIP}" local zip_path="${CWD}/${ZIP}"
cd "${FILE_PATH}" cd "${file_path}"
if [ -z "${FILE_MASK}" ]; then if [ -z "${file_mask}" ]; then
zip -qr "${ZIP_PATH}" . || exit 1 zip -qr "${zip_path}" . || exit 1
elif [ -d "${FILE_MASK}" ]; then elif [ -d "${file_mask}" ]; then
zip -qr "${ZIP_PATH}" "${FILE_MASK}" || exit 1 zip -qr "${zip_path}" "${file_mask}" || exit 1
else else
zip -q "${ZIP_PATH}" ${FILE_MASK} || exit 1 zip -q "${zip_path}" ${file_mask} || exit 1
fi fi
cd "${CWD}" cd "${CWD}"
@ -112,17 +116,17 @@ zip_add () {
zip_add_setup () { zip_add_setup () {
cd "${CWD}/doc" cd "${CWD}/doc"
ZIP_PATH="${CWD}/${ZIP}" local zip_path="${CWD}/${ZIP}"
case ${1} in case ${1} in
0 ) 0 )
sed -e 's/nanodroid_overlay=1/nanodroid_overlay=0/' -i .nanodroid-setup sed -e 's/nanodroid_overlay=1/nanodroid_overlay=0/' -i .nanodroid-setup
zip -q "${ZIP_PATH}" .nanodroid-setup || exit 1 zip -q "${zip_path}" .nanodroid-setup || exit 1
sed -e 's/nanodroid_overlay=0/nanodroid_overlay=1/' -i .nanodroid-setup sed -e 's/nanodroid_overlay=0/nanodroid_overlay=1/' -i .nanodroid-setup
;; ;;
1 ) 1 )
zip -q "${ZIP_PATH}" .nanodroid-setup || exit 1 zip -q "${zip_path}" .nanodroid-setup || exit 1
;; ;;
esac esac
@ -158,7 +162,7 @@ increase_version_number () {
increase_module_version () { increase_module_version () {
for module in Full microG FDroid BromiteWebView OsmAnd; do for module in Full microG FDroid BromiteWebView OsmAnd; do
eval $(grep versionCode "${PWD}"/"${module}"/module.prop) eval $(grep versionCode "${PWD}"/"${module}"/module.prop)
versionCode=$((versionCode+1)) local versionCode=$((versionCode+1))
sed -e "s/versionCode.*/versionCode=${versionCode}/" \ sed -e "s/versionCode.*/versionCode=${versionCode}/" \
-i "${CWD}/${module}/module.prop" -i "${CWD}/${module}/module.prop"
done done

View File

@ -107,90 +107,90 @@ fd_OSMAND_CONTOURLINES=(fdroid net.osmand.srtmPlugin.paid app OsmAnd_ContourLine
### ###
file_database=( file_database=(
Full/system/app/Alarmio/Alarmio.apk.gz ${appsfolder[3]}/Alarmio/Alarmio.apk.gz
Full/system/app/Amaze/Amaze.apk.gz ${appsfolder[3]}/Amaze/Amaze.apk.gz
Full/system/app/AnysoftKeyboard/AnysoftKeyboard.apk.gz ${appsfolder[3]}/AnysoftKeyboard/AnysoftKeyboard.apk.gz
Full/system/app/AuroraDroid/AuroraDroid.apk.gz ${appsfolder[3]}/AuroraDroid/AuroraDroid.apk.gz
Full/system/app/AuroraStore/AuroraStore.apk.gz ${appsfolder[3]}/AuroraStore/AuroraStore.apk.gz
Full/system/app/Blokada/Blokada.apk.gz ${appsfolder[3]}/Blokada/Blokada.apk.gz
Full/system/app/DroidGuard/DroidGuard.apk.gz ${appsfolder[3]}/DroidGuard/DroidGuard.apk.gz
Full/system/app/FaceSlim/FaceSlim.apk.gz ${appsfolder[3]}/FaceSlim/FaceSlim.apk.gz
Full/system/app/FDroid/FDroid.apk.gz ${appsfolder[3]}/FDroid/FDroid.apk.gz
Full/system/app/HackersKeyboard/HackersKeyboard.apk.gz ${appsfolder[3]}/HackersKeyboard/HackersKeyboard.apk.gz
Full/system/app/K9Mail/K9Mail.apk.gz ${appsfolder[3]}/K9Mail/K9Mail.apk.gz
Full/system/app/KeePassDX/KeePassDX.apk.gz ${appsfolder[3]}/KeePassDX/KeePassDX.apk.gz
Full/system/app/MPV/MPV.apk.gz ${appsfolder[3]}/MPV/MPV.apk.gz
Full/system/app/NewPipe/NewPipe.apk.gz ${appsfolder[3]}/NewPipe/NewPipe.apk.gz
Full/system/app/nlpBackendApple/nlpBackendApple.apk.gz ${appsfolder[3]}/nlpBackendApple/nlpBackendApple.apk.gz
Full/system/app/nlpBackendDejavu/nlpBackendDejavu.apk.gz ${appsfolder[3]}/nlpBackendDejavu/nlpBackendDejavu.apk.gz
Full/system/app/nlpBackendIchnaea/nlpBackendIchnaea.apk.gz ${appsfolder[3]}/nlpBackendIchnaea/nlpBackendIchnaea.apk.gz
Full/system/app/nlpBackendNominatim/nlpBackendNominatim.apk.gz ${appsfolder[3]}/nlpBackendNominatim/nlpBackendNominatim.apk.gz
Full/system/app/nlpBackendRadiocell/nlpBackendRadiocell.apk.gz ${appsfolder[3]}/nlpBackendRadiocell/nlpBackendRadiocell.apk.gz
Full/system/app/Oandbackup/Oandbackup.apk.gz ${appsfolder[3]}/Oandbackup/Oandbackup.apk.gz
Full/system/app/Odyssey/Odyssey.apk.gz ${appsfolder[3]}/Odyssey/Odyssey.apk.gz
Full/system/app/OpenCamera/OpenCamera.apk.gz ${appsfolder[3]}/OpenCamera/OpenCamera.apk.gz
Full/system/app/OpenKeyChain/OpenKeyChain.apk.gz ${appsfolder[3]}/OpenKeyChain/OpenKeyChain.apk.gz
Full/system/app/OpenLauncher/OpenLauncher.apk.gz ${appsfolder[3]}/OpenLauncher/OpenLauncher.apk.gz
Full/system/app/OpenVPN/OpenVPN.apk.gz ${appsfolder[3]}/OpenVPN/OpenVPN.apk.gz
Full/system/app/Orbot/Orbot.apk.gz ${appsfolder[3]}/Orbot/Orbot.apk.gz
Full/system/app/PrivacyBrowser/PrivacyBrowser.apk.gz ${appsfolder[3]}/PrivacyBrowser/PrivacyBrowser.apk.gz
Full/system/app/QKSMS/QKSMS.apk.gz ${appsfolder[3]}/QKSMS/QKSMS.apk.gz
Full/system/app/SimpleCalendar/SimpleCalendar.apk.gz ${appsfolder[3]}/SimpleCalendar/SimpleCalendar.apk.gz
Full/system/app/SimpleGallery/SimpleGallery.apk.gz ${appsfolder[3]}/SimpleGallery/SimpleGallery.apk.gz
Full/system/app/SmartPackKernelManager/SmartPackKernelManager.apk.gz ${appsfolder[3]}/SmartPackKernelManager/SmartPackKernelManager.apk.gz
Full/system/app/Substratum/Substratum.apk.gz ${appsfolder[3]}/Substratum/Substratum.apk.gz
Full/system/app/Termux/Termux.apk.gz ${appsfolder[3]}/Termux/Termux.apk.gz
Full/system/app/TorBrowser/TorBrowser.apk.gz ${appsfolder[3]}/TorBrowser/TorBrowser.apk.gz
Full/system/app/Twidere/Twidere.apk.gz ${appsfolder[3]}/Twidere/Twidere.apk.gz
Full/system/app/XDALabs/XDALabs.apk.gz ${appsfolder[3]}/XDALabs/XDALabs.apk.gz
Full/system/priv-app/AuroraServices/AuroraServices.apk.gz ${appsfolder[4]}/AuroraServices/AuroraServices.apk.gz
Full/system/priv-app/FakeStore/FakeStore.apk.gz ${appsfolder[4]}/FakeStore/FakeStore.apk.gz
Full/system/priv-app/FDroidPrivileged/FDroidPrivileged.apk.gz ${appsfolder[4]}/FDroidPrivileged/FDroidPrivileged.apk.gz
Full/system/priv-app/GmsCore/GmsCore.apk.gz ${appsfolder[4]}/GmsCore/GmsCore.apk.gz
Full/system/priv-app/GsfProxy/GsfProxy.apk.gz ${appsfolder[4]}/GsfProxy/GsfProxy.apk.gz
Full/system/priv-app/Phonesky/Phonesky.apk.gz ${appsfolder[4]}/Phonesky/Phonesky.apk.gz
Full/system/priv-app/YalpStore/YalpStore.apk.gz ${appsfolder[4]}/YalpStore/YalpStore.apk.gz
Full/gsync/common/app/GoogleCalendarSync/GoogleCalendarSync.apk.gz ${appsfolder[5]}/common/app/GoogleCalendarSync/GoogleCalendarSync.apk.gz
Full/gsync/K/app/GoogleContactsSync/GoogleContactsSync.apk.gz ${appsfolder[5]}/K/app/GoogleContactsSync/GoogleContactsSync.apk.gz
Full/gsync/K/priv-app/GoogleBackupTransport/GoogleBackupTransport.apk.gz ${appsfolder[5]}/K/priv-app/GoogleBackupTransport/GoogleBackupTransport.apk.gz
Full/gsync/L/app/GoogleContactsSync/GoogleContactsSync.apk.gz ${appsfolder[5]}/L/app/GoogleContactsSync/GoogleContactsSync.apk.gz
Full/gsync/L/priv-app/GoogleBackupTransport/GoogleBackupTransport.apk.gz ${appsfolder[5]}/L/priv-app/GoogleBackupTransport/GoogleBackupTransport.apk.gz
Full/gsync/M/app/GoogleContactsSync/GoogleContactsSync.apk.gz ${appsfolder[5]}/M/app/GoogleContactsSync/GoogleContactsSync.apk.gz
Full/gsync/M/priv-app/GoogleBackupTransport/GoogleBackupTransport.apk.gz ${appsfolder[5]}/M/priv-app/GoogleBackupTransport/GoogleBackupTransport.apk.gz
Full/gsync/N/app/GoogleContactsSync/GoogleContactsSync.apk.gz ${appsfolder[5]}/N/app/GoogleContactsSync/GoogleContactsSync.apk.gz
Full/gsync/N/priv-app/GoogleBackupTransport/GoogleBackupTransport.apk.gz ${appsfolder[5]}/N/priv-app/GoogleBackupTransport/GoogleBackupTransport.apk.gz
Full/gsync/O/app/GoogleContactsSync/GoogleContactsSync.apk.gz ${appsfolder[5]}/O/app/GoogleContactsSync/GoogleContactsSync.apk.gz
Full/gsync/O/priv-app/GoogleBackupTransport/GoogleBackupTransport.apk.gz ${appsfolder[5]}/O/priv-app/GoogleBackupTransport/GoogleBackupTransport.apk.gz
Full/gsync/P/app/GoogleContactsSync/GoogleContactsSync.apk.gz ${appsfolder[5]}/P/app/GoogleContactsSync/GoogleContactsSync.apk.gz
Full/gsync/P/priv-app/GoogleBackupTransport/GoogleBackupTransport.apk.gz ${appsfolder[5]}/P/priv-app/GoogleBackupTransport/GoogleBackupTransport.apk.gz
BromiteWebView/system/app/BromiteWebView_arm/BromiteWebView_arm.apk.gz ${appsfolder[11]}/app/BromiteWebView_arm/BromiteWebView_arm.apk.gz
BromiteWebView/system/app/BromiteWebView_arm64/BromiteWebView_arm64.apk.gz ${appsfolder[11]}/app/BromiteWebView_arm64/BromiteWebView_arm64.apk.gz
BromiteWebView/system/app/BromiteWebView_x86/BromiteWebView_x86.apk.gz ${appsfolder[11]}/app/BromiteWebView_x86/BromiteWebView_x86.apk.gz
OsmAnd/system/app/OsmAnd/OsmAnd.apk.gz ${appsfolder[9]}/app/OsmAnd/OsmAnd.apk.gz
OsmAnd/system/app/OsmAnd_ContourLines/OsmAnd_ContourLines.apk.gz ${appsfolder[9]}/app/OsmAnd_ContourLines/OsmAnd_ContourLines.apk.gz
Full/swipe/arm/libjni_keyboarddecoder.so ${appsfolder[7]}/arm/libjni_keyboarddecoder.so
Full/swipe/arm/libjni_latinimegoogle.so_19 ${appsfolder[7]}/arm/libjni_latinimegoogle.so_19
Full/swipe/arm/libjni_latinimegoogle.so_21 ${appsfolder[7]}/arm/libjni_latinimegoogle.so_21
Full/swipe/arm/libjni_latinimegoogle.so_22 ${appsfolder[7]}/arm/libjni_latinimegoogle.so_22
Full/swipe/arm/libjni_latinimegoogle.so_23 ${appsfolder[7]}/arm/libjni_latinimegoogle.so_23
Full/swipe/arm/libjni_latinimegoogle.so_27 ${appsfolder[7]}/arm/libjni_latinimegoogle.so_27
Full/swipe/arm/libjni_latinimegoogle.so_28 ${appsfolder[7]}/arm/libjni_latinimegoogle.so_28
Full/swipe/arm64/libjni_keyboarddecoder.so ${appsfolder[7]}/arm64/libjni_keyboarddecoder.so
Full/swipe/arm64/libjni_latinimegoogle.so_21 ${appsfolder[7]}/arm64/libjni_latinimegoogle.so_21
Full/swipe/arm64/libjni_latinimegoogle.so_22 ${appsfolder[7]}/arm64/libjni_latinimegoogle.so_22
Full/swipe/arm64/libjni_latinimegoogle.so_23 ${appsfolder[7]}/arm64/libjni_latinimegoogle.so_23
Full/swipe/arm64/libjni_latinimegoogle.so_27 ${appsfolder[7]}/arm64/libjni_latinimegoogle.so_27
Full/swipe/arm64/libjni_latinimegoogle.so_28 ${appsfolder[7]}/arm64/libjni_latinimegoogle.so_28
Full/swipe/x86/libjni_keyboarddecoder.so ${appsfolder[7]}/x86/libjni_keyboarddecoder.so
Full/swipe/x86/libjni_latinimegoogle.so ${appsfolder[7]}/x86/libjni_latinimegoogle.so
Full/swipe/x86_64/libjni_keyboarddecoder.so ${appsfolder[7]}/x86_64/libjni_keyboarddecoder.so
Full/swipe/x86_64/libjni_latinimegoogle.so ${appsfolder[7]}/x86_64/libjni_latinimegoogle.so
) )

View File

@ -4,11 +4,11 @@
# Michael Bryant / Shadow53 # Michael Bryant / Shadow53
# https://gitlab.com/Shadow53/android-zip-builder # https://gitlab.com/Shadow53/android-zip-builder
REPO_FDROID="https://f-droid.org/repo" repo_fdroid="https://f-droid.org/repo"
REPO_GUARDIAN="https://guardianproject.info/fdroid/repo" repo_guardian="https://guardianproject.info/fdroid/repo"
REPO_MICROG="https://microg.org/fdroid/repo" repo_microg="https://microg.org/fdroid/repo"
REPO_NANOLX="https://nanolx.org/fdroid/repo" repo_nanolx="https://nanolx.org/fdroid/repo"
REPO_BROMITE="https://fdroid.bromite.org/fdroid/repo" repo_bromite="https://fdroid.bromite.org/fdroid/repo"
# check dependencies # check dependencies
for dep in gawk curl sha256sum jq gzip; do for dep in gawk curl sha256sum jq gzip; do
@ -18,218 +18,252 @@ for dep in gawk curl sha256sum jq gzip; do
fi fi
done done
index_update_required () { debug_download () {
INDEX_FILE=${1} case $1 in
index)
if [ "$USE_WGET" = '1' ]; then
rm -rf "$2"
debug_message "wget -q --show-progress \"$3\" -O \"${2#$CWD/}\"" " "
wget -q --show-progress "$3" -O "$2" || error "$4"
else
debug_message "curl -sSL -o \"${2#$CWD/}\" \"$3\"" " "
curl -sSL -o "$2" "$3" || error "$4"
fi
;;
no_delete)
if [ "$USE_WGET" = '1' ]; then
rm -rf "$2"
debug_message "wget -q --show-progress \"$3\" -O \"${2#$CWD/}\""
wget -q --show-progress "$3" -O "$2"
else
debug_message "curl -sSL -o \"${2#$CWD/}\" \"$3\""
curl -sSL -o "$2" "$3"
fi
;;
delete)
if [ "$USE_WGET" = '1' ]; then
rm -rf "$2"
debug_message "wget -q --show-progress \"$3\" -O \"${2#$CWD/}\""
wget -q --show-progress "$3" -O "$2" || rm -f "$4"
else
debug_message "curl -sSL -o \"${2#$CWD/}\" \"$3\""
curl -sSL -o "$2" "$3" || rm -f "$4"
fi
;;
esac
}
test ! -f ${INDEX_FILE} && return 0 index_update_required () {
test $(stat --format=%Z ${INDEX_FILE}) -le $(($(date +%s) - 3600)) && return 0 index_file=${1}
test "$(file -b ${INDEX_FILE})" == "empty" && return 0
test ! -f ${index_file} && return 0
test $(stat --format=%Z ${index_file}) -le $(($(date +%s) - 3600)) && return 0
test "$(file -b ${index_file})" == "empty" && return 0
return 1 return 1
} }
check_sha256sum () { check_sha256sum () {
INPUT="${1}" local input="${1}"
IN_CHECKSUM="" in_checksum=""
EX_CHECKSUM="${2}" local ex_checksum="${2}"
case ${INPUT} in case ${input} in
*.gz ) *.gz )
IN_CHECKSUM=$(gzip -dc ${INPUT} 2>/dev/null | sha256sum | gawk '{print $1}') in_checksum=$(gzip -dc ${input} 2>/dev/null | sha256sum | gawk '{print $1}')
;; ;;
* ) * )
IN_CHECKSUM=$(sha256sum ${INPUT} 2>/dev/null | gawk '{print $1}') in_checksum=$(sha256sum ${input} 2>/dev/null | gawk '{print $1}')
;; ;;
esac esac
[[ ${IN_CHECKSUM} == ${EX_CHECKSUM} ]] && return 0 || return 1 [[ ${in_checksum} == ${ex_checksum} ]] && return 0 || return 1
} }
update_index () { update_index () {
INDEX_JAR=${1} local index_jar=${1}
INDEX_JSON="${CWD}/data/$(basename ${INDEX_JAR} .jar).json" local index_json="$repofolder/$(basename ${index_jar} .jar).json"
INDEX_REPO=${2} local index_repo=${2}
if index_update_required ${INDEX_JSON}; then if index_update_required ${index_json}; then
curl -sSL -o "${INDEX_JAR}" "${INDEX_REPO}/index-v1.jar" || error " failed to update repo index" debug_download index "${index_jar}" "${index_repo}/index-v1.jar" " failed to update repo index"
unzip -q ${INDEX_JAR} index-v1.json -d "${CWD}/data/" unzip -q ${index_jar} index-v1.json -d "$repofolder/"
mv "${CWD}/data/index-v1.json" "${INDEX_JSON}" mv "$repofolder/index-v1.json" "${index_json}"
rm -f ${INDEX_JAR} rm -f ${index_jar}
fi fi
} }
update_indices () { update_indices () {
echo "+++ upating Repo Indices" echo "+++ upating Repo Indices"
echo " ++ F-Droid" echo " ++ F-Droid"
update_index "${CWD}/data/$(awk -F/ '{print $3}' <<< ${REPO_FDROID}).index-v1.jar" "${REPO_FDROID}" [ ! -d "$repofolder" ] && rm -rf "$repofolder" && mkdir -p "$repofolder"
update_index "$repofolder/$(awk -F/ '{print $3}' <<< ${repo_fdroid}).index-v1.jar" "${repo_fdroid}"
echo " ++ Guardian Project" echo " ++ Guardian Project"
update_index "${CWD}/data/$(awk -F/ '{print $3}' <<< ${REPO_GUARDIAN}).index-v1.jar" "${REPO_GUARDIAN}" update_index "$repofolder/$(awk -F/ '{print $3}' <<< ${repo_guardian}).index-v1.jar" "${repo_guardian}"
echo " ++ microG" echo " ++ microG"
update_index "${CWD}/data/$(awk -F/ '{print $3}' <<< ${REPO_MICROG}).index-v1.jar" "${REPO_MICROG}" update_index "$repofolder/$(awk -F/ '{print $3}' <<< ${repo_microg}).index-v1.jar" "${repo_microg}"
echo " ++ Nanolx" echo " ++ Nanolx"
update_index "${CWD}/data/$(awk -F/ '{print $3}' <<< ${REPO_NANOLX}).index-v1.jar" "${REPO_NANOLX}" update_index "$repofolder/$(awk -F/ '{print $3}' <<< ${repo_nanolx}).index-v1.jar" "${repo_nanolx}"
echo " ++ Bromite" echo " ++ Bromite"
update_index "${CWD}/data/$(awk -F/ '{print $3}' <<< ${REPO_BROMITE}).index-v1.jar" "${REPO_BROMITE}" update_index "$repofolder/$(awk -F/ '{print $3}' <<< ${repo_bromite}).index-v1.jar" "${repo_bromite}"
} }
grab_apk_from_repo () { grab_apk_from_repo () {
case "${1}" in case "${1}" in
fdroid ) fdroid )
REPO=${REPO_FDROID} local repo=${repo_fdroid}
REPO_P="F-Droid" local repo_p="F-Droid"
;; ;;
guardian ) guardian )
REPO=${REPO_GUARDIAN} local repo=${repo_guardian}
REPO_P="Guardian Project" local repo_p="Guardian Project"
;; ;;
microg ) microg )
REPO=${REPO_MICROG} local repo=${repo_microg}
REPO_P="microG" local repo_p="microG"
;; ;;
nanolx ) nanolx )
REPO=${REPO_NANOLX} local repo=${repo_nanolx}
REPO_P="Nanolx" local repo_p="Nanolx"
;; ;;
bromite ) bromite )
REPO=${REPO_BROMITE} local repo=${repo_bromite}
REPO_P="Bromite" local repo_p="Bromite"
;; ;;
esac esac
DOMAIN="$(awk -F/ '{print $3}' <<< ${REPO})" local domain="$(awk -F/ '{print $3}' <<< ${repo})"
INDEX_FILE="${CWD}/data/${DOMAIN}.index-v1.json" index_file="$repofolder/${domain}.index-v1.json"
PKG_NAME="${2}" local pkg_name="${2}"
if [ -z "${5}" ]; then if [ -z "${5}" ]; then
APK_NAME="$(jq -r --arg pkg "${PKG_NAME}" '.packages[$pkg][0].apkName' ${INDEX_FILE})" local apk_name="$(jq -r --arg pkg "${pkg_name}" '.packages[$pkg][0].apkName' ${index_file})"
SHA_SUM="$(jq -r --arg pkg "${PKG_NAME}" '.packages[$pkg][0].hash' ${INDEX_FILE})" local sha_sum="$(jq -r --arg pkg "${pkg_name}" '.packages[$pkg][0].hash' ${index_file})"
else else
APK_NAME="$(jq -r --arg pkg "${PKG_NAME}" --arg arch "${5}" '[.packages[$pkg][] | select (.nativecode[]==$arch).apkName][0]' ${INDEX_FILE})" local apk_name="$(jq -r --arg pkg "${pkg_name}" --arg arch "${5}" '[.packages[$pkg][] | select (.nativecode[]==$arch).apkName][0]' ${index_file})"
SHA_SUM="$(jq -r --arg pkg "${PKG_NAME}" --arg arch "${5}" '[.packages[$pkg][] | select (.nativecode[]==$arch).hash][0]' ${INDEX_FILE})" local sha_sum="$(jq -r --arg pkg "${pkg_name}" --arg arch "${5}" '[.packages[$pkg][] | select (.nativecode[]==$arch).hash][0]' ${index_file})"
fi fi
case "${PKG_NAME}" in case "${pkg_name}" in
com.android.webview ) com.android.webview )
APK_DEST="${CWD}/BromiteWebView/system/${3}/${4}" local apk_dest="${appsfolder[12]}/${3}/${4}"
;; ;;
net.osmand.plus | net.osmand.srtmPlugin.paid ) net.osmand.plus | net.osmand.srtmPlugin.paid )
APK_DEST="${CWD}/OsmAnd/system/${3}/${4}" local apk_dest="${appsfolder[10]}/${3}/${4}"
;; ;;
com.google.android.gms ) com.google.android.gms )
# XXX select mapbox build in official microG repo # XXX select mapbox build in official microG repo
APK_NAME="$(jq -r --arg pkg "${PKG_NAME}" '.packages[$pkg][0] | select (.versionName | contains("mapbox")).apkName' ${INDEX_FILE})" local apk_name="$(jq -r --arg pkg "${pkg_name}" '.packages[$pkg][0] | select (.versionName | contains("mapbox")).apkName' ${index_file})"
SHA_SUM="$(jq -r --arg pkg "${PKG_NAME}" '.packages[$pkg][0] | select (.versionName | contains("mapbox")).hash' ${INDEX_FILE})" local sha_sum="$(jq -r --arg pkg "${pkg_name}" '.packages[$pkg][0] | select (.versionName | contains("mapbox")).hash' ${index_file})"
APK_DEST="${CWD}/Full/system/${3}/${4}" local apk_dest="${appsfolder[2]}/${3}/${4}"
;; ;;
* ) * )
APK_DEST="${CWD}/Full/system/${3}/${4}" local apk_dest="${appsfolder[2]}/${3}/${4}"
;; ;;
esac esac
APK_URL="${REPO}/${APK_NAME}" local apk_url="${repo}/${apk_name}"
if check_sha256sum "${APK_DEST}/${4}.apk.gz" "${SHA_SUM}"; then if check_sha256sum "${apk_dest}/${4}.apk.gz" "${sha_sum}"; then
echo -e "\nUp-to-Date from ${REPO_P} : ${4}.apk" echo -e "\nUp-to-Date from ${repo_p} : ${4}.apk"
else echo -e "\nUpdating from ${REPO_P} : ${4}.apk" else echo -e "\nUpdating from ${repo_p} : ${4}.apk"
mkdir -p "${APK_DEST}" mkdir -p "${apk_dest}"
rm -f "${APK_DEST}/${4}.apk.gz" rm -f "${apk_dest}/${4}.apk.gz"
curl -sSL -o "${APK_DEST}/${4}.apk" "${APK_URL}" debug_download no_delete "${apk_dest}/${4}.apk" "${apk_url}"
if check_sha256sum "${APK_DEST}/${4}.apk" "${SHA_SUM}"; then if check_sha256sum "${apk_dest}/${4}.apk" "${sha_sum}"; then
echo " SHA256 hash of ${4}.apk is correct" echo " SHA256 hash of ${4}.apk is correct"
gzip "${APK_DEST}/${4}.apk" gzip "${apk_dest}/${4}.apk"
else echo -e " SHA256 hash of ${4}.apk is wrong!\ else echo -e " SHA256 hash of ${4}.apk is wrong!\
\n expected : ${SHA_SUM}\ \n expected : ${sha_sum}\
\n got : ${IN_CHECKSUM}" \n got : ${in_checksum}"
rm -f "${APK_DEST}/${4}.apk" rm -f "${apk_dest}/${4}.apk"
fi fi
fi fi
} }
grab_apk_from_url () { grab_apk_from_url () {
APK_URL="${1}" local apk_url="${1}"
APK_DEST="${CWD}/Full/system/${2}/${3}" local apk_dest="${appsfolder[2]}/${2}/${3}"
rm -f "${APK_DEST}/${3}.apk.gz" rm -f "${apk_dest}/${3}.apk.gz"
if [[ -f "${APK_DEST}/${3}.apk" ]]; then if [[ -f "${apk_dest}/${3}.apk" ]]; then
echo -e "\nUpdating from URL : ${3}.apk" echo -e "\nUpdating from URL : ${3}.apk"
else echo -e "\nDownloading from URL : ${3}.apk" else echo -e "\nDownloading from URL : ${3}.apk"
mkdir -p "${APK_DEST}" mkdir -p "${apk_dest}"
fi fi
echo " Checking SHA256 hash not (yet) supported" echo " Checking SHA256 hash not (yet) supported"
curl -sSL -o "${APK_DEST}/${3}.apk" "${APK_URL}" || \ debug_download delete "${apk_dest}/${3}.apk" "${apk_url}" "${apk_dest}/${3}.apk"
rm -f "${APK_DEST}/${3}.apk"
if [[ -f "${APK_DEST}/${3}.apk" ]]; then if [[ -f "${apk_dest}/${3}.apk" ]]; then
gzip "${APK_DEST}/${3}.apk" gzip "${apk_dest}/${3}.apk"
else echo "error downloading ${3}" else echo "error downloading ${3}"
fi fi
} }
grab_apk_from_github () { grab_apk_from_github () {
APK_URL="$(curl -s -N "https://api.github.com/repos/${1}/releases" | \ local apk_url="$(curl -s -N "https://api.github.com/repos/${1}/releases" | \
gawk -F\" '/browser_download_url.*apk/{print $4 ; exit}')" gawk -F\" '/browser_download_url.*apk/{print $4 ; exit}')"
APK_DEST="${CWD}/Full/system/${2}/${3}" local apk_dest="${appsfolder[2]}/${2}/${3}"
rm -f "${APK_DEST}/${3}.apk.gz" rm -f "${apk_dest}/${3}.apk.gz"
if [[ -f "${APK_DEST}/${3}.apk" ]]; then if [[ -f "${apk_dest}/${3}.apk" ]]; then
echo -e "\nUpdating from GitHub : ${3}.apk" echo -e "\nUpdating from GitHub : ${3}.apk"
else echo -e "\nDownloading from GitHub : ${3}.apk" else echo -e "\nDownloading from GitHub : ${3}.apk"
mkdir -p "${APK_DEST}" mkdir -p "${apk_dest}"
fi fi
echo " Checking SHA256 hash not (yet) supported" echo " Checking SHA256 hash not (yet) supported"
curl -sSL -o "${APK_DEST}/${3}.apk" "${APK_URL}" || \ debug_download delete "${apk_dest}/${3}.apk" "${apk_url}" "${apk_dest}/${3}.apk"
rm -f "${APK_DEST}/${3}.apk"
if [[ -f "${APK_DEST}/${3}.apk" ]]; then if [[ -f "${apk_dest}/${3}.apk" ]]; then
gzip "${APK_DEST}/${3}.apk" gzip "${apk_dest}/${3}.apk"
else echo "error downloading ${3}" else echo "error downloading ${3}"
fi fi
} }
grab_apk_from_gitlab () { grab_apk_from_gitlab () {
APK_URL="https://gitlab.com$(curl -s -N "https://gitlab.com/${1}/-/tags" | \ local apk_url=$(curl -s -N "https://gitlab.com/${1}/-/tags" | grep '.apk' | head -n 1)
gawk -F\" '/\.apk/{print $6 ; exit}')" local apk_url=${apk_url%\">*.apk*}
APK_DEST="${CWD}/Full/system/${2}/${3}" local apk_url="https://gitlab.com${apk_url##*a href=\"}"
local apk_dest="${appsfolder[2]}/${2}/${3}"
rm -f "${APK_DEST}/${3}.apk.gz" rm -f "${apk_dest}/${3}.apk.gz"
if [[ -f "${APK_DEST}/${3}.apk" ]]; then if [[ -f "${apk_dest}/${3}.apk" ]]; then
echo -e "\nUpdating from GitLab : ${3}.apk" echo -e "\nUpdating from GitLab : ${3}.apk"
else echo -e "\nDownloading from GitLab : ${3}.apk" else echo -e "\nDownloading from GitLab : ${3}.apk"
mkdir -p "${APK_DEST}" mkdir -p "${apk_dest}"
fi fi
echo " Checking SHA256 hash not (yet) supported" echo " Checking SHA256 hash not (yet) supported"
curl -sSL -o "${APK_DEST}/${3}.apk" "${APK_URL}" || \ debug_download delete "${apk_dest}/${3}.apk" "${apk_url}" "${apk_dest}/${3}.apk"
rm -f "${APK_DEST}/${3}.apk"
if [[ -f "${APK_DEST}/${3}.apk" ]]; then if [[ -f "${apk_dest}/${3}.apk" ]]; then
gzip "${APK_DEST}/${3}.apk" gzip "${apk_dest}/${3}.apk"
else echo "error downloading ${3}" else echo "error downloading ${3}"
fi fi
} }
@ -237,38 +271,37 @@ grab_apk_from_gitlab () {
grab_apk_from_ogapps () { grab_apk_from_ogapps () {
case "${1}" in case "${1}" in
"com.google.android.syncadapters.calendar" ) "com.google.android.syncadapters.calendar" )
APK_URL="https://gitlab.opengapps.org/opengapps/all/raw/master/${2}/${1}/15/nodpi/2015080710.apk" local apk_url="https://gitlab.opengapps.org/opengapps/all/raw/master/${2}/${1}/15/nodpi/2015080710.apk"
API_LETTER=common local api_letter=common
;; ;;
* ) * )
APK_URL="https://gitlab.opengapps.org/opengapps/all/raw/master/${2}/${1}/${4}/nodpi/${4}.apk" apk_url="https://gitlab.opengapps.org/opengapps/all/raw/master/${2}/${1}/${4}/nodpi/${4}.apk"
case "${4}" in case "${4}" in
19 ) API_LETTER=K ;; 19 ) local api_letter=K ;;
21 ) API_LETTER=L ;; 21 ) local api_letter=L ;;
23 ) API_LETTER=M ;; 23 ) local api_letter=M ;;
24 ) API_LETTER=N ;; 24 ) local api_letter=N ;;
26 ) API_LETTER=O ;; 26 ) local api_letter=O ;;
28 ) API_LETTER=P ;; 28 ) local api_letter=P ;;
esac esac
;; ;;
esac esac
APK_DEST="${CWD}/Full/gsync/${API_LETTER}/${2}/${3}" apk_dest="${appsfolder[6]}/${api_letter}/${2}/${3}"
if [[ -f "${APK_DEST}/${3}.apk.gz" ]]; then if [[ -f "${apk_dest}/${3}.apk.gz" ]]; then
echo -e "\nUpdating from OpenGApps : ${3}.apk [${API_LETTER}]" echo -e "\nUpdating from OpenGApps : ${3}.apk [${api_letter}]"
rm -f "${APK_DEST}/${3}.apk.gz" rm -f "${apk_dest}/${3}.apk.gz"
else echo -e "\nDownloading from OpenGApps: ${3}.apk [${API_LETTER}]" else echo -e "\nDownloading from OpenGApps: ${3}.apk [${api_letter}]"
mkdir -p "${APK_DEST}" mkdir -p "${apk_dest}"
fi fi
echo " Checking SHA256 hash not (yet) supported" echo " Checking SHA256 hash not (yet) supported"
curl -sSL -o "${APK_DEST}/${3}.apk" "${APK_URL}" || \ debug_download delete "${apk_dest}/${3}.apk" "${apk_url}" "${apk_dest}/${3}.apk"
rm -f "${APK_DEST}/${3}.apk"
[ -f "${APK_DEST}/${3}.apk" ] && gzip "${APK_DEST}/${3}.apk" [ -f "${apk_dest}/${3}.apk" ] && gzip "${apk_dest}/${3}.apk"
} }
grab_lib_from_ogapps () { grab_lib_from_ogapps () {
@ -277,35 +310,33 @@ grab_lib_from_ogapps () {
arm64 | x86_64 ) LIBD=lib64 ;; arm64 | x86_64 ) LIBD=lib64 ;;
esac esac
LIB_URL="https://gitlab.opengapps.org/opengapps/${3}/raw/master/${LIBD}/${2}/${1}?inline=false" local lib_url="https://gitlab.opengapps.org/opengapps/${3}/raw/master/${LIBD}/${2}/${1}?inline=false"
SWP_DEST="${CWD}/Full/swipe/${3}" local swp_dest="${appsfolder[8]}/${3}"
if [[ "${4}" == "true" ]]; then if [[ "${4}" == "true" ]]; then
LIB_DEST="${SWP_DEST}/${1}_${2}" local lib_dest="${swp_dest}/${1}_${2}"
else LIB_DEST="${SWP_DEST}/${1}" else lib_dest="${swp_dest}/${1}"
fi fi
if [[ -f "${LIB_DEST}" ]]; then if [[ -f "${lib_dest}" ]]; then
echo -e "\nUpdating from OpenGApps : ${1} [${2}:${3}]" echo -e "\nUpdating from OpenGApps : ${1} [${2}:${3}]"
else echo -e "\nDownloading from OpenGApps: ${1} [${2}:${3}]" else echo -e "\nDownloading from OpenGApps: ${1} [${2}:${3}]"
mkdir -p "${SWP_DEST}" mkdir -p "${swp_dest}"
fi fi
echo " Checking SHA256 hash not (yet) supported" echo " Checking SHA256 hash not (yet) supported"
curl -sSL -o "${LIB_DEST}" "${LIB_URL}" || \ debug_download delete "${lib_dest}" "${lib_url}" "${lib_dest}"
rm -f "${LIB_DEST}"
} }
grab_patches () { grab_patches () {
BASE_URL="https://github.com/Lanchon/haystack/blob/master/patches" base_url="https://github.com/Lanchon/haystack/blob/master/patches"
PATCH_URL="${BASE_URL}/${1}?raw=true" patch_url="${base_url}/${1}?raw=true"
PATCH_DST="${CWD}/patcher/dexpatcher/${2}" patch_dst="${CWD}/patcher/dexpatcher/${2}"
echo -e "\nUpdating from Haystack : ${2}" echo -e "\nUpdating from Haystack : ${2}"
echo " Checking SHA256 hash not (yet) supported" echo " Checking SHA256 hash not (yet) supported"
curl -sSL -o "${PATCH_DST}" "${PATCH_URL}" || \ debug_download delete "${patch_dst}" "${patch_url}""${patch_dst}"
rm -f "${PATCH_DST}"
} }

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
REPORT_FILE="${CWD}/NanoDroid_Report_${VERSION}" report_file="${CWD}/NanoDroid_Report_${VERSION}"
create_report_real () { create_report_real () {
@ -9,18 +9,18 @@ create_report_real () {
* ) ND_TYPE="Stable Release" ;; * ) ND_TYPE="Stable Release" ;;
esac esac
rm -f "${REPORT_FILE}"* rm -f "${report_file}"*
echo "creating NanoDroid report: echo "creating NanoDroid report:
| NanoDroid Version: ${VERSION} | NanoDroid Version: ${VERSION}
| NanoDroid Type: ${ND_TYPE} | NanoDroid Type: ${ND_TYPE}
| NanoDroid Report: $(basename ${REPORT_FILE}) | NanoDroid Report: $(basename ${report_file})
" "
echo "NanoDroid ${VERSION} package report [$(date +%Y%m%d-%H.%M.%S)] echo "NanoDroid ${VERSION} package report [$(date +%Y%m%d-%H.%M.%S)]
========================================================== ==========================================================
" > ${REPORT_FILE} " > ${report_file}
for file in $(find ${CWD} -maxdepth 1 -type f | sort) \ for file in $(find ${CWD} -maxdepth 1 -type f | sort) \
$(find ${CWD} -mindepth 2 -type f | sort); do $(find ${CWD} -mindepth 2 -type f | sort); do
@ -36,7 +36,7 @@ create_report_real () {
esac esac
done done
sum_sign_package "${REPORT_FILE}" sum_sign_package "${report_file}"
} }
@ -51,14 +51,14 @@ get_apk_info () {
gzip -dc ${1} > ${APK} gzip -dc ${1} > ${APK}
APK_FILE=$(basename ${1}) apk_file=$(basename ${1})
APK_PATH=$(dirname ${1} | sed -e 's/.*NanoDroid/NanoDroid/') apk_path=$(dirname ${1} | sed -e 's/.*NanoDroid/NanoDroid/')
APK_NAME=$(aapt dump badging ${APK} 2>/dev/null | gawk -F \' '/^package: name/{print $2}') apk_name=$(aapt dump badging ${APK} 2>/dev/null | gawk -F \' '/^package: name/{print $2}')
APK_VERSION=$(aapt dump badging ${APK} 2>/dev/null | gawk -F \' '/^package: name/{print $6}') apk_version=$(aapt dump badging ${APK} 2>/dev/null | gawk -F \' '/^package: name/{print $6}')
APK_CODE=$(aapt dump badging ${APK} 2>/dev/null | gawk -F \' '/^package: name/{print $4}') apk_code=$(aapt dump badging ${APK} 2>/dev/null | gawk -F \' '/^package: name/{print $4}')
APK_PERM=$(aapt dump badging ${APK} 2>/dev/null | gawk -F \' '/^uses-permission:/{print $2}' | sort) apk_perm=$(aapt dump badging ${APK} 2>/dev/null | gawk -F \' '/^uses-permission:/{print $2}' | sort)
APK_SHA=$(sha256sum ${APK} | gawk '{print $1}') apk_sha=$(sha256sum ${APK} | gawk '{print $1}')
GZIP_SHA=$(sha256sum ${1} | gawk '{print $1}') gzip_sha=$(sha256sum ${1} | gawk '{print $1}')
case ${1} in case ${1} in
*gsync/K* ) APK_TYPE="Google Sync Adapters [KitKat]" ;; *gsync/K* ) APK_TYPE="Google Sync Adapters [KitKat]" ;;
@ -72,18 +72,18 @@ get_apk_info () {
*app* ) APK_TYPE="Generic Application" ;; *app* ) APK_TYPE="Generic Application" ;;
esac esac
echo "Android Package: ${APK_NAME} echo "Android Package: ${apk_name}
| Filename: ${APK_FILE} | Filename: ${apk_file}
| Origin: ${APK_PATH} | Origin: ${apk_path}
| Type: ${APK_TYPE} | Type: ${APK_TYPE}
| Version: ${APK_VERSION} | Version: ${apk_version}
| VersionCode: ${APK_CODE} | VersionCode: ${apk_code}
| SHA256 APK: ${APK_SHA} | SHA256 APK: ${apk_sha}
| SHA256 GZip: ${GZIP_SHA}" >> ${REPORT_FILE} | SHA256 GZip: ${gzip_sha}" >> ${report_file}
if [ -z "${APK_PERM}" ]; then if [ -z "${apk_perm}" ]; then
echo -e " | Permissions: none requested\n" >> ${REPORT_FILE} echo -e " | Permissions: none requested\n" >> ${report_file}
else echo -e " | Permissions:\n$(printf "\t|- %s\n" ${APK_PERM})\n" >> ${REPORT_FILE} else echo -e " | Permissions:\n$(printf "\t|- %s\n" ${apk_perm})\n" >> ${report_file}
fi fi
rm -f ${APK} rm -f ${APK}
@ -92,214 +92,214 @@ get_apk_info () {
get_lib_info () { get_lib_info () {
LIB_FILE=$(basename ${1}) local lib_file=$(basename ${1})
LIB_PATH=$(dirname ${1} | sed -e 's/.*NanoDroid/NanoDroid/') local lib_path=$(dirname ${1} | sed -e 's/.*NanoDroid/NanoDroid/')
case ${LIB_FILE} in case ${lib_file} in
*libjni_latinimegoogle* ) LIB_NAME="Latin IME Google" ;; *libjni_latinimegoogle* ) LIB_NAME="Latin IME Google" ;;
*libjni_keyboarddecoder*) LIB_NAME="Keyboard Decoder" ;; *libjni_keyboarddecoder*) LIB_NAME="Keyboard Decoder" ;;
esac esac
case ${1} in case ${1} in
*19* ) LIB_CODE="19 [KitKat]" ;; *19* ) local lib_code="19 [KitKat]" ;;
*21* ) LIB_CODE="21 [Lollipop]" ;; *21* ) local lib_code="21 [Lollipop]" ;;
*22* ) LIB_CODE="22 [Lollipop]" ;; *22* ) local lib_code="22 [Lollipop]" ;;
*23* ) LIB_CODE="23 [Marshmallow]" ;; *23* ) local lib_code="23 [Marshmallow]" ;;
*24* ) LIB_CODE="23 [Nougat] {24}" ;; *24* ) local lib_code="23 [Nougat] {24}" ;;
*25* ) LIB_CODE="23 [Nougat] {25}" ;; *25* ) local lib_code="23 [Nougat] {25}" ;;
*26* ) LIB_CODE="26 [Oreo] {26}" ;; *26* ) local lib_code="26 [Oreo] {26}" ;;
*27* ) LIB_CODE="27 [Oreo]" ;; *27* ) local lib_code="27 [Oreo]" ;;
*28* ) LIB_CODE="28 [Pie]" ;; *28* ) local lib_code="28 [Pie]" ;;
* ) LIB_CODE="Generic" ;; * ) local lib_code="Generic" ;;
esac esac
LIB_ARCH=$(file -b ${1} | gawk -F, '{print $2 " [ " $1 " ] [" $3 " ]"}') local lib_arch=$(file -b ${1} | gawk -F, '{print $2 " [ " $1 " ] [" $3 " ]"}')
LIB_SPECS=$(file -b ${1} | gawk -F, '{print $4 " [" $5 " ]"}') local lib_specs=$(file -b ${1} | gawk -F, '{print $4 " [" $5 " ]"}')
LIB_SHA=$(sha256sum ${1} | gawk '{print $1}') lib_sha=$(sha256sum ${1} | gawk '{print $1}')
echo "Android Library: ${LIB_NAME} echo "Android Library: ${LIB_NAME}
| Filename: ${LIB_FILE} | Filename: ${lib_file}
| Origin: ${LIB_PATH} | Origin: ${lib_path}
| SDK Code: ${LIB_CODE} | SDK Code: ${lib_code}
| Arch: ${LIB_ARCH} | Arch: ${lib_arch}
| Specifics: ${LIB_SPECS} | Specifics: ${lib_specs}
| SHA256: ${LIB_SHA} | SHA256: ${lib_sha}
" >> ${REPORT_FILE} " >> ${report_file}
} }
get_bin_info () { get_bin_info () {
BIN_FILE=$(basename ${1}) local bin_file=$(basename ${1})
BIN_NAME=$(basename ${1} | sed -e 's/\..*//') local bin_name=$(basename ${1} | sed -e 's/\..*//')
BIN_PATH=$(dirname ${1} | sed -e 's/.*NanoDroid/NanoDroid/') local bin_path=$(dirname ${1} | sed -e 's/.*NanoDroid/NanoDroid/')
case ${BIN_PATH} in case ${bin_path} in
*xbin* ) BIN_TYPE="Android User Utility" ;; *xbin* ) local bin_type="Android User Utility" ;;
*tools*) BIN_TYPE="Android Installer Utility" ;; *tools*) local bin_type="Android Installer Utility" ;;
esac esac
BIN_ARCH=$(file -b ${1} | gawk -F, '{print $2 " [ " $1 " ] [" $3 " ]"}') local bin_arch=$(file -b ${1} | gawk -F, '{print $2 " [ " $1 " ] [" $3 " ]"}')
BIN_SPECS=$(file -b ${1} | gawk -F, '{print $4 " [" $7 " ] [" $6 " ]"}') local bin_specs=$(file -b ${1} | gawk -F, '{print $4 " [" $7 " ] [" $6 " ]"}')
BIN_SHA=$(sha256sum ${1} | gawk '{print $1}') local bin_sha=$(sha256sum ${1} | gawk '{print $1}')
echo "${BIN_TYPE}: ${BIN_NAME} echo "${bin_type}: ${bin_name}
| Filename: ${BIN_FILE} | Filename: ${bin_file}
| Origin: ${BIN_PATH} | Origin: ${bin_path}
| Arch: ${BIN_ARCH} | Arch: ${bin_arch}
| Specifics: ${BIN_SPECS} | Specifics: ${bin_specs}
| SHA256: ${BIN_SHA} | SHA256: ${bin_sha}
" >> ${REPORT_FILE} " >> ${report_file}
} }
get_etc_info () { get_etc_info () {
ETC_FILE=$(basename ${1}) local etc_file=$(basename ${1})
ETC_PATH=$(dirname ${1} | sed -e 's/.*NanoDroid/NanoDroid/') local etc_path=$(dirname ${1} | sed -e 's/.*NanoDroid/NanoDroid/')
ETC_PKGS="" local etc_pkgs=""
case ${ETC_PATH} in case ${etc_path} in
*gsync*default-permissions* ) ETC_TYPE="Google Sync Adapaters Permissions" *gsync*default-permissions* ) local etc_type="Google Sync Adapaters Permissions"
ETC_PKGS="$(gawk -F\" '/package=/{print $2}' ${1})" ;; local etc_pkgs="$(gawk -F\" '/package=/{print $2}' ${1})" ;;
*etc/permissions* ) ETC_TYPE="Application Permissions" *etc/permissions* ) local etc_type="Application Permissions"
ETC_PKGS="$(gawk -F\" '/package=/{print $2}' ${1})" ;; local etc_pkgs="$(gawk -F\" '/package=/{print $2}' ${1})" ;;
*etc/default-permissions* ) ETC_TYPE="Application Permissions" *etc/default-permissions* ) local etc_type="Application Permissions"
ETC_PKGS="$(gawk -F\" '/package=/{print $2}' ${1})" ;; local etc_pkgs="$(gawk -F\" '/package=/{print $2}' ${1})" ;;
*etc/terminfo* ) ETC_TYPE="GNU Nano Terminfo" ;; *etc/terminfo* ) local etc_type="GNU Nano Terminfo" ;;
*etc/init.d* ) ETC_TYPE="NanoDroid init Script" ;; *etc/init.d* ) local etc_type="NanoDroid init Script" ;;
*etc/sysconfig* ) ETC_TYPE="Linux sysconfig Settings" ;; *etc/sysconfig* ) local etc_type="Linux sysconfig Settings" ;;
*etc/bash* ) ETC_TYPE="GNU Bash Configuration" ;; *etc/bash* ) local etc_type="GNU Bash Configuration" ;;
*etc/org.fdroid.fdroid* ) ETC_TYPE="F-Droid Configuration" ;; *etc/org.fdroid.fdroid* ) local etc_type="F-Droid Configuration" ;;
esac esac
ETC_SHA=$(sha256sum ${1} | gawk '{print $1}') local etc_sha=$(sha256sum ${1} | gawk '{print $1}')
echo "${ETC_TYPE}: ${ETC_FILE} echo "${etc_type}: ${etc_file}
| Filename: ${ETC_FILE} | Filename: ${etc_file}
| Origin: ${ETC_PATH} | Origin: ${etc_path}
| SHA256: ${ETC_SHA}" >> ${REPORT_FILE} | SHA256: ${etc_sha}" >> ${report_file}
if [ ! -z "${ETC_PKGS}" ]; then if [ ! -z "${etc_pkgs}" ]; then
echo -e " | Packages:\n$(printf "\t|- %s\n" ${ETC_PKGS})\n" >> ${REPORT_FILE} echo -e " | Packages:\n$(printf "\t|- %s\n" ${etc_pkgs})\n" >> ${report_file}
else echo "" >> ${REPORT_FILE} else echo "" >> ${report_file}
fi fi
} }
get_dex_info () { get_dex_info () {
DEX_FILE=$(basename ${1}) local dex_file=$(basename ${1})
DEX_PATH=$(dirname ${1} | sed -e 's/.*NanoDroid/NanoDroid/') local dex_path=$(dirname ${1} | sed -e 's/.*NanoDroid/NanoDroid/')
case ${DEX_FILE} in case ${dex_file} in
*services* ) DEX_TYPE="Android DEX Patch File" *services* ) local dex_type="Android DEX Patch File"
DEX_NAME=$(basename ${1} .jar.dex) ;; local dex_name=$(basename ${1} .jar.dex) ;;
* ) DEX_TYPE="Android Dalvik Executable" * ) local dex_type="Android Dalvik Executable"
DEX_NAME=$(basename ${1} .dex) ;; local dex_name=$(basename ${1} .dex) ;;
esac esac
case ${DEX_FILE} in case ${dex_file} in
*services* ) DEX_SDK=$(gawk -F\_ '{print $2}' <(echo ${DEX_FILE})) ;; *services* ) local dex_sdk=$(gawk -F\_ '{print $2}' <(echo ${dex_file})) ;;
*smali* ) DEX_SDK=$(sed 's/.*_\(.*\)\..*/\1/' <(echo ${DEX_FILE})) ;; *smali* ) local dex_sdk=$(sed 's/.*_\(.*\)\..*/\1/' <(echo ${dex_file})) ;;
* ) DEX_SDK="universal" ;; * ) local dex_sdk="universal" ;;
esac esac
DEX_VER=$(file -b ${1} | gawk '{print $5}') dex_ver=$(file -b ${1} | gawk '{print $5}')
DEX_SHA=$(sha256sum ${1} | gawk '{print $1}') dex_sha=$(sha256sum ${1} | gawk '{print $1}')
echo "${DEX_TYPE}: ${DEX_NAME} echo "${dex_type}: ${dex_name}
| Filename: ${DEX_FILE} | Filename: ${dex_file}
| Origin: ${DEX_PATH} | Origin: ${dex_path}
| DEX Version: ${DEX_VER} | DEX Version: ${dex_ver}
| DEX SDK: ${DEX_SDK} | DEX SDK: ${dex_sdk}
| SHA256: ${DEX_SHA} | SHA256: ${dex_sha}
" >> ${REPORT_FILE} " >> ${report_file}
} }
get_msc_info () { get_msc_info () {
case ${1} in case ${1} in
*CommonAddon* ) MSC_TYPE="NanoDroid universal addon.d" ;; *CommonAddon* ) local msc_type="NanoDroid universal addon.d" ;;
*CommonInstaller* ) MSC_TYPE="NanoDroid universal Installer" ;; *CommonInstaller* ) local msc_type="NanoDroid universal Installer" ;;
*service.sh* ) MSC_TYPE="NanoDroid universal Magisk Module services.sh" ;; *service.sh* ) local msc_type="NanoDroid universal Magisk Module services.sh" ;;
*Full*update* ) MSC_TYPE="NanoDroid Full Package TWRP invoker" ;; *Full*update* ) local msc_type="NanoDroid Full Package TWRP invoker" ;;
*Full*.prop* ) MSC_TYPE="NanoDroid Full Package Module Module properties" ;; *Full*.prop* ) local msc_type="NanoDroid Full Package Module Module properties" ;;
*microG*update* ) MSC_TYPE="NanoDroid microG Package TWRP invoker" ;; *microG*update* ) local msc_type="NanoDroid microG Package TWRP invoker" ;;
*microG*.prop* ) MSC_TYPE="NanoDroid microG Package Module Module properties" ;; *microG*.prop* ) local msc_type="NanoDroid microG Package Module Module properties" ;;
*FDroid*update* ) MSC_TYPE="NanoDroid F-Droid Package TWRP invoker" ;; *FDroid*update* ) local msc_type="NanoDroid F-Droid Package TWRP invoker" ;;
*FDroid*.prop* ) MSC_TYPE="NanoDroid F-Droid Package Module Module properties" ;; *FDroid*.prop* ) local msc_type="NanoDroid F-Droid Package Module Module properties" ;;
*Bromite*update* ) MSC_TYPE="NanoDroid BromiteWebView Package TWRP invoker" ;; *Bromite*update* ) local msc_type="NanoDroid BromiteWebView Package TWRP invoker" ;;
*Bromite*.prop* ) MSC_TYPE="NanoDroid BromiteWebView Package Module Module properties" ;; *Bromite*.prop* ) local msc_type="NanoDroid BromiteWebView Package Module Module properties" ;;
*OsmAnd*update* ) MSC_TYPE="NanoDroid OsmAnd Package TWRP invoker" ;; *OsmAnd*update* ) local msc_type="NanoDroid OsmAnd Package TWRP invoker" ;;
*OsmAnd*.prop* ) MSC_TYPE="NanoDroid OsmAnd Package Module Module properties" ;; *OsmAnd*.prop* ) local msc_type="NanoDroid OsmAnd Package Module Module properties" ;;
*CommonPatcher* ) MSC_TYPE="NanoDroid Framework Patcher" ;; *CommonPatcher* ) local msc_type="NanoDroid Framework Patcher" ;;
*70-nanodroidpatcher.sh* ) MSC_TYPE="NanoDroid Framework Patcher addon.d" ;; *70-nanodroidpatcher.sh* ) local msc_type="NanoDroid Framework Patcher addon.d" ;;
*org.spoofing.apk*) MSC_TYPE="NanoDroid Framework Patcher spoofing info provider" ;; *org.spoofing.apk*) local msc_type="NanoDroid Framework Patcher spoofing info provider" ;;
*patcher*update* ) MSC_TYPE="NanoDroid Framework Patcher TWRP invoker" ;; *patcher*update* ) local msc_type="NanoDroid Framework Patcher TWRP invoker" ;;
*SetupWizard*update*) MSC_TYPE="NanoDroid SetupWizard AROMA invoker" ;; *SetupWizard*update*) local msc_type="NanoDroid SetupWizard AROMA invoker" ;;
*SetupWizard*aroma*) MSC_TYPE="NanoDroid SetupWizard AROMA configuration" ;; *SetupWizard*aroma*) local msc_type="NanoDroid SetupWizard AROMA configuration" ;;
*SetupWizard/nano*) MSC_TYPE="NanoDroid SetupWizard Worker" ;; *SetupWizard/nano*) local msc_type="NanoDroid SetupWizard Worker" ;;
*SysTest* ) MSC_TYPE="NanoDroid System Tester" ;; *SysTest* ) local msc_type="NanoDroid System Tester" ;;
*systest*update* ) MSC_TYPE="NanoDroid System Tester TWRP invoker" ;; *systest*update* ) local msc_type="NanoDroid System Tester TWRP invoker" ;;
*uninstaller*binary*) MSC_TYPE="NanoDroid Uninstaller" ;; *uninstaller*binary*) local msc_type="NanoDroid Uninstaller" ;;
*uninstaller*update*) MSC_TYPE="NanoDroid Uninstaller TWRP invoker" ;; *uninstaller*update*) local msc_type="NanoDroid Uninstaller TWRP invoker" ;;
*ChangeLog.md* ) MSC_TYPE="NanoDroid ChangeLog" ;; *ChangeLog.md* ) local msc_type="NanoDroid ChangeLog" ;;
*README.md* ) MSC_TYPE="NanoDroid README" ;; *README.md* ) local msc_type="NanoDroid README" ;;
*.nanodroid-apps* ) MSC_TYPE="NanoDroid default app installation configuration" ;; *.nanodroid-apps* ) local msc_type="NanoDroid default app installation configuration" ;;
*.nanodroid-setup*) MSC_TYPE="NanoDroid default installation configuration" ;; *.nanodroid-setup*) local msc_type="NanoDroid default installation configuration" ;;
*.nanodroid-overlay*) MSC_TYPE="NanoDroid default overlay configuration" ;; *.nanodroid-overlay*) local msc_type="NanoDroid default overlay configuration" ;;
*.maps.jar* ) MSC_TYPE="microG Maps v1 support" ;; *.maps.jar* ) local msc_type="microG Maps v1 support" ;;
*noti*.ogg* ) MSC_TYPE="The Legend of Zelda: Notification" ;; *noti*.ogg* ) local msc_type="The Legend of Zelda: Notification" ;;
*ring*.ogg* ) MSC_TYPE="The Legend of Zelda: Ringtone" ;; *ring*.ogg* ) local msc_type="The Legend of Zelda: Ringtone" ;;
*ui*.ogg* ) MSC_TYPE="The Legend of Zelda: UI Sound" ;; *ui*.ogg* ) local msc_type="The Legend of Zelda: UI Sound" ;;
*noti*.mp3* ) MSC_TYPE="The Legend of Zelda: Notification" ;; *noti*.mp3* ) local msc_type="The Legend of Zelda: Notification" ;;
*ring*.mp3* ) MSC_TYPE="The Legend of Zelda: Ringtone" ;; *ring*.mp3* ) local msc_type="The Legend of Zelda: Ringtone" ;;
*ui*.mp3* ) MSC_TYPE="The Legend of Zelda: UI Sound" ;; *ui*.mp3* ) local msc_type="The Legend of Zelda: UI Sound" ;;
*.ttf* ) MSC_TYPE="Nintendo UI Font" ;; *.ttf* ) local msc_type="Nintendo UI Font" ;;
*LICENSE* ) MSC_TYPE="exclude" ;; *LICENSE* ) local msc_type="exclude" ;;
*doc* ) MSC_TYPE="exclude" ;; *doc* ) local msc_type="exclude" ;;
*build-package* ) MSC_TYPE="exclude" ;; *build-package* ) local msc_type="exclude" ;;
*.json* ) MSC_TYPE="exclude" ;; *.json* ) local msc_type="exclude" ;;
*.git* ) MSC_TYPE="exclude" ;; *.git* ) local msc_type="exclude" ;;
*NanoDroid_Report*) MSC_TYPE="exclude" ;; *NanoDroid_Report*) local msc_type="exclude" ;;
*NanoDroid/dist* ) MSC_TYPE="exclude" ;; *NanoDroid/dist* ) local msc_type="exclude" ;;
* ) MSC_TYPE="unknown" ;; * ) local msc_type="unknown" ;;
esac esac
case ${MSC_TYPE} in case ${msc_type} in
exclude ) return 0 ;; exclude ) return 0 ;;
unknown ) echo "No report template for file: ${1}" ;; unknown ) echo "No report template for file: ${1}" ;;
* ) MSC_FILE=$(basename ${1}) * ) local msc_file=$(basename ${1})
MSC_NAME=$(basename ${1} | sed -e 's/\..*//') local msc_name=$(basename ${1} | sed -e 's/\..*//')
MSC_PATH=$(dirname ${1} | sed -e 's/.*NanoDroid/NanoDroid/') local msc_path=$(dirname ${1} | sed -e 's/.*NanoDroid/NanoDroid/')
MSC_SHA=$(sha256sum ${1} | gawk '{print $1}') local msc_sha=$(sha256sum ${1} | gawk '{print $1}')
echo "${MSC_TYPE}: ${MSC_NAME} echo "${msc_type}: ${msc_name}
| Filename: ${MSC_FILE} | Filename: ${msc_file}
| Origin: ${MSC_PATH} | Origin: ${msc_path}
| SHA256: ${MSC_SHA} | SHA256: ${msc_sha}
" >> ${REPORT_FILE} " >> ${report_file}
;; ;;
esac esac
@ -309,36 +309,36 @@ get_dst_info () {
if [[ ! ${1} == *NanoDroid/dist* ]]; then if [[ ! ${1} == *NanoDroid/dist* ]]; then
DST_FILE=$(basename ${1}) local dst_file=$(basename ${1})
DST_NAME=$(basename ${1} | sed -e 's/-[0-9].*//') local dst_name=$(basename ${1} | sed -e 's/-[0-9].*//')
DST_PATH=$(dirname ${1} | sed -e 's/.*NanoDroid/NanoDroid/') local dst_path=$(dirname ${1} | sed -e 's/.*NanoDroid/NanoDroid/')
case ${DST_FILE} in case ${dst_file} in
*NanoDroid-[0-9]*.zip*) DST_PKG="NanoDroid Full" ;; *NanoDroid-[0-9]*.zip*) local dst_pkg="NanoDroid Full" ;;
*microG*.zip* ) DST_PKG="NanoDroid microG" ;; *microG*.zip* ) local dst_pkg="NanoDroid microG" ;;
*fdroid*.zip* ) DST_PKG="NanoDroid F-Droid" ;; *fdroid*.zip* ) local dst_pkg="NanoDroid F-Droid" ;;
*BromiteWebView*.zip* ) DST_PKG="NanoDroid BromiteWebView" ;; *BromiteWebView*.zip* ) local dst_pkg="NanoDroid BromiteWebView" ;;
*OsmAnd*.zip* ) DST_PKG="NanoDroid OsmAnd" ;; *OsmAnd*.zip* ) local dst_pkg="NanoDroid OsmAnd" ;;
*patcher*.zip* ) DST_PKG="NanoDroid Framework Patcher" ;; *patcher*.zip* ) local dst_pkg="NanoDroid Framework Patcher" ;;
*setupwizard*.zip* ) DST_PKG="NanoDroid SetupWizard" ;; *setupwizard*.zip* ) local dst_pkg="NanoDroid SetupWizard" ;;
*systest*.zip* ) DST_PKG="NanoDroid System Tester" ;; *systest*.zip* ) local dst_pkg="NanoDroid System Tester" ;;
*uninstaller*.zip* ) DST_PKG="NanoDroid Uninstaller" ;; *uninstaller*.zip* ) local dst_pkg="NanoDroid Uninstaller" ;;
esac esac
case ${DST_FILE} in case ${dst_file} in
*.zip ) DST_TYPE="Flashable Package" ;; *.zip ) local dst_type="Flashable Package" ;;
*.sha256 ) DST_TYPE="Flashable Package (SHA256 Checksum)" ;; *.sha256 ) local dst_type="Flashable Package (SHA256 Checksum)" ;;
*.sig ) DST_TYPE="Flashable Package (GPG Signature)" ;; *.sig ) local dst_type="Flashable Package (GPG Signature)" ;;
esac esac
DST_SHA=$(sha256sum ${1} | gawk '{print $1}') dst_sha=$(sha256sum ${1} | gawk '{print $1}')
echo "${DST_TYPE}: ${DST_NAME} echo "${dst_type}: ${dst_name}
| Filename: ${DST_FILE} | Filename: ${dst_file}
| Origin: ${DST_PATH} | Origin: ${dst_path}
| Package: ${DST_PKG} | Package: ${dst_pkg}
| SHA256: ${DST_SHA} | SHA256: ${dst_sha}
" >> ${REPORT_FILE} " >> ${report_file}
fi fi

View File

@ -1,5 +1,32 @@
#!/bin/bash #!/bin/bash
# MicroG
update_act[0]='0'
# Swipe
update_act[1]='0'
# Gsync
update_act[2]='0'
# Bromite
update_act[3]='0'
# Osmand
update_act[4]='0'
# FDroid
update_act[5]='0'
# FDroid Privileged Extension
update_act[6]='0'
# AuroraDroid
update_act[7]='0'
# AuroraStore
update_act[8]='0'
# AuroraServices
update_act[9]='0'
# Yalp
update_act[10]='0'
# Phonesky
update_act[11]='0'
# General Apps
update_act[12]='0'
nanodroid_pull () { nanodroid_pull () {
update_microg update_microg
update_fdroid update_fdroid
@ -10,23 +37,27 @@ nanodroid_pull () {
update_osmand update_osmand
} }
update_swipe () { grab_swipe () {
for ARCH in arm arm64 x86 x86_64; do for arch in arm arm64 x86 x86_64; do
grab_lib_from_ogapps libjni_keyboarddecoder.so 23 ${ARCH} false grab_lib_from_ogapps libjni_keyboarddecoder.so 23 ${arch} false
done done
for ARCH in arm arm64; do for arch in arm arm64; do
for SDK in 19 21 22 23 27 28; do for sdk in 19 21 22 23 27 28; do
grab_lib_from_ogapps libjni_latinimegoogle.so ${SDK} ${ARCH} true grab_lib_from_ogapps libjni_latinimegoogle.so ${sdk} ${arch} true
done done
done done
for ARCH in x86 x86_64; do for arch in x86 x86_64; do
grab_lib_from_ogapps libjni_latinimegoogle.so 23 ${ARCH} false grab_lib_from_ogapps libjni_latinimegoogle.so 23 ${arch} false
done done
} }
update_microg () { update_swipe () {
update_act[1]='1'
}
grab_microg () {
# applications managed in repositories # applications managed in repositories
grab_apk_from_repo ${uG_GMSCORE[@]} grab_apk_from_repo ${uG_GMSCORE[@]}
grab_apk_from_repo ${uG_GSFPROXY[@]} grab_apk_from_repo ${uG_GSFPROXY[@]}
@ -37,15 +68,17 @@ update_microg () {
grab_apk_from_repo ${fd_NLPNOMINATIM[@]} grab_apk_from_repo ${fd_NLPNOMINATIM[@]}
grab_apk_from_repo ${fd_NLPAPPLE[@]} grab_apk_from_repo ${fd_NLPAPPLE[@]}
grab_apk_from_repo ${fd_NLPRADIOCELL[@]} grab_apk_from_repo ${fd_NLPRADIOCELL[@]}
grab_apk_from_repo ${fd_YALPSTORE[@]}
grab_apk_from_repo ${fd_AURORASTORE[@]}
grab_apk_from_repo ${nlx_PHONESKY[@]}
# GitLab
grab_apk_from_gitlab ${gl_AURORASERVICES[@]}
} }
update_gsync () { update_microg () {
update_act[0]='1'
update_act[8]='1'
update_act[9]='1'
update_act[10]='1'
update_act[11]='1'
}
grab_gsync () {
# KK LL M N O P # KK LL M N O P
for API in 19 21 23 24 26 28; do for API in 19 21 23 24 26 28; do
grab_apk_from_ogapps ${og_CONSYNC[@]} ${API} grab_apk_from_ogapps ${og_CONSYNC[@]} ${API}
@ -55,14 +88,18 @@ update_gsync () {
grab_apk_from_ogapps ${og_CALSYNC[@]} grab_apk_from_ogapps ${og_CALSYNC[@]}
} }
update_fdroid () { update_gsync () {
grab_apk_from_repo ${fd_FDROID[@]} update_act[2]='1'
grab_apk_from_repo ${fd_FDROID_PE[@]}
grab_apk_from_repo ${fd_AURORADROID[@]}
grab_apk_from_gitlab ${gl_AURORASERVICES[@]}
} }
update_apps () { update_fdroid () {
update_act[5]='1'
update_act[6]='1'
update_act[7]='1'
update_act[9]='1'
}
grab_apps () {
# applications managed in repositories # applications managed in repositories
grab_apk_from_repo ${fd_ALARMIO[@]} grab_apk_from_repo ${fd_ALARMIO[@]}
grab_apk_from_repo ${fd_AMAZE[@]} grab_apk_from_repo ${fd_AMAZE[@]}
@ -97,13 +134,40 @@ update_apps () {
grab_apk_from_url ${raw_XDALABS[@]} grab_apk_from_url ${raw_XDALABS[@]}
} }
update_bromite () { update_apps () {
update_act[12]='1'
}
grab_bromite () {
grab_apk_from_repo ${bm_WEBVIEW_arm64[@]} grab_apk_from_repo ${bm_WEBVIEW_arm64[@]}
grab_apk_from_repo ${bm_WEBVIEW_arm[@]} grab_apk_from_repo ${bm_WEBVIEW_arm[@]}
grab_apk_from_repo ${bm_WEBVIEW_x86[@]} grab_apk_from_repo ${bm_WEBVIEW_x86[@]}
} }
update_osmand () { update_bromite () {
update_act[3]='1'
}
grab_osmand () {
grab_apk_from_repo ${fd_OSMAND[@]} grab_apk_from_repo ${fd_OSMAND[@]}
grab_apk_from_repo ${fd_OSMAND_CONTOURLINES[@]} grab_apk_from_repo ${fd_OSMAND_CONTOURLINES[@]}
} }
update_osmand () {
update_act[4]='1'
}
update_master () {
[ "${update_act[0]}" = "1" ] && grab_microg
[ "${update_act[7]}" = "1" ] && grab_apk_from_repo ${fd_AURORADROID[@]}
[ "${update_act[8]}" = "1" ] && grab_apk_from_repo ${fd_AURORASTORE[@]}
[ "${update_act[9]}" = "1" ] && grab_apk_from_gitlab ${gl_AURORASERVICES[@]}
[ "${update_act[5]}" = "1" ] && grab_apk_from_repo ${fd_FDROID[@]}
[ "${update_act[6]}" = "1" ] && grab_apk_from_repo ${fd_FDROID_PE[@]}
[ "${update_act[10]}" = "1" ] && grab_apk_from_repo ${fd_YALPSTORE[@]}
[ "${update_act[11]}" = "1" ] && grab_apk_from_repo ${nlx_PHONESKY[@]}
[ "${update_act[3]}" = "1" ] && grab_bromite
[ "${update_act[4]}" = "1" ] && grab_osmand
[ "${update_act[12]}" = "1" ] && grab_apps
[ "${update_act[2]}" = "1" ] && grab_gsync
}