tcpdump for android L 5.x with pie support

时间:2019-03-31 10:37:16
【文件属性】:

文件名称:tcpdump for android L 5.x with pie support

文件大小:610KB

文件格式:

更新时间:2019-03-31 10:37:16

tcpdump

由于使用了NDK编译的可执行文件在应用中调用,在4.4及之前的版本上一直没出问题。 最近由于要测试在Android L上的运行情况发现,当运行该可执行文件时,报如下错误: error: only position independent executables (PIE) are supported. PIE这个安全机制从4.1引入,但是Android L之前的系统版本并不会去检验可执行文件是否基于PIE编译出的。因此不会报错。但是Android L已经开启验证,如果调用的可执行文件不是基于PIE方式编译的,则无法运行。解决办法非常简单,在Android.mk中加入如下flag就行。


网友评论