• Configuring Ethernet 802.1x on Android

    Configuring Ethernet 802.1x on Android

    What 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.…

    READ MORE: Configuring Ethernet 802.1x on Android

  • Setup testing environment to test Android Ethernet 802.1x

    Setup testing environment to test Android Ethernet 802.1x

    Setting 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…

    READ MORE: Setup testing environment to test Android Ethernet 802.1x

  • SSH server support in AOSP Android

    SSH server support in AOSP Android

    Follow 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…

    READ MORE: SSH server support in AOSP Android

  • 802.1x Authentication over Ethernet in AOSP Android

    802.1x Authentication over Ethernet in AOSP Android

    In 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…

    READ MORE: 802.1x Authentication over Ethernet in AOSP Android

  • Display HTML String in Android TextView

    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>…

    READ MORE: Display HTML String in Android TextView

  • Sign the OTA Package

    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.

    READ MORE: Sign the OTA Package

  • Adding a jar file from libs/ to Android.mk

    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]

    READ MORE: Adding a jar file from libs/ to Android.mk

  • Generate RLE file through FFMPEG

    Generate RLE file through FFMPEG

    From 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…

    READ MORE: Generate RLE file through FFMPEG

  • Schedules the task to run asynchronously

    Schedules the task to run asynchronously

    There 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,…

    READ MORE: Schedules the task to run asynchronously

  • Android USB communication

    Android USB communication

    Permissions:- 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”]…

    READ MORE: Android USB communication

  • Android get MAC and IP addresses

    Android get MAC and IP addresses

    Permissions:-      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);…

    READ MORE: Android get MAC and IP addresses