资源简介
压缩包内有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个文件信息
- 上一篇:王松桂著:广义逆矩阵及其应用
- 下一篇:操作系统课程设计报告 分页存储管理系统
相关资源
- 飞翔的小鸟
- Linux应用程序开发指南
- halcon10永久破解
- 《ViewFlipper使用详解》对应源码
- 美萍瑜伽管理系统 瑜伽馆管理 免加密
- 美萍健身房管理软件 最新版 免加密狗
- GPS 应用程序设计
- 博客《自定义控件三部曲之绘图篇十
- 《详解Dialog——基础元素构建》源码
- 《 带checkbox的ListView实现二——自定义
- 对应源码---完整版
-
动态增加控件及动态添加指定xm
l的 - List控件使用---SimpleAdapter使用详解一
- json服务端和客户端
- listviewdemo
- 美萍美发管理系统 美容美发理发店管
- 自定义锁屏
- 安卓期末大作业-微论坛-模拟微博-无
- SAS.9.2多国语言版完美破解方法
- 微信小程序 小游戏跳一跳源码
- unity插件连接安卓蓝牙测试可用
- [安卓开源]安卓记账本毕业设计项目源
- 开发一个简单的hoops应用程序画矩形
- VisualSVN_VS2017永久破解版
- eclipse开发计算器app
- LabVIEW--完整的应用程序
- 仿途牛app应用网页版的代码
- 鳄鱼小顽皮
- 自己整理的所有的底部导航栏Tab切换
- QQ表情功能实现
评论
共有 条评论