tags:

views:

57

answers:

1

Hi,

I want to write a program which can install and uninstall an application over android device.As these features are provided over android device,but from where should i start and which files are required to be seen to develop my own application. please help me out.

Thnx in advance.

Praween

A: 

In case this is for an independent desktop solution, you can write a simple shell script that executes the following commands. I'm assuming you have the Android SDK installed, as it's required.

To install example.apk located somewhere on your desktop hard drive:

cd location_of_sdk\tools
adb.exe install path_to_apk\example.apk

To uninstall the app:

cd location_of_sdk\tools
adb shell

Inside the adb shell execute:

cd /data/app
ls

This will display the apps installed on the device. Look for the .apk associated with the app you want to uninstall. It'll look something like "com.abc.xyz.apk" - then execute:

rm com.abc.xyz.apk
exit
Andy Zhang