Skip to content

sothx/react-native-shell-tools

react-native-shell-tools

Library For Android Device Shell Tools

Installation

npm install react-native-shell-tools

Usage

import { execCommand, execAsyncCommand } from 'react-native-shell-tools';

// 
  // 异步用法
  execAsyncCommand(`cat /sys/class/qcom-battery/soh`)
    .then((res) => {
      console.log('execAsyncCommand', res);
    })
    .catch((err) => {
      console.log(err, 'execAsyncCommandErr');
    });
    // 同步用法
    const batteryRes = execCommand(`cat /sys/class/qcom-battery/soh`)
    console.log(batteryRes)

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

About

React Native Library For Android Device Shell Tools

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published