Java tutorial
//package com.java2s; import android.util.Log; import java.lang.reflect.Field; public class Main { private static void injectClassField(Class clazz, String fieldStr, long newValue) { try { final Field field = clazz.getDeclaredField(fieldStr); if (field != null) { field.setAccessible(true); Object obj = null; field.set(obj, newValue); } } catch (Exception e) { Log.d("REFLECTION", clazz.getSimpleName() + " injection failed for field: " + fieldStr); } } }