Android的/system/lib里加入自己的so库

执行下命令:

1 重新挂载/system目录,使之能读写:mount -o remount,rw /dev/null /system

2 修改这个文件的权限:chmod 777 /system

3 利用dd和mv命令复制文件到system里去:

    dd if=/data/data/com.simo.simomate/lib/libpcap.so of=/system/lib/libpcap.so
    mv /data/data/com.simo.simomate/lib/libpcap.so /system/lib/

注意:有的手机把一些常用的命令删除了,解决办法:

  1,获取toolbox里的对应命令的源码,编译生成命令文件,拷贝到/system/bin目录下

  2,安装busybox,使用busybox命令,busybox命令比起toolbox命令要丰富的多

 

 

 

 

在模拟器所在的tools目录下执行

1.启动AVD3.0模拟器

./emulator -avd AVD3.0

2.指定模拟器存储空间的大小,非SD卡的大小,只有这样才能向模拟器system目录下push文件,否则会报out of memory的错误

./emulator -partition-size 256 -avd AVD3.0

3.push a.so 到system/lib目录下的方法

(1)进入adb shell

./adb shell

(2) 退出shell

exit

(3)system/lib目录是不可写的,需要先执行remount,让其可写

./adb remount

(4) push文件a.so 到system/lib目录下

./adb push ../../mydroid/out/target/product/generic/system/lib/a.so /system/lib

转载于:https://www.cnblogs.com/satng/p/4073668.html

发布了0 篇原创文章 · 获赞 12 · 访问量 3万+
展开阅读全文
评论将由博主筛选后显示,对所有人可见 | 还能输入1000个字符

Android 4.3系统so报错

09-10

下面是native错误信息,求大神解答 ``` Build fingerprint: 'samsung/ja3gzs/ja3g:4.3/JSS15J/I9500ZSUCMK3:user/release-keys' Revision: '10' cpuAbi/cpuAbi2: 'armeabi-v7a#armeabi' pid: 23356, tid: 23356, name: com.flk.test >>> com.flk.test <<< signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xbe54aff0 registers: r0 76fd2bf8 r1 00000000 r2 777903c4 r3 405d959c r4 76fd2bf8 r5 00000000 r6 00000001 r7 00000000 r8 bed4a3a8 r9 6d6b0d2c sl 417fadc8 fp bed4a3bc ip 40294910 sp be54b000 lr 77776f27 pc 77776d4c cpsr 200b0030 d0 0000000000000000 d1 0000000000000000 d2 0000000000000000 d3 0000000000000000 d4 3f8000003f800000 d5 3f80000000000000 d6 3f80000000000000 d7 3f19999a3f800000 d8 44f0000044f00000 d9 0000000000000000 d10 0000000000000780 d11 0000000000000000 d12 0000000000000000 d13 0000000000000000 d14 0000000000000000 d15 0000000000000000 d16 000009d376cb5fb1 d17 0000000000000007 d18 0000000000000000 d19 3fe713b140000000 d20 0000000000000000 d21 0000020000000000 d22 0000000000000000 d23 3ff0000000000000 d24 3fe713b140000000 d25 3fe713b140000000 d26 4019f62780000000 d27 0000000000000000 d28 0000000000000000 d29 0000000000000000 d30 3fe713b140000000 d31 0000000000000000 scr 80000014 backtrace: #00 pc 00002d4c /system/lib/libPowerStretch.so (LucidConfig::calcTargetFPS(int)+27) #01 pc 00016894 stack: ........ ........ #00 be54b000 76fd2bf8 be54b004 00000000 be54b008 777903c4 /system/lib/libPowerStretch.so be54b00c 73262898 #01 be54b010 417fadb8 be54b014 00000007 be54b018 6d6b0d34 be54b01c 405b7f2d /system/lib/libEGL.so be54b020 6d792a78 /dev/ashmem/dalvik-LinearAlloc (deleted) be54b024 40592459 /system/lib/libEGL.so (eglReleaseThread+12) be54b028 77790418 /system/lib/libPowerStretch.so be54b02c 77777989 /system/lib/libPowerStretch.so (lucid_eglReleaseThread+12) be54b030 405d9544 be54b034 405b82ad /system/lib/libEGL.so be54b038 77790418 /system/lib/libPowerStretch.so be54b03c 77777989 /system/lib/libPowerStretch.so (lucid_eglReleaseThread+12) be54b040 405d9544 be54b044 405b82ad /system/lib/libEGL.so be54b048 77790418 /system/lib/libPowerStretch.so be54b04c 77777989 /system/lib/libPowerStretch.so (lucid_eglReleaseThread+12) memory and code: memory near r0: 76fd2bd8 76fd2be8 00000009 00000000 00000013 76fd2be8 000b0455 76fd2be8 00000010 00000043 76fd2bf8 77778720 00000000 74415c00 00000000 76fd2c08 73260001 ffffffff 00000000 00000000 76fd2c18 00000000 00000000 00000000 00000000 76fd2c28 00000000 00000000 00000000 0000001b 76fd2c38 6d83af88 00000194 00000000 00000000 76fd2c48 00000001 0000003b 00003000 00000000 76fd2c58 00000000 00000000 00000000 00000000 76fd2c68 00000000 00000000 00000000 00000000 76fd2c78 00000001 400c1ffc 777f7014 0000001b 76fd2c88 00000007 0000000c 76fd2cc0 00000040 76fd2c98 00000018 00000023 00000000 00000000 76fd2ca8 00000000 00000003 73250650 00000009 76fd2cb8 76fd2cf8 00000013 6a696562 00676e69 76fd2cc8 00000000 00000033 20302230 1ca01ea0 ``` 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 编程工作室 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览