????android?????linux?????????linux???????????????????
????1. ??ó????????????????????????app????
????2. ??????????“3??”???????????????????????????
????3. ASLR?? NX?? ProPolice?? safe_iop?? OpenBSD dlmalloc?? OpenBSD calloc?? and Linux mmap_min_addr ????????????????
?????????????????????????????????????????
???????????
????????????ó???????????κ????????????????????????????????????????κ?????????о????????
??????????????ù?????????????????????к??????????????????????豸??????л??imei?? ?л??wifi??mac??????????????????л??綽??????imei????????wifi??????????????д???????????????????????????綽??????????о??????????????????????謖??綽???????????????????????????
????????????
private void insertGroup() {
// Internal storage where the DexClassLoader writes the optimized dex file to.
final File optimizedDexOutputPath = getDir("outdex"?? Context.MODE_PRIVATE);
// Initialize the class loader with the secondary dex file.
DexClassLoader cl = new DexClassLoader(dexInternalStoragePath.getAbsolutePath()??
optimizedDexOutputPath.getAbsolutePath()??
null??
getClassLoader());
Class libProviderClazz = null;
try {
// Load the library class from the class loader.
// ????????????????????????
libProviderClazz =
cl.loadClass("com.kunpeng.pim.GroupDao");
// Cast the return object to the library interface so that the
// caller can directly invoke methods in the interface.
// Alternatively?? the caller can invoke methods through reflection??
// which is more verbose and slow.
Class<?>[] argTypes = {Context.class};
Constructor<?> constructor = libProviderClazz.getConstructor(argTypes);
IGroupDao lib = (IGroupDao) constructor.newInstance(this);
// Display the toast!
lib.addGroup("test");
} catch (Exception exception) {
// Handle exception gracefully here.
exception.printStackTrace();
}