It’s 2021. It’s time to install Ubuntu!

Time:2021-4-23

This article starts with WeChat official account “Liu Wangshu”.

This is the third part of batcoder. Batcoder is an extra part of Android advanced trilogy. It will expand and upgrade the content of Android advanced trilogy and share it with you in the form of video. As for why it’s called bat coder, it’s because I hope you can enter your favorite big factory after watching my technology video.

This article should be the simplest one I have written in recent years, but as long as I can help some people, it will be useful.

In the first chapter of “Android advanced decryption”, the second part of Android advanced trilogy, I introduce two ways to read the source code, one of which is from Baidu network disk:https://pan.baidu.com/s/1ngsZsDownload the source code, and then use souceinsight to view it. This method is very convenient and suitable for reading the source code. However, there are two disadvantages: one is unable to obtain the latest source code, the other is unable to compile the source code. Because we need to compile and debug the source code later, the source code compilation needs to be carried out in the Linux environment. Many students’ systems are not Ubuntu, but we can use VirtualBox to install Ubuntu on windows and MAC (AOSP can be downloaded directly on MAC, but it may pollute the system). Therefore, before I explain how to download the system source code, I will first explain the process of installing Ubuntu with VirtualBox in Windows 10 environment, and the MAC environment is similar. In addition, under Windows 10, you can also download the Ubuntu software in the Microsoft Store. You can try it.

Video version

Many details, only in the video version ~, welcome to watch the video

Watch independent blog

B station

<!–more–>

preparation

First, you need to download two files:

  1. VirtualBox: download address:https://www.virtualbox.org/wi…
  2. Ubuntu desktop: download address:https://www.ubuntu.com/downlo…

The VirtualBox installation process is very simple, and the next step is OK. Here is mainly about installing Ubuntu with VirtualBox.

VirtualBox install Ubuntu

1. Click the VirtualBox new button to create a new virtual computer.

It's 2021. It's time to install Ubuntu!

If there is no 64 bit option in the version option, you need to enter BIOS and start CPU virtualization. Different motherboards have different ways to enter (please Baidu for details). For example, my HP desktop computer will enter the BIOS by pressing F10 continuously when it is turned on. You can set and enable the security system security virtualization technology option. If you still don’t have the 64 bit option, check out this article:https://blog.csdn.net/tai5324…

2. Set the memory allocated to the virtual computer. The recommended memory for this version is 1g, which can be determined according to your computer configuration. It is recommended to allocate 4G at least.

It's 2021. It's time to install Ubuntu!

3. To create the size of the virtual hard disk, click next all the way.

It's 2021. It's time to install Ubuntu!
It's 2021. It's time to install Ubuntu!
It's 2021. It's time to install Ubuntu!

4. Although it is recommended that the size of the virtual hard disk is 10g, if you want to compile the Android source code, you need more hard disk space. It is recommended to divide it into 200GB at least. I divide it into 200GB here.

It's 2021. It's time to install Ubuntu!

5. Select Ubuntu and click start.

It's 2021. It's time to install Ubuntu!

6. Select the downloaded Ubuntu image and click start.

It's 2021. It's time to install Ubuntu!

7. Select the language of the system and install Ubuntu.

It's 2021. It's time to install Ubuntu!

8. Follow the steps below.

It's 2021. It's time to install Ubuntu!
It's 2021. It's time to install Ubuntu!

9. Fill in your name and password and click continue:

It's 2021. It's time to install Ubuntu!

10. Start installing Ubuntu, click restart now to finish the installation.

It's 2021. It's time to install Ubuntu!
It's 2021. It's time to install Ubuntu!

Install enhancement tools

There are two main purposes for installing the enhancement tool:

  1. Realize file sharing between virtual machine (Ubuntu) and host (Windows).
  2. You can use full screen mode.

1. Configure Ubuntu
Open the display at the top of the screen in the user interface.

It's 2021. It's time to install Ubuntu!

Create a new shared folder and check auto mount and fixed allocation.

It's 2021. It's time to install Ubuntu!

At the top of the simulator screen, select device > install enhancements, and a VBox will be generated on the desktop_ GAs_ 6.0.4, and then configure. If no drive letter is generated, you can search the file.

2. Install the enhancement tool

First, install the GCC and Perl libraries

sudo apt-get install gcc perl make

Enter VBox on the desktop or in the main file of Ubuntu_ GAs_ 6.0.4 directory, click run software to install the enhancement tool.

It's 2021. It's time to install Ubuntu!

The following prompt indicates that the installation is successful

It's 2021. It's time to install Ubuntu!

Add the current user to the vboxsf group before adding it:

sudo adduser zhangrj vboxsf

Restart unbantu, and a drive letter will be generated on the desktop to share files with the host. If no drive letter is generated, you can search the files.

In addition to the installation of enhancement tools, there is another function that is very common. In Settings > General > advanced, the shared pasteboard and drag and drop selection can make the interaction between the virtual machine and the host easier.
See the video in this section for more details.

Independent blog address:http://liuwangshu.cn/batcoder…
Station B address:https://www.bilibili.com/vide…

About the author: Liu Wangshu, the most valuable expert of Tencent cloud, is the author of the best-selling books “the light of Android advanced”, “the decryption of Android advanced” and “the north of Android advanced”. He has been the outstanding author of the year for four times of Electronic Industry Press, the former interviewer of Huawei, the technical director of big factory, and the specially invited lecturer of Guge developer community.

You are also welcome to pay attention to my company to share the big front-end and Java related technologies.

It's 2021. It's time to install Ubuntu!