-
Configuring Ethernet 802.1x on Android
READ MORE →: Configuring Ethernet 802.1x on AndroidWhat is 802.1x? 802.1x is a network access control protocol that provides authentication for devices trying to connect to a LAN or WLAN. It’s commonly used in enterprise environments to secure Ethernet and Wi-Fi networks. The authentication is usually performed using RADIUS servers.…
-
Setup testing environment to test Android Ethernet 802.1x
READ MORE →: Setup testing environment to test Android Ethernet 802.1xSetting up a testing environment to test Android Ethernet 802.1x requires a combination of hardware and software configurations. Below are the steps to create and configure the environment: Hardware Requirements Software Requirements Overall connection diagram is shown below. Note: Here TPLink TL-SG2210 switch…
-
SSH server support in AOSP Android
READ MORE →: SSH server support in AOSP AndroidFollow the below steps to add SSH Server support in AOSP Android source code. Download the OpenSSH source code and replace it with existing source code inside external folder. Add below code in device make file (e.g. device.mk). Download ssh.rc file. Add below…
-
802.1x Authentication over Ethernet in AOSP Android
READ MORE →: 802.1x Authentication over Ethernet in AOSP AndroidIn today’s enterprise environments, secure wired network access is essential—especially in sectors like education, government, and large corporations. IEEE 802.1X, a port-based Network Access Control (PNAC) protocol, provides a robust mechanism for authenticating devices connected via Ethernet. However, native support for Ethernet 802.1X…
-
Display HTML String in Android TextView
READ MORE →: Display HTML String in Android TextView[code lang=”java”] String htmlString = "<h1>HTML String Title in TextView</h1>\n" + "<h3>HTML Paragraph:</h3>\n" + "<p>Display html string in android TextView. How to show HTMl string in android TextView. This html paragraph</p>\n" + "<h3>HTML Unordered List: </h3>\n" + "<ol>\n" + "\t<li>HTML List Item 1</li>…
-
Sign the OTA Package
READ MORE →: Sign the OTA Package[code lang=”text”] java -jar signapk.jar -w platform.x509.pem platform.pk8 myupdate.zip myupdate-signed.zip [/code] Note:- 1. -w flag to sign the whole zip file. 2. The sequence of the two key files: pem file goes first, then the pk8 file.
-
Adding a jar file from libs/ to Android.mk
READ MORE →: Adding a jar file from libs/ to Android.mk[code lang=”text”] LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := $(call all-subdir-java-files) LOCAL_PACKAGE_NAME := MDM LOCAL_STATIC_JAVA_LIBRARIES := libandroid-async-http libgcm libjson-simple LOCAL_JAVA_LIBRARIES += telephony-common mms-common LOCAL_CERTIFICATE := platform include $(BUILD_PACKAGE) include $(CLEAR_VARS) LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := libandroid-async-http:libs/android-async-http-1.4.4.jar libgcm:libs/gcm.jar libjson-simple:libs/json-simple-1.1.1.jar include $(BUILD_MULTI_PREBUILT) [/code]
-
Generate RLE file through FFMPEG
READ MORE →: Generate RLE file through FFMPEGFrom PNG file to RLE file [sourcecode language=”text”] ffmpeg -vcodec png -i logo.png -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgb32 initlogo.rle [/sourcecode] Replace format as per requirement. From RLE file to PNG file [code language=”text”] ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo…
-
Schedules the task to run asynchronously
READ MORE →: Schedules the task to run asynchronouslyThere are three ways to achieve this in Android. Through Worker thread [code lang=”java”] private static final ScheduledExecutorService worker = Executors.newSingleThreadScheduledExecutor(); void someMethod() { … Runnable task = new Runnable() { public void run() { /* Do something… */ } }; worker.schedule(task, 5,…
-
Android USB communication
READ MORE →: Android USB communicationPermissions:- Need to add following permissions in AndroidManifest.xml file. [code lang=”xml”] <intent-filter> <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" /> <intent-filter> <meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" android:resource="@xml/device_filter" /> [/code] Resources:- Need to make device_filter.xml file in resource(/xml/device_filter.xml). [code lang=”xml”] <?xml version="1.0" encoding="utf-8"?> <resources> <usb-device vendor-id="6002" product-id="0002"/> </resources> [/code] Source:- [code lang=”java”]…
-
Android get MAC and IP addresses
READ MORE →: Android get MAC and IP addressesPermissions:- Need to add following permissions in AndroidManifest.xml file. [code lang=”xml”] <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> [/code] Functions:- To get MAC and IP addresses following functions are needed as per requirement. [code lang=”java”] Utils.getMACAddress("wlan0"); Utils.getMACAddress("eth0"); Utils.getIPAddress(true); // IPv4 Utils.getIPAddress(false);…






