Skip to content

Tag: who am i

Getting enviroment information on Android

This is a simple program I wrote called Who Am I that shows informations about the device which it is running. Which can be useful for developers and maybe advanced users.

Download:

  • WhoAmI.tar.bz2 – Eclipse project. It’s configured for Android platform 4 (1.6) but should work without problems in newer Android platform versions.
  • WhoAmI.apk – Application installation Android package.

Main Activity source code:

package net.silveiraneto.whoami;

import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import android.widget.EditText;

public class WhoAmI extends Activity {
    private EditText mEditor;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.whoami);

        mEditor = (EditText) findViewById(R.id.editor);

        Object[][] properties = {
        	{"Build.BOARD", Build.BOARD},
        	{"Build.BRAND", Build.BRAND},
        	{"Build.CPU_ABI", Build.CPU_ABI},
        	{"Build.DEVICE", Build.DEVICE},
        	{"Build.DISPLAY", Build.DISPLAY},
        	{"Build.FINGERPRINT", Build.FINGERPRINT},
        	{"Build.HOST", Build.HOST},
        	{"Build.ID", Build.ID},
        	{"Build.MANUFACTURER", Build.MANUFACTURER},
        	{"Build.MODEL", Build.MODEL},
        	{"Build.PRODUCT", Build.PRODUCT},
        	{"Build.TAGS", Build.TAGS},
        	{"Build.TIME", Build.TIME},
        	{"Build.USER", Build.USER},
        };

        for(Object[] prop: properties) {
        	mEditor.append(String.format("%s: %s\n", prop[0], prop[1]));
        }
    }
}

And its Android Manifest: