Hey guys
let me give you some background informatie as to what happend
I went on a flashing spree today and I bumped into something irritating!
I've flashed JBSourcery V4.5 but it didn't satisfy my personal needs (didn't have some mods that I liked).
So back into recovery, factory reset, cache wipe... all the standard cleaning stuff. Next on my list was
LiquidSmooth and that's where my problem started. I was in recovery, wiped the lot and wanted to flash
LiquidSmooth which was already on my SDcard (I came prepared ) So I chose "Install ZIP from SD" and
my heart skipped a beat. Normally I'd see all my folders on my SD... Now I only saw "0", "Legacy" and "obb".
I kept my cool and opened each one untill I found my SD contents which where stuffed into the "0" folder.
No big deal... I could flash LiquidSmooth so everything was fine. Next one was XenonHD. Still same problem
but I could flash my stuff.
Long story short, how do I get my internal memory back to how it was?
Something on a side note though, It's only like that in recovery. If I connect my phone via USB it's normal. (Samsung Galaxy Nexus -> Internal Memory -> ...)
Ideas are welcome!
Thanks in advance! :good:
diSke
Move them with Root Explorer or hook it up to the comp and move them. Or check out some of the other threads about the /0/ folder, there are allot of them.
WiredPirate said:
Move them with Root Explorer or hook it up to the comp and move them. Or check out some of the other threads about the /0/ folder, there are allot of them.
Click to expand...
Click to collapse
Oh great... and I added one to the lot... Sorry guys!
Didn't think of searching with the "0" folder as keyword.
Thanks though for the reply and solution!
One quick question, do you know if the "Legacy" and "obb" folders are important?
I'm sure they are significant for some reason, but I am unsure of their specific purpose. I would for sure keep them in tact.
Hmmm... I moved them and now all my sd card files are scattered around...
Some in legacy, some in "0", some in media... probably best to wipe the lot and start from scratch?
From another post about Android 4.2's filesystem setup:
Cilraaz said:
Source: init.tuna.rc
Code:
on init
# See storage config details at [URL="http://source.android.com/tech/storage"][COLOR=#0066cc]http://source.android.com/tech/storage[/COLOR][/URL]
mkdir /mnt/shell/emulated 0700 shell shell
mkdir /storage/emulated 0555 root root
export EXTERNAL_STORAGE /storage/emulated/legacy
export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
export EMULATED_STORAGE_TARGET /storage/emulated
# Support legacy paths
symlink /storage/emualted/legacy /sdcard
symlink /storage/emualted/legacy /mnt/sdcard
symlink /storage/emualted/legacy /storage/sdcard0
symlink /mnt/shell/emulated/0 /storage/emulated/legacy
[...]
# virtual sdcard daemon running as media_rw (1023)
service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
class late_start
[...]
Click to expand...
Click to collapse
You said which ROMs you flashed, but what version of Android are you on now? It sounds like you might be back on 4.1.x, since you're seeing 0, legacy, and obb in /sdcard.
If you went back to 4.1.x, then 0, legacy, and obb are not important. Only /data/media matters on 4.1.x. If you are on 4.1.x, go to /data/media/0 and copy all of the files there to /data/media, then reboot. That will fix your setup. Once that's done and 0, legacy, and obb are all empty, they are safe to delete.
If you are on 4.2 or 4.2.1, then the above quote is accurate. Your information should be in /data/media/0 and the system should be properly fuse mounting and symlink'ing to showyour data into /sdcard.
When moving files around, it's usually best to do it at the source (within /data/media) so you don't have to worry about the fuse mounts and symlinks causing a problem.
I switched from 4.1 to 4.2.1.
Problem is I started switching things around and now my sd card files seem te be everywhere.
Can't figure out what is what...
I moved everything from "data/media/0" to "data/media"
but now my system can't find my files.
When I try to move everything back it says "unable to execute the command"
diSke said:
I switched from 4.1 to 4.2.1.
Problem is I started switching things around and now my sd card files seem te be everywhere.
Can't figure out what is what...
I moved everything from "data/media/0" to "data/media"
but now my system can't find my files.
When I try to move everything back it says "unable to execute the command"
Click to expand...
Click to collapse
As my post said, if you're on 4.2.1, your files should be in /data/media/0. You'll see copies of them in multiple places (/storage/emulated/legacy, /sdcard, /mnt/shell/emulated/0, /mnt/sdcard, /storage/sdcard0, and /data/media/0), but these are fuse mounts and symlinks. Your data only "physically" exists in one place: /data/media/0. After rebooting, your files should be found in /sdcard, rather than /sdcard/0. If not, then you might have the multiple 0 folder issue (e.g. /data/media/0/0/0, which ends up being /sdcard/0/0) from having an outdated version of your recovery.
Long story short, if you're on 4.2.1, then any files from your "SD Card" should be found in /data/media/0. If you're on 4.1.x, then they should be in /data/media.
If you're getting that error when trying to copy from /data/media to /data/media/0, then you'll need to check that /data/media is mounted as r/w and that you have write permission to the 0 folder within it. You should also be copying these files around as root (either through terminal emulator or a root file browser like Root Explorer).
Cilraaz is correct, however if you are looking for an easy way to straighten it out you can do the following.
Copy everything you want to save to the computer.
Reboot into recovery and format data. (Not wipe data actually format.)
Reboot phone and data partition will be good to go again.
Copy files back from computer and you should be as you were previously.
Of course all other data will be gone but I'm sure if you are a crack flasher you can get all that back.
G-Nexus Sent
ifly4vamerica said:
Cilraaz is correct, however if you are looking for an easy way to straighten it out you can do the following.
Copy everything you want to save to the computer.
Reboot into recovery and format data. (Not wipe data actually format.)
Reboot phone and data partition will be good to go again.
Copy files back from computer and you should be as you were previously.
Of course all other data will be gone but I'm sure if you are a crack flasher you can get all that back.
G-Nexus Sent
Click to expand...
Click to collapse
Good call on the computer backup. You don't need to wipe data, though. Just backup what you want to save from storage to your computer, then flash userdata.img from the stock 4.2.1 ROM, which will wipe out and re-create the /data/media partition. Then when you reboot, the fuse mounts and symlinks will be properly recreated and you can use MTP to copy your data back (or adb push it to /data/media/0 or /sdcard).
Thanks guys.
Fixed it differently though, Completely wiped everything again and started from scratch.
Made a backup earlier of everything I wanted to save except for messages which I forgot (damnit)
But it's all good now
Please read forum rules before posting
Questions go in Q&A
Thread moved
Thank you for your cooperation
Friendly Neighborhood Moderator
Related
I have flashed a few of the different builds that have recently become available and in doing so I have had some weird happenings with my internal storage. First I had both /sdcard, and /sdcard/o where everything I had prior to flashing was in /sdcard, but now resides in /sdcard/0. I moved everything back over and all was dandy. However now I have /sdcard and in there is nothing. All my stuff is actually in mnt/shell/emulated??
I know that chadouming and the everyone else that are contributing are working hard to get a stable build of CM10.1 out to everyone, and when that happens I want to start fresh.
Now my question is how do you go about formatting your internal sdcard without screwing everything up?? Should I flash ROM, GAPPS, backup's from Nova, and Titanium then format? I just don't want to be left with a phone that won't boot for whatever reason.
typically in the past I have never done this. But contrary to some of the instructions for flashing ROMs in this forum I used too
Wipe system/factory reset
Wipe Cache
Wipe Dalvik Cache
format system, data
then flash rom then flash gapps. There is a lot I still don't understand about this stuff so any help would be appreciated.
brunswick000 said:
I have flashed a few of the different builds that have recently become available and in doing so I have had some weird happenings with my internal storage. First I had both /sdcard, and /sdcard/o where everything I had prior to flashing was in /sdcard, but now resides in /sdcard/0. I moved everything back over and all was dandy. However now I have /sdcard and in there is nothing. All my stuff is actually in mnt/shell/emulated??
I know that chadouming and the everyone else that are contributing are working hard to get a stable build of CM10.1 out to everyone, and when that happens I want to start fresh.
Now my question is how do you go about formatting your internal sdcard without screwing everything up?? Should I flash ROM, GAPPS, backup's from Nova, and Titanium then format? I just don't want to be left with a phone that won't boot for whatever reason.
typically in the past I have never done this. But contrary to some of the instructions for flashing ROMs in this forum I used too
Wipe system/factory reset
Wipe Cache
Wipe Dalvik Cache
format system, data
then flash rom then flash gapps. There is a lot I still don't understand about this stuff so any help would be appreciated.
Click to expand...
Click to collapse
Ah, you didnt said that. You can't simply delete the 0 folder on sdcard. That's how thing work on android 4.2 and it's because of multi-user capabilities. put everything back in 0 folder nad it shoulbe alright. Note that it's zero and not "o"
I can't move things. I am able to select files, but it won't move them. Tried with CM file explorer and with root explorer. Won't work with either. Wouldn't be a problem if I could access them from my computer, but I can only see /sdcard when it comes up, so I can't access mnt/shell/emulated. Frustrating.
Sent from my Optimus G using xda premium
I have downloaded a program called android commander to access internal storage on my phone via pc but I can't get it to work. I can't for the life of me even get the drivers for the phone to install correctly. Grrrr. Don't want to lose this data but I cannot seem to gain access our move it.
Sent from my Optimus G using xda premium
i needed to move my backups from the 0 folder so plugged the phone on to pc and did it through windows.
gentledroid17 said:
i needed to move my backups from the 0 folder so plugged the phone on to pc and did it through windows.
Click to expand...
Click to collapse
Yes this is my problem. I can only access the /sdcard portion of the internal memory through my pc. The 0 folder along with the original /sdcard folder is now located in the above mentioned directory /mnt/shell/emulated. It's very strange, and what is more frustrating ifs that I can select the files to move them through root explorer, but when I hit paste nothing happens.
Sent from my Optimus G using xda premium
brunswick000 said:
Yes this is my problem. I can only access the /sdcard portion of the internal memory through my pc. The 0 folder along with the original /sdcard folder is now located in the above mentioned directory /mnt/shell/emulated. It's very strange, and what is more frustrating ifs that I can select the files to move them through root explorer, but when I hit paste nothing happens.
Sent from my Optimus G using xda premium
Click to expand...
Click to collapse
i actually had to save to my desktop then back to sdcard. took a while but it worked.
gentledroid17 said:
i actually had to save to my desktop then back to sdcard. took a while but it worked.
Click to expand...
Click to collapse
That would be fine but I can't access that directory on my pc. Hence the problem.
Sent from my Optimus G using xda premium
I just updated from cyanogenmod 10 (stable) to 10.1 M2 using goomanager to flash the rom and the 20130301 gapps (didn't set it to make backup or wipe anything). Phone seems to be running everything fine but my storage space is wrong. It shows 2.17 available, 2.20 for Apps, 2.23 for picture and video an negligible everything else. Total space 13.33. Using an app called "Storage Analyser" I can see that in /data/media I have 9.3GB and it has all the old info in it from CM10 as well as the new info in the new "0" folder (which will include the 2.2GB picture and video data above) and 4.85GB in a folder called ".dumpster".
So, I guess the questions are:
did I do something wrong when updating the app that it kept all this old information? When I updated from stock to CM10 it put all the old info into a folder called "0" I think, but I could see that in normal file explorers/windows and delete it easily. Not the case here - I had to go into root mode etc to see the files.
can I / should I be deleting every folder in data/media except for the "0" folder? If not, what should I be doing?
Appreciate any help. Would like to avoid messing my phone up by deleting things I shouldn't and also don't want to have to full wipe and reinstall CM10.1 just to get arround this issue
/data/media should have three folders in it once you're on Android 4.2: 0, legacy, and obb. The "0" folder is what, after fuse mounts and symlinks, ends up as /sdcard and read by Windows via MTP. That's why you couldn't see the other files in /data/media on Windows.
If all of your data is in /data/media/0, then anything other than the three folders listed above can be deleted from /data/media. If you're unsure, don't hesitate to transfer the files to your PC as a failsafe backup (zip, move to /data/media/0, and copy it off via MTP; adb pull it; etc) before deleting.
So I'm not panicking as I know this is most likely recoverable, but I do want to make sure I do this right. I was prepping my galaxy nexus to give to my wife since I got a note 2 and was consequently trying to get it completely wiped. I was trying to clear all the user data and was surprised that it was clearing (I think it was because it's is stored in the /sdcard directory). So, I popped into the mounts and storage section and started formatting . Seriously, I'm not sure what I was thinking here. I only got to the /sdcard and /system before I stopped and reconsidered, but it was too late. Because I had already formatted the /sdcard, I lost my rom and gapps zips.
Anyway, I think all I need to do is hop into adb, transfer the necessary zips to my /sdcard directory, and flash them. Is that correct? Also, of the options on there, what can I format without issue? /system is obviously for the rom itself (or at least mostly), so I'll avoid that in the future. What is the /data and /cache used for?
Yes you are correct about your process. I even there myself about five times now not knowing what I was thinking when I pressed all those buttons hah.
Data is used by android for app caches and the cache is for system and kernel caches. May not be entirely correct but they are safe to clear
Poke_N_PDA said:
So I'm not panicking as I know this is most likely recoverable, but I do want to make sure I do this right. I was prepping my galaxy nexus to give to my wife since I got a note 2 and was consequently trying to get it completely wiped. I was trying to clear all the user data and was surprised that it was clearing (I think it was because it's is stored in the /sdcard directory). So, I popped into the mounts and storage section and started formatting . Seriously, I'm not sure what I was thinking here. I only got to the /sdcard and /system before I stopped and reconsidered, but it was too late. Because I had already formatted the /sdcard, I lost my rom and gapps zips.
Anyway, I think all I need to do is hop into adb, transfer the necessary zips to my /sdcard directory, and flash them. Is that correct? Also, of the options on there, what can I format without issue? /system is obviously for the rom itself (or at least mostly), so I'll avoid that in the future. What is the /data and /cache used for?
Click to expand...
Click to collapse
I actually was trying to format everything to get the GN as clean as possible and ended up deleting everything including my rom that I was going to install(CM10.1). Thankfully recovery was still on there and I just pushed my rom and gapps using adb. I couldn't get the sideload command to work using clockwork so ended up just using the push commands. Make sure to specify the destination folder on your phone with the file name it will be on your phone. I ran around in circles realizing I wasn't specifying the file name in the folder location. Good luck!
Hello lovely android people,
I am a newbie, so im guessing this probably isnt the right place to post this type of question. Please feel free to guide me to the right place.
So the question...
I rooted my galaxy ace2 (gt18160) and install Pimp My Rom app from the market. Did some changes with it and now the phone wont start up, stuck in the bootloop where the logo appears and it does not go anywhere from there.
Ive been researching for solution since yesterday, and found out that I could re-flash the firmware using o2 stock using odin.(although im not quite sure this is a correct solution)
Since there's a possibility of all the data getting deleted, I want to get some files out of the device using ADB pull.
I used adb shell to look for the files I need. At first I could see the sdcard in the root directory / but could not access it without su. After doing su command I can go inside the sdcard directory (where my files are), but it appears to be empty.
ls -l /mnt lists the sdcard with unusual d--------- permission.
Im stuck and dont know how I can grab my files from the sdcard folder.
any suggestion will help.:cyclops:
Thanks
mnt/sdcard is only a symlink to storage/sdcard0 (mount for the internal sdcard) so it does make sense that adb can't cope with that path.
Still, it is impossibibble to delete stuff from either of your sdcards via odin or recovery. Flashing via odin doesn't wipe the data partition either, so as ong as u select the right firmware for our phones, nothing can go wrong really
Thanks for your reply Carpe-Dimi.
after checking /prop.partiitons, it seems that sdcard hasnt been mounted.
The problem now is that there are 18 partitions and I dont know which is the sdcard?
I tried mounting the first mmcblk0. Give me the 'device or resource busy' error.
Excuse my arrogance but I would have liked to find out why I cant access the sdcard or why I cant mount the partitions.
...and thanks again for letting me know that flashing does not wipe the data. :good:
SOLVED!
As Dimi said, flashing does not wipe data partition. But I was able to recover my files in recovery mode as it automatically mounted the mmcblk0p8 partition.
Then installed stock firmware.... tried new jelly bean, then went back to stock as its slow and laggy.
Cheers
I’m rooted and using CW for my recovery. I’m using a pre-owned phone that I (thought) I wiped before rooting. I am running stock 4.2.2, baseband MDL.
Initially all I wanted to do was nandroid to my SD card in preparation for flashing a custom ROM. I have a 32GB card that my phone recognizes just fine, so I thought it would make sense to put the backup there. So I enabled Use External Storage in ROM Manager settings and tried to begin the backup process.
First I tried it using the ROM Manager itself. Got this error message:
Unknown volume for path [/external_sd/clockworkmod/backup/name of the backupfile here]
/tmp/recovery.log was copied to /sdcard/clockworkmod/recovery.log
Please open ROM Manager to report the issue
Then I tried doing it by going straight into Recovery and initiating it myself. That was in the Backup and Restore menu. The Backup location options were
/sdcard
/storage/sdcard1
Neither of those is the external card. Then I looked at the Advanced menu but there was no option that mentioned the external card. So it seems that the Recovery doesn’t see my external card. And the subdirectory options that Recovery wants to use do not exist on my phone.
At first I thought it was my SD card. I removed it, re-formatted it (non-Quick) on my computer, etc. I was still not able to save my recovery to my SD card. Again I see that CW want to put the recovery in a subdirectory that does not exist.
I was able to nandroid to the internal memory, so at least there’s that. But the file directories on my card are a mess that make no sense and don’t seem to match what I’ve seen on multiple forums.
Using ES File Explorer I see this from the root directory -
/storage/emulated/0
/storage/emulated/legacy
/storage/extSdCard
/storage/sdcard0 – this one has a little arrow at the start of the pathname. Does that make it a shortcut?
/storage/container – this one has a little arrow at the start of the pathname. Does that make it a shortcut?
Also from the root directory I see this –
/sdcard/ – this one has a little arrow at the start of the pathname
Then there are these –
/mnt which seems to have copies of sdcard and extSdCard
/mnt_1 which just has extSdCard, sdcard_1, sdcard_2, and sdcard_3
I’m running 4.2.2, baseband MDL. What I would like to do is get the directory structure back to stock and remove all the multiples of data and folders that I am seeing.
1. If I totally wipe the phone, will the stock file structure be restored?
2. If the answer to #1 is “yes”, what happens if I do an Advanced Restore, restoring Data from a nandroid created with the screwy structure? Does the screwy structure return?
Thanks,
Veronica
re: nandroid backup/restore
verngator said:
I’m rooted and using CW for my recovery. I’m using a pre-owned phone that I (thought) I wiped before rooting. I am running stock 4.2.2, baseband MDL.
Initially all I wanted to do was nandroid to my SD card in preparation for flashing a custom ROM. I have a 32GB card that my phone recognizes just fine, so I thought it would make sense to put the backup there. So I enabled Use External Storage in ROM Manager settings and tried to begin the backup process.
First I tried it using the ROM Manager itself. Got this error message:Unknown volume for path [/external_sd/clockworkmod/backup/name of the backupfile here]
/tmp/recovery.log was copied to /sdcard/clockworkmod/recovery.log
Please open ROM Manager to report the issueThen I tried doing it by going straight into Recovery and initiating it myself. That was in the Backup and Restore menu. The Backup location options were
/sdcard
/storage/sdcard1
Neither of those is the external card. Then I looked at the Advanced menu but there was no option that mentioned the external card. So it seems that the Recovery doesn’t see my external card. And the subdirectory options that Recovery wants to use do not exist on my phone.
At first I thought it was my SD card. I removed it, re-formatted it (non-Quick) on my computer, etc. I was still not able to save my recovery to my SD card. Again I see that CW want to put the recovery in a subdirectory that does not exist.
I was able to nandroid to the internal memory, so at least there’s that. But the file directories on my card are a mess that make no sense and don’t seem to match what I’ve seen on multiple forums.
Using ES File Explorer I see this from the root directory -
/storage/emulated/0
/storage/emulated/legacy
/storage/extSdCard
/storage/sdcard0 – this one has a little arrow at the start of the pathname. Does that make it a shortcut?
/storage/container – this one has a little arrow at the start of the pathname. Does that make it a shortcut?
Also from the root directory I see this –
/sdcard/ – this one has a little arrow at the start of the pathname
Then there are these –
/mnt which seems to have copies of sdcard and extSdCard
/mnt_1 which just has extSdCard, sdcard_1, sdcard_2, and sdcard_3
I’m running 4.2.2, baseband MDL. What I would like to do is get the directory structure back to stock and remove all the multiples of data and folders that I am seeing.
1. If I totally wipe the phone, will the stock file structure be restored?
2. If the answer to #1 is “yes”, what happens if I do an Advanced Restore, restoring Data from a nandroid created with the screwy structure? Does the screwy structure return?
Thanks,
Veronica
Click to expand...
Click to collapse
If you wipe the phone using it's internal "factory data reset"
(settings>accounts>backup and reset>factory data reset)
It will restore the stock phone's internal sdcard's structures, directories and folders.
But what I would suggest is to download and odin flash the TWRP custom recovery,
that way you will not loose any data or user files and you will not have any problems
making or restoring nandroid backups.
TWRP is really easy to use and basically self-explanatory.
Here is the direct download link for TWRP: http://techerrata.com/get/twrp2/jfltetmo/openrecovery-twrp-2.6.3.1-jfltetmo.tar
Good luck!
Misterjunky said:
If you wipe the phone using it's internal "factory data reset"
(settings>accounts>backup and reset>factory data reset)
It will restore the stock phone's internal sdcard's structures, directories and folders.
But what I would suggest is to download and odin flash the TWRP custom recovery,
that way you will not loose any data or user files and you will not have any problems
making or restoring nandroid backups.
TWRP is really easy to use and basically self-explanatory.
Here is the direct download link for TWRP: http://techerrata.com/get/twrp2/jfltetmo/openrecovery-twrp-2.6.3.1-jfltetmo.tar
Good luck!
Click to expand...
Click to collapse
Thanks!
Are you saying that using TWRP will preserve the file structures and that CW has some kind of effect on them...or that CW is the reason I can't put my backup on my SD card?
verngator said:
Thanks!
Are you saying that using TWRP will preserve the file structures and that CW has some kind of effect on them...or that CW is the reason I can't put my backup on my SD card?
Click to expand...
Click to collapse
CWM or TWRP do not effect the file structures.
All I am saying is create a nandroid backup using TWRP and then restore
the backup. Then if it works properly for you then keep using twrp.
You will be pleasantly surprised how well twrp works and how easy it is to use.
Good luck!