Related
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?
Hi,excuse me for my bad english but i'm italian.
Now you can mount the external sdcard as /sdcard/ band the internal sd as /sdcard/Internal_SD/.
1) Make a backup of your vold.fstab located in /System/etc/.
2) create a new vold.fstab and copy that in the file:
## Vold 2.0 NVIDIA Whistler fstab
#######################
## Regular device mount
##
## Format: dev_mount
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## - List of sysfs paths to source devices
######################
## 20100725, [email protected], Add 2nd external memory
#LGE_CHANGE_S[[email protected]] change for issue: not able to boot with corrupted SD card
#dev_mount extsdcard /mnt/sdcard/_ExternalSD auto /devices/platform/tegra-sdhci.2/mmc_host/mmc1 /devices/platform/tegra-sdhci.2/mmc_host/mmc0
dev_mount sdcard /mnt/sdcard auto /devices/platform/tegra-sdhci.2/mmc_host/mmc /devices/platform/tegra-sdhci.2/mmc_host/mmc0
dev_mount extsdcard /mnt/usbdisk auto /devices/platform/tegra-sdhci.3/mmc_host/mmc2
Band replace the original.
3)Reboot Phone.
4) create a new script band copy this text in it:
/system/xbin/mount /dev/block/platform/tegra-sdhci.3/mmcblk0p9 /mnt/sdcard/_InternalSD/
Copy it in the external sdcard.
5) download script manager and give it the root permissions. Open the script with script manager and open it as executable. Run it with root permissions and make it executable at boot.
6) Create a new folder in your external sd and rename it _InternalSD.
7) Reboot phone.
Sent from my LG-P990 using XDA
I did all like you said (even copied) and it didn't work, and when using this hack, the USB Storage functions properly? I have an modded vold.fstab and when I connect it to PC it doesn't mount properly (tested in Windows XP / 7)
Thanks
I haven't tried USB storage but it wroked tor me.
I've tested it in django manouche 1.2 and in stock v20l rebuild.
Ok sorry i had write wrong in the post i'll edit it now with the right procedure and sorry for my english.
You have to create new folder in your external sd.
Sent from my LG-P990 using XDA
Cice96 said:
I haven't tried USB storage but it wroked tor me.
I've tested it in django manouche 1.2 and in stock v20l rebuild.
Ok sorry i had write wrong in the post i'll edit it now with the right procedure and sorry for my english.
You have to create new folder in your external sd.
Sent from my LG-P990 using XDA
Click to expand...
Click to collapse
In the line:
dev_mount sdcard /mnt/sdcard auto /devices/platform/tegra-sdhci.2/mmc_host/mmc1 /devices/platform/tegra-sdhci.2/mmc_host/mmc0
We don't need the 1 here?
I tried now what you said about the line and it don't work for me.
Is my method working for you?
Cice96 said:
I tried now what you said about the line and it don't work for me.
Is my method working for you?
Click to expand...
Click to collapse
No it doesn't mounts on /mnt/usbdisk, can this be a ROM related? I'm on Django 1.3b12, could you try your method in this ROM?
Are you talking about USB storage?
Cice96 said:
Are you talking about USB storage?
Click to expand...
Click to collapse
Yes and no, at same time haha, I have made an vold.fstab who mounts perfectly, as External SD in /mnt/sdcard and Internal in /mnt/sdcard/_ExternalSD, but when I try to use USB Storage it bugs everything.
With your mod, my phone only mounts the External SD at /mnt/sdcard, but it doesn't mounts my Internal at /mnt/usbdisk, so it's partial functioning.
Can you try to use USB Storage on your mod, and see if it functions properly?
Ok i understand.In my mod the internal sd is mounted in the folder "_InternalSD".
If you want sdcard mounts in \mnt\usbdisk\ you have just to edit the script and replace \mnt\sdcard\_InternalSD\ with \mnt\usbdisk\.
I used this mod in stock roms because if i edited the vold.fstab to switch the sd it didn work but with this method it worked.
It's only an alternative mod to switch the sd.
Maybe for the usb storage i can make a script that mount the sdcards when you activate it but i don't know how USB storage works.
Cice96 said:
Ok i understand.In my mod the internal sd is mounted in the folder "_InternalSD".
If you want sdcard mounts in \mnt\usbdisk\ you have just to edit the script and replace \mnt\sdcard\_InternalSD\ with \mnt\usbdisk\.
I used this mod in stock roms because if i edited the vold.fstab to switch the sd it didn work but with this method it worked.
It's only an alternative mod to switch the sd.
Maybe for the usb storage i can make a script that mount the sdcards when you activate it but i don't know how USB storage works.
Click to expand...
Click to collapse
Your vold.fstab is mounting Internal in /mnt/usbdisk
dev_mount extsdcard /mnt/usbdisk auto /devices/platform/tegra-sdhci.3/mmc_host/mmc2
Because of anything that I didn't know, the vold mounts /mnt/usbdisk but if you navigate to the folder with Root Explorer, you don't see anything.
But when I use the script invoking block/partition (mmcblk0p9) it mounts in /mnt/sdcard/_InternalSD.
Only thing is that if we try to use USB Mass Storage function, it doesn't work, right? My phone don't mounts atm
If we can correct this inconvenience, it will be great =)
Thanks!
Excuse me again
After replace the vold.fstab you must reboot phone.
I've tried my mod now and it works.
The script remount the internal sd at boot so it's in _InternalSD folder.
You have to create script if not the internal sd will not mount.
USB storage isn't working but i'm trying to found a solution.
Cice96 said:
Excuse me again
After replace the vold.fstab you must reboot phone.
I've tried my mod now and it works.
The script remount the internal sd at boot so it's in _InternalSD folder.
You have to create script if not the internal sd will not mount.
USB storage isn't working but i'm trying to found a solution.
Click to expand...
Click to collapse
So we are at same point now, with the mounted partitions, but because of anything that I didn't know, the vold mounts /mnt/usbdisk but if you navigate to the folder with Root Explorer, you don't see anything.
I was thinking about some type of program who mounts it for us, trying to find now, I was studying Gueste similar hack made to CM7, and it alters something in framework.jar, think that the modded framework.jar is for the USB Storage functions.
I use the script because phone won't mount 2nd sdcard so i need to remount it after reboot.I can choose where to mount 2nd partition with the script ignoring the vold.fstab mount.
Would be awesome to find a similar program that do it for us!
Cice96 said:
I use the script because phone won't mount 2nd sdcard so i need to remount it after reboot.I can choose where to mount 2nd partition with the script ignoring the vold.fstab mount.
Would be awesome to find a similar program that do it for us!
Click to expand...
Click to collapse
Now we only need a way to make USB Storage works, I will search for any apps or methods, but I think we need a dev to our little problem here haha
You're right we will need the help of a developer.
Hi guys, I am struggling with this issue for a few days and looking for I found this topic.
I commented that by modifying the vold.fstab, I lose USB Storage, but it is not true at all, get me a new partition, which is nothing more and nothing less than the System.
So I will continue this procedure you proposed.
Speaking of the script to mount the SD, there is an APK that runs a script to the startup of the system, called Autostart (Root) and is in Play Store (old Market)
EDIT:
The zip includes:
-Folder /data/opt/autostart.sh
-modified vold.fstab
Then there is installing Autostart.apk and restarting
Installable from the recovery zip
Just need to settle the issue of the mass storage
Homero2 said:
Hi guys, I am struggling with this issue for a few days and looking for I found this topic.
I commented that by modifying the vold.fstab, I lose USB Storage, but it is not true at all, get me a new partition, which is nothing more and nothing less than the System.
So I will continue this procedure you proposed.
Speaking of the script to mount the SD, there is an APK that runs a script to the startup of the system, called Autostart (Root) and is in Play Store (old Market)
EDIT:
The zip includes:
-Folder /data/opt/autostart.sh
-modified vold.fstab
Then there is installing Autostart.apk and restarting
Installable from the recovery zip
Just need to settle the issue of the mass storage
Click to expand...
Click to collapse
Could you please explain what is the "new system partition" and how the USB Mount isn't lost?
Sent from my LG-P990 using xda premium
What I have done is to collect all that you have done and create an installation script.
Still do not know how to mount the PC mass storage
Hi,
I already asked for this issue in the this Thread, but didn't got any answer.
I tested these three JB ROMS: CM10, HellyBean and SlimBean.
All of them work nice, except that my internal sdcard does not mount at boot time.
I have to do it manually every time boot up my phone by choosing System Settings --> Storage --> Mount SD card
Anyone have the same issue?
Does anyone have a solution?
Thanks
Same here! Google found this post, perhaps it will find us an answer
xalo2k said:
Hi,
I already asked for this issue in the this Thread, but didn't got any answer.
I tested these three JB ROMS: CM10, HellyBean and SlimBean.
All of them work nice, except that my internal sdcard does not mount at boot time.
I have to do it manually every time boot up my phone by choosing System Settings --> Storage --> Mount SD card
Anyone have the same issue?
Does anyone have a solution?
Thanks
Click to expand...
Click to collapse
toddmworth said:
Same here! Google found this post, perhaps it will find us an answer
Click to expand...
Click to collapse
I have the same issue with my I9000.
Any JB with different kernels makes the internal SD eventually be unmounted. When install a JB ROM the phone works very well but suddenly, the internal SD (phone's SD) is unmounted.
In CWM both SD are mounted and read without any problem. With ICS ROMs the phone works flawlessly.
In my case, the external SD is functioning as expected.(I have a 32 GB micro sd)
The installation language is Spahish - Spain.
No matter which method of cleaning and wiping I use, the result is the same.
Also, starting from GB stock firmware (JVU) flashed with Odin, followed by installing the nightly Cianogen CM10.1 and finally flashing the desired JB ROM works.
I tested Helly Bean, Slim Bean, C-ROM Mix and Baked Blacjbean7 obtaining the same behaviour.
Important: I'm restoring around 54 apk using Titanium backup (games, applications and utilities) in every case. I did not tested the ROMs without these restorations.
marcelogabriel said:
I have the same issue with my I9000.
Any JB with different kernels makes the internal SD eventually be unmounted. When install a JB ROM the phone works very well but suddenly, the internal SD (phone's SD) is unmounted.
In CWM both SD are mounted and read without any problem. With ICS ROMs the phone works flawlessly.
In my case, the external SD is functioning as expected.(I have a 32 GB micro sd)
The installation language is Spahish - Spain.
No matter which method of cleaning and wiping I use, the result is the same.
Also, starting from GB stock firmware (JVU) flashed with Odin, followed by installing the nightly Cianogen CM10.1 and finally flashing the desired JB ROM works.
I tested Helly Bean, Slim Bean, C-ROM Mix and Baked Blacjbean7 obtaining the same behaviour.
Important: I'm restoring around 54 apk using Titanium backup (games, applications and utilities) in every case. I did not tested the ROMs without these restorations.
Click to expand...
Click to collapse
This is the problem I am having. I can see internal sd card on CWM.
But on booting in android, whatever the rom is , does not mount internal sd card on booting android.
Please help to solve this.
Same here
TheMask007 said:
This is the problem I am having. I can see internal sd card on CWM.
But on booting in android, whatever the rom is , does not mount internal sd card on booting android.
Please help to solve this.
Click to expand...
Click to collapse
I have been reading/researching about this issue for about a week (on and off) trying various fixes because this is driving me bonkers.
I have tried:
1) Reduced the amount of used space on my SD Card (Samsung 16gb SDHC) to half
2) Moved as many apps as I can to SD (Noticed more frequent unmounts after this)
3) Removed my Nandroid Back-up from my SD
4) Reflashed CM 10.1
The last thing I am going to try is wiping/reformatting my SD card. If that fails then im suspecting something else is happening at OS/kernel level. I have read in other forums where people have tried a full wipe and restore apps slowly but still get the same unmount. One user has tried another SD card (smaller 4GB one) which seemed to solve their issue?? Weird.
Anyway, I will report back if I have any joy.
In your kernel settings you have the option to mount/unmount system and more or you could write/download a script that mounts the sd card automatically.
Maybe this could help: http://forum.xda-developers.com/showthread.php?t=1971689
I give up.
cixty said:
In your kernel settings you have the option to mount/unmount system and more or you could write/download a script that mounts the sd card automatically.
Maybe this could help: http://forum.xda-developers.com/showthread.php?t=1971689
Click to expand...
Click to collapse
I tried it and no good. It seems as though the Internal SD is mounted, but some error is causing it to operate/display as unmounted via OS.
I completed more testing (extreme):
Wiped Internal SD
Wiped External SD
Try other kernel
Try other CM based ROM
The issue still occurred.
I then reinstalled Stock (XXJVT) via ODIN (Pit 512) and Semaphore kernel to see if its a hardware thing.
Nope.
This combo works amazingly. Infact its faster, smoother and easier to use (along with additional tweaks in Semaphore) than CM10 so I wont be going back to Jelly Bean on this phone. Ever.
Gingerbread for the win!
Hi,
I am using PAC-ROM v22.2 (Jelly Bean) and have the same problem: 80% boot don't mount the internal sdcard (I have no problem with the external sdcard). I can't even mount it manually as xalo2k does, cause I have no "Mount SD Card" menu under Settings/storage.
I spent many hours trying to search for a fix on google, xda, and others with no success. I found a lot of "litterature" on how to mount the sdcard on the PC, or how to swap internal and external cards. However, I don't care about mouting my sdcard on the PC, and I don't want to make believe Android that my external sdcard is the internal one, as I would not like to loose the internal 8GB that the phone is supposed to provide.
In Terminal Emulator, I can do:
> su
> mount -r -w -t vfat /dev/block/mmcblk0p1 /storage/sdcard0
> cd /sdcard
> ls -l
There I can see my files. However, if I exit root, the files don't appear anymore. Hence this looks like a permission problem.
Unfortunately ESExplorer still tells me sdcard0 is not mounted, and my apps (i.e. the camera) aren't able to access it. Additionnaly, the apps I had moved to the sdcard are'nt accessible...
So I tried to fix the permissions. Going under /storage as root, I can see:
drwx------ root root 1970-01-01 01:00 sdcard0
d---rwxr-x system sdcard_rw 1970-01-01 01:00 sdcard1
Si I try:
> busybox chown -R system:sdcard_rw sdcard0
But I get "Operation not permitted" for each dir/file in sdcard0
How comes that an operation is not permitted to the root user ???
Did anyone fix this problem ?
Edit: "You can't chown or chmod a vfat partition let alone a directory within it. You can only change ownership and permissions in fstab and it will apply to all directories and files. So to change ownership of the entire mount point you would change your fstab entry" (see http://ubuntuforums.org/showthread.php?t=1646849)
Thanks and regards
OK guys, I finally found a solution.
Thanks to http://ubuntuforums.org/showthread.php?t=1646849 I mentionned just above, I decided to write an fstab file (the name is important) and placed it under /etc:
/dev/block/mmcblk0p1 /storage/sdcard0 auto rw,uid=1000,gid=1015,fmask=0702,dmask=0702 0 0
/dev/block/vold/179:1 /storage/sdcard0 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
tmpfs /storage/sdcard0/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
Basically, this script is the result of the terminal command (you need to be root):
mount | grep sdcard0 > /etc/fstab
... which I ran after I could get the sdcard mounted (after a mount on PC and eject). But it first failed with errors on options, so I removed a few of them until I kept the lines above.
Then I wrote a little script which I place on my external sdcard which does not have a mount problem at boot:
busybox mount -a
and placed a shortcut to this script on my desktop with SManager.
I just have to click on this shortcut after boot and the internal sdcard gets mounted.
I tried to place this script under /etc/init.d with the hope it would be launched automatically at boot, but this did not mount the sdcard. If anyone knows why ???
Hope this helps !
Well... still having troubles with my sdcard... With the above fstab script I can mount it, access the files, etc...
However, the camera still asks me to insert a sdcard... Is this a permission issue ? Which permissions (owner, group, etc...) does the camera need ? My DCIM dir has the following permissions:
d---rwxr-x system sdcard8RW 2013-06-04 10:36 DCIM
Thanks and regards
- Regis
[MOD] Swap Internal & External SD [CM9, CM10, rooted stock XXLQ1 and probably more]
Hi folks!
Like many of you I'm sure, I had the problem of running out of space on the internal SD and all the existing tricks seemed to be too much work. So I took mattiadj's script and just made a few changes for the 7.7 on CM9, then CM10, then rooted stock XXLQ1. Thanks mattiadj for this one!
I've tested this on the 7.7 but I suspect it will work on all other devices and other ROMs too.
WARNING: I'm just tinkering, I don't have any solid experience with ROMs, and I certainly take no responsibility for any damage or injuries caused by the following instructions! I'm just passing on helpful hints
What does it do?
From what I understand the script remaps the SD directories, swapping the internal with the external.
init.d approach
Androguide.fr has been kind enough to convert the scripts into init.d scripts, check out the scripts here to test them out and let us know how you go!
What do you need?
- The script, either use one that is attached (extsd2internalsd_7.7cm9.txt or extsd2internalsd_7.7cm10.txt or extsd2internalsd_7.7RootedStockXXLQ1_v2.txt), or create your own.
- SManager to run the script.
- A file manager with root access to check the vold folder, the mounting points for the SD cards and to copy the script over.
Any Issues?
Only issue I have seen is sometimes the script is run (via SManager) after apps like swiftkey and so I temporarily get an error notification (language pack not found), but if you wait just a little while, SManager eventually runs the script and everything is back to normal.
[size=+2]What you need to do:[/size]
1) Confirm that the storage locations are:
/mnt/sdcard (internel) & /mnt/emmc (external) for CM9,
/storage/sdcard0 (internal) & /storage/sdcard1 (external) for CM10/JB,
/mnt/sdcard/ (internal) & /mnt/sdcard/extStorages/SdCard (external) for XXLQ1.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2) Confirm that the two files in /dev/block/vold are:
179:24 & 179:25 in CM9,
179:8 & 179:9 in in CM10,
179:8 & 179:9 in XXLQ1.
NOTE: If steps 1 or 2 show a different setup, follow the steps described in What I did listed below
3) Download or create appropriate script and copy to /data
4) Open the script using SManager, ENABLE Su, click save then run the script.
NOTE: if there is no output when you run the script then it probably means it was successful.
4b) ADDITIONAL STEP FOR ROOTED STOCK XXLQ1
After running the script once, you would have received one error message, the external SD is unlinked from /mnt/sdcard/extStorages/SdCard, and so the SdCard directory no longer exists.
Create a directory titled SdCard in /mnt/sdcard/extStorages and run the script again.
5) Check in Settings>Storage to see if the internal and external SDs have been swapped
NOTE: If the result is different for you, follow the steps described in What I did listed below
6) Go back to SManager and enable Su & Boot, then click Save
7) Reboot and check Settings>Storage again!
8) Feel smug about the fact you can install as many games as you want!!!
[size=+2]How it all works:[/size]
I picked up mattiadj's script for the S3 from his discussion thread [MOD] ExtSd2InternalSd v3|Increase your data storage|CMW zip|CM10|100% Working| and logically deduced the following format for the script:
mount -t vfat -o umask=0000 [EXTERNAL SD SOURCE LOCATION] [INTERNAL SD DESTINATION LOCATION]
mount -o bind [INTERNAL SD SOURCE LOCATION] [EXTERNAL SD DESTINATION LOCATION]
where:
[EXTERNAL SD SOURCE LOCATION] is the location where external sd can be referenced from. There are typically two files in /dev/block/vold/, one of those files is the external sd source location. For CM9 I set this to /dev/block/vold/179:25. For CM10 I set this to /dev/block/vold/179:9
[INTERNAL SD SOURCE LOCATION] is the location where internal sd can be referenced from. From what I understand, it is always /data/media.
[INTERNAL SD DESTINATION LOCATION] is the location where android will look for the internal sd. In CM9 I set this to /mnt/sdcard. In CM10 I set this to /storage/sdcard0.
[EXTERNAL SD DESTINATION LOCATION] is the location where android will look for the external sd. In CM9 I set this to /mnt/emmc. In CM10 I set this to /storage/sdcard1.
What I did:
1) I checked the storage locations to find that CM9 uses /mnt/sdcard (internel) & /mnt/emmc (external) for sd storage, and CM10/JB uses /storage/sdcard0 (internal) & /storage/sdcard1 (external).
2) Secondly I checked the /dev/block/vold to find two files, in CM9: 179:24 and 179:25, in CM10: 179:8 and 179:9.
3) To work out which vold file is correct I:
a) created a script using the information I found above
b) installed SManager
c) rebooted to ensure previous attempts didn't muck up the results
d) ran the script using SManager
e) checked Settings>Storage to confirm that script did in fact swap internal and external SDs.
After getting the correct vold file I:
4) Copied the script to /data/
5) Open the script in SManager and enabled Su and Boot (execute script on boot with SU permissions)
6) Rebooted and checked Settings>Storage once again.
Final scripts
FYI: The scripts attached contain the following:
===== 7.7 ExtSd2InternalSd for CM9 =======
mount -t vfat -o umask=0000 /dev/block/vold/179:25 /mnt/sdcard
mount -o bind /data/media /mnt/emmc
===== 7.7 ExtSd2InternalSd for CM10 =======
mount -t vfat -o umask=0000 /dev/block/vold/179:9 /storage/sdcard0
mount -o bind /data/media /storage/sdcard1
===== 7.7 ExtSd2InternalSd for rooted stock XXLQ1 version 2 =======
mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
mount -o bind /data/media /mnt/sdcard/extStorages/SdCard
Like I said, I'm just a tinkerer, I'll be happy to help but keep in mind my expertise is limited. Let me know how you go!
Enjoy! And don't forget to swap the contents of the internal and external SD directories
Again all credits go to mattiadj and his thread [MOD] ExtSd2InternalSd v3|Increase your data storage|CMW zip|CM10|100% Working|
POST HISTORY
[UPDATE: I've made some changes to this post to make it a bit easier to read]
[UPDATE 2: I've added some instructions on how to make this work for rooted stock XXLQ1, an additional step has been added in What you need to do section]
[UPDATE 3: I missed an important step before running the script. You MUST enable Su (and save) in SManager before you run the script!]
[UPDATE 4: Moved instructions to top for better readability]
[UPDATE 5: Testing out init.d method]
This is awesome.. Thnx for sharing dude
This might be usefull for a dev. to enable in a Rom installer.
Regards
Axelman
Sent from my GT-P6800 using xda app-developers app
Gonna try this for sure....thank you!
this would be the PERFECT thing to fix superbricked tabs... is there any way to run a script like this from adb? surely you've read about the superbrick hardware bug. well, from what i can tell, my internal memory is FRIED.... so being able to swap out the memory would be AWESOME, but i need it to be a switch on a much deeper level than whether or not swiftkey will start before or after this script. like is there a way to change this thing permanently?
aletheus said:
this would be the PERFECT thing to fix superbricked tabs... is there any way to run a script like this from adb? surely you've read about the superbrick hardware bug. well, from what i can tell, my internal memory is FRIED.... so being able to swap out the memory would be AWESOME, but i need it to be a switch on a much deeper level than whether or not swiftkey will start before or after this script. like is there a way to change this thing permanently?
Click to expand...
Click to collapse
dunno how to write the script correctly but would love to have one made for stock ics, non cm9/10 users
aletheus said:
this would be the PERFECT thing to fix superbricked tabs... is there any way to run a script like this from adb? surely you've read about the superbrick hardware bug. well, from what i can tell, my internal memory is FRIED.... so being able to swap out the memory would be AWESOME, but i need it to be a switch on a much deeper level than whether or not swiftkey will start before or after this script. like is there a way to change this thing permanently?
Click to expand...
Click to collapse
I wouldn't know where to start, but mattiadjn has created a kernel mod for the s3 which works great, but doesn't work for cm10 (hence the script). http://forum.xda-developers.com/showthread.php?t=1772234
well it says my internal and external storage are swapped but not sure apps are being copied to the microsd actually, my external storage space is shrinking with all my installs (actually internal storage)... nice effort though.
johnnobts said:
well it says my internal and external storage are swapped but not sure apps are being copied to the microsd actually, my external storage space is shrinking with all my installs (actually internal storage)... nice effort though.
Click to expand...
Click to collapse
Never mind, I think it is working running CM10. Would still love to get this working using stock ROM.
johnnobts said:
Never mind, I think it is working running CM10. Would still love to get this working using stock ROM.
Click to expand...
Click to collapse
Which ROM? give me an example and I'll give it a go.
darz said:
Which ROM? give me an example and I'll give it a go.
Click to expand...
Click to collapse
the quicksilver pre 1.0 is one of my favorite custom ics roms. but also the P6800XXLQ2_P6800OXALQ2_ATO stock rom maybe?
johnnobts said:
the quicksilver pre 1.0 is one of my favorite custom ics roms. but also the P6800XXLQ2_P6800OXALQ2_ATO stock rom maybe?
Click to expand...
Click to collapse
I'll try that one a bit later, but I did try running it on a rooted stock XXLQ1 with partial success.
The /dev/block/vold folder contains files 179:8 and 179:9. 179:9 is the correct reference to the external SD.
The SD locations are /mnt/sdcard and /mnt/sdcard/extStorages/SdCard, but I couldn't get the mount to bind /mnt/sdcard/extStorages/SdCard, so I tried /mnt/sdcard/extStorages instead with partially successful results.
So the final script (attached) is
===== 7.7 ExtSd2InternalSd for rooted stock XXLQ1 =======
mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
mount -o bind /data/media /mnt/sdcard/extStorages
The internal sd (now external SD card) works perfectly, shows up properly in Setttings>Storage.
The external sd (now internal SD) is accessible from /mnt/sdcard/extStorages, but it doesn't show up in Settings>Storage.
[FIX] I created the directory "SdCard" in /mnt/sdcard/extStorages and whalla, the internal storage is showing up as external SD in Settings>Storage.
Anyone care to add some insight why this is the case?
I suspect (with many assumptions) that I can't bind the mount to /mnt/sdcard/extStorages/SdCard because it doesn't initially exist, but I think Settings>Storage looks for that directory specifically.
darz said:
I'll try that one a bit later, but I did try running it on a rooted stock XXLQ1 with partial success.
The /dev/block/vold folder contains files 179:8 and 179:9. 179:9 is the correct reference to the external SD.
The SD locations are /mnt/sdcard and /mnt/sdcard/extStorages/SdCard, but I couldn't get the mount to bind /mnt/sdcard/extStorages/SdCard, so I tried /mnt/sdcard/extStorages instead with partially successful results.
So the final script (attached) is
===== 7.7 ExtSd2InternalSd for rooted stock XXLQ1 =======
mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
mount -o bind /data/media /mnt/sdcard/extStorages
The internal sd (now external SD card) works perfectly, shows up properly in Setttings>Storage.
The external sd (now internal SD) is accessible from /mnt/sdcard/extStorages, but it doesn't show up in Settings>Storage.
[FIX] I created the directory "SdCard" in /mnt/sdcard/extStorages and whalla, the internal storage is showing up as external SD in Settings>Storage.
Anyone care to add some insight why this is the case?
I suspect (with many assumptions) that I can't bind the mount to /mnt/sdcard/extStorages/SdCard because it doesn't initially exist, but I think Settings>Storage looks for that directory specifically.
Click to expand...
Click to collapse
OK, I tried something different!
1) I ran:
mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
to unlink the external sd from /mnt/sdcard/extStorages/SdCard
2) I created SdCard in /mnt/sdcard/extStorages/ (to have something to bind to)
3) Then I ran the following script:
===== 7.7 ExtSd2InternalSd for rooted stock XXLQ1 version 2 =======
mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
mount -o bind /data/media /mnt/sdcard/extStorages/SdCard
And everything looks good! Not sure which approach is better but this seems to match the original setup more accurately.
darz said:
OK, I tried something different!
1) I ran:
mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
to unlink the external sd from /mnt/sdcard/extStorages/SdCard
2) I created SdCard in /mnt/sdcard/extStorages/ (to have something to bind to)
3) Then I ran the following script:
===== 7.7 ExtSd2InternalSd for rooted stock XXLQ1 version 2 =======
mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
mount -o bind /data/media /mnt/sdcard/extStorages/SdCard
And everything looks good! Not sure which approach is better but this seems to match the original setup more accurately.
Click to expand...
Click to collapse
great, so all i have to do is creat an SdCard folder in extStorages/ right, then run the script? thanks! i bet it works with the q2 version, will give it a go
johnnobts said:
great, so all i have to do is creat an SdCard folder in extStorages/ right, then run the script? thanks! i bet it works with the q2 version, will give it a go
Click to expand...
Click to collapse
Correct, but remember to run the first line of the script (or the whole script, you will just get an error for the second line of the script) before you create the folder.
Also note, I had made a mistake with the instructions, before you run the script in SManager, you must enable Su first. If you don't then it will not run properly.
Thanks a lot for the awesome script darz :good:
I modified it a little bit to make it work simply by putting it in /system/etc/init.d so that it will run at each boot without the user having to do anything. See attachements. (Couldn't test atm, but it should be working).
If someone could try it and give some feedback, would be nice.
I included your script in my "Pimp My Rom" aroma script, with proper credits, hope you don't mind.
Androguide.fr said:
Thanks a lot for the awesome script darz :good:
I modified it a little bit to make it work simply by putting it in /system/etc/init.d so that it will run at each boot without the user having to do anything. See attachements. (Couldn't test atm, but it should be working).
If someone could try it and give some feedback, would be nice.
I included your script in my "Pimp My Rom" aroma script, with proper credits, hope you don't mind.
Click to expand...
Click to collapse
Excellent! Much appreciated
Do you mind if I add them to the first post after we have confirmed they work?
I'll test a couple of them later today.
Androguide.fr said:
Thanks a lot for the awesome script darz :good:
I modified it a little bit to make it work simply by putting it in /system/etc/init.d so that it will run at each boot without the user having to do anything. See attachements. (Couldn't test atm, but it should be working).
If someone could try it and give some feedback, would be nice.
I included your script in my "Pimp My Rom" aroma script, with proper credits, hope you don't mind.
Click to expand...
Click to collapse
I can't get it to work on CM10 no matter what I do, I believe mattiadj is having the same problem for the s3.
darz said:
I can't get it to work on CM10 no matter what I do, I believe mattiadj is having the same problem for the s3.
Click to expand...
Click to collapse
+1 that's true, didn't think of trying on my s3, and doesn't work either.
Maybe a permission problem, i'll try to set_perm to 777 through pimp-my-rom's updater-script and see if it works.
Anyway your work is of great help for people with a superbricked tab (like me), kudos :good:
Androguide.fr said:
+1 that's true, didn't think of trying on my s3, and doesn't work either.
Maybe a permission problem, i'll try to set_perm to 777 through pimp-my-rom's updater-script and see if it works.
Anyway your work is of great help for people with a superbricked tab (like me), kudos :good:
Click to expand...
Click to collapse
I'm glad it helps!!
OK, I mucked around with the CM9 script a bit on my s3 and I _think_ it started running when I removed the .txt extension.
But only the internal sd was being mapped, which leads me to believe there's something wrong with "mount -t vfat -o umask=0000 /dev/block/vold/179:25 /mnt/sdcard" line.
What should be done to get the same results in galaxy note? I'm missing some of the numbers in the list, can I get them somehow?
Thanks,
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