Project mkshrc provides a feature-rich shell environment for Android devices, enhancing usability and productivity by offering convenience aliases, support for essential tools like BusyBox and Frida server, and a streamlined deployment process. It supports both rooted and non-rooted devices, with easy configuration using ADB.
-
Enhanced Shell Environment:
- Aliases for common commands with colorized output for better readability (
ls,grep,logcat, etc.). - Convenient shortcuts (
ll,la,l, etc.) for streamlined navigation and operations. - Auto-detection of essential environment variables (
USER,HOSTNAME,TMPDIR, etc.).
- Aliases for common commands with colorized output for better readability (
-
BusyBox Integration:
- Automatically deploys BusyBox and creates symlinks for its utilities.
- Ensures availability of essential Unix commands on the Android shell.
-
Frida Server Management:
- Simplifies the process of starting, stopping, and monitoring the Frida server.
- Automatic SELinux permissive mode adjustment for compatibility.
-
Custom Commands:
man: Simulates manual page functionality using--helpoutputs.sudo: Addssudo-like functionality for non-root users, enabling command execution viasu.
-
Cross-Compatible:
- Works seamlessly on rooted and non-rooted Android devices.
- Usable after every ADB session by sourcing the
mkshrcscript.
-
Deployment Scripts:
- Automated deployment using
deploy.bat(Windows) ordeploy.sh(Linux). - Pushes required binaries (
frida-server,busybox) and configuration files (mkshrc) to the device.
- Automated deployment using
-
Manual Loading:
- Load
mkshrcmanually:adb shell source /data/local/tmp/mkshrc
- Load
- Integrated support for SELinux adjustments for Frida server operations.
- Automatic BusyBox utility linking, reducing manual setup.
- Supports deployment with minimal prerequisites, ensuring a consistent environment across devices.
-
Tools:
- ADB installed on your computer.
- For rooted devices, ensure you have
suaccess. - Compatible binaries for your Android architecture (links provided below).
-
Binaries:
- Frida Server:
- Download and extract
frida-server-16.5.9-android-arm64.xzto obtain thefrida-serverbinary.
- Download and extract
- BusyBox:
- Extract and use the
busybox-1.36.1.1-arm64-v8a.sobinary, renamed asbusybox.
- Extract and use the
- Frida Server:
-
Run Deployment Scripts:
- Windows:
deploy.bat [serial]
- Linux:
./deploy.sh [serial]
If multiple devices are connected, specify the serial ID.
- Windows:
-
Deployment Summary:
- The script pushes:
mkshrcto/data/local/tmp/.- Binaries (
frida-server,busybox) to/data/local/tmp/bin/.
- Sets proper ownership and permissions for all files.
- The script pushes:
-
Prepare Directories:
- Create a directory for binaries:
adb shell mkdir -p /data/local/tmp/bin
- Create a directory for binaries:
-
Push Files:
- Transfer required binaries and configuration files:
adb push busybox /data/local/tmp/bin/ adb push frida-server /data/local/tmp/bin/ adb push mkshrc /data/local/tmp/
- Transfer required binaries and configuration files:
-
Set Permissions:
- Ensure binaries are executable:
adb shell chmod +x /data/local/tmp/bin/*
- Ensure binaries are executable:
-
Connect to your device using ADB:
adb shell
-
Source the
mkshrcfile to initialize:source /data/local/tmp/mkshrc
-
BusyBox Utilities: Access all BusyBox commands directly after deployment.
ls | grep busybox -
Frida Server Management:
- Start Frida:
frida start
- Check status:
frida status
- Stop Frida:
frida stop
- Start Frida:
-
Aliases and Utilities:
- Example:
ll # List files with detailed information. grep 'pattern' file.txt
- Example:
-
Custom Commands:
- Manual pages:
man ls
- Sudo (non-root):
sudo ls /data/data
- Manual pages:
- Always decompress any compressed binaries (e.g.,
xz -d frida-server.xz) before deployment. - For rooted devices, gain
suaccess for enhanced functionality. - Ensure
mkshrcis sourced after every ADB session to enable its environment.
This software is licensed under the terms of MIT License.
You can find a copy of the license in the LICENSE file in the root folder.
© hyugogirubato 2024