資源簡介
因為一直在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密碼破解器
- 下一篇:應用密碼學 應用密碼學
評論
共有 條評論