Skip to content

Commit 46b9ab3

Browse files
committed
chore: sync with microG unofficial installer
Signed-off-by: ale5000 <15793015+ale5000-git@users.noreply.github.com>
1 parent 066d3f7 commit 46b9ab3

File tree

6 files changed

+88
-44
lines changed

6 files changed

+88
-44
lines changed

tools/bits-info.sh

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11
#!/usr/bin/env sh
2-
# SPDX-FileCopyrightText: (c) 2024 ale5000
2+
# SPDX-FileCopyrightText: 2024 ale5000
33
# SPDX-License-Identifier: GPL-3.0-or-later
44

5+
# @name Bits info
6+
# @brief Report bit-widths of the shell, OS, CPU, and POSIX utilities; detect the architecture of binary files.
7+
# @description Probes the integer width of the current shell (arithmetic,
8+
# test built-in, printf signed/unsigned, $RANDOM seed) and of common POSIX
9+
# utilities (awk printf, cut -b, date timestamps), and reports OS and CPU
10+
# bitness.
11+
#
12+
# When called with file arguments, identifies the format and target
13+
# architecture (32-bit / 64-bit) of binary files, including ELF, PE, NE, LE,
14+
# LX, MZ (plain DOS), APE (Actually Portable Executables), Mach-O, FAT Mach-O,
15+
# and Java bytecode.
16+
# @author ale5000
17+
18+
# Get the latest version from here: https://github.com/micro5k/microg-unofficial-installer/tree/main/tools
519
# shellcheck enable=all
620
# shellcheck disable=SC3043 # In POSIX sh, local is undefined
721

822
SCRIPT_NAME='Bits info'
9-
SCRIPT_VERSION='1.5.30'
23+
SCRIPT_VERSION='1.5.31'
1024

1125
### CONFIGURATION ###
1226

@@ -1452,9 +1466,11 @@ while test "${#}" -gt 0; do
14521466
-V | --version)
14531467
execute_script='false'
14541468
no_pause=1
1469+
# REUSE-IgnoreStart
14551470
printf '%s\n' "${SCRIPT_NAME} v${SCRIPT_VERSION}"
1456-
printf '%s\n' "Copy""right (c) 2024 ale5000"
1457-
printf '%s\n' 'License GPLv3+'
1471+
printf '%s\n' "Copyright (c) 2024 ale5000"
1472+
printf '%s\n' 'License GPL v3+'
1473+
# REUSE-IgnoreEnd
14581474
;;
14591475
-h | --help | '-?')
14601476
execute_script='false'

tools/dl-perm-list.sh

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
#!/usr/bin/env sh
2-
# @name Android permissions retriever
3-
# @brief Retrieve the list of Android system permissions
4-
# @author ale5000
5-
# Get the latest version from here: https://github.com/micro5k/microg-unofficial-installer/tree/main/tools
6-
7-
# SPDX-FileCopyrightText: (c) 2025 ale5000
2+
# SPDX-FileCopyrightText: 2025 ale5000
83
# SPDX-License-Identifier: GPL-3.0-or-later OR Apache-2.0
94

5+
# @name AOSP system permissions downloader
6+
# @brief Download and parse AOSP system permission declarations for each supported Android API level.
7+
# @description For every supported Android API level (23 to 36) fetches the
8+
# corresponding AndroidManifest.xml from AOSP, extracts all <permission>
9+
# entries, and saves one XML file per API level under data/perms/.
10+
#
11+
# The resulting files are consumed by generate-perm-xml.sh.
12+
# @author ale5000
13+
14+
# Get the latest version from here: https://github.com/micro5k/microg-unofficial-installer/tree/main/tools
1015
# shellcheck enable=all
1116
# shellcheck disable=SC3043 # In POSIX sh, local is undefined
1217

1318
readonly SCRIPT_NAME='Android permissions retriever'
1419
readonly SCRIPT_SHORTNAME='DlPermList'
15-
readonly SCRIPT_VERSION='0.3.1'
20+
readonly SCRIPT_VERSION='0.3.2'
1621
readonly SCRIPT_AUTHOR='ale5000'
1722

1823
set -u
@@ -170,9 +175,11 @@ execute_script='true'
170175
while test "${#}" -gt 0; do
171176
case "${1?}" in
172177
-V | --version)
178+
# REUSE-IgnoreStart
173179
printf '%s\n' "${SCRIPT_NAME:?} v${SCRIPT_VERSION:?}"
174-
printf '%s\n' "Copy""right (c) 2025 ${SCRIPT_AUTHOR:?}"
175-
printf '%s\n' 'License GPL-3.0+ OR Apache-2.0'
180+
printf '%s\n' "Copyright (c) 2025 ${SCRIPT_AUTHOR:?}"
181+
printf '%s\n' 'License GPL v3+ OR Apache v2'
182+
# REUSE-IgnoreEnd
176183
execute_script='false'
177184
;;
178185

tools/generate-perm-xml.sh

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
#!/usr/bin/env sh
2-
# @name XML permissions generator
3-
# @brief Generate XML files for Android default and privileged permissions
4-
# @author ale5000
5-
# Get the latest version from here: https://github.com/micro5k/microg-unofficial-installer/tree/main/tools
6-
7-
# SPDX-FileCopyrightText: (c) 2025 ale5000
2+
# SPDX-FileCopyrightText: 2025 ale5000
83
# SPDX-License-Identifier: GPL-3.0-or-later OR Apache-2.0
94

5+
# @name Android ROM permissions XML generator
6+
# @brief Generate privapp-permissions and default-permissions XML files for Android ROM builds.
7+
# @description Takes one or more Android APK files, reads their declared
8+
# permissions using aapt2 or aapt, cross-references them against the AOSP
9+
# permission database built by dl-perm-list.sh, and emits XML files with
10+
# privapp-permissions or default-permissions declarations for use in custom
11+
# Android ROM builds.
12+
#
13+
# Output is written to the output/ subdirectory.
14+
# @author ale5000
15+
16+
# Get the latest version from here: https://github.com/micro5k/microg-unofficial-installer/tree/main/tools
1017
# shellcheck enable=all
1118
# shellcheck disable=SC3043 # In POSIX sh, local is undefined
1219

1320
readonly SCRIPT_NAME='XML permissions generator'
1421
readonly SCRIPT_SHORTNAME='GenPermXml'
15-
readonly SCRIPT_VERSION='0.3.4'
22+
readonly SCRIPT_VERSION='0.3.5'
1623
readonly SCRIPT_AUTHOR='ale5000'
1724

1825
set -u
@@ -144,12 +151,14 @@ is_system_permission()
144151

145152
begin_xml()
146153
{
154+
# REUSE-IgnoreStart
147155
printf '%s\n' '<?xml version="1.0" encoding="utf-8"?>'
148156
printf '%s\n' '<!--'
149-
printf '%s\n' ' SPDX''-FileCopyrightText: NONE'
150-
printf '%s\n' ' SPDX''-License-Identifier: CC0-1.0'
157+
printf '%s\n' ' SPDX-FileCopyrightText: NONE'
158+
printf '%s\n' ' SPDX-License-Identifier: CC0-1.0'
151159
printf '%s\n' " Generated by ${SCRIPT_SHORTNAME:?} of ${SCRIPT_AUTHOR:?}"
152160
printf '%s\n\n' '-->'
161+
# REUSE-IgnoreEnd
153162

154163
if test "${3:?}" = 'privapp-permissions'; then
155164
printf '%s\n' '<permissions>'
@@ -527,9 +536,11 @@ execute_script='true'
527536
while test "${#}" -gt 0; do
528537
case "${1?}" in
529538
-V | --version)
539+
# REUSE-IgnoreStart
530540
printf '%s\n' "${SCRIPT_NAME:?} v${SCRIPT_VERSION:?}"
531-
printf '%s\n' "Copy""right (c) 2025 ${SCRIPT_AUTHOR:?}"
532-
printf '%s\n' 'License GPL-3.0+ OR Apache-2.0'
541+
printf '%s\n' "Copyright (c) 2025 ${SCRIPT_AUTHOR:?}"
542+
printf '%s\n' 'License GPL v3+ OR Apache v2'
543+
# REUSE-IgnoreEnd
533544
execute_script='false'
534545
;;
535546
-v) SCRIPT_VERBOSE='true' ;;

tools/get-signature.sh

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
#!/usr/bin/env sh
2-
# @name Find app signature
3-
# @brief Find the signature of Android applications
2+
# SPDX-FileCopyrightText: 2025 ale5000
3+
# SPDX-License-Identifier: GPL-3.0-or-later OR Apache-2.0
4+
5+
# @name Android app signing certificate extractor
6+
# @brief Extract and print the SHA-256 fingerprint of the signing certificate of an Android APK file.
7+
# @description Given an APK file path, uses apksigner (preferred) or keytool
8+
# as a fallback to retrieve the signing certificate's SHA-256 fingerprint
9+
# and prints it in the form sha256-cert-digest="<value>".
410
# @author ale5000
5-
# Get the latest version from here: https://github.com/micro5k/microg-unofficial-installer/tree/main/tools
6-
7-
# SPDX-FileCopyrightText: (c) 2025 ale5000
8-
# SPDX-License-Identifier: GPL-3.0-or-later
911

12+
# Get the latest version from here: https://github.com/micro5k/microg-unofficial-installer/tree/main/tools
1013
# shellcheck enable=all
1114
# shellcheck disable=SC3043 # In POSIX sh, local is undefined
1215

1316
readonly SCRIPT_NAME='Find app signature'
1417
readonly SCRIPT_SHORTNAME='FindAppSign'
15-
readonly SCRIPT_VERSION='0.1.0'
18+
readonly SCRIPT_VERSION='0.1.1'
1619
readonly SCRIPT_AUTHOR='ale5000'
1720

1821
pause_if_needed()
@@ -79,9 +82,11 @@ execute_script='true'
7982
while test "${#}" -gt 0; do
8083
case "${1?}" in
8184
-V | --version)
85+
# REUSE-IgnoreStart
8286
printf '%s\n' "${SCRIPT_NAME:?} v${SCRIPT_VERSION:?}"
83-
printf '%s\n' "Copy""right (c) 2025 ${SCRIPT_AUTHOR:?}"
84-
printf '%s\n' 'License GPLv3+'
87+
printf '%s\n' "Copyright (c) 2025 ${SCRIPT_AUTHOR:?}"
88+
printf '%s\n' 'License GPL v3+ OR Apache v2'
89+
# REUSE-IgnoreEnd
8590
execute_script='false'
8691
;;
8792

tools/help.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env sh
2-
3-
# SPDX-FileCopyrightText: (c) 2024 ale5000
2+
# SPDX-FileCopyrightText: 2024 ale5000
43
# SPDX-License-Identifier: GPL-3.0-or-later
4+
55
# shellcheck enable=all
66

77
if test -z "${MODULE_NAME-}" || test -z "${MAIN_DIR-}" || test -z "${PLATFORM-}" || test -z "${IS_BUSYBOX-}"; then

tools/list-app-perms.sh

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
#!/usr/bin/env sh
2-
# @name List apps permissions
3-
# @brief List the permissions used by Android applications
2+
# SPDX-FileCopyrightText: 2025 ale5000
3+
# SPDX-License-Identifier: GPL-3.0-or-later OR Apache-2.0
4+
5+
# @name Android app permissions lister
6+
# @brief Dump and list the permission names declared by Android APK files.
7+
# @description Uses aapt2 or aapt to dump and extract the uses-permission
8+
# entries declared in one or more APK files, and prints a sorted list of
9+
# the required permission names.
410
# @author ale5000
5-
# Get the latest version from here: https://github.com/micro5k/microg-unofficial-installer/tree/main/tools
6-
7-
# SPDX-FileCopyrightText: (c) 2025 ale5000
8-
# SPDX-License-Identifier: GPL-3.0-or-later
911

12+
# Get the latest version from here: https://github.com/micro5k/microg-unofficial-installer/tree/main/tools
1013
# shellcheck enable=all
1114
# shellcheck disable=SC3043 # In POSIX sh, local is undefined
1215

1316
readonly SCRIPT_NAME='List apps permissions'
1417
readonly SCRIPT_SHORTNAME='ListAppPerms'
15-
readonly SCRIPT_VERSION='0.1.0'
18+
readonly SCRIPT_VERSION='0.1.1'
1619
readonly SCRIPT_AUTHOR='ale5000'
1720

1821
# shellcheck disable=SC3040 # Ignore: In POSIX sh, set option pipefail is undefined
@@ -83,9 +86,11 @@ execute_script='true'
8386
while test "${#}" -gt 0; do
8487
case "${1?}" in
8588
-V | --version)
89+
# REUSE-IgnoreStart
8690
printf '%s\n' "${SCRIPT_NAME:?} v${SCRIPT_VERSION:?}"
87-
printf '%s\n' "Copy""right (c) 2025 ${SCRIPT_AUTHOR:?}"
88-
printf '%s\n' 'License GPLv3+'
91+
printf '%s\n' "Copyright (c) 2025 ${SCRIPT_AUTHOR:?}"
92+
printf '%s\n' 'License GPL v3+ OR Apache v2'
93+
# REUSE-IgnoreEnd
8994
execute_script='false'
9095
;;
9196

0 commit comments

Comments
 (0)