[Q] /storage/emulated/0 missing - One (M7) Q&A, Help & Troubleshooting

After upgrading to trickdroids 4.2.2. based release I have some problems. Only with Grooveshark so far. It crashes every time I run it.
Here is a pastbin for it.
http://pastebin.com/VEHkWvZQ
I understand that
/storage/emulated/0/: to my knowledge, this refers to the "emulated MMC" ("owner part"). Usually this is the internal one. The "0" stands for the user here, "0" is the first user aka device-owner. If you create additional users, this number will increment for each.
/storage/emulated/legacy/ as before, but pointing to the part of the currently working user (for the owner, this would be a symlink to /storage/emulated/0/). So this path should bring every user to his "part".
My app that is crashing since upgrading to 7.? is Grooveshark it requires storage in
/storage/emulated/0/Android/data/com.grooveshark.android.v1/files/cache/player
I have no
/storage/emulated/0
I do have
/storage/emulated/legacy/
How would I make the link to this.
I have tried this but it fails
ln -s /storage/emulated/legacy /storage/emulated/0
link failed Read-only file system
Can somebody help with the commands needed to make this link that is required.

I've got the same problem. Have u solved it? if yes, how?

I've struck similar problem after accidentally deleting internal storage. I had no /sdcard in storage.
Apparently you need to run ;
mount -w -o remount rootfs /
Then ;
ln -s /data/media/0 /sdcard
You can check with ;
ls -l -a /sdcard
I have /sdcard0 now in /storage which appears to be the correct description. I use X-plore file manager and it can now see the internal storage correctly.
However CM File Manager (CM11) indicates internal storage should be at /storage/emulated/0 where as mine is /storage/emulated/legacy. Of course I can create a bookmark in CM File Manager to the folder and can see the storage.
All my apps and phone appear to function normally but i can't help wondering if the structure I have in /root for my internal storage is not quite correct. If anyone can tell me the folder and symlinks I should have it would be of great use.
I've tried recreating symlinks with succes so that CM File Manager can see the internal storage at /storage/emulated/0 but the moment I reboot the phone it's back the to the way it was. Have yet to find a simple explanation for what controls the folder structure in /root and why I can't get the symlinks I create to stick.
Update 5Feb - Did another factory reset and flashed CM11 M2. Everything OK now. Maybe needed a couple of resets to sort the ghosts in the machine.

Related

/mnt/sdcard AND sdcard problem--> Need Help

Sorry if this is in the wrong thread-mod can move.
Yesterday I was trying to install Mobile Defense as a system app as reccommended by MD website and instructions using adb push. Somehow it didn't work real well and I ended up with TWO sdcard directories.
In Root Explorer, one is /mnt and one is /sdcard (like always). The/mnt also has /mnt/sdcard, /mnt/asec and /mnt/secure. The /mnt/sdcard has duplicate entries of /sdcard and is screwing up loading/flashing kernels, etc. I have tried to delete this /mnt directory after Mount R/W in Root Explorer, but it keeps coming back!
I'm not very good at the whole coding/language thing and could use some instructions (4 noobies) as to how to get rid of this file without a total wipe. THANKS in advance
Wrong section.
I believe /sdcard is a link (shortcut) to /mnt/sdcard.
So, depending on your ADB commands, anything that says /sdcard, try changing that to /mnt/sdcard and see if that works better.
mindfrost82 said:
I believe /sdcard is a link (shortcut) to /mnt/sdcard.
So, depending on your ADB commands, anything that says /sdcard, try changing that to /mnt/sdcard and see if that works better.
Click to expand...
Click to collapse
Ok, thanks. The problem is that I downloaded IR's lastes 0524 925 BFS kernel and it shows in recovery as on the sdcard, but when I tried to flash it, the flash failed and said it couldn't find the file on the sdcard. I assumed it was looking in two places at once and got confused/conflicted, therefore it quit?

[Q]It shows there is no free space in system/lib in JP6!

Hi!
I flashed JP6 yesterday, and I want to do internet browser fix and One Click Lag Fix.
But when I copied libwebcore.so to /system/lib or Install EXT2 Tools, It always no free space /system/lib
Now I can only use update.zip to put the files into /system/lib, but OCLF still can not work.
Any help?
thanks!!
+1
Sent from my GT-I9000 using Tapatalk
I notice 2 things with JP6 (installed from Kies via registry mod). Not sure if everyone else is the same.
1. cp command is missing, but mv & rm are present
2. /system is mounted read only
So to make sure the internet browser fix works fine, you'll need to make sure your a.) phone is rooted, b) remount the /system as read write, c.) and then install busybox to use the cp command (if you're installing libwebcore.so by command line, otherwise you can use the file manager to copy files).
There is only about 10MB free space on /system with JP6 (with 803 pit, I believe).
Check this with:
df -h
Also, /system is mounted read-only so you have to remount it as rw before making any changes.
mount -o remount,rw /system
+1 and whenever I try to move an app to sd from the menu in settings>applications>manage applications>app name>Move to SD
It throws an error "Failed to move application. Not enough memory."
I wiped my entire phone clean and still it throws the same error. My internal memory (16 gb) has 10 gb free. The app that I'm trying with is Instant Buttons.
The dev has included move to sd option. Yet it does not work.
ive only got 300kb free in my /system partition on JP6. considering moving modules off to /data and adding it to the path to free up some space. its unworkable like this.

[Q] Internal sdcard problem

Hi All,
I messed up using adb to push a file to my internal SD card - I did something like this:
adb push afile.txt /sdcard
I thought it would place the file into the sdcard folder, but instead it over-wrote /sdcard with the file - ie the sdcard folder was gone, I was left with a file named sdcard in the root of my phone.
So, I renamed that file, and created a symlink, like this:
ln /mnt/sdcard sdcard
Mostly, everything's OK, but I'm getting some weird behaviour, FCs, Android Bookmarks won't display my gmail accounts bookmarks.
<Edit> Reinstalled ROM, and issues gone away.
However, can anyone confirm that the /sdcard folder is just a symlink to /mnt/sdcard?
Is that all I have to do ?
</Edit>
Russell

[CMW, Init.d Script] Swap IntenalSD<->ExternalSD

Hello,
Sorry, not working like on sgs 3 and galaxy note 10.1. Dont apply now. I m working on a fix with vold.fstab, but format changes with jellybean.
Ported from scripts created originally for Galaxy S 3.
This script swaps internal and external sd storage from init.d.
- You must have a JellyBean Stock or Stock Based ROM
- Must be rooted to flash.
Attached to this post, you will find the CWM flashable zip.
This have zero chance to brick your device, but I cannot say if your SD card doesn't have any issues etc... so don't blame me for data loss or anything.
This script will NOT COPY DATA from your sd, so you will have missing data after you restart the phone.
The data is still on the original internal SD, so you'll have to copy it back to your bigger sdcard's root.
Code:
#!/system/bin/sh
#extsd2internalsd is a modification that allows to switch internal sd to external sd and viceversa. With this you can use default internal sd only for app storage #and the external sd to store all apps resource and all others stuff. The resut is a very big increase of installable apps on gs3
#All credits to Mattiadj of xda forum for the idea and script and to mike1986 for the cmw zip.
#Script Modified for SgNote N7000 by aureusz
sleep 5
busybox mount -o remount,rw /
#Tries to mount as vfat
busybox mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
#Tries to mount as exfat
busybox mount -t exfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
#If Sd has been mounted, mount internal SD as extSdCard, if not, do nothing, Android should mount it back as internal.
if busybox mount | busybox grep vold/179:9; then
busybox mount -t vfat -o umask=0000 /dev/block/mmcblk0p11 /mnt/extSdCard
fi
Only problem is, if you use usb mass storage connexion, instead of mtp, it will swap back sd cards.
If you want to remove the script, simply delete the file 11extsd2internalsd from /etc/init.d/ with root explorer or a similar app.
Restart the phone and the problem should disappear.
I'll look into a fix for this.
Strange stuff happenning after first reboot (app2sd make apps disappear). Removing file and placing warning back
Aureusz.
Or you can simply switch mount points in vold.fstab
neobuddy89 said:
Or you can simply switch mount points in vold.fstab
Click to expand...
Click to collapse
The problem with this method is that, if you remove SDCARD, the phone will not mount internal SD back to it's place.
With this script, the internal SD will remount back to internal sd path.
I'm not sure, but that's how I understood it when I read the thread where they talked about this method.
Correct me if I'm wrong, I pretty much a noob at this.
aureusz said:
The problem with this method is that, if you remove SDCARD, the phone will not mount internal SD back to it's place.
With this script, the internal SD will remount back to internal sd path.
I'm not sure, but that's how I understood it when I read the thread where they talked about this method.
Correct me if I'm wrong, I pretty much a noob at this.
Click to expand...
Click to collapse
The solution to that can be decompiling framework-res.apk and editing file storage.xml
Make removable flag true for both storage.
This may or may not work but worth a try.
neobuddy89 said:
The solution to that can be decompiling framework-res.apk and editing file storage.xml
Make removable flag true for both storage.
This may or may not work but worth a try.
Click to expand...
Click to collapse
I'm definitely interested in all options regarding this issue, this has been a big hurdle for me on android with sd card slots, so I took to myself to fix it. I know it's easy to do in ASOP roms but, I missed some S-pen features.
Until now, people used bindings for some directories, for large games data, but this proved not to work for some apps, while this solution works for every app.
Spotify for example lost its synced library, because I think the service would check the synchro of the playlist at device startup, and the folders were not yet mounted... etc.. now, it's flawless.
EDIT : not so flawless, looking into modding fstab as suggested by neobuddy89
neobuddy89 said:
Or you can simply switch mount points in vold.fstab
Click to expand...
Click to collapse
Is it possible that you post the vold.fstab where the mount point is switched for internal and external SDcard? Thanks.
Re: [CMW, Init.d Script] Swap IntenalSD<->ExternalSD
any updates here?
Sent from my GT-N7000 using xda premium

[MOD]SD Swap v5+Initd for any 4.1.2 rom Locked or unlocked xt907+CM4.3alpha-version

Update something
[Edit Philz 6.2.3+ is perfect & does not mess with my swap anymore.]
messed with the install-recovery.sh!
So just reflash the swap , not sure what did it : an xposed modual?
v5 up.
Works now even if on bone stock.
Step 1: (for those rooted, on the ota or out of the box)
Install this https://play.google.com/store/apps/details?id=stericson.busybox
Use the smart install & choose 1.21.1 not 1.22. http://forum.xda-developers.com/showpost.php?p=50064227&postcount=4
Do not use Universal init d.
Reboot.
Step 2:
Flash v5 with Twrp2.6.3 e33 or Philz v6079.
For SafeStrap users using bootstrap, should work.
Reboot.
TWRP e33: http://forum.xda-developers.com/showpost.php?p=49509466&postcount=1
Fixed conflicts with my ◢ PurePerformances™X ◣ mod.
You can only successfully install with Plilz v6079. I only use, for now the one below.
Once installed TWRP does not seem to be a problem.
Plilz v6 for msm8960 phones: Atrix HD, Razr M & Photon Q is here
Took down the deodexed version as it was only the ui from this 1% battery mod that made it different. You can flash it to any deodexed 412 xt907 or xt905 rom.
All storage defaults to storage0 (your real SD card) which is the way it should have been from Motorola, well closer anyway.
Flash from recovery or SS bootstrap Philz v6. Wipe dalvik & cache only. Not for cm based, multuser, or anything but 4.1.2 stock roms!
My ◢ PurePerformances™X ◣ mod must be followed by the SD Swap. Because of a conflict with install-recovery.sh file.
Do not use cwmr 6044 as it messes up the swap by forcing data/media/0. Plilz is better as you can choose data/media only. See my goodies for Philz.
Always use TWRP 2.6.3 e33 OR Philz v6079.(for install use Philz only)
Always choose any NO when rebooting from Philz.
Go Recovery Goodies
Because install-recovery.sh is now an agent in the initd setup & needs to be protected.
Notes on the SD swap: When you choose "Device storage", sdcard0 or storage0 you will browsing your real SD card. When you choose "SD card", sdcard1 or storage1 you will be browsing the internal SD ("data/media").
This internal SD ("data/media") memory now has no purpose. You can move what you want to your real SD & delete everything else to let the phone use it all. All storage defaults to storage0 (your real SD card) which now is the way it should have been from Motorola, well closer anyway.
ZaYAC-ua's swap thread
The formerly unwanted file: install-recovery.sh is now an agent in the initd setup & needs to be protected, as noted above, and it's permissions, if altered, can be restored to rwxr-xr-x.
If this file is not protected you boot up with 2 internal SD cards.
Known issues:
Two things will Kill the SD swap: (by messing with install-recovery.sh)
1)Using TWRP older then v2.6. (To install use Philz only)
2)If you boot from CWMR and choose yes to "disable recovery flash".
Also) If you mess with multiuser roms feel free to delete 0 , obb & legacy folders in internal sd (storage1).
One more) It is expected for your settings-storage info to be out of whack.
Finally) Create folder in root of the phone with Root Explorer results in an error but is the same as the Rabbit's version & of no consequence. The folder does get created anyway. All else works in the root of the phone.
UsbMassStorage: BE SURE TO EJECT FROM PC/MAC BEFORE YOU UNMOUNT. DO NOT USE WITH ANDROID FILE TRANSFER.
".files" are a nuisance when mounting to osx: just delete them AFTER YOU UNMOUNT. Warning: If you do not enable your file browser to show hidden files & you unmount while your (os x is one) trash is full the .file can be huge!
More http://forum.xda-developers.com/showpost.php?p=43434787&postcount=3
V1 DL stats: deodexed-31, odexed-49
Reserved
V3 up. Fixes compatibility w/ PP mod. Twrp will not install the swap & let it work! Plilz v6 will & does twrp restores too....
I'm using this script to swap the storage on PACman and other 4.3 roms that lacks the swap option natively, I guess your solution is more or less the same, using the restore recovery script instead of the real init.d script.
Right ?
Code:
#!/system/bin/sh
sleep 3
mount -o remount,rw /
mount -t vfat -o umask=0000 /dev/block/vold/179:97 /mnt/shell/emulated
mount -o bind /data/media/0 /storage/sdcard1
chown system /data/media/0
chgrp sdcard_rw /data/media/0
chmod 0075 /data/media/0
mount -o remount, ro /
The Solutor said:
I'm using this script to swap the storage on PACman and other 4.3 roms that lacks the swap option natively, I guess your solution is more or less the same, using the restore recovery script instead of the real init.d script.
Right ?
Code:
#!/system/bin/sh
sleep 3
mount -o remount,rw /
mount -t vfat -o umask=0000 /dev/block/vold/179:97 /mnt/shell/emulated
mount -o bind /data/media/0 /storage/sdcard1
chown system /data/media/0
chgrp sdcard_rw /data/media/0
chmod 0075 /data/media/0
mount -o remount, ro /
Click to expand...
Click to collapse
Thanks. Did you have a link? I have never found one that works for 4.1.2 + !
aviwdoowks said:
Thanks. Did you have a link? I have never found one that works for 4.1.2 + !
Click to expand...
Click to collapse
A link ?
That's all I'm using, just copy it save it to (say) 02sdswap, put the file in the /etc/init.d folder and set the permissions as the other init.d files.
Then reboot the phone.
That's all
Keep in mind to use a decent editor and set the end line format to UNIX.
I'm using it on 4.3 on PhotonQ but it should work, as is, on other similar phones like the Razr M, or with little adjustment in other phones.
Is far from perfect but looks to be enough to solve the problem.
The Solutor said:
A link ?
That's all I'm using, just copy it save it to (say) 02sdswap, put the file in the /etc/init.d folder and set the permissions as the other init.d files.
Then reboot the phone.
That's all
Keep in mind to use a decent editor and set the end line format to UNIX.
I'm using it on 4.3 on PhotonQ but it should work, as is, on other similar phones like the Razr M, or with little adjustment in other phones.
Is far from perfect but looks to be enough to solve the problem.
Click to expand...
Click to collapse
Just tried it, removing the "/0" from each line w/ datamedia.
No go for 412.
aviwdoowks said:
No go for 412.
Click to expand...
Click to collapse
Practically I've never used JB 4.1.2, as I see no point in doing it.
Depending on my moot I use my internationalized ICS, or a good 4.3 unofficial rom.
Bacause this, I don't remember exactly the changes in paths and symlinks between 4.1.2 and 4.3
But very likely the /mnt/shell/emulated is not present on 4.1.2, just check if I'm not wrong, and eventually change the /mnt/shell/emulated to the correct mountpoint.
V4 up. Much improved. Only the install-recovery.sh annoyance to overcome. I am trying a "userint.sh" version. Anyone know if that is do-able on a moto phone? Htc phones use it with a swap.
Couple this concise commentary of the data media problem,
http://teamw.in/DataMedia
[translation: data/media is useless if you have ext sd as default storage.
It needs to be formatted for reliable rom flashes (esp. 4.4)
& you can do it from Philz! ]
With the ability to use a large sd card on our phone,
then you understand why keeping data media zeroed out along with a sd swap is so nice.
Where oh where is a swap for 4.4?
Btw a new Plilz with ext sd cwm folder detection :fingers-crossed: due out soon.

Categories

Resources