This (C# .NET 4.6|4.7|4.8) dll is a kind of ADB/Fastboot/(apk/zip) Signer - Framework, it provides a lot of predefined .NET functions to communicate with an Android device. It's designed to work in 1st case with any non-root device but you can also use it with any rooted device (A few functions requires root access).
License
This project is licensed under the Apache License Version 2.0.
The latest build 7.1.46.0 is currently only via FTP, GoogleDrive or Dropbox available, the DevDB has currently some upload issues!
The following (N)amespaces, (C)lasses & (I)nterfaces are currently available:
Special
Hint
Referenced .NET assembly's
System
System.Numerics
System.XML
Used Code-analysis rules:
Basic & Advanced Microsoft-Rules for Accuracy
Microsoft-managed minimum & recommended rules
Microsoft Security Rules
About the usage, the namespaces (ADB, Fastboot, Signer) have one basic instance. For example, ADB.Instance(), Fastboot.Instance(), Signer.Instance. As you can see ADB.Instance() and Fastboot.Instance() can have a parameter. This parameter is in both cases an (string) DeviceID, an IDeviceInfo or null, if you use for example null, both classes will return it's Selected client. If you use the DeviceID or the IDeviceInfo the return is a fresh instance of the client or the already created instance. So, in any case, before you call ADB/Fastboot.Instance(). Check with ADB/Fastboot.Devices() if you have a connected device. If so, use the IDeviceInfo object to start your device instance or simply pass the serial to the Instance(). All instances which you have created on this way, will be hold inside an Dictionary<string, ADBClient>, so you can configure each device instance to it's needs and call it when ever you need it. This is also the point where i say it's multi-device and multi-thread safe. Because, if you always use ADB/Fastboot.Instance() you can't reach the wrong device. Also, all classes using lock() for critical sections, because [MethodImpl(MethodImplOptions.Synchronized)] is not longer available under .NET Standard.
If you have any wishes like new features, how-to's or something else, let me know! :cyclops:
Tested OS
Win Vista | 7 | 8 | 8.1 | 10 (32Bit/64Bit in VM-Ware)
Win 7 | 8 | 8.1 | 10 (64Bit Native)
Win XP is not longer supported by ADB! (But, if you have a old ADB binary, the dll will do it's job)
Tested Devices
Android Emulator some Versions (min. 2.x) in AVD
Android x86
HTC Sensation -/ XE (non-/rooted)
HTC One M9 (non-/rooted)
Huawei P9 Lite (VNS-L21,22,23,31,etc.) (non-/rooted)
Huawei P10 Lite (WAS-LX1A,etc.) (non-/rooted)
Samsung Galaxy 2-5 (non-/rooted)
Samsung Galaxy S Plus (non-rooted)
A few Samsung Tabs (non-/rooted)
Google Pixel 4 (Android 11) (non-/rooted)
Requirements
Android: min. 2.x
Platform: x86/x64 (Windows)
Frameworks: min. .NET 4.6 and JRE (only for the Signer)
(Installed ADB/Fastboot device driver)
Download
Mirror: XDA-DevDB (since 29.01.2019 no uploads possible)
Mirror #1: My FTP (Build archiv)
Mirror #2: GoogleDrive
Mirror #3: Dropbox
Each zip-archiv contains the AndroidCtrl.dll, its markup file AndroidCtrl.xml and the program debug database AndroidCtrl.pdb for .NET 4.6|4.7|4.8 and .NET Standard 2.1 (beta)
Examples (Updated to dll version 7.1.46.0) (Updated in the next 24 h)
Mirror: My FTP
Mirror #1: GoogleDrive
Mirror #2: Dropbox
(Contains a simple exe and its source written in C# WPF)
Source
N/A (If you want to have a look at it, send me a PM or simply decompile it.)
DO NOT MIRROR MY FILES! DO NOT COPY MY THREADS!
XDA:DevDB Information
AndroidCtrl.dll, Tool/Utility for the Android General
Contributors
k1ll3r8e, squabbi, Krystanos
Version Information
Status: Stable
Current Stable Version: 7.1.46.0
Stable Release Date: 2020-09-19
Created 2016-07-24
Last Updated 2020-09-19
License
This project is licensed under the Apache License Version 2.0.
The latest build 7.1.46.0 is currently only via FTP, GoogleDrive or Dropbox available, the DevDB has currently some upload issues!
The following (N)amespaces, (C)lasses & (I)nterfaces are currently available:
- (N) ADB
- (N) Binary (This is the binary/exe implementation of ADB)
- (C) ADB (static Management Class for the ADBClient's)
- (C) ADBClient (Implementation of IADBClient)
- (C) Channel (Implementation of IChannel)
- (N) Device
- (N) BusyBox
- (C) BusyBox
- (C) Find
- (C) Tar
- (N) Dumpsys
- (C) Battery
- (C) Dumpsys
- (I) IBattery
- (N) Input
- (I) IKeyEvent
- (C) Input
- (C) InputExtensions
- (C) KeyEvent (Implementation of IKeyEvent)
- (N) IO
- (NS) Compression
- (NS) BrotliSharp (Only available in .NET 4.6|4.7|4.8 - In .NET Standard >= 2.1 you have to use the native .NET implementation)
- (C) ADirectoryInfo (Similar to .NET Directory/-Info)
- (C) AFileInfo (Similar to .NET File/-Info)
- (C) AFileStream (Similar to .NET FileStream)
- (C) AFileSystemInfo (Similar to .NET FileSystemInfo, it's the abstract base for ADirectoryInfo & AFileInfo)
- (C) AMountPointInfo (Similar to ADirectoryInfo & AFileInfo but only for mounts)
- (C) FileSystemCache (A cache object for ADirectoryInfo & AFileInfo)
- (I) IFileSystemCache (Interface for FileSystemCache)
- (C) IO
- (I) ITransferMessage
- (C) MediaScanner (Manage the Android MediaScanner, useful after some file-transfers via ADB)
- (C) Mount (Requires Root and manage the mounts)
- (C) Stat (stat class for the ADB-Protocol)
- (C) SyncStream (Base implementation of the ADB sync service. Utilized by AFileStream)
- (C) TransferMessage
- (C) UPath (Similar to .Net Path but for unix paths)
- (NS) Compression
- (N) Logcat
- (I) ILogEntry
- (C) Logcat
- (C) LogEntry
- (N) Manager
- (C) ActivityManager
- (I) IInstrumentation
- (C) Instrumentation
- (I) IPackage
- (I) IPermission
- (C) Manager
- (C) Package
- (C) PackageManager
- (C) Permission
- (N) Provider
- (C) Contacts (Contacts provider)
- (C) ContactsDataField
- (C) ContactsEmail
- (C) ContactsEvent
- (C) ContactsGroup
- (C) ContactsIdentity
- (C) ContactsIM
- (C) ContactsName
- (C) ContactsNickname
- (C) ContactsNote
- (C) ContactsOrganization
- (C) ContactsPhone
- (C) ContactsPhoto
- (C) ContactsPostalAddress
- (C) ContactsRelation
- (C) ContactsSipAddress
- (C) ContactsWebsite
- (I) IContactsDataField
- (C) Provider
- (C) Telephony (Telephony provider)
- (N) Screen
- (C) Framebuffer (Implementation of IFramebuffer)
- (C) FramebufferInfo
- (I) IFramebuffer (Interface of an RAW framebuffer)
- (I) IFramebufferInfo
- (I) IScreenDimension
- (I) IScreenFocus
- (C) Screen
- (C) ScreenDimension
- (C) ScreenFocus
- (N) Shell
- (I) IShell (Interface of an shell with in-/output abilities)
- (C) Shell (Implementation of IShell)
- (N) SQLite
- (C) Options
- (C) QueryTools
- (C) SQLite3 (SQLite3 database connector)
- (C) BuildProperties
- (C) Daemon (Manage the daemon on the device)
- (C) Device
- (C) Forensics (ALFA-State)
- (I) IUptime
- (C) OpenRecoveryScript (Manage the OpenRecoveryScript)
- (C) Phone (Start a call, dial a number, add a contact or send a sms)
- (C) Su
- (C) Uptime
- (C) Wipe
- (N) BusyBox
- (N) Shares
- (C) Monitor (Implementation of IMonitor)
- (N) Socket (This is the IP based implementation of ADB - Here is NO binary/exe required)
- (C) ADB (static Management Class for the ADBClient's)
- (C) ADBClient (Implementation of IADBClient)
- (C) ADBSocket (IP based connector - Mimics the ADB-Server)
- (C) Channel (Implementation of IChannel)
- (C) ADBridge (Unified access to Binary.ADB and Socket.ADB)
- (I) IADBClient (Interface for nearly all ADB commands)
- (I) IChannel (Interface of an RAW data channel)
- (N) Binary (This is the binary/exe implementation of ADB)
- (N) Fastboot
- (C) Backdoor (Some backdoor commands)
- (C) Fastboot (static Management Class for the FastbootClient's)
- (C) FastbootClient (Includes nearly all fastboot.exe commands)
- (I) IFastbootClient (Interface for FastbootClient)
- (C) Monitor (Implementation of IMonitor)
- (C) OEM (Some OEM commands)
- (C) Wipe
- (N) ProcessModels
- (C) General (Includes some predefined process models)
- (I) IRealTimeBG (Interface of an background process with in-/output abilities)
- (C) RealTimeBGExeV2 (Implementation of IRealTimeBG)
- (N) Signer
- (C) Signer (signapk.jar Interface)
- (N) Tools
- (C) CRC
- (C) Deploy (Deploy the AAPT/ADB/Fastboot/Signer files needed by this dll)
- (C) Hash
- (C) Hex
- (C) IMEI (Some helper to verify and rebuild a valid IMEI)
- (C) ToolBox
- (C) Cleanup (Delete the files/folders which were created by this dll)
- (C) Config
- (C) DeviceInfo (Basic device info, the return from "(Binary/Socket).ADB.Devices()" and "Fastboot.Devices()")
- (I) IDeviceInfo (Interface for DeviceInfo)
- (I) IMonitor (Interface for the ADB.Binary, ADB.Socket and Fastboot.Fastboot monitor)
Special
- Ready-To-Go MVVM's for WPF, XAML via my AndroidCtrlUI.dll
- Multi-Device compatible, you can manage unlimited devices at the same time with this dll. Each device gets it's own instance. (Thread-Safe, the dll use lock() for critical sections)
- UTF8-File/Folder Transfer you can transfer files/folders with containing special chars (ü, ö, ä, €, @, à, è, etc.)
- On-the-fly Device to Device copy (Binary <-> Binary | Binary <-> Socket | Socket <-> Socket)
- Device-Monitor, if activated, it will check every 10 sec. ADB & Fastboot for new connected devices and call an defined callback, if something changed. So your program get's an info if an device is connected or removed.
- All Android key-events as (int)enum and the ability to send them as single or stack.
Hint
- You can use all ADB methods/commands via USB or W-Lan/Lan, if your Rom supports ADB via W-Lan/Lan (Settings/Developer Settings)
- If you want to use all sub-classes of IADBClient with BusyBox instead of the Shell, you have to set IADBClient.UseBusyBox to true. This will tell the instance to use the BusyBox commands inside each method, if the device has BusyBox installed.
Referenced .NET assembly's
System
System.Numerics
System.XML
Used Code-analysis rules:
Basic & Advanced Microsoft-Rules for Accuracy
Microsoft-managed minimum & recommended rules
Microsoft Security Rules
About the usage, the namespaces (ADB, Fastboot, Signer) have one basic instance. For example, ADB.Instance(), Fastboot.Instance(), Signer.Instance. As you can see ADB.Instance() and Fastboot.Instance() can have a parameter. This parameter is in both cases an (string) DeviceID, an IDeviceInfo or null, if you use for example null, both classes will return it's Selected client. If you use the DeviceID or the IDeviceInfo the return is a fresh instance of the client or the already created instance. So, in any case, before you call ADB/Fastboot.Instance(). Check with ADB/Fastboot.Devices() if you have a connected device. If so, use the IDeviceInfo object to start your device instance or simply pass the serial to the Instance(). All instances which you have created on this way, will be hold inside an Dictionary<string, ADBClient>, so you can configure each device instance to it's needs and call it when ever you need it. This is also the point where i say it's multi-device and multi-thread safe. Because, if you always use ADB/Fastboot.Instance() you can't reach the wrong device. Also, all classes using lock() for critical sections, because [MethodImpl(MethodImplOptions.Synchronized)] is not longer available under .NET Standard.
If you have any wishes like new features, how-to's or something else, let me know! :cyclops:
Tested OS
Win Vista | 7 | 8 | 8.1 | 10 (32Bit/64Bit in VM-Ware)
Win 7 | 8 | 8.1 | 10 (64Bit Native)
Win XP is not longer supported by ADB! (But, if you have a old ADB binary, the dll will do it's job)
Tested Devices
Android Emulator some Versions (min. 2.x) in AVD
Android x86
HTC Sensation -/ XE (non-/rooted)
HTC One M9 (non-/rooted)
Huawei P9 Lite (VNS-L21,22,23,31,etc.) (non-/rooted)
Huawei P10 Lite (WAS-LX1A,etc.) (non-/rooted)
Samsung Galaxy 2-5 (non-/rooted)
Samsung Galaxy S Plus (non-rooted)
A few Samsung Tabs (non-/rooted)
Google Pixel 4 (Android 11) (non-/rooted)
Requirements
Android: min. 2.x
Platform: x86/x64 (Windows)
Frameworks: min. .NET 4.6 and JRE (only for the Signer)
(Installed ADB/Fastboot device driver)
Download
Mirror: XDA-DevDB (since 29.01.2019 no uploads possible)
Mirror #1: My FTP (Build archiv)
Mirror #2: GoogleDrive
Mirror #3: Dropbox
Each zip-archiv contains the AndroidCtrl.dll, its markup file AndroidCtrl.xml and the program debug database AndroidCtrl.pdb for .NET 4.6|4.7|4.8 and .NET Standard 2.1 (beta)
Examples (Updated to dll version 7.1.46.0) (Updated in the next 24 h)
Mirror: My FTP
Mirror #1: GoogleDrive
Mirror #2: Dropbox
(Contains a simple exe and its source written in C# WPF)
Source
N/A (If you want to have a look at it, send me a PM or simply decompile it.)
DO NOT MIRROR MY FILES! DO NOT COPY MY THREADS!
XDA:DevDB Information
AndroidCtrl.dll, Tool/Utility for the Android General
Contributors
k1ll3r8e, squabbi, Krystanos
Version Information
Status: Stable
Current Stable Version: 7.1.46.0
Stable Release Date: 2020-09-19
Created 2016-07-24
Last Updated 2020-09-19
Last edited: