Muse
Muse is an intuitive framework designed to streamline the execution of commands on Android devices. By harnessing the capabilities of ADB (Android Debug Bridge), Muse offers a more efficient way to handle command execution, file management, and device interaction, making it an essential tool for developers and testers working with Android devices.
🚀 Key Features
- Simplified command execution on Android devices via ADB
- User-friendly job submission using straightforward commands
- Automated management of inputs/outputs, device states, and error handling
- Support for multi-user environments and device scheduling
🧩 Installation Guide
On the Server
- Install ADB:
sudo apt-get update sudo apt-get install android-tools-adb
- Follow the instructions to install MongoDB here.
- Use pip to install the Muse server package:
pip3 install muse4ever[server]
On the Client
- Install the Muse client package with pip:
pip3 install muse4ever
- Configure the server address by setting the
MUSE_SERVER_ADDRESSenvironment variable (default:http://127.0.0.1:10813/):export MUSE_SERVER_ADDRESS=<your_server_address>
⚙️ Configuring the Server
- Start the MongoDB service:
sudo systemctl start mongod
- Initiate the Muse server (modify
MUSE_SERVER_HOSTandMUSE_SERVER_PORTas needed):export MUSE_SERVER_HOST=<host> export MUSE_SERVER_PORT=<port> muse-server
- Start the Muse scheduler to manage job queues:
muse-scheduler
- Ensure that your Android devices are connected and recognized by ADB:
adb devices
🧑💻 How to Use Muse
Listing Connected Devices
muse devices
Sample output:
1 device(s) active
---------------------
10ADBG0DS2001R3
Model: V2309A
Battery Level: 100%
Screen Status: off
Executing Commands
muse run --dev <device_id> --cmd <command> [--in <input_files>] [--out <output_files>]
Example Usage 1
muse run --dev 10ADBG0DS2001R3 --cmd 'cat /proc/cpuinfo'
Output:
processor : 0
BogoMIPS : 26.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 ...
CPU implementer : 0x41
CPU architecture: 8
...
Example Usage 2
echo "seq 1 10" > 1.txt
muse run --dev 10ADBG0DS2001R3 --cmd 'tac 1.txt > 2.txt' --in 1.txt --out 2.txt
cat 2.txt
Output:
10
9
8
7
6
5
4
3
2
1
📋 Notes
- When specifying input and output files, use relative paths. For instance, if you run
muse runwith the input file./123/456.txt, it will be transferred to the device as/data/local/tmp/muse/123/456.txt. - Muse executes ADB commands under the hood; it doesn't provide environment isolation or resource constraints.
- The Muse client communicates with the server using the HTTP protocol.
- Developed by exzhawk, the name "muse4ever" is inspired by the "Love Live!" idol group μ's and was chosen as 'muse' was already taken in pip 🎶🎶🎶
Licensing
Muse is made available under the MIT License.
Metadata
Release files for muse4ever 0.17.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| muse4ever-0.17.0.tar.gz | 12.0 kB | Without provenance | Details for muse4ever-0.17.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| muse4ever-0.17.0-py3-none-any.whl | Python 3 | none | any | Details for muse4ever-0.17.0-py3-none-any.whl |
Total release size: 26.2 kB
Release files / muse4ever-0.17.0.tar.gz
| Download URL | muse4ever-0.17.0.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e82c3554425b5b98e0ce3071fceece11d449dacb0a0d43ae55fc6c114e790b1
|
|
BLAKE2b-256 checksum How to use checksums |
a4d9e5668886337bf323e2e1f61d1e680c026d2b2637f6d42bd4c3a16b992523
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / muse4ever-0.17.0-py3-none-any.whl
| Download URL | muse4ever-0.17.0-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db47bc12829efa0891a7b15dadb5cdc15720a732cc8c480812c77566389fc50f
|
|
BLAKE2b-256 checksum How to use checksums |
7e3aa0fd8834b6a44dddb3d181ec8e3c55b6b55bc3e05f0039690d44f2448fcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Security for muse4ever 0.17.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.