Void dump_memory_region(FILE* pMemFile, unsigned long start_address, long length, int serverSocket)įseeko(pMemFile, start_address, SEEK_SET) įor (address=start_address address \n", argv) I’ve put the code here below also, just for completeness: Then create a directory with the name jni in that directory (this is important for using ndk-build later).Ĭreate a file in the jni directory and copy-paste the code from the link provided above into the file. I created one called memdump on my Desktop. (Truth is it seems the PIE feature is available from 4.1, but it is disabled, and from 5.0 it is enabled by default)įind the code here – (hoping that the link is still alive, it’s among the answers by Tal Aloni)Ĭreate a directory in an appropriate location of your choice. The Android.mk file has to be modified a bit (i’ve added the modifications needed) to enable PIE for any executables from Android 5.0 onwards. From what i’ve read here this is is due to a security feature implemented from Android 5.0 onwards. It seems that from Android 5.0 you will probably get an error like “ error: only position independent executables (PIE) are supported“. Update : I tested this entire thing on an Android 7.1.1 (Nougat) emulator, and eventually got it working. Pick the right executable from the right folder for your architecture, and it should work. I forgot that there are multiple folders in the /libs directory that are created. I’m yet to test it on an x86 architecture. I tested it on an ARM architecture (physical device), and it worked. Update : I’m not sure whether this will work for Android on both x86 and ARM architectures. Memdump: īasically the idea is to get the code and cross-compile it using the Android NDK (Native Develpment Toolkit) toolset on Ubuntu, then getting the binary and transferring it onto your device and running it with the right permissions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |