資源簡介
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??????????????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
評論
共有 條評論