• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Intro to Android HFS and Backup

gpup

Newbie
Jul 8, 2013
39
0
Hi,

I wonder if anyone knows of a resource that has a good intro to Android's Hierarchical File System. I have a background in computer science and technology, but Android's OS has a hierarchical file system like I have never seen, and it baffles me. I am simply trying to back up all the files on my phone so that if I lose my phone I can just reload the whole directory onto a new phone and don't have to reload files manually. This should be simple.

My phone is rooted. I learned that I cannot use ADB pull (USB connection) to download the files directly to my computer because root access is blocked over ADB without sideloading a different OS. So instead, I am using a root file explorer and trying to copy my phone's directory onto a microSD card. The problem is that there seem to be a lot of aliases (directory shortcuts) on the Android HFS. But rather than copying the shortcuts as shortcuts (as one would expect), for every shortcut, it tries to copy all the files over again, which puts the copy function into somewhat of a loop and fills up the SD card rather quickly. (e.g if there are 10 shortcuts to a file, it will copy the file 10 times, and worse, sometimes directory shortcuts are nested and circular so it attempts to copy the same directory an infinite number of times. If anyone can recommend a resource that explains how the Android HFS works, I would be grateful, so I can understand how to make a legit copy of all the files without sending the copy function into an infinite loop. Simple task!

I can't believe how much time it's taking just to figure out how to make a backup copy of my phone.

Thanks much,
Ben
 
You could install a terminal emulator (like this one) and do a system dump of all of your partitions using dd (you may also wish to have busybox installed)
Hi Palm Tree. Thanks so much for your help. I actually already have Terminal Emulator installed. Apologies for my ignorance on the topic, but can you please help me understand your suggestion? Normally in terminal (on a PC) I would just use sudo ditto / [destination] to flash the whole drive. However, the terminal app on my phone doesn't seem to recognize the sudo command, and the prompt is a $ so it looks like it's not logged in as root. Further, I am confused as to what to put as the destination. Would it just be "/storage/extSdCard"?

Also not familiar at all with dd or busybox (and couldn't even find dd on the play store), or how they work. Are those apps that would just flash my entire phone onto an SD card? Again, please pardon my ignorance and much appreciate the help!
 
Upvote 0
Since youre rooted, you could save yourself the headache and install a custom recovery and make a complete backup image

Thanks much for the suggestion. When you say "custom recovery," you're referring to a custom OS for the phone, right? Installing a whole new OS sounds like it would be a lot more work than just flashing a copy of the drive as is, or am I missing something here (entirely possible!)? Thanks again for the assistance.
 
Upvote 0
Hey mate :beer:
By "custom recovery" i mean like ClockworkMod or TWRP. these arent custom roms, they just replace the stock recovery mode of the phone giving a lot more options including the ability to make a backup of the entire phone, everything (firmware, apps, system apps, an image of how the phone was when you made the backup) :thumbup:
 
Upvote 0
Okay, I tried to install TWRP and now my phone is stuck in "download mode" and I can't figure out how to get out of it. I am using "Recovery Tools Flasher to install TWRP. I emailed the developer and am still waiting to hear back. My phone jus says "Downloading Do not turn of Target!" and won't do anything else or give me a status. It's been about an hour and I really need to use my phone. Any thoughts. All this just to backup my phone! you'd think it would be a little easier!
 
Upvote 0
I am rooted. Yes, the tool indicated that it is compatible with my phone. When I looked up the intructions it seemed I needed to use a tool like that. In any case, my phone has been showing "Downloading Do not turn off target!!" for about 4 hours. Anyone know how to get out of this so I can finally back up my phone? Not to mention USE it again!
 
Upvote 0
I see a lot of reference to using Odin to install TWRP but can't find instructions anywhere as to HOW to use it, or where to download the appropriate files. Sulky, I would guess there would be instructions all over the place for the GS4, but when I Googled it they all just said to use one of the tools, so I found one that said it was compatible with my phone and now my phone doesn't work. Ugh, and this was supposed to be the "easy" way to do a complete backup, according to funkylogik.

I am thinking if I can find these instructions you refer to somewhere, that maybe I can try that and somehow I can install TWRP using my USB cable and my computer. Any idea where the instructions for the GS4 might be? When I open Odin, it looks like there are 6 possible types of files I can upload to the phone: Ops, Boot, Phone, Pda, CSC, and EFS. Which category does the TWRP custom recovery fit into? And where can I download the TWRP recovery without using one of the tools (which apparently I was not supposed to use....ooops....).
 
Upvote 0
I haven't used Odin in a long time. But if you do get TWRP installed, it will make a complete back up of your phone. In Funky's defense, it'll be easy when you figure out what's going on. You'll see. :)

You might be able to find the instructions through this site. Here's the Galaxy S4 forum. Scroll down and choose your carrier. Then go to the the All Things Root Guide. There will be list of guides. Asking your questions there would probably get you better help at this point.

If you don't want to back up the entire phone, Titanium Backup or Helium provides an alternative.
 
Upvote 0
Thanks, and glad to hear TWRP will do a complete backup!

Ok, good news: I was able to get out of download mode (FINALLY, and much to my relief!). It took me hours to do, but I got it. I'm still not entirely sure how I did it. It seems like MAYBE it was plugging the phone into USB and then holding down ONLY the volume down button, but I can't be certain. Phone rebooted into normal mode and seems to be working. Thank goodness, but what a waste of an evening!

Okay, now to try again, but first to confirm that the steps are right so I don't soft brick my phone (again) or hard brick it. I posted in the other forum, but in short, it looks like Goo Manager is the way to go, based on this:

TeamWin Projects - TWRP 2.7 - Samsung Galaxy S4 (AT&T) | TeamWin

Does that sound right? The only thing I can't figure out is that when I start to follow the steps on that page, the file Goo Manager says it's going to install is openrecover-twrp-2.6.3.1-jflteatt.img

Why wouldn't it install the latest version, 2.7.0.1? And does it matter? Think it's safe to click ok to proceed this time?

Thanks again for your help!
 
Upvote 0
PS It was this site that gave me all the different things to try to get out of download mode. Even though those are all ways to get INTO download mode, one of them got me out of it (as I say I think it was: phone powered off, hold down volume minus, then connect to computer and when it starts up it asks if I want to install custom OS. Just say No and then it booted normally, but not certain if that was what did it).

http://forum.xda-developers.com/showthread.php?t=1953930
 
Upvote 0
DOWNLOAD:
Most devices can be updated quickly and easily with the TWRP Manager app:
Play Store Link
1) Install TWRP Manager from the Play Store
2) Open TWRP Manager and provide root permissions
3) Hit Advanced->Install Recovery
4) Verify the correct device name on your screen then press Install Recovery if the correct device is showing
OR:
You can find more information and download links on our website!

It does I think. I found that on the first post.
 
  • Like
Reactions: gpup
Upvote 0
Ah, yes, it's right there! Well, no luck. When I tried that, it started downloading the 2.6.3.1 file. So I just went ahead and did it. It said "Recovery Flashed Successfully," but then when I tried to reboot into recovery mode I got that same "Downloading Do not turn of Target!" screen again. Fortunately, I knew how to get out of it this time! Strange, right?
 
Upvote 0
I just gave Goo Manager a try and same result. It showed recovery successfully installed, but when I restarted into recovery I was back on the Download Screen. I can now confirm how to get out of the download screen:

1) Hold down power for a few seconds, or remove battery to power off the phone.
1)a) Replace battery if you removed it
2) Hold down the volume down button
3) While holding down the volume down button, hold down the power button
4) Once the phone vibrates to indicate it's starting up, release the power button, but keep holding down the volume down button.

Now you're presented with the following message:
"Warning!!

A custom OS can cause critical problems in your phone and installed applications. Installing a custom OS on your device may cause it to shut down as a result. Please see manual for details.

If you want to download a custom OS, press the volume up key. Otherwise, press the volume down key to cancel.

Volume up: Continue
Volume down: Cancel (restart phone)"

Here's where I've been pressing volume down to restart. Is it worth trying to press volume up? I'm not trying to install a custom OS, just the TWRP custom recovery.
 
Upvote 0
I was just the option in Goo Manager/TWRP Manager that says "Reboot in Recovery." Interestingly, using the [volume down + home + power] method brings me straight to that warning screen about installing a custom OS. Should I "Continue" or "cancel?"

FYI, I also tried using the TWRP Manager to create a backup from within the app and when I started the backup, the phone restarted (presumably to go into recovery mode to create the backup), but went straight to the download screen.
 
Upvote 0
Well, I figured out part of it: looks like recovery mode on the GS4 is actually volume UP + home + power. When I do that, it brings me back to the "Downloading...do not turn off target" screen. I think the volume down combo sends me to "download mode" which gives me that warning screen about the custom OS. Still doesn't answer the question about how to get into the TWRP recovery screen though. I wonder what happens if I Continue. But it also sounds risky!
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones