摘要:
此类函数还是有杀伤力的1、openAssetFile(Uri uri, String mode)This is like openFile(Uri, String), but can be implemented by providers that need to be able to return sub-sections of files, often assets inside of their .apk.2、openFile(Uri uri, String mode)Override this to handle requests to open a file blob.3、openT 阅读全文
摘要:
通常函数返回使用 pop {r7,pc}或bx lr等方式(bx,b类似jmp为跳转指令,但bx可以指定跳转区域究竟为thumb还是arm指令。thumb指令指令的时候,直接填写该地址却总是产生SIGSYS信号(非法指令执行)。原因就是该函数为thumb指令,因此跳转时必须要把指令地址的最低位设置为1(bx 通过这一位来区分指令集),所以函数地址就加了一。thumb指令集与arm指令集切换movR0,#5 ;Argument to function is in R0addR1,PC,#1 ;Load address of SUB_BRANCH, Set for THUMB by... 阅读全文
摘要:
新增个手写GNU语法arm的方法,以后可以狂逆狂写hello.S文件.datamsg:.ascii "Hello, ARM!\n"len = . - msg.text.globl _start_start:/* syscall write(int fd, const void *buf, size_t count) */mov %r0, $1 /* fd -> stdout */ldr %r1, =msg /* buf -> msg */ldr %r2, =len /* count -> len(msg) */mov %r7, $4 /* write is 阅读全文
摘要:
使用strace for Android跟踪系统调用过程方便后续的so文件分析http://benno.id.au/blog/2007/11/18/android-runtime-stracehttp://mpigulski.blogspot.com/2010/09/debugging-dlopen-unsatisfiedlinkerror.html 阅读全文