When I push a command adb uninstall com.pckg the /data/data/com.pckg is deleted, but I want to preserve the folder w/o using adb uninstall -k com.pckg as I need to install another app with same package name & different signature which conflicts with -k cmd.

I tried mv /data/data/com.package /data/data/com.package1 but com.package1 got deleted after adb uninstall command.

I don't want to copy the folder to a new location because it takes a lot of time.

  • After moving/renaming the package I would reboot the device to make sure all file-handles to the old directory are closed (file-handles survive a rename and then point to the new location).
    – Robert
    Commented Mar 27, 2018 at 18:34
  • @Robert I will try that soon and will update here. Btw is there any way to do this without rebooting the device? Commented Mar 28, 2018 at 7:25
  • AFAIK there is a daemon (installd?) that handles (de)installations. Restarting this daemon would be sufficient. However I have never heard that Android daemons can be restarted linke regular Linux daemons. May be killing the daemon restarts it?
    – Robert
    Commented Mar 28, 2018 at 13:29

1 Answer 1


if you are already rooted why dont you use titanium backup
Steps :

  1. Install Titanium Backup ★ root
  2. Launch it and grant root permissions
  3. locate to the app and backup it
  4. now close titanium backup and uninstall app
  5. install the 2nd apk(the one with different signature)
  6. launch titanium backup and restore the existing backup but restore DATA ONLY not whole app

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .