# 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
1. Install ADB:
```shell
sudo apt-get update
sudo apt-get install android-tools-adb
```
2. Follow the instructions to install MongoDB [here](https://www.mongodb.com/docs/manual/administration/install-on-linux/).
3. Use pip to install the Muse server package:
```shell
pip3 install muse4ever[server]
```
### On the Client
1. Install the Muse client package with pip:
```shell
pip3 install muse4ever
```
2. Configure the server address by setting the `MUSE_SERVER_ADDRESS` environment variable (default: `http://127.0.0.1:10813/`):
```shell
export MUSE_SERVER_ADDRESS=<your_server_address>
```
## βοΈ Configuring the Server
1. Start the MongoDB service:
```shell
sudo systemctl start mongod
```
2. Initiate the Muse server (modify `MUSE_SERVER_HOST` and `MUSE_SERVER_PORT` as needed):
```shell
export MUSE_SERVER_HOST=<host>
export MUSE_SERVER_PORT=<port>
muse-server
```
3. Start the Muse scheduler to manage job queues:
```shell
muse-scheduler
```
4. Ensure that your Android devices are connected and recognized by ADB:
```shell
adb devices
```
## π§βπ» How to Use Muse
### Listing Connected Devices
```shell
muse devices
```
Sample output:
```
1 device(s) active
---------------------
10ADBG0DS2001R3
Model: V2309A
Battery Level: 100%
Screen Status: off
```
### Executing Commands
```shell
muse run --dev <device_id> --cmd <command> [--in <input_files>] [--out <output_files>]
```
#### Example Usage 1
```shell
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
```shell
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
1. When specifying input and output files, use relative paths. For instance, if you run `muse run` with the input file `./123/456.txt`, it will be transferred to the device as `/data/local/tmp/muse/123/456.txt`.
2. Muse executes ADB commands under the hood; it doesn't provide environment isolation or resource constraints.
3. The Muse client communicates with the server using the HTTP protocol.
4. 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](LICENSE).
Raw data
{
"_id": null,
"home_page": "",
"name": "muse4ever",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "liuyibo <liuyibo1994@qq.com>",
"keywords": "adb,android,command-execution,development-tools,device-interaction,device-management,server-client",
"author": "",
"author_email": "liuyibo <liuyibo1994@qq.com>, exzhawk <exzhawk@exz.me>",
"download_url": "https://files.pythonhosted.org/packages/a4/d9/e5668886337bf323e2e1f61d1e680c026d2b2637f6d42bd4c3a16b992523/muse4ever-0.17.0.tar.gz",
"platform": null,
"description": "# Muse\n\nMuse 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.\n\n## \ud83d\ude80 Key Features\n\n- Simplified command execution on Android devices via ADB\n- User-friendly job submission using straightforward commands\n- Automated management of inputs/outputs, device states, and error handling\n- Support for multi-user environments and device scheduling\n\n## \ud83e\udde9 Installation Guide\n\n### On the Server\n\n1. Install ADB:\n ```shell\n sudo apt-get update\n sudo apt-get install android-tools-adb\n ```\n2. Follow the instructions to install MongoDB [here](https://www.mongodb.com/docs/manual/administration/install-on-linux/).\n3. Use pip to install the Muse server package:\n ```shell\n pip3 install muse4ever[server]\n ```\n\n### On the Client\n\n1. Install the Muse client package with pip:\n ```shell\n pip3 install muse4ever\n ```\n2. Configure the server address by setting the `MUSE_SERVER_ADDRESS` environment variable (default: `http://127.0.0.1:10813/`):\n ```shell\n export MUSE_SERVER_ADDRESS=<your_server_address>\n ```\n\n## \u2699\ufe0f Configuring the Server\n\n1. Start the MongoDB service:\n ```shell\n sudo systemctl start mongod\n ```\n2. Initiate the Muse server (modify `MUSE_SERVER_HOST` and `MUSE_SERVER_PORT` as needed):\n ```shell\n export MUSE_SERVER_HOST=<host>\n export MUSE_SERVER_PORT=<port>\n muse-server\n ```\n3. Start the Muse scheduler to manage job queues:\n ```shell\n muse-scheduler\n ```\n4. Ensure that your Android devices are connected and recognized by ADB:\n ```shell\n adb devices\n ```\n\n## \ud83e\uddd1\u200d\ud83d\udcbb How to Use Muse\n\n### Listing Connected Devices\n```shell\nmuse devices\n```\n\nSample output:\n\n```\n1 device(s) active\n---------------------\n10ADBG0DS2001R3\n Model: V2309A\n Battery Level: 100%\n Screen Status: off\n```\n\n### Executing Commands\n```shell\nmuse run --dev <device_id> --cmd <command> [--in <input_files>] [--out <output_files>]\n```\n\n#### Example Usage 1\n```shell\nmuse run --dev 10ADBG0DS2001R3 --cmd 'cat /proc/cpuinfo'\n```\nOutput:\n```\nprocessor : 0\nBogoMIPS : 26.00\nFeatures : fp asimd evtstrm aes pmull sha1 sha2 crc32 ...\nCPU implementer : 0x41\nCPU architecture: 8\n...\n```\n\n#### Example Usage 2\n```shell\necho \"seq 1 10\" > 1.txt\nmuse run --dev 10ADBG0DS2001R3 --cmd 'tac 1.txt > 2.txt' --in 1.txt --out 2.txt\ncat 2.txt\n```\nOutput:\n```\n10\n9\n8\n7\n6\n5\n4\n3\n2\n1\n```\n\n## \ud83d\udccb Notes\n1. When specifying input and output files, use relative paths. For instance, if you run `muse run` with the input file `./123/456.txt`, it will be transferred to the device as `/data/local/tmp/muse/123/456.txt`.\n2. Muse executes ADB commands under the hood; it doesn't provide environment isolation or resource constraints.\n3. The Muse client communicates with the server using the HTTP protocol.\n4. Developed by exzhawk, the name \"muse4ever\" is inspired by the \"Love Live!\" idol group \u03bc's and was chosen as 'muse' was already taken in pip \ud83c\udfb6\ud83c\udfb6\ud83c\udfb6\n\n\n## Licensing\nMuse is made available under the [MIT License](LICENSE).",
"bugtrack_url": null,
"license": "",
"summary": "An ADB-powered framework for efficient Android command execution, device management, and job scheduling for developers and testers",
"version": "0.17.0",
"project_urls": {
"Homepage": "https://github.com/liuyibo/muse",
"Issues": "https://github.com/liuyibo/muse/issues"
},
"split_keywords": [
"adb",
"android",
"command-execution",
"development-tools",
"device-interaction",
"device-management",
"server-client"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7e3aa0fd8834b6a44dddb3d181ec8e3c55b6b55bc3e05f0039690d44f2448fcf",
"md5": "c467cec33b6681c6c3b423649481eaf7",
"sha256": "db47bc12829efa0891a7b15dadb5cdc15720a732cc8c480812c77566389fc50f"
},
"downloads": -1,
"filename": "muse4ever-0.17.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c467cec33b6681c6c3b423649481eaf7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 14245,
"upload_time": "2024-02-15T08:48:26",
"upload_time_iso_8601": "2024-02-15T08:48:26.088106Z",
"url": "https://files.pythonhosted.org/packages/7e/3a/a0fd8834b6a44dddb3d181ec8e3c55b6b55bc3e05f0039690d44f2448fcf/muse4ever-0.17.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a4d9e5668886337bf323e2e1f61d1e680c026d2b2637f6d42bd4c3a16b992523",
"md5": "b41e583c3589169aa9aa0ee3459d7a41",
"sha256": "5e82c3554425b5b98e0ce3071fceece11d449dacb0a0d43ae55fc6c114e790b1"
},
"downloads": -1,
"filename": "muse4ever-0.17.0.tar.gz",
"has_sig": false,
"md5_digest": "b41e583c3589169aa9aa0ee3459d7a41",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 11976,
"upload_time": "2024-02-15T08:48:27",
"upload_time_iso_8601": "2024-02-15T08:48:27.621869Z",
"url": "https://files.pythonhosted.org/packages/a4/d9/e5668886337bf323e2e1f61d1e680c026d2b2637f6d42bd4c3a16b992523/muse4ever-0.17.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-15 08:48:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "liuyibo",
"github_project": "muse",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "muse4ever"
}