reference to : http://blog.csdn.net/wangkaiblog/article/details/46050587

本来以为存放在/systen/bin/下的monkey、input、am等adb shell命令都是二进制可执行程,偶尔cat input下,发现不是二进制文件,内容如下:

# Script to start "input" on the device, which has a very rudimentary
# shell.
#
base=/system
export CLASSPATH=$base/framework/input.jar
exec app_process $base/bin com.android.commands.input.Input $*

这段脚本的作用就是通过app_process工具启动放在/system/farmework/下的input.jar 文件。我查看了下framework文件夹里面的确有input.jar文件。

What is this app_process

Although not that popular “app_process” command is used heavily in Android, for example the well know “am” script is using it. Everybody knows how to start an application from adb shell:
am start -n yourpackagename/.activityname
However “am” is just a shell script and what stays in the base of the am script is our app_process binary:

root@android:/ # cat /system/bin/am
cat /system/bin/am
# Script to start "am" on the device, which has a very rudimentary
# shell.
base=/system
export CLASSPATH=$base/framework/am.jar
exec app_process $base/bin com.android.commands.am.Am "$@"
root@android:/ #

So app_process is the binary used to start java code. All the apps, instrumentations or installations are tarted using this.

Lets see the official usage output:

root@android:/ # app_process
Usage: app_process [java-options] cmd-dir start-class-name [options]
Not quite complete as usual :)

转载于:https://www.cnblogs.com/0616--ataozhijia/p/4993148.html

[Android Pro] app_process command in Android相关推荐

  1. [Android Pro] 告别编译运行 ---- Android Studio 2.0 Preview发布Instant Run功能

    reference to : http://www.cnblogs.com/soaringEveryday/p/4991563.html 以往的Android开发有一个头疼的且拖慢速度的问题,就是你每 ...

  2. [Android Pro] 有关Broadcast作为内部类时注册的一些问题

    很经常Broadcast都会写成一个Activity或者Service的内部类.这时候的注册和普通有点小区别. 有两种情况 1.假如是再Manifest文件里面静态注册的话,需要注意. ex: < ...

  3. [Android Pro] 精确记录和恢复ListView滑动位置

    reference to : http://blog.csdn.net/welovesunflower/article/details/7926512 工作中遇到一个需求,对ListView某一项操作 ...

  4. [Android Pro] ScrollView使用fillViewport设置高度为MatchParent

    reference to : http://blog.csdn.net/u012975705/article/details/49275001 之前遇到一问题,就是当使用ScrollView时,Scr ...

  5. [Android Pro] 完美解决隐藏Listview和RecyclerView去掉滚动条和滑动到边界阴影的方案...

    reference to : http://blog.csdn.net/ming2316780/article/details/51578621 一.首先是Listview的属性设置 设置滑动到顶部和 ...

  6. [Android Pro] 终极组件化框架项目方案详解

    cp from : https://blog.csdn.net/pochenpiji159/article/details/78660844 前言 本文所讲的组件化案例是基于自己开源的组件化框架项目 ...

  7. [Android Pro] listView和GridView的item设置的高度和宽度不起作用

    referece to : http://blog.csdn.net/beibeixiao/article/details/9032569 1.     在Android开发中会发现,有时listVi ...

  8. [Android Pro] 判断Uri对应的ContentProvider所操作的数据库u存在,及DownloadManager的暂停,继续...

    reference to : http://blog.csdn.net/u012858313/article/details/38821857 项目中遇到一个问题,就是用到DownloadManage ...

  9. [Android Pro] java.lang.IllegalStateException: Fragment(XXFragment) not attached to Activity异常

    [Android Pro] java.lang.IllegalStateException: Fragment(XXFragment) not attached to Activity异常 参考文章: ...

最新文章

  1. 更换ip软件安卓_2019十大手机读书软件排行榜
  2. python 排名函数_一个危险的Python函数,不推荐使用
  3. 阮一峰es6电子书_ES6理解进阶【大前端高薪训练营】
  4. delphi的几个特别关键字 object absolute
  5. linux 的date命令详解,linux之date命令详解
  6. 如何在android studio中设置sdk path?
  7. 学习一门编程语言的基本步骤
  8. 堆排序c语言6,C语言:十种排序(七) - 堆排序
  9. 何恺明“终结”ImageNet预训练时代:从0开始训练神经网络,效果比肩COCO冠军
  10. 超微 X9DRL-iF 服务器主板简介 BIOS相关图解
  11. namp和nc扫描方式
  12. 总结的iOS、mac开源项目及库,持续更新。。。。 github排名 https://github.com/trending,github搜索:https://github.com/search
  13. Gateway过滤器详解
  14. 用html做七巧板的方法,纯CSS3打造七巧板
  15. html图片旋转3种方式—— CSS3 transform
  16. WebRTC源码中turnserver的使用方法
  17. 如何在pycharm中安装PIL模块
  18. 【Latex】Texstudio英文拼写错误检查功能出问题的解决方法
  19. 港府拟申拨175亿港元进行西九文化区综合地库余下工程
  20. 射频模块(SX1278)

热门文章

  1. VS2012:出现devenv.sln解决方案保存对话框
  2. foreach语句使用总结
  3. 堪比“震网”:罗克韦尔PLC严重漏洞可导致攻击者在系统中植入恶意代码
  4. 每日codewars题之判断一个数是否是水仙花数
  5. 【原/转】UITableview性能优化总结
  6. 使用 PowerShell 自动化 CloudServices 发布
  7. [转]sqlserver 创建分区表
  8. tcpip数据包编码解析(chunk and gzip)_space of Jialy_百度空间
  9. 不使用资源文件动态创建对话框的做法
  10. JavaScript-4函数