Library For Android Device Shell Tools
npm install react-native-shell-toolsLibrary For Android Device Shell Tools
``sh`
npm install react-native-shell-tools
`js
import { execCommand, execAsyncCommand } from 'react-native-shell-tools';
//
// 异步用法
execAsyncCommand(cat /sys/class/qcom-battery/soh)cat /sys/class/qcom-battery/soh
.then((res) => {
console.log('execAsyncCommand', res);
})
.catch((err) => {
console.log(err, 'execAsyncCommandErr');
});
// 同步用法
const batteryRes = execCommand()``
console.log(batteryRes)
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
---
Made with create-react-native-library