三星4.4.2&QUOT调试本机应用程序;包不明"与运行的命令 [英] Debug native application on Samsung 4.4.2 "package is unknown" with run-as command

查看:138
本文介绍了三星4.4.2&QUOT调试本机应用程序;包不明"与运行的命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在试图调试在银河S4通过Eclipse的Andr​​oid原生应用程序,我得到一个包是未知的错误在运行的命令。

While trying to debug an Android native application via Eclipse on a Galaxy S4 i get a "package is unknown" error at the run-as command.

有一个开放的<一个href="https://$c$c.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=58373"相对=nofollow>问题为code.google.com ,指出它涉及到的权限问题 /data/system/packages.list 文件必须是 RW​​-RW - R的,而是是RW-RW ---- 。因此,在建议的解决方案是铲除手机和更改权限。 我已经植根于手机改变packages.list文件的权限 RW​​-RW - R的但是当我从Eclipse的权限启动调试本机应用程序被改回以 RW​​-RW -------

There's an open issue at code.google.com that states the problem it's related to the permission of the /data/system/packages.list file that has to be rw-rw--r, instead it is rw-rw----. So, on of the suggested solution is to root the phone and change the permissions. I' ve rooted the phone to change permissions of packages.list file to rw-rw--r but when I start "Debug as native Application" from eclipse permissions are changed back to rw-rw-------.

我该如何解决这个问题?我一定要闪回固件即使手机是植根?

How can I solve this? Do I have to flash back the firmware even if the phone is rooted?

推荐答案

我已经打破我的头几天如现在在这个问题上。 在写这篇文章的时候,我能够与Android 4.1.2上的三星手机调试本机code。不过三星的Galaxy S5采用Android 4.4.2面对不断给我:

I have been breaking my head for several days as well now on this issue. At the time of writing, I was able to debug native code on a Samsung phone with Android 4.1.2. However a Samsung Galaxy S5 with Android 4.4.2 keeps confronting me with:

gdbserver的输出:

gdbserver output:

运行方式:包'x.y.z'未知

run-as: Package 'x.y.z' is unknown

验证应用程序是否建有NDK_DEBUG = 1

Verify if the application was built with NDK_DEBUG=1

作为一个丑陋的解决方法,似乎可以更改的权限运行为从750到4750一个植根设备上;在Windows 7机器上:

As an "ugly" workaround, it seems possible to change the permissions of 'run-as' from 750 into 4750 on a rooted device; on a Windows 7 machine:

  • 在使用USB连接设备到PC主机
  • 打开主机上的命令提示符PC
  • 进入Android的SDK文件夹的平台工具文件夹
  • 执行亚行壳
  • 在外壳中,执行命令搭配chmod 4750 /系统/斌/运行为

从理论上讲,这应该解决的问题。我无法然而,测试这个,因为我没有在时刻植根设备。 我会很高兴地看到,如果有人能实际测试这一点,并发布结果。

Theoretically this should solve the problem. I'm unable to test this however as I don't have a rooted device at the moment. I would be happy to see if someone can actually test this and post a result.

我发现与此相关的问题非常有趣以下2参考资料:

I found the following 2 references related to this issue very interesting:

  • 的<一个href="https://$c$c.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=58373"相对=nofollow标题=Android的问题58373> Android的问题58373 ,我的外卖是:

  • 谷歌已经为Android 4.4版本修复了这个问题。 (见注释#51和#52引用的链接,它提供了实际的补丁)

  • google has patched this issue for Android 4.4. (see comment #51 and #52 of the referenced link, which provides the actual patches)

三星似乎有一个适当的Andr​​oid版本和相应的修补程序可能没有被包括在内(见注释#76)(这个说法可能需要一些具有挑战性的)

Samsung does seem to have a proper Android build and the respective patches might not have been included (see comment #76) (this statement might need some challenging)

的<一个href="http://developer.samsung.com/forum/thread/native-debugging-still-broken-on-galaxy-devices/202/258621"相对=nofollow>三星论坛,我的外卖:

  • 在一些人报告说,它已得到修复,有些报告说,它没有。

这篇关于三星4.4.2&QUOT调试本机应用程序;包不明&QUOT;与运行的命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆