1. adb shell ---
3。qemu: fatal: Bad mode 0
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);
}
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 *
* daemon started successfully *
就ok了