Magisk Modules

Last Update: 12.07.2025


Contents


  1. Magisk Modules
    1. Contents
    2. Introduction
    3. Magisk Module documentation
      1. Documentation for the Magisk Module with the network tools
      2. Documentation for the Magisk Module with OpenSSH
      3. Documentation for the Magisk Module with Python 3.14
      4. Documentation for the Magisk Module with Python 3.10
      5. Documentation for the Magisk Module with the compression tools
      6. Documentation for the Magisk Module with clang19 and the NDK r27b
      7. Documentation for the Magisk Module with clang20 and the NDK r29 beta1
      8. Documentation for the Magisk Module with tools to use an additional dynamic partition
      9. Documentation for the Magisk Module with bash
      10. Documentation for the Magisk Module with Debug tools
      11. Documentation for the Magisk Module with OpenVPN
      12. Documentation for the Magisk Module with Perl 5.42
    4. List of available Magisk Modules



Introduction


On this page I list and document most of the Magisk Modules I have created.

My Android HowTos can be found here:  http://bnsmb.de/My_HowTos_for_Android.html.

Download links for my scripts, TWRP images, other files, and some other Magisk Modules can be found here: http://bnsmb.de/My_HowTos_for_Android.html#Files_mentioned_in_the_HowTos

Most of the Magisk Modules listed here are also available in a github repository:  https://github.com/bnsmb/magisk-modules

All my repositories on github can be found here: https://github.com/bnsmb/



History


Changelog

10.07.2025

initial release of this Webpage

12.07.2025

removed duplicate entry for SELinux tools in the list of Magisk Modules


-

Magisk Module documentation




Documentation for the Magisk Module with the network tools


URL: https://xdaforums.com/t/module-network-tools-for-cli-sessions.4696517/


Documentation for the Magisk Module with the network tools
The Magisk Module network_tools contains various network related CLI tools for Android:

Tool
Description
Homepage URL
Comment
added in version
bmon
bmon is a monitoring and debugging tool to capture networking related statistics and prepare them visually in a human friendly way https://github.com/tgraf/bmon
bmon needs root access
1.0.0
ngrep
ngrep is a grep for network packets https://github.com/jpr5/ngrep ngrep needs root access
1.0.0
dig, mdig, host, nsloookup, nsupdate
dig is the Linux tool for hostname resolution via DNS server

mdig, host, nslookup, and nsupdate can also be used for hostname resolution.
https://gitlab.isc.org/ The binaries dig, mdig, host, nslookup, and nsupdate are from bind 9.11


"mdig is a multiple/pipelined query version of dig: instead of waiting for a response after sending each query, it begins by sending all queries.
Responses are displayed in the order in which they are received, not in the order the corresponding queries were sent."

The binaries from bind use the file /etc/resolv.conf to get the nameserver to use. The file resolv.conf in the Magisk Module is:

ASUS_I006D:/ $ cat /system/etc/resolv.conf                                                                                               
nameserver 8.8.8.8
nameserver 1.1.1.1

ASUS_I006D:/ $

To use dig on phones without the file resolv.conf use the dig parameter for the nameserver to use - for example to ask the nameserver 192.168.1.1:

ASUS_I006D:/ $ dig www.heise.de @192.168.1.1 +short
193.99.144.85
ASUS_I006D:/ $

To change the default nameserver, edit the file /data/adb/modules/network_tools/system/etc/resolv.conf

(Download link for the source: https://gitlab.isc.org/isc-projects/bind9/-/branches?state=all&sort=updated_desc&search=9.11)

1.0.0
configure_wlan_monitor_mode.sh
configure_wlan_monitor_mode.sh is a shell script to enable or disable monitor mode for the WLAN interface
n/a
the usage for the script is:
:
ASUS_I006D:/data/adb/modules/network_tools/system/bin # cd
ASUS_I006D:/ # configure_wlan_monitor_mode.sh -h

 Usage: configure_wlan_monitor_mode.sh [on|off|enable|disable|status] [if=interface] [executable_to_execute] [parameter_for_the executable]
 
 The default interface is wlan0
 
ASUS_I006D:/ #


Be aware that enabling the monitor mode disables WiFi.

To check the current WiFi status use

settings get global wifi_on


To enable WiFi again after disabling the monitor mode use the command

svc wifi enable

1.0.0





NcFTP NcFTP is a ftp client
https://www.ncftp.com/ The configuration directory for NcFTP is /data/local/tmp/ncftp_config; to change the directory set and export the variable NCFTPDIR before calling NcFTP or edit the value for the variable NCFTPDIR in the file /data/adb/modules/network_tools/system/bin/ncftp. 1.1.0
logger, telnet, ftp
logger, telnet and tftp from the GNU inteutils 2.5 (https://www.gnu.org/software/inetutils/inetutils.html) https://www.gnu.org/software/inetutils/inetutils.html The name of the logger from the GNU inetutils provided by this Magisk Module is glogger.

The logger from the GUN inetutils can not be used to write a message to the logs on the Android OS. But it can be used to write a log message to an external loghost.

Example

To write a message to the loghost 192.168.1.126 use

glogger -p user.error -h 192.168.1.126 "Hallo Ihr da draussen"

1.1.0





ifstat
"ifstat is a tool to report network interfaces bandwith just like vmstat/iostat do for other system counters. "
http://gael.roualland.free.fr/ifstat/
1.2.0
netperf, netserver
netperf is a network benchmark tool
http://www.netperf.org/netperf
1.2.0
links
links is a text mode web browser http://links.twibright.com
1.2.0
lynx
lynx is a text mode web browser https://lynx.invisible-island.net/
1.2.0
iperf3
"iperf3 is a tool for active measurements of the maximum achievable bandwidth on IP networks." https://github.com/esnet/iperf/

1.3.0
socat
"socat is a relay for bidirectional data transfer between two independent data channels. Each of these data channels may be a file, pipe, device (terminal or modem, etc.), socket (Unix, IP4, IP6 - raw, UDP, TCP), SSL, a client for SOCKS4, or proxy CONNECT. It supports broadcasts and multicasts, abstract Unix sockets, Linux tun/tap, GNU readline, and PTYs."
https://openhub.net/p/socat

1.6.0
in the directory

/system/bin/net-tools :

arp
dnsdomainname
hostname
ifconfig
ipmaddr
iptunnel
netstat
rarp
route

netstat is compiled with SELinux support (the other tools do not support SElinux)

All tools only need the standard libraries from the Android OS
https://github.com/ecki/net-tools

1.4.0
in the directory

/system/bin/tn3270 :

b3270
c3270
pr3287
prtodir
s3270
x3270if
playback

x3270 is a family of IBM 3270 terminal emulators and related tools.
 
  
https://x3270.miraheze.org/wiki/Downloads

1.5.0












Notes

The Magisk Module installs the binaries in /system/bin and some in /system/bin/net-tools and /system/bin/tn3270.

All executable files are either statically linked or dynamically linked executable files that only require the standard libraries of the Android operating system.


For all tools, that need special settings, the wrapper script /system/bin/network_tools_bin_wrapper is used:

ls -l /system/bin | grep ./network_tools_bin_wrapper
130|ASUS_I006D:/ $ date
Mon Nov 18 13:28:38 CET 2024
ASUS_I006D:/ $
ASUS_I006D:/ $ ls -l /system/bin | grep ./network_tools_bin_wrapper
lrwxrwxrwx 1 root root        27 1970-05-07 03:04 bmon -> ./network_tools_bin_wrapper
lrwxrwxrwx 1 root root        27 1970-05-07 03:04 links -> ./network_tools_bin_wrapper
lrwxrwxrwx 1 root root        27 1970-05-07 03:04 lynx -> ./network_tools_bin_wrapper
ASUS_I006D:/ $

 






The initial instructions to compile wget, nmap, curl and others are taken from this script:

https://github.com/Zackptg5/Cross-Compiled-Binaries-Android/blob/master/build_script/build.sh

A big thanks to Zackptg5 -- the build instructions for various Unix tools in the build.sh script in his repo helped a lot to compile the Unix tools in Android



History of this entry

05.10.2024

initial release

08.10.2024
  updated the entry to match version 1.3.0 of the module

13.10.2024
  updated the entry to match version 1.4.0 of the module

17.10.2024
  corrected the info about the new tools in version 1.4.0

18.11.2024
  updated the entry to match version 1.5.0 of the module

29.01.2025
  updated the entry to match version 1.6.0 of the module



 

Documentation for the Magisk Module with OpenSSH


URL: https://xdaforums.com/t/module-openssh-for-android.4696499/post-89966936



Notes:

This documentation is only valid for the Magisk Module with OpenSSH 9.9p2 or newer!

See the post https://xdaforums.com/t/module-openssh-for-android.4696499/ for the documentation of the Magisk Modules with OpenSSH 9.9p1.  

I have also created a tar archive with the OpenSSH binaries that can be used on phones without Magisk -- see How to connect to Android via ssh as user shell without root access  
 



Documentation for the Magisk Module with OpenSSH

The Magisk Module openssh contains the server and client binaries from OpenSSH for Android running on a arm64 CPU.

As of 12.05.2025 the newest version of this Magisk Module contains the files from OpenSSH 10.0p2 using OpenSSL 3.5.0:

ASUS_I006D:/ # sshd -V
OpenSSH_10.0p2, OpenSSL 3.5.0 8 Apr 2025
ASUS_I006D:/ #


The OpenSSH binaries are compiled with SELinux support.

All executables are dynamically linked but only for the standard Android libraries, e.g.:

|ASUS_I006D:/ $ ldd /system/bin/ssh
    linux-vdso.so.1 => [vdso] (0x7729119000)
    libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x7727286000)
    libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x77252c0000)
ASUS_I006D:/ $


The files and directories in the Module are:

FIle/Directory
content
Comment
/system/usr/bin/scp
/system/usr/bin/sftp
/system/usr/bin/ssh
/system/usr/bin/ssh-add
/system/usr/bin/ssh-agent
/system/usr/bin/ssh-keygen
/system/usr/bin/ssh-keyscan
/system/usr/bin/sshd
OpenSSH binaries

/system/bin/scp
/system/bin/sftp
/system/bin/ssh
/system/bin/ssh-add
/system/bin/ssh-agent
/system/bin/ssh-keygen
/system/bin/ssh-keyscan
/system/bin/sshd
symbolic links to the OpenSSH binaries in
/system/usr/bin

/system/usr/libexec/sftp-server
/system/usr/libexec/ssh-keysign
/system/usr/libexec/ssh-pkcs11-helper
/system/usr/libexec/ssh-sk-helper
/system/usr/libexec/sshd-auth
/system/usr/libexec/sshd-session

OpenSSH helper programs

/data/local/tmp/var/
/data/local/tmp/var/empty
/data/local/tmp/var/log
/data/local/tmp/var/mail
/data/local/tmp/var/run
/data/local/tmp/home

writable data directories for ssh and sshd
These directories will be created by the customization script if they do not yet exist.

The data in these directories is not changed when the Magisk Module is reinstalled or updated





/data/local/tmp/home/.ssh
.ssh directory of the user starting the sshd
This directory is used for the files known_hosts, authorized_keys and others

This directory is created by the customization script if it does not yet exist.



/etc/ssh/ssh_host_ed25519_key
/etc/ssh/ssh_host_ed25519_key.pub
/etc/ssh/ssh_host_rsa_key
/etc/ssh/ssh_host_rsa_key.pub
ssh host keys

The host keys are created by the customization script of the Magisk Module if they do not yet exist
The host keys are preserved if the Magisk Module is reinstalled or updated

To change or add new ssh host keys, create the keys in the directory /data/adb/modules/openssh/system/etc/ssh, update the file /system/etc/sshd_config, and reboot the phone
Note that the owner of the host keys must be the user shell.



/etc/ssh/ssh_config
ssh config file
This will file is preserved if the Magisk Module is reinstalled or updated

To update the file, edit the file /data/adb/modules/openssh/system/etc/ssh/ssh_config and reboot the phone or remount the file /system/etc/ssh_config
/etc/ssh/sshd_config
sshd config file
This will file is preserved if the Magisk Module is reinstalled or updated

To update the file, edit the file /data/adb/modules/openssh/system/etc/ssh/sshd_config and reboot the phone or remount the file /system/etc/sshd_config



/data/adb/modules_update/openssh/service.sh
start script for the sshd









The module service script /data/adb/modules_update/openssh/service.sh starts the sshd automatically after booting the phone if the file /data/local/tmp/home/start_sshd exists.
The sshd is started by the script with the log file /data/local/tmp/var/log/sshd.log if that file exists.
Additional parameter for the sshd started via service.sh can be defined in the file /data/local/tmp/home/.ssh/sshd_parameter.
The sshd is started as user shell.

The file /data/local/tmp/home/start_sshd is NOT created by the customization script of the Magisk Module.


Access via ssh is only possible with a public ssh key. To do this, the public ssh keys of the users who are allowed to connect must be entered in the file /data/local/tmp/home/.ssh/authorized_keys.


The following environment variables are defined for ssh sessions:

ASUS_I006D:/ # grep SetEnv /etc/ssh/sshd_config
SetEnv HOME=/data/local/tmp PS1="[ssh $(id -un )@$(hostname): ${PWD:-}]  "
ASUS_I006D:/ #


Since version 10.0p2.v1.1.0 of the module with OpenSSH 10.x and version 9.9p2.v1.1.0 of the module with OpenSSH 9.x, the privilege separation user is "nobody" so that the sshd can also be started by the root user.


Notes

Please note that the sshd configuration is somehow not secure to allow the sshd to be started by the user shell!

The sshd can be started by the user shell or the user root. It's recommended to always start the sshd as user shell to not change the permissions for the data files used by sshd.
The default port used by the sshd is 9022; the port is configured in the file /etc/ssh/sshd_config:

ASUS_I006D:/ # grep ^Port /etc/ssh/sshd_config
Port 9022
ASUS_I006D:/ #
 

Details for compiling OpenSSH for Android
The binaries are compiled with the Android NDK r27b using the API version 33; they should therefor work on Android 13 and newer versions.

OpenSSH was compiled with these options:

Compile options
OpenSSH has been configured with the following options:
                     User binaries: /system/usr/bin
                   System binaries: /system/usr/sbin
               Configuration files: /system/etc/ssh
                   Askpass program: /system/usr/libexec/ssh-askpass
                      Manual pages: /system/usr/man/manX
                          PID file: /data/local/tmp/var/run
  Privilege separation chroot path: /data/local/tmp/var/empty
            sshd default user PATH: /system/bin
                    Manpage format: doc
                       PAM support: no
                   OSF SIA support: no
                 KerberosV support: no
                   SELinux support: yes
                   libedit support: yes
                   libldns support: yes
  Solaris process contract support: no
           Solaris project support: no
         Solaris privilege support: no
       IP address in $DISPLAY hack: no
           Translate v4 in v6 hack: no
                  BSD Auth support: no
              Random number source: OpenSSL internal ONLY
             Privsep sandbox style: none
                   PKCS#11 support: yes
                  U2F/FIDO support: yes

              Host: aarch64-unknown-linux-android
          Compiler: /data/develop/android/android-ndk-r27b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android33-clang
    Compiler flags: --sysroot /data/develop/android/android-ndk-r27b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/ -O2 -w -I/data/develop/android/sysroot/usr/include -I/data/develop/android/android-ndk-r27b/toolchains/llvm/prebuilt/linux-x86_64/sysroot//usr/include -Wno-implicit-function-declaration -Wno-int-conversion -fPIE -I/data/develop/android/sysroot/selinux/usr/include -DHAVE_SETRESGID=1 -pipe -Wunknown-warning-option -Wno-error=format-truncation -Qunused-arguments -Wall -Wextra -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-parameter -Wno-unused-result -Wimplicit-fallthrough -Wmisleading-indentation -Wbitwise-instead-of-logical -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -ftrapv -fzero-call-used-regs=used -ftrivial-auto-var-init=zero -mretpoline -fno-builtin-memset -Dfd_mask=int 
Preprocessor flags: -I/data/develop/android/sysroot/usr/include  -DHAVE_ATTRIBUTE__SENTINEL__=1 -DBROKEN_SETRESGID  -I/system/usr/include -I/data/local/tmp/develop/sysroot/usr/include
      Linker flags: -L/data/develop/android/sysroot/usr/lib -L/data/local/tmp/develop/sysroot/usr/lib --sysroot /data/develop/android/android-ndk-r27b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/  -s -ffunction-sections -fdata-sections -Wl,--gc-sections -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/android-ndk-r27b/toolchains/llvm/prebuilt/linux-x86_64/sysroot//lib -L/data/develop/android/sysroot/selinux/usr/lib -ldl -lcrypto -lssl -lpcre2  -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wl,-z,retpolineplt -L/system/usr/lib
         Libraries: -lldns  -lselinux
     +for channels: -lcrypto  -lz





The configure options used are copied from the Termux Build script for OpenSSH:

    https://github.com/termux/termux-packages/blob/master/packages/openssh/build.sh

The configure command used to create the config for compiling OpenSSH in Android is in the file

   source/myconfigure

in the Magisk Module

All patches for OpenSSH from Termux that are useful for a Magisk Module with OpenSSH are applied to the source code.

The patches for OpenSSH in Termux are available here:

    https://github.com/termux/termux-packages/tree/master/packages/openssh

The patches used are in the directory ./source/patches in the Magisk Module; the patches were copied from the Termux repository at 2024-10-04.
The script source/patches/apply_patches.sh in the ZIP file with the Magisk Module can be used to apply the patches.

An additional patch was necessary to get the OpenSSH binaries working for the user shell:

Source: https://stackoverflow.com/questions/76376942/openssh-9-3p-fails-to-build-for-android
(This is the patch misc.c.additional.patch in the directory source/patches in this Magisk Module)



Trouble Shooting

To execute the customize script of the Magisk Module with "set -x" and write STDOUT and STDERR to the file /data/local/tmp/openssh_customize.log create the (probably empty) file /data/local/tmp/debug before installing the Magisk Module.

To execute the service script to start the sshd with "set -x" and write STDERR and STDLOG messages to the file /data/local/tmp/start_sshd.log create the file /data/local/tmp/debug before rebooting the phone.

hostname resolution via DNS is not possible if the sshd was started via the Magisk service.sh script and the current user in the ssh session is NOT the root user. To work around this issue, either restart the sshd in an adb session or execute the commands that need hostname resolution via DNS in the ssh sessions as user root. The script

restart_ssh_daemon

can be used in an adb session to restart the sshd.


Due to the energy saving functions of Android, the wifi connection can be put into sleep mode too often, so that the ssh connection to the phone is very sluggish. To work around this problem, start a ping command in the background to use the WIfi connection continuously, e.g:

ping -i 0.2 192.168.1.1 >/dev/null &




History of this entry

26.04.2024

initial release

19.10.2024

added infos about the version 1.1.0.0 of the Magisk Module

25.12.2024

added the hint to keep the Wifi connection active

21.02.2025

Section rewritten to match the Magisk Module with OpenSSH 9.9p2 

12.05.2025

Updated the documentation to match the Magisk Module with OpenSSH 10.0p2  

20.06.2025

Added the info about the user used for privilege separation



Documentation for the Magisk Module with Python 3.14


URL: https://xdaforums.com/t/module-python-3-14-with-pip-and-ssl-support.4730226/


Note:
 
The documentation below is only valid for the version 3.14-v2.0.0 or newer of the Magisk Module.

The documentation for the version 3.14-v1.1.0 of this Magisk Module is here https://xdaforums.com/t/module-python-3-14-for-android.4696862/


Documentation for the Magisk Module with Python 3.14

The Magisk Module python3_3.14 contains Python3 3.14 compiled for Android on an arm64 CPU.

ASUS_I006D:/ $ python --version
Python 3.14.0a0
ASUS_I006D:/ $


Also included in the Magisk Module are the OpenSSL libraries necessary to use SSL in Python scripts (in /system/usr/lib to avoid overwriting OpenSSL libraries from the OS).

The Python module to install other modules, pip, is already installed:

ASUS_I006D:/ $ pip --version
pip 25.0.1 from /system/usr/lib/python3.14/site-packages/pip (python 3.14)
ASUS_I006D:/ $

ASUS_I006D:/ $ pip list
Package Version
------- -------
pip     25.0.1
ASUS_I006D:/ $


The configured directories for site-packages in this Python installation are:

ASUS_I006D:/ $ python3 -m site
sys.path = [
    '/',
    '/system/usr/lib/python314.zip',
    '/system/usr/lib/python3.14',
    '/system/usr/lib/python3.14/lib-dynload',
    '/system/usr/lib/python3.14/site-packages',
    '/data/local/tmp/home/python3.14/site-packages',
    '/data/local/tmp/home/python/site-packages',
]
USER_BASE: '/data/local/tmp/home/.local' (doesn't exist)
USER_SITE: '/data/local/tmp/home/.local/lib/python3.14/site-packages' (doesn't exist)
ENABLE_USER_SITE: True
ASUS_I006D:/ $


The directories

/data/local/tmp/home/python3.14/site-packages
/data/local/tmp/home/python/site-packages
/data/local/tmp/.local/lib/python/lib/python3.14/site-packages

are writable by the user shell and can be used to add additional site-packages (either manual or via the Python module pip).

Use the command

pip list -v

to list the installed Python modules , e.g:

ASUS_I006D:/data/local/tmp $ pip list -v
Package    Version    Location                                      Installer
---------- ---------- --------------------------------------------- ---------
distro     1.9.0      /data/local/tmp/home/python/site-packages     pip
pip        25.0.1     /system/usr/lib/python3.14/site-packages      pip
selinux    0.3.0      /data/local/tmp/home/python/site-packages     pip
youtube-dl 2021.12.17 /data/local/tmp/home/python3.14/site-packages pip
yt-dlp     2025.3.31  /data/local/tmp/home/python/site-packages     pip
ASUS_I006D:/data/local/tmp $



All Python executables in the directory /system/bin are symbolic links to the wrapper script /system/bin/python_wrapper.


The wrapper script is used to init the environment for the Python executables.


pip can be used to install additional Python modules; the target directory for these modules defined in the wrapper script is

/data/local/tmp/home/python/site-packages

To use another target directory for the Python modules export the variable PIP_TARGET before executing pip.

Or use the parameter "--target=<dir>" for pip to set the target directory for the Python modules.


The wrapper script defines the environment variable SSL_CERT_DIR with the value /system/etc/security/cacerts if it is not already defined.

The wrapper script defines the environment variable CERTIFICATE_BUNDLE_FILE with the value /data/local/tmp/home/ca-certificates.crt if that file exists and the environment variable is not yet defined.
The file /data/local/tmp/home/ca-certificates.crt is created by the customization script of the module with all SSL certificates found in the directories /system/etc/security/cacerts*.


Use the command

python -c "import ssl; print(ssl.get_default_verify_paths()) " 

to show which certificate paths are being used. E.g.

ASUS_I006D:/ $ python -c "import ssl; print(ssl.get_default_verify_paths()) "
DefaultVerifyPaths(cafile='/data/local/tmp/home/ca-certificates.crt', capath='/system/etc/security/cacerts', openssl_cafile_env='SSL_CERT_FILE', openssl_cafile='/data/local/tmp/develop/sysroot/usr/ssl/cert.pem', openssl_capath_env='SSL_CERT_DIR', openssl_capath='/data/local/tmp/develop/sysroot/usr/ssl/certs')
ASUS_I006D:/ $



The wrapper script defines the environment variable PYTHONPYCACHEPREFIX with

/data/local/tmp/home/python/cache

This directory is then used for the compiled Python scripts (the customization script in the module creates this directory if it does not yet exist).


The wrapper script defines the variable TERMINFO with /system/etc/terminfo or /system_ext/etc/terminfo if one of these directories exists and the variable TERMINFO is not already defined


The wrapper scripts sets the environment variable LD_LIBRARY_PATH to

/system/usr/lib


If the directory

/data/local/tmp/home/libs

exists it is also added to the environment variable LD_LIBRARY_PATH. This directory should be used for additional libraries required by the Python scripts.


Set the environment variable DEBUG to any non-empty string before executing python to execute the wrapper script with "set -x", e.g.:

DEBUG=yes python --version          


Example:

DEBUG=yes python --version
ASUS_I006D:/ $ DEBUG=yes python --version
+ CUR_NAME=python
+ CMD_PARAMETER=''
+ export 'HOME=/data/local/tmp/home'
+ '[' x '=' x ']'
+ export 'PYTHONPYCACHEPREFIX=/data/local/tmp/home/python/cache'
+ mkdir -p /data/local/tmp/home/python/cache
+ PYTHON_BASE_DIR=/system
+ PYTHON_BIN_DIR=/system/usr/bin
+ PYTHON_LIB_DIR=/system/usr/lib
+ '[' /system_ext/etc/terminfox '=' x ']'
+ export 'LD_LIBRARY_PATH=/system/usr/lib:'
+ '[' -d /data/local/tmp/home/libs ']'
+ export 'LD_LIBRARY_PATH=/data/local/tmp/home/libs:/system/usr/lib'
+ '[' x '=' x ']'
+ export 'SSL_CERT_DIR=/system/etc/security/cacerts'
+ '[' x '=' x ']'
+ '[' -r /data/local/tmp/home/ca-certificates.crt ']'
+ export 'SSL_CERT_FILE=/data/local/tmp/home/ca-certificates.crt'
+ '[' x '=' x ']'
+ export 'PIP_TARGET=/data/local/tmp/home/python/site-packages'
+ CUR_BINARY=/system/usr/bin/python
+ '[' ! -x /system/usr/bin/python ']'
+ '[' -r /data/local/tmp/home/python_init.sh ']'
+ eval 'exec  ${CUR_BINARY} ${CMD_PARAMETER} ${1+"$@"}'
+ /system/usr/bin/python --version
Python 3.14.0a0
ASUS_I006D:/ $




If the file

/data/local/tmp/home/python_init.sh

exists, it will be sourced in by the wrapper script before executing the Python binary.

The file /data/local/tmp/home/python_init.sh can be used to define or overwrite the environment variables for Python ( ... or do anything else)

(see https://docs.python.org/3/using/cmdline.html for a list of supported environment variables; use the variable "$0" in the script to distinguish between the executables)




Installing Python modules with pip


Additional Python modules or scripts can be installed using pip. E.g to install Meson execute the command

pip install meson


Example:

ASUS_I006D:/ $ pip install meson
Collecting meson
  Downloading meson-1.7.2-py3-none-any.whl.metadata (1.8 kB)
Downloading meson-1.7.2-py3-none-any.whl (991 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 991.6/991.6 kB 1.8 MB/s eta 0:00:00
Installing collected packages: meson
Successfully installed meson-1.7.2
ASUS_I006D:/ $


The default target directory for additional Python Module is

/data/local/tmp/home/python/site-packages


So the Meson executable is here:

/data/local/tmp/home/python/site-packages/bin/meson


The shebang used in Python executables installed via pip is #/system/usr/bin/python3 (which is correct but not working in this environment) therefore the execution of the executable fails:

ASUS_I006D:/ $  /data/local/tmp/home/python/site-packages/bin/meson                                                                                                       
CANNOT LINK EXECUTABLE "/system/usr/bin/python3": library "libpython3.14.so.1.0" not found: needed by main executable
1|ASUS_I006D:/ $


To get around this issue and also ensure that the environment for Python is initialized, either use python to run the executable, e.g.

ASUS_I006D:/ $ python3 /data/local/tmp/home/python/site-packages/bin/meson --version
1.7.2
ASUS_I006D:/ $


Or change the shebang in the file to #/system/bin/python3, e.g.

ASUS_I006D:/ $ head -1  /data/local/tmp/home/python/site-packages/bin/meson
#!/system/bin/python3
ASUS_I006D:/ $

ASUS_I006D:/ $ /data/local/tmp/home/python/site-packages/bin/meson --version
1.7.2
ASUS_I006D:/ $




Installing Python modules that require additional libraries

If a Python module needs additional libraries, create the directory /data/local/home/libs and copy the missing libraries to that directory.

Example:


Install the Python module:

ASUS_I006D:/ $ ASUS_I006D:/ $ PIP_TARGET=/data/local/tmp/home/python3.14/site-packages  pip install youtube_dl
Collecting youtube_dl
  Downloading youtube_dl-2021.12.17-py2.py3-none-any.whl.metadata (1.5 kB)
Downloading youtube_dl-2021.12.17-py2.py3-none-any.whl (1.9 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 MB 3.5 MB/s eta 0:00:00
Installing collected packages: youtube_dl
Successfully installed youtube_dl-2021.12.17
ASUS_I006D:/


Execute the Python module;

ASUS_I006D:/ $ python /data/local/tmp/home/python3.14/site-packages/bin/youtube-dl
Traceback (most recent call last):
  File "/data/local/tmp/home/python3.14/site-packages/bin/youtube-dl", line 5, in <module>
    from youtube_dl import main
  File "/data/local/tmp/home/python3.14/site-packages/youtube_dl/__init__.py", line 15, in <module>
    from .options import (
        parseOpts,
    )
  File "/data/local/tmp/home/python3.14/site-packages/youtube_dl/options.py", line 8, in <module>
    from .downloader.external import list_external_downloaders
  File "/data/local/tmp/home/python3.14/site-packages/youtube_dl/downloader/__init__.py", line 3, in <module>
    from .common import FileDownloader
  File "/data/local/tmp/home/python3.14/site-packages/youtube_dl/downloader/common.py", line 9, in <module>
    from ..compat import compat_os_name
  File "/data/local/tmp/home/python3.14/site-packages/youtube_dl/compat.py", line 7, in <module>
    import ctypes
  File "/system/usr/lib/python3.14/ctypes/__init__.py", line 8, in <module>
    from _ctypes import Union, Structure, Array
ImportError: dlopen failed: library "libffi.so" not found: needed by /system/usr/lib/python3.14/lib-dynload/_ctypes.cpython-314-aarch64-linux-android.so in namespace (default)
1|ASUS_I006D:/ $

The Python module does not work because the library libffi.so is missing

Now create the directory for the additional libraries if it does not yet exist

ASUS_I006D:/ $ mkdir -p /data/local/tmp/home/libs

and copy the missing library to the directory /data/local/tmp/home/libs.

Check the result:

ASUS_I006D:/ $ ls -l /data/local/tmp/home/libs
total 92
-rwxrwxrwx 1 shell shell 93312 2025-04-10 07:03 libffi.so
ASUS_I006D:/ $

and execute the Python script again:

ASUS_I006D:/ $ python /data/local/tmp/home/python3.14/site-packages/bin/youtube-dl  --version                                                                             
2021.12.17
ASUS_I006D:/ $


Note:

The Python module youtube.dl is only used as an example. If you really want to use Python to download files from Youtube use yt-dlp instead -- youtube.dl is outdated and does not work anymore



Note:

Use  https://pypi.org/search to search for Python modules available for installation via pip.


Many libraries for Android on arm64 CPUs are availabe in this github repository:  https://github.com/bnsmb/libraries-and-include-files-for-Android-on-arm64-CPUs





Installation details
The Python binaries are installed in the directory /system/usr/bin:

ASUS_I006D:/ $ ls -l /system/usr/bin
total 28716
lrwxrwxrwx 1 root root        8 1970-01-16 22:21 idle3 -> idle3.14
-rwxr-xr-x 1 root root       97 2025-04-09 15:57 idle3.14
lrwxrwxrwx 1 root root        9 1970-01-16 22:21 pip -> ./pip3.14
lrwxrwxrwx 1 root root        9 1970-01-16 22:21 pip3 -> ./pip3.14
-rwxr-xr-x 1 root root      224 2025-04-09 15:57 pip3.14
lrwxrwxrwx 1 root root        9 1970-01-16 22:21 pydoc3 -> pydoc3.14
-rwxr-xr-x 1 root root       82 2025-04-09 15:57 pydoc3.14
-rwxr-xr-x 1 root root     7232 2025-04-09 15:57 python
lrwxrwxrwx 1 root root       10 1970-01-16 22:21 python3 -> python3.14
lrwxrwxrwx 1 root root       17 1970-01-16 22:21 python3-config -> python3.14-config
-rwxr-xr-x 1 root root     7232 2025-04-09 15:57 python3.14
-rwxr-xr-x 1 root root     3636 2025-04-09 15:57 python3.14-config
-rwxr-xr-x 1 root root 29339320 2025-04-09 15:57 python3.14-static
ASUS_I006D:/ $


The libraries necessary for Python are installed in the directory /system/usr/lib:

ASUS_I006D:/ $ ls -l /system/usr/lib
total 89652
-rw-r--r--  1 root root  6846664 2025-04-09 15:57 libcrypto.so.3
-rw-r--r--  1 root root 54328318 2025-04-09 15:57 libpython3.14.a
lrwxrwxrwx  1 root root       20 1970-01-16 22:21 libpython3.14.so -> libpython3.14.so.1.0
-rw-r--r--  1 root root 29605640 2025-04-09 15:57 libpython3.14.so.1.0
-rw-r--r--  1 root root     5224 2025-04-09 15:57 libpython3.so
-rw-r--r--  1 root root   914016 2025-04-09 15:57 libssl.so.3
drwxr-xr-x  2 root root      120 1970-01-16 22:21 pkgconfig
drwxr-xr-x 40 root root     3880 1970-01-16 22:21 python3.14
ASUS_I006D:/ $



The executables for Python in /system/bin are symbolic links to the wrapper script /system/bin/python_wrapper:

ASUS_I006D:/ $ ls -l /system/bin/ | grep python_wrapper
lrwxrwxrwx 1 root root       16 1970-01-16 19:31 idle3 -> ./python_wrapper
lrwxrwxrwx 1 root root       16 1970-01-16 19:31 pip -> ./python_wrapper
lrwxrwxrwx 1 root root       16 1970-01-16 19:31 pip3 -> ./python_wrapper
lrwxrwxrwx 1 root root       16 1970-01-16 19:31 pip3.14 -> ./python_wrapper
lrwxrwxrwx 1 root root       16 1970-01-16 19:31 pydoc3 -> ./python_wrapper
lrwxrwxrwx 1 root root       16 1970-01-16 19:31 python3 -> ./python_wrapper
lrwxrwxrwx 1 root root       16 1970-01-16 19:31 python3-config -> ./python_wrapper
lrwxrwxrwx 1 root root       16 1970-01-16 19:31 python3.14-static -> ./python_wrapper
-rwxr-xr-x 1 root root     2254 2025-04-09 10:59 python_wrapper
ASUS_I006D:/ $


There are two Python executables in the module, the binary python3.14 needs the Python library in /system/usr/lib and the binary python3.14-static only needs the standard Android OS libraries:

ASUS_I006D:/ $ LD_LIBRARY_PATH=/system/usr/lib ldd /system/usr/bin/python3.14
        linux-vdso.so.1 => [vdso] (0x7a9b8df000)
        libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x7a95112000)
        libpython3.14.so.1.0 => /system/usr/lib/libpython3.14.so.1.0 (0x7a96695000)
        libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x7a9a69d000)
        liblog.so => /system/lib64/liblog.so (0x7a9a647000)
        libm.so => /apex/com.android.runtime/lib64/bionic/libm.so (0x7a96fc1000)
        libc++.so => /system/lib64/libc++.so (0x7a95048000)
ASUS_I006D:/ $


ASUS_I006D:/ $ ldd /system/usr/bin/python3.14-static
    linux-vdso.so.1 => [vdso] (0x7c7e2c0000)
    libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x7c7756e000)
    libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x7c7d046000)
    liblog.so => /system/lib64/liblog.so (0x7c7752c000)
    libm.so => /apex/com.android.runtime/lib64/bionic/libm.so (0x7c7d086000)
    libc++.so => /system/lib64/libc++.so (0x7c79e07000)
ASUS_I006D:/ $

(A "real" static binary for Python is not really usefull because static binaries in Android can not resolve hostnames via DNS)

The default Python executable is the binary that requires the Python library.

The Python binaries and libraries are compiled for Android API version 31 and should run on Android 12 and newer (see https://source.android.com/docs/setup/reference/build-numbers):

ASUS_I006D:/data/local/tmp/develop/done_clang/cpython314 # file /system/usr/bin/python3.14
/system/usr/bin/python3.14: ELF shared object, 64-bit LSB arm64, dynamic (/system/bin/linker64), for Android 31, built by NDK r27b (12297006), not stripped
ASUS_I006D:/data/local/tmp/develop/done_clang/cpython314 #

ASUS_I006D:/data/local/tmp/develop/done_clang/cpython314 # file /system/usr/bin/python3.14-static
/system/usr/bin/python3.14-static: ELF shared object, 64-bit LSB arm64, dynamic (/system/bin/linker64), for Android 31, built by NDK r27b (12297006), not stripped
ASUS_I006D:/data/local/tmp/develop/done_clang/cpython314 #

ASUS_I006D:/data/local/tmp/develop/done_clang/cpython314 # file /system/usr/lib/libpython3.14.so.1.0
/system/usr/lib/libpython3.14.so.1.0: ELF shared object, 64-bit LSB arm64, for Android 31, built by NDK r27b (12297006), not stripped
ASUS_I006D:/data/local/tmp/develop/done_clang/cpython314 #





Details for compiling Python3 3.14 for Android
The Python executables in this Magisk Module were compiled on an ASUS Zenfone 8 with the clang19 toolchain for Android

see

  How to install a Toolchain for clang on phones without root access

or

  https://xdaforums.com/t/guide-how-to-install-a-toolchain-for-clang-on-phones-without-root-access.4710235/

for details about the clang19 toolchain for Android


The clang19 toolchain is also available on github:

  https://github.com/bnsmb/clang19_toolchain_for_android/


All approbiate patches from the Termux repository for Python

  https://github.com/termux/termux-packages/tree/master/packages/python

as of 06.10.2024 are applied.

The patches applied are in the directory source/patches in the Magisk Module.


The config used to compile Python is:

[ OmniRom 15 - xtrnaw7@t15g /data/develop/android/ModuleSrc/python314/source ] $ cat myconfigure
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/develop/sysroot/usr/lib

export  PKG_CONFIG=/data/local/tmp/sysroot/usr/clang19/bin/pkgconf

export CFLAGS="$CFLAGS -D__ANDROID_API__=31 -O3  -Wno-implicit-function-declaration -Wno-int-conversion "
export CPPFLAGS="$CFLAGS"

export TARGET_ROOT=/data/local/tmp/sysroot/

AC_OPTIONS="ac_cv_func_shm_unlink=no  ac_cv_func_shm_open=yesac_cv_posix_semaphores_enabled=yes ac_cv_func_linkat=no ac_cv_func_faccessat=no  ac_cv_file__dev_ptc=no"

LDFLAGS="$LDFLAGS /data/local/tmp/develop/sysroot/usr/lib/libncursesw.a"

# --enable-optimizations
eval ${AC_OPTIONS} ./configure  --prefix=${TARGET_ROOT}/usr --with-openssl=/data/local/tmp/develop/sysroot/usr \
  --enable-loadable-sqlite-extensions --enable-shared  --enable-pystats  --with-builtin-hashlib-hashes=md5,sha1,sha2,sha3,blake2,sha256,sha512 \
   --with-system-expat --without-ensurepip  --with-tzpath=/system/usr/share/zoneinfo --with-system_libmpdec

echo "Correcting the Makefile ..."

sed -i -e "s/none required//g" Makefile


The result is:

The necessary bits to build these optional modules were not found:
_posixshmem               _tkinter
To find the necessary bits, look in configure.ac and config.log.

Following modules built successfully but were removed because they could not be imported:
_dbm

Checked 112 modules (34 built-in, 74 shared, 1 n/a on linux-aarch64, 0 disabled, 2 missing, 1 failed on import)
[clang19 toolchain] ASUS_I006D:/data/local/tmp/develop/done_clang/cpython314 $




History of this entry

09.04.2025

initial release for version v3.14-2.0.0 

12.04.2024

added the hint about the repository with libraries for Android onarm64 CPUs






Documentation for the Magisk Module with Python 3.10


URL: https://xdaforums.com/t/module-python-3-10-for-android.4697340/


Documentation for the Magisk Module with Python 3.10

The Magisk Module python3_3.10 contains Python3 3.10 compiled for Android on a arm64 CPU:

┌shell@localhost:/
└─$ python --version
Python 3.10.15+
┌shell@localhost:/
└─$


The configured directories for site-packages in this Python installation are:

┌shell@localhost:/
└─$ python -m site
sys.path = [
    '/',
    '/system/usr/lib/python310.zip',
    '/system/usr/lib/python3.10',
    '/system/usr/lib/python3.10/lib-dynload',
    '/system/usr/lib/python3.10/site-packages',
    '/data/local/tmp/home/python3.10/site-packages',
    '/data/local/tmp/home/python/site-packages',
]
USER_BASE: '/data/local/tmp/home/.local' (doesn't exist)
USER_SITE: '/data/local/tmp/home/.local/lib/python3.10/site-packages' (doesn't exist)
ENABLE_USER_SITE: True
┌shell@localhost:/
└─$

For more details regarding the Python Magisk Modules for Android see this entry.


Details for compiling Python3 3.10 for Android
The binaries are compiled with the gcc toolchain from the Android NDK r17c using the API version 21 on a phone running Android 14.


Python3 has been compiled with these configure options (copied from the Termux repository entry for Python3)


export CFLAGS="$CFLAGS -D__ANDROID_API__=21 -O3 "
export CPPFLAGS="$CFLAGS"

export TARGET_ROOT=/data/local/tmp/python3.10

AC_OPTIONS="ac_cv_func_shm_unlink=no  ac_cv_func_shm_open=yesac_cv_posix_semaphores_enabled=yes ac_cv_func_linkat=no ac_cv_func_faccessat=no  ac_cv_file__dev_ptc=no"

eval ${AC_OPTIONS} ./configure  --prefix=${TARGET_ROOT}/usr --with-openssl=/data/local/tmp/develop/sysroot/usr \
   --enable-loadable-sqlite-extensions --enable-shared   --with-builtin-hashlib-hashes=md5,sha1,sha2,sha3,blake2,sha256,sha512 \
   --with-system-expat --without-ensurepip  --with-tzpath=/system/usr/share/zoneinfo --with-system_libmpdec
 


Result:


The necessary bits to build these optional modules were not found:
_dbm                  _posixshmem           _tkinter          
nis                   spwd                                    
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc                  pwd                   time              


Failed to build these modules:
grp     


All approbiate patches from the Termux repository for Python

https://github.com/termux/termux-packages/tree/master/packages/python

are applied.

The patches applied are in the directory source/patches in the Magisk Module.



History of this entry

10.10.2024

initial release


 

Documentation for the Magisk Module with the compression tools


URL: not yet published


Documentation for the Magisk Module with the compression tools
The Magisk Module compression_tools contain various programs to compress files compiled for arm64 CPUs.


Tool
version
executables in the module
URL
initial added in
version
Comment
gnuzip 1.13
gzip
gunzip
gzexe
zcat (shell script)
zcmp (shell script)
zdiff (shell script)
zegrep (shell script)
zfgrep (shell script)
zforce (shell script)
zgrep (shell script)
zmore (shell script)
znew (shell script)
https://ftp.gnu.org/gnu/gzip/ 1.0.0

xz
5.62
xz
https://github.com/tukaani-project/xz 1.0.0
7-Zip (z)
25.00 7zz
https://www.7-zip.org 1.0.0
Supported formats:

7zz i
ASUS_I006D:/ $ 7zz i

7-Zip (z) 25.00 (arm64) : Copyright (c) 1999-2025 Igor Pavlov : 2025-07-05
 64-bit arm_v:8-A locale=C.UTF-8 Threads:8 OPEN_MAX:32768


Formats:
   C...F..........c.a.m+..  7z       7z            7 z BC AF ' 1C
    ......................  APFS     apfs img      offset=32 N X S B 00
    ......................  APM      apm           E R
    ......................  Ar       ar a deb udeb lib ! < a r c h > 0A
    ......................  Arj      arj           ` EA
    K.....O.....X.........  Base64   b64          
    ......O...............  COFF     obj          
    ...F..................  Cab      cab           M S C F 00 00 00 00
    ......................  Chm      chm chi chq chw I T S F 03 00 00 00 ` 00 00 00
    ......................  Compound msi msp doc xls ppt D0 CF 11 E0 A1 B1 1A E1
    ....M.................  Cpio     cpio          0 7 0 7 0  ||  C7 q  ||  q C7
    ......................  CramFS   cramfs        offset=16 C o m p r e s s e d 20 R O M F S
    .....G..B.............  Dmg      dmg           k o l y 00 00 00 04 00 00 02 00
    .........E............  ELF      elf            E L F
    ......................  Ext      ext ext2 ext3 ext4 img offset=1080 S EF
    ......................  FAT      fat img       offset=510 U AA
    ......................  FLV      flv           F L V 01
    ......................  GPT      gpt mbr       offset=512 E F I 20 P A R T 00 00 01 00
    ....M.................  HFS      hfs hfsx      offset=1024 B D  ||  H + 00 04  ||  H X 00 05
    ...F..................  Hxs      hxs hxi hxr hxq hxw lit I T O L I T L S 01 00 00 00 ( 00 00 00
    ......O...............  IHex     ihex         
    ......................  Iso      iso img       offset=32769 C D 0 0 1
    ......................  LP       lpimg img     offset=4096 g D l a 4 00 00 00
    ......................  Lzh      lzh lha       offset=2 - l h
    .......P..............  MBR      mbr          
    ....M....E............  MachO    macho         CE FA ED FE  ||  CF FA ED FE  ||  FE ED FA CE  ||  FE ED FA CF
    ......................  MsLZ     mslz          S Z D D 88 F0 ' 3 A
    ....M.................  Mub      mub           CA FE BA BE 00 00 00  ||  B9 FA F1 0E
    ......................  NTFS     ntfs img      offset=3 N T F S 20 20 20 20 00
    ...F.G................  Nsis     nsis          offset=4 EF BE AD DE N u l l s o f t I n s t
    .........E............  PE       exe dll sys   M Z
    ......................  Ppmd     pmd           8F AF AC 84
    ......................  QCOW     qcow qcow2 qcow2c Q F I FB 00 00 00
    ...F..................  Rar      rar r00       R a r ! 1A 07 00
    ...F..................  Rar5     rar r00       R a r ! 1A 07 01 00
    ......................  Rpm      rpm           ED AB EE DB
    K.....................  SWF      swf           F W S
    ....M.................  SWFc     swf (~.swf)   C W S  ||  Z W S
    ......................  Sparse   simg img      : FF & ED 01 00
    ......................  Split    001          
    ....M.................  SquashFS squashfs      h s q s  ||  s q s h  ||  s h s q  ||  q s h s
    .........E............  TE       te            V Z
    ...FM.................  UEFIc    scap          BD 86 f ; v 0D 0 @ B7 0E B5 Q 9E / C5 A0  ||  8B A6 < J # w FB H 80 = W 8C C1 FE C4 M  ||  B9 82 91 S B5 AB 91 C B6 9A E3 A9 C F7 / CC
    ...FM.................  UEFIf    uefif         offset=16 D9 T 93 z h 04 J D 81 CE 0B F6 17 D8 90 DF  ||  x E5 8C 8C = 8A 1C O 99 5 89 a 85 C3 - D3
    ....M.O...............  Udf      udf iso img   offset=32768 00 B E A 0 1 01 00  ||  01 C D 0 0 1
    ......................  VDI      vdi           offset=64  10 DA BE
    .....G................  VHD      vhd           c o n e c t i x 00 00
    ......................  VHDX     vhdx avhdx    v h d x f i l e
    ......................  VMDK     vmdk          K D M V
    ......................  Xar      xar pkg xip   x a r ! 00
    ......................  Z        z taz (.tar)  1F 9D
   CK.....................  bzip2    bz2 bzip2 tbz2 (.tar) tbz (.tar) B Z h
   CK.................m+..  gzip     gz gzip tgz (.tar) tpz (.tar) apk (.tar) 1F 8B 08
    K.....O...............  lzma     lzma         
    K.....................  lzma86   lzma86       
   C......O...LH......m+..  tar      tar ova       offset=257 u s t a r
   C.SN.......LH..c.a.m+..  wim      wim swm esd ppkg M S W I M 00 00 00
   CK.....................  xz       xz txz (.tar) FD 7 z X Z 00
   C...FMG........c.a.m+..  zip      zip z01 zipx jar xpi odt ods docx xlsx epub ipa apk appx P K 03 04  ||  P K 05 06  ||  P K 06 06  ||  P K 07 08 P K  ||  P K 0 0 P K
    K.....................  zstd     zst tzst (.tar) ( B5 / FD
   CK.....O.....XC........  Hash     sha256 sha512 sha384 sha224 sha512-224 sha512-256 sha3-224 sha3-256 sha3-384 sha3-512 sha1 sha2 sha3 sha md5 blake2s blake2b blake2sp xxh64 crc32 crc64 cksum asc

Codecs:
   4ED   303011B BCJ2
    EDF  3030103 BCJ
    EDF  3030205 PPC
    EDF  3030401 IA64
    EDF  3030501 ARM
    EDF  3030701 ARMT
    EDF  3030805 SPARC
    EDF        A ARM64
    EDF        B RISCV
    EDF    20302 Swap2
    EDF    20304 Swap4
    ED     40202 BZip2
    ED         0 Copy
    ED     40109 Deflate64
    ED     40108 Deflate
    EDF        3 Delta
    ED        21 LZMA2
    ED     30101 LZMA
    ED     30401 PPMD
     D     40301 Rar1
     D     40302 Rar2
     D     40303 Rar3
     D     40305 Rar5
    EDF  6F10701 7zAES
    EDF  6F00181 AES256CBC

Hashers:
      4        1 CRC32
     16      208 MD5
     20      201 SHA1
     32        A SHA256
     32      231 SHA3-256
     48      222 SHA384
     64      223 SHA512
      8      211 XXH64
      8        4 CRC64
     32      202 BLAKE2sp
ASUS_I006D:/ $



This is a statically linked binary
bzip2
1.08
bzip2
bzip2recover
bzgrep (shell script)
bzdiff (shell script)
https://sourceware.org/bzip2 1.0.0
zip


3.0
zip
zipcloak
zipnote
zipsplit
https://infozip.sourceforge.net/Zip.html 1.0.0
unzip

6.0
unzip
unzipsfx
https://infozip.sourceforge.net/UnZip.html 1.0.0
lz4
1.10.0
lz4
https://github.com/lz4/lz4 1.0.0
zstd
1.5.6
zstd
zstdcat
zstdgrep
zstdless
zstdmt
https://github.com/facebook/zstd 1.0.0
lzop
1.04
lzop
https://www.lzop.org/
http://www.oberhumer.com/opensource/lzo/
1.0.0
compress

5.0
compress
uncompress
https://vapier.github.io/ncompress 1.0.0
unrar
5.91
unrar
copied from the unrar Magisk module from this repository:

https://github.com/henriknelson/magisk-modules

1.1.1

lzip
1.25
lzip
https://www.nongnu.org/lzip/lzip.html
1.3.0

pigz
2.8
pigz
https://zlib.net/pigz/
1.0.0




The executables are installed in /system/bin; all executables for which there is already a version available via the PATH variable are moved by the customization script to the directory /system/bin/compression_tools.

All dynamically linked binaries only use the standard libraries from Android .

To use one of the executables without installing the Magisk Module extrcat the executable from the ZIP file and copy it to the phone, example:


# extract the executable from the ZIP file
#
unzip -p compression_tools_1.3.0.zip system/bin/bzip2 >bzip2


# copy it to the phone
#
adb push bzip2 /data/local/tmp
adb shell chmod 755 /data/local/tmp/bzip2

 

History of this entry

15.10.2024

initial release

16.12.2024
  added infos to sync the doc with the module version 1.1.1

07.07.2025
  Adaption of the documentation for the module version 1.3.0


  

Documentation for the Magisk Module with clang19 and the NDK r27b


URL: https://xdaforums.com/t/magisk-module-with-clang19-and-the-ndk-r27b.4700994/


Documentation for the Magisk Module with clang19 and the NDK r27b
The Magisk Module magisk module with clang19 and ndk contains clang version 19 (= clang19 in the rest of this section), make 4.4.1, pkg-config 0.29, pkgconf 2.30, and the files from the Android NDK r27b necessary to compile libraries and binaries for arm64 CPUs.

The Magisk Module installs clang19 files in the directory

/system/usr/clang19


The binaries for clang19, make, pkg-config, and pkgconf are in the directory

/system/usr/clang19/bin


The files from the NDK are in the directory

/system/usr/ndk/r27b

The sysroot from the NDK is in the directory

/system/usr/ndk/r27b/sysroot


Use the command

. /system/bin/init_clang19_env

to init the environment for the clang19. This script defines all necessary environment variables (including the PATH variable) to use the clang19 binaries.

The usage for the script is

init_clang19_env --help
ASUS_I006D:/ $ /system/bin/init_clang19_env --help
       
Usage: . /system/bin/init_clang19_env [-h|--help] [init] [var=value] [examples]
 
init        - clear the used enviroment variables at script start
no_user     - do not execute /data/local/tmp/local_init_clang19_env
var=value   - set the environment variable "var" to "value" at start of the script
examples    - print compile examples


*******************************************************************
 WARNING: The script /system/bin/init_clang19_env must be sourced in
*******************************************************************

ASUS_I006D:/ $

The script init_clang19_env will read and execute the file /data/local/tmp/local_init_clang19 if it exists. To disable reading that file, call init_clang19_env with the parameter no_user.


Example output:

. /system/bin/init_clang19_env
ASUS_I006D:/ $ . /bin/init_clang19_env

Preparing the clang environment for creating binaries for the CPU type aarch64

Using clang 19                                                                            

Using the NDK /system/usr/ndk/r27b                                                         (environment variable NDK_DIR)
Using the sysroot directory /system/usr/ndk/r27b/sysroot                                   (environment variable SYSROOT)
Using the target root directory /data/local/tmp/develop/sysroot                            (environment variable TARGET_ROOT)


Environment variables used:

PATH is now:         /data/local/tmp/develop/sysroot/usr/bin:/system/usr/clang19/bin:/product/bin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/system_ext/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin

LD_LIBRARY_PATH:     /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/:/system/usr/clang19/lib

API is now:          35
NDK_DIR is now:      /system/usr/ndk/r27b

SYSROOT is now:      /system/usr/ndk/r27b/sysroot

CFLAGS are now:       -I/system/usr/clang19/include -I/system/usr/ndk/r27b/include -I/system/usr/ndk/r27b/sysroot/usr/include -I/data/local/tmp/develop/sysroot/usr/include --sysroot=/system/usr/ndk/r27b/sysroot

CPPFLAGS are now:     -I/system/usr/clang19/include -I/system/usr/ndk/r27b/include -I/system/usr/ndk/r27b/sysroot/usr/include -I/data/local/tmp/develop/sysroot/usr/include --sysroot=/system/usr/ndk/r27b/sysroot

CXXFLAGS are now:     -I/system/usr/clang19/include -I/system/usr/ndk/r27b/include -I/system/usr/ndk/r27b/sysroot/usr/include -I/data/local/tmp/develop/sysroot/usr/include --sysroot=/system/usr/ndk/r27b/sysroot

LDFLAGS are now:      -L/system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/35 -L/system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android -L/data/local/tmp/develop/sysroot/usr/lib -B/system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/35/ --sysroot=/system/usr/ndk/r27b/sysroot -lc 

CC is now:           /system/usr/clang19/bin/clang
CXX is now:          /system/usr/clang19/binclang++
CPP is now:          /system/usr/clang19/bin/clang-cpp
CXXCPP is now:       /system/usr/clang19/bin/clang-cpp
AR is now:           /system/usr/clang19/bin/llvm-ar
AS is now:           /system/usr/clang19/bin/llvm-as
LD is now:           /system/usr/clang19/bin/lld
RANLIB is now:       /system/usr/clang19/bin/llvm-ranlib
STRIP is now:        /system/usr/clang19/bin/llvm-strip
PKG_CONFIG is now:   /system/usr/clang19/bin/pkg-config

Checking the clang binary ...

clang version 19.0.0git (https://android.googlesource.com/toolchain/llvm-project b3a530ec6537146650e42be89f1089e9a3588460)
Target: aarch64-unknown-linux-android
Thread model: posix
InstalledDir: /system/usr/clang19/bin

ASUS_I006D:/ $


 


The script init_clang19_env supports the following environment variables:

Variable
Description
Default value
Comment
CPU_TYPE
type of the current CPU
$( uname -m )
do not change this variable
CLANG_VERSION
clang version in the Magisk Module
19
do not change this variable
CLANG_DIR
directory with the clang files
/system/usr/clang${CLANG_VERSION}





NDK_VERSION
version of the NDK used
r27b
This directory is only used if defined
NDK_DIR
directory with the Android NDK files
/system/usr/ndk/${NDK_VERSION}





SYSROOT
directory with the sysroot from the Android NDK
${NDK_DIR}/sysroot

API
the compiler and linker use the object files for this API version
31
The known API versions in the Android NDK can be found here:

ls -ld /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/[0-9]*
ASUS_I006D:/data/local/tmp/develop/coreutils-9.0 $ ls -ld /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/[0-9]*                                       
drwxr-xr-x 2 root root 640 1970-04-19 06:30 /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/21
drwxr-xr-x 2 root root 640 1970-04-19 06:30 /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/22
drwxr-xr-x 2 root root 640 1970-04-19 06:30 /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/23
drwxr-xr-x 2 root root 680 1970-04-19 06:30 /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/24
drwxr-xr-x 2 root root 680 1970-04-19 06:30 /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/25
drwxr-xr-x 2 root root 740 1970-04-19 06:30 /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/26
drwxr-xr-x 2 root root 760 1970-04-19 06:30 /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/27
drwxr-xr-x 2 root root 760 1970-04-19 06:30 /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/28
drwxr-xr-x 2 root root 800 1970-04-19 06:30 /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/29
drwxr-xr-x 2 root root 800 1970-04-19 06:30 /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/30
drwxr-xr-x 2 root root 840 1970-04-19 06:30 /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/31
drwxr-xr-x 2 root root 840 1970-04-19 06:30 /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/32
drwxr-xr-x 2 root root 840 1970-04-19 06:30 /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/33
drwxr-xr-x 2 root root 840 1970-04-19 06:30 /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/34
drwxr-xr-x 2 root root 840 1970-04-19 06:30 /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/35
ASUS_I006D:/data/local/tmp/develop/coreutils-9.0 $

 

Using an API version below 30 will not work in most cases to compile a library or binary with clang19

TARGET_ROOT sysroot dir with additional libraries and include files /data/local/tmp/develop/sysroot This directory is only used if defined

Libraries in this directory should be in the directory ./usr/lib; include files should be in the directory ./usr/include.

TMP
directory for temporary files

This variable is set to /data/local/tmp by the init script if

- /tmp does not exist
- /data/local/tmp exists
- TMP is not set
.


Notes:

To use the script to change the environment for another API version use this command:

. /system/bin/init_clang19_env  init  API=<new_api_version>


To use pkgconf instead of pkg-config set the environment variable PKG_CONFIG :

export PKG_CONFIG=/system/usr/clang19/bin/pkgconf


The binary files and libraries in the Magisk module are compiled for arm64 CPUs. Therefore the init script for the module, ./system/bin/init_clang19_env, only works without error if the command 'uname -m' returns "aarch64" or "armv8*".
If the 'uname -m' command returns a different value, the init_clang19_env script must be changed to support this value.




Source code used to create the binaries

The repository with the source code for the clang19 is:

https://android.googlesource.com/toolchain/llvm-project

The source code was checked out in 10/2024.

See the file

source/myconfigure

in the Magisk Module for the cmake options used to prepare the build process for the clang19 binaries.
The clang19 binaries were compiled on a machine running the Linux OS with the Cross Compiler from the Android NDK r27b.


The Android NDKs are available here:

https://developer.android.com/ndk/downloads


The source code for the make binary is available here:

https://ftp.gnu.org/gnu/make/

Note: The make binary must be compiled as static binary; a dynamic linked make binary works only partially.


The source code for pkg-config is available here:

https://pkgconfig.freedesktop.org/releases/


The source code for pkgconf is available here:

https://github.com/pkgconf/pkgconf



The Magisk Module also contains two very simple source files to test the compiler, to use them execute these commands:

# To test the C compiler environment use

cd /data/local/tmp

clang ${CFLAGS} ${LDFLAGS} -o helloworld_in_c helloworld_in_c.c  && ./helloworld_in_c

# To test the C++ compiler environment use

cd /data/local/tmp
clang++ ${CPPFLAGS} ${LDFLAGS}  -o helloworld_in_c++ ./helloworld_in_c++.cpp && ./helloworld_in_c++


Example output
ASUS_I006D:/ $ cd /data/local/tmp
ASUS_I006D:/data/local/tmp $

ASUS_I006D:/data/local/tmp $  clang ${CFLAGS} ${LDFLAGS} -o helloworld_in_c helloworld_in_c.c  && ./helloworld_in_c
Hello, World from a C program!
ASUS_I006D:/data/local/tmp $


ASUS_I006D:/data/local/tmp $ cd /data/local/tmp
ASUS_I006D:/data/local/tmp $

ASUS_I006D:/data/local/tmp $ clang++ ${CPPFLAGS} ${LDFLAGS}  -o helloworld_in_c++ ./helloworld_in_c++.cpp && ./helloworld_in_c++
Hello, World from a C++ program!
ASUS_I006D:/data/local/tmp $
 



Trouble Shooting

For currently unknown reasons, the linker from clang19 sometimes does not find the necessary object files to create the binaries and the compile process aborts with an error message like this:

ld.lld: error: cannot open crtbegin_so.o: No such file or directory
ld.lld: error: cannot open crtend_so.o: No such file or directory
clang: error: linker command failed with exit code 1

In this case, check that the -B option is configured in the LDFLAGS, e.g:

ASUS_I006D:/data/local/tmp/develop/coreutils-9.0 $ echo $LDFLAGS
-L/system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/35 -L/system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android -L/data/local/tmp/develop/sysroot/usr/lib -B/system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/35/ --sysroot=/system/usr/ndk/r27b/sysroot -lc
ASUS_I006D:/data/local/tmp/develop/coreutils-9.0 $

If using the option -B does not fix the error, temporary copy the missing files to the directory with the object files used to create the new binary:

cp /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/${API}/crtbegin_so.o .
cp /system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/${API}/crtend_so.o .

and execute make again.

The variable API contains the API version used to compile with clang19; this variable is set by the script init_clang19_env.


Comments on this error from ChatGPT
The -B flag not being applied in LDFLAGS for CLLD is a common issue in certain cross-compilation setups, where make or configure scripts don’t always pass LDFLAGS to the linker as expected. Here are some possible solutions:

Set CFLAGS and CXXFLAGS with -B: Sometimes, LDFLAGS is ignored for linking in CLLD, but CFLAGS and CXXFLAGS may still be respected. Add -B/system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/35/ to these flags:

export CFLAGS="$CFLAGS -B/system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/35/"
export CXXFLAGS="$CXXFLAGS -B/system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/35/"

Directly Set CLLD with Additional Flags: Some Makefile scripts allow setting CLLD directly with flags. Try setting CLLD as an environment variable with the required paths:

export CLLD="clang --sysroot=/system/usr/ndk/r27b/sysroot -B/system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/35/"

Override the LDLIBS Variable: LDLIBS is sometimes used for additional libraries and paths in the link command:

export LDLIBS="-L/system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/35/ -B/system/usr/ndk/r27b/sysroot/usr/lib/aarch64-linux-android/35/"

Manually Adjust the Linker Command in the Makefile: If none of these work, modifying the Makefile to include the -B path directly in the linker command can be effective. Look for lines with CLLD or $(LINKER) and add the -B path there


There is also a github repository with the files for this Magisk Module: https://github.com/bnsmb/Magisk-Module-with-clang19 

see the section Documentation for the Magisk Module with clang20 and the NDK r29 beta1 for the documentation for the Magisk Module with the clang20.


see here for a virtual disk image with the clang19 toolchain that can be used via overlay mount.



History of this entry

02.11.2024

initial release

11.11.2024

added information about the usage of the environment variable TMP

18.01.2025

added the infos about pkgconf 

17.04.2025

updated the documentation to match the module version 19.0.0git-v1.2.0

05.06.2025

add a hint about the supported CPU types




Documentation for the Magisk Module with clang20 and the NDK r29 beta1


URL: https://xdaforums.com/t/module-magisk-module-with-clang20-and-the-ndk-r29-beta1.4731789/
 

Documentation for the Magisk Module with clang20 and the NDK r29 beta1

The Magisk Module magisk module with clang20 and ndk contains clang version 20 (= clang20 in the rest of this section), make 4.4.1, pkg-config 0.29, pkgconf 2.30, and the files from the Android NDK r29 beta1 necessary to compile libraries and binaries for arm64 CPUs.


ASUS_I006D:/data/local/tmp/develop $ clang --version
clang version 20.0.0git (https://android.googlesource.com/toolchain/llvm-project b718bcaf8c198c82f3021447d943401e3ab5bd54)
Target: aarch64-unknown-linux-android
Thread model: posix
InstalledDir: /system/usr/clang20/bin
ASUS_I006D:/data/local/tmp/develop $


The Magisk Module installs the clang20 files in the directory

/system/usr/clang20


The binaries for clang20, make, pkg-config, and pkgconf are in the directory

/system/usr/clang20/bin


The files from the NDK are in the directory

/system/usr/ndk/r29-beta1

The sysroot from the NDK is in the directory

/system/usr/ndk/r29-beta1/sysroot


Use the command

. /system/bin/init_clang20_env

to init the environment for the clang20. This script defines all necessary environment variables (including the PATH variable) to use the clang20 binaries.


The usage for the script is

init_clang20_env --help
ASUS_I006D:/data/local/tmp/develop/done_clang/gettext-0.23 $ /system/bin/init_clang20_env --help
       
Usage: . /system/bin/init_clang20_env [-h|--help] [init] [no_user] [var=value] [examples]
 
init        - clear the used enviroment variables at script start
no_user     - do not execute /data/local/tmp/local_init_clang20_env
var=value   - set the environment variable "var" to "value" at start of the script
examples    - print compile examples


*******************************************************************
 WARNING: The script /system/bin/init_clang20_env must be sourced in
*******************************************************************

ASUS_I006D:/data/local/tmp/develop/done_clang/gettext-0.23 $




The script init_clang20_env will read and execute the file /data/local/tmp/local_init_clang20 if it exists. To disable reading that file, call init_clang20_env with the parameter no_user.

Example output:

. /system/bin/init_clang20_env
ASUS_I006D:/ $ source /bin/init_clang20_env

Preparing the clang environment for creating binaries for the CPU type aarch64

Using clang 20                                                                            

Using the NDK /system/usr/ndk/r29-beta1                                                    (environment variable NDK_DIR)
Using the sysroot directory /system/usr/ndk/r29-beta1/sysroot                              (environment variable SYSROOT)
Using the target root directory /data/local/tmp/develop/sysroot                            (environment variable TARGET_ROOT)


Environment variables used:

PATH is now:         /data/local/tmp/develop/sysroot/usr/bin:/system/usr/clang20/bin:/product/bin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/system_ext/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin

LD_LIBRARY_PATH:     :/system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android:/system/usr/clang20/lib

API is now:          31
NDK_DIR is now:      /system/usr/ndk/r29-beta1

SYSROOT is now:      /system/usr/ndk/r29-beta1/sysroot

CFLAGS are now:       -I/system/usr/clang20/include -I/system/usr/ndk/r29-beta1/include -I/system/usr/ndk/r29-beta1/sysroot/usr/include -I/data/local/tmp/develop/sysroot/usr/include --sysroot=/system/usr/ndk/r29-beta1/sysroot

CPPFLAGS are now:     -I/system/usr/clang20/include -I/system/usr/ndk/r29-beta1/include -I/system/usr/ndk/r29-beta1/sysroot/usr/include -I/data/local/tmp/develop/sysroot/usr/include --sysroot=/system/usr/ndk/r29-beta1/sysroot

CXXFLAGS are now:     -I/system/usr/clang20/include -I/system/usr/ndk/r29-beta1/include -I/system/usr/ndk/r29-beta1/sysroot/usr/include -I/data/local/tmp/develop/sysroot/usr/include --sysroot=/system/usr/ndk/r29-beta1/sysroot --target=aarch64-linux-android31

LDFLAGS are now:      -L/system/usr/ndk/r29-beta1/lib -L/system/usr/ndk/r29-beta1/lib/aarch64-unknown-linux-musl -L/system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/31 -L/system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android -L/data/local/tmp/develop/sysroot/usr/lib -B/system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/31/ --sysroot=/system/usr/ndk/r29-beta1/sysroot -lc 

CC is now:           /system/usr/clang20/bin/clang
CXX is now:          /system/usr/clang20/bin/clang++
CPP is now:          /system/usr/clang20/bin/clang-cpp
CXXCPP is now:       /system/usr/clang20/bin/clang-cpp
AR is now:           /system/usr/clang20/bin/llvm-ar
AS is now:           /system/usr/clang20/bin/llvm-as
LD is now:           /system/usr/clang20/bin/lld
RANLIB is now:       /system/usr/clang20/bin/llvm-ranlib
STRIP is now:        /system/usr/clang20/bin/llvm-strip
PKG_CONFIG is now:   /system/usr/clang20/bin/pkg-config

Checking the clang binary ...

clang version 20.0.0git (https://android.googlesource.com/toolchain/llvm-project b718bcaf8c198c82f3021447d943401e3ab5bd54)
Target: aarch64-unknown-linux-android
Thread model: posix
InstalledDir: /system/usr/clang20/bin


/data/local/tmp/local_init_clang20_env found -- now executing that file ...

Defining some aliase ...
sysroot='cd ; pwd'
setlibpath='export LD_LIBRARY_PATH=:/system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android:/system/usr/clang20/lib'
addlib='LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/data/local/tmp/develop/sysroot/usr/lib '
vi=/data/local/tmp/sysroot/usr/bin/vi
find=/data/local/tmp/sysroot/usr/bin/find
tar=/data/local/tmp/sysroot/usr/bin/tar
bash=/data/local/tmp/sysroot/usr/bin/bash
sed=/data/local/tmp/sysroot/usr/bin/sed
awk=/data/local/tmp/sysroot/usr/bin/awk
dd=/data/local/tmp/sysroot/usr/bin/dd
nano=/data/local/tmp/sysroot/usr/bin/nano
curl=/data/local/tmp/sysroot/usr/bin/curl


... /data/local/tmp/local_init_clang20_env executed

ASUS_I006D:/ $




The script init_clang20_env supports the following environment variables:

Variable
Description
Default value
Comment
CPU_TYPE
type of the current CPU
$( uname -m )
do not change this variable
CLANG_VERSION
clang version in the Magisk Module
20
do not change this variable
CLANG_DIR
directory with the clang files
/system/usr/clang${CLANG_VERSION}




This directory is only used if defined
NDK_VERSION
version of the NDK used
r29-beta1

NDK_DIR
directory with the Android NDK files
/system/usr/ndk/${NDK_VERSION}





SYSROOT
directory with the sysroot from the Android NDK
${NDK_DIR}/sysroot

API
the compiler and linker use the object files for this API version
31
The known API versions in the Android NDK can be found here:

ls -ld /system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/[0-9]*
ASUS_I006D:/data/local/tmp $ ls -ld /system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/[0-9]*
drwxr-xr-x 2 root root 500 1970-01-24 01:48 /system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/21
drwxr-xr-x 2 root root 500 1970-01-24 01:48 /system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/22
drwxr-xr-x 2 root root 500 1970-01-24 01:48 /system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/23
drwxr-xr-x 2 root root 540 1970-01-24 01:48 /system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/24
drwxr-xr-x 2 root root 540 1970-01-24 01:48 /system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/25
drwxr-xr-x 2 root root 600 1970-01-24 01:48 /system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/26
drwxr-xr-x 2 root root 620 1970-01-24 01:48 /system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/27
drwxr-xr-x 2 root root 620 1970-01-24 01:48 /system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/28
drwxr-xr-x 2 root root 660 1970-01-24 01:48 /system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/29
drwxr-xr-x 2 root root 660 1970-01-24 01:48 /system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/30
drwxr-xr-x 2 root root 700 1970-01-24 01:48 /system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/31
drwxr-xr-x 2 root root 700 1970-01-24 01:48 /system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/32
drwxr-xr-x 2 root root 700 1970-01-24 01:48 /system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/33
drwxr-xr-x 2 root root 700 1970-01-24 01:48 /system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/34
drwxr-xr-x 2 root root 700 1970-01-24 01:48 /system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/35
ASUS_I006D:/data/local/tmp $

 



Using an API version below 30 will not work in most cases to compile a library or binary with clang20

TARGET_ROOT sysroot dir with additional libraries and include files /data/local/tmp/develop/sysroot This directory is only used if defined

Libraries in this directory should be in the directory ./usr/lib; include files should be in the directory ./usr/include.


TMP
directory for temporary files

This variable is set to /data/local/tmp by the init script if

- /tmp does not exist
- /data/local/tmp exists
- TMP is not set
.


Notes:

To use the script to change the environment for another API version use this command:

. /system/bin/init_clang20_env  init  API=<new_api_version>


To use pkgconf instead of pkg-config set the environment variable PKG_CONFIG :

export PKG_CONFIG=/system/usr/clang20/bin/pkgconf

The binary files and libraries in the Magisk module are compiled for arm64 CPUs. Therefore the init script for the module, ./system/bin/init_clang19_env, only works without error if the command 'uname -m' returns "aarch64" or "armv8*".
If the 'uname -m' command returns a different value, the init_clang19_env script must be changed to support this value.




Source code used to create the binaries

The repository with the source code for the clang20 is:

https://android.googlesource.com/toolchain/llvm-project

The source code was checked out in 04/2025 using these commands:

git clone https://android.googlesource.com/toolchain/llvm-project

cd llvm-project

git checkout llvm-r547379-release


See the file

source/myconfigure

in the Magisk Module for the cmake options used to prepare the build process for the clang20 binaries.
The clang20 binaries were compiled on a machine running the Linux OS with the Cross Compiler from the Android NDK r27b.


The Android NDKs are available here:

https://developer.android.com/ndk/downloads


The source code for the make binary is available here:

https://ftp.gnu.org/gnu/make/

Note: The make binary must be compiled as static binary; a dynamic linked make binary works only partially.


The source code for pkg-config is available here:

https://pkgconfig.freedesktop.org/releases/


The source code for pkgconf is available here:

https://github.com/pkgconf/pkgconf




The Magisk Module also contains two very simple source files to test the compiler, to use them execute these commands:

# To test the C compiler environment use

cd /data/local/tmp
clang ${CFLAGS} ${LDFLAGS} -o helloworld_in_c helloworld_in_c.c  && ./helloworld_in_c

To test the C++ compiler use

cd /data/local/tmp
clang++ ${CXXFLAGS} -lc++_shared ${LDFLAGS}  -o helloworld_in_c++ ./helloworld_in_c++.cpp && ./helloworld_in_c++


Example output
ASUS_I006D:/ $ cd /data/local/tmp
ASUS_I006D:/data/local/tmp $

ASUS_I006D:/data/local/tmp $ clang ${CFLAGS} ${LDFLAGS} -o helloworld_in_c helloworld_in_c.c  && ./helloworld_in_c
Hello, World from a C program!
ASUS_I006D:/data/local/tmp $

ASUS_I006D:/data/local/tmp $ cd /data/local/tmp
ASUS_I006D:/data/local/tmp $

ASUS_I006D:/data/local/tmp $ clang++ ${CXXFLAGS} -lc++_shared ${LDFLAGS}  -o helloworld_in_c++ ./helloworld_in_c++.cpp && ./helloworld_in_c++
Hello, World from a C++ program!
ASUS_I006D:/data/local/tmp $
 


Trouble Shooting

For currently unknown reasons, the linker from clang20 sometimes does not find the necessary object files to create the binaries and the compile process aborts with an error message like this:

ld.lld: error: cannot open crtbegin_so.o: No such file or directory
ld.lld: error: cannot open crtend_so.o: No such file or directory
clang: error: linker command failed with exit code 1

In this case, check that the -B option is configured in the LDFLAGS, e.g:

ASUS_I006D:/data/local/tmp $ echo $LDFLAGS
-L/system/usr/ndk/r29-beta1/lib -L/system/usr/ndk/r29-beta1/lib/aarch64-unknown-linux-musl -L/system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/31 -L/system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android -L/data/local/tmp/develop/sysroot/usr/lib -B/system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/31/ --sysroot=/system/usr/ndk/r29-beta1/sysroot -lc
ASUS_I006D:/data/local/tmp $



If using the option does not fix the error, temporary copy the missing files to the directory with the object files used to create the new binary:

cp /system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/${API}/crtbegin_so.o .
cp /system/usr/ndk/r29-beta1/sysroot/usr/lib/aarch64-linux-android/${API}/crtend_so.o .

and execute make again.

The variable API contains the API version used to compile with clang20; this variable is set by the script init_clang20_env.


Notes


See here for the URL to the newest version of this Magisk Module.

The URL to download the version 1.0.0 of the Magisk Module is clang20_20.0.0git-v1.0.0-beta.zip 

There is also a github repository with the files for this Magisk Module: https://github.com/bnsmb/Magisk-Module-with-clang20 


A Magisk Module with clang 19 is documented here.

A clang 19 toolchain for phones without Magisk and without root access is documented here.


See the section How to install clang20 on phones without root access for the documentation for a tar archive with clang20.



History of this entry

18.04.2025

initial release

05.06.2025

add a hint about the supported CPU types





Documentation for the Magisk Module with tools to use an additional dynamic partition


URL: not yet published
 

Documentation for the Magisk Module with tools to use an additional dynamic partition


CAUTION:

 The scripts in this Magisk Module can damage or destroy the data on the phone.

 Only use this Magisk Module if you have a complete backup of the data on the phone and know how to reinstall the operating system on the phone from scratch!


 Note that the data on the new dynamic partition created with the scripts from this Magisk Module is NOT encrypted and is not deleted by a factory reset!


 It is strongly recommended to read this complete article and also the article How to create a new dynamic partition in the partition super before using this Magisk module


 
The Magisk Module create_dynamic_partition can be used to create and mount an additional dynamic partition in the super partition. The advantage of this partition is (as already described in this post):

"The data on additional dynamic partitions survive OS upgrades and also factory resets."


Since the commands used to create the additional dynamic partition are not well documented and may destroy the data on the phone, only the necessary scripts and executables to use the additional dynamic partition are installed during the installation of the Magisk module - the customization script of the Magisk module does NOT change anything and one-time manual steps are required to use this Magisk Module.


The most important files installed by this Magisk Module are the script

/system/bin/process_dynamic_partition.sh

and the config file

/etc/process_dynamic_partition.conf

(see below for a complete list of files installed by the Magisk Module)
 

Notes:

All commands used must be executed as user root. All commands can also be done using the wrapper script pdp (also installed by the Magisk Module). pdp can be used by any user who has the right to execute "su -"


The one-time manual steps required to create the new dynamic partition after installing and activating the Magisk module are as follows:


The first step is to check the used and free space in the super partition using this command:

/system/bin/process_dynamic_partition.sh status -v

This command prints the current configuration including the free space in the super partition.


The output of the script looks like this:

Example output
ASUS_I006D:/ #  /system/bin/process_dynamic_partition.sh  status -v
[2024-11-07 17:17:16] process_dynamic_partition.sh started
[2024-11-07 17:17:16] Reading the config file "/etc/process_dynamic_partition.conf" ...
[2024-11-07 17:17:17] Processing the config file "/etc/process_dynamic_partition.conf" ...
[2024-11-07 17:17:17]  ... config file processed
[2024-11-07 17:17:17] Checking if the required executables exist ...
[2024-11-07 17:17:17] INFO: OK, the executable "/system/bin/getprop" exists
[2024-11-07 17:17:17] INFO: OK, the executable "/system/bin/lpdump" exists
[2024-11-07 17:17:17] INFO: OK, the executable "/system/bin/dmctl" exists
[2024-11-07 17:17:17] INFO: OK, the executable "/system/bin/mount" exists
[2024-11-07 17:17:17] INFO: OK, the executable "/system/bin/umount" exists
[2024-11-07 17:17:17] INFO: OK, the executable "/system/bin/dd" exists
[2024-11-07 17:17:17] INFO: OK, the executable "/system/bin/df" exists
[2024-11-07 17:17:17] INFO: OK, the executable "/system/bin/awk" exists

[2024-11-07 17:17:17] Using the partition "persistentdata"
[2024-11-07 17:17:17] The requested partition size is "100MB"
[2024-11-07 17:17:17] Using the logical device "persistentdata"
[2024-11-07 17:17:17] The mount point is "/sdcard/Documents/persistentdata"

[2024-11-07 17:17:17] Retrieving the current status ...
[2024-11-07 17:17:19] Retrieving the status of the dynamic partition ...

[2024-11-08 17:17:19] The partition usage on the disk device "/dev/block/sda" used for the partition "super" is:

Model: SAMSUNG KLUDG4UHDC-B0E1 (scsi)
Disk /dev/block/sda: 125443MB
Sector size (logical/physical): 4096B/4096B
Partition Table: gpt
Disk Flags:

Number  Start     End       Size      File system  Name             Flags
        0.01MB    0.02MB    0.01MB    Free Space
 1      0.02MB    0.03MB    0.01MB                 ssd
 2      0.03MB    33.6MB    33.6MB    ext4         persist
 3      33.6MB    34.6MB    1.05MB                 misc
 4      34.6MB    35.2MB    0.52MB                 keystore
 5      35.2MB    35.7MB    0.52MB                 frp
 6      35.7MB    46.2MB    10.5MB                 fde
 7      46.2MB    79.7MB    33.6MB    ext4         factory
 8      79.7MB    113MB     33.6MB    ext4         batinfo
 9      113MB     516MB     403MB     ext4         asdf
10      516MB     517MB     1.05MB                 gpt
11      517MB     518MB     1.05MB                 sysinfo
12      518MB     552MB     33.6MB    ext4         ADF
13      552MB     761MB     210MB     ext4         APD
14      761MB     896MB     134MB                  ftm
15      896MB     963MB     67.1MB                 asusfw_a
16      963MB     1030MB    67.1MB                 asusfw_b
17      1030MB    1567MB    537MB     ext4         xrom_a
18      1567MB    2103MB    537MB     ext4         xrom_b
19      2103MB    9620MB    7516MB                 super
20      9620MB    9620MB    0.07MB                 vbmeta_system_a
21      9620MB    9620MB    0.07MB                 vbmeta_system_b
22      9620MB    9637MB    16.8MB    ext4         metadata
23      9637MB    125443MB  115807MB               userdata
        125443MB  125443MB  0.01MB    Free Space


[2024-11-07 17:17:19] There is no dynamic partition with the name "persistentdata" defined
[2024-11-07 17:17:19] There is no logical device with the name "persistentdata" defined
[2024-11-07 17:17:19] The mount point "/sdcard/Documents/persistentdata" does not exist


[2024-11-07 17:17:19] The dynamic partitions in the partition "super" for the active slot "_a" are:

super: 2048 .. 2733432: system_a (2731384 sectors)
super: 2734080 .. 3344984: system_ext_a (610904 sectors)
super: 3345408 .. 3347768: odm_a (2360 sectors)
super: 3348480 .. 4015152: product_a (666672 sectors)
super: 4016128 .. 6563728: vendor_a (2547600 sectors)

[2024-11-07 17:17:21] There are about 3202 MB used in the partition "super" for the partitions of the slot "_a"

[2024-11-07 17:17:22] The dynamic partitions in the partition "super" for the inactive slot "_b" are:

super: 2048 .. 2733432: system_b (2731384 sectors)
super: 2734080 .. 3344984: system_ext_b (610904 sectors)
super: 3345408 .. 3347768: odm_b (2360 sectors)
super: 3348480 .. 4015152: product_b (666672 sectors)
super: 4016128 .. 6563728: vendor_b (2547600 sectors)

[2024-11-07 17:17:23] There are about 3202 MB used in the partition "super" for the partitions of the slot "_b"

[2024-11-07 17:17:23] The size of the partition "super" is 7168 MB
[2024-11-07 17:17:23] The free space in the partition "super" is about 764 MB

[2024-11-07 17:17:24] INFO: Housekeeping started ...
[2024-11-07 17:17:24] process_dynamic_partition.sh ended
ASUS_I006D:/ #  


---

In the example above, the free space in the super partition is 764 MB. This free space could be used for the additional dynamic partition, but since Android OS upgrades often require additional space for the existing dynamic partitions, you should not use all the free space.
Also note that the additional dynamic partition is created twice -- in slot a and slot b.
The free space reported by the script is the free space available for both slots: The maximum size for the additional dynamic partition in this example is therefore 764 / 2 = 382 MB.

The script to create the additional dynamic partition uses the config file /etc/process_dynamic_partition.conf to retrieve the configuration for the new device . The config entry for the size of the new dynamic partition is

  PARTITION_SIZE="100MB"


You should adjust this value to your needs before proceeding; the value must be changed in the source file for the configuration file in the Magisk module, i.e. in the file

/data/adb/modules/create_dynamic_partition/system/etc/process_dynamic_partition.conf


To activate the changes in the config file without rebooting the phone use these commands

umount /system/etc/process_dynamic_partition.conf && \
   mount -o bind /data/adb/modules/create_dynamic_partition//system/etc/process_dynamic_partition.conf /system/etc/process_dynamic_partition.conf


Notes

You can also define the size of the partition in the user defined config file /data/local/tmp/user_process_dynamic_partition.conf (see below)

The value for the PARTITION_SIZE keyword can also be an existing file or device - in this case, the size of the new dynamic partition is equal to the size of the existing file or device.

The value for the size of the partition is only used to create the additional dynamic partition.

The command to create the new partition, lpadd, does not support a parameter for the size of the partition. Instead, an existing device or file is used to determine the size for the new partition. To use this "feature", the script process_dynamic_partition.sh creates a temporary file with the requested size for the new partition in the temporary directory defined in the script's configuration file.

Sometimes the lpdump command used to read out the configuration of the partition super can only read out the data for the currently active slot; in this case, the script does not output the usage information for the inactive slot and can not calculate the free space in the partition super (so you must calculate the free size manually).


After you have checked and possibly corrected the configuration file, you can create and integrate the new dynamic device with the command

/system/bin/process_dynamic_partition.sh create mount

or use the symbolic link for creating and mounting the new dynamic partition

/system/bin/create_and_mount_dynamic_partition


Example:

ASUS_I006D:/ # /system/bin/process_dynamic_partition.sh create mount
[2024-11-07 21:13:03] process_dynamic_partition.sh started
[2024-11-07 21:13:03] Reading the config file "/etc/process_dynamic_partition.conf" ...
[2024-11-07 21:13:03] Processing the config file "/etc/process_dynamic_partition.conf" ...
[2024-11-07 21:13:03]  ... config file processed
[2024-11-07 21:13:03] Checking if the required executables exist ...

[2024-11-07 21:13:03] Using the partition "persistentdata"
[2024-11-07 21:13:03] The requested partition size is "100MB"
[2024-11-07 21:13:03] Using the logical device "persistentdata"
[2024-11-07 21:13:03] The mount point is "/sdcard/Documents/persistentdata"

[2024-11-07 21:13:03] Retrieving the current status ...

 ***************************************************************************
 CAUTION:

 This script can damage or destroy the data on the phone.

 Only use this script if you have a complete backup of the data on the phone
 and know how to reinstall the operating system on the phone from scratch

 ***************************************************************************



(Note: Use the script parameter "-y" to suppress this request)

Enter YES<return> to continue : YES
[2024-11-07 21:13:12] Creating the dynamic partition ...
[2024-11-07 21:13:12] Creating the temporary file "/sdcard/Download/new_partition_size_template.5614.img" ...
[2024-11-07 21:13:13] Creating the dynamic partition "persistentdata" ...
[2024-11-07 21:13:14] Creating the logical device "persistentdata" ...
[2024-11-07 21:13:14] The new logical device is "/dev/block/dm-6"
[2024-11-07 21:13:14] Waiting 5 second(s) now ...
[2024-11-07 21:13:19] The new device "/dev/block/dm-6" is ready now
[2024-11-07 21:13:19] Creating a filesystem on the logical device "persistentdata" using the executable "/system/bin/mkfs.ext3" ...
[2024-11-07 21:13:19] Waiting now 5 seconds ...
[2024-11-07 21:13:25] Creating the config file for the service.sh script "/data/adb/dynamic_partition_service.conf" ...
[2024-11-07 21:13:25] Waiting for 5 seconds now ...
[2024-11-07 21:13:30] Mounting the dynamic partition to "/sdcard/Documents/persistentdata"  ...
[2024-11-07 21:13:30] "/sdcard/Documents/persistentdata" successfully mounted

+ 2>&1
+ df -h /sdcard/Documents/persistentdata
Filesystem      Size Used Avail Use% Mounted on
/dev/block/dm-6  90M  28K   90M   1% /mnt/user/0/emulated/0/Documents/persistentdata

[2024-11-07 21:13:30] Changing the owner and group for the mount point "/sdcard/Documents/persistentdata" to "media_rw:media_rw" ...
[2024-11-07 21:13:30] Setting the permissions for the mount point "/sdcard/Documents/persistentdata" to "1777" ...
[2024-11-07 21:13:30] Setting the SELinux context for the mount point "/sdcard/Documents/persistentdata" to "u:object_r:media_rw_data_file:s0" ...

[2024-11-07 21:13:31] The permissions for the mount point "/sdcard/Documents/persistentdata" are now:

drwxrwxrwt 3 media_rw media_rw u:object_r:media_rw_data_file:s0  4096 2024-11-07 21:13 /sdcard/Documents/persistentdata

[2024-11-07 21:13:31] Creating the config file for the service.sh script "/data/adb/dynamic_partition_service.conf" ...
[2024-11-07 21:13:31] process_dynamic_partition.sh ended
ASUS_I006D:/ #


The script then creates and mounts the new dynamic partition. The mount point to use is also defined in the config file /etc/process_dynamic_partition.conf; the default mount point is /sdcard/Documents/persistentdata.
You may change the mount point to use but be aware that to be able to use the new partition from any Android app, the mount point for the partition must be somewhere in a subdirectory of /sdcard.

The script also creates the configuration file /data/adb/dynamic_partition_service.conf. This file is read by the service.sh script in the Magisk module, which mounts the new dynamic partition after each restart.


Now the new dynamic partition is ready to be used.


To maintain the dynamic partition, e.g. mount or umount the partition or delete the partition, the script process_dynamic_partition.sh can also be used. The usage for the script process_dynamic_partition.sh is:

/system/bin/process_dynamic_partition.sh  -h -v
ASUS_I006D:/ # /system/bin/process_dynamic_partition.sh  -h -v

 process_dynamic_partition.sh -- create, mount, umount, or delete a dynamic partition

 Usage:
   process_dynamic_partition.sh [-f configfile] [-l logfile] [-v|--verbose] [-k|--keep] [-y|--yes] [-e|--ignore_error] [var=value] [create|delete|mount|umount|status|update|refresh]

 Parameter:
   -f configfile
     The default config file for this script is /etc/process_dynamic_partition.conf
     use the parameter "-f none" to run without a config file

   -l logfile
     The default log file used by this script is /sdcard/Download/<scriptname>.log
     use the parameter "-l none" to run without a log file

   -v
     print verbose messages

   -k
     do not delete temporary files at script end

   -y
     assume "yes" for all user requests

   -e
     ignore errors, without this parameter the script stops after an action failed

   var=value
     set the variable "var" to the value "value" at start of the script
     (before reading the config file)

   create
     create the dynamic partition and the logical device

   delete
     delete the logical device
     Note: The dynamic partition must be deleted manually in fastboot mode
           (see the instructions printed by the script)

   mount
     create the mount point and mount the dynamic partition

   umount
     umount the dynamic partition

   status
     print the status of the dynamic partition, the logical device, and the mount point

   update
     update the config file for the service.sh script to mount the new dynamic partition
     The config file for the service.sh script is the file /data/adb/dynamic_partition_service.conf

   refresh
     set the permissions for the mount point

 The parameters can be used in any order; several action parameters are permitted


Default values hardcoded in the script (these values are used if no config file is used):

LOGFILE="/sdcard/Download/process_dynamic_partition.log"
CONFIG_FILE="/etc/process_dynamic_partition.conf"
TMP_DIR="/sdcard/Download"
PARTITION_NAME="persistentdata"
PARTITION_SIZE="100M"
LOGICAL_DEVICE_NAME="persistentdata"
MOUNT_POINT="/sdcard/Documents/persistentdata"
MOUNT_POINT_OWNER="media_rw"
MOUNT_POINT_GROUP="media_rw"
MOUNT_POINT_PERMISSIONS="1777"
MOUNT_POINT_SELINUX_CONTEXT="u:object_r:media_rw_data_file:s0"
SUPER_PARTITION_NAME="super"
SUPER_PARTITION="/dev/block/by-name/${DEFAULT_SUPER_PARTITION_NAME}"
DISK_DEVICE="$( ls -l "${DEFAULT_SUPER_PARTITION}" | awk '{ print $NF }' | tr -d "[0-9]" )"
UMOUNT_WAIT_TIME=10
MKFS_WAIT_TIME=5
MOUNT_WAIT_TIME=5
DMCTL_CREATE_WAIT_TIME=10
GETPROP="$( which getprop 2>/dev/null )"
LPDUMP="$( which lpdump 2>/dev/null )"
DMCTL="$( which dmctl 2>/dev/null )"
MOUNT="$( which mount 2>/dev/null )"
UMOUNT="$( which umount 2>/dev/null )"
DD="${MAGISK_DD:=$( which dd 2>/dev/null )}"
DF="$( which df 2>/dev/null )"
LPADD="$( which lpadd 2>/dev/null )"
MKFS="$( which mkfs.ext3  2>/dev/null )"
AWK="$( which awk 2>/dev/null )"
PARTED="$( which parted 2>/dev/null )"

[2024-11-08 20:28:22] INFO: Housekeeping started ...
[2024-11-08 20:28:22] process_dynamic_partition.sh ended
1|ASUS_I006D:/ $ 



Please note that deleting the new partition is not yet implemented in the current version of the script process_dynamic_partition.sh. To delete the partition a manual reboot into the fastboot mode is required; that can be done via

reboot fastboot

in the Android OS or using

adb reboot fastboot

in the Linux or Window OS on the PC if the phone is connected via adb.


In fastboot mode the command

fastboot delete-logical-partition persistentdata

deletes the new dynamic partition.


Example
# list the configured dynamic partitions
#
[ OmniRom 14 Dev - xtrnaw7@t15g /data/develop/android/ModuleSrc/create_dynamic_partition ] $ sudo fastboot getvar all 2>&1 | grep "is-logical:" | grep ":yes"
(bootloader) is-logical:system_a:yes
(bootloader) is-logical:system_ext_a:yes
(bootloader) is-logical:odm_a:yes
(bootloader) is-logical:product_a:yes
(bootloader) is-logical:vendor_a:yes
(bootloader) is-logical:persistentdata:yes
[ OmniRom 14 Dev - xtrnaw7@t15g /data/develop/android/ModuleSrc/create_dynamic_partition ] $

# delete the new dynamic partition
#
[ OmniRom 14 Dev - xtrnaw7@t15g /data/develop/android/ModuleSrc/create_dynamic_partition ] $ sudo fastboot delete-logical-partition persistentdata
Deleting 'persistentdata'                          OKAY [  0.005s]
Finished. Total time: 0.005s
[ OmniRom 14 Dev - xtrnaw7@t15g /data/develop/android/ModuleSrc/create_dynamic_partition ] $

# check the result
#
[ OmniRom 14 Dev - xtrnaw7@t15g /data/develop/android/ModuleSrc/create_dynamic_partition ] $ sudo fastboot getvar all 2>&1 | grep "is-logical:" | grep ":yes"
(bootloader) is-logical:system_a:yes
(bootloader) is-logical:system_ext_a:yes
(bootloader) is-logical:odm_a:yes
(bootloader) is-logical:product_a:yes
(bootloader) is-logical:vendor_a:yes
[ OmniRom 14 Dev - xtrnaw7@t15g /data/develop/android/ModuleSrc/create_dynamic_partition ] $

# reboot into the Android OS
#
[ OmniRom 14 Dev - xtrnaw7@t15g /data/develop/android/ModuleSrc/create_dynamic_partition ] $ sudo fastboot reboot
Rebooting                                          OKAY [  0.000s]
Finished. Total time: 0.251s
[ OmniRom 14 Dev - xtrnaw7@t15g /data/develop/android/ModuleSrc/create_dynamic_partition ] $  


Notes:

AFAIK fastboot mode is implemented by all recoveries available for the Android OS 10 or newer.

There is no command to delete a dynamic partition within the Android OS.


How to use the new dynamic partition after an OS upgrade

After an operating system upgrade without deleting the data or a data reset, the new dynamic partition is automatically mounted after the reboot, provided Magisk is installed in the updated operating system
(without deleting the data partition all Magisk modules survive an OS upgrade)


How to use the new dynamic partition after a factory reset

Check whether the additional dynamic partition still exists (of course it should ...)

To check as a non-root user whether the additional dynamic partition exists or not, the command lpdump can be used

Example:

ASUS_I006D:/ # id -un
shell
ASUS_I006D:/ #

ASUS_I006D:/ $ ASUS_I006D:/ $ lpdump | grep super:

super: 2048 .. 2733432: system_a (2731384 sectors)
super: 2734080 .. 3344984: system_ext_a (610904 sectors)
super: 3345408 .. 3347768: odm_a (2360 sectors)
super: 3348480 .. 4015152: product_a (666672 sectors)
super: 4016128 .. 6563728: vendor_a (2547600 sectors)
super: 6563840 .. 6871040: persistentdata (307200 sectors)
ASUS_I006D:/ $


The additional dynamic partition will survive a factory reset, but the configuration file required by the script service.sh to mount the additional dynamic partition and the mount point will not. Therefore, to recreate all necessary configuration entries to use the additional dynamic partition after a factory reset, install the Magisk Module create_dynamic_partition and simply enter the command to create the additional dynamic partition again. The script then only recreates the missing config items, example:

su - -c /system/bin/process_dynamic_partition.sh create mount
ASUS_I006D:/ $ su - -c /system/bin/process_dynamic_partition.sh create mount
[2024-11-08 13:31:58] process_dynamic_partition.sh started
[2024-11-08 13:31:59] Reading the config file "/etc/process_dynamic_partition.conf" ...
[2024-11-08 13:31:59] Processing the config file "/etc/process_dynamic_partition.conf" ...
[2024-11-08 13:31:59]  ... config file processed
[2024-11-08 13:31:59] Checking if the required executables exist ...

[2024-11-08 13:31:59] Using the partition "persistentdata"
[2024-11-08 13:31:59] The requested partition size is "100MB"
[2024-11-08 13:31:59] Using the logical device "persistentdata"
[2024-11-08 13:31:59] The mount point is "/sdcard/Documents/persistentdata"

[2024-11-08 13:31:59] Retrieving the current status ...

 ***************************************************************************
 CAUTION:

 This script can damage or destroy the data on the phone.

 Only use this script if you have a complete backup of the data on the phone
 and know how to reinstall the operating system on the phone from scratch

 ***************************************************************************



(Note: Use the script parameter "-y" to suppress this request)

Enter YES<return> to continue : YES
[2024-11-08 13:32:04] Creating the dynamic partition ...
[2024-11-08 13:32:04] The partition already exists:
super: 6563840 .. 6871040: persistentdata (307200 sectors)
[2024-11-08 13:32:04] The logical device already exists:
persistentdata       : 253:5
[2024-11-08 13:32:04] Creating the config file for the service.sh script "/data/adb/dynamic_partition_service.conf" ...
[2024-11-08 13:32:04] Waiting for 5 seconds now ...
[2024-11-08 13:32:09] Mounting the dynamic partition to "/sdcard/Documents/persistentdata"  ...
[2024-11-08 13:32:09] Creating the mount point "/sdcard/Documents/persistentdata" ...
[2024-11-08 13:32:09] "/sdcard/Documents/persistentdata" successfully mounted

+ 2>&1
+ df -h /sdcard/Documents/persistentdata
Filesystem      Size Used Avail Use% Mounted on
/dev/block/dm-5 125M 4.5M  120M   4% /mnt/user/0/emulated/0/Documents/persistentdata

[2024-11-08 13:32:09] Changing the owner and group for the mount point "/sdcard/Documents/persistentdata" to "media_rw:media_rw" ...
[2024-11-08 13:32:09] Setting the permissions for the mount point "/sdcard/Documents/persistentdata" to "1777" ...
[2024-11-08 13:32:09] Setting the SELinux context for the mount point "/sdcard/Documents/persistentdata" to "u:object_r:media_rw_data_file:s0" ...

[2024-11-08 13:32:09] The permissions for the mount point "/sdcard/Documents/persistentdata" are now:

drwxrwxrwt 3 media_rw media_rw u:object_r:media_rw_data_file:s0  4096 2024-11-08 07:55 /sdcard/Documents/persistentdata

[2024-11-08 13:32:10] process_dynamic_partition.sh ended
ASUS_I006D:/ $  


Now you can continue to use the filesystem on the additional dynamic partition.

Notes

If you have created the additional dynamic partition with values other than the default values, change the values in the config file /etc/process_dynamic_partition.conf or restore the user configuration file /data/local/tmp/user_process_dynamic_partition.conf before executing the script process_dynamic_partition.sh.

 


Details for the config file /etc/process_dynamic_partition.conf

The known entries in the config file /etc/process_dynamic_partition.conf for the script process_dynamic_partition.sh are:

cat /etc/process_dynamic_partition.conf
ASUS_I006D:/ # cat /etc/process_dynamic_partition.conf
#
# config file for process_dynamic_partition.sh

#
# Format:
#   shell script, this file is sourced in
#   lines starting with "#" are comment lines
#
# History
#  05.11.2024 /bs
#   initial version
#

# directory for temporary files
#
  TMP_DIR="/sdcard/Download"

# name of the partiton with the persistent data
#
  PARTITION_NAME="persistentdata"

# size for the partition with the persistent data
#
# The partition size can be any value accepted by dd for the parameter "bs="
# or the fully qualified name of an existing file or device: in this case the size of the new partition is the size of the file/device
#
  PARTITION_SIZE="100MB"

#  or:
#
#  PARTITION_SIZE="/dev/block/by-name/boot_a"


# name of the logical device for the new partition
#
  LOGICAL_DEVICE_NAME="persistentdata"

# mount point for the new logical device
#
# If the partition should be used in standard apps, the mount point must be in a sub directory of the directory /sdcard
#
  MOUNT_POINT="/sdcard/Documents/persistentdata"

# owner, group, permissions, and SELinux context for the new mount point
#
  MOUNT_POINT_OWNER="media_rw"
  MOUNT_POINT_GROUP="media_rw"
  MOUNT_POINT_PERMISSIONS="1777"
  MOUNT_POINT_SELINUX_CONTEXT="u:object_r:media_rw_data_file:s0"

# or : u:object_r:tmpfs:s0

# log file for the script
#
  LOGFILE="/sdcard/Download/process_dynamic_partition.log"


# maximum waiting time until the logical device has been successfully umounted
#
  UMOUNT_WAIT_TIME=10


# time in seconds to wait after creating the partition before creating the logical volume
#
  DMCTL_CREATE_WAI
T_TIME=10

# time in seconds to wait before creating the filesystem on the new device
#
  MKFS_WAIT_TIME=5

# time in seconds to wait before the filesystem is mounted
#
  MOUNT_WAIT_TIME=5


# name and path of the physical partition with the dynamic partitions (do not change this value)
#
  SUPER_PARTITION_NAME="super"

  SUPER_PARTITION="/dev/block/by-name/${SUPER_PARTITION_NAME}"

# disk device used for the partitions
#
  DISK_DEVICE="/dev/block/sda"

# required executables
#
#  GETPROP="$( which getprop 2>/dev/null )"
#  LPDUMP="$( which lpdump 2>/dev/null )"
#  DMCTL="$( which dmctl 2>/dev/null )"
#  MOUNT="$( which mount 2>/dev/null )"
#  UMOUNT="$( which umount 2>/dev/null )"
#  DD="$( which dd 2>/dev/null )"
#  DF="$( which df 2>/dev/null )"
#  LPADD="$( which lpadd 2>/dev/null )"
#  MKFS="$( which mkfs.ext3  2>/dev/null )"
#  AWK="$( which awk 2>/dev/null )"

# optional executables
#
#  PARTED="$( which parted 2>/dev/null )"


# include user defined config file if it exists
if [ -r /data/local/tmp/user_process_dynamic_partition.conf ] ; then
  LogMsg "Reading the file /data/local/tmp/user_process_dynamic_partition.conf ..."
  . /data/local/tmp/user_process_dynamic_partition.conf
fi
ASUS_I006D:/ #
 
---


The names of the entries should be self-explanatory.

You may need to adjust the values for the timeouts.

The permissions and the SELinux context for the mount point allow every use on the Android phone to read and write to the new filesystem.

To change the configuration for the script process_dynamic_partition.sh, either change the values in the configuration file /etc/process_dynamic_partition.conf or add the changed entries to the file

/data/local/tmp/user_process_dynamic_partition.conf

The values in that file overwrite the values from the config file /etc/process_dynamic_partition.conf.

To simplify reconfiguration after doing a factory reset, it is advisable to include the changed configuration settings in the file /data/local/tmp/user_process_dynamic_partition.conf and backup that file on another medium.


Details for the script service.sh

The script service.sh of the Magisk Module is used to mount the filesystem on the new dynamic partition after each reboot.

The script service.sh uses the config file /data/adb/dynamic_partition_service.conf.

This file contains these entries:

cat /data/adb/dynamic_partition_service.conf
ASUS_I006D:/ # cat /data/adb/dynamic_partition_service.conf
#
# config file for service.sh from the Magisk Module for processing the new dynamic partition
#
# File created at Fri Nov  8 20:17:34 CET 2024
#

# name of the logical device
#
LOGICAL_DEVICE_NAME="persistentdata"

# mount point for the new filesystem
#
MOUNT_POINT="/sdcard/Documents/persistentdata"

# filesystem on the new device
#
FILESYSTEM_TYPE="ext3"

MOUNT_OPTIONS="-t ext3"

# time to wait in seconds before mounting the new partition
#
MOUNT_WAIT_TIME="5"

# owner, group, permissions, and SELinux Context for the mountpoint
#
MOUNT_POINT_OWNER="media_rw"
MOUNT_POINT_GROUP="media_rw"
MOUNT_POINT_PERMISSIONS="1777"
MOUNT_POINT_SELINUX_CONTEXT="u:object_r:media_rw_data_file:s0"

ASUS_I006D:/ #  
----

The script service.sh does nothing if the config file is missing or corrupt.


To disable the automatic mounting of the new dynamic partition, create the file

/data/local/tmp/IGNORE_PERSISTENT_PARTITION


The script service.sh writes log messages to the file

/data/local/tmp/process_dynamic_partition_service.log

If the file /data/local/tmp/debug exists the script service.sh is executed with "set -x"



Details for the script action.sh

Magisk 28.0 adds support for the module script action.sh

This script is executed by Magisk if the Action button for a Module in the Magisk GUI is pressed:






For this Magisk Module the Action button can be used to mount or umount the filesystem on the new dynamic partition.
(e.g. if the filesystem is mounted the Action button umounts it and if the filesystem is not mounted the Action button mounts the filesystem)

The script action.sh used for this writes log messages to the file

/data/local/tmp/process_dynamic_partition_action.log

If the file /data/local/tmp/debug exists, the script action.sh is executed with "set -x"



Files installed by this Magisk Module

The Magisk Module install and creates these files:

File / Directory
Usage
Comment
/system/bin/process_dynamic_partition.sh
the main script

/system/bin/create_and_mount_dynamic_partition
/system/bin/create_dynamic_partition
/system/bin/status_dynamic_partition
/system/bin/umount_dynamic_partition
/system/bin/delete_dynamic_partition
/system/bin/mount_dynamic_partition
/system/bin/umount_and_delete_dynamic_partition

symbolic links for the main script, to simplify use, e.g.

create_and_mount_dynamic_partition

is the same as executing

process_dynamic_partition.sh create mount

/system/bin/pdp
wrapper script for /system/bin/process_dynamic_partition.sh; this script executes prcoess_dynamic_partition.sh with the prefix "su - -c " if executed by a non root user.

/system/etc/process_dynamic_partition.conf
the config file for the script /system/bin/process_dynamic_partition.sh
/system/usr/create_dynamic_partition_tools/
in this directory are the binaries to create the partition and filesystem and some other useful executables
The files in this directory in version 1.1.0 of the Magisk Module are

Binaries in the module
ASUS_I006D:/ $ date
Fri Feb 14 11:11:20 CET 2025
ASUS_I006D:/ $


ASUS_I006D:/ $ cd /system/usr/create_dynamic_partition_tools
ASUS_I006D:/ $

ASUS_I006D:/system/usr/create_dynamic_partition_tools $ find . -type f
./tune2fs
./resize2fs
./parted
./mksh
./mkfs.fat
./mkexfatfs
./mke2fs
./make_ext4fs
./lpunpack
./lpmake
./lpdump
./lpadd
./e2fsck
./dmctl_binaries/35/dmctl_android35
./dmctl_binaries/34/dmctl_android34
./dmctl_binaries/33/dmctl_android33
ASUS_I006D:/system/usr/create_dynamic_partition_tools $
         

/system/usr/create_dynamic_partition_tools/dmctl_binaries/* dmctl binaries for Android
dmctl binaries in the module
ASUS_I006D:/system/usr/create_dynamic_partition_tools/dmctl_binaries $ date
Fri Feb 14 11:14:03 CET 2025
ASUS_I006D:/system/usr/create_dynamic_partition_tools/dmctl_binaries $

ASUS_I006D:/system/usr/create_dynamic_partition_tools/dmctl_binaries $ find . -type f
./35/dmctl_android35
./34/dmctl_android34
./33/dmctl_android33
ASUS_I006D:/system/usr/create_dynamic_partition_tools/dmctl_binaries $



/data/adb/modules/create_dynamic_partition/service.sh
service script of the Magisk Module responsible to mount the filesystem on the new dynamic partition after a reboot

/data/adb/modules/create_dynamic_partition/action.sh
action.sh is executed by Magisk when the “Action” button for the module is pressed in the Magisk GUI
this a symbolic link to service.sh
/data/adb/dynamic_partition_service.conf
this is the config file for service.sh (and action.sh)
this file is created by the script /system/bin/process_dynamic_partition.sh with the parameter create or update








All log files are written to the directory /data/local/tmp.


In version 1.1.0 and newer of the Magisk Module the customize script in the Magisk module checks whether the dmctl binary is available via the PATH variable in the running Android operating system.

If no dmctl binary is found, the script tests whether one of the dmctl binaries in the Magisk module works, and if so, it creates a symbolic link to this dmctl binary in /system/bin/dmctl.

The dmctl binaries from the Magisk Module are available in the directory

/system/usr/create_dynamic_partition_tools/dmctl_binaries/

after installing the module:

ASUS_I006D:/ $ ls -ld $( find /system/usr/create_dynamic_partition_tools/dmctl_binaries -type f )
-rwxr-xr-x 1 root root 90744 2025-02-14 16:20 /system/usr/create_dynamic_partition_tools/dmctl_binaries/33/dmctl_android33
-rwxr-xr-x 1 root root 99160 2025-02-14 16:20 /system/usr/create_dynamic_partition_tools/dmctl_binaries/34/dmctl_android34
-rwxr-xr-x 1 root root 95496 2025-02-14 16:20 /system/usr/create_dynamic_partition_tools/dmctl_binaries/35/dmctl_android35
ASUS_I006D:/ $



Notes

android33 = API 33 = Android 13
android34 = API 34 = Android 14
android35 = API 35 = Android 15

(see https://source.android.com/docs/setup/reference/build-numbers)


The dmctl binaries are dynamically linked binaries and may or may not work in other Android versions:

ASUS_I006D:/ $ ldd $( which dmctl )                                                                                                                               
    linux-vdso.so.1 => [vdso] (0x7ccef68000)
    libbase.so => /system/lib64/libbase.so (0x7ccdcc7000)
    liblog.so => /system/lib64/liblog.so (0x7ccdc4e000)
    libc++.so => /system/lib64/libc++.so (0x7ccd8e5000)
    libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x7ccbe54000)
    libm.so => /apex/com.android.runtime/lib64/bionic/libm.so (0x7ccdc85000)
    libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x7ccdd17000)
ASUS_I006D:/ $



Notes

In the default config the script creates an ext3 filesystem on the new device; to use another file type, set the variable MKFS in the config file. E.g to use ext4

 MKFS="$( which mkfs.ext4 2>/dev/null )"

Supported filesystems for the device are ext2, ext3, and ext4.


Test Environment

ASUS Zenfone 8 with

ASUS Android 13
OmniROM 13 (Android 13)
OmniROM 14 (Android 14)
OmniROM 15 (Android 15)
LineageOS 19 (Android 12)
LineageOS 20 (Android 13)
StatixOS (Android 14)
LMODroid (Android 13)
/e/ 2.0 (Android 13)





Trouble Shooting


Sometimes creating files on the new device fails with an error message about missing free space on the device, example:

ASUS_I006D:/ $ touch /sdcard/Documents/persistentdata/xxx
touch: '/sdcard/Documents/persistentdata/xxx': No space left on device
1|ASUS_I006D:/ $

In this case delete and recreate the logical device using the command

/system/bin/process_dynamic_partition.sh umount delete create mount

Note that in my tests this only sometimes occurs immediately after the new logical device is created, when there is no data on the new file system.



The filesystem on the new dynamic partition is not mounted after a reboot

In this case, please wait some more seconds. Setting up the logical devices needs some time in Android. The script service.sh waits up to 60 seconds for the device to be ready.

If the filesystem is still not mounted after 1 minute, check the log file of the service.sh script /data/local/tmp/process_dynamic_partition_service.log for errors.

You may also execute the script /data/adb/modules/create_dynamic_partition/service.sh manually as root user to check for error messages.



If access to a file in the file system on the additional dynamic partition is not possible due to an I/O error, check the permissions of the file and correct them if necessary

Example

ASUS_I006D:/data/local/tmp $ id
uid=2000(shell) gid=2000(shell) groups=2000(shell),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),1078(ext_data_rw),1079(ext_obb_rw),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid),3012(readtracefs) context=u:r:shell:s0
ASUS_I006D:/data/local/tmp $

ASUS_I006D:/data/local/tmp $ unzip -t /sdcard/Documents/persistentdata/create_dynamic_partition_v1.0.0.zip
unzip: couldn't open /sdcard/Documents/persistentdata/create_dynamic_partition_v1.0.0.zip: I/O error
1|ASUS_I006D:/data/local/tmp $

1|ASUS_I006D:/data/local/tmp $ ls -ldZ /sdcard/Documents/persistentdata/create_dynamic_partition_v1.0.0.zip
-rw-rw---- 1 u0_a129 media_rw u:object_r:media_rw_data_file:s0  4693071 2024-11-08 07:50 /sdcard/Documents/persistentdata/create_dynamic_partition_v1.0.0.zip
ASUS_I006D:/data/local/tmp $

# correct the permissions
#
ASUS_I006D:/data/local/tmp $ sudo chmod 666 /sdcard/Documents/persistentdata/create_dynamic_partition_v1.0.0.zip
ASUS_I006D:/data/local/tmp $

ASUS_I006D:/data/local/tmp $ unzip -t /sdcard/Documents/persistentdata/create_dynamic_partition_v1.0.0.zip | head -3                                                                                 
Archive:  /sdcard/Documents/persistentdata/create_dynamic_partition_v1.0.0.zip
    testing: system/usr/create_dynamic_partition_tools/make_ext4fs OK
    testing: module.prop              OK
ASUS_I006D:/data/local/tmp $ 


Mounting/Umounting the new dynamic partition via Action Button in Magisk does not work

Check that the config file

/data/adb/dynamic_partition_service.conf

exists with correct contents.

If the file does not exist or of the contents are incomplete or corrupted, recreate it using the command

/system/bin/process_dynamic_partition.sh update

Also check the log file of the script action.sh:

/data/local/tmp/process_dynamic_partition_action.log



The directory can not be used to copy files to the phone via adb push:

[ OmniRom 14 Dev - xtrnaw7@t15g /data/develop/android/ModuleSrc/create_dynamic_partition ] $ adb push ../create_dynamic_partition_v1.0.0.zip /sdcard/Documents/persistentdata/
adb: error: failed to copy '../create_dynamic_partition_v1.0.0.zip' to '/sdcard/Documents/persistentdata/create_dynamic_partition_v1.0.0.zip': remote couldn't create file: Permission denied
../create_dynamic_partition_v1.0.0.zip: 1 file pushed, 0 skipped. 69.3 MB/s (4693071 bytes in 0.065s)
[ OmniRom 14 Dev - xtrnaw7@t15g /data/develop/android/ModuleSrc/create_dynamic_partition ] $

I do not know how to fix that error (the error also happens with SELinux in permissive mode so it's most probably not a SELinux issue)



Links

https://source.android.com/docs/core/ota/dynamic_partitions/implement Implement dynamic partitions
https://source.android.com/docs/core/ota/dynamic_partitions/how_to_size_super Size the super partition
https://github.com/LonelyFool/lpunpack_and_lpmake/tree/android11/partition_tools Dynamic partition tools






History of this entry

10.11.2024

initial release

15.02.2024

updated the documentation to match version 1.1.0 of the Magisk Module



Documentation for the Magisk Module with bash


URL: https://xdaforums.com/t/module-magisk-module-with-bash-with-working-file-permission-tests-for-non-root-user.4743215/


Documentation for the Magisk Module with bash
In most bash binaries for Android I know file permission tests like

[ -x /bin/sh ] && echo "execution permission is set"
[ -r /bin/sh ] && echo "read permission is set"

do not work for non-root users for some files (the tests work if bash is run as user root).

e.g. in bash from /e/ 3.0 for the ASUS Zenfone 8
[ 04:44 PM shell@localhost / ]$ getprop  ro.build.description
e_sake-user 13 TQ3A.230901.001 eng.root.20250529.124212 release-keys
[ 04:45 PM shell@localhost / ]$

ASUS_I006D:/ $ bash --version
GNU bash, version 5.1.0(1)-release (arm-android-eabi)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
ASUS_I006D:/ $ bash
shell@sake / $

shell@sake / $ echo $0
bash
shell@sake / $

shell@sake / $ which bash
/system_ext/bin/bash
shell@sake / $

shell@sake / $ ls -l /bin/sh
-rwxr-xr-x 1 root shell 328384 2009-01-01 01:00 /bin/sh
shell@sake / $

shell@sake / $ id
uid=2000(shell) gid=2000(shell) groups=2000(shell),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),1078(ext_data_rw),1079(ext_obb_rw),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid),3012(readtracefs) context=u:r:shell:s0
shell@sake / $

shell@sake / $ [ -x /bin/sh ] && echo ok
shell@sake / $

# but in the shell /system/bin/sh the tests work:

shell@sake / $
exit
1|ASUS_I006D:/ $ echo $0
/system/bin/sh
ASUS_I006D:/ $
ASUS_I006D:/ $ [ -x /bin/sh ] && echo ok
ok
ASUS_I006D:/ $



or in the LineageOS 22
shell@sake / $  getprop  ro.build.description
lineage_sake-user 15 BP1A.250305.020.T2 eng.xtrnaw test-keys
shell@sake / $

shell@sake / $ bash --version
GNU bash, version 5.1.0(1)-release (arm-android-eabi)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
shell@sake / $
shell@sake / $ echo $0
bash
shell@sake / $

shell@sake / $ id -un
shell
shell@sake / $

shell@sake / $ ls -l /bin/sh
-rwxr-xr-x 1 root shell 310248 2008-12-31 13:00 /bin/sh
shell@sake / $

shell@sake / $ [ -x /bin/sh ] && echo ok
shell@sake / $

# but in the shell /system/bin/sh the tests work:

shell@sake / $
exit
1|ASUS_I006D:/ $ echo $0
/system/bin/sh
ASUS_I006D:/ $ [ -x /bin/sh ] && echo ok
ok
ASUS_I006D:/ $





The bash binaries I found in various Magisk modules (including the previous version of my Magisk module with bash) also failed the file permission tests for non-root users.


To work around this problem, I created a Magisk module with a bash binary with working file permission tests for non-root users:

bash_5.2.37 v1.1.0

This Magisk module contains bash binaries for arm64 CPUs

ASUS_I006D:/ $ bash --version
GNU bash, version 5.2.37(3)-release (aarch64-unknown-linux-gnu)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
ASUS_I006D:/ $


The bash binaries in this Magisk Module support file tests for non-root user.

Example:

[ 04:47 PM shell@localhost / ]$ echo "The shell is \"$0\" ; the current user is \"$( id -un )\""  ; [ -x /bin/sh ] && echo ok
The shell is "bash" ; the current user is "shell"
ok
[ 04:47 PM shell@localhost / ]$


There are three bash binaries in the module: /system/bin/bash is dynamically linked but only for the standard Android OS libraries, /system/bin/bash-static is statically linked and not stripped, and /system/bin/bash-static-stripped is statically linked and stripped:

ASUS_I006D:/ $ ls -l /system/bin/bash*
-rwxr-xr-x 1 root root 2876408 2025-06-07 15:14 /system/bin/bash
-rwxr-xr-x 1 root root 5966560 2025-06-07 15:14 /system/bin/bash-static
-rwxr-xr-x 1 root root 3134552 2025-06-07 15:14 /system/bin/bash-static-stripped
-rwxr-xr-x 1 root root    7292 2025-06-07 15:14 /system/bin/bashbug
ASUS_I006D:/ $

(bashbug is a script for bug reporting)


If the file /system_ext/bin/bash exists, the customize script replaces it with a symbolic link to /system/bin/bash.


All patches from the Termux repository for bash:

https://github.com/termux/termux-packages/tree/master/packages/bash

that are approbiate for the Magisk Module were applied.


The init file for the bash binary is

/system/etc/bash.bashrc

This init script sources the file

/data/local/tmp/home/bashrc

if it exists.

The directory used for temporary files is /data/local/tmp/var/tmp. The customize script creates this directory if it does not yet exist.

The bash binaries from this Magisk Module are also available for download here:

bash
bash-static
bash-static-stripped

and in my github repository with binaries for Android:

https://github.com/bnsmb/binaries-for-Android


Notes

see the files in the directory ./patches in the Magisk Module for implementation details



History of this entry

07.06.2025

initial release



 

Documentation for the Magisk Module with Debug tools


URL: not yet published


Documentation for the Magisk Module with Debug tools
The Magisk Module DebugTools contains some binaries and scripts for trouble shooting issues in Android in an adb or ssh shell.

All binaries are compiled for arm64 CPUs and either statically linked or dynamically linked only for the standard Android OS libraries.

The binaries are in the directory /system/usr/bin and for most of them there is a symbolic link in the directory /system/bin.


As of 21.06.2025 the Magisk Module contains these binaries and scripts:

Toool
Type
Version
Usage
Comment
myldd
script 2.0.0
wrapper script for ldd
Examples
ASUS_I006D:/data/local/tmp # myldd /system/bin/sh

# Executing ldd "/system/bin/sh"
    linux-vdso.so.1 => [vdso] (0x7cfbb83000)
    libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x7cfa70b000)
    libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x7cfa81c000)
ASUS_I006D:/data/local/tmp #

# binaries without a path are searched in the PATH

ASUS_I006D:/data/local/tmp # myldd sh

# Executing ldd "/data/local/tmp/sh"
    linux-vdso.so.1 => [vdso] (0x732905d000)
    libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x7327c0c000)
    libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x7327bd4000)
ASUS_I006D:/data/local/tmp #

# for binaries with relative path the current directory is added

ASUS_I006D:/data/local/tmp # myldd ./vim 

# Executing ldd "/data/local/tmp/./vim"
    linux-vdso.so.1 => [vdso] (0x703af99000)
    libm.so => /apex/com.android.runtime/lib64/bionic/libm.so (0x7036943000)
    libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x703699c000)
    libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x7036846000)
ASUS_I006D:/data/local/tmp #

---

ack
Perl script
3.9.0
replacement for grep
This scripts requires perl
bash
binary
5.2.37(3)

This is a statically linked binary

The symbolic link in /system/bin for this bash binary is sbash.
bgrep
binary
0.2
grep for binary files

bmore
binary
1.42
more for binary files

bvi
binary
1.42
editor for binary files

cfdisk
binary
util-linux 2.40
disk partition manager
chcpu
binary
util-linux 2.40


chrt
binary
util-linux 2.40


dmesg
binary
util-linux 2.40


enable_tmux_for_shell_user.sh
script

the script uses the binary magiskpolicy to enable socket access for the user shell

enosys
binary
util-linux 2.40


fdisk
binary
util-linux 2.32.81-4852
disk partition manager
fsck
binary
util-linux 2.40


fuser
binary
22.14


gdisk
binary
1.0.3
disk partition manager
hexdump
binary
20181221


killall
binary
22.14


less
binary
661
replacement for more

lessecho
binary
1.15


lesskey
binary
661


list_bind_mounts.sh
script
1.2.0
see How to list bind mounts 

losetup
binary
util-linux 2.40

this is a statically linked binary
lsblk
binary
util-linux 2.40


lsclocks
binary
util-linux 2.40


lscpu
binary
util-linux 2.40


lsipc
binary
util-linux 2.40


lsirq
binary
util-linux 2.40


lsof
binary
4.99.4


mount
binary
util-linux 2.40

this is a statically linked binary
namei
binary
util-linux 2.40


nano
binary
8.4
Visual editor

ncat
binary
7.93
swiss army knife for network connections

ngrep
binary
V1.47.1-git
grep for network packages

pipesz
binary
util-linux 2.40


prlimit
binary
util-linux 2.40


pstree
binary
22.14


rev
binary
util-linux 2.40


script
binary
util-linux 2.40
copy STDOUT and STDERR of an CLI session to a file

sfdisk
binary
util-linux 2.40
disk partition manager
strace
binary
4.25


sudo
script

wrapper script for "su - -c "

tcpdump
binary
4.99.1


tmux
binary
3.5a
screen multiplexer
If using tmux without the Magisk Module you must correct the SELinux policies manually to allow the user shell to run tmux.
Without these changes root access is required to run tmux in adb sessions.

The necessary SELinux policy changes for running tmux as user shell are done in the service.sh script of the module

To manually correct the SELinux policy the script enable_tmux_for_shell_user.sh can be used

An example config file for tmux is : /system/etc/example_tmux.conf 

Note that the SELinux policy changes are NOT necessary for running tmux as application user (e.g. in a Termux shell or other local shells)

uname26
binary
util-linux 2.40


umount
binary
util-linux 2.40
this is a statically linked binary
waitpid
binary
util-linux 2.40


wipefs
binary
util-linux 2.40


zramctl
binary
util-linux 2.40



 
Sourcecode:


Tools
Source
Comment
ptree, fuser, killall
https://github.com/acg/psmisc

util-linux 2.40 https://github.com/util-linux/util-linux/

ack
https://beyondgrep.com/install/

hexdump
https://github.com/wahern/hexdump

bgrep
https://github.com/tmbinc/bgrep

bvi, bmore
https://bvi.sourceforge.net/

strace
https://strace.io

tmux
https://github.com/tmux/tmux/wiki

ngrep
https://ngrep.sourceforge.net/usage.html

tcpdump
https://www.tcpdump.org/
ncat
https://nmap.org/ncat/



Notes

To use one of the binaries from util-linux package that is already part of the standard Android OS, use either the fully qualified path, e.g.

/system/usr/bin/mount

or the symbolic link with special name for the binary:

ASUS_I006D:/ $ ls -l /system/bin/*linux_utils                                                                                                                                                                  
lrwxrwxrwx 1 root root 15 1970-01-12 08:44 /system/bin/chrt.linux_utils -> ../usr/bin/chrt
lrwxrwxrwx 1 root root 16 1970-01-12 08:44 /system/bin/dmesg.linux_utils -> ../usr/bin/dmesg
lrwxrwxrwx 1 root root 18 1970-01-12 08:44 /system/bin/losetup.linux_utils -> ../usr/bin/losetup
lrwxrwxrwx 1 root root 16 1970-01-12 08:44 /system/bin/mount.linux_utils -> ../usr/bin/mount
lrwxrwxrwx 1 root root 17 1970-01-12 08:44 /system/bin/umount.linux_utils -> ../usr/bin/umount
ASUS_I006D:/ $




Some of the binaries from this Module are also available for download here:

https://bnsmb.de/files/public/Android/binaries_for_arm64

and in this github repository:

https://github.com/bnsmb/binaries-for-Android/tree/main/binaries



Tools for troubleshooting network issues are available in the Magisk Module with Network Tools.

Further scripts for maintaining Android are available in the Magisk Module with my scripts.




History of this entry

21.06.2025

initial release

11.07.2025

added the documentation for the script enable_tmux_for_shell_user.sh 

 


Documentation for the Magisk Module with OpenVPN


URL: not yet published

Documentation for the Magisk Module with OpenVPN
The Magisk Module with OpenVPN contains the openvpn binary compiled for arm64 CPUs.


ASUS_I006D:/ $ openvpn --version
OpenVPN 2.7_alpha2 aarch64-unknown-linux-android [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] [DCO]
library versions: OpenSSL 3.5.0 8 Apr 2025, LZO 2.10
DCO version: N/A
Originally developed by James Yonan
Copyright (C) 2002-2025 OpenVPN Inc <sales@openvpn.net>
Compile time defines: enable_async_push=no enable_comp_stub=no enable_crypto_ofb_cfb=yes enable_dco=auto enable_dco_arg=auto enable_debug=yes enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown enable_dns_updown_by_default=yes enable_fast_install=needless enable_fragment=yes enable_iproute2=no enable_libtool_lock=yes enable_lz4=yes enable_lzo=yes enable_management=yes enable_ntlm=yes enable_pam_dlopen=no enable_pedantic=no enable_pkcs11=no enable_plugin_auth_pam=no enable_plugin_down_root=yes enable_plugins=yes enable_port_share=yes enable_selinux=no enable_shared=yes enable_shared_with_static_runtimes=no enable_small=no enable_static=yes enable_strict=no enable_strict_options=no enable_systemd=no enable_werror=no enable_win32_dll=yes enable_wolfssl_options_h=yes enable_x509_alt_username=no with_aix_soname=aix with_crypto_library=openssl with_gnu_ld=yes with_mem_check=no with_openssl_engine=auto with_sysroot=no
ASUS_I006D:/ $


The openvpn binary only needs the standard libraries from the Android OS:

ASUS_I006D:/ $ myldd openvpn

# Executing ldd "/system/bin/openvpn"
    linux-vdso.so.1 => [vdso] (0x799c0f8000)
    libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x7998ca6000)
    libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x7995700000)
ASUS_I006D:/ $


The Magisk module also contains the binary dig for resolving IPs via DNS server. Also included is a simple /etc/resolv.conf using public available DNS server:

ASUS_I006D:/ $ cat /etc/resolv.conf 
nameserver 8.8.8.8
nameserver 1.1.1.1

ASUS_I006D:/ $


The openvpn executable must be executed by the root user.


For testing the VPN connection; I added the OpenVPN config for the public VPN server

https://www.vpngate.net

in the directory

/system/etc/openvpn/vpngate

This VPN server can be used without creating an account.


Use the command

openvpn --config /system/etc/openvpn/vpngate/vpngate.ovpn 

to create a VPN connection using that server.


To check that the VPN connection is working use for example this command:

ASUS_I006D:/ $ ip route get 8.8.8.8
8.8.8.8 dev tun0 src 10.211.1.169 uid 2000
    cache
ASUS_I006D:/ $


If the routing is via tun0 interface the VPN connection is working.


Note that the OpenVPN config for this VPN server use the command

ip rule add pref 10 from all lookup main

to route ALL network traffic via the VPN server.




History of this entry

06.07.2025

initial release





Documentation for the Magisk Module with Perl 5.42



URL: https://xdaforums.com/t/module-a-magisk-module-with-perl-5-42.4749265/

Documentation for the Magisk Module with Perl 5.42
The Magisk Module with Perl 5.42 contains the Perl executables compiled with clang19 and the Android NDK r27b for arm64 CPUs.


ASUS_I006D:/ $ perl --version

This is perl 5, version 42, subversion 0 (v5.42.0) built for aarch64-linux-android

Copyright 1987-2025, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at https://www.perl.org/, the Perl Home Page.

ASUS_I006D:/ $


The perl executables and scripts are installed in the directory /system/usr/bin:
 
ASUS_I006D:/ # ls -l  /system/usr/bin/
total 4766
-rwxr-xr-x 1 root root   15389 2025-07-09 09:59 corelist
-rwxr-xr-x 1 root root    8374 2025-07-09 09:59 cpan
-rwxr-xr-x 1 root root   41900 2025-07-09 09:59 enc2xs
-rwxr-xr-x 1 root root    3079 2025-07-09 09:59 encguess
-rwxr-xr-x 1 root root   28840 2025-07-09 09:59 h2ph
-rwxr-xr-x 1 root root   60948 2025-07-09 09:59 h2xs
-rwxr-xr-x 1 root root    4304 2025-07-09 09:59 instmodsh
-rwxr-xr-x 1 root root    5006 2025-07-09 09:59 json_pp
-rwxr-xr-x 1 root root   15792 2025-07-09 09:59 libnetcfg
lrwxrwxrwx 1 root root      12 2025-07-09 10:02 perl -> ./perl5.42.0
-rwxr-xr-x 1 root root 4184888 2025-07-09 09:59 perl5.42.0
-rwxr-xr-x 2 root root   45604 2025-07-09 09:59 perlbug
-rwxr-xr-x 1 root root     276 2025-07-09 09:59 perldoc
-rwxr-xr-x 1 root root   10831 2025-07-09 09:59 perlivp
-rwxr-xr-x 2 root root   45604 2025-07-09 09:59 perlthanks
-rwxr-xr-x 1 root root    8374 2025-07-09 09:59 piconv
-rwxr-xr-x 1 root root    4550 2025-07-09 09:59 pl2pm
-rwxr-xr-x 1 root root    4055 2025-07-09 09:59 pod2html
-rwxr-xr-x 1 root root   19823 2025-07-09 09:59 pod2man
-rwxr-xr-x 1 root root   13120 2025-07-09 09:59 pod2text
-rwxr-xr-x 1 root root    4067 2025-07-09 09:59 pod2usage
-rwxr-xr-x 1 root root    3737 2025-07-09 09:59 podchecker
-rwxr-xr-x 1 root root   13691 2025-07-09 09:59 prove
-rwxr-xr-x 1 root root    3883 2025-07-09 09:59 ptar
-rwxr-xr-x 1 root root    2659 2025-07-09 09:59 ptardiff
-rwxr-xr-x 1 root root    4409 2025-07-09 09:59 ptargrep
-rwxr-xr-x 1 root root    9996 2025-07-09 09:59 shasum
-rwxr-xr-x 1 root root   19473 2025-07-09 09:59 splain
-rwxr-xr-x 1 root root    8075 2025-07-09 09:59 streamzip
-rwxr-xr-x 1 root root    5181 2025-07-09 09:59 xsubpp
-rwxr-xr-x 1 root root  236618 2025-07-09 09:59 zipdetails
ASUS_I006D:/ #


The perl binary is a dynamically linked executable but only for the standard Android OS libraries:

ASUS_I006D:/ # file /system/usr/bin/perl5.42.0
/system/usr/bin/perl5.42.0: ELF shared object, 64-bit LSB arm64, dynamic (/system/bin/linker64), for Android 31, built by NDK r27b (12297006), not stripped
ASUS_I006D:/ #

ASUS_I006D:/ # ldd /system/usr/bin/perl5.42.0
    linux-vdso.so.1 => [vdso] (0x789266b000)
    libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x788db00000)
    libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x788daf9000)
    libm.so => /apex/com.android.runtime/lib64/bionic/libm.so (0x788da81000)
ASUS_I006D:/ #


There are wrapper scripts for the Perl executables in /system/bin:

ASUS_I006D:/ # ls -l /system/bin | grep perl_wrapper
lrwxrwxrwx 1 root root       14 2025-07-09 10:01 perl -> ./perl_wrapper
lrwxrwxrwx 1 root root       14 2025-07-09 10:01 perl5.42.0 -> ./perl_wrapper
-rwxr-xr-x 1 root root      241 2025-07-09 10:00 perl_wrapper
lrwxrwxrwx 1 root root       14 2025-07-09 10:01 perlbug -> ./perl_wrapper
lrwxrwxrwx 1 root root       14 2025-07-09 10:01 perldoc -> ./perl_wrapper
lrwxrwxrwx 1 root root       14 2025-07-09 10:01 perlivp -> ./perl_wrapper
lrwxrwxrwx 1 root root       14 2025-07-09 10:01 perlthanks -> ./perl_wrapper
ASUS_I006D:/ #


The customize script in this Magisk Module creates the CPAN config file

/data/local/tmp/perl_home/.cpan/CPAN/MyConfig.pm

if it does not yet exist.

Using this config file cpan installs additional Perl modules in the directory

/data/local/tmp/perl_home/perl5


Notes

The environment variable HOME must contain the name of directory on a writable filesystem to use cpan.
The wrapper script used in this Magisk Module for all perl executables in /system/bin, /system/bin/perl_wrapper, sets the variable HOME to /data/local/tmp/perl_home if it is empty or contains "/".
(in the default config in adb shells in Android the variable HOME is "/")


To print the list of directories used for perl modules use the command

perl -e 'print join "\n", @INC'

e.g.:

ASUS_I006D:/ $ perl -e 'print join "\n", @INC'
/data/local/tmp/perl_home/lib/perl5
/system/usr/lib/perl5/5.42.0/aarch64-linux-android
/system/usr/lib/perl5/5.42.0
/system/usr/lib/perl5/site_perl/5.42.0/aarch64-linux-android
/system/usr/lib/perl5/site_perl/5.42.0
/system/usr/lib/perl5/5.42.0/aarch64-linux-android
/system/usr/lib/perl5/5.42.0ASUS_I006D:/ $


To compile new Perl modules using this Magisk Module a C/C++ compiler and a wget binary must also be installed. This can be done by installing these Magisk Modules:

http://bnsmb.de/files/public/Android/clang19_19.0.0git-v1.2.2.zip

http://bnsmb.de/files/public/Android/wget2_2.1.0-v1.0.0.1.zip


The perl binaries and libraries were compiled using the clang19 from this Magisk Module

http://bnsmb.de/files/public/Android/clang19_19.0.0git-v1.2.2.zip

The yacc executable required by the config script from the Perl source was installed using this Magisk Module

http://bnsmb.de/files/public/Android/bison_flex_1.1.0.zip


The directory structure in this Magisk Module with the perl file was created on a phone using an overlay mount created with the script

http://bnsmb.de/files/public/Android/create_overlay_mount.sh

The config files used to compile the perl executables are in the directory ./source in the Magisk module


See here for virtual disk image with Perl 5.42 and clang19 that can be used via overlay mount.


----

History of this entry

10.07.2025

initial release


----



List of available Magisk Modules


This table list the current version of most of my Magisk Modules.

Unless otherwise noted, the binary files (execuables, libraries,etc) in all Magisk modules were compiled by myself.


Previous versions of the Magisk Modules listed in this table are available via this URL:  http://bnsmb.de/files/public/Android/archive/MagiskModules/


Most of the Magisk Modules are also available in a repository on github: https://github.com/bnsmb/magisk-modules


The files in the Magisk Module with the clang19 toolchain are available on github in this repository: https://github.com/bnsmb/Magisk-Module-with-clang19

The files in the Magisk Module with cmake are available on github in this repository:  https://github.com/bnsmb/Magisk-Module-with-cmake


Some standalone binaries from these Magisk Modules are available here http://bnsmb.de/files/public/Android/binaries_for_arm64 and in this github repository:  https://github.com/bnsmb/binaries-for-Android


For questions regarding these modules please reply to this post in the XDA forums:

https://xdaforums.com/t/module-magisk-modules-with-unix-binaries-compiled-for-the-android-os.4687095/




Show or Hide Table

File
Content
Comment
btop-1.3.2.1.zip
Magisk Module with btop binaries for Android for these CPUs:

aarch64 / arm64 / armv5l / armv7l / i486 / i686 / mips64 / powerpc64 / x86_64

the binaries in the Magisk Module are static linked binaries from https://github.com/aristocratos/btop/releases

Note that btop for Android needs root permissions.

The home page for btop is

https://github.com/aristocratos/btop

ckermit_10.0_Beta10.zip
Magisk Module with ckermit binaries for Android for these CPUs:

aarch64 / arm64 / armv5l / armv7l / i386 / mips / mips64 / x86_64

The source code and build instructions for ckermit are available here:

https://kermitproject.org/ckdaily.html

The home page for ckermit is here:

https://kermitproject.org/

android-sdk-tools_35.0.2-v1.0.0.zip Magisk Module with the Android SDK tools for devices with an aarch64 (= arm64)

The binaries are from this repository:

https://github.com/lzhiyong/android-sdk-tools/

Details
ASUS_I006D:/ $ ls -ld $( find /system/bin/androidsdk35_0_2/ )
drwxr-x--x 5 root shell     100 1970-01-27 00:42 /system/bin/androidsdk35_0_2/
drwxr-x--x 2 root shell     160 1970-01-27 00:42 /system/bin/androidsdk35_0_2/build-tools
-rwxr-xr-x 1 root shell 2641312 2025-06-09 14:01 /system/bin/androidsdk35_0_2/build-tools/aapt
-rwxr-xr-x 1 root shell 6477984 2025-06-09 14:01 /system/bin/androidsdk35_0_2/build-tools/aapt2
-rwxr-xr-x 1 root shell 3461008 2025-06-09 14:01 /system/bin/androidsdk35_0_2/build-tools/aidl
-rwxr-xr-x 1 root shell 1447912 2025-06-09 14:01 /system/bin/androidsdk35_0_2/build-tools/dexdump
-rwxr-xr-x 1 root shell 1554184 2025-06-09 14:01 /system/bin/androidsdk35_0_2/build-tools/split-select
-rwxr-xr-x 1 root shell  833640 2025-06-09 14:01 /system/bin/androidsdk35_0_2/build-tools/zipalign
drwxr-x--x 2 root shell      60 1970-01-27 00:42 /system/bin/androidsdk35_0_2/others
-rwxr-xr-x 1 root shell 1662184 2025-06-09 14:01 /system/bin/androidsdk35_0_2/others/veridex
drwxr-x--x 2 root shell     240 1970-01-27 00:42 /system/bin/androidsdk35_0_2/platform-tools
-rwxr-xr-x 1 root shell 7777040 2025-06-09 14:01 /system/bin/androidsdk35_0_2/platform-tools/adb
-rwxr-xr-x 1 root shell 1783056 2025-06-09 14:01 /system/bin/androidsdk35_0_2/platform-tools/e2fsdroid
-rwxr-xr-x 1 root shell  847032 2025-06-09 14:01 /system/bin/androidsdk35_0_2/platform-tools/etc1tool
-rwxr-xr-x 1 root shell 2165568 2025-06-09 14:01 /system/bin/androidsdk35_0_2/platform-tools/fastboot
-rwxr-xr-x 1 root shell  336696 2025-06-09 14:01 /system/bin/androidsdk35_0_2/platform-tools/hprof-conv
-rwxr-xr-x 1 root shell  879128 2025-06-09 14:01 /system/bin/androidsdk35_0_2/platform-tools/make_f2fs
-rwxr-xr-x 1 root shell  877528 2025-06-09 14:01 /system/bin/androidsdk35_0_2/platform-tools/make_f2fs_casefold
-rwxr-xr-x 1 root shell 1257976 2025-06-09 14:01 /system/bin/androidsdk35_0_2/platform-tools/mke2fs
-rwxr-xr-x 1 root shell 1841248 2025-06-09 14:01 /system/bin/androidsdk35_0_2/platform-tools/sload_f2fs
-rwxr-xr-x 1 root shell 2137320 2025-06-09 14:01 /system/bin/androidsdk35_0_2/platform-tools/sqlite3
ASUS_I006D:/ $



selinux_tools_v1.4.zip Magisk module with the SELinux tools for various CPUs




the binaries in the Magisk Module for all CPUs are copied from this repository:

https://github.com/xmikos/setools-android

The additional files for arm/arm64 CPUs are from this repository:

https://github.com/SELinuxProject/selinux

The files in this module are:

seinfo 
sesearch
sepolicy-inject 

compiled for the Android OS for these CPUs:

armeabi  /  armeabi-v7a / arm64-v8a / mips64 / x86 / x86_64


There are also these binaries For arm64 and arm CPUs in the module:

chkcon
sepol_check_access
sepol_compute_av
sepol_compute_member
sepol_compute_relabel
sepol_validate_transition


vim_9.1.zip Magisk Module with vim 9.1 for arm64 CPUs


The vim in the module is dynamic linked; therefore the module also install these libaries:

ls -l /data/adb/modules/vim/system/lib64
# ls -l /data/adb/modules/vim/system/lib64/
total 1720
lrwxrwxrwx 1 root root      20 2024-07-26 14:24 libcanberra.so.0 -> libcanberra.so.0.2.5
-rwxr-xr-x 1 root root   54792 2024-07-26 14:24 libcanberra.so.0.2.5
-rwxr-xr-x 1 root root 1067696 2024-07-26 14:24 libiconv.so
-rwxr-xr-x 1 root root   36560 2024-07-26 14:24 libltdl.so
lrwxrwxrwx 1 root root      18 2024-07-26 14:24 libncursesw.so.6 -> libncursesw.so.6.4
-rwxr-xr-x 1 root root  387592 2024-07-26 14:24 libncursesw.so.6.4
-rwxr-xr-x 1 root root   26416 2024-07-26 14:24 libogg.so
-rwxr-xr-x 1 root root  151328 2024-07-26 14:24 libvorbis.so
-rwxr-xr-x 1 root root   28600 2024-07-26 14:24 libvorbisfile.so
#


The vim uses this directory for data and configs

/data/local/tmp/share/vim/vim91

The default config file used by the vim is

/data/local/tmp/share/vim/vim91/defaults.vim


vim_9.1.672.zip Magisk Module with vim 9.1.672 for arm64 CPUs The files in this Magisk Module are installed in the directory /system_ext/bin; the Magisk Module contains static and dynamic linked binaries:

ASUS_I006D:/ $ ls -l /system_ext/bin/vim.*
lrwxrwxrwx 1 root root      13 1970-01-29 00:15 /system_ext/bin/vim.bin -> ./vim.dynamic
-rwxr-xr-x 1 root root 3553592 2024-08-12 10:17 /system_ext/bin/vim.dynamic
-rwxr-xr-x 1 root root 3666232 2024-08-12 10:17 /system_ext/bin/vim.static
ASUS_I006D:/ $


The data files for vim are installed in the directory /data/local/tmp/share/vim/vim91.
 
vim --version

ASUS_I006D:/ $ vim --version
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Aug 12 2024 09:27:34)
Included patches: 1-672
Compiled by bnsmb
Huge version without GUI.  Features included (+) or not (-):
+acl               +file_in_path      +mouse_urxvt       -tag_any_white
+arabic            +find_in_path      +mouse_xterm       -tcl
+autocmd           +float             +multi_byte        +termguicolors
+autochdir         +folding           +multi_lang        +terminal
-autoservername    -footer            -mzscheme          +terminfo
-balloon_eval      +fork()            +netbeans_intg     +termresponse
+balloon_eval_term -gettext           +num64             +textobjects
-browse            -hangul_input      +packages          +textprop
++builtin_terms    -iconv             +path_extra        +timers
+byte_offset       +insert_expand     -perl              +title
+channel           +ipv6              +persistent_undo   -toolbar
+cindent           +job               +popupwin          +user_commands
-clientserver      +jumplist          +postscript        +vartabs
-clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +vim9script
+cmdline_hist      +langmap           -python            +viminfo
+cmdline_info      +libcall           -python3           +virtualedit
+comments          +linebreak         +quickfix          +visual
+conceal           +lispindent        +reltime           +visualextra
+cryptv            +listcmds          +rightleft         +vreplace
+cscope            +localmap          -ruby              +wildignore
+cursorbind        -lua               +scrollbind        +wildmenu
+cursorshape       +menu              +signs             +windows
+dialog_con        +mksession         +smartindent       +writebackup
+diff              +modify_fname      -sodium            -X11
+digraphs          +mouse             -sound             +xattr
-dnd               -mouseshape        +spell             -xfontset
-ebcdic            +mouse_dec         +startuptime       -xim
+emacs_tags        -mouse_gpm         +statusline        -xpm
+eval              -mouse_jsbterm     -sun_workshop      -xsmp
+ex_extra          +mouse_netterm     +syntax            -xterm_clipboard
+extra_search      +mouse_sgr         +tag_binary        -xterm_save
-farsi             -mouse_sysmouse    -tag_old_static   
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
 3rd user vimrc file: "~/.config/vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/data/local/tmp/share/vim"
Compilation: /data/develop/android/android-ndk-r14b/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-gcc-4.9 -std=gnu11 -c -I. -Iproto -DHAVE_CONFIG_H --sysroot=/data/develop/android/android-ndk-r14b/platforms/android-21/arch-arm64 -O2 -fPIE -fPIC -I/data/develop/android/sysroot/usr/include -I/data/develop/android/android-ndk-r14b/platforms/android-21/arch-arm64/usr/include --sysroot=/data/develop/android/android-ndk-r14b/platforms/android-21/arch-arm64 -O2 -fPIE -fPIC -I/data/develop/android/sysroot/usr/include -I/data/develop/android/android-ndk-r14b/platforms/android-21/arch-arm64/usr/include -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: /data/develop/android/android-ndk-r14b/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-gcc-4.9 -std=gnu11 --sysroot=/data/develop/android/android-ndk-r14b/platforms/android-21/arch-arm64 -s -pie -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/android-ndk-r14b/platforms/android-21/arch-arm64/usr/lib -Wl,--as-needed -o vim -lm -lncurses
ASUS_I006D:/ $


 

To extract only the static linked binary from the ZIP file use this command:

unzip -p vim_9.1.672.zip  system/system_ext/bin/vim.static >./vim.static


see Examples for compiling C programs for Android using gcc or clang for instructions to compile vim

DebugTools_9.3.3.0.zip
 
Magisk Module with some Linux trouble shooting tools for arm64 CPUs
The executables are installed in the /system/usr/bin and in /system/bin are symbolic links for the executables.

see Doumentation for the Magisk Module with Debug tools  

bvi_1.4.1.zip
Magisk Module with bvi for arm64 CPUs
bvi is an editor for binary files with the user interface from vi

The source code for bvi is available here:

https://bvi.sourceforge.net/

The executable in this module is dynamic linked; the necessasry library libncursesw.so.6 is also in the module.

bvi_1.4.2.zip Magisk Module with bvi for arm64 CPUs bvi is an editor for binary files with the user interface from vi

The source code for bvi is available here:

https://bvi.sourceforge.net/

The executable in this module is static linked

see Examples for compiling C programs for Android using gcc or clang for instructions to compile bvi

coreutils_9.5.0.0.zip
 
Magisk Module with the Linux core utils for arm64 CPUs

The source for the files in this Magisk Module is available here:

https://github.com/coreutils/coreutils/

The configure statement used to compile these tools was:

./configure --prefix=/data/local/tmp CFLAGS="-Wno-implicit-function-declaration  -Wno-int-conversion" --with-openssl=no --without-libgmp

-> the tools only use the standard libraries from Android

The tools are installed in the directory /system/bin/coreutils

List of executables in the module
as of 28.07.2024:

[
b2sum
base32
base64
basename
basenc
cat
chcon
chgrp
chmod
chown
chroot
cksum
comm
cp
csplit
cut
date
dcgen
dd
df
dir
dircolors
dirname
du
du-tests
echo
env
expand
expr
factor
false
fmt
fold
getlimits
ginstall
groups
head
id
join
kill
libstdbuf.so
link
ln
logname
ls
make-prime-list
md5sum
mkdir
mkfifo
mknod
mktemp
mv
nice
nl
nohup
nproc
numfmt
od
paste
pathchk
pinky
pr
printenv
printf
ptx
pwd
readlink
realpath
rm
rmdir
runcon
seq
sha1sum
sha224sum
sha256sum
sha384sum
sha512sum
shred
shuf
sleep
sort
split
stat
stdbuf
stty
sum
sync
tac
tail
tee
test
timeout
touch
tr
true
truncate
tsort
tty
uname
unexpand
uniq
unlink
uptime
users
vdir
wc
who
whoami
yes




myscripts_1.4.9.0.zip Magisk module with some of my scripts for Android
Files in the module:
ASUS_I006D:/data/adb/modules/myscripts/system/bin # date
Sun Jun 22 20:31:39 CEST 2025
ASUS_I006D:/data/adb/modules/myscripts/system/bin #
 
ASUS_I006D:/data/adb/modules/myscripts/system/bin # ls -l
total 260
-rwxr-xr-x 1 root root   156 2025-06-22 20:30 0001logcatboot
-rwxr-xr-x 1 root root  2919 2025-06-22 20:30 configure_microg.sh
-rwxr-xr-x 1 root root   354 2025-06-22 20:30 correct_dev_pn553.sh
-rwxr-xr-x 1 root root 71919 2025-06-22 20:30 create_overlay_mount.sh
-rwxr-xr-x 1 root root    51 2025-06-22 20:30 disable_intent_filter_verification.sh
-rwxr-xr-x 1 root root   146 2025-06-22 20:30 enable_microg.sh
-rwxr-xr-x 1 root root  2956 2025-06-22 20:30 enable_wifi.sh
-rwxr-xr-x 1 root root 22230 2025-06-22 20:30 enable_wireless_adb.sh
-rwxr-xr-x 1 root root 10108 2025-06-22 20:30 install_apk.sh
-rwxr-xr-x 1 root root 16046 2025-06-22 20:30 install_mm.sh
-rwxr-xr-x 1 root root  4432 2025-06-22 20:30 list_bind_mounts.sh
-rwxr-xr-x 1 root root  7271 2025-06-22 20:30 list_logical_device_backends.sh
-rwxr-xr-x 1 root root  9463 2025-06-22 20:30 list_logical_device_usage.sh
-rwxr-xr-x 1 root root   223 2025-06-22 20:30 list_magisk_root_permissions.sh
-rwxr-xr-x 1 root root   449 2025-06-22 20:30 list_magisk_settings.sh
-rwxr-xr-x 1 root root 19858 2025-06-22 20:30 lmm
-rwxr-xr-x 1 root root  1038 2025-06-22 20:30 myldd
lrwxrwxrwx 1 root root    24 2025-06-22 20:30 rcbm.sh -> ./recreate_bind_mount.sh
-rwxr-xr-x 1 root root  3774 2025-06-22 20:30 recreate_bind_mount.sh
-rwxr-xr-x 1 root root 16866 2025-06-22 20:30 remount_dynamic_partitions.sh
-rwxr-xr-x 1 root root    69 2025-06-22 20:30 remove_screenlock.sh
-rwxr-xr-x 1 root root  2708 2025-06-22 20:30 rename_apk.sh
-rwxr-xr-x 1 root root  1434 2025-06-22 20:30 search_magisk_package.sh
-rwxr-xr-x 1 root root    42 2025-06-22 20:30 setpath.sh
-rwxr-xr-x 1 root root    13 2025-06-22 20:30 sudo
-rwxr-xr-x 1 root root  5273 2025-06-22 20:30 switch_adb_via_wifi.sh
ASUS_I006D:/data/adb/modules/myscripts/system/bin #



openssl_3.3.1-v1.1.0.zip
Magisk Module with OpenSSL 3.3.1 for arm64 CPUs
The OpenSSL files are installed in the directory /system/usr/openssl; a wrapper script to call openssl is installed in /system/bin.

example usage:

To print the certificate used for the running OS execute this command in an (adb) shell on the phone:

unzip -p /system/etc/security/otacerts.zip  *pem | openssl x509  -noout -text 

 
openssl_3.5.0-v1.0.0.zip
Magisk Module with OpenSSL 3.5.0 for arm64 CPUs The OpenSSL files are installed in the directory /system/usr/; a symbolic link for the executable openssl is created in the directory /system/bin.

The libraries to use OpenSSL in other programs are installed in the directory /system/usr/lib.

example usage:

To print the certificate used for the running OS execute this command in an (adb) shell on the phone:

unzip -p /system/etc/security/otacerts.zip  *pem | openssl x509  -noout -text 

perl538_5.38.0.zip
Magisk Module with Perl 5.38 for arm64 CPUs
The Magisk Module installs Perl in the directory /data/local/tmp/perl538 

The Module also install Perl wrapper scripts in the directory /system/bin:

ls -l /system/bin | grep perl
ASUS_I006D:/ # ls -l /system/bin | grep perl
lrwxrwxrwx 1 root root       14 1970-01-25 03:12 cpan -> ./perl_wrapper
lrwxrwxrwx 1 root root       14 1970-01-25 03:12 perl -> ./perl_wrapper
-rwxr-xr-x 1 root root      192 2024-08-08 13:13 perl_env
-rwxr-xr-x 1 root root      104 2024-08-08 13:13 perl_wrapper
lrwxrwxrwx 1 root root       14 1970-01-25 03:12 perlbug -> ./perl_wrapper
lrwxrwxrwx 1 root root       14 1970-01-25 03:12 perldoc -> ./perl_wrapper
ASUS_I006D:/ #


The script to start Perl defines these variables:

cat /system/bin/perl_env
|ASUS_I006D:/ # cat /system/bin/perl_env

export PATH=/data/local/tmp/perl538:${PATH}

export LD_LIBRARY_PATH=/data/local/tmp/perl538/lib64:

export HOME="/data/local/tmp/perl_home"

export PERL5LIB="/data/local/tmp/perl_home/perl5"
ASUS_I006D:/ # 

see How to compile Perl for Android for instructions to compile perl

perl540_5.40.0.zip  Magisk Module with Perl 5.40 for arm64 CPUs The Magisk Module installs Perl in the directory /data/local/tmp/perl540 

The Module also install Perl wrapper scripts in the directory /system/bin:

ls -l /system/bin | grep perl
ASUS_I006D:/ # ls -l /system/bin | grep perl
lrwxrwxrwx 1 root root       14 1970-01-25 03:12 cpan -> ./perl_wrapper
lrwxrwxrwx 1 root root       14 1970-01-25 03:12 perl -> ./perl_wrapper
-rwxr-xr-x 1 root root      192 2024-08-08 13:13 perl_env
-rwxr-xr-x 1 root root      104 2024-08-08 13:13 perl_wrapper
lrwxrwxrwx 1 root root       14 1970-01-25 03:12 perlbug -> ./perl_wrapper
lrwxrwxrwx 1 root root       14 1970-01-25 03:12 perldoc -> ./perl_wrapper
ASUS_I006D:/ #



The script to start Perl defines these variables:

cat /system/bin/perl_env
|ASUS_I006D:/ # cat /system/bin/perl_env

export PATH=/data/local/tmp/perl538:${PATH}

# LD_LIBRARY_PATH is not required for this Perl binary
#export LD_LIBRARY_PATH=/data/local/tmp/perl538/lib64:

export HOME="/data/local/tmp/perl_home"

export PERL5LIB="/data/local/tmp/perl_home/perl5"
ASUS_I006D:/ # 

see Examples for compiling C programs for Android using gcc or clang for instructions to compile perl

These binaries are compiled using the Android SDK; the binary only uses the default Android system libraries:

ldd /data/local/tmp/perl540/bin/perl
ASUS_I006D:/ $ /data/local/tmp/perl540/bin/perl --version
This is perl 5, version 40, subversion 0 (v5.40.0) built for linux-android

Copyright 1987-2024, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at https://www.perl.org/, the Perl Home Page.

ASUS_I006D:/ $ ldd /data/local/tmp/perl540/bin/perl
    linux-vdso.so.1 => [vdso] (0x73fc5be000)
    libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x73f769b000)
    libm.so => /apex/com.android.runtime/lib64/bionic/libm.so (0x73f78c3000)
    libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x73f770c000)
    liblog.so => /system/lib64/liblog.so (0x73f76f0000)
    libc++.so => /system/lib64/libc++.so (0x73f7808000)
ASUS_I006D:/ $



perl542_5.42.0-v1.0.0.zip
Magisk Module with Perl 5.42 for arm64 CPUs
see Documentation for the Magisk Module with Perl 5.42 for the documentation for this module

network_tools_1.7.0.zip Magisk Module with various network tools for arm64 CPUs
see here for details

syslogd_2.5.0.zip
Magisk Module with the binaries syslogd and logger for arm64 CPUs from the GNU inetutils 2.5 

The source code for the files in this module is available here:

https://www.gnu.org/software/inetutils/inetutils.html

Files in this module
ASUS_I006D:/data/adb/modules/syslogd/system/bin # ls -ld $( find . )
drwxr-xr-x 3 root root  3452 2024-09-02 13:04 .
-rwxr-xr-x 1 root root 51800 2024-09-02 13:04 ./nlogger
lrwxrwxrwx 1 root root    15 2024-09-02 13:04 ./restart_syslogd -> ./start_syslogd
drwxr-xr-x 2 root root  3452 2024-09-02 13:04 ./server
-rwxr-xr-x 1 root root 79080 2024-09-02 13:04 ./server/syslogd
-rwxr-xr-x 1 root root  5821 2024-09-02 13:04 ./start_syslogd
lrwxrwxrwx 1 root root    15 2024-09-02 13:04 ./stop_syslogd -> ./start_syslogd
ASUS_I006D:/data/adb/modules/syslogd/system/bin #


see here for a description of the files in this module

ro2rw_3.7.3.0.zip
This Magisk Module contains the binaries for working with dynamic partitions in Android for arm and arm64 CPUs.
The binaries are copied from the RO2RW tools -- see here:

https://xdaforums.com/t/magisk-twrp-arm32-64-a8-universal-read-only-to-read-write-for-android-ro2rw-auto-converting-super-system-partitions-to-read-write-mode.4521131/

The files can be downloaded from SourceForge:

https://sourceforge.net/projects/multi-function-patch/


e2fsprogs_1.47.2.zip
 
This Magisk Module contains the e2fsprogs executables for arm64 CPUs
The source code for the files in this module is available here:

https://e2fsprogs.sourceforge.net/

The module installs the binaries in the directory /system/bin/e2fsprogs.

All binaries are statically linked.

Files in the module
ASUS_I006D:/system/bin/e2fsprogs $ ls -l
total 17000
-rwxr-xr-x 1 root root  744416 2024-09-02 08:16 badblocks
-rwxr-xr-x 1 root root  503088 2024-09-02 08:16 blkid
-rwxr-xr-x 1 root root  466984 2024-09-02 08:16 chattr
-rwxr-xr-x 1 root root 1050312 2024-09-02 08:16 debugfs
-rwxr-xr-x 1 root root  837264 2024-09-02 08:16 dumpe2fs
-rwxr-xr-x 1 root root  735616 2024-09-02 08:16 e2freefrag
-rwxr-xr-x 1 root root 1437248 2024-09-02 08:16 e2fsck
-rwxr-xr-x 1 root root  841552 2024-09-02 08:16 e2image
-rwxr-xr-x 1 root root  948488 2024-09-02 08:16 e2label
-rwxr-xr-x 1 root root  837264 2024-09-02 08:16 e2mmpstatus
-rwxr-xr-x 1 root root  746880 2024-09-02 08:16 e2undo
-rwxr-xr-x 1 root root  476336 2024-09-02 08:16 e4crypt
-rwxr-xr-x 1 root root  747488 2024-09-02 08:16 e4defrag
-rwxr-xr-x 1 root root  465424 2024-09-02 08:16 filefrag
-rwxr-xr-x 1 root root  948488 2024-09-02 08:16 findfs
-rwxr-xr-x 1 root root  509832 2024-09-02 08:16 fsck
lrwxrwxrwx 1 root root       8 1970-02-18 22:14 fsck.ext2 -> ./e2fsck
lrwxrwxrwx 1 root root       8 1970-02-18 22:14 fsck.ext3 -> ./e2fsck
lrwxrwxrwx 1 root root       8 1970-02-18 22:14 fsck.ext4 -> ./e2fsck
-rwxr-xr-x 1 root root  494080 2024-09-02 08:16 logsave
-rwxr-xr-x 1 root root  469424 2024-09-02 08:16 lsattr
-rwxr-xr-x 1 root root  950240 2024-09-02 08:16 mke2fs
lrwxrwxrwx 1 root root       8 1970-02-18 22:14 mkfs.ext2 -> ./mke2fs
lrwxrwxrwx 1 root root       8 1970-02-18 22:14 mkfs.ext3 -> ./mke2fs
lrwxrwxrwx 1 root root       8 1970-02-18 22:14 mkfs.ext4 -> ./mke2fs
-rwxr-xr-x 1 root root  454568 2024-09-02 08:16 mklost+found
-rwxr-xr-x 1 root root  795616 2024-09-02 08:16 resize2fs
-rwxr-xr-x 1 root root  948488 2024-09-02 08:16 tune2fs
-rwxr-xr-x 1 root root  479568 2024-09-02 08:16 uuidd
-rwxr-xr-x 1 root root  472784 2024-09-02 08:16 uuidgen
ASUS_I006D:/system/bin/e2fsprogs $


e2fsprogs_1.47.2-v1.2.0.zip 
This Magisk Module contains the e2fsprogs executables for arm64 CPUs The source code for the files in this module is available here:

https://e2fsprogs.sourceforge.net/

The module installs the binaries in the directory /system/bin/e2fsprogs.

The source files used to create the binaries and libraries in this Magisk Module are

https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/snapshot/e2fsprogs-1.47.2.tar.gz

from January 2025. All patches from Termux are applied. The executables in the Magisk Module are linked dynamically, but only require the standard libraries from the Android OS.


Files in the module

ASUS_I006D:/ $ date
Tue Apr  8 19:42:15 CEST 2025
ASUS_I006D:/ $
ASUS_I006D:/ $ ls -l /system/bin/e2fsprogs/
total 7004
-rwxr-xr-x 1 root root  446416 2025-04-08 19:40 badblocks
-rwxr-xr-x 1 root root   91872 2025-04-08 19:40 blkid
-rwxr-xr-x 1 root root   30376 2025-04-08 19:40 chattr
-rwxr-xr-x 1 root root    1378 2025-04-08 19:40 compile_et
-rwxr-xr-x 1 root root  582304 2025-04-08 19:40 debugfs
-rwxr-xr-x 1 root root  556808 2025-04-08 19:40 dumpe2fs
-rwxr-xr-x 1 root root  443568 2025-04-08 19:40 e2freefrag
-rwxr-xr-x 1 root root 1146312 2025-04-08 19:40 e2fsck
-rwxr-xr-x 1 root root  577248 2025-04-08 19:40 e2image
lrwxrwxrwx 1 root root       7 1970-01-16 01:59 e2label -> tune2fs
lrwxrwxrwx 1 root root       8 1970-01-16 01:59 e2mmpstatus -> dumpe2fs
-rwxr-xr-x 1 root root    7735 2025-04-08 19:40 e2scrub
-rwxr-xr-x 1 root root    5094 2025-04-08 19:40 e2scrub_all
-rwxr-xr-x 1 root root  460776 2025-04-08 19:40 e2undo
-rwxr-xr-x 1 root root   35664 2025-04-08 19:40 e4crypt
-rwxr-xr-x 1 root root  448488 2025-04-08 19:40 e4defrag
-rwxr-xr-x 1 root root   19736 2025-04-08 19:40 filefrag
lrwxrwxrwx 1 root root       7 1970-01-16 01:59 findfs -> tune2fs
-rwxr-xr-x 1 root root  106864 2025-04-08 19:40 fsck
lrwxrwxrwx 1 root root       6 1970-01-16 01:59 fsck.ext2 -> e2fsck
lrwxrwxrwx 1 root root       6 1970-01-16 01:59 fsck.ext3 -> e2fsck
lrwxrwxrwx 1 root root       6 1970-01-16 01:59 fsck.ext4 -> e2fsck
-rwxr-xr-x 1 root root   13368 2025-04-08 19:40 logsave
-rwxr-xr-x 1 root root   27568 2025-04-08 19:40 lsattr
-rwxr-xr-x 1 root root    1138 2025-04-08 19:40 mk_cmds
-rwxr-xr-x 1 root root  762200 2025-04-08 19:40 mke2fs
lrwxrwxrwx 1 root root       6 1970-01-16 01:59 mkfs.ext2 -> mke2fs
lrwxrwxrwx 1 root root       6 1970-01-16 01:59 mkfs.ext3 -> mke2fs
lrwxrwxrwx 1 root root       6 1970-01-16 01:59 mkfs.ext4 -> mke2fs
-rwxr-xr-x 1 root root    8232 2025-04-08 19:40 mklost+found
-rwxr-xr-x 1 root root  549368 2025-04-08 19:40 resize2fs
-rwxr-xr-x 1 root root  734368 2025-04-08 19:40 tune2fs
-rwxr-xr-x 1 root root   35360 2025-04-08 19:40 uuidd
-rwxr-xr-x 1 root root   25232 2025-04-08 19:40 uuidgen
ASUS_I006D:/ $



Note:


Libraries and include files are only in the version 1.1.0 of the Magisk module:

e2fsprogs_1.47.2-v1.1.0.zip


python3_3.10.4.2.zip This Magisk Module contains the Python3 3.10 binaries and files for arm and arm64 CPUs from the TWRP repository The Magisk Module installs the binaries in /system/bin.

The files in this module are available here:

https://github.com/TeamWin/android_external_python3/tree/android-12.1

Files in the module
┌root@localhost:/data/adb/modules/python3
└─# find system/
system/
system/bin
system/bin/python3
system/bin/python
system/etc
system/etc/python
system/etc/python/lib
system/etc/python/lib/python3.10
system/etc/python/lib/python3.10/codecs.py
system/etc/python/lib/python3.10/_collections_abc.py
system/etc/python/lib/python3.10/os.py
system/etc/python/lib/python3.10/_weakrefset.py
system/etc/python/lib/python3.10/functools.py
system/etc/python/lib/python3.10/sre_constants.py
system/etc/python/lib/python3.10/struct.py
system/etc/python/lib/python3.10/contextlib.py
system/etc/python/lib/python3.10/warnings.py
system/etc/python/lib/python3.10/enum.py
system/etc/python/lib/python3.10/_sysconfigdata__linux_aarch64-linux-android.py
system/etc/python/lib/python3.10/collections
system/etc/python/lib/python3.10/collections/abc.py
system/etc/python/lib/python3.10/collections/__init__.py
system/etc/python/lib/python3.10/abc.py
system/etc/python/lib/python3.10/urllib
system/etc/python/lib/python3.10/urllib/robotparser.py
system/etc/python/lib/python3.10/urllib/parse.py
system/etc/python/lib/python3.10/urllib/error.py
system/etc/python/lib/python3.10/urllib/request.py
system/etc/python/lib/python3.10/urllib/__init__.py
system/etc/python/lib/python3.10/urllib/response.py
system/etc/python/lib/python3.10/typing.py
system/etc/python/lib/python3.10/types.py
system/etc/python/lib/python3.10/genericpath.py
system/etc/python/lib/python3.10/fnmatch.py
system/etc/python/lib/python3.10/pathlib.py
system/etc/python/lib/python3.10/heapq.py
system/etc/python/lib/python3.10/posixpath.py
system/etc/python/lib/python3.10/sre_parse.py
system/etc/python/lib/python3.10/xml
system/etc/python/lib/python3.10/xml/dom
system/etc/python/lib/python3.10/xml/dom/NodeFilter.py
system/etc/python/lib/python3.10/xml/dom/xmlbuilder.py
system/etc/python/lib/python3.10/xml/dom/minicompat.py
system/etc/python/lib/python3.10/xml/dom/expatbuilder.py
system/etc/python/lib/python3.10/xml/dom/pulldom.py
system/etc/python/lib/python3.10/xml/dom/minidom.py
system/etc/python/lib/python3.10/xml/dom/__init__.py
system/etc/python/lib/python3.10/xml/dom/domreg.py
system/etc/python/lib/python3.10/xml/__init__.py
system/etc/python/lib/python3.10/xml/etree
system/etc/python/lib/python3.10/xml/etree/ElementInclude.py
system/etc/python/lib/python3.10/xml/etree/ElementTree.py
system/etc/python/lib/python3.10/xml/etree/cElementTree.py
system/etc/python/lib/python3.10/xml/etree/__init__.py
system/etc/python/lib/python3.10/xml/etree/ElementPath.py
system/etc/python/lib/python3.10/xml/sax
system/etc/python/lib/python3.10/xml/sax/_exceptions.py
system/etc/python/lib/python3.10/xml/sax/saxutils.py
system/etc/python/lib/python3.10/xml/sax/expatreader.py
system/etc/python/lib/python3.10/xml/sax/xmlreader.py
system/etc/python/lib/python3.10/xml/sax/handler.py
system/etc/python/lib/python3.10/xml/sax/__init__.py
system/etc/python/lib/python3.10/xml/parsers
system/etc/python/lib/python3.10/xml/parsers/expat.py
system/etc/python/lib/python3.10/xml/parsers/__init__.py
system/etc/python/lib/python3.10/copyreg.py
system/etc/python/lib/python3.10/base64.py
system/etc/python/lib/python3.10/sysconfig.py
system/etc/python/lib/python3.10/ntpath.py
system/etc/python/lib/python3.10/weakref.py
system/etc/python/lib/python3.10/reprlib.py
system/etc/python/lib/python3.10/io.py
system/etc/python/lib/python3.10/keyword.py
system/etc/python/lib/python3.10/stat.py
system/etc/python/lib/python3.10/_sitebuiltins.py
system/etc/python/lib/python3.10/sre_compile.py
system/etc/python/lib/python3.10/operator.py
system/etc/python/lib/python3.10/re.py
system/etc/python/lib/python3.10/site.py
system/etc/python/lib/python3.10/encodings
system/etc/python/lib/python3.10/encodings/cp775.py
system/etc/python/lib/python3.10/encodings/iso8859_14.py
system/etc/python/lib/python3.10/encodings/cp1251.py
system/etc/python/lib/python3.10/encodings/cp855.py
system/etc/python/lib/python3.10/encodings/cp720.py
system/etc/python/lib/python3.10/encodings/mac_iceland.py
system/etc/python/lib/python3.10/encodings/utf_8_sig.py
system/etc/python/lib/python3.10/encodings/cp874.py
system/etc/python/lib/python3.10/encodings/mac_romanian.py
system/etc/python/lib/python3.10/encodings/uu_codec.py
system/etc/python/lib/python3.10/encodings/idna.py
system/etc/python/lib/python3.10/encodings/mac_roman.py
system/etc/python/lib/python3.10/encodings/mac_arabic.py
system/etc/python/lib/python3.10/encodings/rot_13.py
system/etc/python/lib/python3.10/encodings/undefined.py
system/etc/python/lib/python3.10/encodings/latin_1.py
system/etc/python/lib/python3.10/encodings/cp424.py
system/etc/python/lib/python3.10/encodings/iso8859_2.py
system/etc/python/lib/python3.10/encodings/utf_32_be.py
system/etc/python/lib/python3.10/encodings/cp1125.py
system/etc/python/lib/python3.10/encodings/cp860.py
system/etc/python/lib/python3.10/encodings/cp858.py
system/etc/python/lib/python3.10/encodings/cp857.py
system/etc/python/lib/python3.10/encodings/shift_jis_2004.py
system/etc/python/lib/python3.10/encodings/cp1258.py
system/etc/python/lib/python3.10/encodings/cp037.py
system/etc/python/lib/python3.10/encodings/mac_greek.py
system/etc/python/lib/python3.10/encodings/cp864.py
system/etc/python/lib/python3.10/encodings/quopri_codec.py
system/etc/python/lib/python3.10/encodings/iso2022_jp_2.py
system/etc/python/lib/python3.10/encodings/ptcp154.py
system/etc/python/lib/python3.10/encodings/gb2312.py
system/etc/python/lib/python3.10/encodings/cp862.py
system/etc/python/lib/python3.10/encodings/iso2022_jp.py
system/etc/python/lib/python3.10/encodings/cp949.py
system/etc/python/lib/python3.10/encodings/iso8859_1.py
system/etc/python/lib/python3.10/encodings/iso8859_10.py
system/etc/python/lib/python3.10/encodings/cp869.py
system/etc/python/lib/python3.10/encodings/charmap.py
system/etc/python/lib/python3.10/encodings/cp1257.py
system/etc/python/lib/python3.10/encodings/cp866.py
system/etc/python/lib/python3.10/encodings/big5hkscs.py
system/etc/python/lib/python3.10/encodings/shift_jisx0213.py
system/etc/python/lib/python3.10/encodings/cp1254.py
system/etc/python/lib/python3.10/encodings/base64_codec.py
system/etc/python/lib/python3.10/encodings/hz.py
system/etc/python/lib/python3.10/encodings/cp1250.py
system/etc/python/lib/python3.10/encodings/palmos.py
system/etc/python/lib/python3.10/encodings/cp861.py
system/etc/python/lib/python3.10/encodings/zlib_codec.py
system/etc/python/lib/python3.10/encodings/iso2022_jp_1.py
system/etc/python/lib/python3.10/encodings/gbk.py
system/etc/python/lib/python3.10/encodings/johab.py
system/etc/python/lib/python3.10/encodings/iso8859_11.py
system/etc/python/lib/python3.10/encodings/tis_620.py
system/etc/python/lib/python3.10/encodings/ascii.py
system/etc/python/lib/python3.10/encodings/koi8_u.py
system/etc/python/lib/python3.10/encodings/iso8859_8.py
system/etc/python/lib/python3.10/encodings/iso2022_jp_ext.py
system/etc/python/lib/python3.10/encodings/euc_jp.py
system/etc/python/lib/python3.10/encodings/shift_jis.py
system/etc/python/lib/python3.10/encodings/cp273.py
system/etc/python/lib/python3.10/encodings/punycode.py
system/etc/python/lib/python3.10/encodings/utf_7.py
system/etc/python/lib/python3.10/encodings/iso2022_kr.py
system/etc/python/lib/python3.10/encodings/cp1255.py
system/etc/python/lib/python3.10/encodings/iso8859_9.py
system/etc/python/lib/python3.10/encodings/iso2022_jp_3.py
system/etc/python/lib/python3.10/encodings/koi8_t.py
system/etc/python/lib/python3.10/encodings/utf_32.py
system/etc/python/lib/python3.10/encodings/cp1026.py
system/etc/python/lib/python3.10/encodings/mac_latin2.py
system/etc/python/lib/python3.10/encodings/cp856.py
system/etc/python/lib/python3.10/encodings/oem.py
system/etc/python/lib/python3.10/encodings/mac_croatian.py
system/etc/python/lib/python3.10/encodings/hp_roman8.py
system/etc/python/lib/python3.10/encodings/__init__.py
system/etc/python/lib/python3.10/encodings/cp863.py
system/etc/python/lib/python3.10/encodings/koi8_r.py
system/etc/python/lib/python3.10/encodings/iso8859_7.py
system/etc/python/lib/python3.10/encodings/cp865.py
system/etc/python/lib/python3.10/encodings/utf_16.py
system/etc/python/lib/python3.10/encodings/cp1253.py
system/etc/python/lib/python3.10/encodings/mac_turkish.py
system/etc/python/lib/python3.10/encodings/cp1006.py
system/etc/python/lib/python3.10/encodings/cp932.py
system/etc/python/lib/python3.10/encodings/kz1048.py
system/etc/python/lib/python3.10/encodings/cp437.py
system/etc/python/lib/python3.10/encodings/raw_unicode_escape.py
system/etc/python/lib/python3.10/encodings/utf_8.py
system/etc/python/lib/python3.10/encodings/cp1252.py
system/etc/python/lib/python3.10/encodings/big5.py
system/etc/python/lib/python3.10/encodings/utf_16_be.py
system/etc/python/lib/python3.10/encodings/euc_jisx0213.py
system/etc/python/lib/python3.10/encodings/iso8859_5.py
system/etc/python/lib/python3.10/encodings/mac_farsi.py
system/etc/python/lib/python3.10/encodings/unicode_escape.py
system/etc/python/lib/python3.10/encodings/cp950.py
system/etc/python/lib/python3.10/encodings/euc_kr.py
system/etc/python/lib/python3.10/encodings/cp500.py
system/etc/python/lib/python3.10/encodings/gb18030.py
system/etc/python/lib/python3.10/encodings/iso2022_jp_2004.py
system/etc/python/lib/python3.10/encodings/cp1140.py
system/etc/python/lib/python3.10/encodings/cp852.py
system/etc/python/lib/python3.10/encodings/mac_cyrillic.py
system/etc/python/lib/python3.10/encodings/hex_codec.py
system/etc/python/lib/python3.10/encodings/iso8859_3.py
system/etc/python/lib/python3.10/encodings/mbcs.py
system/etc/python/lib/python3.10/encodings/bz2_codec.py
system/etc/python/lib/python3.10/encodings/iso8859_16.py
system/etc/python/lib/python3.10/encodings/utf_16_le.py
system/etc/python/lib/python3.10/encodings/euc_jis_2004.py
system/etc/python/lib/python3.10/encodings/iso8859_4.py
system/etc/python/lib/python3.10/encodings/iso8859_15.py
system/etc/python/lib/python3.10/encodings/iso8859_13.py
system/etc/python/lib/python3.10/encodings/cp850.py
system/etc/python/lib/python3.10/encodings/cp737.py
system/etc/python/lib/python3.10/encodings/iso8859_6.py
system/etc/python/lib/python3.10/encodings/cp1256.py
system/etc/python/lib/python3.10/encodings/cp875.py
system/etc/python/lib/python3.10/encodings/aliases.py
system/etc/python/lib/python3.10/encodings/utf_32_le.py
system/etc/python/lib/python3.10/site-packages
system/lib
system/lib/python3.10
system/lib/python3.10/site-packages
system/lib/python3.10/lib-dynload
system/lib/python3.10/lib-dynload/_struct.cpython-310.so
system/lib/python3.10/lib-dynload/binascii.cpython-310.so
┌root@localhost:/data/adb/modules/python3
└─#


site-packages config
The Magisk Module contains two directories fo site-packages:

┌shell@localhost:/data/local/tmp/develop/work
└─$ python -c 'import site; print(site.getsitepackages())'
['/etc/python/lib/python3.10/site-packages', '/system/lib/python3.10/site-packages']
┌shell@localhost:/data/local/tmp/develop/work


/system/lib/python3.10/site-packages can be used to add python packages to the Magisk Module.

/etc/python/lib/python3.10/site-packages is a symbolic link to a directory writable by the user shell that can be used to add site packages to the already installed python:

┌root@localhost:/data/adb/modules/python3
└─# ls -ld /etc/python/lib/python3.10/site-packages
lrwxrwxrwx 1 root root 40 1970-03-16 23:40 /etc/python/lib/python3.10/site-packages -> /data/local/tmp/python3.10/site-packages
┌root@localhost:/data/adb/modules/python3
└─#


python3_3.10.v1.1.0.zip This Magisk Module contains Python3 3.10 for arm64 CPUs see here for details
python3_3.14.v1.1.0.zip
This Magisk Module contains Python3 3.14 for arm64 CPUs


see https://xdaforums.com/t/module-python-3-14-for-android.4696862/ for details

python3_3.14.v2.0.0.zip This Magisk Module contains Python3 3.14 for arm64 CPUs

Also included in the Module are the necessary OpenSSL libraries to use SSL in Python scripts and the Phython module pip is already installed.

see here for details
cmake_3.30.4-v2.1.0.zip
This Magisk Module contains cmake and ninja binaries for arm64 CPUs
The Magisk Module installs the executables in /system/usr/bin and symbolic links in /system/bin.

The version of the tools in this Module are:

cmake 3.30.4
ninja 1.13.0.git

Files in the module
ASUS_I006D:/data/adb/modules/cmake/system/bin # date
Fri Dec 13 15:40:47 CET 2024
ASUS_I006D:/data/adb/modules/cmake/system/bin #

ASUS_I006D:/data/adb/modules/cmake/system/bin # ls -l
total 0
lrwxrwxrwx 1 root root 16 2024-12-13 15:38 cmake -> ../usr/bin/cmake
lrwxrwxrwx 1 root root 16 2024-12-13 15:38 cpack -> ../usr/bin/cpack
lrwxrwxrwx 1 root root 16 2024-12-13 15:38 ctest -> ../usr/bin/ctest
lrwxrwxrwx 1 root root 21 2024-12-13 15:38 ctresalloc -> ../usr/bin/ctresalloc
lrwxrwxrwx 1 root root 16 2024-12-13 15:38 ninja -> ../usr/bin/ninja
ASUS_I006D:/data/adb/modules/cmake/system/bin #

ASUS_I006D:/data/adb/modules/cmake/system/bin # cd ../usr/bin
ASUS_I006D:/data/adb/modules/cmake/system/usr/bin #

ASUS_I006D:/data/adb/modules/cmake/system/usr/bin # ls -l
total 814660
-rwxr-xr-x 1 root root 194349488 2024-12-13 15:38 cmake
-rwxr-xr-x 1 root root 198607472 2024-12-13 15:38 cpack
-rwxr-xr-x 1 root root 215374192 2024-12-13 15:38 ctest
-rwxr-xr-x 1 root root 214896944 2024-12-13 15:38 ctresalloc
-rwxr-xr-x 1 root root  10148728 2024-12-13 15:38 ninja
 ASUS_I006D:/data/adb/modules/cmake/system/usr/bin #

...plus the necessary data files for cmake.


Details
The file ./system/usr/include/android/api-level.h in the Magisk Module is from the Android NDK r27b 

To use a different api-level.h, set the environment variable PREFIX before starting cmake, e.g:

PREFIX=/data/local/tmp/develop/sysroot/usr  cmake ..

All binaries in the module are either statically linked or dynamically linked but only for the standard libraries from the Android OS.


cmake_4.0.1-v1.0.0.zip This Magisk Module contains cmake and ninja binaries for arm64 CPUs The Magisk Module installs the executables in /system/usr/bin and symbolic links in /system/bin.

The version of the tools in this Module are:

cmake 4.0.1
ninja 1.13.0.git

Files in the module
ASUS_I006D:/ $ date
Sun Apr 27 18:03:10 CEST 2025
ASUS_I006D:/ $

ASUS_I006D:/ $ cd /system/bin
ASUS_I006D:/system/bin $

ASUS_I006D:/system/bin $ ls -l | grep ../usr/bin
lrwxrwxrwx 1 root root       16 1970-02-03 23:40 cmake -> ../usr/bin/cmake
lrwxrwxrwx 1 root root       16 1970-02-03 23:40 cpack -> ../usr/bin/cpack
lrwxrwxrwx 1 root root       16 1970-02-03 23:40 ctest -> ../usr/bin/ctest
lrwxrwxrwx 1 root root       21 1970-02-03 23:40 ctresalloc -> ../usr/bin/ctresalloc
lrwxrwxrwx 1 root root       16 1970-02-03 23:40 ninja -> ../usr/bin/ninja
ASUS_I006D:/system/bin $

ASUS_I006D:/system/bin $ cd /system/usr/bin
ASUS_I006D:/system/usr/bin $

ASUS_I006D:/system/usr/bin $ ls -lh c* ninja 
-rwxr-xr-x 1 root root  11M 2025-04-27 17:17 cmake
-rwxr-xr-x 1 root root  12M 2025-04-27 17:17 cpack
-rwxr-xr-x 1 root root  12M 2025-04-27 17:17 ctest
-rwxr-xr-x 1 root root  12M 2025-04-27 17:17 ctresalloc
-rwxr-xr-x 1 root root  10M 2025-04-27 17:17 ninja
ASUS_I006D:/system/usr/bin $

 
...plus the necessary data files for cmake.


Details
The file ./system/usr/include/android/api-level.h in the Magisk Module is from the Android NDK r27c 

To use a different api-level.h, set the environment variable PREFIX before starting cmake, e.g:

PREFIX=/data/local/tmp/develop/sysroot/usr  cmake ..

All binaries in the module are either statically linked or dynamically linked but only for the standard libraries from the Android OS.




autoconf_tools_1.3.2.1.zip This Magisk Module contains the autoconf utils for Android

The executables for autoconf, automake, libool, and help2man are Perl scripts.

The other executables in the Magisk Module are are binaries for arm64 CPUs.


The Magisk Module installs the binaries in /system/bin.

Some of the executables in this module require Perl (/system/bin/perl)

Files in the module
ASUS_I006D:/data/adb/modules/autoconf_tools/system/bin # date
Wed Nov 13 07:16:03 CET 2024
ASUS_I006D:/data/adb/modules/autoconf_tools/system/bin # ls -l 
total 1476
lrwxrwxrwx 1 root root     14 2024-11-13 07:14 aclocal -> ./aclocal-1.17
-rwxr-xr-x 1 root root  37744 2024-11-13 07:14 aclocal-1.17
-rwxr-xr-x 1 root root   6708 2024-11-13 07:14 autoconf
-rwxr-xr-x 1 root root   9111 2024-11-13 07:14 autoheader
-rwxr-xr-x 1 root root  34943 2024-11-13 07:14 autom4te
lrwxrwxrwx 1 root root     15 2024-11-13 07:14 automake -> ./automake-1.17
-rwxr-xr-x 1 root root 264364 2024-11-13 07:14 automake-1.17
-rwxr-xr-x 1 root root  26892 2024-11-13 07:14 autoreconf
-rwxr-xr-x 1 root root  17196 2024-11-13 07:14 autoscan
-rwxr-xr-x 1 root root  34039 2024-11-13 07:14 autoupdate
-rwxr-xr-x 1 root root 234520 2024-11-13 07:14 gnupatch
-rwxr-xr-x 1 root root   4198 2024-11-13 07:14 ifnames
-rwxr-xr-x 1 root root 373710 2024-11-13 07:14 libtool
-rwxr-xr-x 1 root root 137168 2024-11-13 07:14 libtoolize
-rwxr-xr-x 1 root root 297072 2024-11-13 07:14 m4
ASUS_I006D:/data/adb/modules/autoconf_tools/system/bin #

... and the necessary cata files


The version of the tools in the Module are:

autoconf 2.72
automake 1.17
m4 1.4.19
libtool 2.5.3
(gnu) patch 2.7
help2man 1.49.3

To use an m4 executable in another directory, set the environment variable M4 before calling autoconf.

bison_flex_1.1.0.zip
This Magisk Module contains bsion, yacc, and flex for arm64 CPUs
.
The Magisk Module installs the binaries in /system/bin.

The executables in this module require m4 (/system/bin/m4)

Files in the module
┌root@localhost:/data/adb/modules/bison_flex/system/bin
└─# date
Wed Oct  2 12:17:52 CEST 2024
┌root@localhost:/data/adb/modules/bison_flex/system/bin
└─#

root@localhost:/data/adb/modules/bison_flex/system/bin

└─# ls -ltr
total 1460
lrwxrwxrwx 1 root root      4 2024-10-02 12:10 flex++ -> flex
-rwxr-xr-x 1 root root 513936 2024-10-02 12:10 flex
-rwxr-xr-x 1 root root   4221 2024-10-02 12:10 yacc
-rwxr-xr-x 1 root root 969104 2024-10-02 12:10 bison
┌root@localhost:/data/adb/modules/bison_flex/system/bin
└─#

and the necessary data files

The version of the tools in the Module are:

bison 3.8
flex 2.6.4

(yacc is a symbolic link to bison)

openssh_9.9p1.v1.1.1.zip

This Magisk Module contains OpenSSH 9.9p1 for arm64 CPUs The OpenSSH binaries in this Magisk Module are compiled without SELinux support 

https://xdaforums.com/t/module-openssh-for-android.4696499/

Note:

This Magisk module is outdated -- use the Magisk Module with OpenSSH 9.9p2 instead

openssh_9.9p1.v1.1.0.zip This Magisk Module contains OpenSSH 9.9p1 for arm64 CPUs The OpenSSH binaries in this Magisk Module are compiled with SELinux support 

see this post for details

https://xdaforums.com/t/module-openssh-for-android.4696499/

Note:

This Magisk module is outdated -- use the Magisk Module with OpenSSH 9.9p2 instead

openssh_9.9p2.v1.1.0.zip
This Magisk Module contains OpenSSH 9.9p2for arm64 CPUs

The OpenSSH binaries in this Magisk Module are compiled with SELinux support

see here for details

openssh_10.0p2.v1.1.0.zip
This Magisk Module contains OpenSSH 10.0p2 for arm64 CPUs The OpenSSH binaries in this Magisk Module are compiled with SELinux support

see here for details

sqlite3_3.50.1-v1.0.0.zip This Magisk Module contains sqlite3 for arm64 CPUs The Magisk Module installs the binaries in /system/usr/bin and creates a symbolic link for sqlite3 in /system/bin.

The Magisk Module contains the sqlite3 binary and the library and header files to use it in other programs.

Details
The sqlite3 binary is dynamically linked but only for the standard Android OS libraries:

ASUS_I006D:/ $ ldd /system/bin/sqlite3
    linux-vdso.so.1 => [vdso] (0x7707109000)
    libm.so => /apex/com.android.runtime/lib64/bionic/libm.so (0x7702a84000)
    libz.so => /system/lib64/libz.so (0x7702c20000)
    libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x7702b01000)
    libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x7702ac0000)
ASUS_I006D:/ $


Files in the module:

ASUS_I006D:/data/adb/modules/sqlite3 # date
Thu Jun  5 08:47:28 CEST 2025
ASUS_I006D:/data/adb/modules/sqlite3 # find system
system
system/usr
system/usr/include
system/usr/include/sqlite3ext.h
system/usr/include/sqlite3.h
system/usr/bin
system/usr/bin/sqlite3
system/usr/share
system/usr/share/man
system/usr/share/man/man1
system/usr/share/man/man1/sqlite3.1
system/usr/lib
system/usr/lib/libsqlite3.so
system/usr/lib/libsqlite3.so.3.50.1
system/usr/lib/pkgconfig
system/usr/lib/pkgconfig/sqlite3.pc
system/usr/lib/libsqlite3.so.0
system/usr/lib/libsqlite3.a
system/bin
system/bin/sqlite3
ASUS_I006D:/data/adb/modules/sqlite3 #


To only use the sqlite3 binary from the Module use this command:

unzip -p sqlite3_3.50.1-v1.0.0.zip system/usr/bin/sqlite3 >sqlite3


bash_5.2-v1.0.0.zip
This Magisk Module contains bash for arm64, arm, x86, and x86_64 CPUs The Magisk Module installs the binaries in /system/bin.

The bash executable was compiled using the build script from this repository:

https://github.com/Zackptg5/Cross-Compiled-Binaries-Android/tree/master

The init file for the bash is

/system/etc/bash/bashrc

This init script sources the file

/data/local/tmp/home/bashrc

if it exists

bash_5.2.37-v1.1.0.zip

This Magisk Module contains bash for arm64 CPUs The Magisk Module installs the executables in /system/bin.

New in version 1.1.0:

The tests for the file permissions like this

 [ -x /bin/sh ] && echo ok

 [ -r /system/bin/sh ] && echo ok
 
work for non-root user in the bash binaries from this Magisk Module

see also the Documentation for the Magisk Module with bash

 
util-linux_2.40-v1.0.1.zip
This Magisk Module contains the Linux Utils for arm64 CPUs This Magisk Module contains Linux utils from

https://github.com/util-linux/util-linux/

The utils are installed in the directory

/system/usr/bin/util-linux-binaries

a symbolic link to the wrapper script, ./util-linux-wrapper, is created for each of the utils in the directory

/system/usr/bin

The libraries for the utils are installed in the directory

/system/usr/lib/util-linux-libraries

Executables in the module
┌root@localhost:/data/mkuser/home/root
└─# date
Tue Oct 15 13:43:43 CEST 2024
┌root@localhost:/data/mkuser/home/root
└─#
┌root@localhost:/data/mkuser/home/root
└─# ls -l /system/usr/bin/util-linux-binaries/
total 6324
-rwxr-xr-x 1 root root  23344 2024-10-14 20:07 addpart
-rwxr-xr-x 1 root root  29424 2024-10-14 20:07 blkdiscard
-rwxr-xr-x 1 root root 125088 2024-10-14 20:07 blkid
-rwxr-xr-x 1 root root  30120 2024-10-14 20:07 blkpr
-rwxr-xr-x 1 root root  82584 2024-10-14 20:07 blkzone
-rwxr-xr-x 1 root root  82688 2024-10-14 20:07 blockdev
-rwxr-xr-x 1 root root 141632 2024-10-14 20:07 cal
-rwxr-xr-x 1 root root 313568 2024-10-14 20:07 cfdisk
-rwxr-xr-x 1 root root  40768 2024-10-14 20:07 chcpu
-rwxr-xr-x 1 root root  52992 2024-10-14 20:07 choom
-rwxr-xr-x 1 root root  64440 2024-10-14 20:07 chrt
-rwxr-xr-x 1 root root  10520 2024-10-14 20:07 colcrt
-rwxr-xr-x 1 root root  24616 2024-10-14 20:07 colrm
-rwxr-xr-x 1 root root  51640 2024-10-14 20:07 column
-rwxr-xr-x 1 root root  36352 2024-10-14 20:07 ctrlaltdel
-rwxr-xr-x 1 root root  23184 2024-10-14 20:07 delpart
-rwxr-xr-x 1 root root 153864 2024-10-14 20:07 dmesg
-rwxr-xr-x 1 root root  40504 2024-10-14 20:07 enosys
-rwxr-xr-x 1 root root   6632 2024-10-14 20:07 exch
-rwxr-xr-x 1 root root  25072 2024-10-14 20:07 fadvise
-rwxr-xr-x 1 root root  29536 2024-10-14 20:07 fallocate
-rwxr-xr-x 1 root root 227568 2024-10-14 20:07 fdisk
-rwxr-xr-x 1 root root  35968 2024-10-14 20:07 fincore
-rwxr-xr-x 1 root root   7608 2024-10-14 20:07 findfs
-rwxr-xr-x 1 root root  75880 2024-10-14 20:07 findmnt
-rwxr-xr-x 1 root root  30384 2024-10-14 20:07 flock
-rwxr-xr-x 1 root root  49312 2024-10-14 20:07 fsck
-rwxr-xr-x 1 root root  72168 2024-10-14 20:07 fsck.cramfs
-rwxr-xr-x 1 root root 127392 2024-10-14 20:07 fsck.minix
-rwxr-xr-x 1 root root   9160 2024-10-14 20:07 fsfreeze
-rwxr-xr-x 1 root root  81640 2024-10-14 20:07 fstrim
-rwxr-xr-x 1 root root  29208 2024-10-14 20:07 getopt
-rwxr-xr-x 1 root root  50184 2024-10-14 20:07 hardlink
-rwxr-xr-x 1 root root 124072 2024-10-14 20:07 hexdump
-rwxr-xr-x 1 root root 102464 2024-10-14 20:07 hwclock
-rwxr-xr-x 1 root root  27320 2024-10-14 20:07 ionice
-rwxr-xr-x 1 root root 273848 2024-10-14 20:07 irqtop
-rwxr-xr-x 1 root root  25192 2024-10-14 20:07 isosize
-rwxr-xr-x 1 root root  32816 2024-10-14 20:07 ldattach
lrwxrwxrwx 1 root root      7 1970-04-03 01:46 linux32 -> setarch
lrwxrwxrwx 1 root root      7 1970-04-03 01:46 linux64 -> setarch
-rwxr-xr-x 1 root root  10448 2024-10-14 20:07 look
-rwxr-xr-x 1 root root 120960 2024-10-14 20:07 losetup
-rwxr-xr-x 1 root root 295936 2024-10-14 20:07 lsblk
-rwxr-xr-x 1 root root  44776 2024-10-14 20:07 lsclocks
-rwxr-xr-x 1 root root 145224 2024-10-14 20:07 lscpu
-rwxr-xr-x 1 root root 183952 2024-10-14 20:07 lsfd
-rwxr-xr-x 1 root root  91448 2024-10-14 20:07 lsipc
-rwxr-xr-x 1 root root  37440 2024-10-14 20:07 lsirq
-rwxr-xr-x 1 root root  72600 2024-10-14 20:07 lslocks
-rwxr-xr-x 1 root root  80128 2024-10-14 20:07 lsns
-rwxr-xr-x 1 root root  33072 2024-10-14 20:07 mcookie
-rwxr-xr-x 1 root root   9024 2024-10-14 20:07 mkfs
-rwxr-xr-x 1 root root  31496 2024-10-14 20:07 mkfs.bfs
-rwxr-xr-x 1 root root  86104 2024-10-14 20:07 mkfs.cramfs
-rwxr-xr-x 1 root root 116296 2024-10-14 20:07 mkfs.minix
-rwxr-xr-x 1 root root 117400 2024-10-14 20:07 mkswap
-rwxr-xr-x 1 root root  54304 2024-10-14 20:07 mount
-rwxr-xr-x 1 root root  29248 2024-10-14 20:07 namei
-rwxr-xr-x 1 root root  73768 2024-10-14 20:07 nsenter
-rwxr-xr-x 1 root root 121616 2024-10-14 20:07 partx
-rwxr-xr-x 1 root root  56160 2024-10-14 20:07 pipesz
-rwxr-xr-x 1 root root  35168 2024-10-14 20:07 prlimit
-rwxr-xr-x 1 root root  30152 2024-10-14 20:07 readprofile
-rwxr-xr-x 1 root root  13864 2024-10-14 20:07 rename
-rwxr-xr-x 1 root root   9856 2024-10-14 20:07 renice
-rwxr-xr-x 1 root root  72680 2024-10-14 20:07 resizepart
-rwxr-xr-x 1 root root   8976 2024-10-14 20:07 rev
-rwxr-xr-x 1 root root  47696 2024-10-14 20:07 rtcwake
-rwxr-xr-x 1 root root  68312 2024-10-14 20:07 script
-rwxr-xr-x 1 root root  53928 2024-10-14 20:07 scriptlive
-rwxr-xr-x 1 root root  39504 2024-10-14 20:07 scriptreplay
-rwxr-xr-x 1 root root  80960 2024-10-14 20:07 setarch
-rwxr-xr-x 1 root root   8592 2024-10-14 20:07 setpgid
-rwxr-xr-x 1 root root  82736 2024-10-14 20:07 setpriv
-rwxr-xr-x 1 root root   8872 2024-10-14 20:07 setsid
-rwxr-xr-x 1 root root 115584 2024-10-14 20:07 setterm
-rwxr-xr-x 1 root root 218696 2024-10-14 20:07 sfdisk
-rwxr-xr-x 1 root root  10928 2024-10-14 20:07 swaplabel
-rwxr-xr-x 1 root root  15544 2024-10-14 20:07 swapoff
-rwxr-xr-x 1 root root  49608 2024-10-14 20:07 swapon
-rwxr-xr-x 1 root root  60968 2024-10-14 20:07 taskset
-rwxr-xr-x 1 root root  61504 2024-10-14 20:07 uclampset
-rwxr-xr-x 1 root root  90576 2024-10-14 20:07 ul
-rwxr-xr-x 1 root root  30088 2024-10-14 20:07 umount
lrwxrwxrwx 1 root root      7 1970-04-03 01:46 uname26 -> setarch
-rwxr-xr-x 1 root root  82472 2024-10-14 20:07 unshare
-rwxr-xr-x 1 root root  37224 2024-10-14 20:07 uuidd
-rwxr-xr-x 1 root root  28280 2024-10-14 20:07 uuidgen
-rwxr-xr-x 1 root root  38888 2024-10-14 20:07 uuidparse
-rwxr-xr-x 1 root root  26272 2024-10-14 20:07 waitpid
-rwxr-xr-x 1 root root  68944 2024-10-14 20:07 wdctl
-rwxr-xr-x 1 root root  24248 2024-10-14 20:07 whereis
-rwxr-xr-x 1 root root  42792 2024-10-14 20:07 wipefs
-rwxr-xr-x 1 root root 123864 2024-10-14 20:07 zramctl
┌root@localhost:/data/mkuser/home/root
└─#  



Note that some of the programs in this Magisk module are not really useful in Android. The utils useful for Android from this Magisk Module are also in the Magisk Module with the Debug Tools.

compression_tools_1.3.0.zip This Magisk Module contains compression tools for arm64 CPUs

see here for details
binutils_2.44-v1.0.0.zip
This Magisk Module contains the GNU bin utils for arm64 CPUs This Magisk Module contains the GNU bin utils from

https://www.gnu.org/software/binutils/

The utils are installed in the directory

/system/usr/bin

All binary files of the bin utils, except gprofng, are located in the module

Executables in the Module
ASUS_I006D:/system/usr/bin $ date
Mon May 19 13:28:55 CEST 2025
ASUS_I006D:/system/usr/bin $ ls -l
total 31220
-rwxr-xr-x 1 root root 1878704 2025-05-19 13:24 addr2line
-rwxr-xr-x 1 root root 1909112 2025-05-19 13:24 ar
-rwxr-xr-x 1 root root 3432584 2025-05-19 13:24 as
-rwxr-xr-x 1 root root 1876616 2025-05-19 13:24 c++filt
-rwxr-xr-x 1 root root   35320 2025-05-19 13:24 elfedit
-rwxr-xr-x 1 root root 1942096 2025-05-19 13:24 gprof
-rwxr-xr-x 1 root root 4343512 2025-05-19 13:24 ld
-rwxr-xr-x 1 root root 1896824 2025-05-19 13:24 nm
-rwxr-xr-x 1 root root 2019936 2025-05-19 13:24 objcopy
-rwxr-xr-x 1 root root 3715944 2025-05-19 13:24 objdump
-rwxr-xr-x 1 root root 1909112 2025-05-19 13:24 ranlib
-rwxr-xr-x 1 root root 1176072 2025-05-19 13:24 readelf
-rwxr-xr-x 1 root root 1879624 2025-05-19 13:24 size
-rwxr-xr-x 1 root root 1883288 2025-05-19 13:24 strings
-rwxr-xr-x 1 root root 2019944 2025-05-19 13:24 strip
ASUS_I006D:/system/usr/bin $


All executables are dynamically linked but only for the standard libraries from the Android OS


clang19_19.0.0git-v1.2.2.zip
This Magisk Module contains the clang19, make, pkg-config, pgkconf and all neccessary files from the Android NDK r27b to compile binaries and libraries for arm64 CPUs

see the Documentation for the Magisk Module with clang19 and the NDK r27b for details

Note 03.06.2025

There was an error in the statement for setting the variable NDK_DIR in the init script init_clang19_env in version 1.2.0 of this Magisk module, which caused clang not to work. This error is fixed in the module version 1.2.1.


clang20_20.0.0git-v1.0.1-beta.zip This Magisk Module contains the clang20, make, pkg-config, pgkconf and all neccessary files from the Android NDK r29 beta1 to compile binaries and libraries for arm64 CPUs

see the Documentation for the Magisk Module with clang20 and the NDK r29 beta1  
create_dynamic_partition_v1.1.0.zip
This Magisk Module contains scripts and binaries to add an additional dynamic partition

see here for details
tcl_9.0-v1.0.0.zip
This Magisk Module contains tcl for arm64 CPUs.
The Magisk Module installs the executables in /system/usr/bin and symbolic links in /system/bin.

The source code for tcl is available here:

https://github.com/tcltk/tcl

Sample tcl script output
ASUS_I006D:/ $ tclsh /data/local/tmp/tclinfo.tclsh
tclsh -- infos

Running the script /data/local/tmp/tclinfo.tclsh
The directory with this script is /data/local/tmp
Number of commands that have been executed: 386
Now THIS many commands have been executed: 389

This interpreter is revision level: 9.0
This interpreter is at patch level: 9.0.1
The process id for this program is 14368
There are 0 arguments to this script
The name of this script is /data/local/tmp/tclinfo.tclsh
ASUS_I006D:/ $


Note:

tk requires X11 and is therefore not part of the Magisk Module

curl 8.13.0-v1.0.0.zip
This Magisk Module contains curl for arm64 CPUs. The Magisk Module installs the executable in /system/usr/bin to avoid overwriting a curl binary from the OS in /system/bin.

Details
ASUS_I006D:/ $ /system/usr/bin/curl --version
curl 8.13.0-DEV (aarch64-unknown-linux-android) libcurl/8.13.0-DEV OpenSSL/3.3.1 zlib/1.3.1.1-motley brotli/1.0.9 zstd/1.5.6 libidn2/2.3.7 libpsl/0.21.5 libssh2/1.11.0 nghttp2/1.63.0-DEV nghttp3/1.7.0-DEV
Build-Date: 2025-04-13
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli CAcert HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Largefile libz NTLM PSL SSL threadsafe TLS-SRP UnixSockets zstd
ASUS_I006D:/ $

curl has been dynamically linked for the OS libraries only, so that the name resolution via DNS works, but no additional libraries are required to use the binary:

ASUS_I006D:/ $ ldd /system/usr/bin/curl
    linux-vdso.so.1 => [vdso] (0x753bf05000)
    libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x7536ac4000)
    libm.so => /apex/com.android.runtime/lib64/bionic/libm.so (0x7536a83000)
    libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x7535c31000)
ASUS_I006D:/ $


The customize script for the Magisk Module creates the file

/system/etc/security/ca-certificates.crt

with all certificates currently installed on the phone in the directory

/system/etc/security/cacerts/

If no certificates are found, curl will use the certificates embedded in the binary. Use the command

  /system/usr/bin/curl --dump-ca-embed

to output the certificates embedded in the binary.

Use the curl parameter --cacert to select another bundle file with certificates.

The module also contains the files necessary to use curl in other programs (libcurl.so and libcurl.a)

Config used to compile the binary
configure: Configured to build curl/libcurl:

  Host setup:       aarch64-unknown-linux-android
  Install prefix:   /system/usr
  Compiler:         /data/develop/android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang
   CFLAGS:          --sysroot /data/develop/android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot -fPIE -fPIC -isystem /data/develop/android/sysroot/usr/include -Wno-implicit-function-declaration -Wno-int-conversion -Qunused-arguments -Werror-implicit-function-declaration -O2
   CFLAGS extras:  
   CPPFLAGS:        --sysroot /data/develop/android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot -fPIE -fPIC -isystem /data/develop/android/sysroot/usr/include -Wno-implicit-function-declaration -Wno-int-conversion -DANDROID -D_GNU_SOURCE -isystem /data/develop/android/sysroot/usr/include -isystem /data/develop/android/sysroot/usr/include -isystem /data/develop/android/sysroot/usr/include -isystem /data/develop/android/sysroot/usr/include -isystem /data/develop/android/sysroot/usr/include -isystem /data/develop/android/sysroot/usr/include -isystem /data/develop/android/sysroot/usr/include -isystem /data/develop/android/sysroot/usr/include -isystem /data/develop/android/sysroot/usr/include
   LDFLAGS:         --sysroot /data/develop/android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot -s -pie -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib
     curl-config:   -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib -L/data/develop/android/sysroot/usr/lib
   LIBS:            -lnghttp3 -lnghttp2 -lidn2 -lssh2 -lssh2 -lpsl -lssl -lcrypto -lssl -lcrypto -lzstd -lzstd -lbrotlidec -lbrotlidec -lz -lidn2 -lunistring -ldl -lm

  curl version:     8.13.0-DEV
  SSL:              enabled (OpenSSL v3+)
  SSH:              enabled (libssh2)
  zlib:             enabled
  brotli:           enabled (libbrotlidec)
  zstd:             enabled (libzstd)
  GSS-API:          no      (--with-gssapi)
  GSASL:            no      (libgsasl not found)
  TLS-SRP:          enabled
  resolver:         POSIX threaded
  IPv6:             enabled
  Unix sockets:     enabled
  IDN:              enabled (libidn2)
  Build docs:       enabled (--disable-docs)
  Build libcurl:    Shared=yes, Static=yes
  Built-in manual:  no      (--enable-manual)
  --libcurl option: enabled (--disable-libcurl-option)
  Verbose errors:   enabled (--disable-verbose)
  Code coverage:    disabled
  SSPI:             no      (--enable-sspi)
  ca cert bundle:   /system/etc/security/ca-certificates.crt
  ca cert path:     /system/etc/security/cacerts
  ca cert embed:    /data/develop/android/source/curl-curl-8_13_0/ca-certificates.crt
  ca fallback:      yes
  LDAP:             no      (--enable-ldap / --with-ldap-lib / --with-lber-lib)
  LDAPS:            no      (--enable-ldaps)
  IPFS/IPNS:        enabled
  RTSP:             enabled
  RTMP:             no      (--with-librtmp)
  PSL:              enabled
  Alt-svc:          enabled (--disable-alt-svc)
  Headers API:      enabled (--disable-headers-api)
  HSTS:             enabled (--disable-hsts)
  HTTP1:            enabled (internal)
  HTTP2:            enabled (nghttp2)
  HTTP3:            enabled (openssl + nghttp3)
  ECH:              no      (--enable-ech)
  HTTPS RR:         no      (--enable-httpsrr)
  SSLS-EXPORT:      no      (--enable-ssls-export)
  Protocols:        dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
  Features:         alt-svc AsynchDNS brotli CAcert HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Largefile libz NTLM PSL SSL threadsafe TLS-SRP UnixSockets zstd



The curl binary can also be used without installing the Magisk Module; to extract the curl binary from the ZIP file use the command

unzip -p curl_8.13.0-v1.0.0.0.zip system/usr/bin/curl >/tmp/curl



wget2_2.1.0-v1.0.0.1.zip This Magisk Module contains wget2 for arm64 CPUs. The Magisk Module installs the executable in /system/bin.

Details
ASUS_I006D:/ $ wget2 --version
GNU Wget2 2.1.0 - multithreaded metalink/file/website downloader

+digest +https +ssl/openssl +ipv6 +iri +large-file -nls -ntlm -opie +psl -hsts
+iconv +idn2 +zlib +lzma +brotlidec +zstd +bzip2 +lzip +http2 -gpgme

Copyright (C) 2012-2015 Tim Ruehsen
Copyright (C) 2015-2024 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later
<http://www.gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Please send bug reports and questions to <bug-wget@gnu.org>.
ASUS_I006D:/ $


wget2 has been dynamically linked for the OS libraries only, so that the name resolution via DNS works, but no additional libraries are required to use the binary:

ASUS_I006D:/ $ ldd /system/bin/wget2
    linux-vdso.so.1 => [vdso] (0x744fd8e000)
    libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x744bb37000)
    libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x744871f000)
ASUS_I006D:/ $


The certificate bundle hardcoded in the binary is

/system/etc/security/ca-certificates.crt

The customize script for the Magisk Module creates the file

/system/etc/security/ca-certificates.crt

with all certificates currently installed on the phone in the directory

/system/etc/security/cacerts/


Use the wget2 parameter --ca-certificate to select another bundle file with certificates

The module also contains the files necessary to use wget2 in other programs (libwget.so and libwget.a)

Config used to compile wget2
configure: Summary of build options:

  Version:            2.1.0
  Host OS:            linux-android
  Install prefix:     /data/develop/android/sysroot/usr
  Compiler:           /data/develop/android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang
  CFlags:             -I/data/develop/android/sysroot/usr/include -DPCRE2_STATIC -I/data/develop/android/sysroot/usr/include -I/data/develop/android/sysroot/include -I/data/develop/android/sysroot/usr/include -I/data/develop/android/sysroot/usr/include -I/data/develop/android/sysroot/usr/include -I/data/develop/android/sysroot/usr/include -I/data/develop/android/sysroot/usr/include -I/data/develop/android/sysroot/usr/include -DNDEBUG --sysroot /data/develop/android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot --sysroot /data/develop/android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -O2 -fPIE -fPIC -I/data/develop/android/sysroot/usr/include   -Wno-implicit-function-declaration -Wno-int-conversion -O2 -fPIE -fPIC -I/data/develop/android/sysroot/usr/include   -Wno-implicit-function-declaration -Wno-int-conversion -UWITH_LIBHSTS  -I/data/develop/android/sysroot/usr/include
  LDFlags:            --sysroot /data/develop/android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot --sysroot /data/develop/android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -s -pie -L/data/develop/android/sysroot/usr/lib  -s -pie -L/data/develop/android/sysroot/usr/lib 
  Libs:               -L/data/develop/android/sysroot/usr/lib -lpcre2-8 -L/data/develop/android/sysroot/usr/lib -lidn2 -llz  -L/data/develop/android/sysroot/lib -lzstd -L/data/develop/android/sysroot/usr/lib -R/data/develop/android/sysroot/usr/lib -lbrotlidec -L/data/develop/android/sysroot/usr/lib -llzma -L/data/develop/android/sysroot/usr/lib -lz -lbz2  -L/data/develop/android/sysroot/usr/lib -lnghttp2 -L/data/develop/android/sysroot/usr/lib -lpsl -L/data/develop/android/sysroot/usr/lib -lssl -lcrypto
  Library types:      shared=yes, static=yes
  Small libraries:    no
  SSL/TLS support:    openssl
  DANE support:       no
  GZIP compression:   yes
  BZIP2 compression:  yes
  LZMA compression:   yes
  Brotli compression: yes
  Zstd compression:   yes
  Lzip compression:   yes
  IDNA support:       IDNA 2008 (libidn2)
  PSL support:        yes
  HSTS support:       no
  HTTP/2.0 support:   yes
  Documentation:      no (disabled)
  Wget2 docs:        
  Libwget docs:      
  PCRE support:       yes, via libpcre2
  Tests:              Valgrind testing not enabled
  Assertions:         no
  POSIX xattr:        no
  Microhttpd support: no (CFLAGS: . LIBS: )
  Fuzzing build:      no,
  GPGME:              no
  libproxy:           no



To use the wget2 binary from the Magisk Module without installing the module extract the wget2 binary using this command:

unzip -p wget2_2.1.0-v1.0.0.0.zip  system/bin/wget2 >/tmp/wget2 

rsync_3.4.1-v1.1.0.zip
This Magisk Module contains rsync 3.4.1 for arm64 CPUs. The Magisk Module installs the executable in /system/bin.

Details
ASUS_I006D:/ $ rsync --version
rsync  version 3.4.1  protocol version 32
Copyright (C) 1996-2025 by Andrew Tridgell, Wayne Davison, and others.
Web site: https://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    no socketpairs, symlinks, symtimes, hardlinks, no hardlink-specials,
    no hardlink-symlinks, IPv6, atimes, batchfiles, inplace, append, no ACLs,
    no xattrs, optional secluded-args, iconv, prealloc, stop-at, no crtimes
Optimizations:
    no SIMD-roll, no asm-roll, openssl-crypto, no asm-MD5
Checksum list:
    xxh128 xxh3 xxh64 (xxhash) md5 md4 sha1 none
Compress list:
    zstd lz4 zlibx zlib none
Daemon auth list:
    sha512 sha256 sha1 md5 md4

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.
ASUS_I006D:/ $ ldd /system/bin/rsync
/system/bin/rsync: cannot open: No such file or directory
1|ASUS_I006D:/ $


rsync has been dynamically linked for the OS libraries only, so that the name resolution via DNS works, but no additional libraries are required to use the binary.


To use the rsync binary from the Magisk Module without installing the module extract the rsync binary using this command:

unzip -p rsync_3.4.1-v1.1.0.zip  system/bin/rsync >/tmp/rsync


gdb_15.2-v1.0.0.zip 
This Magisk Module contains gdb 15.2 for arm64 CPUs. The Magisk Module installs the executable in /system/usr/bin and symbolic links in /system/bin.

Details
ASUS_I006D:/data/local/tmp/develop $ gdb --version
warning: Found custom handler for signal 4 (Illegal instruction) preinstalled.
warning: Found custom handler for signal 5 (Trap) preinstalled.
warning: Found custom handler for signal 6 (Aborted) preinstalled.
warning: Found custom handler for signal 7 (Bus error) preinstalled.
warning: Found custom handler for signal 8 (Floating point exception) preinstalled.
warning: Found custom handler for signal 11 (Segmentation fault) preinstalled.
warning: Found custom handler for signal 16 (Stack fault) preinstalled.
warning: Found custom handler for signal 31 (Bad system call) preinstalled.
warning: Found custom handler for signal 35 (Unknown signal 35) preinstalled.
warning: Found custom handler for signal 36 (Unknown signal 36) preinstalled.
warning: Found custom handler for signal 39 (Unknown signal 39) preinstalled.
Some signal dispositions inherited from the environment (SIG_DFL/SIG_IGN)
won't be propagated to spawned programs.
GNU gdb (GDB) 15.2
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
ASUS_I006D:/data/local/tmp/develop $



The source code for the gdb is available here:

https://sourceware.org/gdb/



gdb16_16.1_v1.0.0.zip
This Magisk Module contains gdb 16.1 for arm64 CPUs. The Magisk Module installs the executable in /system/usr/bin and wrapper scripts in /system/bin.

Details
raspberry-dev:/data/local/tmp/develop/gdb-16.1 # gdb --version
GNU gdb (GDB) 16.1
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
raspberry-dev:/data/local/tmp/develop/gdb-16.1 #


raspberry-dev:/ $ echo "show configuration"  | gdb
GNU gdb (GDB) 16.1
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-unknown-linux-android".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) This GDB was configured as follows:
   configure --host=aarch64-unknown-linux-android --target=aarch64-unknown-linux-android
         --with-auto-load-dir=:${prefix}/share/auto-load
         --with-auto-load-safe-path=:${prefix}/share/auto-load
         --with-expat
         --with-gdb-datadir=/data/local/tmp/sysroot/usr/share/gdb (relocatable)
         --with-jit-reader-dir=/data/local/tmp/sysroot/usr/lib/gdb (relocatable)
         --without-libunwind-ia64
         --with-lzma
         --without-babeltrace
         --without-intel-pt
         --with-xxhash
         --without-python
         --without-python-libdir
         --without-debuginfod
         --with-curses
         --without-guile
         --without-amd-dbgapi
         --disable-source-highlight
         --enable-threading
         --enable-tui
         --without-system-readline
         --with-separate-debug-dir=/data/local/tmp/sysroot/usr/lib/debug (relocatable)

("Relocatable" means the directory can be moved with the GDB installation
tree, and GDB will still find it.)

GNU Readline library version: 8.2    (internal)
raspberry-dev:/ $    

gdb16_16.3_v1.0.0.zip This Magisk Module contains gdb 16.3 for arm64 CPUs. The Magisk Module installs the executable in /system/usr/bin and wrapper scripts in /system/bin.

Details
ASUS_I006D:/ $ gdb --version
GNU gdb (GDB) 16.3
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
ASUS_I006D:/ $


ASUS_I006D:/ $ echo "show configuration"  | gdb
GNU gdb (GDB) 16.3
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-linux-android".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) This GDB was configured as follows:
   configure --host=aarch64-linux-android --target=aarch64-linux-android
         --with-auto-load-dir=$debugdir:$datadir/auto-load
         --with-auto-load-safe-path=$debugdir:$datadir/auto-load
         --with-expat
         --with-gdb-datadir=/system/usr/share/gdb (relocatable)
         --with-jit-reader-dir=/system/usr/lib/gdb (relocatable)
         --without-libunwind-ia64
         --with-lzma
         --without-babeltrace
         --without-intel-pt
         --with-xxhash
         --without-python
         --without-python-libdir
         --without-debuginfod
         --with-curses
         --without-guile
         --without-amd-dbgapi
         --disable-source-highlight
         --enable-threading
         --enable-tui
         --without-system-readline
         --with-separate-debug-dir=/system/usr/lib/debug (relocatable)

("Relocatable" means the directory can be moved with the GDB installation
tree, and GDB will still find it.)

GNU Readline library version: 8.2    (internal)
(gdb) ASUS_I006D:/ $


Details

The binaries are dynamically linked for the Android standard libraries and the C++ runtime library only:

ASUS_I006D:/ $ LD_LIBRARY_PATH=/system/usr/gdb16_libs/ ldd /system/usr/bin/gdb
    linux-vdso.so.1 => [vdso] (0x73345d1000)
    libm.so => /apex/com.android.runtime/lib64/bionic/libm.so (0x732f441000)
    libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x73301b9000)
    libc++_shared.so => /system/usr/gdb16_libs/libc++_shared.so (0x732c008000)
    libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x732ecd1000)
ASUS_I006D:/ $


The executables are installed in /system/usr/lib. There is a symbolic link to a wrapper script for each executable in the directory /system/bin:

ASUS_I006D:/ $ ls -l /system/bin  | grep gdb16_wrapper
lrwxrwxrwx 1 root root       24 1970-01-08 20:36 gcore -> ./gdb16_wrapper_template
lrwxrwxrwx 1 root root       24 1970-01-08 20:36 gdb -> ./gdb16_wrapper_template
lrwxrwxrwx 1 root root       24 1970-01-08 20:36 gdb-add-index -> ./gdb16_wrapper_template
-rwxr-xr-x 1 root root       82 2025-05-22 09:06 gdb16_wrapper_template
lrwxrwxrwx 1 root root       24 1970-01-08 20:36 gdbserver -> ./gdb16_wrapper_template
lrwxrwxrwx 1 root root       24 1970-01-08 20:36 gstack -> ./gdb16_wrapper_template
lrwxrwxrwx 1 root root       24 1970-01-08 20:36 run -> ./gdb16_wrapper_template
ASUS_I006D:/ $


The patches from Termux for gdb are applied.

To compile gdb 16.3 with the clang from the Android NDK a patch for the file gdb/eintr.h is necessary.
This patch is in the directory ./source in the Magisk Module:

eintr-wrapper.patch



git_2.47.0.288-v1.0.0.zip  
This Magisk Module contains git 2.47 for arm64 CPUs. The Magisk Module installs the executable in /system/usr/bin and a symbolic link in /system/bin.

Details
ASUS_I006D:/ $ git --version
git version 2.47.0.288.g090d24e9af.dirty
ASUS_I006D:/ $ 

If you get an error about an invalid SSL certificate like this

ASUS_I006D:/data/local/tmp/develop $ git clone https://github.com/htop-dev/htop.git
Cloning into 'htop'...
fatal: unable to access 'https://github.com/htop-dev/htop.git/': SSL peer certificate or SSH remote key was not OK
128|ASUS_I006D:/data/local/tmp/develop $


use the wrapper script /sysetm/bin/git_no_ssl_verify.

git_2.48.0-v1.0.0.zip   
This Magisk Module contains git 2.48 for arm64 CPUs.
The Magisk Module installs the executable in /system/usr/bin and a symbolic link in /system/bin.

Details
ASUS_I006D:/ $ git --version
git version 2.48.0
ASUS_I006D:/ $ 

If you get an error about an invalid SSL certificate like this

ASUS_I006D:/data/local/tmp/develop $ git clone https://github.com/htop-dev/htop.git
Cloning into 'htop'...
fatal: unable to access 'https://github.com/htop-dev/htop.git/': SSL peer certificate or SSH remote key was not OK
128|ASUS_I006D:/data/local/tmp/develop $


use the wrapper script /sysetm/bin/git_no_ssl_verify.

man_2.13-v1.0.0.zip
This Magisk Module contains man for arm64 CPUs. The Magisk Module installs the executable for man and less in /system/bin and for groff in /system/usr/bin.

The version of the tools in this Module are:

man 2.13
groff 1.23.0
less 661

Details
The default MANPATH is /data/local/tmp/sysroot/usr/share/man:/system/usr/share/man/ 

This is configured in the man wrapper script:

ASUS_I006D:/ $ cat /system/bin/man
MANPATH=${MANPATH}:/data/local/tmp/sysroot/usr/share/man:/system/usr/share/man TERMINFO=${TERMINFO:=/system/usr/share/terminfo} PATH=${PATH}:/system/usr/bin exec ${0%/*}/${0##*/}.bin ${1+"$@"}
ASUS_I006D:/ $   


regina_3.9.6_v1.0.0.zip
This Magisk Module contains regina for arm64 CPUs. The Magisk Module installs the executable in /system/bin

regina is a REXX interpreter ; the home page for regina is

https://regina-rexx.sourceforge.io/

Details
The Magisk Module installs some REXX programs in the directory

/system/usr/share/regina-rexx/examples/

ASUS_I006D:/ $ ASUS_I006D:/ $  ls -l /system/usr/share/regina-rexx/examples/
total 44
-rw-r--r-- 1 root root 2192 2024-12-29 17:49 animal.rexx
-rw-r--r-- 1 root root  771 2024-12-29 17:49 block.rexx
-rw-r--r-- 1 root root 4612 2024-12-29 17:49 dateconv.rexx
-rw-r--r-- 1 root root 2873 2024-12-29 17:49 dynfunc.rexx
-rw-r--r-- 1 root root 1324 2024-12-29 17:49 getline.rexx
-rw-r--r-- 1 root root 1214 2024-12-29 17:49 newstr.rexx
-rw-r--r-- 1 root root 3149 2024-12-29 17:49 regutil.rexx
-rw-r--r-- 1 root root 5800 2024-12-29 17:49 rexxcps.rexx
-rw-r--r-- 1 root root 1437 2024-12-29 17:49 timeconv.rexx
ASUS_I006D:/ $

ASUS_I006D:/ $ /system/usr/share/regina-rexx/examples/rexxcps.rexx
----- REXXCPS 2.2 -- Measuring REXX clauses/second -----
 REXX version is: REXX-Regina_3.9.6(MT) 5.00 29 Apr 2024
       System is: UNIX
       Averaging: 100 measures of 100 iterations

Total (full DO): 0.03122622 secs (average of 100 measures of 100 iterations)
Time for one iteration (1000 clauses) was: 0.0003122622 seconds

     Performance: 3202437 REXX clauses per second

ASUS_I006D:/ $


gpg1_1.4.23-v1.0.0.zip
This Magisk Module contains gpg 1.4.23 for arm64 CPUs. The Magisk Module installs the executables in /system/usr/bin and symbolic links in /system/bin.

Details
ASUS_I006D:/ # gpg --version
gpg (GnuPG) 1.4.23
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /data/local/tmp/sysroot/home/.gnupg
Supported algorithms:
Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
        CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
ASUS_I006D:/ #


Note

gpg version 2.x cannot be compiled in Android because the library npth is required for gpg 2.x but cannot be compiled in Android


texinfo_v7.2-v1.0.0.zip
This Magisk Module contains texinfo 7.2 for arm64 CPUs. The Magisk Module installs the executables in /system/usr/bin and symbolic links in /system/bin.

Some of the executables in this module are Perl scripts; a Magisk Module with Perl is available here.

Details
"Texinfo is the official documentation format of the GNU project. It is used by many non-GNU projects as well.

Texinfo uses a single source file to produce output in a number of formats, both online and printed (HTML, PDF, DVI, Info, DocBook, LaTeX, EPUB 3). This means that instead of writing different documents for online information and another for a printed manual, you need write only one document."

More information and the sourcecode used to compile the files in this Magisk Module is available here:

https://www.gnu.org/software/texinfo/


ASUS_I006D:/ $ ls -l /system/usr/bin/*
-rwxr-xr-x 1 root root 1447384 2025-03-30 20:27 /system/usr/bin/info
-rwxr-xr-x 1 root root  144648 2025-03-30 20:27 /system/usr/bin/install-info
lrwxrwxrwx 1 root root       8 1970-01-07 03:10 /system/usr/bin/makeinfo -> texi2any
-rwxr-xr-x 1 root root    1163 2025-03-30 20:27 /system/usr/bin/pdftexi2dvi
-rwxr-xr-x 1 root root   28718 2025-03-30 20:27 /system/usr/bin/pod2texi
-rwxr-xr-x 1 root root   83442 2025-03-30 20:27 /system/usr/bin/texi2any
-rwxr-xr-x 1 root root   52732 2025-03-30 20:27 /system/usr/bin/texi2dvi
-rwxr-xr-x 1 root root    1163 2025-03-30 20:27 /system/usr/bin/texi2pdf
-rwxr-xr-x 1 root root    4012 2025-03-30 20:27 /system/usr/bin/texindex
ASUS_I006D:/ $

ASUS_I006D:/ $ file /system/usr/bin/*
/system/usr/bin/info:         ELF shared object, 64-bit LSB arm64, dynamic (/system/bin/linker64), for Android 28, built by NDK r27c (12479018), stripped
/system/usr/bin/install-info: ELF shared object, 64-bit LSB arm64, dynamic (/system/bin/linker64), for Android 28, built by NDK r27c (12479018), stripped
/system/usr/bin/makeinfo:     symbolic link to texi2any
/system/usr/bin/pdftexi2dvi:  /bin/sh script
/system/usr/bin/pod2texi:     /system/bin/perl script
/system/usr/bin/texi2any:     /system/bin/perl script
/system/usr/bin/texi2dvi:     /bin/sh script
/system/usr/bin/texi2pdf:     /bin/sh script
/system/usr/bin/texindex:     /bin/sh script
ASUS_I006D:/ $


ASUS_I006D:/ $ info --version
info (GNU texinfo) 7.2

Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
ASUS_I006D:/ $

126|ASUS_I006D:/ $ ldd /system/usr/bin/info
    linux-vdso.so.1 => [vdso] (0x76dc9dd000)
    libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x76d81d5000)
    libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x76d7b1f000)
ASUS_I006D:/ $

ASUS_I006D:/ $ ldd /system/usr/bin/install-info
    linux-vdso.so.1 => [vdso] (0x6fda071000)
    libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x6fd8e2c000)
    libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x6fd4e24000)
ASUS_I006D:/ $


openvpn_v2.7-v1.0.0.zip
This Magisk Module contains openvpn 2.7 for arm64 CPUs. The Magisk Module installs the executables in /system/usr/bin and symbolic links in /system/bin.

see Documentation for the Magisk Module with OpenVPN   










magisk_module_template_v1.2.2.zip
This is an "empty" Magisk Module that can be used as template for Magisk Modules
see here for details




back top top