user198923
user198923

Reputation: 489

How can I re-install an app that I am developing after a bad install?

I'm having a bit of a problem here!

I have been successfully installing and uninstalling my app on my phone. However my most recent install was interrupted when i accidentally removed the wire from my laptop during the installation.

After that I "uninstalled" the app then I tried to re-install it through my laptop via an android studion build. The result was an error......

DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/electrichappiness.com.makemyday" pkg: /data/local/tmp/rockit.cup.myAppName Failure [INSTALL_FAILED_UID_CHANGED]

After doing significant research, I tried... 1. to access the /data/ folder of my phone (which I can see nothing in - my phone is not rooted) in order to delete any remnant files that could be causing an issue 2. Clearing my cache for all of my apps 3. Re-installing over it (always fails) 4. I tried to rename my app files and signature in order to have it register as a different app (no change oddly)

I have read many of the posts on stackoverflow but cannot figure out how to solve my problem. Any ideas?

From my logcat:

07-11 07:44:58.703  29261-29261/? E/memtrack﹕ Couldn't load memtrack module (No such file or directory)
07-11 07:44:58.703  29261-29261/? E/android.os.Debug﹕ failed to load memtrack module: -2
07-11 07:44:58.773     710-1512/? D/PackageManager﹕ installPackage , uri:file:, flags:66, installer:null, uid:2000, pid:29261, userId:UserHandle{-1}
07-11 07:44:58.783      710-826/? W/MountService﹕ getVolumeState(/storage/ext_sd): Unknown volume
07-11 07:44:58.783      710-826/? W/ActivityManager﹕ No content provider found for permission revoke: file:
07-11 07:44:58.803      710-826/? W/ActivityManager﹕ No content provider found for permission revoke: file:
07-11 07:44:58.803      710-826/? I/PackageManager﹕ Copying native libraries to /data/app-lib/vmdl117110110
07-11 07:44:59.293      710-826/? W/PackageManager﹕ Package couldn't be installed in /data/app/myFakeCompany.com.myTestApp.apk
07-11 07:44:59.553  17358-29255/? D/AutoSetting﹕ service - handleMessage() stop self
07-11 07:44:59.563  17358-17358/? D/AutoSetting﹕ service - onDestroy() END
07-11 07:44:59.563  17358-29255/? D/AutoSetting﹕ service - handleMessage() quit looper
07-11 07:44:59.994      710-877/? D/PMS﹕ acquireWL(442cea80): PARTIAL_WAKE_LOCK  AlarmManager 0x1 710 1000
07-11 07:45:00.064    1140-1140/? D/AppWidgetHostView﹕ updateAppWidget mInfo = AppWidgetProviderInfo(provider=ComponentInfo{ch.bitspin.timely/ch.

Upvotes: 2

Views: 2961

Answers (1)

Zeus
Zeus

Reputation: 432

Android Studio is trying to install an app using adb shell install -r yourapp.apk ('-r' means reinstall the app, keeping its data).

You can install the .apk manually from the bin folder using adb install yourapp.apk or on another partition adb install -s yourapp.apk ('-s' means install on SD card instead of internal storage).

If all fails try rebooting your phone and re-running your app from studio.

Okay here goes nothing.. All possible options I could think of:

 1. Install              : `adb install appname.apk`
 2. Re-Install           : `adb install -r appname.apk`
 3. SDCard               : `adb install -s appname.apk`
 4. Clear Package        : `adb shell pm clear PACKAGE-NAME`
 5. Remove data          : `adb shell; cd /data/data/; rm -r PACKAGE_NAME`
 6. Forward lock Install : `adb push appname.apk /sdcard/; adb shell pm install -l /sdcard/appname.apk;`
 7. (Up/Down)grade API   : `Re-Compile the app and try installation.`

 *. Factory Reset (LAST RESORT)**

 *. User Resolution      : `I had to completely re-write my app as a new project under android studio to fix the problem.`

Upvotes: 1

Related Questions