資源簡介
壓縮包內有apk,demo源碼,以及NDK 安裝文檔,主要是教你如何在已經root過得手機上只通過一次獲取root權限,以后就再也不會彈出root授權框,主要思想是繞過superuser.apk的權限檢查

代碼片段和文件信息
/*
**
**?Copyright?2008?The?Android?Open?Source?Project
**
**?Licensed?under?the?Apache?License?Version?2.0?(the?“License“);?
**?you?may?not?use?this?file?except?in?compliance?with?the?License.?
**?You?may?obtain?a?copy?of?the?License?at?
**
**?????http://www.apache.org/licenses/LICENSE-2.0?
**
**?Unless?required?by?applicable?law?or?agreed?to?in?writing?software?
**?distributed?under?the?License?is?distributed?on?an?“AS?IS“?BASIS?
**?WITHOUT?WARRANTIES?OR?CONDITIONS?OF?ANY?KIND?either?express?or?implied.?
**?See?the?License?for?the?specific?language?governing?permissions?and?
**?limitations?under?the?License.
*/
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#define?DBPATH?“/data/data/koushikdutta.superuser/databases/superuser.sqlite“
static?int?g_puid;
static?void?printRow(int?argc?char**?argv?char**?azColName)
{
????????int?i;
????????for?(i?=?0;?i?????????{
????????????????printf(“%s:?%s\n“?azColName[i]?argv[i]);
????????}
}
typedef?struct?whitelistCallInfo?whitelistCallInfo;
struct?whitelistCallInfo
{
????????sqlite3*?db;
????????int?count;
};
static?int?whitelistCallback(void?*data?int?argc?char?**argv?char?**azColName)
{???????
????????whitelistCallInfo*?callInfo?=?(whitelistCallInfo*)data;
????????//?note?the?count
????????int?count?=?atoi(argv[2]);
????????callInfo->count?=?count;
????????//?remove?whitelist?entries?that?are?expired
????????if?(count?-?1?<=?0)
????????{
????????????????char?remove[1024];
????????????????sprintf(remove?“delete?from?whitelist?where?_id=‘%s‘;“?argv[0]);
????????????????sqlite3_exec(callInfo->db?remove?NULL?NULL?NULL);
????????????????return?0;
????????}
????????char?update[1024];
????????sprintf(update?“update?whitelist?set?count=%d?where?_id=‘%s‘;“?count?argv[0]);
????????sqlite3_exec(callInfo->db?update?NULL?NULL?NULL);
????????return?0;
}
static?int?checkWhitelist()
{
????????sqlite3?*db;
????????int?rc?=?sqlite3_open_v2(DBPATH?&db?SQLITE_OPEN_READWRITE?NULL);
????????if?(!rc)
????????{
????????????????char?*errorMessage;
????????????????char?query[1024];
????????????????sprintf(query?“select?*?from?whitelist?where?_id=%d?limit?1;“?g_puid);
????????????????struct?whitelistCallInfo?callInfo;
????????????????callInfo.count?=?0;
????????????????callInfo.db?=?db;
????????????????rc?=?sqlite3_exec(db?query?whitelistCallback?&callInfo?&errorMessage);
????????????????if?(rc?!=?SQLITE_OK)
????????????????{
????????????????????????sqlite3_close(db);
????????????????????????return?0;
????????????????}
????????????????sqlite3_close(db);
????????????????return?callInfo.count;
????????}
????????sqlite3_close(db);
????????return?0;
}
static?int?executionFailure(char?*context)
{
????????fprintf
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????475??2013-07-02?01:19??Android?project\hw\.classpath
?????文件????????838??2013-07-02?01:19??Android?project\hw\.project
?????文件????????177??2013-07-02?01:19??Android?project\hw\.settings\org.eclipse.jdt.core.prefs
?????文件????????868??2013-07-08?01:52??Android?project\hw\AndroidManifest.xm
?????文件????????868??2013-07-08?01:57??Android?project\hw\bin\AndroidManifest.xm
?????文件????????327??2013-07-06?14:03??Android?project\hw\bin\classes\com\zl\hw\BuildConfig.class
?????文件????????799??2013-07-06?14:03??Android?project\hw\bin\classes\com\zl\hw\MainActivity.class
?????文件????????313??2013-07-08?01:57??Android?project\hw\bin\classes\com\zl\hw\R$attr.class
?????文件????????434??2013-07-08?01:57??Android?project\hw\bin\classes\com\zl\hw\R$dimen.class
?????文件????????380??2013-07-08?01:57??Android?project\hw\bin\classes\com\zl\hw\R$drawable.class
?????文件????????366??2013-07-08?01:57??Android?project\hw\bin\classes\com\zl\hw\R$id.class
?????文件????????376??2013-07-08?01:57??Android?project\hw\bin\classes\com\zl\hw\R$layout.class
?????文件????????361??2013-07-08?01:57??Android?project\hw\bin\classes\com\zl\hw\R$menu.class
?????文件????????445??2013-07-08?01:57??Android?project\hw\bin\classes\com\zl\hw\R$string.class
?????文件????????404??2013-07-08?01:57??Android?project\hw\bin\classes\com\zl\hw\R$st
?????文件????????583??2013-07-08?01:57??Android?project\hw\bin\classes\com\zl\hw\R.class
?????文件?????553996??2013-07-08?01:57??Android?project\hw\bin\classes.dex
?????文件?????189231??2013-07-02?01:20??Android?project\hw\bin\dexedLibs\android-support-v4-83d8d8824461d0958dc86908bc809b50.jar
?????文件?????233736??2013-07-08?01:57??Android?project\hw\bin\hw.apk
?????文件????????120??2013-07-08?03:12??Android?project\hw\bin\jarlist.cache
?????文件???????5964??2013-07-02?01:19??Android?project\hw\bin\res\drawable-hdpi\ic_launcher.png
?????文件???????3112??2013-07-02?01:19??Android?project\hw\bin\res\drawable-mdpi\ic_launcher.png
?????文件???????9355??2013-07-02?01:19??Android?project\hw\bin\res\drawable-xhdpi\ic_launcher.png
?????文件??????17889??2013-07-02?01:19??Android?project\hw\bin\res\drawable-xxhdpi\ic_launcher.png
?????文件??????40773??2013-07-08?01:57??Android?project\hw\bin\resources.ap_
?????文件????????151??2013-07-06?14:03??Android?project\hw\gen\com\zl\hw\BuildConfig.java
?????文件???????2484??2013-07-08?01:57??Android?project\hw\gen\com\zl\hw\R.java
?????文件??????51394??2013-07-02?01:19??Android?project\hw\ic_launcher-web.png
?????文件?????484258??2013-07-02?01:19??Android?project\hw\libs\android-support-v4.jar
?????文件????????781??2013-07-02?01:19??Android?project\hw\proguard-project.txt
............此處省略460個文件信息
- 上一篇:王松桂著:廣義逆矩陣及其應用
- 下一篇:操作系統課程設計報告 分頁存儲管理系統
評論
共有 條評論