-
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…
-
Installing Oracle Java 6 on Ubuntu
READ MORE →: Installing Oracle Java 6 on UbuntuDownload 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]…
-
Force landscape orientation through Android build system
READ MORE →: Force landscape orientation through Android build systemOpen 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]
-
Disable the lock screen forever
READ MORE →: Disable the lock screen foreverOpen 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:…
-
Get Ethernet and WiFi bandwidth in Android
READ MORE →: Get Ethernet and WiFi bandwidth in AndroidEthernet:- 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 /…
-
Linux commands
READ MORE →: Linux commandsUnzip “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 /…
-
Call Java functions in Cocos2d-x
READ MORE →: Call Java functions in Cocos2d-xJava [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: ”…
-
AES encryption and description
READ MORE →: 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…








