资源简介
因为一直在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密码破解器
- 下一篇:应用密码学 应用密码学
相关资源
- Windows网络编程第二版源码(补充材料
- Windows xp sp3 repair文件夹
- Fping4.2_Windows.zip
- Microsoft.Exchange.Server.2013.PowerShell.Cook
- windows平台下的HDFS文件浏览器
- 秋无痕一键优化WindowsServer2008(64位)
- Image Mastering API 2 for Windows xp Vista W
- unity接科大讯飞在线语音合成Windows
- 编译好的Windows版Ngrok服务器端
- PDFlib-6.0.2-Windows
- hyperledger-fabric-ca-windows-amd64-1.1.0.tar.
- LEX和YACC在Windows下的环境安装,即fl
- windows开机动画钢铁侠核反应堆
- NFS between VxWorks and Windows XP
- BCD943602CS网卡+蓝牙 Windows驱动
- letsencrypt-win-simple.V1.9.4.1
- Windows95系统程序设计大奥秘(简体中
- doxygen源码Windows编译
- Qt5多功能计算器
- Windows DLL注入
- CrystalDecisions.Windows.Forms
- ALTRun v1.51.zip
- windows xp client TO vxworks FTP server
- Windows内核安全与驱动开发(随书光盘
- ocilib-4.3.3-windows.zip
- win7 Windows DNS服务器搭建 可创建域名
- GitLab在windows用户端的安装使用详细教
- windows2000设备驱动程序设计指南配套光
- Jenkins项目自动化构建详细搭建、配置
- pstool 工具
评论
共有 条评论