NDK debugging does not start: "package is unknown"
来源:互联网 发布:武装党卫军 知乎 编辑:程序博客网 时间:2024/06/06 05:38
首先用sh -x $NDK_ROOT/ndk-gdb 找到ndk-gdb 失败的真正原因,发现是这里的问题,,然后搜索 "package is unknown"
NDK debugging does not start: "package is unknown"
This is a known bug of the Android platform. When you try to debug your NDK-based app, gdbserver fails to start and a message like below is shown:
This happens due to two known bugs related to the run-as tool. The tool needs to read information about your app from the /data/system/packages.list file inside your Android device. In the case of the first bug, the tool is actually only reading the first 8KB of the file. Thus, if the line containing your app description is below the first 8 KB, run-as will fail. The second bug affects some 4.2.2 and 4.3 Android images by falsely restricting read rights of the packages.list file that contains all the package names.
8 Kilobyte Bug
Detection
- Retrieve the packages.list file by running the following command inside SDK\platform-tools:adb pull /data/system/packages.list
- If the file is larger than 8 kilobytes, your problem is caused by the 8 kilobyte bug.
Workarounds
There are three known workarounds for this bug:
- Uninstall unnecessary apps from your Android device to reduce the size of the packages.list file
- Try renaming the app ID arbitrarily. The order of the lines inside packages.list depends on the hash value of the app ID. Thus changing the ID just a bit might put it within the first 8 KB.
- If your device is rooted, edit the packages.list file manually to put your app in front of the list.
Read Rights Bug
Detection
- Is your Nexus or Galaxy Android device using Android 4.2.2 or Android 4.3?
- Open Android shell. Change directory to "/data/system", run the command "ls -l". Are the access rights to packages.list "-rw-rw----" instead of "-rw-rw-r--" ? If yes, then your device's image is affected by the bug.
Workarounds
- Install the 4.3 factory image for the Android device manually. Do not install the mini 4.3 update after installing the image.
- If your device is rooted, change the read rights of the packages.list file.
- Add the set-uid bit to the run-as binary:
su
mount -o remount,rw /system
chmod 4750 /system/bin/run-as - Try other workarounds from the official bug thread.
- NDK debugging does not start: "package is unknown"
- Unable to start debugging on the web server. Debugging failed because integrated windows authentication is not enabled.
- Unable to start debugging on the web server. The project is not configured to be debugged.
- Unable to start debugging The Silverlight Developer Runtime is not installed
- Unable to start debugging on the web server. The project is not configured to be debugged.
- unable to start debugging on the web server.The web server is not configured
- Unable to start debugging. The Silverlight Developer Runtime is not installed. Please install a matc
- Activity class {package/class} does not exist及Unable to start activity ComponentInfo 解决方法
- Activity class {package/class} does not exist及Unable to start activity ComponentInfo 解决方法
- package R does not exist
- Access is denied + Unable to start debugging
- Caused by: Parent package is not defined: json-default - [unknown location]解决办法
- Caused by: Parent package is not defined: json-default - [unknown location]
- [VB.NET]Unable to start debugging. The debugger is not properly installed 重裝不了,修復安裝也安裝不了
- 错误Unable to start debugging. The Silverlight Developer Runtime is not installed. Please install a matching version.
- 错误Unable to start debugging. The Silverlight Developer Runtime is not installed. Please install a matching version
- 【解决】run-as: Package '' is unknown
- Silverlight报Unable to start debugging. The Silverlight managed debugging package isn’t installed.错误
- 将log保存到本地
- 用SQL语句添加删除修改字段
- 使Eclipse下支持编写HTML/JS/CSS/JSP页面的自动提示
- 面试题33:把数组排成最小的数
- Android开发实用的网站
- NDK debugging does not start: "package is unknown"
- mysql 设置远程连接
- 欢迎使用CSDN-markdown编辑器
- [转]子线程调用Toast报Can't create handler inside ~~~ 错误
- Inheritance and the prototype chain
- 新闻速递
- 扯两句
- Tomcat的结构和对请求的处理
- Eclipse中简单生成Maven项目