The device: How to use source insight to read Android part of the source code

Source: Internet
Author: User

??

To facilitate learning this Android drive, need to read the source to deepen the impression, but the Android source code is too large, so we only copy three directories to Windows under the source Insight view. How do you know which three directories to copy? Well, the teacher told me: Frameworks, hardware, system. As for why these three directories, you can check the book to see the role of the source code of each directory is good.

Note: Do not too much, the source of which to copy which, if your computer performance is good, you can consider indexing all the source code, but no need, learning is to grasp the key point.

??

OK, first to the virtual machine (any development environment can be) below, the three directories packed compressed:

Tar cvf hal.tar.gz Framworks hardware system

But unfortunately it went wrong. Finally:

Sogou Search to see what the reason: Find an answer link

According to the answers found, the hal.tar.gz deleted the re-packaging:

The >/dev/null above indicates that the standard output is relocated to the file/dev/null, and the terminal leaves only the standard error message.

Well, it says Framworks not found, apparently I was careless to write the directory name is wrong, so repack:

This frameworks directory does not seem to be generally large ah, it is no wonder, this is the first layer of Android! But the teacher that how very small appearance, strange.

OK, finally packaging compression end no errors, and then to the windows to build a directory Android_source_hal (name casually up, do not tangle name tangled half a day).

Because using the wireless, SSH can not connect to the virtual machine transfer files, this is directly copied to the shared folder:

??

This is too big, I do not know the old computer index can be successful.

Decompression is fast, about five minutes, wait.

After the decompression is complete, move the hal.tar.gz to the outside of the folder.

Open source Insight, click Project/new project/

Then click OK, then click OK to enter the following screen:

Click Add all, then tick all:

Click OK to get

Strange, when the decompression show more than 50,000 files, how now only more than 20,000 files are added to the project!

Click OK to start adding, then click Close when the blue progress bar is finished.

Then click on the following:

This requires a sync option, which is all checked here:

Click OK to start syncing files, two more files or quickly, Uboot seems to be more than 20,000 files, so also quite fast:

Just wait for it to end.

??

The role of source insight, say the most basic role, because this software also support macros, can achieve more powerful functions, but currently in addition to the Code finder, I have not realized how to use the more powerful features.

Another function is to write code, because the framework of the code is a large part of the copy changes, so in here can be very convenient to browse the code, and can be easily copied, so it is good to write code.

??

OK, so the end, look at the interface:

You can browse the file, if you want to search the file, then switch to the File browser window, or the symbol window is not found:

Just do not know why the first letter of the file name has been capitalized, but does not affect the search, regardless of, no impact on the need to waste time to tube.

??

such as search hardware.h:

But Chinese input has a problem, if you want to comment on it, this is not the focus, do not spend time searching, on-line solutions, but you go to search how to solve Si Chinese problem, your code can not see, time is used to search non-focus.

So, here it is, the following begins to learn the code, the function of source insight is enough to use, see the code is the focus.

The device: How to use source insight to read Android part of the source code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.