Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build Windows Analysis Environment

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces you how to build Windows analysis environment, the content is very detailed, interested friends can refer to it, I hope it can help you.

In fact, Android program environment analysis does not require a high system version of the Windows analysis platform, and Windows XP can be used at least. But if you use docker to compile Android program source code, then you need to meet the minimum system requirements for docker to run, that is, Windows 7 Ultimate Edition or above, currently I am using Windows 10 system.

1.1.1 Installing JDK

For now and for a long time to come, developing Android software in Java is still the preferred method for many developers. Because JDK is a necessary operating environment for Android development, it is necessary to install JDK first.

Before installing JDK, you need to download it from Oracle's official website. The download address is www.oracle.com/technetwork/java/javase/downloads/index.html. Open the download page and you can see that there are many JDK versions. After downloading the latest JDK installation package, double-click to run the installation package, and install other Windows software, JDK installation process is also very simple, just need to keep clicking the next step can be successfully installed. After installation, manually add JAVA_HOME environment variable with the value of "C:\Program Files (x86)\Java\jdk1.8.0_201", and then add "C:\Program Files (x86)\Java\jdk1.8.0_201\bin" to PATH variable, so that Android studio or third-party software can find the location of java compiler. In addition, pay attention to check whether the Java runtime environment is successfully installed. At the same time, press "Windows+R" to pop up the "Run" option. In the dialog box that appears, enter CMD command to open CMD window. In CMD window, enter java -version command. If the message as shown in the figure appears on the screen, it means that the installation is successful.

1.1.2 install the Android SDK

The new version of Android studio includes the Android SDK. If you do not intend to use Android studio to develop Android software, you can choose to use the Android SDK in a command-line manner, you can download a separate version of the Android SDK; otherwise, you can skip this section and read directly to Section 1.1.4. The Android SDK is provided to developers as a zip package. You can download the latest version of the SDK from the Android website at http://developer. android. com/sdk/index.html. As shown below, click the link to download the corresponding SDK package.

Download and extract the SDK package, and find that there is only one tools directory, which contains the latest Android SDK management tools, and does not contain the specific content of the Android SDK package. Execute the sdkmanager.bat script in the tools/bin directory. Other SDK packages can be downloaded. In addition, the Android SDK requires Java runtime environment support. Before executing sdkmanager.bat script, you need to confirm that JDK has been installed and JAVA_HOME environment variable has been configured. The version of JDK should match the version of Android SDK, and if you install a lower version of JDK, you may be prompted for a run error.

1.1.3 Install Android NDK

Android NDK is a toolkit provided by Google to develop Android native programs, which can be used with Android SDK to develop Android software containing native code. If the Android SDK is already installed, you can install Android NDK by executing the following command from the command line environment:

sdkmanager ndk-bundle

The new version of Android project is built with CMake and debugged using LLDB. If you need to write java and native code at the same time, you also need to install both software, the command is as follows.

sdkmanager cmake;3.6.3155560 sdkmanager lldb;2.3

If we don't have Android SDK installed, how do we install Android NDK? You can download the latest Android NDK package by visiting the Android official website at https://developer. android. com/ndk/downloads/index.html. As shown in the figure below, select the corresponding Windows version, click the software.zip package to download the latest version of Android NDK package.

Unzip the downloaded package and add the NDK root directory to the path variable of the system. Configure My Computer-Properties-Advanced-Environment Variables-System Variables-path Add the path to your NDK installation.

In addition, pay attention to check whether the NDK operating environment is successfully installed. At the same time, press "Windows+R" to pop up the "Run" option, enter CMD command in the dialog box that appears to open CMD window, enter ndk-build -v command in CMD window, and normally display NDK version number and other information, indicating that the installation is successful.

Android Studio Integrated Development Environment

Android Studio is Google's IntelliJ IDEA-based integrated development environment (IDE) for Android app development, and provides more features to improve the efficiency of building Android apps. If you want to use Android Studio to open up Android programs, you can skip the steps above to install the configured Android SDK and Android NDK and install them directly using Android Studio. The latest version of Android Studio can be downloaded from Android Studio (https://developer.android.com/studio). If you are new to installing Android Studio on Windows, find the file android-studio-ide-191.6010548-windows.exe to download. as shown

Double-click android-studio-ide-191.6010548-windows.exe and run through the Android Studio wizard guide to complete the installation. Unable to access Android SDK add-on list. Click Cancel to install SDK in the following interface. as shown

When you first open Android Studio, you need to configure JDK and SDK:

You can see that you need to download NDK,

After installation, as shown in the figure

In the process of using Android Studio, you do not need to download all versions of the SDK and build tools at once. When compiling third-party projects or building new projects, Android Studio prompts users to download the appropriate version of the SDK, depending on the situation. So, in terms of user experience, Android Studio is a lot better than the previous Eclipse based ADT development tools.

1.1.5 Creating Android Emulators

In Android Studio, confirm whether the Android Emulator image file necessary for the emulator to work is installed in order to create the Android emulator. To create an Android emulator using Android Studio, you need to open an Android project first. Click on the icon in the red circle

Open the AVD Manager. If no AVD device has been created, the following interface will be displayed.

Click on the "create a virtual device" button to pop up the virtual device creation window. Select the device type, such as Nexus 6p, click the Next button and select the system version created. Supported system versions are listed here, and by default, the image of the latest system version installed locally is selected. For system versions that are not installed natively, a Download button appears next to the system version name, and you can click it to download the corresponding virtual appliance image.

Select "Q", click "Next" button, confirm the equipment type and version number, click "Finish" button to complete the creation. Select the created simulator on the pop-up AVD management interface, click the Start button in the "Action" column, or double-click on the simulator to be used to start the simulator.

For a simulator that has been used for a long time, there may be a lot of garbage data. You can select the simulator in the AVD management interface, and then right-click, select the "Wipe Data" option in the pop-up shortcut menu to clear the garbage data, reset the simulator content, or click the "Delete" button to delete the simulator and recreate it.

1.1.6Cygwin

Cygwin is a Linux simulation environment running on Windows platform. It uses dynamic link library.dll to realize it. In short, Cywin is a Windows software. In order to ensure that the tool's operation is consistent with the output information, a large number of Unix commands are used to complete the operation. There are several Unix command emulation environments on Windows platforms. The simulation environments available for pre-Windows 10 systems are Cygwin, MinGW, and MSys2, while Windows 10 adds Bash on Ubuntu on Windows. These simulation environments are not much different in operation. I use Cygwin and Bash on Ubuntu on Windows for simulation operation. Download the latest version of the installation program by visiting Cygwin's official website. The download address is www.cygwin.com Click setup-x86_64.exe in the figure to download the program directly.

After downloading, double-click the program icon to install it. After selecting Cygwin installation directory, you can always click "Next" button by default.

In this step, it should be noted that in order to obtain the fastest download speed, we first look for http://www.cygwin.cn of Cygwin China mirror in the list, and select this address if we find it; if we can't find this address, select a domestic mirror address, or use Aliyun mirror (http://mirrors.aliyun.com/cygwin/). After selecting, click "Next" to open the command installation interface, as shown in the figure:

Enter the name of the tool you want to install in the "Search" text box, for example "automake," and Cygwin will list all relevant packages. In the "New? Check the version of automake you want to install in the "box. If you need to install the corresponding source code, you can install it in Src. Check the appropriate option in the ". Then, enter the names of other tools that need to be installed to search, such as grep, openssl, tree, etc. Once all tools are selected, click the Next button to install. Confirm that the version of the tool to be installed is correct, click the "Next" button, Cygwin will download all the selected packages from the network, as shown in the following figure.

After installation, the Cygwin64 Terminal icon will be generated on the desktop. Double-clicking the icon will enter the shell execution environment.

In this environment, you can execute the same shell commands as in macOS and Linux, such as executing the uname -a command to view machine information, executing the id command to view user ID, executing the ls command to list directories, executing the wc -l command to count output lines, etc., as shown in the following figure.

Administrator@DESKTOP-DLS39E0 ~

$ uname -a

CYGWIN_NT-10.0 DESKTOP-DLS39E0 3.1.4(0.340/5/3) 2020-02-19 08:49 x86_64 Cygwin

Administrator@DESKTOP-DLS39E0 ~

$ id

uid=197108(Administrator) gid=197121 (None) group =197121(None), 197611 (docker-users), 545 (Users), 4 (INTERACTIVE), 66049 (CONSOLE LOGON), 11 (Authenticated Users), 15 (This Organization), 113 (Local Account), 4095 (CurrentSession), 66048 (LOCAL), 262154 (NTLM Authentication), 401408 (Medium Mandatory Level)

Administrator@DESKTOP-DLS39E0 ~

$ ls /cygdrive/c | wc -l

20

1.1.7 Bash on Ubuntu on Windows

In Windows 10, you can use the brand-new Bash on Ubuntu on Windows Shell simulation environment. This environment is shipped with the Linux subsystem of Windows 10 and is installed as follows.

1. Open "Settings"-->"Applications and functions"-->"Programs and functions"--Open "Enable or disable Windows functions"-->"Linux subsystem for Windows", OK, restart;

2. Open Settings--> Update and Security--> Developer Options--> Check Developer Mode;

3. Open the command prompt with administrator privileges and enter: dism /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux, which displays the following:

4. Open the app store and search Linux. Select the corresponding distribution installation according to your needs.

5. Switch to the installed ubuntu command to view the installed version:

lsb_release -a

After installation, an ubuntu system icon named "ubuntu 18.04 TLS" can be displayed in the Windows menu, which can be opened directly to shell mode. Alternatively, you can quickly switch to shell mode by typing bash at an administrator-run command prompt.

In the Bash on Ubuntu on Windows Shell environment, packages can be installed by executing the same sudo apt-get install command as in Ubuntu systems.

About how to build Windows analysis environment to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report