[Q] Getting Exception while uninstalling app using ddmlib 23.1.3.jar

hii guys I am trying develop a java app that makes Android device into Kiosk i have started development using ddmlib23.1.3 jar i was able to succesfully uninstall the system apps using the sequence of adb commands (on a rooted device) now I am trying to uninstall user apps from the device where I am getting Exceptions
Trail 1:

device.executeShellCommand("pm uninstall "+apkName, receiver);//apkName contains package

I have kept Log for printing status i got following messages

Uninstalling : com.foxit.mobile.pdf.lite
..
Status :
..
Status :
..
Running Command : pm uninstall com.foxit.mobile.pdf.lite
..
Status : Failure


Trail 2:

i got status as Failure so i have included 'su' permission for command

device.executeShellCommand("su -c 'pm uninstall "+apkName+"'", receiver);


package Name : /data/app/com.foxit.mobile.pdf.lite-1.apk=com.foxit.mobile.pdf.lite
..
Uninstalling : com.foxit.mobile.pdf.lite
..
Status :
..
Status :
..
Running Command : su -c 'pm uninstall com.foxit.mobile.pdf.lite'
..
Status : Segmentation fault


Trail 3:

then i tried with the default method in the API

String status = device.uninstallPackage(apkName);


then i got following messages in log

..
package Name : /data/app/com.foxit.mobile.pdf.lite-1.apk=com.foxit.mobile.pdf.lite
..
Status : Unknown failure
..


please help me how to solve this problem

thanks in advance

Show Accepted Answer

Guest Quick Reply (No URL, BBcode or HTML)

Last post by stoy
4 hours ago
Last post by bprohaska
4 hours ago
Last post by wilderman.neoma
1 hour ago
Last post by samson24
1 hour ago
Last post by erice
41 minutes ago
Last post by chanelle14
2 hours ago
Last post by thammes
4 hours ago