Android Archive

Analysing Linux memory utilisation using proc meminfo file

/proc/meminfo Provides valuable information about the system’s RAM usage. (utilization of run time memory).  This varies by architecture and compile options.  The following is from a 4GB RAM, 64bit Ubuntu Desktop $ cat /proc/meminfo MemTotal: 4103420 kB MemFree: 449084 kB MemAvailable: 1149688 kB Buffers:...Read More

How to install Android NDK on Ubuntu 16.04

To install and configure the NDK, follow these steps: Download android ndk suitable for your platform from http://developer.android.com/ndk/downloads/index.html $ mkdir ~/myndk $ cd ~/myndk $ wget -c https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip Now extract the zip as, $ unzip android-ndk-r16b-linux-x86_64.zip This will extract as “Extracting  android-ndk-r10e” into folder...Read More

Compiling Android applicaton as part of AOSP source code

$ cd Android_AOSP $ mkdir packages/apps/HelloWorld Copy your java application source code to packages/apps/ e.g. HelloWorld $ cd packages/apps/HelloWorld Write an Android.mk as below, $vim Android.mk ——————————————————– LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_PACKAGE_NAME...Read More

How to compile native C library and native C program as part of Android AOSP’s external directory using Android.mk makefile

To compile any c library inside android, we need to write an Android.mk makefile, for reference please check below, 1. mkdir external/mysource 2. cd external/mysource 3. vim Android.mk To compile as Shared Library, LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES := library_source.c LOCAL_C_INCLUDES :=$(LOCAL_PATH)...Read More