Read the Android source code

method one

  1. Directly click on the address  http://www.androidxref.com/

way two

  1. Go to Google official website  https://www.google.com/
  2. Enter  pathclassloader source code in the search box
  3. Click on the line with the source address

pathclassloader source code

  1. To view the source code, click the platform directory in the path

pathclassloader

  1. In the platform , search the libcore directory

libcore

  1. Click the libcore directory, here you can see the git repository of libcore, with branch Branch, tag Tag and other submission records

 

clone libcore

  1. Download libcore source code

Open the Terminal and clone the libcore source code via git
git clone  https://android.googlesource.com/platform/libcore

I need a VPN proxy here. I use lantern blue light (free of charge) and set up a lantern proxy server.

 

lantern settings

terminal clone

  1. View the path where the SDK of android studio is located

 

android studio sdk

  1. Copy the downloaded dalvik (libcore/dalvik/src/main/java/dalvik) under the libcore path to the sources under the android sdk path
  2. You can view the source code directly under android studio.
  3. If you want to specify the specific version of the corresponding android sdk, you can view the tag list through git tag in the libcore directory, and then use git checkout android-11.0.0_r38, which will not be expanded here, just like the purpose of switching tags in our project.

Guess you like

Origin blog.csdn.net/iblue007/article/details/125585131