Andriod: How do I uninstall applications that have been installed on the simulator?

Source: Internet
Author: User

I encountered a problem when performing an operation on helloworld according to my learning:

After the layout is modified, the following error is returned when the simulator is re-linked:

Installing helloworld.apk...
Re-installation failed due to different application signatures.
You must perform a full uninstall of the application. Warning: This will remove the Application Data!
Please execute 'adb uninstall com. China. helloworld' in a shell.
Launch canceled!

 

What's going on?

The reason is that the installed APK program has different signatures. When published to the Android Market, the APK signature is generated by jarsigner and keytool, then the APK file installed through ADB install will automatically sign the debug permission. The two RSA hashes are different, so this problem occurs. The solution is to uninstall the original one first: "You must perform a full uninstall of the application ".

According to the prompt "Please execute 'adb uninstall com. China. helloworld' in a shell", you can run the command ADB by running the CMD command.

 

Okay... try to uninstall it.:

CMD-> Cd D:/Android-SDK-Windows/tools-> ADB uninstall com. China. helloworld

Result:

After searching it, I did not have the ADB tool in my SDK ..... -_-!

 

[From: http://www.hiapk.com/bbs/thread-623-1-1.html]

So what is this ADB?

ADBAndroidDebug Bridge is a tool in the android SDK. It can be used to directly manage Android simulators or real Android devices (such as G1 mobile phones ).
Its main functions include:

  • Run the shell of the device (command line)
  • Manage port ing between simulators and devices
  • Upload/download files between computers and devices
  • Install the local APK software on a simulator or Android device

ADB is a client-server program, where the client is the computer you use to operate and the server is an Android device.

 

ADB installation method:

The client needs to be installed on the computer. The client is included in the SDK. The device does not need to be installed. You only need to enable the option settings-applications-Development-USB debugging on the mobile phone.
For Mac and Linux users, after the downloaded SDK is decompressed, you can ~ Or any directory. Then modify ~ /. Bash_profile file, set the runtime environment to point to the SDK's tools directory.
Open ~ /. Bash_profile file (if this file is not available, you can add it yourself), add a line in it:
Export path =$ {path }:< your SDK directory>/tools
For example:

Then you can useADBCommand.
You can skip the installation steps and directly enter the full path to use the command, for example:

For Windows XP users, the USB driver must be installed first.Android_usb_windows.zip(1.33 MB)

Then, if you only want to useADBIf you do not want to download the entire SDK, you can download thisADBToolkitAdb_win.zip(571.56 KB)

Downloads: 173232009-4-16

Download and decompress the package.ADBPut the. exe and adbwinapi. DLL files in the Windows/system32 folder on the system disk.

 

Now let's talk about several commands commonly used by ADB:

1. View Devices

ADBDevices

This command is used to view the currently connected devices. The Android devices or simulators connected to the computer are listed and displayed.
2. Install software

ADBInstall <APK file path>

This command installs the specified APK file on the device.

3. uninstall software

ADBUninstall <software Name>

ADBUninstall-k <software Name>

If the-k parameter is added, the software is uninstalled but the configuration and cache files are retained.

4. log on to the device Shell

ADBShell

ADBShell <command>

This command will log on to the shell of the device.
The <command> command is used to directly run the device command, which is equivalent to executing the remote command.

5. Send files to the device from the computer

ADBPush <local path> <remote path>

Use the push command to copy files or folders on the local computer to the device (mobile phone)
6. download files from your device to your computer

ADBPull <remote path> <local path>

Run the pull command to copy files or folders on the device (mobile phone) to the local computer.

7. display help information

ADBHelp

This command displays help information

 

PS.

I put the downloaded file to the Directory D:/Android-SDK-Windows/tools installed by my SDK, and query the device in cmd, consistent with the response (the simulator is not on ...):

 

Turn on the simulator and you can see the helloworld application from the Application List:

 

Go to CMD and check that the currently connected device is Simulator-5554, as shown below:

 

 

Run the ADB command to delete the helloworld application. The result is success:

 


Now, go to the simulator and you will see that the helloworld program has been deleted:



 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.