AdbShellCommand:在Android项目中执行adb Shell命令,通过java代码调用执行,采用MVP架构演示样例

上传者: 42165973 | 上传时间: 2022-06-14 13:54:28 | 文件大小: 101KB | 文件类型: ZIP
##AdbShellCommand 在Android项目中执行adb Shell命令,通过java代码调用执行,本程序采用MVP架构。 ###Java中执行adb shell命令 本项目中,adb shell命令执行的实现方法主要参考网文()。 文章中,把执行代码集成在ShellUtils工具类中,执行结果返回CommandResult这个类。ShellUtils与CommandResult这两个类的说明可查看。 在java中直接调用ShellUtils的静态方法即可,但涉及到输入输出流的操作,最好是在工作线程中调用,否则会阻塞UI界面。 //执行adb命令, //参数中strCommand为adb命令,第一个布尔值为执行该代码是否需要root,第二个布尔值是否需要返回结果 CommandResult result= ShellUtils.execCommand(strComm

文件下载

资源详情

[{"title":"( 41 个子文件 101KB ) AdbShellCommand:在Android项目中执行adb Shell命令,通过java代码调用执行,采用MVP架构演示样例","children":[{"title":"AdbShellCommand-master","children":[{"title":"AdbShellCommand","children":[{"title":".gitignore <span style='color:#111;'> 415B </span>","children":null,"spread":false},{"title":"app","children":[{"title":".gitignore <span style='color:#111;'> 324B </span>","children":null,"spread":false},{"title":"build.gradle <span style='color:#111;'> 586B </span>","children":null,"spread":false},{"title":"src","children":[{"title":"main","children":[{"title":"AndroidManifest.xml <span style='color:#111;'> 687B </span>","children":null,"spread":false},{"title":"res","children":[{"title":"mipmap-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 4.73KB </span>","children":null,"spread":false}],"spread":true},{"title":"mipmap-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 2.15KB </span>","children":null,"spread":false}],"spread":true},{"title":"layout","children":[{"title":"activity_main.xml <span style='color:#111;'> 1.43KB </span>","children":null,"spread":false}],"spread":true},{"title":"values-w820dp","children":[{"title":"dimens.xml <span style='color:#111;'> 358B </span>","children":null,"spread":false}],"spread":true},{"title":"mipmap-xxhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 7.54KB </span>","children":null,"spread":false}],"spread":false},{"title":"mipmap-hdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 3.34KB </span>","children":null,"spread":false}],"spread":false},{"title":"values","children":[{"title":"strings.xml <span style='color:#111;'> 78B </span>","children":null,"spread":false},{"title":"dimens.xml <span style='color:#111;'> 211B </span>","children":null,"spread":false},{"title":"styles.xml <span style='color:#111;'> 194B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"z","children":[{"title":"adbshellcommand","children":[{"title":"MainActivity.java <span style='color:#111;'> 1.93KB </span>","children":null,"spread":false},{"title":"view","children":[{"title":"IMainView.java <span style='color:#111;'> 521B </span>","children":null,"spread":false}],"spread":false},{"title":"IOnRunCommandFinishListener.java <span style='color:#111;'> 388B </span>","children":null,"spread":false},{"title":"util","children":[{"title":"CommandResult.java <span style='color:#111;'> 883B </span>","children":null,"spread":false},{"title":"ShellUtils.java <span style='color:#111;'> 5.84KB </span>","children":null,"spread":false}],"spread":false},{"title":"service","children":[{"title":"IMainService.java <span style='color:#111;'> 434B </span>","children":null,"spread":false},{"title":"MainServiceImpl.java <span style='color:#111;'> 1.51KB </span>","children":null,"spread":false}],"spread":false},{"title":"presenter","children":[{"title":"MainPresenterImpl.java <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"IMainPresenter.java <span style='color:#111;'> 247B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"proguard-rules.pro <span style='color:#111;'> 659B </span>","children":null,"spread":false},{"title":"app.iml <span style='color:#111;'> 7.18KB </span>","children":null,"spread":false}],"spread":true},{"title":"settings.gradle <span style='color:#111;'> 15B </span>","children":null,"spread":false},{"title":"build.gradle <span style='color:#111;'> 436B </span>","children":null,"spread":false},{"title":"gradlew <span style='color:#111;'> 4.96KB </span>","children":null,"spread":false},{"title":"gradlew.bat <span style='color:#111;'> 2.26KB </span>","children":null,"spread":false},{"title":"gradle.properties <span style='color:#111;'> 855B </span>","children":null,"spread":false},{"title":".idea","children":[{"title":"misc.xml <span style='color:#111;'> 972B </span>","children":null,"spread":false},{"title":"gradle.xml <span style='color:#111;'> 608B </span>","children":null,"spread":false},{"title":"vcs.xml <span style='color:#111;'> 183B </span>","children":null,"spread":false},{"title":"copyright","children":[{"title":"profiles_settings.xml <span style='color:#111;'> 74B </span>","children":null,"spread":false}],"spread":true},{"title":"compiler.xml <span style='color:#111;'> 686B </span>","children":null,"spread":false},{"title":".name <span style='color:#111;'> 15B </span>","children":null,"spread":false},{"title":"modules.xml <span style='color:#111;'> 367B </span>","children":null,"spread":false}],"spread":true},{"title":"AdbShellCommand.iml <span style='color:#111;'> 921B </span>","children":null,"spread":false},{"title":"gradle","children":[{"title":"wrapper","children":[{"title":"gradle-wrapper.properties <span style='color:#111;'> 232B </span>","children":null,"spread":false},{"title":"gradle-wrapper.jar <span style='color:#111;'> 48.73KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"README.md <span style='color:#111;'> 3.70KB </span>","children":null,"spread":false},{"title":"UML类图.png <span style='color:#111;'> 11.03KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明