Blog/20161228 Using SSHelper to backup your internal Android phone memory
Using SSHelper to access/backup your internal Android phone memory
As of Android 4.4 USB Mass Storage was no longer supported, which made transferring data from the internal (non-removable) memory tricky. Of course you can still transfer your pictures over MTP (and perhaps do other tricks with MTP). However, if you want to get to your files (especially preserving file stamps), this is trickier.
- Using a file browser, you can copy to external SD card (if you have a slot), but this doesn't preserve file stamps.
- You could zip from internal to external (but that means you may be limited in file size).
- Android File Transfer is not that great to use and (from memory) doesn't preserve file stamps. (I've had some cases where large video files (while working ok) had different sizes after an Android File Transfer, which didn't really inspire confidence.)
- "adb pull" is possible, but also doesn't preserve times stamps.
None of the above really support incremental backup.
Moving files from internal -> external (securely) seems like an obvious requirement. However, I searched for a bit, and there doesn't seem to be a "file move and check" application for Android (between internal and external SD card memory). While this would be quite easy to write, it may have limited use as many phones don't have external SD card slots these days (or even if they do, may use unified memory).
I don't really have a solution for the average android user, but if you're familiar with shell commands (especially rsync), then it's actually easy to retrieve files (with time stamps and checking) from internal memory.
I've previously used busybox to create shell-environment on Android (though it wasn't for the purpose of backup). However, busybox wasn't that straight forward to install (and there are various considerations, such as add-ons for openssh), so on a new Android phone, I didn't go down that route initially. However, it turns out that the SSHelper application (available here http://arachnoid.com/android/SSHelper/) provides a very simple way to get busybox with an openssh server running. Just install the application, and you can reach your internal data with rsync. The website http://arachnoid.com/android/SSHelper/ explains how, and the app is available here https://play.google.com/store/apps/details?id=com.arachnoid.sshelper.
Of course, the above is only useful if you know about rsync already or are willing to learn. However, http://arachnoid.com/android/SSHelper/ does provide some instructions (including windows) as well, so you may like to learn.
(There are other options for rsync, https://play.google.com/store/search?q=rsync, but SSHelper seemed like a good one, and busybox is useful for other things as well.)
2016-12-28 | Back to blog [[Category:]] [[Category:]] [[Category:]]|