Strange /sdcard /mnt/sdcard inconsistency - Fascinate General

So yes, I know /sdcard is a symlink to /mnt/sdcard. But, I am baffled as to why when I go into /sdcard there is a voodoo log folder and not my sdcard data. And I've tried deleting /sdcard and creating a new symlink but rebooting into cwm, it couldn't see /sdcard still and then when I booted back up, the voodoo stuff was back!
Any ideas?

Related

Insufficient Space Available

Ok, so I was rocking Thedude's 1.1a and new a2sd method on a 1 gig SD card. I recieved my 16 gig card in the mail yesterday, so I backed up my /system/sd/app and /system/sd/app-private, rebooted the phone with the new card in, partitioned it (500MB ext2), copied the directories back over to the SD and everything worked dandy.
Until, that is, I needed to install an application. First, it was LatinIME.apk. The app was acting goofy for my beforehand, but I was waiting until I got the new SD card to try fixing it. I removed the apk from /system/sd/app but the app still worked, so I had to uninstall it from the settings menu. I then tried installing it from the apk using appsintaller, but got the error message:
"Android Keyboard could not be installed on this phone."
Great.. I tried reboot etc, but nothing. So I try to ADB install it:
"INSUFFICIENT_SPACE_AVAILABLE" (or something to that extent, didn't write it down)
Alright, whatever. I physically copied the apk into /system/sd/app and it worked out beautifully.
Now, when I try to install an app from the market, I get an error:
"Installation error: Insufficient storage available"
which is complete BS because I can (using adb shell) put any file I want into /system/sd/app and there's 470 MB remaining.
I searched for this problem, but all I found were people with the same problem on A2SD old method, and they had to symlink app-private to their SD card too. I have app-private and app in /system/sd, so I'm not too sure what the problem is. When I remove my new card and use the old card, same problem. When I remove my card and try to have it install to /system/intmem, same problem. Does anyone have any ideas?
Ooglez said:
Ok, so I was rocking Thedude's 1.1a and new a2sd method on a 1 gig SD card. I recieved my 16 gig card in the mail yesterday, so I backed up my /system/sd/app and /system/sd/app-private, rebooted the phone with the new card in, partitioned it (500MB ext2), copied the directories back over to the SD and everything worked dandy.
Until, that is, I needed to install an application. First, it was LatinIME.apk. The app was acting goofy for my beforehand, but I was waiting until I got the new SD card to try fixing it. I removed the apk from /system/sd/app but the app still worked, so I had to uninstall it from the settings menu. I then tried installing it from the apk using appsintaller, but got the error message:
"Android Keyboard could not be installed on this phone."
Great.. I tried reboot etc, but nothing. So I try to ADB install it:
"INSUFFICIENT_SPACE_AVAILABLE" (or something to that extent, didn't write it down)
Alright, whatever. I physically copied the apk into /system/sd/app and it worked out beautifully.
Now, when I try to install an app from the market, I get an error:
"Installation error: Insufficient storage available"
which is complete BS because I can (using adb shell) put any file I want into /system/sd/app and there's 470 MB remaining.
I searched for this problem, but all I found were people with the same problem on A2SD old method, and they had to symlink app-private to their SD card too. I have app-private and app in /system/sd, so I'm not too sure what the problem is. When I remove my new card and use the old card, same problem. When I remove my card and try to have it install to /system/intmem, same problem. Does anyone have any ideas?
Click to expand...
Click to collapse
I hate to be devil's advocate here but do you know how much space is available on /system/sd/intmem? Could be that it's seeing that there isn't enough space there and so won't let you install.
[email protected] said:
I hate to be devil's advocate here but do you know how much space is available on /system/sd/intmem? Could be that it's seeing that there isn't enough space there and so won't let you install.
Click to expand...
Click to collapse
busybox df -h: (or at least the relevant parts)
Code:
Filesystem Size Used Available Use% Mounted on
/dev/block/mtdblock5 74.8M 28.6M 46.2M 38% /system/intmem
/dev/block/mmcblk0p2 535.5M 27.8M 480.4M 5% /system/sd/
unionfs 535.5M 27.8M 480.4M 5% /data/app
unionfs 535.5M 27.8M 480.4M 5% /data/app-private
Also, I have tried wiping and reflashing the phone, then reinstalling the latest a2sd method (replacing both init.rc and a2sd.sh).. so I'm really at a loss :-/
i think there might be two explanations
one is that there is some other file system error, but the app installer is not designed to cope with that, so it mistakenly reports no space.
or the installer is hardcoded to check the /data partition instead of the mount point /data/app is in.
billc.cn said:
i think there might be two explanations
one is that there is some other file system error, but the app installer is not designed to cope with that, so it mistakenly reports no space.
or the installer is hardcoded to check the /data partition instead of the mount point /data/app is in.
Click to expand...
Click to collapse
I think it may be the first one. When I connect my SDcard to the computer using the pull down menu and mount (which worked on the 1 gig,) upon disconnecting, the phone crashes trying to "prepare the SD card" and will reboot. What's goin on, eh?
For troubleshooting purposes, this is what I get from
busybox df -h:
Code:
Filesystem Size Used Available Use% Mounted on
tmpfs 48.2M 0 48.2M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 90.0M 64.4M 25.6M 72% /system/
/dev/block/loop0 836.0K 836.0K 0 100% /system/modules
/dev/block/loop1 3.5M 3.5M 0 100% /system/xbin
/dev/block/mtdblock5 89.8M 29.8M 59.9M 33% /data
/dev/block/mtdblock4 30.0M 1.1M 28.9M 4% /cache
/dev/block//vold/179:1
7.4G 3.5G 3.9G 47% /sdcar
Using Dude's 1.2, I DO NOT want apps2sd, so do not have ext2 partition on my SD card. I like to just be able to install apps to internal memory.
Ooglez said:
I think it may be the first one. When I connect my SDcard to the computer using the pull down menu and mount (which worked on the 1 gig,) upon disconnecting, the phone crashes trying to "prepare the SD card" and will reboot. What's goin on, eh?
Click to expand...
Click to collapse
Sorry, wasn't concentrated enough the first time. I saw that using the unionfs method, you mounted the internal data partition on /system/intmem , so what is data now? Is it mounted at all? Because if it's not mounted, it is just a directory of the ramdisk image, which is read-only and indeed has no free space. Could you explain to my why it is necessary to mount mtdblock5 this way?
what is the output of :
ls -l /system/sd
It's a permission issue I think .
try
chown -r 1000:1000 /system/sd
chmod -r 755 /system/sd
I really do believe poeple need to read that sticky. Please people do a search before posting.
maybe the 2 100%'s in the chart?
Haven't tried ADB on my pc but trying to install from market gets me same from above, " insuffcient storage space available. This is what I get from busybox
$ busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 48.2M 0 48.2M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock. 367.5M 64.4M 3.1M 95% /system
/dev/block/loop0 836.0K 836.0K 0 100% /system/modules
/dev/block/loop1 3.5M 3.5M 0 100% /system/xbin
/dev/block/mtdblock5 74.8M 34.3M 40.5M 46% /data
/dev/block/mtdblock4 67.5M 1.5M 66.0M 2% /cache
/dev/block//vold/179:1
3.8G 3.4G 412.7M 89% /sdcard
I do not have A2SD mainly because I don't care for it. I am well aware that 1.2 of dude's bill carries bugs and I would revert back to 1.1 or something of similar likes but being unable to install a file manager and not being able to access a pc has left me with an eternally stock g1...
reverted to dude 1.1
That solved it now I'm on cyanogen's build works great. I'm ditching dude till he fixes it...
What DID WORK on the other hand was removing the entire app directory under /data/data.
So for instance for "Network Discovery" app that would not update due to
"insufficient storage available" i did:
cd /data/data
rm -rf info.lamatricexiste.network
The app would then install from Market as usuall.
apider said:
cd /data/data
rm -rf info.lamatricexiste.network
Click to expand...
Click to collapse
That's strange, I have this issue from time to time, developing from eclipse, when pushing update of my app to the device (N1).
Network Discovery does not have any special thing that could end to this behavior, using only the sdk..
Let me know martindjr88 if you are using "Network Discovery" too.

Using B&N Storage normally

One of the biggest issues I had with my nook was the 16/1GB division between content I can load and content from B&N/etc. Not being able to use that 16GB how I wanted was something I set forth to fix. Here is my solution to make this usable to non-rooted apps.
1) Root if not already rooted.
2) Make a directory inside of /data. I chose /data/usrdata.
3) remount / as RW with the command mount -o remount,rw -t rootfs rootfs / (credit to whomever wrote the nook&zergy.bat 1 click root. Sorry, it's been a long night, just let me know who and I'll edit)
4) mkdir /mnt/internal . We need somewhere to mount /data/usrdata/ and /mnt is public enough.
5) busybox mount -o bind /data/usrdata /mnt/internal. Mounts /data/usrdata to /mnt/internal.
6) For good measure, chmod 777 /mnt/internal and chmod 777 /data/usrdata.
Now, /mnt/internal should have whatever free space /data has, and should be read/write accessible from any program. A quick test with touch+terminal emulator shows new files as being created with RW permissions for all.
Alternatives: When I was initially thinking about ways to do this, my first reaction was to just open up /data to be read only to all, then have my usrdata folder be read/write all. However, I know part of android's app security model depends on some of these permissions. While I can't think of anything breaking or sensitive data being leaked, I decided against it. If anyone has any thoughts as to that scenario, I am very interested in hearing about it.
USB support: This will *not* be mountable under USB. Unfortunately you are still limited to transfering the data from a computer to the B&N internal storage or SDcard first, then moving the data internally. The problem that I see with this is similar to my understanding of the galaxy nexus situation, where the system can't unmount its /data partition and let the USB host take over. Another alternative to this could be to write an image file and mount that over usb (I've done this on my Evo, it worked so-so). Problem with that is that it really wouldn't grow/shrink with the storage. I suppose you could do some shell trickery and pipe it through gzip somehow, but that wouldn't help very much.
Let me know what you think and if you have any ways to improve this.
UPDATE: Persistance:
To make this persistant across reboots, run these commands as root:
1) mount -o rw,remount -t ext4 /dev/block/platform/mmci-omap-hs.1/by-name/system /system
2) echo mount -o remount,rw -t rootfs rootfs / >> /system/bin/clrbootcount.sh
3) echo mkdir /mnt/internal >> /system/bin/clrbootcount.sh
4) echo busybox mount -o bind /data/usrdata /mnt/internal >> /system/bin/clrbootcount.sh
5) echo mount -o remount,ro -t rootfs rootfs / >> /system/bin/clrbootcount.sh
All this does is put the following at the end of clrbootcount.sh
mount -o remount,rw -t rootfs rootfs / #Remounts root as RW. Root is regenerated at each reboot, so /mnt/internal is never going exist on a fresh startup
mkdir /mnt/internal #make /mnt/internal, see above
busybox mount -o bind /data/usrdata /mnt/internal #Binds the directory
mount -o remount,ro -t rootfs rootfs / #remounts root as RO. Unsure if this is necessary, but since it runs as RO, its probably better safe than sorry.
Thanks to eded333 for mentioning a good place for the script.
Edit: Doh, can a mod please move this to the nook tablet general forum? I must have failed reading...
This file autostarts each time you boot:
/system/bin/clrbootcount.sh
Add what you want at the end, and it will autoexecute it.
Wouldn't it be easier to just make a symbolic link to any partition you want to use?
Edit:
XD, didn't read you'r edit, , anyway maybe this works also for you.
Out of curiosity, what would symlinking to /sdcard do exactly? I don't think I'm quite following what you're saying. If I'm linking a directory to /sdcard, that would just go to the microsd card slot, which isn't what I was intending to do. The Nook tablet (I accidently posted this in the wrong forum, that much helps too) has 16GB of storage that is internal on /data, and can't be used through normal means. My goal was to be able to use this 16GB of data outside of rooted apps. Maybe I'm not understanding completely as I am a bit sleep deprived at the moment.
Thanks for the recommendation for the startup script though! I will definitely give that a shot and see if that makes this persist across reboots.
Yeah, I though you were talking about the NST which only has 2gb of internal memory and 200 mb left to use if you dont repartition, dont really know how the partitioning is on the nook color but just symlinking (hardlinks) the folder you want on a partition to another folder on another partition which has more space would resolve the issue.
Edit:
If i'm not getting it wrong and you want more space than the nook gives you, to store content. This should work, hope I'm not wrong
Yeah sorry about that. I thought I was in the nook tablet section and when I went back because I got new email, it looked very different. Imagine what posting in the wrong forum can do...
By default the nook tablet has 16GB of NAND, with 14 or 15GB set as /data and 1GB as /media thats accessible over usb. I've read a lot of people disliking the idea of wasting all that space, myself included, so that's what spurred it. Initially I was going to have the remount command ignore FS permissions since it was public anyway, but I couldn't do that with bind.
gameman733 said:
Yeah sorry about that. I thought I was in the nook tablet section and when I went back because I got new email, it looked very different. Imagine what posting in the wrong forum can do...
By default the nook tablet has 16GB of NAND, with 14 or 15GB set as /data and 1GB as /media thats accessible over usb. I've read a lot of people disliking the idea of wasting all that space, myself included, so that's what spurred it. Initially I was going to have the remount command ignore FS permissions since it was public anyway, but I couldn't do that with bind.
Click to expand...
Click to collapse
Don't know if this sounds dumb, but you can try to mount as rw the partition you want to use, then use ln -s + the folders on the partitions you want to link and see if it works, add the commands at the end of the file I showed you and look if it works correctly. Make sure the folders you use have sufficient permissions and that the partition is mounted as rw.
Edit:
You could allways resize the partitions without any inherent problem, make a backup before trying this.
I found it
need help with /mnt/internal please
I have been troubleshooting this for several hours. I have rooted my NT with latest indirects n&Z .bat. Everything is fine with that. I followed the instructions from kenblat for mounting the reserved data space that is now accessible to me through Root Explorer and making it persist through reboot with the new clrbootcount.sh. Here is where things are falling apart for me....a directory called /internal is appearing as it should in /data/mnt, and I created an "audio" directory there, and I have been able to copy a few songs into it.....but, at some point, the whole system freezes, never finishes the "paste" part, and I have to force reboot in order to get anything running again. When reboot, any and all of the material that I did manage to copy/paste into the /mnt/internal directory is GONE. I have tried changing permissions, but so far I have gone through this at least 9 times (I am a very persistent person when it comes to this stuff) and always the system stops functioning in the middle of pasting. My /internal folder is set to RWall, /data is rwxrwx--x, usrdata is rwall. clbootcount.sh is set to ---rwxr-x. I can't imagine that it really is a permmissions problem because of the fact that i am able to copy SOME files, a few at a time, without a problem. Can anyone possibly help me? Thanks.
IT WAS NOT A PERMISSIONS ISSUE. DISCOVERED BUSYBOX WAS NOT INSTALLED. (DON'T KNOW HOW IT GOT UNINSTALLED) I OPENED NINJAMORPH AND IT DID ITS CHECKS AND THERE IT WAS, NO BUSYBOX INSTALLED. SO I REINSTALLED IT, NOW MOUNTS INTERNAL AND PERSISTS UPON REBOOT. NO WONDER I HAD PROBLEMS.
Need help.
I have been trying to everything step by step as it says here but it is not workign for me. I just recently rooted my nook tablet. I was wondering, maybe a video tutorial would more.

[Q] Spoof sd card mount

I am a big fan of books. This is why I have a nook simple tablet. But after being introduced to Overdrive, which I am sure at least one of you has heard of (Googie), I want to be able to download ebooks from overdrive. The only problem is, I would need an external storage device to save these from opera mobile. This is a bit unsettling, seeing as I don't have a micro sd card. (don't ask.)
So, my question is, is there a way to fool the nook into thinking an sd card is inserted?
Thanks in advance!
Since sdcard is mounted under /sdcard directory, I believe mounting (binding) a directory under writeable partition (e.g. /data/sdcard) to /sdcard might be enough.
May need to also link to /data/sdcard as well as the /sdcard. This can be done with symlinks or mounting. Ie mount said partition to /data/sdcard then symlink from /data/sdcard to /sdcard. Though the /sdcard symlink may already be there
Sent from my ADR6300 using Tapatalk
How would one do this? I just recently adopted android and I do not know much.
it might require modifications to the ram disk within the boot.img. or possibly using ln -s /data/sdcard /sdcard after boot is completed in a terminal. You may need to delete the /sdcard dir first and set proper permissions
Looking in a terminal you will need to symlink the emmc(internal memory) to /data/sdcard. ln -s <emmc dir> /data/sdcard. You may need to delete the /data/sdcard dir first.
Sent from my ADR6300 using Tapatalk
Hmm...
I'm just going to get an sd card. Thanks anyway, it's interesting to know you can do that.

[Q] How to use ext3-sdcard?

Hi all,
i formatted my sdcard with ext3, but CM7 doesn't mount it. I changed the 'vfat' in the fstab to 'ext3', but it still dosn't mount the card. I can manually mount it with 'mount /dev/block/mmcblk0p1 /sdcard', but then I can only access /sdcard via Terminal Emulator or the adb shell. Root explorer says that it is not mounted although it is mounted. Does anybody know how to fix that?
Mister Ypsilon said:
Hi all,
i formatted my sdcard with ext3, but CM7 doesn't mount it. I changed the 'vfat' in the fstab to 'ext3', but it still dosn't mount the card. I can manually mount it with 'mount /dev/block/mmcblk0p1 /sdcard', but then I can only access /sdcard via Terminal Emulator or the adb shell. Root explorer says that it is not mounted although it is mounted. Does anybody know how to fix that?
Click to expand...
Click to collapse
Hey dude, I feel ya. I wanted to ext3 all the way, but google thought Android users would rather use fat for their sdcards so we're bound to trying to work around it. You might want to look at your sdcard permissions, check that you have "X" permissions for user, group and other, or just go crazy and do "chmod -R 777 /sdcard".
You could look into what this guy did: http://android.modaco.com/topic/308568-how-can-i-bind-mount-eg-systemsdxxx-sdcardxxx/#entry1511967
but I backed out mainly because it looks too much like more trouble than its worth.
Good luck!

How to rename file in boot partition of sdcard

This may not be possible, but it would be good if it were
Attached below is the output of the "mount" command. The sdcard has four partitions:
(root--contains the boot information, u-boot.bin, uImage, mlo, etc.)--FAT32
system--ext3
cache--ext3
userdata--ext3
When the device boots from the card, the root or boot partition is invisible. I'd like to mount that partition while the ROM is running (if possible) and rename u-boot.bin to something else like u-boot.bin.bak. Or maybe the partition is already mounted and I just need to know how to access it.
I can't see in the mount output where to try this.
Is it possible?
nmyshkin said:
This may not be possible, but it would be good if it were
Click to expand...
Click to collapse
Huh? Why would you want to do that?
Code:
# mount -o rw,remount rootfs /
# mkdir /boot
# mount -t vfat /dev/block/mmcblk0p1 /boot
# ls -l boot
Renate NST said:
Huh? Why would you want to do that?
Code:
# mount -o rw,remount rootfs /
# mkdir /boot
# mount -t vfat /dev/block/mmcblk0p1 /boot
# ls -l boot
Click to expand...
Click to collapse
Oh so excellent! A simple mv command and the device will boot into the stock OS instead of the sd ROM!!! And from the stock OS, a simple rename of the u-boot.bin.bak file and the device will reboot into the sd ROM. A crude "boot menu" of sorts without removing the sdcard to effect the change. To be done by two little apps, one for each ROM.
That's why I would want to do that. Thank you!!
Hmm...is there any reason to unmount the rootfs before rebooting? And is the mkdir /boot permanent or does it need to be executed each time?
Edit: the answer to my second question seems to be "no" as after a reboot I had to execute the mkdir /boot command again.
But the desired effect is not achieved. After supposedly renaming u-boot.bin to u-boot.bin.bak a reboot resulted in the sdcard ROM booting up again. A check of the files in the boot partition (as above) shows u-boot.bin.bak so it should not have been able to find the file to boot from and therefore should have booted from the internal OS.
So...after powering down completely and removing the sdcard to take a look at the active (boot) partition, I find that u-boot.bin has NOT been renamed, even though the file listing showed it as such. That explains the reboot back into the sdcard ROM, but not much else.
Edit2: I see that a "boot" folder has been created in the root directory of the sdcard and it contains the files that are in the boot partition, plus a few I've not seen before. Even after a reboot this folder contains the renamed u-boot.bin file but it doesn't do me any good there.
So, I'm confused.
You have an SD card and the NST is booting from there, right?
You want to make it so you can select between SD card and internal?
The instructions I gave were for mounting the internal u-boot.bin
Since the SD card is preferred by the loader you want to rename the u-boot.bin on the SD card.
And you probably don't even want to do that.
The mlo is the first thing loaded, you probably want to incapacitate that instead.
This is for the SD card:
Code:
# mount -t vfat /dev/block/mmcblk1p1 /boot
Renate NST said:
The mlo is the first thing loaded, you probably want to incapacitate that instead.
This is for the SD card:
Code:
# mount -t vfat /dev/block/mmcblk1p1 /boot
Click to expand...
Click to collapse
Yes! Things were a little dicey at first because I had inadvertently incapacitated the stock OS during my fumbling around by renaming the internal u-boot.bin (oops). Fortunately the device was forgiving and allowed me to remove the sdcard without any apparent bad effects, rename u-boot.bin.bak again, reinsert the card and patiently try to force the power key to do it's stuff. I finally got a reboot to the card, fixed the internal boot issue and tried again.
It works!!!! But you knew it would
I agree, renaming MLO makes more sense (and works). I knew that was first in line but became a little fixated on u-boot.bin because my original search began with a dual boot scheme used for the Nook Color which involved patching a menu system into u-boot.bin. Way out of my league, but my mostly fruitless reading eventually led me to my rather more pedestrian idea.
In a way, it makes more sense in the context of the NST which most people don't turn off. As long as there is a way to move back and forth between the emmc and sdcard OSes without swapping cards or shutting down completely, that's what I was hoping for at a minimum. I think this will do nicely.
Thanks again for your help. Now back to work on this beast...

Categories

Resources