通过Android的code在手机上步进 - 大线数的差异步进、机上、在手、差异

2023-09-07 04:49:53 作者:囍柚

我试图调试某些code相关的ListView三星的Captivate(银河S)。我把断点的地方在我的code,当它停止我回去在栈上几帧到ListView源。

I am trying to debug some code related to ListView on Samsung Captivate (Galaxy S). I put breakpoint somewhere in my code and when it stops I go back on the stack few frames to the ListView source.

现在,我可以预期,会有一些不匹配,因为我的手机很可能有稍微不同版本的Andr​​oid类比源$ C ​​$ C,我在我的IDE使用。不过,我得到了超过300线的差异。我看不出这种差异的模拟器。

Now, I can expect that there would be some mismatch as my phone probably has slightly different version of Android classes than source code that I use in my IDE. However, I get a discrepancy of over 300 lines. I don't see this discrepancy on emulator.

更多了,堆栈跟踪显示ListView的行号3688的方法performItemClick(),而ListView控件源只有3644线,这种方法会出现在它在线3395.我看着不同版本的Andr​​oid code和他们没有有performItemClick()更接近线3688。

More over, stack trace shows ListView line number 3688 for method performItemClick() while ListView source only has 3644 lines and this method appears in it on line 3395. I looked at different versions of Android code and none of them has performItemClick() much closer to line 3688.

唯一的解释我能想到的是,三星的Andr​​oid改变code这么多,但我不明白为什么他们会做出这样的改变。

The only explanation I can think of is that Samsung changed Android code so much, but I can't see why would they do such change.

有没有办法,我缺少一些其他的原因?有没有什么办法来强制调试器来自动调节线作为目前我只是无法通过此code步骤?

Is there some other reason that I am missing? Is there any way to force debugger to adjust lines automatically as currently I just can't step through this code?

推荐答案

尝试不同的版本也无济于事。三星改变其框架code和他们不释放变化。我遇到了同样的问题与我的三星智能手机充电。他们可能处理以同样的方式银河。这是Apache许可的一个不幸的现实。

Trying different versions won't help. Samsung modifies their framework code and they do not release the changes. I ran into the same problem with my Samsung Charge smartphone. They probably deal with the Galaxy in the same way. This is an unfortunate reality of the Apache license.

在我接触三星有关的问题,我得到了下面的反应(与小修改):

When I contacted Samsung about the issue I got the following response (with minor edits):

FRG83 Android的2.2.1_r1为[为三星充电正确的版本号。

FRG83 android-2.2.1_r1 is [the right version number for the Samsung Charge].

此外,''ListView.java''文件没有文件之间的手机上匹配,谷歌原来,因为我们修改了它。

Also, ''ListView.java'' file does not match between file on the phone and google original, because we modified it.

ListView.java是根据它没有义务公布源$ C ​​$ C Apache许可范围内。

ListView.java is covered under Apache license which has no obligation to publish source code.

请理解,我们只能发布开源$ C ​​$ CS所涵盖其中有出版的义务。(例如GPL,LGPL,MPL ...等)的许可。

Please understand that we only publish open source codes that are covered licenses which have obligation of publishing.(ex. GPL, LGPL, MPL...etc).

之所以提''获取Android开源''只为打造我们的开源$ C ​​$ C。

The reason for mentioning ''Get android open source'' is only for build our Open source code.