• 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

  • Installing Oracle Java 6 on Ubuntu

    Installing Oracle Java 6 on Ubuntu

    Download jdk-6u32-linux-x64.bin(or any version). If you have used 32-bit Ubuntu installation, download jdk-6u32-linux-x32.bin(or any version). To make the downloaded bin file executable use the following command. [code] chmod +x jdk-6u32-linux-x64.bin [/code] To extract the bin file use the following command. [code] ./jdk-6u32-linux-x64.bin [/code]…

    READ MORE: Installing Oracle Java 6 on Ubuntu

  • Force landscape orientation through Android build system

    Force landscape orientation through Android build system

    Open the following file from Android framework. /android/frameworks/base/services/java/com/android/server/wm/WindowManagerService.java Go to “computeForcedAppOrientationLocked” function. Add below code at appropriate place. [code lang=”java”] int req = getOrientationFromWindowsLocked(); if (req == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) { req = getOrientationFromAppTokensLocked(); } +req = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE; return req; [/code]

    READ MORE: Force landscape orientation through Android build system

  • Disable the lock screen forever

    Disable the lock screen forever

    Open the following file from Android framework. /android/frameworks/base/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java Go to “doKeyguardLocked(Bundle options)” function. Add below code at appropriate place. [code lang=”java”] +final boolean disableLockScreenForever = SystemProperties.getBoolean(“keyguard.disable”, true); +if(disableLockScreenForever){ + if(DEBUG) Log.d(TAG,”doKeyguard: not showing lock screen forever”); + return; +} if (DEBUG) Log.d(TAG, “doKeyguard:…

    READ MORE: Disable the lock screen forever

  • Get Ethernet and WiFi bandwidth in Android

    Get Ethernet and WiFi bandwidth in Android

    Ethernet:- Make ethernet_bw.sh file. Copy below code snippet in file. [code lang=”bash”] #!/bin/sh INTERVAL=”1″ # update interval in seconds while true do R1=`cat /sys/class/net/eth0/statistics/rx_bytes` T1=`cat /sys/class/net/eth0/statistics/tx_bytes` sleep $INTERVAL R2=`cat /sys/class/net/eth0/statistics/rx_bytes` T2=`cat /sys/class/net/eth0/statistics/tx_bytes` TBPS=`expr $T2 – $T1` RBPS=`expr $R2 – $R1` TKBPS=`expr $TBPS /…

    READ MORE: Get Ethernet and WiFi bandwidth in Android

  • Linux commands

    Linux commands

    Unzip “zip” file Install Dependency :- apt-get install unzip [code lang=”bash”] unzip file.zip, unzip file.zip -d destination_folder [/code]   Compress/Extract from/to “tar.gz” file Compress [code lang=”bash”] tar -zcvf folder1_path folder2_path … file.tar.gz [/code] Extract [code lang=”bash”] tar -zxvf file.tar.gz [/code]   Merge /…

    READ MORE: Linux commands

  • Call Java functions in Cocos2d-x

    Call Java functions in Cocos2d-x

    Java [code lang=”java”] public static Activity _activiy; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //Save activity instance _activiy = this; } public static void alertJNI() { String tag = “JniTest”; String message = “I’ve been called from C++”; Log.d(tag, “Showing alert dialog: ”…

    READ MORE: Call Java functions in Cocos2d-x

  • AES encryption and description

    AES encryption and description

    [code lang=”java”] import android.util.Base64; import javax.crypto.Cipher; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; public class AESCrypt  { private final Cipher cipher; private final SecretKeySpec key; private AlgorithmParameterSpec spec; public AESCrypt(String password) throws Exception { // hash password with SHA-256 and crop the output to 128-bit for…

    READ MORE: AES encryption and description