android调试问题解决(持续更新ing)

1. adb shell --- 

error: insufficient permissions for device的解决

root权限下,adb绝对路径执行:
ubuntu$ sudo ./out/host/linux-x86/bin/adb kill-server
ubuntu$ sudo ./out/host/linux-x86/bin/adb start-server
* daemon not running. starting it now *
* daemon started successfully *
ubuntu$ ./out/host/linux-x86/bin/adb shell
$
2.取得root权限的情况下,google play里 下载busybox手机软件安装即可

3。qemu: fatal: Bad mode 0
R00=00000000 R01=000005a1 R02=00000100 R03=00000000
R04=00000000 R05=00000000 R06=00000000 R07=74000003
R08=00000000 R09=00000000 R10=00000000 R11=00000000
R12=00000000 R13=00000000 R14=00000000 R15=0001000c
PSR=000001d3 ---- A svc32
Aborted

解决方法:探索中。。。

        3.1 绕过方法: emulator -avd AVD4.1 -system system.img -data userdata.img   不加载生成的ramdisk.img,加载SDK下google提供的ramdisk.img。(bootchart在ramdisk.img中启动,不加载m INIT_BOOTCHART=true生成的ramdisk.img,bootchart无效)

4。先把问题记录一下:

       在workspace目录的<project>/jni下用ndk-build编译,不能找到当前目录下引用的so和.c文件,把so和.c拷贝到<android-ndk>/build/core目录下即可,猜想是ndk-build编译路径配置问题。。。

      调用.a文件,.a 文件应放在<android-ndk>/platform/<android-9>/usr/lib
5.在manifest中加入sdk版本信息后出现http连接异常:
        在onCreate函数中加入
      if (android.os.Build.VERSION.SDK_INT > 9) {
         StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
         StrictMode.setThreadPolicy(policy);
       }
6。adb真机调试
         adb devices  出现真机???-not permission
         在root终端下  ./adb kill-server            ./adb start-server  
         出现
                  * daemon not running. starting it now on port 5037 *
                  * daemon started successfully *
         就ok了
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值