Storage Issue - Google Pixel 4 XL Questions & Answers

Every single Nexus and Pixel device I've ever had is plagued with this issue. Basically, at some point of using the device, I end up with a folder called "storage" in the user directory. Deleting this folder wipes out the entire sdcard directory, completely clearing out all of the user data, photos, etc.
When I navigate it from root, it looks like this:
Code:
/storage/emulated/0/storage/emulated/0/
Code:
/sdcard/storage/emulated/0/
When connecting the device via mtp, it shows up under the internal shared storage as "storage".
Is there any way to get this to stop happening? This bug is very annoying.
It is a very, very old issue.
https://www.reddit.com/r/Android/comments/16e6kc/i_just_deleted_a_random_folder_in_my_internal/

Related

sdcard "01" folder in internal storage

Today, I have experienced a very "odd" problem. I have just found out that there is a folder called "storage" visible in my Internal Storage.
When I thought that, since it was visible, it did not contain much useful files (Only 2 xml files I found which would be in both internal and external storage) so I deleted that folder and everything in my SD Card and Internal Storage vanished.
I found out that the "storage" folder had a link to both storage devices but the weird thing is, why was that there and why is it visible? I could of sworn that I have never seen that before on my Xperia Z...
Can anyone else see their "storage" folder in the internal storage or is it just me?
ZeroInfinity said:
Today, I have experienced a very "odd" problem. I have just found out that there is a folder called "storage" visible in my Internal Storage.
When I thought that, since it was visible, it did not contain much useful files (Only 2 xml files I found which would be in both internal and external storage) so I deleted that folder and everything in my SD Card and Internal Storage vanished.
I found out that the "storage" folder had a link to both storage devices but the weird thing is, why was that there and why is it visible? I could of sworn that I have never seen that before on my Xperia Z...
Can anyone else see their "storage" folder in the internal storage or is it just me?
Click to expand...
Click to collapse
Hi.
At root, i have sdcard and sdcard1 and storage. Inside storage folder i have sdcard0 and sdcard1. I have seen this before for long time ago.
CiscoX said:
Hi.
At root, i have sdcard and sdcard1 and storage. Inside storage folder i have sdcard0 and sdcard1. I have seen this before for long time ago.
Click to expand...
Click to collapse
but this is totally different from what I have experienced.
From Windows, Internal Storage would have a folder called "storage" with another folder called "01" inside the storage folder. So "Internal Storage/storage/01/" if it was read on a Windows PC. inside the storage folder, there is just 1 folder called "01", nothing else. inside "01" folder, there are ONLY 2 .xml files which are the same as the 2 .xml files you would have by default in the root of your Internal and External Storage.
In short- Internel Storage has a folder called storage, inside storage has a folder called 01, inside 01 there are only 2 .xml files. The strange thing is, if it were linked to Internal/External Storage, why only 2 .xml files are visible in the 01 folder?
EDIT: When I tried to delete the storage folder (At the time I did not know that it was linked) Windows loading bar for deleting files did not move so I had to cancel it. Once cancelled, everything in my external/internal storage was wiped off. Thankfully, I recovered most of my lost pictures with Recuva
Not sure but I think this folder came somehow from the recovery maybe a bug.
I hope you didn't lost important things.
Sent from my GT-I9500 using xda premium
ZeroInfinity said:
but this is totally different from what I have experienced.
From Windows, Internal Storage would have a folder called "storage" with another folder called "01" inside the storage folder. So "Internal Storage/storage/01/" if it was read on a Windows PC. inside the storage folder, there is just 1 folder called "01", nothing else. inside "01" folder, there are ONLY 2 .xml files which are the same as the 2 .xml files you would have by default in the root of your Internal and External Storage.
In short- Internel Storage has a folder called storage, inside storage has a folder called 01, inside 01 there are only 2 .xml files. The strange thing is, if it were linked to Internal/External Storage, why only 2 .xml files are visible in the 01 folder?
EDIT: When I tried to delete the storage folder (At the time I did not know that it was linked) Windows loading bar for deleting files did not move so I had to cancel it. Once cancelled, everything in my external/internal storage was wiped off. Thankfully, I recovered most of my lost pictures with Recuva
Click to expand...
Click to collapse
Yes, this is very strange. I remember when i did see this after i bought my phone i was thinking this must be an bug. Another thing, in root i also have a folder named: ext_card and it is the same as sdcard1 here. Sdcard1 is my microSD card i have, but why so many folder linked to the same folders.
At root i go to storage, inside i have folders: emulated, removable, sdcard0, sdcard1 usbdisk.
Inside emulated i have 0 and legacy. etc etc
All of them are linked and goes to the same internal card and external card,
gm007 said:
Not sure but I think this folder came somehow from the recovery maybe a bug.
I hope you didn't lost important things.
Sent from my GT-I9500 using xda premium
Click to expand...
Click to collapse
If it really is a bug, we need to know what did actually cause this to happen.
And yeah, Recuva was really useful for me
CiscoX said:
Yes, this is very strange. I remember when i did see this after i bought my phone i was thinking this must be an bug. Another thing, in root i also have a folder named: ext_card and it is the same as sdcard1 here. Sdcard1 is my microSD card i have, but why so many folder linked to the same folders.
At root i go to storage, inside i have folders: emulated, removable, sdcard0, sdcard1 usbdisk.
Inside emulated i have 0 and legacy. etc etc
All of them are linked and goes to the same internal card and external card,
Click to expand...
Click to collapse
Too many linked folders make it confusing, why would there be a linked folder visible in the Internal Storage though? this is what is really confusing me right now.
Need more reports if any one else has found this mysterious "storage" folder in their Internal Storage...
im not sure but if everyone with this folder are running 4.2.2 it is for the multiuser or multitasking feature of jellybean 4.2.2
skinsfanbdh said:
im not sure but if everyone with this folder are running 4.2.2 it is for the multiuser or multitasking feature of jellybean 4.2.2
Click to expand...
Click to collapse
Strange, this is the first time I have ever seen this. I only saw this folder today and I have been on custom roms based on stock xperia firmware android 4.2.2 for ages now... Why would it appear just today? I don't think multitasking will cause this to happen since it doesn't create any folders/files related to it (afaik).
I've had something like this happen where in emulated/0 (my main internal SD storage) there was another 0 folder that freaked out recoveries and such. I had the similar "can't delete from windows" thing, but using a in-recovery file manager I just deleted it, problem solved. tl;dr if you want to delete it and its causing problems delete it from recovery.
Sent from rooted carbon note 2, with the xda app.
shbaldw said:
I've had something like this happen where in emulated/0 (my main internal SD storage) there was another 0 folder that freaked out recoveries and such. I had the similar "can't delete from windows" thing, but using a in-recovery file manager I just deleted it, problem solved. tl;dr if you want to delete it and its causing problems delete it from recovery.
Sent from rooted carbon note 2, with the xda app.
Click to expand...
Click to collapse
exactly what im talking about. lots of threads in the htc one forum about it and being this device was released with 4.1.2(like the htc one) and has recently been updated to 4.2.2(like the htc one) maybe its the same thing, not saying it is because i dont know. just sounds like the same thing
shbaldw said:
I've had something like this happen where in emulated/0 (my main internal SD storage) there was another 0 folder that freaked out recoveries and such. I had the similar "can't delete from windows" thing, but using a in-recovery file manager I just deleted it, problem solved. tl;dr if you want to delete it and its causing problems delete it from recovery.
Sent from rooted carbon note 2, with the xda app.
Click to expand...
Click to collapse
Windows did not make any progress in deleting it, it was stuck on the Preparing to delete... window. Once I cancelled it because it took too long, everything from sd card/ internal storage was gone. All because of that storage folder inside my Internal Storage...
I know about the emulated/0 issue (From previous HTC One X Android 4.2.2 AOSP roms) but this seems to be completely different from it.
skinsfanbdh;44594029...and being this device was released with 4.1.2(like the htc one) and has recently been updated to 4.2.2(like the htc one)...[/QUOTE said:
hmm, I updated my phone from 4.1.2 to 4.2.2 prior to seeing this. This might be the cause. Anyone else have this happen?
Sent from rooted carbon note 2, with the xda app.
Click to expand...
Click to collapse
shbaldw said:
hmm, I updated my phone from 4.1.2 to 4.2.2 prior to seeing this. This might be the cause. Anyone else have this happen?
Sent from rooted carbon note 2, with the xda app.
Click to expand...
Click to collapse
I don't think it has anything to do with an upgraded android version. Like I said before, I have been on Android 4.2.2 a long time now (Upgraded when the firmware first came out) and I have never seen this folder before. I have just seen it yesterday. Another strange thing is that after I attempted to delete the storage folder, Everything was gone INCLUDING that storage folder. I haven't seen the storage folder after that happened. I'm going to go flash another rom and full wipe to see if the storage folder pops up again.
EDIT: Right, no there is no more storage folder in Internal Storage after a full wipe and formatted everything! Very strange indeed...
Wierd storage folder symlink inside internal storage!
ZeroInfinity said:
I don't think it has anything to do with an upgraded android version. Like I said before, I have been on Android 4.2.2 a long time now (Upgraded when the firmware first came out) and I have never seen this folder before. I have just seen it yesterday. Another strange thing is that after I attempted to delete the storage folder, Everything was gone INCLUDING that storage folder. I haven't seen the storage folder after that happened. I'm going to go flash another rom and full wipe to see if the storage folder pops up again.
EDIT: Right, no there is no more storage folder in Internal Storage after a full wipe and formatted everything! Very strange indeed...
Click to expand...
Click to collapse
I know this is a very old thread but I face the same issue in Android 5.1.1 now and I too deleted the folder named storage only to see that all the data from the sd card has vanished because of that. Any idea what caused this buggy symlink to be created?
All my data is now gone because I just deleted one folder inside my sdcard, and I didn't even think to backup anything since I didn't even dream that deleting a single folder will delete the parent folder! Again recuva was my friend but still I am not able to recover everything in internal storage, any suggestions on what to use to scan the internal storage?
anantharam said:
I know this is a very old thread but I face the same issue in Android 5.1.1 now and I too deleted the folder named storage only to see that all the data from the sd card has vanished because of that. Any idea what caused this buggy symlink to be created?
All my data is now gone because I just deleted one folder inside my sdcard, and I didn't even think to backup anything since I didn't even dream that deleting a single folder will delete the parent folder! Again recuva was my friend but still I am not able to recover everything in internal storage, any suggestions on what to use to scan the internal storage?
Click to expand...
Click to collapse
Did you upgrade to newer firmware using a zip? That's a common bug when upgrading via zip.
The only proper way is to backup ur entire internal storage and flash a full ftf. Then you will not have the annoying symlink.
langeveld024 said:
Did you upgrade to newer firmware using a zip? That's a common bug when upgrading via zip.
The only proper way is to backup ur entire internal storage and flash a full ftf. Then you will not have the annoying symlink.
Click to expand...
Click to collapse
I did do a factory reset before flashing a new firmware. Not sure what else I should do..
And as for the internal storage recovery, I followed these different guides but raw file using vhdtool and recuva did not give me any single file that was last present in my internal memory and even extundelete didn't return any single file that was in the internal storage, some of these tools return hundreds of text files and images that I had no idea was in my internal storage but none of them return me any of the hundreds of images and videos that I was sure were in my internal storage.
anantharam said:
I did do a factory reset before flashing a new firmware. Not sure what else I should do..
And as for the internal storage recovery, I followed these different guides but raw file using vhdtool and recuva did not give me any single file that was last present in my internal memory and even extundelete didn't return any single file that was in the internal storage, some of these tools return hundreds of text files and images that I had no idea was in my internal storage but none of them return me any of the hundreds of images and videos that I was sure were in my internal storage.
Click to expand...
Click to collapse
Yes but if you factory reset on 4.4.2 (for example) and then flash 5.0.2 fw via zip in recovery, you will get the annoying folder symlink.
The only way to upgrade to lollipop is by flashing a full ftf (which will wipe internal sd) after that you won't have the annoying symlink.
But you flashed zip instead of ftf and discovered the folder symlink which seemed not harmful to delete so you deleted it. Right?
Then there's no chance in getting the data (photos etc) back.
I was the same situation as you, twice, I tried every possibility to recover my photos but it ended up with nothing. Everything was gone.
On a mechanical harddrive, when you wiped data, the data will only be gone when the wiped sectors are overwritten (e.g. format harddrive, which overwrite with empty buffer).
As long as the wiped data in those sectors are not overwritten, you'll be able to recover almost all - if not all - data you deleted.
On flash memory instead, (such as ssd drives and internal storage of our phone) deleted data is immediately deleted.
(that's also one of the reasons on Android, you never have to defragment the internal sd, same story for an ssd)
I'm sorry for u to say but I'm afraid you're unfortunately lost the photos and there's no way to get it back.
But my advice to you is:
Never upgrade between android versions (e.g. 4.4 > 5.0) using a zip installable.
Only use full factory images (ftf), they will wipe internal sd in order to get correct mappings so backup everything before flashing.
Once u on a firmware, an update to the same firmware is allowed (e.g. from one 5.0.2 rom to another 5.0.2 rom).
I hope it helps u in the future.
Regards
langeveld024 said:
Yes but if you factory reset on 4.4.2 (for example) and then flash 5.0.2 fw via zip in recovery, you will get the annoying folder symlink.
The only way to upgrade to lollipop is by flashing a full ftf (which will wipe internal sd) after that you won't have the annoying symlink.
But you flashed zip instead of ftf and discovered the folder symlink which seemed not harmful to delete so you deleted it. Right?
Then there's no chance in getting the data (photos etc) back.
I was the same situation as you, twice, I tried every possibility to recover my photos but it ended up with nothing. Everything was gone.
On a mechanical harddrive, when you wiped data, the data will only be gone when the wiped sectors are overwritten (e.g. format harddrive, which overwrite with empty buffer).
As long as the wiped data in those sectors are not overwritten, you'll be able to recover almost all - if not all - data you deleted.
On flash memory instead, (such as ssd drives and internal storage of our phone) deleted data is immediately deleted.
(that's also one of the reasons on Android, you never have to defragment the internal sd, same story for an ssd)
I'm sorry for u to say but I'm afraid you're unfortunately lost the photos and there's no way to get it back.
But my advice to you is:
Never upgrade between android versions (e.g. 4.4 > 5.0) using a zip installable.
Only use full factory images (ftf), they will wipe internal sd in order to get correct mappings so backup everything before flashing.
Once u on a firmware, an update to the same firmware is allowed (e.g. from one 5.0.2 rom to another 5.0.2 rom).
I hope it helps u in the future.
Regards
Click to expand...
Click to collapse
Thank you very much for the detailed explanation, after wasting two whole days trying everything described anywhere in the internet for recovering data from internal storage, I have also learnt it the hard way that it won't be possible to recover my data. Anyways the good news is google photos had backed up most of my photos, so it would actually be the call recordings, whatsapp history and other documents that I would have to loose permanently.
langeveld024 said:
Never upgrade between android versions (e.g. 4.4 > 5.0) using a zip installable.
Click to expand...
Click to collapse
As for the upgrade issue, is this only for lollipop or any android version? I have never seen anything similar when I upgraded from 4.0 to 4.1 or 4.2 to 4.4 e.t.c. If I shouldn't use zip installable to upgrade android versions how else do I upgrade to kitkat or lollipop? I don't think there are any factory images published for lollipop for my phone since support for it ended long time ago.
ZeroInfinity said:
Today, I have experienced a very "odd" problem. I have just found out that there is a folder called "storage" visible in my Internal Storage.
When I thought that, since it was visible, it did not contain much useful files (Only 2 xml files I found which would be in both internal and external storage) so I deleted that folder and everything in my SD Card and Internal Storage vanished.
I found out that the "storage" folder had a link to both storage devices but the weird thing is, why was that there and why is it visible? I could of sworn that I have never seen that before on my Xperia Z...
Can anyone else see their "storage" folder in the internal storage or is it just me?
Click to expand...
Click to collapse
Am again reviving this old thread as today I deleted a folder named sdcard inside my oneplus 3's internal storage and lost everyrhing. Though I had never upgraded my phone using any zip file and always went with the OTA update
I also made a thread https://forum.xda-developers.com/oneplus-3/help/strange-t3537998

[Q] Lost most of my internal storage?

Today when trying to free up some space on my HTC One (S-OFF, rooted, latest FW, etc), with the phone connected to the computer I cut and pasted the 'storage' folder into a folder on my computer. After this, most of my internal storage folders were gone, most notably all my Camera pictures. I looked in the folder that was copied to the computer and these folders aren't present. I also tried to do an adb pull from the root directory and the missing files weren't there either.
Looking at my phone storage, it says i have 20GB used by 'Other', which gives me hope that these files are still somewhere on the device. I did a search in a few applications looking for jpg files or any lost files but didn't come up with anything.
Has anyone else encountered this or have any idea if these files are still somewhere on the device? I know it was a stupid thing to do and didn't have a cloud backup set
Could you see the photos before you cut and pasted? What you've described doesn't sound like it should have caused your photos to disappear, but an upgrade would.
On a 4.1 ROM, the sdcard points to /data/media. On a 4.2 and beyond ROM, the sdcard points to /data/media/0. I would have a look in /data/media.

Storage issue (Phantom partition?)

So my One has been well above 20gigs of used space for some time, With an average of about 3 gigs of free space at any given time. I've checked my sdcard folder and it is about 5gb of space total (with downloads and everything else). There have been occasions where I plug the phone into USB and go to a folder quick and the files are ones I've never seen before (example in downloads folder the files are different then my actual downloads folder). I also have a directory 0, emulated, and legacy inside of Storage. These are exact synced copies of sdcard. Each taking up the same space (so 4x the actual amount of used space) and if I delete a file/folder for anyone of these directories it removes it from all including the sdcard.
Has anyone experienced this? is there a way to fix this without wiping the entire phone clean?
jmalone1187 said:
So my One has been well above 20gigs of used space for some time, With an average of about 3 gigs of free space at any given time. I've checked my sdcard folder and it is about 5gb of space total (with downloads and everything else). There have been occasions where I plug the phone into USB and go to a folder quick and the files are ones I've never seen before (example in downloads folder the files are different then my actual downloads folder). I also have a directory 0, emulated, and legacy inside of Storage. These are exact synced copies of sdcard. Each taking up the same space (so 4x the actual amount of used space) and if I delete a file/folder for anyone of these directories it removes it from all including the sdcard.
Has anyone experienced this? is there a way to fix this without wiping the entire phone clean?
Click to expand...
Click to collapse
Do you go between AOSP/Sense roms? I don't see it anymore but it used to happen back when AOSP first starting coming out for the phone. It had to do with the multiuser support. It would leave all your Sense files but it would move the AOSP folder so you couldn't access them. Flashing a sense rom would let you access those files. I believe you can also access them by using a root explorer (es file also has a root option) and going up to /data/media you should be able to see those files and /data/media/0 should be the AOSP files.
jmalone1187 said:
So my One has been well above 20gigs of used space for some time, With an average of about 3 gigs of free space at any given time. I've checked my sdcard folder and it is about 5gb of space total (with downloads and everything else). There have been occasions where I plug the phone into USB and go to a folder quick and the files are ones I've never seen before (example in downloads folder the files are different then my actual downloads folder). I also have a directory 0, emulated, and legacy inside of Storage. These are exact synced copies of sdcard. Each taking up the same space (so 4x the actual amount of used space) and if I delete a file/folder for anyone of these directories it removes it from all including the sdcard.
Has anyone experienced this? is there a way to fix this without wiping the entire phone clean?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2158466 here is some info
Thanks for the replies! Will give this stuff a shot. Thank you

XT890 Data loss? HELP!!!!! PLease!

I can't believe this.
The same crap happened to me on a second XT890. I'm lost for words.
here is what happened.:
Got a phonecall, when I wanted to pick it up the phone would turn off saying not enough power, at 30 % !!???
Ok, so no big deal I thought,...turned it back on, had the same person calling me, everything was fine. Then i noticed the stored mms images would not load inside the conversations. Si turned the phone off and on again, mms images are loading again.
Got another phone call and my personal ringtone, gone, no longer there. Couldn't even switch it back even though the file, supposedly was there. Then I tried to play the file, google play music would not.
Next, all my images are gone, no longer folders of the camera and images and videos. Using quickoffice , that app says, no files on the internal sd card! WTF!?
Turning the phone off an on again, let me see the files on the card again, even let me play an audio file, going in and out of the folder, the files disappeared again.
So long story short. Everything seems to work except my files are gone and quickoffice and fileviewers won't find the files. When i put in an external sd card that works fine on other devices, it won't load the files, images, videos, only maybe 3 of 100!? What the hell.
This is the second time on a different phone but same model this has happened.
I can't afford to loose the images and recordings. are they gone? what has happened? I ran DR Fone recovery, and even that won't find the images i need,
Phone is rooted. And it's driving me nuts. Battery was replaced 6 months ago, everything was fine. Now that.
Please help, need my files, desperately.
What could have caused this? ? What is not working properly? Indexing? Gallery? Quickoffice?
Could be a corruption in the data
" corruption on your internal memory
" corruption on the system partition or dalvik
See if adb can find the files on your internal sdcard. With the command: adb shell ls /storage/sdcard0/[path to video/photo]
Thanks will try.!
In the meantime Root Browser shows the sd card as empty, and last time changed as 8/5/12 which was the build date of the phone.... :-/
Funky, When hooking up for adb and running a command the files and sd card became visible. So while visible I was able to safe all the files to external card. When restarting the phone the internal sd and files disappeared again. I cleared cache and dalvik and media storage, no effect. files remain hidden. Running sd maid it says system files are hidden. using es file explorer running showing hidden files i get a no permission response. same for sd card, says no permission. so something is blocking me. virus? i don't really use wlan or internet, wondering how to get everything working again. files and everything is there, but i have no access.
Still looks like a corruption somewhere. I should just safe all files that u need, backup data and do a full system restore and start over. With full I mean also a internal memory wipe.
Maybe there is a much better option, but I don't know any atm.
Still fiddling with it. Thought I just do a factory reset. Well didn't work.
Somehow before I did the reset the media store app was moved to sd card and a different apk was placed in system / app folder.
After the restart you guessed it, all data was gone as expected. Gallery and ringtones and video, and so on won't show. The media storage apk is in system/app folder, but it won't show under settings/apps/all.....
Not being an expert I think I messed this up by switching out the apks,.../
The one now in the system folder is: version 4.04-1351904261 but I need version 4.04-1344118159
Who can tell me where i can find one?

[Q] What did I do wrong "cloning" w/ TWRP Nandroid Backup/Restore?

My Note4's power switch failed (again). This will be the 5th one I've had in 2 years.
Despite the poor hardware quality and reliability, I like the phone and want to keep it for a while longer.
So I got a refurbished replacement, which I wanted to "clone" using TWRP's nandroid backup.
Before starting, I verified the new phone had exactly the same version (5.1.1, N910TUVU2DOK2), and it did.
Then I installed TWRP (twrp-3.0.2-0-trltetmo.img.tar) on the new phone with Odin, and booted into TWRP recovery, and installed UPDATE-SuperSU-v2.76-20160630161323.zip for systemless root, so the new phone was identical (although I suspect the nandroid restore would overwrite that anyway?)
On my original phone I booted to TWRP (luckily TiBack has boot to recovery since the power switch is bad). and backed up everything (except cache - used default options selected) to the ExtSD card.
Then I powered down, and moved the ExtSD card and SIM from the old phone to the new phone.
Important trick: To get TWRP restore to even recognize the backup is there, I had to rename the /TWRP/BACKUPS/xxxxxxxx code to new phones 8 digit ID (can be found with ADB devices)
On the new phone, I boot to TWRP, and Restore Data and System. I did not restore Boot, Modem, or Recovery.
I restarted the new phone, and it took a bit longer than normal but booted to my exact setup. It looked promising at first. It connected to LTE, and Wi-Fi, made a call, etc. Apps and settings appeared to be loaded and ran. ExtSD card with existing photos was visible to Camera and Gallery.
But then I started getting errors about the SDcard not being available. Next I discovered apps couldn't find their databases. I connected by USB and looked at the internal storage and compared it to my backups.
On the old phone the directory /storage/emulated/legacy/Android/data contains over 250 folders such as com.android.chrome.
On the new phone, after restoring, /storage/emulated/legacy/Android/data contains about 50 folders.
So my process of restoring Data and System did not actually restore all the data. What did I miss?
Update - I've continued to research this. I read this article, this article on partitions, and this article, and other posts on this forum about TWRP and Nandroid. I still don't see anything wrong with the procedure I followed. All the internal data should be backed up into the Data partition.
Further update: I found this article: What is EXCLUDED from a TWRP backup?
It's quite unexpected that a backup that is an "image" of a partition would exclude anything, but putting that aside, it is not obvious what is excluded.
The article says "Creating a backup of the user data partition will NOT include /data/media (your internal storage)!"
But where that "internal storage" is located in the filesystem?
As I browse from the root of the file system over FTP, the root / directory contains directories like .system, etc, proc, mnt, bin, and others that are common to unix/linux. One of those is /storage, which contains /storage/emulated/0. At that level I see what I would consider the "internal storage" These directories also appear as a folder named "Phone" when the phone is connected to a computer by USB. Folders like Alarm, Download, Movies, Pictures, Playlists are found here. There is a folder called data, but it does not contain a folder called media as referenced in the exclusion statement above.
/storage also contains /storage/extSdCard, which has the contents seen in the folder shared as Card over USB.
At the root of the file system there is another folder called data, but it is not accessible, either from on the phone with a root-level file explorer, or remotely by FTP.
In conclusion, my experience shows that all Internal Storage ( /storage/emulated/0) is indeed excluded from the Nandroid backup. It is still unclear why the note refers to internal storage as /data/media, though. That particular location does not seem to exist, at least on this phone with Android 5.1.1
/storage contains the mount points that the file systems for the internal storage, SD card, and any OTG storage attached to the phone.
Here's the working procedure for "cloning" a phone: copying an image of a phone to another identical phone.
1) Make a Nandriod Backup of the source phone (one way is with TWRP recovery backup function), store to MicroSD
2) Remove the MicroSD card, and mount it on a computer. Locate the folder /TWRP/BACKUPS/xxxxxxxx, where xxxxxxxx is the ID of the source phone, which can be seen using "ADB devices" when the phone is connected by USB. Find the ID of the new phone, and rename the folder to that ID. Otherwise, TWRP restore will not see the backup.
3) insert the MicroSD card and SIM from the source phone into the destination phone. Boot to recovery. Perform TWRP restore from the set with the current date. Reboot to Android. At this point the destination phone should boot normally, although it seems to be slower the first time.
4) Connect the source phone and the destination phone to a computer by USB, Synchronize the Internal data (mounted as MTP device) from the source to the destination phone. (TWRP Backup does not include the Internal data partition). It would probably be better to do this from recovery, I tried to do that, but was unable to cause the Internal partition to mount over USB while in TWRP recovery. So I let both phones boot to Android and synced that way. Reboot destination phone again to make sure apps find the new data on Internal. Power off source phone if desired.
Additional items that had to be done to restore the previous state:
Systemless root did not survive. I had to boot back to recovery and reinstall UPDATE-SuperSU-v2.76-20160630161323.zip. You could probably do that in recovery right after the restore, but I cannot confirm since I didn't do it that way.
Wi-Fi passwords were not retained. I had to re-enter.
All Bluetooth devices have to be re-paired, since the new phone has a different MAC address.
If you use an IP address reservation, it has to be updated with the new Wi-Fi MAC address.
Re-set Smart Lock if you use it
Re-activate any software that is registered to a specific phone rather than your Google account.

Categories

Resources