As an open-source system, the Android mobile phone operating system is favored by developers. We can modify this in the simulator of this system to achieve our own goal. For example, you can use a debugging tool such as Android adb to compile the interface graphics.
- Basic concepts of Android floating point
- Android Performance Comparison of advantages and disadvantages in actual development
- In-depth analysis of Android code structure
- Concepts related to Android screen elements
- Android Virtual Devices apply to your deployment goals
Android's main debugging tool adb (Android debuging bridge), ddms is a graphical Tool Based on adb.
Android adb is a command line tool. Ddms features the same as adb, but it has a graphical interface. It is a good choice for people who do not like the current operation method.
These commands are stored in the tools directory of the Android sdk. These commands can be run in both linux and Windows.
First, make sure that a simulator is started on the local machine. Run the following command to check whether the simulator has been started:
- adb devices
- List of devices attached
- emulator-5554 device
- emulator-5556 device
Returns a simulator of 5554.
Install an application on the simulator and run the adb install command.
- adb install /home/myname/test.apk
T in Android adb, test.apk is a packaged application.
The installed program can be found in the simulator directory/system/app using the adb shell command. The file name is the same as that installed.
File transmission: You can use adb pull and adb push to transfer files between a PC and a simulator.
Adb pull Copies files from the simulator to the PC. The usage is as follows:
- adb pull < remote> < local>
Remote indicates the file path of the simulator, and local indicates the file path of the PC.
For example, adb pull/system/app/test.apk/home/myname/test.apk
Adb push returns the file from the PC to the simulator, and push can copy all the task files to the simulator, if you upload an apk file to/system/app/, the function is the same as that of adb install. Usage
- adb push < local> < remote>
Everyone understands that Android is an operating system platform. When a simulator is started, an operating system is started. You can use Android adb to connect to the operating system and run some system commands, just as you usually access a remote linux/unix server through a terminal. You can use adb shell. Run the ls command after the following shell. In this shell, you can run some common commands in linux. Note: adb shell only starts one emulator, if multiple simulators are started, for example, if the adb devices command is used to return two simulators, if you want to connect one of them, add the parameter-s: use the example: adb-s emulator-5554 shell.
- adb shell
- # ls
- sqlite_stmt_journals
- cache
- sdcard
- etc
- init
- init.goldfish.rc
- init.rc
- data
- sys
- system
- proc
- default.prop
- sbin
- root
- dev
- #
Android adb deletes a file. If you use the adb shell to directly access the file and use the rm command to delete the file, the file cannot be deleted. Run adb remount before the adb shell command
- $adb remount;
- $adb shell
- #