资源简介
android 5.1源码root补丁
不需要SuperSU,使用android su
代码片段和文件信息
/*
* Main entry of app process.
*
* Starts the interpreted runtime then starts up the application.
*
*/
#define LOG_TAG “appproc“
#include
#include
#include
#include
#include
#include
#include
#include
#include // for AID_SYSTEM
#include
#include
#include
#include
namespace android {
void app_usage()
{
fprintf(stderr
“Usage: app_process [java-options] cmd-dir start-class-name [options]\n“);
}
class AppRuntime : public AndroidRuntime
{
public:
AppRuntime(char* argBlockStart const size_t argBlockLength)
: AndroidRuntime(argBlockStart argBlockLength)
mClass(NULL)
{
}
void setClassNameAndArgs(const String8& className int argc char * const *argv) {
mClassName = className;
for (int i = 0; i < argc; ++i) {
mArgs.add(String8(argv[i]));
}
}
virtual void onVmCreated(JNIEnv* env)
{
if (mClassName.isEmpty()) {
return; // Zygote. Nothing to do here.
}
/*
* This is a little awkward because the JNI FindClass call uses the
* class loader associated with the native method we‘re executing in.
* If called in onstarted (from RuntimeInit.finishInit because we‘re
* launching “am“ for example) FindClass would see that we‘re calling
* from a boot class‘ native method and so wouldn‘t look for the class
* we‘re trying to look up in CLASSPATH. Unfortunately it needs to
* because the “am“ classes are not boot classes.
*
* The easiest fix is to call FindClass here early on before we start
* executing boot class Java code and thereby deny ourselves access to
* non-boot classes.
*/
char* slashClassName = toSlashClassName(mClassName.string());
mClass = env->FindClass(slashClassName);
if (mClass == NULL) {
ALOGE(“ERROR: could not find class ‘%s‘\n“ mClassName.string());
}
free(slashClassName);
mClass = reinterpret_cast(env->NewGlobalRef(mClass));
}
virtual void onstarted()
{
sp proc = ProcessState::self();
ALOGV(“App process: starting thread pool.\n“);
proc->startThreadPool();
AndroidRuntime* ar = AndroidRuntime::getRuntime();
ar->callMain(mClassName mClass mArgs);
IPCThreadState::self()->stopProcess();
}
virtual void onZygoteInit()
{
// Re-enable tracing now that we‘re no longer in Zygote.
atrace_set_tracing_enabled(true);
sp proc = ProcessState::self();
ALOGV(“App process: starting thread pool.\n“);
proc->startThreadPool();
}
virtual vo
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-06-17 14:32 fr
目录 0 2017-06-17 14:32 fr
目录 0 2017-06-17 14:32 fr
目录 0 2017-06-17 14:32 fr
文件 21841 2017-06-17 14:32 fr
目录 0 2017-06-17 14:32 fr
目录 0 2017-06-18 02:59 fr
文件 10419 2017-06-17 14:32 fr
目录 0 2017-06-17 14:33 system\
目录 0 2017-06-17 14:33 system\core\
目录 0 2017-06-17 14:33 system\core\include\
目录 0 2017-06-17 14:33 system\core\include\private\
文件 13124 2017-06-17 14:33 system\core\include\private\android_filesystem_config.h
目录 0 2017-06-17 14:33 system\extras\
目录 0 2017-10-20 05:45 system\extras\su\
文件 4270 2017-06-17 14:33 system\extras\su\su.c
文件 52 2017-10-20 05:51 readme
- 上一篇:Jpcap资料与应用
- 下一篇:java反射工具类 ReflectionUtils
相关资源
- Android WebView实现视频全屏
- android仿QQ锁屏源码
- Android调用WPS
- android SQLite数据库的增删改
- android-support-v7-appcompat绿色版
- Android撒花效果
- android版简单贪吃蛇小游戏代码
- Android DropDownMenu下拉菜单
- android 二级城市选择
- Android 最简单的GPS获取源代码
- android的显示gif图片的demo
- Android开发之拍照功能实现
- Android小游戏源代码-沙漠狙击手源代码
- Android获取手机联系人信息
- android连连看游戏源代码加入8种关卡设
- eclipse 计算器 Android
- Android五种布局
- Android静默拍照
- Android使用OkHttp访问自签名证书的接口
- android底部凸起导航菜单
- Android程序Crash时的异常上传
- Android端websocket调用(含autobahn-0.5.0.
- Android检测用户心率应用源码
- Linux Audio for Android
- android下的猜数字游戏源码,详尽注释
- Android中实现WebView点击图片放大显示
- Android获取短信验证码倒计时按钮
- Centos7 环境下部署Jenkins 构建Android a
- 安卓文献android外文翻译(android中英文
- Android移动终端开发大作业2019
评论
共有 条评论