Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the SDK method in Android

Shulou Source: shulou.com Published: 2022-05-31 22:52:01 09月21日 Update

This article mainly explains "how to use the SDK method in Android". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to use the SDK method in Android".

1. Install and uninstall the APK package on the Android simulator

Adb install [- l] [- r]

< file>

-push this package

File to the device and install it

('- l' means forward-lock the app)

('- r 'means reinstall the app, keeping its data)

Adb uninstall [- k]

< package>

-remove this app

Package from the device

('- K' means keep the data and cache directories)

Installation:

Adb install filename.apk D:\ android-sdk\ tools > adb install filename.apk * daemon not running. Starting it now * * daemon started successfully * 347 KB/s (111196 bytes in 0.312s) pkg: / data/local/tmp/filename.apk Success

Uninstall:

Adb uninstall filename.apk

Or

Adb shell rm data/app/filename.apk

two。 Using sd card on the Android simulator

Generate a sdcard image file:

Mksdcard: create a blank FAT32 image to be

Used with the Android emulator

Usage: mksdcard [- l label]

< size>

< file>

If

< size>

Is a simple integer, it specifies

A size in bytes

If

< size>

Is an integer followed by'Kwan, it

Specifies a size in KiB

If

< size>

Is an integer followed by'Make, it

Specifies a size in MiB

D:\ android-sdk\ tools > mksdcard.exe-l sdcard

2048M sdcard.img

Launch the simulator: emulator-sdcard sdcard image file

For example: emulator-sdcard sdcard.img

Put resources into sdcard: adb push source-file / sdcard

For example:

D:\ android-sdk\ tools > adb push NOTICE.txt / sdcard 1088 KB/s (156733 bytes in 0.140s)

Use the command adb shell to view the sdcard directory:

D:\ android-sdk\ tools > adb shell # ls sdcard NOTICE.txt Thank you for reading. The above is the content of "how to use the SDK method in Android". After the study of this article, I believe you have a deeper understanding of how to use the SDK method in Android, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Methods simulators learning content files mirrors commands that is ideas situations articles more directories knowledge knowledge points articles resources follow problems practice Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Microsoft Shulou Technology Xiaomi Docker