[Q] adb shows only 1GB internal mem capacity?? - Galaxy S II Q&A, Help & Troubleshooting

Hey there!
So I restarted my phone I got into the endless samsung logo loading screen... How fun.
I'm aware that I need to do a factory reset, but sadly I didn't backup my contacts and pics... I used only internal memory btw (no sdcard).
Anyway, I boot into the stock Android System Recovery and used adb in order to pull the necessary files before I reset, and saw some strange things:
1. When I press df to see overall size, i get /dev with size of 415m, and /system with size of 503m. This is nowhere near my almost 16 gigs of used internal memory... Can you explain that? Maybe I didn't mount something?
2. "adb pull / " command gives me only one folder named sys, that contains hundreds of files. All these files are only 7 megs of overall.
3. When I browse the internal memory with adb shell, the /data, /sdcard and /sdcard1 folders are empty, although i never formatted nor deleted anything.
Maybe i need to mount something i'm not aware of?
Thanks!

My phone is rooted, but I don't even have an /mnt folder, not to mention /mnt/sdcard/ .
So basically I can't locate my internal memory

Try /storage/sdcard0/
The contacts database, is stored somewhere in /system partition.
Sent from my GT-I9100 using xda app-developers app

Related

Change CWM backup location to external

How do I do this? Is it possible? I've done quite a few backups because I've been swtiching between ROM's and my Internal is running low on memory. I'm using ROM Manager Premium v5.0.2.0
Edit: I know I can do this if I manually go into CWM
3bs11 said:
How do I do this? Is it possible? I've done quite a few backups because I've been swtiching between ROM's and my Internal is running low on memory. I'm using ROM Manager Premium v5.0.2.0
Edit: I know I can do this if I manually go into CWM
Click to expand...
Click to collapse
On the latest version of CWM, there is the option to save to internal or external SD card once you have created, or accepted, the name of the file names backup.
Tip: Always save your backups to your external SD card in case of problems you may encounter with flashing.
You can choose in cwm backup/restore menu : backup internal sd.
or make a backup in external, then copy paste the clockworkmod dir in internal sd
Can you please mount external sdcard instead of internal one.
/etc/fstab:
Code:
PHP:
#/dev/block/mmcblk0p4 /sdcard vfat rw
/dev/block/mmcblk1p1 /sdcard vfat rw
Ive noticed some cwm-r versions are kind of "reversed" too when it comes to backup/restore and install from locations... when you chose internal the cwm-r uses the external and the other way around. so if you have chosen to backup to internal but it put it on external anyways then try to do the backup to external to have it on the internal sd don't know if that's the case with version you use though.....
A quick question: I have 3 nandroid backups made by CWM in INTERNAL sd card. I know that the amound of free space IS reduced (ES Explorer. Android storage and Windows tell me so). Still, the /sdcard/clockworkmod/backup folder contains only a nandroid I have done of the stock ROM before I started flashing... the other nandroids are invisible. I 've even connected the phone in windows and tried to search for .md5 files.... only got the one concerning my old stock ROM backup. Where does the CWM save its' backup files? Should I format the internal card?
clockworkmod/blobs
Ok this is becoming weirder and weirder by the second. So, I had a nice backup of stock ROM (which yielded the amazing: "Your device is modified, no software updates available" har har har). So I fire up "My Files". And lo and behold, in /sdcard/clockworkmod/backups, the three backups I have done are visible. This sounds.... fishy. To say the least. And of course, now they are visible in Windows Explorer too. Ok, now I am kinda scared ****less.

Important and read re: Recoveries

our device is a data/media device which is why usb mount don't work
here's a link that explains it all
http://teamw.in/DataMedia
and part of the convo with dees_troy is below
<Dees_Troy> Nope, it will *never* work on a data/media device
<Dees_Troy> read and learn: http://teamw.in/DataMedia
<WinBot> [Link] http://tinyw.in/lstO :: What is a data media device? | TeamWin
<Dees_Troy> definitely worth understanding
<Dees_Troy> at some point we're going to try to kang in MTP for recovery
<Lloir> so for now then it's sideload or from inside the rom
<Dees_Troy> or adb push
<Lloir> aye
<Dees_Troy> or gtfo
<*****> so cant mount usb storage with newer devices...hmm one x did guess this is where confusion at least on my part came to be
<Lloir> lmao Dees_Troy
<Dees_Troy> one x wasn't a data media device
YOU MUST either transfer the rom\boot\porn\audio\mods while the phone is on or use adb push or even sideload when in recovery, THIS IS THE ONLY way
What is a media device?
Thanks, I have copied the text from the link for easy reading.
What is a data media device?
I'm writing this page because there seems to be a lot of confusion about how many of the newer Android devices work. Starting in Honeycomb 3.0 with the Xoom, Google changed the way that they handled storage. Instead of having a "data" partition with your apps and a separate "sdcard" partition for storage, Google started giving you a single, very large data partition. Inside /data is a folder at /data/media that contains all of the contents of what you think of as your internal sdcard.
Since /data/media is part of /data, we pretty much never actually format the data partition. Formatting data, of course, also removes the media folder that contains the internal sdcard. When you choose a factory reset, instead of formatting, we use rm -rf commands to remove all the folders except for the media folder so that we can remove all of your apps and settings while leaving your "sdcard" intact. In TWRP we also have a wipe internal storage option that rm -rf's the media folder and a "Format Data" option that formats to recreate the entire file system in case something goes completely wrong or to remove device encryption.
When you're booted to Android, Android fuses the media folder to /sdcard and emulates a FAT files system that doesn't have permissions for legacy apps. We don't currently have fuse in recovery, so we just add an extra mount command to mount /data/media to /sdcard so in recovery you still have to worry about permissions on /sdcard.
Because the "internal sdcard" is not a true FAT file system, you can't mount it via USB storage. Well, that's not technically true, but the vast majority of people use Windows computers and Windows doesn't recognize ext4. If we were to allow you to mount the data partition via USB storage, Windows would claim that the device wasn't formatted and offer to format it for you, which, as you can imagine, would be a disaster. The whole ext4 setup is another reason that Android switched to using MTP for transferring files. Most of these devices don't have the necessary kernel configuration to even support USB storage mode, so it's not very easy to enable USB storage if we even wanted to try. Unfortunately at this time, MTP isn't available in recovery, so if you have no other option, you will have to use adb to push and pull files to/from your device.
As a special note, if you choose to do a factory reset from your ROM, even if the ROM says that it will wipe everything including the internal storage, well, that's not what TWRP will do. A stock AOSP recovery would format data including the "sdcard" but TWRP will use its regular factory reset setup that leaves the internal storage intact.
There are a couple of nice gains with using this setup vs the old data + FAT storage partition. With /data/media you, as the user get more control over how you use your storage. If you have a ton of apps, then that's no problem since you have a huge data partition to work with. If you don't have a lot of apps, you get more room to use for storing things like movies. Further, ext4 doesn't suffer from the 4GB file size limit that FAT has, so you can have a large, high-def movie on your device if you like. I'm sure another motivating factor was to get Android away from using FAT which is a Microsoft creation. Performance on ext4 in Android is also probably better than FAT. As a downside, data media devices tend to store a lot more app data in the "data" section and so backups on these devices tend to be larger.
Click to expand...
Click to collapse
any guide how to put a file on phone if it does not boot? (ie adb push or while in recovery please)
Not so bad, i can live with that
(P.s.: Lloir i've ended the script, now it's working! )
thanks dude

[Q] Trying to recover from a data wiped SD card

Hi all.
I recently went about updating my tablet, and in the back of my mind I was under the impression that TWRP would backup the internal sdcard's files during the normal backup, so I thought nothing of wiping the internal sdcard. Whoops. It, of course, didn't, and now I find myself with a whole slew of stuff gone. Not much else was written to the internal sdcard (which is on an ext4 filesystem), so I suspect that a good bit of my stuff can still be sitting there in the data graveyard. Hopefully.
Since I'm on Linux and can't mount the sdcard directly (since for some odd reason Linux has issues with MTP), all I've been able to do was this:
I booted the tablet into recovery mode and opened up adb, and ran the following command through the adb shell:
Code:
~ # dd if=/dev/block/mmcblk0p8 of=/dev/block/mmcblk1p1
Where mmcblk0p8 is the internal sdcard with the lost data, and mmcblk1p1 is an external sdcard. I thought that by running that command, I could create a carbon copy of each and every little thing on the old sdcard, write it onto something my computer could read, and then go through the normal recovery process. In this case I planned to use a Linux tool called "extundelete."
Here's where I get stuck. The sdcard appeared to have cloned correctly, given that the entire thing is now filled up and reads as an ext4 filesystem on gparted (when it was previously fat32), but now I can't mount it. And if I can't mount it, I can't restore anything. Here's what I get when I try to mount it:
Code:
Error mounting /dev/sdb at /media/user/57f8f4bc-abf4-655f-bf67-946fc0f9f25b: Command-line `mount -t "ext4" -o "uhelper=udisks2,nodev,nosuid" "/dev/sdb" "/media/user/57f8f4bc-abf4-655f-bf67-946fc0f9f25b"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sdb,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
So to sum it up, I accidentally wiped my tablet's internal sdcard using TWRP 2.3.3.0, and now I want to recover what was lost during the wipe. Not that it matters, my tablet is a Transformer Infinity in case anyone asks. Though I don't think that's really relevant here.
If anyone knows how to help me, or knows of a better way I should go about getting my data back, that would be, for a lack of better words, super awesome.
Thanks!
BJSerpas said:
Error mounting /dev/sdb
Click to expand...
Click to collapse
Seems you tried to mount /dev/sdb, not /dev/sdb1.
Also, did you make the SDcard partition the same size as the source partition? And what did dmesg say?
Also, http://forum.xda-developers.com/showthread.php?t=1994705 might be of some help..
kuisma said:
Seems you tried to mount /dev/sdb, not /dev/sdb1.
Also, did you make the SDcard partition the same size as the source partition? And what did dmesg say?
Click to expand...
Click to collapse
When I plugged it in, Linux automatically mounted it to sdb and not sdb1. And the external SD card was the same size as the internal one, 32gb. Currently not home so I can't run dmesg at the moment.
And thank you bodh, that looks very useful and is more or less what I was trying to do. I'll have to get on a windows PC it seems, but no issue there. In the meantime, is there a way to write protect the internal SD from the android terminal emulator until I get home? I don't want my old files accidentally overwritten. Or I could just not use the tablet if that's the better option here.
Thanks guys!
I'm not sure you could write protect the internal sd. I've tried changing permissions on it and get errors. You're best bet is probably to go without the tablet use for now.
BJSerpas said:
When I plugged it in, Linux automatically mounted it to sdb and not sdb1. And the external SD card was the same size as the internal one, 32gb. Currently not home so I can't run dmesg at the moment.
Click to expand...
Click to collapse
I'm talking about the number of blocks exactly, not "32gb" or so. And mount /dev/sdb1 manually, don't rely on Gnome failing to mount /dev/sdb.

Cm11 fails to mount both Internal and External storage

Hi.
I was using my S2 i9100 as everyday but after a restart both the internal and external SD storage dissapeared and I only have available the internal (apps) storage.
After googling a bit I tried the following commands in the terminal:
su
echo mkdir /storage/sdcard0 > /data/local/userinit,sh
chmod 700 /data/local/userinit,sh
exit
exit
Going into settings>storage after doing this allows me to briefly see the missing devices (calculating disk use) but then they quickly dissapear again, after a couple of seconds.
I booted into recovery and there I can see every folder and file in both devices so it's not a data corruption issue.
I fear flashing a new CM version if that means a wipe of my data folder, because I have some important app data I don't want to lose.
Any way to fix this or at least temporarily mount the devices so I can backup my data with titaniumbackup?
CM version is 11.0-InstallerXNPQ32P
Thanks for your help
I had to replace .sh with ,sh because of the spam link filter

Files Moved from 0 to Legacy. Inaccessible on PC

Hi,
I was trying to restore backup via Titanium Backup but it was getting stuck at 0. While searching for solution I came across a solution that said to change the backup folder from storage/emulated/0/TitaniumBackup to storage/emulated/legacy/TitaniumBackup. When I did that, TiBu asked to copy the backup files and I gave permission. Now all the files that were there on my internal storage, which were visible on PC when connecting my phone via USB, have disappeared. I looked around in the root folder via MiXplorer and found that all the files have moved to legacy/TitaniumBackup which I cannot access via PC.
I thought I can just restore nandroid backup that I had taken but in TWRP the file does not show as the internal (emulated/0/) is empty. I can see the nandroid backup and all the other files in the legacy folder but cannot do anything about it since they are not showing in TWRP or PC.
Please help me in getting the old settings back.
/storage/emulated/0 and /storage/emulated/legacy are basically the same thing: simply 2 mount points pointing to the same storage device and partition. They do not take away more storage space, as it is only available once but shown twice, because they are sym links what redirect to original /data/media/0 folder.
If you create something in one folder, it will show up in the other. Same applies for deleting stuff.
jwoegerbauer said:
/storage/emulated/0 and /storage/emulated/legacy are basically the same thing: simply 2 mount points pointing to the same storage device and partition. They do not take away more storage space, as it is only available once but shown twice, because they are sym links what redirect to original /data/media/0 folder.
If you create something in one folder, it will show up in the other. Same applies for deleting stuff.
Click to expand...
Click to collapse
I moved all my files from storage/emulated/legacy/i to storage/emulated/0/i and all the files showed up on my PC as well as internal storage on MiXplorer. It was as simple as that. I thought I had botched up something in root partitions.

Categories

Resources