资源简介
因为一直在windows 上开发,用的vs2012。所以还是希望把adb 的代码拿出来生成一个vs的工程,这样就可以用vs 来调试adb了

代码片段和文件信息
/*
* Copyright (C) 2007 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.
*/
#define TRACE_TAG TRACE_ADB
#include
#include
#include
#include
#include
#include
#include
#include
//#include
#include
#include “sysdeps.h“
#include “adb.h“
#include “adb_auth.h“
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
#if !ADB_HOST
#include
#include
#include
#include
#include
#include
#include
#else
#include “usb_vendors.h“
#endif
#if ADB_TRACE
ADB_MUTEX_DEFINE( D_lock );
#endif
int HOST = 0;
int gListenAll = 0;
static int auth_enabled = 0;
#if !ADB_HOST
static const char *adb_device_banner = “device“;
static const char *root_seclabel = NULL;
#endif
void fatal(const char *fmt ...)
{
va_list ap;
va_start(ap fmt);
fprintf(stderr “error: “);
vfprintf(stderr fmt ap);
fprintf(stderr “\n“);
va_end(ap);
exit(-1);
}
void fatal_errno(const char *fmt ...)
{
va_list ap;
va_start(ap fmt);
fprintf(stderr “error: %s: “ strerror(errno));
vfprintf(stderr fmt ap);
fprintf(stderr “\n“);
va_end(ap);
exit(-1);
}
int adb_trace_mask;
/* read a comma/space/colum/semi-column separated list of tags
* from the ADB_TRACE environment variable and build the trace
* mask from it. note that ‘1‘ and ‘all‘ are special cases to
* enable all tracing
*/
void adb_trace_init(void)
{
const char* p = getenv(“ADB_TRACE“);
const char* q;
static const struct {
const char* tag;
int flag;
} tags[] = {
{ “1“ 0 }
{ “all“ 0 }
{ “adb“ TRACE_ADB }
{ “sockets“ TRACE_SOCKETS }
{ “packets“ TRACE_PACKETS }
{ “rwx“ TRACE_RWX }
{ “usb“ TRACE_USB }
{ “sync“ TRACE_SYNC }
{ “sysdeps“ TRACE_SYSDEPS }
{ “transport“ TRACE_TRANSPORT }
{ “jdwp“ TRACE_JDWP }
{ “services“ TRACE_SERVICES }
{ “auth“ TRACE_AUTH }
{ NULL 0 }
};
if (p == NULL)
return;
/* use a comma/column/semi-colum/space separated list */
while (*p) {
int len tagn;
q = strpbrk(p “ :;“);
if (q == NULL) {
q = p + strlen(p);
}
len =
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-09-28 14:45 adb\
目录 0 2015-09-28 14:45 adb\adb\
文件 876 2015-09-24 17:31 adb\adb.sln
文件 56320 2015-09-28 14:44 adb\adb.v11.suo
文件 50179 2015-09-28 13:47 adb\adb\adb.cpp
文件 12131 2015-09-28 11:33 adb\adb\adb.h
文件 6314 2015-09-28 14:31 adb\adb\adb.vcxproj
文件 3863 2015-09-28 14:00 adb\adb\adb.vcxproj.filters
文件 376 2015-09-28 14:28 adb\adb\adb.vcxproj.user
文件 29507 2012-07-16 16:36 adb\adb\adb_api.h
文件 1897 2014-11-17 03:11 adb\adb\adb_auth.h
文件 9568 2015-09-28 13:58 adb\adb\adb_auth_host.cpp
文件 8598 2015-09-28 13:46 adb\adb\adb_client.cpp
文件 1694 2014-11-17 03:11 adb\adb\adb_client.h
文件 5623 2015-09-28 14:22 adb\adb\adb_trace.h
文件 3634 2012-07-16 16:42 adb\adb\Android.mk
文件 6522 2015-09-28 13:45 adb\adb\centraldir.cpp
文件 63572 2015-09-28 13:42 adb\adb\commandline.cpp
文件 1009 2014-11-17 03:11 adb\adb\console.cpp
文件 2184 2012-07-16 16:42 adb\adb\fdevent.h
文件 26469 2015-09-28 13:52 adb\adb\file_sync_client.cpp
文件 2458 2014-11-17 03:11 adb\adb\file_sync_service.h
文件 962 2014-11-17 03:11 adb\adb\get_my_path_windows.cpp
目录 0 2014-01-26 14:40 adb\adb\include\
文件 29507 2013-03-26 15:59 adb\adb\include\adb_api.h
文件 704 2013-09-03 14:23 adb\adb\include\common.h
目录 0 2014-01-26 14:40 adb\adb\include\cutils\
文件 3633 2013-07-31 02:57 adb\adb\include\cutils\abort_socket.h
文件 1041 2013-07-31 02:57 adb\adb\include\cutils\android_reboot.h
文件 1854 2013-07-31 02:57 adb\adb\include\cutils\array.h
文件 1121 2013-07-31 02:57 adb\adb\include\cutils\ashmem.h
............此处省略158个文件信息
- 上一篇:zip、rar密码破解器
- 下一篇:应用密码学 应用密码学
相关资源
- AE开发Windows最短路径分析
-
Windows em
bedded Compact 2013 应用开发调 - 黑苹果硬件兼容检测和查询软件
- Uninstall_Cortana_WINCLIENT.CN.rar
- VMware65_SLP_DeLLSLIC2.1
- Windows异步套接字网络编程
- WINDOWS98启动盘镜像Win98.IMA
- 仿windows记事本
- windows7用的,非常漂亮的透明计时器
- windows下制作macOS安装U盘,绝对简单好
- keil vcom windows 7 64bit 驱动
- windows ce 系统的GPIO驱动程序
- TCP 发包工具(windows)
- 微软的可以删除系统卸不干净的软件
- windows下生成MD5值的工具(WinMD5)
- windows cygwin ns2安装步骤
- WinAPI 函数库(大全)
- 解决在Windows XP SP2下不能显示验证码的
- 加快Windows XP操作系统开机速度
- Windows 1.0 软盘镜像
- Windows下访问LINUX的利器-SSH
- ChilledWindows.exe(玩笑病毒)
- NDK-R12B windows-x86_64百度云盘
- windows3.2简体中文版,虚拟机文件
- Windows 3.0 安装软盘(3.5 720k)
- WINDOWS内核安全编程 寒江独钓 光盘源
- 寒江独钓-Windows内核安全编程(完整版
- 实现Windows与Linux两系统间自由切换
- 如何删除Linux系统后找回Windows的启动
- 飞康NSS、CDP力保Windows Server 2008数据迁
评论
共有 条评论