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 run commands in Android adb

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Today, I will talk to you about how to run commands in Android adb. Many people may not know much about it. In order to make you understand better, the editor summed up the following contents for you. I hope you can get something from this article.

Android mobile phone operating system as an open source system is loved by the majority of developers. We can modify this in the simulator of this system in order to achieve our own purpose. For example, in the operation of interface graphics, you can compile by yourself through a debugging tool such as Android adb.

On the concept of Android floating-point Foundation

Advantages and disadvantages of Android performance in practical Development

In-depth Analysis of Android Code structure

Detailed explanation of related concepts of Android screen elements

Android virtual appliances apply to your deployment goals

Android's main debugging tool adb (Android debuging bridge), ddms is a graphical tool based on adb.

The main topic here is Android adb, which is a command line tool. Ddms has the same function as adb, except that it has a graphical interface. It's a good choice for people who don't like the way it works.

These commands are in the tools directory under Android sdk. These commands can be run in both linux and window

First of all, make sure that an emulator has been started on this machine. Determine if an emulator has been started to use the command:

Adb devices List of devices attached emulator-5554 device emulator-5556 device

Returns a 5554 simulator.

Install an application for the simulator, using the command adb install

Adb install / home/myname/test.apk

In Android adb, test.apk is a packaged application.

The installed programs can be found in the emulator directory / system/app with the adb shell command, and the file names are the same as those installed.

File transfer: adb pull and adb push can be used for file transfer between PC and simulator

Adb pull copies files from the simulator to the PC, using the following methods

Adb pull

< remote>

< local>

Remote represents the simulator file path, and local is the PC file path.

For example: adb pull / system/app/test.apk / home/myname/test.apk

Adb push copies the files 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/, it has the same effect as adb install. Usage

Adb push

< local>

< remote>

Everyone knows that Android is an operating system platform, and an operating system is started by starting an emulator. You can use Android adb to connect to the operating system and run some system commands, just as people usually use terminals to access a remote linux/unix server. You can use adb shell. Run the ls command after shell as follows. Under this shell, you can run some commonly used commands under linux. Note: adb shell starts only one simulator (emulator). If multiple simulators are started, for example, the adb devices command just used returns two simulators. If you want to connect one of them, add the parameter-s: use such as: 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 delete files, if you use adb shell to directly enter with the rm command to delete files can not be deleted. Run adb remount before the adb shell command

$adb remount; $adb shell # after reading the above, do you have any further understanding of how to run commands in Android adb? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

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

Development

Wechat

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

12
Report