开发者

Android NDK debugging on HTC Incredible S

I have recently had to change my work Android phone to an HTC Incredible S to use for Android NDK debugging. Unfortunately, the ndk-gdb script fails to attach the debugger, coming up with the error run-as: Package my.package has corrupt installation开发者_运维百科. I have tried all the usual fixes - uninstalling and reinstalling the apk, cleaning and rebuilding in Eclipse - several times, but to no avail. Also, I know the project is set up properly for debugging as I have been doing so successfully for a few weeks on a Nexus S.

Has anyone had any success with Android NDK on the Incredible S? And if so, did you have to do anything particular? I realise it may be necessary to root the phone and change the permissions of /data/data, but I want to avoid this if at all possible.

Thanks

EDIT: Okay, I've also tried the HTC Desire S, with similar results. Could anyone tell me of a phone they've used successfully for NDK multi-threaded debugging without rooting that's not the Nexus S? I've tried the Galaxy S II - the debugger connected but none of the breakpoints were hit - I think this is down to the Tegra chip at its core.


From my research with various phones, it seems that HTC Sense (or something that HTC add) changes something deep within Android that makes run-as fail (as it is so picky about the filesystem due to its SUID bit - fair enough). So if this helps anyone else - I would avoid trying to use an HTC for debugging (rooting might help, but I haven't tested it).

Phones that I have had success with are:

  • Google Nexus S and the Google Nexus One (I'm thinking any Google-branded phone with stock Android on will work).
  • Sony Xperia Play.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜