many of you are probably familiar with @regaw_leinad's AndroidLib.
It is a really nicely coded, and easy-to-use .Net class library, which allows real easy communication with Android devices.
AndroidLib is a .NET assembly written in C# (C-Sharp) that easily handles communication between a connected Android device and your program.
# Visual Basic # C# # F# # Visual C++ # ASP.Net
And as I moved from .Net to Java (allows my projects and libs to become available to a wider audience), I don't have the privilege to use AndroidLib, which is a real bummer.
This is why I have started JDroidLib.
Edit (08.10.2017): JDroidLib is being replaced by JDroidLibv2!
For anyone coming across this thread; this version of JDroidLib, while still available, is considered obsolete and is being replaced by JDroidLibv2!
JDroidLib has undergone some major updates, with loads of kinks fixed, and features revamped.
See the lists below for more info. (Everything has changed, there).
Oh, and the code has a kind of easter egg
# Execute any type of ADB command from a single method. (This method always returns output, but you can execute the method, without grabbing it). # Execute any fastboot command frmo a single method. (Same returns as above.) # Install ADB/fastboot to either fixed, or custom location. (On MAC OS/Linux: Binaries are automatically chmod-ed!) # Pull entire build.prop from device to hard drive # Get single build properties (!!!) # Push build.prop back to device. # Reboot device (5-way/ADB + fastboot) # Get list of devices. (Returned as generic List<String>) # Get device information (Battery, SU, BusyBox, CPU - MORE COMING!) # Get device state # Start ADB server # Stop ADB server # Restart ADB server. # Much, much more. See JavaDocs for more!
There's a weird bug in the Battery department, where the loaded battery level is 0. Looking into it! Fixed.
Slight bug in reboot methods, device isn't rebooting. Fixed.
# Get phone/WiFi/BlueTooth/etc. information # And anything else that comes to mind!
/* * Copyright (C) 2013 Simon/Beatsleigher. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301 USA */
To get a copy of the source code, visit my GitHub
There will be no pre-compiled JARs. To get a JAR, you have to download and compile the source.
The IDE used is NetBeans 8.0 with JDK 7
To download NetBeans, visit http://netbeans.org
How to Use JDroidLib:
Thanks to @regaw_leinad for having the original idea!
Thanks to you, XDA, for taking the time and looking at my programs/libs. Much appreciated!
XDA Portal Story 04.12.2013
Newer XDA Portal Story 03.03.2014
Have fun with JDroidLib and don't forget to contribute your own code!