0

Is there a way to back up an Android app folder from an emulator to a computer, then restore it to another emulator?

For example, Android emulator A has an app called Foo, therefore it has the following folder with many sub-folders and numerous files: /data/data/com.my.foo

I would like to back up this folder, then restore it to emulator B.

Is this doable?

Hong
  • 17,643
  • 21
  • 81
  • 142

1 Answers1

1

In eclipse:

DDMS perspective -> select emulator in devices tab -> File Explorer on the right hand side

Download to PC and revert the process on the other emulator.


Pushing via adb:

It seems that the eclipse tools does not support putting folders on to device.

pushing from adb commandline: adb root push com.my.foo /data/data/com.my.foo/

cYrixmorten
  • 7,110
  • 3
  • 25
  • 33
  • I can pull the folder in the way you described, but I cannot figure out how to push a folder to the emulator. Could you offer a tip on this? – Hong Sep 28 '13 at 01:59
  • If you hold your mouse over File Explorer and move to your right, you will see two icons with purple/pink'ish arrows. Those are pull/push, respectively. I would assume that to work, otherwise please let me know. – cYrixmorten Sep 28 '13 at 02:06
  • 1
    in case it does not, pushing from adb commandline: adb push com.my.foo /data/data/com.my.foo/ – cYrixmorten Sep 28 '13 at 02:09
  • I see the two icons which I use frequently for individual files. The pull can handle folders, but the push does not seem to be able to handle folders. – Hong Sep 28 '13 at 02:16
  • Try the commandline i added im last comments. You might have to do adb - e shell then su and then the above command without adb – cYrixmorten Sep 28 '13 at 02:29
  • Thanks a lot for your persistent help. Actually, I have been trying to figure out how to use the command to to avail. I got an error described in the following post: http://stackoverflow.com/questions/11497660/move-an-entire-folder-from-windows-to-android-emulator According to the answer, one can drag and drop a folder to the emulator, but I cannot. I do not know if anything is wrong with my setup. – Hong Sep 28 '13 at 02:33
  • Hallelujah! The command line works. Thanks a lot! Could you add the command line to your answer so that I can mark it? – Hong Sep 28 '13 at 02:41
  • Nice! :) did you need to do su, or was the current answer enough? – cYrixmorten Sep 28 '13 at 05:53
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/38227/discussion-between-hong-and-cyrixmorten) – Hong Sep 28 '13 at 10:10