Termux is a powerful terminal emulator app for Android devices that allows you to access and run Linux commands on your phone. One useful feature of Termux is the ability to install the su binary, which gives you root access on your device. In this step-by-step guide, we will walk you through the process of installing the su binary using Termux.
Step 1: Install Termux
If you haven't already, start by installing the Termux app from the Google Play Store. Simply search for "Termux" and tap on the install button to download and install the app on your device.
Step 2: Launch Termux
Once Termux is installed, open the app to launch the terminal emulator. You will be greeted with a command prompt where you can start running commands.
Step 3: Update Termux
Before proceeding with the installation of the su binary, it is recommended to update Termux to ensure you have the latest version. To update Termux, run the following command:
apt update && apt upgrade
This command will update the package lists and upgrade any outdated packages on your device.
Step 4: Install the Required Packages
To install the su binary, we need to install a few additional packages. Run the following command to install them:
pkg install git tsu
This command will install the Git version control system and the tsu utility, which is a wrapper for su that allows us to run commands as root.
Step 5: Clone the su Repository
Next, we need to clone the su repository from GitHub. Run the following command to clone the repository:
git clone https://github.com/topjohnwu/su
This command will download the su repository to your device.
Step 6: Navigate to the su Directory
Once the repository is cloned, navigate to the su directory using the following command:
cd su
This command will change your current directory to the su directory.
Step 7: Build and Install su
Now, we are ready to build and install the su binary. Run the following command to start the installation process:
make
This command will compile the su binary from the source code and install it on your device.
Step 8: Grant Superuser Access
After the installation is complete, we need to grant superuser access to the su binary. Run the following command:
tsu -c ./su --install
This command will prompt you to grant superuser access to the su binary. Follow the on-screen instructions to complete the process.
Step 9: Verify the Installation
To verify that the su binary is installed correctly, run the following command:
su --version
If the installation was successful, you should see the version number of the su binary displayed in the terminal.
Congratulations! You have successfully installed the su binary using Termux. You now have root access on your Android device.
Conclusion
Installing the su binary using Termux allows you to gain root access on your Android device, giving you more control and flexibility. However, it is important to use this power responsibly and only perform actions that are necessary and within your knowledge.
References
| Reference | Link |
|---|---|
| Termux GitHub Repository | https://github.com/termux/termux-app |
| su GitHub Repository | https://github.com/topjohnwu/su |