Flashing an 4.2.2 rom and file structure issue. - Sprint HTC One (M7)

I decided to start this thread as both assistance for some as well as a collaberation on workarounds when you a person flashes a 4.2.2 rom coming from a 4.1.2.
Just like some (maybe most) I flashed CM 10.1 and played around a bit with it and decided it was just not ready to be run as a daily. Being the flashalohic that I am, I made sure I backed up before flashing CM 10.1 so when I went into recovery and went to restore imagine my surprise when it was blank, yep nothing was there. Why did this happen? Well doing some research and reading/searching I found out that the update from Android 4.1.2 to 4.2.2 changes the file structure of the 'virtual' sdcard on our devices. Actually it changes it for every device. What has changed is that the ability to add user accounts, similar to any regular computer, has been implemented. However, if the proper steps are not taken before you flash a new 4.2.2 Rom, you will end up with a huge mess and run out of room on your device in a hurry.
The actual location when viewed with a root file manager has been here on 4.1.2:
/data/media
And though you will see the same files in /sdcard and /storage/sdcard0, those are just symlinks to the same info, just like a shortcut (on a windows box) or alias (on a mac box). Once you flash a 4.2.2 ROM, the actual location gets changed (and all the files moved) to here:
/data/media/0
And the symlinks get changed to /sdcard/0 and /storage/sdcard0/0. On the surface, no big deal, right? Wrong. The problems arise if the version of your custom recovery is not compatible with a 4.2.2 ROM. If it is not and you keep flashing 4.2.2 ROMs you might soon end up in trouble. If, while using the 'older' custom recovery, you continue flashing, your sdcard ends up somewhere around here:
/data/media/0/0/0/0/0/0 (etc.) with all your files copied to every '0' directory and your symlinks end up the same way, and your device quickly runs out of space (the dreaded "your device is low on storage" message).
This may also make it very difficult to restore your nandroid of a 4.1.2 ROM as well. If you are already in that situation, not to worry, the solution for that is later in this post.
So far I have only been able to to copy all the files found in the last /data/media/0/0/0/0 (?) folder to my computer. Then using a file manager that will show hidden files and folders, copy/move the files in the last '0' directory to:
/data/media/0
And then use file explorer to delete all the other '0' directories until I have just this one:
/data/media/0
leaving nothing else in the symlinks but /sdcard/0 and /storage/sdcard0/0. This techniques is if you end up with a huge file structure.
****BACK UP YOUR SD CARD FIRST!!!!! before deleting any 0 folders!!!****
NOTE: A reboot of your device is essential at this point.
If after flashing a 4.2.2 ROM you decide you don't like it and want to restore your nandroid to your saved 4.1.2 ROM, how does that work out?
1.) Get yourself a (good) root file browser.
2.) Brows to /data/media/0
note: this is where android (and almost everything else that uses a Linux kernel) mounts anything that is considered "external" storage.
3.) Do all of your file fixing from here. It will make changes universally.
4.) select all within /data/media/0 and then paste everything back into /data/media selecting merge and/or overwrite. Once done, just delete the /data/media/0 folder, reboot your phone and Profit.
This is a pain and I agree but at this point is the only way I know how to get around this. If anyone knows other ways please share.
* While writting this I came across this info from user elfaure. I havent tried this yet as I am at work and get crappy signal but please post results if you try and if it works, please thank him! *
elfaure: Ok folks for next guy who decides to upgrade to 4.2 but does NOT want the multi-user environment, give this a try.
1. Download the attached file
2. Remove the .txt extension
3. Copy it to your /data directory
4. Open Android Terminal Emulator (Free Market app if you don't already have it)
5. At the prompt type "cd /data"
6. Type "chmod 644 .layout_version" on the file in /data (/data/.layout_version)
Code:
cd /data
chmod 644 .layout_versionNow when you upgrade to 4.2 you should stay single user and have no /data/media/0 directory when you are done. If anyone tries this please let me know if it works and thank me if it does.
ps-its just a special file in a special location, the presence of which tells Android NOT to upgrade your system to a multi-user environment. If you later decide you want multi-users, delete the file and reflash (from recovery) the stock or custom firmware or ROM or recovery. If your custom ROM or recovery wipes the entire /data partition less /data/media including this file, obviously then this will not help, but with latest versions of ROMs and recoveries that should not happen any more.
http://forum.xda-developers.com/showthread.php?p=40911246#post40911246
It also looks as if he may be working on a script to help as well and I will keep track and update as needed.
So far this is what I have come up with and I hope it helps some and I hope others that are smarter than I can correct me if I am wrong on any of the above or other add information on other ways to correct this.

I think this is part of my issue but I don't have any 0 folder under data?
I too flashed the 4.2.2 ROM, and noticed that every everything on my sd card had somehow moved to my internal memory? When I went to reflash the ROM it failed. It I also tried to reflash the ROM I was originally running and it too failed. Luckily I was able to do a nandroid restore so the phone is "usable" but TWRP 2.5 still does not see my my external sd and that seems to be that make reason I can not do anything within in the recovery.
Any suggestions?

The op is telling you exactly how to fix it.

lizardking7112 said:
I think this is part of my issue but I don't have any 0 folder under data?
I too flashed the 4.2.2 ROM, and noticed that every everything on my sd card had somehow moved to my internal memory? When I went to reflash the ROM it failed. It I also tried to reflash the ROM I was originally running and it too failed. Luckily I was able to do a nandroid restore so the phone is "usable" but TWRP 2.5 still does not see my my external sd and that seems to be that make reason I can not do anything within in the recovery.
Any suggestions?
Click to expand...
Click to collapse
Let my clarify:
I have used two different file managers and even used to terminal emulator using ls -la to make sure i have no hidden files
sdcard0/data/ there is no media directory
Maybe this isn't my problem, since I don't see any file/dir with a 0, but all this mess started when I loaded up a 4.2.2 ROM?

Everyone should check this out to aid you in your flashing addiction.
Happy flashing!
http://forum.xda-developers.com/showthread.php?p=42237249
Sent from my HTCONE using Tapatalk 2

I flashing an aosp Rom and nothing in my sd card changed. Maybe I'm lucky?
Sent from my HTCONE using Tapatalk 4 Beta

Good information

so does this work? will i be able to nad back to sense and all my files are in the right place?

I couldn't get it to work, the attachment. However the new recovery I linked to looks to have promise but I haven't tested it yet cause I'm remote right now and need my phone at the moment. Will give it a go this weekend.
Sent from my HTCONE using Tapatalk 2

Seems @imneveral0ne has found a way to assist folks that like to go between 4.2.2 and 4.1.2
Check out his thread here.
http://forum.xda-developers.com/showthread.php?p=42512892
Sent from my HTCONE using Tapatalk 2

Weighing in, worked like a charm for the most part. TWRP recreated another TWRP folder inside its original TWRP folder (it has to be left at /data/media/0/TWRP for you to be able to reinstall a nandroid backup) [also forgoing obvious yo dawg joke here], but besides that my phone is back to being right as rain.

Nice write up on this issue. Thanks
sent via my tranquil⊙NE

I'm sure it wouldn't work for doing a nandroid restore, but on my Galaxy Nexus I would just make certain I had the latest version of TWRP, boot into recovery, format the SD card, and then push the rom files to /data/media/ and flash. That is my only complaint about this change, really...truly "clean" installations are inherently more risky or difficult, dependent on your knowledge level.

It won't let me delete folder 0 no matter what. Inside that folder is a ViperRom folder that won't delete as well no matter what I do!

Thanks for this info. I think I'm going to take the plunge this weekend so this will be very helpful info.
Sent from my HTC ONE using xda app-developers app

I think it moved my ROM data into the 0 folder, how do I get it out? Everything else from the 0 folder is deleted except for ViperROM's folder, and whenever I try to move or delete it, it just fails the operation. I already have a copy out of the 0 folder, but I still want it out, because otherwise I can't flash things, since it just shows the the almost* empty sdcard/0 folder. Help? Should I just put my mods in the 0 folder and deal with it?

Bseagull said:
I think it moved my ROM data into the 0 folder, how do I get it out? Everything else from the 0 folder is deleted except for ViperROM's folder, and whenever I try to move or delete it, it just fails the operation. I already have a copy out of the 0 folder, but I still want it out, because otherwise I can't flash things, since it just shows the the almost* empty sdcard/0 folder. Help? Should I just put my mods in the 0 folder and deal with it?
Click to expand...
Click to collapse
No. There is a script out there you can flash that will help. Check out post # 10.
Sent from my One using Tapatalk 4

So can we delete the legacy file now? I haven't done anything with my internal storage since coming from 4.1.2 for the first time. It looks like twrp 2.6.3 copied all my files correctly to the 0 file but all the files are still also in "legacy" folder. Is it duplicate that I can delete from legacy or are they just symlinked? I am never going back now that we have official 4.3 release.

ivwonka said:
So can we delete the legacy file now? I haven't done anything with my internal storage since coming from 4.1.2 for the first time. It looks like twrp 2.6.3 copied all my files correctly to the 0 file but all the files are still also in "legacy" folder. Is it duplicate that I can delete from legacy or are they just symlinked? I am never going back now that we have official 4.3 release.
Click to expand...
Click to collapse
I am not certain to be honest. It looks like the file structure didn’t change with the release of 4.3 so it’s possible that they are symlinked. If all your files are moved to the /0/ folder and you have nothing in the legacy folder it would make sense that you would be able to but I have yet to test this.
I suppose this weekend I could back up the phone and file tree and give it a shot

Thanks for the response. I haven't tested out yet either but will post back if I do.

Related

[FIXED] [Q] XT860 - Broke my /system/app folder...

EDIT: Fixed! Procedure I used was to download Danifunker's system dump, move it to /sdcard/ via adb push, then run the following:
Code:
adb shell
su dd if=/sdcard/mmcblk1p21.img of=/dev/block/mmcblk1p21
This completely refreshed my /system folder. Original post below:
--------------------------------------------------------------
Hello XDA forumgoers, longtime reader first time poster here. I'm currently posting because I made a few mistakes. Several mistakes, actually.
1. In my quest to de-bloat my XT860, I accidentally removed one file too many, which caused my phone to mysteriously not have a cell signal. (com.motorola.service.main kept crashing.) So I hit the forum and grabbed a system dump from this thread (thanks Willis111):
http://forum.xda-developers.com/showthread.php?p=17501981
I had bought the phone with some version of Cyanogenmod Recovery installed by the previous owner, so I was able to use that and ADB to stick the .apks and .odex files in the /system/app folder, chmod 644 them, and even factory reset for good measure.
2. As I soon found out, I had somehow made things worse. The phone, when boot into, shows the "press android to begin" page, but com.motorola.service.main and some other apps keep FCing on me, and I can't progress past that screen. In my haste, I didn't backup any of my system folders at all, though, I still backed up my apps with Titanium.
Tl;dr:
presumably none of the /system/app apks boot, most notably com.motorola.service.main. How do I fix this? Can I?
Try to flash
http://forum.xda-developers.com/showthread.php?t=1288823
You also need to chown 0:0 both the apk and the odex
Have you tried using my original system dump? It was taken with dd, so things like symlinks and the other sort should be functional. The only caveat is that a number of apps were frozen at the time, so you may need to unfreeze them with titaniumbackup.
http://www.multiupload.com/SORQERFAYT
DoubleYouPee: Is this that chinese rom I've heard of? I heard that if I flash this, I can't root my phone. So I think I'll save this one as a last resort.
eww245: chown'd, no result.
daniflunker: how do I open this?
jonsicoli said:
DoubleYouPee: Is this that chinese rom I've heard of? I heard that if I flash this, I can't root my phone. So I think I'll save this one as a last resort.
eww245: chown'd, no result.
daniflunker: how do I open this?
Click to expand...
Click to collapse
What about rootkeeper?
DoubleYouPee said:
What about rootkeeper?
Click to expand...
Click to collapse
I can't get past the "click android" screen, so I probably can't install or run it. Any way to do it via adb or Cyanogenmod Recovery?
I really appreciate the help.
jonsicoli, if you want to restore your *entire* /system folder (not just apps) you would run a similar command-set as this.
1. Copy the file to the internal memory
adb push c:\path.to.folder\mmcblk1p21.img /sdcard
the file will be located in the root of the sdcard (or you could drag and drop the file in USB storage mode)
2. Do a full restore on system memory *I have not checked to ensure this is working... but a command similar to this should work
adb shell
su dd if=/sdcard/mmcblk1p21.img of=/dev/block/mmcblk1p21
- wait -
(it would have to write about 500mb and replace all of the contents of /system )
reboot
_______________________________________________________
Okay, if you just want to look at the files, you could use a linux machine to mount the filesystem (it is a standard ext3 FS) or you could do what I have done on my windows system:
Install EXT2FsD from http://sourceforge.net/projects/ext2fsd/files/latest/download?source=files
Then install OSFMount from http://www.osforensics.com/tools.html
Point the OSFMount program to the img file that you downloaded and assign it a drive then voilla!
I am pretty sure this is a bit of overkill, but this should completely restore your system close to factory (minus the APKs that were upgraded/disabled, plus the fact root was done)
Thanks Danifunker! I reset my entire /system folder, and restoring my user app backup. I'm just relieved to have my phone back. Now to mark this thread as solved.
Awesome!!!!!! Glad to hear my system dump works! Thanks for testing
My command lines were written correctly also I guess?
Sent from my XT860 using XDA App
searched for like 8 hours until i found this thread. Just what i needed, i had system image for 2.3.6 from your other post but no command.

Downgrading 4.2.2 AOSP to 4.1.2 Sense

MAKE SURE TO MAKE A BACKUP OF INTERNAL STORAGE BEFORE YOU TRY THIS. IT WORKED FOR ME, BUT YOUR RESULTS MAY VARY!
I did not make this file, it was made for the Note 2, unfortunately I can't find the original thread for it. I had assumed it would not work for us, because the Note 2 had an actual SD card slot, and our phone does not. Anyway, I just tried it and sure enough, it does work perfectly.
If you decide you want to flash back to a 4.1.2 Sense rom from a 4.2.2 AOSP rom go ahead and wipe your phone like you normally would, flash the rom of your choosing, and then flash this file before you reboot. Only thing you'll have left after you reboot the phone, is the "0" folder. But it's empty since it moved all your files back to where they should be. Make sure you delete that "0" folder after the reboot. When I rebooted to TWRP after setting up, it appeared I had nothing on internal storage because it was still reading the "0" folder.
I'm very happy that this file actually works so now I can play with all the roms I want without the headache.
Me or the original creator of this file are not responsible for what you chose to do with your phone! That said it worked for me, and it SHOULD work for you.
Thanks for sharing.
Thanks for taking the leap and trying this out and then sharing.
Sent from my HTCONE using Tapatalk 2
Added this to my FAQ Guide Q14
Worked like a charm. Thanks! :good:
Thanks OP, worked perfectly for me as well.
For anyone who didn’t know about this problem before flashing a 4.2.2 ROM (like me!), and doesn’t have a back-up of their internal SD, I found one way to retrieve it. Although there was nothing too terribly important on it, I experimented with ADB while in recovery and found that I could pull a copy of the entire internal SD with one command. For anyone else who finds themselves in this position and wants to try it, the command I used is:
Code:
adb pull /sdcard/ c:\sdcard\
This is probably dirt simple for most folks here, but I had to try a few times before figuring out how to do it without it simply dumping ALL the files right into my tools folder! That will work, but it can be a mess to sort out. The command above will create a folder in the root directory of your PC named sdcard and very neatly plop all the files in the correct place. You can change the destination to suit your needs, of course, but the above worked for me.
Tried it from the q/a thread. Works great dude, thanks a lot.
Awesome! Will try this today, thanks for sharing.
Sent from my HTC d3rpONE using Tapatalk 4 Beta
Thanks for this. May push me over the edge to try some AOSP.
Sent from my rooted HTC One...
Flashed this coming from vanilla root box to tranquil rom, tried deleting the 0 file and it won't let me. I go to recovery, it's still reading the 0 file but it doesn't have anything in there but the twrp file. Help please. Because it wont even let me put anything in the 0 folder to flash.
Sent from HTCONE using Tapatalk 2
I'm having the same problem wished someone could help me out
Sent from my HTC One using Tapatalk 4 Beta
Killer-B said:
Flashed this coming from vanilla root box to tranquil rom, tried deleting the 0 file and it won't let me. I go to recovery, it's still reading the 0 file but it doesn't have anything in there but the twrp file. Help please. Because it wont even let me put anything in the 0 folder to flash.
Sent from HTCONE using Tapatalk 2
Click to expand...
Click to collapse
wfee said:
I'm having the same problem wished someone could help me out
Sent from my HTC One using Tapatalk 4 Beta
Click to expand...
Click to collapse
While in Tranquil, use Total Commander or Root Explorer file explorer to delete the 0 directory. This will break the symlink and TWRP will look at the right directory after that.
Sent from my HTC d3rpONE using Tapatalk 4 Beta
mrrogers1 said:
While in Tranquil, use Total Commander or Root Explorer file explorer to delete the 0 directory. This will break the symlink and TWRP will look at the right directory after that.
Sent from my HTC d3rpONE using Tapatalk 4 Beta
Click to expand...
Click to collapse
I added a few lines to the "updater-script" so that it would delete the "0" folder (as failsafe, in case .sh script didn't delete it) but I need someone to test it. I only added two lines to the actual updater script file so it "should" work. Someone PM me and I'll send you the link.
EDIT:
http://www.mediafire.com/download/628ko5rmqjr5qdw/restore-sdcard-after-downgrade-EWG-Test.zip <--I AM NOT RESPONSIBLE FOR ANY DAMAGE CAUSED BY THIS ZIP. FLASH AT YOUR OWN RISK.
ericwgarza1 said:
I added a few lines to the "updater-script" so that it would delete the "0" folder (as failsafe, in case .sh script didn't delete it) but I need someone to test it. I only added two lines to the actual updater script file so it "should" work. Someone PM me and I'll send you the link.
EDIT:
http://www.mediafire.com/download/628ko5rmqjr5qdw/restore-sdcard-after-downgrade-EWG-Test.zip <--I AM NOT RESPONSIBLE FOR ANY DAMAGE CAUSED BY THIS ZIP. FLASH AT YOUR OWN RISK.
Click to expand...
Click to collapse
Doesn't work for me, I get error when trying to flash
Sent from my HTCONE using Tapatalk 4 Beta
thatotherguy.. said:
Doesn't work for me, I get error when trying to flash
Sent from my HTCONE using Tapatalk 4 Beta
Click to expand...
Click to collapse
I just tested and uploaded a corrected version. I flashed it successfully via my recovery (TWRP) and verified that it deletes the "/data/media/0" folder. Let me know if you have any problems with the new zip. For the people who downloaded this previously, you will need to re-download. My bad on the silly error. :silly:
Link for fixed zip: http://www.mediafire.com/?v26rw54gwgbg19w
ericwgarza1 said:
I just tested and uploaded a corrected version. I flashed it successfully via my recovery (TWRP) and verified that it deletes the "/data/media/0" folder. Let me know if you have any problems with the new zip. For the people who downloaded this previously, you will need to re-download. My bad on the silly error. :silly:
Link for fixed zip: http://www.mediafire.com/?v26rw54gwgbg19w
Click to expand...
Click to collapse
I can confirm it's working
Sent from my HTCONE using Tapatalk 4 Beta
I flash this and it works. However when I use twrp again, 0 folder gets created but nothing else go to that folder except the backup files.
Sent from my HTCONE using xda app-developers app
erikivy said:
Thanks OP, worked perfectly for me as well.
For anyone who didn’t know about this problem before flashing a 4.2.2 ROM (like me!), and doesn’t have a back-up of their internal SD, I found one way to retrieve it. Although there was nothing too terribly important on it, I experimented with ADB while in recovery and found that I could pull a copy of the entire internal SD with one command. For anyone else who finds themselves in this position and wants to try it, the command I used is:
Code:
adb pull /sdcard/ c:\sdcard\
This is probably dirt simple for most folks here, but I had to try a few times before figuring out how to do it without it simply dumping ALL the files right into my tools folder! That will work, but it can be a mess to sort out. The command above will create a folder in the root directory of your PC named sdcard and very neatly plop all the files in the correct place. You can change the destination to suit your needs, of course, but the above worked for me.
Click to expand...
Click to collapse
I should start doing this before every flash. because last night I tried a 4.2.2 rom that didn't boot up and when I went into recovery TWRP was reading from the /0 directory and I didn't have any backup roms to reflash.... so I got worried that I was going to lose all my sdcard data and RUU restore my phone
so if youre phone ever gets stuck with no rom in your directory to flash and you have a working ADB. just move the rom to your ADB directory and type: adb push nameofrom.zip /sdcard/ while in TWRP. once its done pushing the file will show up when you go through the install directory and if you're going back to a 4.1.2 rom make sure you push the restore-sd.zip. I think it's time to invest in an USB-OTG flash drive as a security blanket.
wasn't sure if this method was covered before but just in case things f up. :thumbup:
---------- Post added at 04:07 PM ---------- Previous post was at 04:01 PM ----------
james33440 said:
I flash this and it works. However when I use twrp again, 0 folder gets created but nothing else go to that folder except the backup files.
Sent from my HTCONE using xda app-developers app
Click to expand...
Click to collapse
install esfileexplorer and delete the 0 folder in sdcard directory.
Digitalkarma said:
I should start doing this before every flash. because last night I tried a 4.2.2 rom that didn't boot up and when I went into recovery TWRP was reading from the /0 directory and I didn't have any backup roms to reflash.... so I got worried that I was going to lose all my sdcard data and RUU restore my phone
so if youre phone ever gets stuck with no rom in your directory to flash and you have a working ADB. just move the rom to your ADB directory and type: adb push nameofrom.zip /sdcard/ while in TWRP. once its done pushing the file will show up when you go through the install directory and if you're going back to a 4.1.2 rom make sure you push the restore-sd.zip. I think it's time to invest in an USB-OTG flash drive as a security blanket.
wasn't sure if this method was covered before but just in case things f up. :thumbup:
---------- Post added at 04:07 PM ---------- Previous post was at 04:01 PM ----------
install esfileexplorer and delete the 0 folder in sdcard directory.
Click to expand...
Click to collapse
I don't see that directory at all. However, once I make a backup it is created still.
Sent from my HTCONE using xda app-developers app
thanks I needed that!

[Q] Newly installed ROM /sdcard/0 folder problem. Emulated storage

Ok so, this is a bit hard to explain, I can only take SS's of some of the problem. So a while ago I installed android revolution hd 10. I've since upgraded to 12.x. I noticed sometime inbetween then. That when I go to clock work recovery I am always greeted with the contents of my sd card before I installed the ROM, I have to click on a folder called '0' which is in my sdcard folder. so /sdcard (this is where all my old data is)/0 (then '0' is where all my new stuff since I installed revolution is. To access the location where all of my stuff saves.
So this is the highest level I can get to on my computer and with root browser/es file explorer on my phone: http://gyazo.com/7a3831c0d9934732b8dc5b2e700e422d
But, when I go into recovery I am greeted with this:
http://gyazo.com/13baa0cb30a21c0fb83db3a35965ced3
see how at the top there it says /sdcard That is full of all my old files. and here when I click on /sdcard/0 : http://gyazo.com/8d39545d7561de02452ef3964e4df6fc
You can see at the bottom of these two, a little window into the past. Because my phone has been using this /0 folder as root I guess? So what is going on, it's using about 8gb or so, maybe more idk, has all my pictures and stuff. And I can only get to it in clock work recovery. Which I don't understand.
Hope you can make sense of this. I'm Australian which is why I'm posting now. time zone is incredibly annoying I hardly get replies. Thanks though
I have the same question, hopefully bumping this will get a good response. I can't even transfer my cwm backups because I have no idea how to access them outside of cwm recovery.
lopuandroid said:
Ok so, this is a bit hard to explain, I can only take SS's of some of the problem. So a while ago I installed android revolution hd 10. I've since upgraded to 12.x. I noticed sometime inbetween then. That when I go to clock work recovery I am always greeted with the contents of my sd card before I installed the ROM, I have to click on a folder called '0' which is in my sdcard folder. so /sdcard (this is where all my old data is)/0 (then '0' is where all my new stuff since I installed revolution is. To access the location where all of my stuff saves.
So this is the highest level I can get to on my computer and with root browser/es file explorer on my phone: http://gyazo.com/7a3831c0d9934732b8dc5b2e700e422d
But, when I go into recovery I am greeted with this:
http://gyazo.com/13baa0cb30a21c0fb83db3a35965ced3
see how at the top there it says /sdcard That is full of all my old files. and here when I click on /sdcard/0 : http://gyazo.com/8d39545d7561de02452ef3964e4df6fc
You can see at the bottom of these two, a little window into the past. Because my phone has been using this /0 folder as root I guess? So what is going on, it's using about 8gb or so, maybe more idk, has all my pictures and stuff. And I can only get to it in clock work recovery. Which I don't understand.
Hope you can make sense of this. I'm Australian which is why I'm posting now. time zone is incredibly annoying I hardly get replies. Thanks though
Click to expand...
Click to collapse
Daman09 said:
I have the same question, hopefully bumping this will get a good response. I can't even transfer my cwm backups because I have no idea how to access them outside of cwm recovery.
Click to expand...
Click to collapse
OK, guys a bit of searching would have helped, but here's the short version:
In Android 4.1.2 /data/media = internal storage (or sdcard; whatever you feel like calling it)
as of 4.2.2+, (for multiuser support) it was changed to /data/media/0
so 4.1.2 /sdcard was a symlink to /data/media
in 4.2.2+ /sdcard is a symlink to /data/media/0
Everything (except 0 and legacy which is empty) in /data/media should be moved to /data/media/0
CWM still links to /data/media which you can no longer see on your PC, since it only shows /data/media/0
if you do want it to show, then use this guide to create a symlink: http://forum.xda-developers.com/showthread.php?t=1991657
That's it in a nutshell, if you want more details, search for differences of the file structures of 4.1.2 and 4.2.2+
nkk71 said:
OK, guys a bit of searching would have helped, but here's the short version:
In Android 4.1.2 /data/media = internal storage (or sdcard; whatever you feel like calling it)
as of 4.2.2+, (for multiuser support) it was changed to /data/media/0
so 4.1.2 /sdcard was a symlink to /data/media
in 4.2.2+ /sdcard is a symlink to /data/media/0
Everything (except 0 and legacy which is empty) in /data/media should be moved to /data/media/0
CWM still links to /data/media which you can no longer see on your PC, since it only shows /data/media/0
if you do want it to show, then use this guide to create a symlink: http://forum.xda-developers.com/showthread.php?t=1991657
That's it in a nutshell, if you want more details, search for differences of the file structures of 4.1.2 and 4.2.2+
Click to expand...
Click to collapse
Thanks for this. Oddly, my searching came with this thread.
Now I guess the question is, why hasn't CWM updated to place the backups in easily accessible locations one devices like the One?
Daman09 said:
Thanks for this. Oddly, my searching came with this thread.
Now I guess the question is, why hasn't CWM updated to place the backups in easily accessible locations?
Click to expand...
Click to collapse
You're gonna have to ask the developers about that, just create a symlink as described here: http://forum.xda-developers.com/showthread.php?t=1991657
and it works perfectly, it's what I've done to be able to access the CWM folder from my PC.
Hit the thanks button if I helped

[Q] /sdcard/0 new folder being used as root and /sdcard wasting space

Ok so, this is a bit hard to explain, I can only take SS's of some of the problem. So a while ago I installed android revolution hd 10. I've since upgraded to 12.x. I noticed sometime inbetween then. That when I go to clock work recovery I am always greeted with the contents of my sd card before I installed the ROM, I have to click on a folder called '0' which is in my sdcard folder. so /sdcard (this is where all my old data is)/0 (then '0' is where all my new stuff since I installed revolution is. To access the location where all of my stuff saves.
So this is the highest level I can get to on my computer and with root browser/es file explorer on my phone: http://gyazo.com/7a3831c0d9934732b8dc5b2e700e422d
But, when I go into recovery I am greeted with this:
http://gyazo.com/13baa0cb30a21c0fb83db3a35965ced3
see how at the top there it says /sdcard That is full of all my old files. and here when I click on /sdcard/0 : http://gyazo.com/8d39545d7561de02452ef3964e4df6fc
You can see at the bottom of these two, a little window into the past. Because my phone has been using this /0 folder as root I guess? So what is going on, it's using about 8gb or so, maybe more idk, has all my pictures and stuff. And I can only get to it in clock work recovery. Which I don't understand.
Hope you can make sense of this. I'm Australian which is why I'm posting now. time zone is incredibly annoying I hardly get replies. Thanks though
lopuandroid said:
Ok so, this is a bit hard to explain, I can only take SS's of some of the problem. So a while ago I installed android revolution hd 10. I've since upgraded to 12.x. I noticed sometime inbetween then. That when I go to clock work recovery I am always greeted with the contents of my sd card before I installed the ROM, I have to click on a folder called '0' which is in my sdcard folder. so /sdcard (this is where all my old data is)/0 (then '0' is where all my new stuff since I installed revolution is. To access the location where all of my stuff saves.
So this is the highest level I can get to on my computer and with root browser/es file explorer on my phone: http://gyazo.com/7a3831c0d9934732b8dc5b2e700e422d
But, when I go into recovery I am greeted with this:
http://gyazo.com/13baa0cb30a21c0fb83db3a35965ced3
see how at the top there it says /sdcard That is full of all my old files. and here when I click on /sdcard/0 : http://gyazo.com/8d39545d7561de02452ef3964e4df6fc
You can see at the bottom of these two, a little window into the past. Because my phone has been using this /0 folder as root I guess? So what is going on, it's using about 8gb or so, maybe more idk, has all my pictures and stuff. And I can only get to it in clock work recovery. Which I don't understand.
Hope you can make sense of this. I'm Australian which is why I'm posting now. time zone is incredibly annoying I hardly get replies. Thanks though
Click to expand...
Click to collapse
actually, youve got a great time zone. Most americans are still awake at this time. its 22:45 for me on the east coast of america and 19:45 for anyone on the west coast. anyways. i assume its been doing this since you uprgraded from a 4.1.2 ROM? its still kept this because when updating from 4.1>4.2 it creates user profiles, and all original data gets pushed into a seperate section. download a root explorer app (the most popular on GPlay will work for you) and go to the directory /data/media/ and you should find not only the "old" files you had but the "new ones" too. delete things how you feel need nessesary,
Toxicoblivion said:
actually, youve got a great time zone. Most americans are still awake at this time. its 22:45 for me on the east coast of america and 19:45 for anyone on the west coast. anyways. i assume its been doing this since you uprgraded from a 4.1.2 ROM? its still kept this because when updating from 4.1>4.2 it creates user profiles, and all original data gets pushed into a seperate section. download a root explorer app (the most popular on GPlay will work for you) and go to the directory /data/media/ and you should find not only the "old" files you had but the "new ones" too. delete things how you feel need nessesary,
Click to expand...
Click to collapse
I reposted this in the morning here hahah, because when I'm on at night, like I assume most people are. It's dead in America.
Ok wow so yeah I went into /data/media and it has everything the /sdcard folder has in clock work recovery. Including the /0 folder. can I delete everything except the /media/0 folder? Is that safe, inc the all the .xxxx folders? Thanks as well!!
lopuandroid said:
I reposted this in the morning here hahah, because when I'm on at night, like I assume most people are. It's dead in America.
Ok wow so yeah I went into /data/media and it has everything the /sdcard folder has in clock work recovery. Including the /0 folder. can I delete everything except the /media/0 folder? Is that safe, inc the all the .xxxx folders? Thanks as well!!
Click to expand...
Click to collapse
all i have folder wise is
/0
/clockworkmod
/legacy
/obb
and file wise as
.htc_layout_version
recovery.log
revolution_hd.log
other wise you should be good to delete anything in the /data/media/ path. (take a nandroid, then do your deletes, reboot, and if your phone still works fine, now you know the path to delete the backup in file explorer )
Toxicoblivion said:
all i have folder wise is
/0
/clockworkmod
/legacy
/obb
and file wise as
.htc_layout_version
recovery.log
revolution_hd.log
other wise you should be good to delete anything in the /data/media/ path. (take a nandroid, then do your deletes, reboot, and if your phone still works fine, now you know the path to delete the backup in file explorer )
Click to expand...
Click to collapse
Thanks a bunch!
Toxicoblivion said:
all i have folder wise is
/0
/clockworkmod
/legacy
/obb
and file wise as
.htc_layout_version
recovery.log
revolution_hd.log
other wise you should be good to delete anything in the /data/media/ path. (take a nandroid, then do your deletes, reboot, and if your phone still works fine, now you know the path to delete the backup in file explorer )
Click to expand...
Click to collapse
Hey, so. When I try to delete the folders and files, I've tried in root explorer, root browser and ES file explorer. I select them and then delete. But it doesn't work. Everything just stays there.
Thanks.
EDIT: Don't worry, I just had to restart..
Good
AT&T HTC One | ARHD 12.1
Tbalden Perf Kernel 2.1.5 UV/OC/UC

Can't move TWRP folder off phone

I recently unlocked my bootloader using sunshine and installed TWRP. After rebooting into recovery, I immediately made a backup of my phone. When I plug my phone in, I can see the TWRP folder, but it shows as empty. None of my file explorers can see anything, either. TWRP, however, is able to see it when I go into the file manager. I can't get ADB to see the device when hooked up to my computer while in TWRP. MTP also doesn't work. Chmod 755 and 777 doesn't do anything. I was able to initially copy the TWRP folder into the downloads folder in the TWRP file manager, but now it just hangs there if I try to move it again.
How do I get access to my backup?
evanft said:
I recently unlocked my bootloader using sunshine and installed TWRP. After rebooting into recovery, I immediately made a backup of my phone. When I plug my phone in, I can see the TWRP folder, but it shows as empty. None of my file explorers can see anything, either. TWRP, however, is able to see it when I go into the file manager. I can't get ADB to see the device when hooked up to my computer while in TWRP. MTP also doesn't work.
How do I get access to my backup?
Click to expand...
Click to collapse
http://forum.xda-developers.com/droid-turbo/help/twrp-backup-file-location-t3259060
6Binford said:
http://forum.xda-developers.com/droid-turbo/help/twrp-backup-file-location-t3259060
Click to expand...
Click to collapse
Unfortunately, there aren't any solutions in that thread.
evanft said:
Unfortunately, there aren't any solutions in that thread.
Click to expand...
Click to collapse
There are two solutions in the first 4 posts:
ruledrbrt1 suggests http://forum.xda-developers.com/showpost.php?p=64048593&postcount=2
And GeoFX has the great : http://forum.xda-developers.com/showpost.php?p=64049328&postcount=5
Both work on my phone so they should work on yours too.
Have you given file explorer root privileges?
josephpalozzi said:
There are two solutions in the first 4 posts:
ruledrbrt1 suggests http://forum.xda-developers.com/showpost.php?p=64048593&postcount=2
And GeoFX has the great : http://forum.xda-developers.com/showpost.php?p=64049328&postcount=5
Both work on my phone so they should work on yours too.
Have you given file explorer root privileges?
Click to expand...
Click to collapse
I didn't even see GeoFX's post for some reason. That looks like it worked. Thanks!
TWRP and NAND Backups
I had the same question, and found the previous thread too. So what's the difference between these 2 locations?
/data/media/0/TWRP
and
/sdcard/TWRP
From my point of view, they are duplicates - same data in both folders, just duplicated into separate partitions. If this is true, then my 7.5 GB NAND backup, is really taking up 15GB of memory. Can that be true? I'm doubting it, but you never know.
I started to dive into this, because I was also wondering if NAND backups made copies of my media or not (photos, music, etc). After digging into it a bit, it looks like it does NOT make a backup of anything in the root folder "/data/media" in order to prevent it from non-stop backing up in a loop (you can't back up the location your backing up to, at the same time). This is also noted on github: https://github.com/TeamWin/Team-Win-Recovery-Project/issues/276 Logically, this would make sense since I currently have 25 GB of data in my /sdcard/ location. That's one helluva compression if you were able to get this down to 7.5GB! So I'm guessing this isn't included, which is also why I'm guessing that these are really the same. /sdcard/ must be a shortcut to the /data/media/0/ location, that's my best understanding.
So my original question still stands. What's the reason for these 2 locations, and is there a difference?
This also brings up the next question, what's the best way to make an all-encompassing backup? NAND + Titanium Backup + copy all the contents of your /sdcard/ over to your computer (or OTG drive)?
Florestan2 said:
I had the same question, and found the previous thread too. So what's the difference between these 2 locations?
/data/media/0/TWRP
and
/sdcard/TWRP
From my point of view, they are duplicates - same data in both folders, just duplicated into separate partitions. If this is true, then my 7.5 GB NAND backup, is really taking up 15GB of memory. Can that be true? I'm doubting it, but you never know.
I started to dive into this, because I was also wondering if NAND backups made copies of my media or not (photos, music, etc). After digging into it a bit, it looks like it does NOT make a backup of anything in the root folder "/data/media" in order to prevent it from non-stop backing up in a loop (you can't back up the location your backing up to, at the same time). This is also noted on github: https://github.com/TeamWin/Team-Win-Recovery-Project/issues/276 Logically, this would make sense since I currently have 25 GB of data in my /sdcard/ location. That's one helluva compression if you were able to get this down to 7.5GB! So I'm guessing this isn't included, which is also why I'm guessing that these are really the same. /sdcard/ must be a shortcut to the /data/media/0/ location, that's my best understanding.
So my original question still stands. What's the reason for these 2 locations, and is there a difference?
This also brings up the next question, what's the best way to make an all-encompassing backup? NAND + Titanium Backup + copy all the contents of your /sdcard/ over to your computer (or OTG drive)?
Click to expand...
Click to collapse
The way I understand it, and I might be wrong, is that before Android 4.0 (or maybe 5.0), the partition containing user data was called /sdcard and apps were stored in a separate partition. The partition where apps went was significantly smaller, which could result in people running out of space for apps while still having a ton of free user data. To remedy this, the newer version of android places apps and user data in the same partition (called media). The /sdcard that you see is a symlink (shortcut) to this new partition, and is included so that older apps that were designed to expect the /sdcard partition to be there will still work.

Categories

Resources