资源简介
压缩包内有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 < argc; 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个文件信息
- 上一篇:王松桂著:广义逆矩阵及其应用
- 下一篇:操作系统课程设计报告 分页存储管理系统
相关资源
- AsyncTask文件控制暂停和继续,在状态
- AutoCAD永久去教育版破解补丁
- 汉印A300 CPCL协议 android 热敏打印app(
-
基于ADO开发ob
jectARX数据库应用程序 -
tp-li
nk tl-pa201 电线网络适配器应用程 - labview大型应用程序开发流程与技巧
- 自定义VIewGroup实现仿淘宝商品详情页
- Genymotion-ARM-Translation_v1.1
- 通过 Microsoft Services for UNIX 将 UNIX 应用
- VMware-12密钥永久激活
- xenapp 7.6 xendesktop 7.6 企業版55永久用戶
- 佳能G2180清零软件中文永久版
- Linux下ColdFire片内SRAM的应用程序优化设
- VMware 12 专业版永久许可证密钥
- 撸大师死灰复燃SDK,可常驻后台运行
- 黑客大曝光:移动应用安全揭秘及防
- superCleanMaster仿360清理大师
- 应用程序无法正常启动0xc0150002
- 小公司出纳免费记账软件永久免费版
- 傻瓜进销存真正完美永久注册版
- 线段树应用程序
- 简易手机通讯录
- 网络设备管理软件whatsup8.0永久免费版
- 安卓期末项目--记账本app.zip
- 包租婆之房屋铺位物业租赁管理系统
- 中兴盒子不开启adb情况下抓取日志和
- 手机通讯录
- Origin永久免费licence
- usb扫描枪数据获取解析
-
两个Strings.xm
l的比较
评论
共有 条评论