Hi Calin,

I do the first step, and added the file which contains the source code into 
project's directory. But is it right I cannot open it to see detailed 
classes?

In the second step, I did not find " Expand your jar " option. (as showed 
in the attachment)

Thanks

在 2012年9月13日星期四UTC-4上午2时53分05秒,Calin Perebiceanu写道:
>
> Add External Class Folder  adds an external *CLASS* folder and not an 
> external *SOURCE *folder.
>
> If you want to add the sources you downloaded to the build path of your 
> project you should go to JBP->Sources->Add Folder.
> If you want to attach the sources to an existing jar in your buildpath 
> then go to JBP->Libraries->Expand your jar->Double Click Source 
> attachment-> Pick your sources.....
>
> On Thursday, 13 September 2012 06:50:23 UTC+3, Jin wrote:
>>
>> Hi, Kris
>>
>> There may be something wrong with my expression in the previous post. So 
>> first let me explain what I have done: I right-click my project, and choose 
>> Build Path/Configure Build Path/Add External Class Folder, then imported 
>> the download Android source file named as “sources”. So there are two items 
>> in Referenced Libraries directory: “Android.jar” and “sources”. The 
>> “Android.jar” file is only about 5.3M while “sources” file is about 127M, 
>> and I find more .java files in the “sources” which includes the 
>> “PackageManagerService.java”. However, in the “sources” directory in 
>> Eclipse, I can only see the names of all .java files but cannot open 
>> them(By that I mean when I click them, nothing happens).
>>
>> I guess this is caused by I did not attach sources for the platform 
>> distribution. But how to do that? I searched “platform distribution” but 
>> still don’t know what it means. Could you please specify?
>>
>> Actually, I just want to see if I can modify Android’s permission 
>> checking mechanism. PackageManagerService class is just where I started to 
>> read. And is it true that if I want to implement the modified 
>> PackageManagerService, I have to debug the whole source codes(10G)? While 
>> if I just want to do some change to ActivityManager/PackageManager(which is 
>> in Android.jar), I just need to debug Android.jar?
>>
>> Thanks very much
>>
>>
>> On Wednesday, September 12, 2012 5:06:21 PM UTC-4, Kristopher Micinski 
>> wrote:
>>>
>>> On Wed, Sep 12, 2012 at 12:20 AM, Jin <[email protected]> wrote: 
>>> > Hi 
>>> > 
>>> > I want to do some modification to PackageManagerService, but now I 
>>> cannot 
>>> > even view its source code. I downloaded the Android source code and 
>>> put it 
>>> > into android-sdk/platforms/android-8/sources, however, I can just view 
>>> part 
>>> > of it. The source code of directories like "com", which 
>>> > PackageManagerService belongs to, are not able to see. Meanwhile, if I 
>>> put 
>>> > the Android source code into SourceInsight, it all shows up. 
>>> > 
>>> > How could this happen? Please help me. 
>>> > 
>>> > Thanks 
>>> > 
>>>
>>> What do you mean you "can't view part of it?" 
>>>
>>> You should be able to attach the source to your Eclipse instance. 
>>> Remember that it is important to attach sources for the platform 
>>> distribution that you are actually using. 
>>>
>>> What have you tried?  What errors have you received?  Why do you need 
>>> to know this?  If you're modifying the platform, this message belongs 
>>> on android-platform, 
>>>
>>> kris  
>>
>>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

<<attachment: 2.PNG>>

Reply via email to