# CmdServer
**Repository Path**: drawfeel/CmdServer
## Basic Information
- **Project Name**: CmdServer
- **Description**: APK通过socket或者AIDL连接到native进程CmdServer,让APK的输入框能运行shell命令。
该native进程配置足够的selinux权限,通过调用system()或者popen()实现shell命令,并把结果通过socket或者AIDL带回。
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2023-06-27
- **Last Updated**: 2025-01-06
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# cmdserver for demo application
## 1, What is the repository used for
This repository is used for managing demo application, urrently on SA8295p ADP AIR. This repository is comprised of a native service, a JAVA application and its AIDL for interaction. The native service can execute commands sent from APP via ADIL, including a tinyplayer. The JAVA application have a snappy UI for sending command to native service.
## 2, How to build this repository
In android root directory:
```
source build/envsetup.sh
lunch msmnile_gvmq-userdebug
mkdir vendor/bbb
cd vendor/bbb
git clone https://gitee.com/drawfeel/CmdServer.git
cd -
mmm vendor/bbb/CmdServer
```
## 3, How to use
copy the artifacts:
__out/target/product/msmnile_gvmq/system/bin/*__
to ADP AIR file systems:
```
adb root
adb disable-verity
adb reboot
adb root
adb remount
adb push eth_config /system/bin
adb push bosecmd /system/bin
```
Then run commands below in adb shell to run the native service:
```
adb root
adb shell setenforce 0
adb shell eth_config
adb shell bosecmd
```
Then copy the artifacts:
__out/target/product/msmnile_gvmq/system/app/BoseCmdClient/BoseCmdClient.apk__
install to ADP AIR:
```
adb install -r BoseCmdClient.apk
```
Then run the apk through scrcpy.