Hey guys ive been lurking around for a while troubleshooting my builds, I have figured out that when I run my android build off of the sd card by itself everything runs well, but once i put in my 10GB of music everything starts to fall appart and i get sod after a minute or two in the lockscreen. I was wondering if creating a separate ext2 partition for android to boot from and keeping my data on the other partition would provide me with any more stability. BTW im using the stock 16 gig class 2 card that came with the phone
Where on the SD card is your music? Root or in the Android folder. I ask because I have a 2 year old 8GB class 4 SD card that came with my preloaded CGO8 navigation (ICO8, but for US) and have never formatted. I've loaded most of the Android builds and most I've had no problems, other than typical for the build.
SD cards are digital. Unlike analog hard disks data is not fragmented. Formatting does not serve a useful purpose for an SD card. Even deleting files (except protected) deleting is just as, if not more, effective.
Do some research, think independently to come up with your own conclusions, but these are mine.
Oh, by the way, this is not the right forum for your question....you should have done some research before posting.
i was not asking about formating i was asking about partitioning and if running android from an ext2 partition on the sd card would create more stability on the build
audscott said:
SD cards are digital. Unlike analog hard disks data is not fragmented.
Do some research, think independently to come up with your own conclusions, but these are mine.
Oh, by the way, this is not the right forum for your question....you should have done some research before posting.
Click to expand...
Click to collapse
Analog hard disks? No fragmentation on flash media? Wow, sounds like you need to do some research...
I also have the same issue where if I put Android along with my music on the 16gb card, it gets stuck at jumping to kernal on reboot.
im copying my music on the new sd now will report back if the problem persists, but i have a feeling that running off of an ext2 partition will provide us with better r/w speeds, similar to ubuntu running on an ntfs partition instead of ext4
Having music (anything else) on your SD card should not really affect Android. Most builds are in an 'Android' folder, so that is where the system looks for its information. This may slow things down a bit (just like an overloaded HDD) but generally there should not be much difference.
Creating and ext2 partition will not help. Of course, now that I have said that, I have an ext2 partition on my SD card that was left from using my rooted G1 with cyanogen mod and Apps2SD. By default, my android build on my HD2 automatically looked in that partition for apps (froyo does this).
So, I do not think it will change anything about freezing or 'jumping to kernal' but it does have its uses.
EDIT: And, since WinMo is actually booting android, I don't think containing your android stuff in an .ext2 partition would even work. Needs to be FAT32 for haret to see it. (this is my assumption, not necessarily a fact)
Isn't the rootfs.img file actually like a simulated ext2 filesystem? Doesn't this file emulate the device memory? I'm not exactly sure, maybe someone else can expand on this. I don't think there is any benefit to partitioning the card in the current state of the hd2's development. Maybe when we are able to flash nand, nand will be formatted to ext2.
polo735 said:
Isn't the rootfs.img file actually like a simulated ext2 filesystem? Doesn't this file emulate the device memory? I'm not exactly sure, maybe someone else can expand on this. I don't think there is any benefit to partitioning the card in the current state of the hd2's development. Maybe when we are able to flash nand, nand will be formatted to ext2.
Click to expand...
Click to collapse
Well, there is that and the system.ext2 and data.img. This is all the files in Android (basically).
But with these files, android knows where to look to find them, placing them in your own ext2 partition will hide them from android.
When we are able to flash to nand (and now) an ext2 partition will allow you to store apps on that partition, given you are able to move apps to SD, which is not currently possible in our builds.
I installed apps to my SD card on my G1 (on an ext2 partition), so when I used Froyo on my HD2, android was able to read from that partition and use my old apps. All that means is that I did not have to reinstall all my old apps, and save space in the data.img created by android.
audscott said:
Where on the SD card is your music? Root or in the Android folder. I ask because I have a 2 year old 8GB class 4 SD card that came with my preloaded CGO8 navigation (ICO8, but for US) and have never formatted. I've loaded most of the Android builds and most I've had no problems, other than typical for the build.
SD cards are digital. Unlike analog hard disks data is not fragmented. Formatting does not serve a useful purpose for an SD card. Even deleting files (except protected) deleting is just as, if not more, effective.
Do some research, think independently to come up with your own conclusions, but these are mine.
Oh, by the way, this is not the right forum for your question....you should have done some research before posting.
Click to expand...
Click to collapse
First of all, before you call someone out you might want to do some research of your own so you don't come across looking like a moron. Fragmentation happens regardless of the actual hardware, and most file systems are vulnerable (whether it be fat, ntfs, ext2, ext4, etc). And while deleting files and reformatting end in the same result, a quick reformat makes far fewer writes to the card by simply wiping the allocation table. Each file name must be modified individually if you delete them, adding unnecessary wear to the card. As for a hard drive being "analog", it stores its data the same way as a memory card - 0's and 1's - which is digital. Just a little refresher there.
Now, as for the question at hand, which is completely appropriate for this forum as it directly concerns the development and installation of android on our HD2's, the use of ext2 for the android files has been done successfully on other winmo devices in order to increase stability and speed in the system. In fact I have done this very thing on my Kaiser in the past. Whether its possible with our current HD2 setup is another matter, so I'll direct you to these links - do a little reading and play around with it, let us know what you find. I'll probably look at it myself this weekend as a stop-gap until a full NAND flash becomes available, which hopefully is sooner rather than later - I'll report back if I find something.
http://www.androidonhtc.com/wiki/Installing_Android
http://android-devs.org/forum/viewtopic.php?f=56&t=194&sid=69cc2d8c93262ff8c70de594d50e5874
In my own experience, I have a 4Gig class 10 and 16Gig class 2 (stock).
I use my 4Gig for Android test runs.
I use my 16Gig for my Android currently in use.
I have my Music in at the root /Music
Android is in the traditional /Android
Any pics I take I just move over /DCIM
I haven't experience any corruption. Before testing, I format the SD card on my computer with 64k or 32K blocks. I copy over my saved /Music and /DCIM and then load the new Android in /Android.
ALWAYS Eject the SD card. Keeping those rules and I haven't had issues.
Well I switched to my other 16gig class 2 and my problems went away, it seems the stock card was going bad but not using a 20yr old file system would be nice regardless
Sent from my HTC HD2 using XDA App
... oh, and about fragmentation, I'm not a software engineer (I'm electronics engineer), but I wouldn't get too worried about SD card fragmentation. It can happen, but not in the same way as a physical HD.
SD cards can do random access reads/writes much better than a physical hard drive. However, if you've formatted your blocks too small, the controller has to piece together two bits of info instead of one.
Example: 64k file written to 8k formatted SD, will have to piece together 8 blocks.
A 64k file written to 64k formatted SD is written all to one block.
The flip-side is if you have a bunch of small files (1k - 5k) and you're formatted at 64k, you've just wasted 63k of a 64k block writing a 1k file. It's inefficient.
willgill said:
Example: 64k file written to 8k formatted SD, will have to piece together 8 blocks.
A 64k file written to 64k formatted SD is written all to one block.
The flip-side is if you have a bunch of small files (1k - 5k) and you're formatted at 64k, you've just wasted 63k of a 64k block writing a 1k file. It's inefficient.
Click to expand...
Click to collapse
Considering the sizes of most music and picture files these days and the fact that all Android little files are inside one large file, I believe going with 64k blocks would be better. Even going with a larger block size than 64k might be a good idea. Too bad 64k is the limit.
Larger block sizes might be inefficient when dealing with system folders like C drive in windows or system folder in linux since they contain a huge number of small files. That is why windows default is 4k.
Related
Hello! I've searched all over the internet about this but haven't found any usable information about this. I was thinking about storing music files etc on the ext partition on my SD-card. I've a 8GB sdcard with a 64MB swap, 1024MB FAT32 and rest of the space goes to an ext2 partition. The problem is, how do I acess the ext2 partition in the phone? I know it is placed in /system/sd. But it seems it is only the super-user who has access to this folder. Is it possible to symlink the folder to another place and make it accessible for the user?
Every info I find is about storing apps on the ext-partition, which works. But having 6GB space for apps feels very overkill. FAT32 seems to be quite limited to speed when copying files, and also it have size limit of files.
The easiest and most recommend way to solve your problems is to repartion your card to:
0M swap (no use for swap on hero)
512M ext2 (see below)
rest as FAT (over 7G for your music)
If you plan on having every single one of the apps on the market you can give the ext2 partition 1024MB, no need to give it any more. There are numerous problems that can arise from having larger ext2 partitions, just of the top of my mind if you do have more data on the ext2 partition larger than your FAT free space you can't do a nandroid backup, you'll end up storing too much stuff on the ext partition which is usually wiped on ROM update and replacement, and it is much harder to access these files, as opposed to the FAT partition which is can be mounted as a USB drive to your PC.
Finally note I said ext2, and not ext3/ext4 because Ext3/4 are journaling file systems which are NOT suited for flash devices. They also have much more CPU overhead then ext2. Finally not all ROMs/kernels support ext3/ext4 and for a good reason!
BTW, please post questions in the either the Q&A or general sections. This is the DEVELOPMENT fourm.
Good luck.
Thanks for your reply, and sorry for posting in the wrong forum, which is quite obvious when I see it now!
Moved to Q&A as not development
erasmux said:
The easiest and most recommend way to solve your problems is to repartion your card to:
0M swap (no use for swap on hero)
512M ext2 (see below)
rest as FAT (over 7G for your music)
If you plan on having every single one of the apps on the market you can give the ext2 partition 1024MB
Click to expand...
Click to collapse
+1, Yeppers, wow a 6gb ext... That is some serious overkill,why?
Sent from my phone.
I was thinking to use the ext partition as a storage of music etc instead of the fat32 partition. The ext-partition is faster to copy files on, especially if you get a 32gb card and maybe you want to transfer big files. If I remember it right FAT32 table doesn't allow file-sizes more the 4GB, and it is also slower to copy to or from.
Any linux operating system should be able to read the ext partition on your sd card, or a program such as gparted is another thing to look into. Remember you can boot to linux without installing the operating system (boot from CD). Ubuntu or Knoppix is a good one to check out if you're new to it all.
Hehe, I think you did misunderstand my main question. The question is how to read the ext-partition directly from the phone with a file-manager (i.e. Astro File Manager). Not from a computer, from the phone, in the phone.
Vantskruv said:
Hehe, I think you did misunderstand my main question. The question is how to read the ext-partition directly from the phone with a file-manager (i.e. Astro File Manager). Not from a computer, from the phone, in the phone.
Click to expand...
Click to collapse
O in that case you have no chance lol. AFAIK there isn't any program designed for this purpose.
Vantskruv said:
Hehe, I think you did misunderstand my main question. The question is how to read the ext-partition directly from the phone with a file-manager (i.e. Astro File Manager). Not from a computer, from the phone, in the phone.
Click to expand...
Click to collapse
Well it depends where your ROM mounts it. I think most ROMs mount it to /system/sd, so you can use any file explorer with root permissions to browse there (i.e. ES File Explorer).
Ok after many hours tonight I have managed to put together a couple .zip files that will install a modified vold.fstab on your Nook Color. (I am a total n00b at this)
The EMMC of the Nook Color has a partition for the ROM and a 5 GB partition that's mostly if not completely unused. Presently, there aren't any 3rd-party managers to move apps to that unused partition, so I modified the vold.fstab and am now able to use that partition for apps, files, etc.
NC.SWAP.VOLD.ZIP swaps the way the SD and EMMC directories are mounted. By swapping the mount points, and renaming EMMC to SDCARD, your apps, etc., will install to the internal storage, vs. installing to your SDCARD. Your physical SDcard is automatically mounted as "EMMC."
This also means that the music player still finds files, you can move files to "EMMC," and you can still eject the SDcard ("EMMC"), put it back in and it still shows up automatically. Now your NC won't freak out if you pull the card out without unmounting it - all of the apps are on the actual EMMC. You'd just find the SDcard under /mnt/emmc instead of /mnt/sdcard.
Because this ZIP file maps the change at an OS level, when you boot to recovery, your NC sees SD as the SDcard, so no issues occur. When you boot into your ROM, the mount points are swapped and you'll have access to the renamed "SDCARD" (5 GB) on your NC.
Use CWR 3.0.1.0 to install the .zip and check out the results with File Manager.
Thanks go out to Clark008, luciferii and Cali^Gal from #nookcolor, Loonacy and Raymondull from #Cyanogenmod, and EpicFail1236 from XDA.
Sorry if this is a bit crude, it's my first script ever. I would be happy to get any advice on how to make this better!
EDIT: I have been looking into renaming the emmc mount to say SD-External or better yet making it mount as /mnt/sdcard/sd-ext. it might be possible, ill be looking into it as soon as I can got laid up for a bit.
"Because this ZIP file maps the change at an OS level, when you boot to recovery, your NC sees SD as the SDcard, so no issues occur. When you boot into your ROM, the mount points are swapped and you'll have access to the renamed "SDCARD" (5 GB) on your NC."
/\/\ That clarifies a lot compared to the brief orig post. Will likely be flashing it this weekend.
BTW, if this expands and you need this 2nd post just have a mod give it to you. Thanks again!
BRILLIANT. Will be definitely testing this later today. Can't wait to run SD Tools on this
Sent from my NookColor using Tapatalk
it works! interesting how it'll work out as to unmounting, flashing roms. but with emmc being useless this is fantastic.
Thank you for the effort and time place in this mod
Yeah. The whole point of this was to utilize the 5GB internal emmc and not waste it. The next step is to mod the CWM to mount emmc as /sdcard so you can flash your zips from where you download them to (usually /mnt/sdcard/download), which in this case, goes to your emmc. But CWM will mount your external sdcard instead. For the time being, we can just put the zips we need to flash to the external sdcard, ie. /mnt/emmc.
I don't know if anyone noticed it yet, but if you usb mount after the swap, the transfer speed is kind of slow (~1.5mbps). I don't know if this is due to the emmc or that the read ahead cache needs to be tweaked.
We're open to make this even better. Feel free to comment and provide feedback.
This sounds like a step in the right direction, however, what I would like to see would be merging the emmc with the internal storage. What I mean is this; right now, when I go into "Storage", I see an "SD card" (8gb), "Internal Storage" (0.92gb), and "/mnt/emmc" (5gb). Why can't we combine the .93 Internal and the 5gb emmc together to make a 5.92gb Internal storage and eliminate the emmc from teh storage area? I'm sure there is a reason that I'm not aware of, but it seems that this would be the same as just about every other device. I am pretty sure the ROM is running from the emmc partition, so that has to have something to do with it, but I don't see a purpose for 3 storage places. I keep getting errors when I try to download apps and I don't even have very many installed. I have had to move most of them to the SD card to make room and some apps don't like to be installed on the SD card.
Another option would be to swap the emmc with the Internal storage. Then we'd be using the 5gb and the .92 gb would be sitting there doing nothing instead. Again, I'm sure there are reasons for this, I'm just asking to learn.
I agree.. ideally having the emmc mount be part of the system would be ideal.
Calla969 said:
This sounds like a step in the right direction, however, what I would like to see would be merging the emmc with the internal storage. What I mean is this; right now, when I go into "Storage", I see an "SD card" (8gb), "Internal Storage" (0.92gb), and "/mnt/emmc" (5gb). Why can't we combine the .93 Internal and the 5gb emmc together to make a 5.92gb Internal storage and eliminate the emmc from teh storage area? I'm sure there is a reason that I'm not aware of, but it seems that this would be the same as just about every other device. I am pretty sure the ROM is running from the emmc partition, so that has to have something to do with it, but I don't see a purpose for 3 storage places. I keep getting errors when I try to download apps and I don't even have very many installed. I have had to move most of them to the SD card to make room and some apps don't like to be installed on the SD card.
Another option would be to swap the emmc with the Internal storage. Then we'd be using the 5gb and the .92 gb would be sitting there doing nothing instead. Again, I'm sure there are reasons for this, I'm just asking to learn.
Click to expand...
Click to collapse
i have no idea TBH but thats far beyond my ability. really it would be nice to symlink emmc to the SD card or the other way around. the issue is that you cant symlink with fat partitions :-/
This is neet. I don't know enough to comment, but it looks valuble for some people.
I just use my stock emmc for music storage and let apps sit on SD w/ videos.
WobbleTheHutt said:
i have no idea TBH but thats far beyond my ability. really it would be nice to symlink emmc to the SD card or the other way around. the issue is that you cant symlink with fat partitions :-/
Click to expand...
Click to collapse
No, but you can symlink to them. Why not set vold.fstab to mount the partitions onto other names and make symlinks named /sdcard -> /othername? That way, the symlinks can do their jobs or rearranging the namespace to suit our needs.
The ramfs isn't FAT32, is it?
I'm an old cmdline type, tricks like this are used all the time to fool software with stubborn opinions about filenames.
Dennis
Jiggity Janx said:
If this works as effectively as it sounds like it will it's gonna rock! With the multiple wifi/bluetooth file transfer options I can say bye bye to the need for an sd card!
EDIT: I think this thread is eerily quiet because of the popular advice written up HERE. Specifically #5...
IMO, with a great write up on the best ways to work with this, all of the things it will affect (positive and negative), and the proper words of warning then the individuals that take it upon themselves to modify their devices are the only ones that can be held responsible if it doesn't work out as they had hoped. They also have to understand that when they work outside the boundaries of an accepted "standard" that they are somewhat desolate and will need to come back into the fold before they can/will be helped...
Just my .02...
Click to expand...
Click to collapse
This may be slightly off topic, but I cannot for the life of me figure out what that post is complaining/ talking about, I have had no trouble bouncing between HC, CM7 and stock.
All you have to do is flash to stock and then worst case you force the boot failure and the nook resets its self automatically
The last few posts on that message are myself and another person who have had not trouble with that now the OP hasn't responded so i'm not sure what to make up that post.
Is it real and an actual issue?
Or did the poster overreact to something?
Can some one please explain it to me if I am wrong about something in using a EMMC version of HC?
chisleu said:
This is neet. I don't know enough to comment, but it looks valuble for some people.
I just use my stock emmc for music storage and let apps sit on SD w/ videos.
Click to expand...
Click to collapse
Seems neet to me also. Always interested in using both emmc and sd space.
@ chisleau - I like the concept of putting all my music on emmc. Do you use an option in CM7 to install or move all your apps to your SD card?
thinking out loud (and not actually doing it) -- but we know that /data is /dev/block/mmcblk0p6 and and the "media" or "emmc" is located at /dev/block/mmcblk0p8 -- can't we just repartition and merge the two?
minotauri said:
thinking out loud (and not actually doing it) -- but we know that /data is /dev/block/mmcblk0p6 and and the "media" or "emmc" is located at /dev/block/mmcblk0p8 -- can't we just repartition and merge the two?
Click to expand...
Click to collapse
We can repartition but don't do it for this Reason -#5 http://forum.xda-developers.com/showpost.php?p=12494638&postcount=1
http://forum.xda-developers.com/showpost.php?p=12494666&postcount=2
ROMs that follow proper packaging - This emmc swap mod is one of them. So we're fine for those who are still hesitating.
Clark008 said:
ROMs that follow proper packaging - This emmc swap mod is one of them. So we're fine for those who are still hesitating.
Click to expand...
Click to collapse
Yep, I was hesitating, but between your post above and the "Thanks" from fattire to the OP, that is all the encouragement I need to take the plunge.
A few questions, tho, if someone can help me to understand this better....
I guess until I saw the OP, I did not realize that all apps in CM7 are installed to the SD card, as when I look at my installed apps in App Mgr, they don't show as being on the SD card. Is this some sort of CM7 voodoo or are my apps really on the internal memory?
Right now, with CM7, I am using the EMMC partition to store my music, under "My Files/Music". Power Amp can see this folder and it will play all my music just fine from within that directory on the internal partition, so if I install this update, what will that do to the 5Gb of internal storage I have now and the music on it?
Also, if I do install this update, what will happen to the apps and their associated data that I already have installed? Is this best done on a fresh build or will everything (apps/data and music) be A-OK after the Swap update is applied?
Just want to know what I am getting into by applying this update, as I have things pretty stable right now. If I could roll with apps on internal and music on SD, I would be more than fine with that, as long as I don't lose any of my apps/data/music in the process. If this is just mere partition re-naming/re-pointing, then I suspect my assets will remain intact?
Thanks to all who collaborated on this project!
why can't the entire internal partitions be imaged?
i use dd all the time to backup my sd card installs in case a test kernel or nightly goes poorly- or to burn a fresh install for multiple people. I just pop in the sd card into my laptop and burn the image back to the sd card.
if this was possible i'd have no issues with running off internal entirely if i could just burn the img. and get everything back as stock, including important device identifiers incase those were erased.
Need undo
This did what it's supposed to do but it seems to be causing a problem with the way I'm booting from sd. Is there a way to undo this?
Bump since I found this useful. +1 for CWM sdcard/emmc swap to enable SDcard-less flashing goodness from ROM Manager.
I have 25Gb of available space but less than 2Gb for apps? I'd like to use all internal storage for apps and the external card for media. Any idea how I set that up?
I have a Galaxy S2 Epic (SPH-D710) stock ROM, rooted with the zermax kernel and fited with a Sandisk 16Gb class 4 micro sd card.
Problem discovered while installing Navfree. Got the error message "not enough space". So I can't install and move.
Settings>Applications>Maganage applications>All shows
112Mb used of 1.9Gb available.
Settings>Storage>USB storage shows
Total space is 11.5Gb and Available space 11.5Gb
Settings>Storage>SD card shows
Total space 14.83Gb (aka 16Gb!) and Available space 14.81Gb.
syco123 said:
Settings>Storage>SD card shows
Total space 14.83Gb (aka 16Gb!) and Available space 14.81Gb.
Click to expand...
Click to collapse
That's perfectly normal dude.. The system uses a chunk of the built-in 16GB for the ROM's use (/system, /data, /cache plus a few other partitions), and the rest is assigned to /sdcard, hence the 11.5GB (I know, that's kind of like false advertisement but what you wanna do ? Sue Samsung ?)
And for the external SD, that's also normal. I'm surprised you didn't notice this detail on the capacity of your harddrive before : end-users tend to think in "base2" (whereas 1KB=1024 bytes, 1MB=1024KB, 1GB=1024MB, and so on), while media manufacturers count in "base10" (i.e. 1KB=1000bytes, 1MB=1000KB, etc). It's a cheap way to reach the symbolic "GB", "TB", "PB" (etc) landmarks more quickly (at least, quicker than the competition).
Do the maths, you'll see that over 16GB that makes a huge chunk of "magically" disappeared storage, but it never was there to begin with.. Also false advertising there, kind of.. But we're all in the same boat here. :S
Snakeforhire said:
That's perfectly normal dude..
Click to expand...
Click to collapse
Yea, I understand that, that why I put "(aka 16Gb") as I'm referring to a 16Gb card but listing 14.83Gb available. It was to not cause confusion, guess I failed there!
The problem I'm having is, I need around 4Gb (apparently) to install Navfree. I only have 2Gb available to apps even though I have 25Gb of storage.
People must be installing Navfree, so I must be doing something wrong.
16GB is 16000000000btye/1024/ 1024/1024 = 14. 9GB.
So it is 16Gb and not 16GB.
No such 4gb large program for android. The program is maybe 10-20mb. And the 4gb is the DATA. You can store the 4gb in your SD card.
Accidentally sent from my Google Nexus S using XDA Premium
I just tried again and it installed with a file size of 15.53Mb. Weird, Oh well, thanks anyway.
yeah i was gonna say : you might find some bloatware on the android market here and there, but by and large it is still pretty much immune to this phenomenon..
A 4GB program is something you might encounter under Windows, but Linux ?
Sorry that my first post is reviving an old-ish thread, but the initial question asked hasn't been answered (and a search of the forum didn't help me)..
Is it possible to resize the partitions of the internal storage on my s2, and if so, how?
And whilst on the subject of the internal storage, can someone please clarify if flashing a custom ROM will affect files on the "USB storage" partition, or only the files stored on the "internal" storage partition?
Sorry if these seem like noobish questions, but I am new to this customising malarkey, and want to make sure I don't lose any data unnecessarily, like I did countless times with my iPhone...
nope, flashing a rom (either stock or custom) *should* not alter usb or internal sdcard storage. If it does, that's a surefire sign that the guy who cooked the said rom has no friggin clue whatsoever about what he's messing with and to steer clear from this particular rom...
It must be possible to alter the partitioning scheme to resize the internal storage. At least that's the theory, we're dealing with a flavor of linux here, and everything is doable with linux -and enough effort and dedication.
However, as this partition lies on the same emmc chip as the system, data, cache and kernel/recovery/bootloader partitions, I highly recommend *NOT* to mess with it in any way -not unless you have another smartphone lying around that you could use as backup while your borked SGS2 is shipped back to the samsung service centre, and you're prepared to spend some $$ over the repairs (since rooting is absolutely necessary for this kind of manipulation, your warranty would theoretically be null&void in the process)...
Hi,
I have a working rooted 8gb nook tablet. The tablet has stock recovery installed on it and I don't think I want to change it to cwm at this point, unless I absolutely have to. My question is -- can I use this method to backup my current ROM in case I do mess something up (like deleting build.prop file for instance)? The problem that I have is that the sd card ends up with only 50mb of free space after burning the image onto it and that is obviously not enough for the backup. I tried partitioning the card and creating an ext2 allocation (perhaps I need to use a different kind?) in addition to the tiny 50mb one, but cwm doesn't seem to recognize it and still tries to backup into the tiny space.
I would greatly appreciate any help.
Thank you.
Resize the partition of the SD card using a partition manager, or format the card and put these files on it (in root).
Forgot to mention in my original post that I did try resizing the 50mb partition to 1gb, but then the tablet just stopped booting at all. I had to take out the card and wait for a minute or two before it would start booting normally again.
I will try your files now. Thank you for quick response!
Nope, that did not work, unfortunately. It just booted normally, not from the sd card. But isn't the whole point of burning that image is to make the card into a 50mb one? I don't understand all the technicalities, but that seems reasonable, why else would they make it particularly 50mb large? And resizing the partition doesn't lead me anywhere either, as I mentioned above.
Maybe someone could point me in the right direction?
Right. So, the partition has to be checked as active if using MTP or flags should be on if using the other one. And the magical 50mb size allocation don't matter after all. Gotcha.
I know using a thread it not necessarily the best way to ask a question but since the cause of this issue is unknown (and might just be SD corruption) and there are a few other threads where it might come up, this thread can be used as a reference.
The issue is: An SD card that rather suddenly became unwritable in every way and can no longer be mounted by Android (although it is detected) but on which all existing data was undamaged, can be viewed and copied via USB card reader to Windows or Linux PC. The drive behaves much as if it was write protected or as if the file system (particularly the FAT) was corrupted in a way that mimics digital SD write protection. Here are the details.
L5.1.1/CM12.1 December 2015, SuperSU 2.65, TWRP3.0.2,
- 64GB Sandisk Ultra SD, initially accepted as formatted or formatted upon first use to Fat32; Working fine for a few months as repository for static data (ROM zips and app apks), work material (frequently edited text, DOCX and XLSX files), as well as apps and app data with a dynamic presence on the drive.
- Drive suddenly stopped appearing on device in CM and in TWRP. When re-inserted in CM, the system detects a card but times out as it is unable to find a mount point. Attempts to mount SD card in ROM result in the following error in CatLog:
"E/Vold (222): /dev/block/vold/179:65 failed to mount via VFAT (No such device or address)
E/Vold (222): Volume sdcard1 found no suitable devices for mounting "
- Attempts to repair, partition or format the drive in TWRP result in mount error and the details of the drive have zeros where there should probably be other values.
/external_sd | | Size: 0MB Used: 0MB Free: 0MB Backup Size: 0MB
Flags: Can_Be_Mounted Can_Be_Wiped Wipe_Available_in_GUI Removable Is_Storage
Primary_Block_Device: /dev/block/mmcblk1p1
Alternate_Block_Device: /dev/block/mmcblk1
Display_Name: MicroSD Card
Storage_Name: MicroSD Card
Backup_Path: /external_sd
Backup_Name: external_sd
Backup_Display_Name: MicroSD Card
Storage_Path: /external_sd
Current_File_System: auto
Fstab_File_System: auto
Backup_Method: files
MTP_Storage_ID: 65537
- With SD in card reader attached to PC, the contents of SD are visible and can be copied to PC but files cannot be copied from PC to SD card. It looks like they are copied but they are gone when card reader is disconnected then reconnected. Same in Linux Ubuntu 14.x.
- Unable to delete or reformat partitions in any utility that I tested including: Dedicated GParted boot USB, EaseUS Partition Master, HP USB Disk Storage Format Tool on PC, GParted in Ubuntu 14 VM, GParted in Ubuntu 10.x live CD/USB.
- Although the SD drive shows as Fat32 in GParted, Windows 7 only offers exFat and NTFS as formatting options. Some research shows exFat can digitally "write protect" drives with a dirty bit or byte which causes very similar symptoms.
- Windows Chkdsk requests to convert lost chains to files but must not be doing so as this occurs on every scan.
Soooo...the questions are: What in the realm of relatively normal android use might cause this? Has anyone heard of a disk or partition management setting or common form of drive corruption that could cause this? Could such a thing be caused by a file manager? A 32GB replacement SD is doing OK but I'm left wondering if the issue with the 64GB SD card was caused by a utility on the device or if it was just SD corruption (that looks conspicuously like digital write protection).
[EDIT] A minor correction I should make: The reason Windows 7 only offers NTFS and exFAT is not because the drive is damaged (although it may be) but rather because Windows 7 cannot format USB drives over 32GB with FAT32 although it can mount and use larger FAT32 SD drives that were formatted elsewhere. In this case I let android do the initial format months ago (Fat32) and never had problems during the times I connected it to card reader (although I usually leave it in the device and use Wifi or MTP through device USB to PC).
[] AL [] said:
Since your running 12.1, I imagine that you don't flash too many nightly build's... So this (not) variable is may be put aside from suspects list.
Click to expand...
Click to collapse
Correctamundo
[] AL [] said:
Recovery: well, I don't know but for that, I'm always following the if it ain't broke, don't fix it rule. You have specific reasons to keep it updated? Like you, I've also read many posts reporting USB related issues with v > 3.0. I still use v2.8.7.0 on my device and don't feel the need to update soon.
Click to expand...
Click to collapse
I'm now on the fence about reverting to the longer standing 2.8.7 version of TWRP, but since the primary maintainer for my Otus CM12.1 and CM13 ROMS (@squid2) also creates the build of TWRP and has included in his 3.0.2 version some forward fixes that might be better for CM13 especially where encryption is used, I have been updating it. A consideration in this regard is; what if it was not the different version of TWRP that caused this but rather a one-time instance of something that went wrong in the act of flashing it - which I would be more at risk of because I do occasionally update TWRP.
Hmmmm...I did recently restore a nandroid of stock Moto L 5.0.2 then flashed stock recovery in an attempt to install a pending L5.1 OTA (Moto finally released it!) which failed AFAIK due to unlocked bootloader, then I flashed TWRP 3.0.2 and restored a CM12.1 nandroid. If that was a factor it merely planted the seed of the problem but did not grow into the problem until some other later action .
[] AL [] said:
As for apps, what I find strange is that even a format didn't fix things up with it.
Click to expand...
Click to collapse
The drive became un-writable in every way including the ability to format or change any properties of the drive in any drive/partition manager even though the data was all there in perfect shape. Ironically the problem with the drive is now protecting the data
[] AL [] said:
...I would hope to believe that a file explorer alone can not mess it up THAT much alone...
Click to expand...
Click to collapse
Likewise but at this point it would not surprise me considering that Android is a bit fast and loose with more basal aspects of the system including drive management.
Ultramanoid said:
I've used extensively SanDisk 64 GB microsdxc cards with Android. Given all the information you've given, I'd lean towards physical card failure.
It happens. In my experience, very rarely, but it does.
If the same thing happens again to another of your cards anytime soon, that's when you should start a serious investigation about it.
To be honest I've had more smartphones failing on me for a myriad different reasons in the last few years than problems with a card from a reliable manufacturer.
I have washed some of these cards in the washing machine by mistake, and I've used some intensively non-stop every single day for two or three years without an issue. I've run OSes from them often, and always replaced them for another because of speed or space concerns, very rarely because of failure.
They are incredibly resilient. And yet sometimes ( again, rarely ) one will spit input / output errors, or simply die on me, no matter what the format, filesystem, or OS. In fact it happened once with a brand new card that I had just used for a couple of weeks, the irony...
Click to expand...
Click to collapse
Good points. Thanks! I've had similar experiences with Micro SDs surviving through accidental washings as well as heavy use as USB boot drives running various utilities or Linux distributions (one of which had a persistent cache cache right on the card - thats a lot of read/writes) and I can't remember encountering a corrupted SD card that was not physically damaged.
That being said I did once support an outdoor system of over 300 units each of which ran off of a proprietary Linux system on an 8GB SD card where SD card corruption was not uncommon but those "devices" were exposed to thermal extremes, traffic vibrations, and poor quality field work and remote management the likes of which our devices rarely experience.
At first I was leaning toward SD card corruption but now wonder if this was an accidental digital write-protect, perhaps caused by an extremely localized bit of SD card corruption... or something like that... and that is an area where android is faster and looser than many other device/OS combinations.
What is the result of fsck with Linux ?
Ultramanoid said:
What is the result of fsck with Linux ?
Click to expand...
Click to collapse
Similar to Windows chkdsk; In Ubuntu 14.x Live USB boot, fsck (supposedly) reclaims lost clusters, and reports "free cluster summary wrong...". When option to fix is selected the command cannot gain write access to the drive. Re-scan verifies same errors persist.
Here's an idea that worked for me once with a card that refused to be formatted on Linux and OS X; try with a digital camera or DSLR, you may need a micro to SD adapter.
In that case though, mine was a defective card indeed. The camera did format it, and was usable for a little while, before giving errors again, and I discarded it definitely.
Edit : to be precise, the camera did not recognize it and offered to format it ( to FAT being an old DSLR, but a new camera might go for exFAT, and you already suspect foul play because of exFAT ), which worked, and then I could format it again ( ext4 ) in Linux. As mentioned, the card failed again soon afterwards anyway.
Ultramanoid said:
Here's an idea that worked for me once with a card that refused to be formatted on Linux and OS X; try with a digital camera or DSLR, you may need a micro to SD adapter.
In that case though, mine was a defective card indeed. The camera did format it, and was usable for a little while, before giving errors again, and I discarded it definitely.
Edit : to be precise, the camera did not recognize it and offered to format it ( to FAT being an old DSLR, but a new camera might go for exFAT, and you already suspect foul play because of exFAT ), which worked, and then I could format it again ( ext4 ) in Linux. As mentioned, the card failed again soon afterwards anyway.
Click to expand...
Click to collapse
I tried that yesterday in a relatively new camera that is supposedly capable of handling 64GB SDXC but the camera reports that the card could not be used but offered not other information.
As to exFAT - this correction to my initial assessment of the situation: The reason Windows 7 only offers NTFS and exFAT as formatting options is not necessarily because the drive is damaged or had a read only flag applied (although both off those thing now seem likely*) but rather because Windows 7 cannot format USB drives over 32GB as FAT32 even though it can mount and use them if they were formatted elsewhere. This does not really change things other than meaning that the available Windows formatting options are not informative.
* I just called SanDisk support and learned that the card supposedly has some sort of data preservation feature where; when an imminent potential failure is detected the card is indeed digitally write protected. This might mean that there is a way to undo the digital protection although that would put the data risk and the protection is non-standard as the Windows Diskpart command line utility does not show the disk or the volume as write protected.SanDisk even offered to replace the card but I declined (for now) because I want to hack at it some more. At least there now seems to be an understandable mechanism for how this happened.
Thanks for throwing some thought into it
It's interesting, the card I mentioned was a 64GB one, but the camera formatted it to FAT creating a 32GB partition, same limit as Windows. It pretty much ignored the other half of the card that showed up just as free space, but it also undid whatever was blocking the formatting before, which may have been that protection scheme from SanDisk as in your case. Good to learn about that.
Interesting...
I have the same issue with my Samsung 64gb sd. I was moving a zip file from internal sd to external sd with ES File Explorer and all of a sudden my phone froze and I had to hard reset. When I rebooted external was screwed. I have been looking for days for a fix and have come up with nothing. TWRP can see the card but no values. Please any help would be very much appreciated because I have ALL the pictures of my 2 week old son stored in ext sd.
noob4598 said:
I have the same issue with my Samsung 64gb sd. I was moving a zip file from internal sd to external sd with ES File Explorer and all of a sudden my phone froze and I had to hard reset. When I rebooted external was screwed. I have been looking for days for a fix and have come up with nothing. TWRP can see the card but no values. Please any help would be very much appreciated because I have ALL the pictures of my 2 week old son stored in ext sd.
Click to expand...
Click to collapse
See if this helps. Read through it, it has allot of helpful information.
http://forum.xda-developers.com/showthread.php?t=1192508
noob4598 said:
I have the same issue with my Samsung 64gb sd. I was moving a zip file from internal sd to external sd with ES File Explorer and all of a sudden my phone froze and I had to hard reset. When I rebooted external was screwed. I have been looking for days for a fix and have come up with nothing. TWRP can see the card but no values. Please any help would be very much appreciated because I have ALL the pictures of my 2 week old son stored in ext sd.
Click to expand...
Click to collapse
The incident about which I created this thread was sudden as yours was. Try viewing the contents of the SD card in a card-reader on a computer. If you can see the contents and copy to the computer but cannot write to the SD card you may be experiencing the same issue describe in the OP of this thread (irreversible dirty bit write protection due to impending failure detected), in which case you would have to backup the data on the card and get a new one. Also, it is best to keep internal/adoptable storage completely out of this equation as that re-formats and encrypts the SD card.
@MatisyahuSerious
Since this was a bit OT for LOS I've expanded upon this post (https://forum.xda-developers.com/showpost.php?p=71903594&postcount=4155) here where the reply is less off topic.
Off course there are many other bad things that can happen to SD cards, and frequent ROM flashing and TiBU backups put a particular stress on them. Another factor, at least in my case, is that when a high speed SD card (eg Sandisk Ultra red/grey) is used in a USB 3 port (to move data much quicker than MTP) the SD card gets so hot that the painted logo scorches and changes color. Those thermal cycles cant be good for the cards either. I've had 3 go bad in about 6 years, one in the manner described in linked post.
A bit of somewhat related OT: For what this is worth I once supported a system which ran Linux based OS from 8GB SD cards and the most frequent fix was to replace corrupted SD cards. SD cards have gotten better, and some brands may be better than others, but they were not originally designed to handle so much fast R/W and IMO the SD industry is still catching up.