[MOD] External 2 Internal - Galaxy S II Android Development

This is a script that I found from the i9003 forum and modified a bit to suit i9100.
Personally I found that this script works better than the Root External 2 Internal SD because the remount happens while the phone is booting. Not after the phone has booted.
LIMITATION
Your storage will be reset if you mounted your phone as "Mass Storage"!
Do NOT mount your phone as Mass Storage if you use this script.
MTP and PTP mode works fine.
Best Practise
1. Partition your internal storage. I use 11Gb~12Gb Pit file.
2. Flash your custom ROM
3. Flash View attachment swapcm11.zip
Troubleshoot
If you need to trouble the script
1. install Root External 2 Internal SD
2. Find out the mounting point of your internal storage and SD card. They should look like
Code:
/dev/block/vold/179:9
/dev/block/vold/259:3
3. change the numbers in the script to match with your findings in 2.

Related

[Q] ClockworkMod Switch from internal to microsd

How can I switch from the internal ClockworkMod to the microsd version?
I already have the internal version installed, and I copied the update.zip and recovery folder to the root of my microsd card. Then I rebooted using the recovery install instructions, and nothing changed. Is there a config file that needs to be modified to point to the new location?
bjhanifin,
Either way you just install CWM to your tablet. Only reason for having multiple ways
to install it is for use when folks are having problems.
rev
I want to store my ROMs and backups on my microsd card. I'm uptight about my file organization like that. Besides I have a 16 gb microsd card, I would rather keep the internal memory as free as possible.
I should point out that the internal CWM does not -- as far as I can tell -- allow me to install ROMs or place backups on the microsd card. Which I why I want to make the switch. I was just going to muck about and tinker until I hopefully got it working, but I thought I should check in for some tips before I risk fouling things up.
Would placing a /recovery/command file, which points to sdcard2 do the trick? Or am I going to have to use nvflash to restore to stock?
I think you're a bit mixed up. Internal or MicroSD are just the install methods. After installation, they are the same.
To make sure we're on the same page:
The G-tab comes with an internal 16GB card. Most of us partition 2 GB of that for the system to use, leaving the other 14GB to be used as the eMMC card, which is seen by many things as the SDCard. Any external microSD card you install will be SDCard2 (or just SDCard for something that references the internal extra space as eMMC). This is what gets the most confusing - most things refer to that extra space on the internal card as the SDCard.
I should point out that the internal CWM does not -- as far as I can tell -- allow me to install ROMs or place backups on the microsd card.
Click to expand...
Click to collapse
Since the extra 14GB from the internal card shows up as the SDCard, this is where backups and media are normally stored. ROMs get installed to the 2GB partition. Though you might be referring to where you put the ROM files to be able to install them, this is not actually the installation location.
Now, if you want your external card to be used as the eMMC, so it will be the one you connect to over USB, your backups go to, etc., you have to change a system file. (Note - some ROMs already have this reversed) To do this, you'll need to use Root Explorer (this costs about $4, but it's the only thing that makes this easy), and edit the file /system/etc/vold.fstab. in there, you will see two lines that look like this:
Code:
dev_mount emmc /mnt/emmc auto /devices/platform/tegra-sdhci.2/mmc_host/mmc1
dev_mount sdcard /mnt/sdcard auto /devices/platform/tegra-sdhci.3/mmc_host/mmc2
Changing those will reverse which is used in what role:
Code:
dev_mount sdcard /mnt/sdcard auto /devices/platform/tegra-sdhci.2/mmc_host/mmc1
dev_mount emmc /mnt/emmc auto /devices/platform/tegra-sdhci.3/mmc_host/mmc2
This second one will allow your external card to be used as you want.
OK, I made the assumption that the difference between the two ClockworkMod installers was a different "sdcard" pointer. I thought one build would point to the external card, instead of the internal card. When in fact the build is identical, only the location of the initial cwm update.zip changes.
Thank you for setting me straight. I guess I was trying to recreate the cwm environment I have been used to on my droid phone. Perhaps I will setup a (Tasker?) routine to monitor the download folder for .zip files which I can then automatically copy over to my ROM folder on the internal memory to streamline my ROM update process.
I know what you mean, I expected it to be like my Droid, too.
When I update ROMs, I start by doing a USB mount in Clockword mod, then copy the ROM over, then do the update.

extSdCard (suddenly) read only?

Hello everybody,
I experience the following problem for a couple of days: my GT-I9300 (stock ICS, updated by Samsung some week ago) has a SD card (16GB) in it, which I could read from AND write to from my Win7-Desktop until some days ago. No, for some days, I cannot write anymore to the extSdCard as well as to the sdcard (phone's memory, 32GB). I cand read all right, but no writing. Any file I open, opens "read-only", and also no copying to the card is allowed, either. Even updating Kies and all its driver's didn't bring any improvement (actually, updating MTP driver caused some problems). Does anybody have any idea what to do?
thanks for your help
I have exactly the same issue as you, at the very beginning, i notice this problem when i was taking photo and said my sdcard is not accessible, it then changes to use internal storage.
Let me list out my symptom and solution:
Symptom:
1. The sdcard looks fine, no special error thrown during android startup.
2. Just after startup, i am able to write file /copy file to the external sdcard
3. After a while, the external sdcard becomes read only. I can view/copy files from sd card, but not write/copy file to the external sdcard.
4. No apps can modify the files in external sdcard
5. By using ADB shell, type mount, and you will notice the /extSdCard is mounted as "ro", which means read only.
Description:
If you have the above symptom, your external sdcard probably have some problems...
When I was checking the mount details on step 5, i noticed that the default options is onerrors=remount-ro , it looks like the external sdcared is remounted as read-only because it has problem on external sdcard....
Solution:
I put the external sdcard to a Windows PC, and run scan disk (right click the drive >"properties" > "tools" > Check Now).
It really find problem on the FAT of the external sd card!!! It fix automatically and my external sd card is working fine now.
In my case, it doesn't need to root or format the sdcard.
Good luck!

[Q] error mounting emmc and cannot detect external sd card

Good day,
I am using SGS2 i9100g.
I have flashed from CM10.0, JB4.1.2 to pacman 3.00, JB4.2.2
ISSUES:
1. error mounting emmc and cannot detect external sd card
2. When i want to use camera or gallery, there is an error saying "No external storage available"
Attempted solutions:
I have tried the following but it does not solve my problem
1. re-flash the custom rom and gapps. (full wipe with wipe cache and dalvik cache)
2. reformatted my sd card to fat32.
3. went to recovery to unmount and remount my external sd card
4. tried to mount emmc in recovery but returns an error "error mounting emmc"
5. off and on and also rebooted my smartphone
6. tried these codes shown at the bottom(to manual remount)
$ su <enter>
# mount -o remount rw /mnt/sdcard<enter>
Side notes:
- I am not sure whether is both related in terms of cannot mount emmc and not detecting my sd card.
- My sd card can be seen in storage with many free space(new sd card) can unmount and mount but the "Mount usb storage" is sealed, my internal storage also can be seen with a lot of free space.
- I am not sure about this but i have googled and saw that some people said that cyanogenMod has bugs regarding the folder of sd card and internal memory directory are swapped(or something like that)
- By using ES file explorer i can see mnt/extSdCard(which is my external sd card) with my files inside but in my mnt/sdcard(i am not sure if this is for internal memory) there is nothing but i cannot find emmc folder inside /mnt.
- I have a storage folder which has sdcard0 which contains nothing, sdcard1 which contains my file in my external sd card and a usbdisk0 contains nothing also.
- Now i am not sure which is the cause of the problem where i cannot use my camera phone and gallery
Please help and thanks in advance
Every help and suggestion is appreciated
SOLUTION!!!
SinsoljaX said:
Good day,
I am using SGS2 i9100g.
I have flashed from CM10.0, JB4.1.2 to pacman 3.00, JB4.2.2
ISSUES:
1. error mounting emmc and cannot detect external sd card
2. When i want to use camera or gallery, there is an error saying "No external storage available"
Attempted solutions:
I have tried the following but it does not solve my problem
1. re-flash the custom rom and gapps. (full wipe with wipe cache and dalvik cache)
2. reformatted my sd card to fat32.
3. went to recovery to unmount and remount my external sd card
4. tried to mount emmc in recovery but returns an error "error mounting emmc"
5. off and on and also rebooted my smartphone
6. tried these codes shown at the bottom(to manual remount)
$ su <enter>
# mount -o remount rw /mnt/sdcard<enter>
Side notes:
- I am not sure whether is both related in terms of cannot mount emmc and not detecting my sd card.
- My sd card can be seen in storage with many free space(new sd card) can unmount and mount but the "Mount usb storage" is sealed, my internal storage also can be seen with a lot of free space.
- I am not sure about this but i have googled and saw that some people said that cyanogenMod has bugs regarding the folder of sd card and internal memory directory are swapped(or something like that)
- By using ES file explorer i can see mnt/extSdCard(which is my external sd card) with my files inside but in my mnt/sdcard(i am not sure if this is for internal memory) there is nothing but i cannot find emmc folder inside /mnt.
- I have a storage folder which has sdcard0 which contains nothing, sdcard1 which contains my file in my external sd card and a usbdisk0 contains nothing also.
- Now i am not sure which is the cause of the problem where i cannot use my camera phone and gallery
Please help and thanks in advance
Every help and suggestion is appreciated
Click to expand...
Click to collapse
I have found a solution. Just reflash back to stock and then flash to custom rom.(repartition with an uncompatible .pit file can cause a traumatic event to a person i.e me )
ATTENTION!!!
DO NOT MESS WITH .PIT FILE!!! I've did a mistake earlier and i've paid the price of bricking my phone. Plus when you meddle with the wrong .pit file, it will corrupt the internal memory and as far as i have searched through the xda forum, nothing works and re-flashing back to stock rom can also cause problems.
Hope this information will inform all of you so that you will not make the same mistake as i have done.
Peace
SinsoljaX said:
I have found a solution. Just reflash back to stock and then flash to custom rom.(repartition with an uncompatible .pit file can cause a traumatic event to a person i.e me )
Click to expand...
Click to collapse
Do you think it would work if I just redo repartition with a known correct PIT file?
Or going back to Stock is a must?
Thanks!
iZ

How to swap internal memory and SD Card

I have a custom-made rooted MTK6575 based phone, and it has internal storage of just 127MB and an external SD Card of 8Gb.The Phone spec is 512MB
I want to swap these two and tried all the ways I found from the forum such as
a. Modifying the vold.fstab and vold.fstab.nand
b. Trying out External 2 Internal with Universal Init
Both did not work out.
Upon check the /mnt folder, I realised that there is only one sdcard folder. The internal memory of 127MB seems to be shared with the 512MB and there is no mounting script that I can find.
The only effect I have gotten is from modifying the vold.fstab.nand file. If I change the sdcard to sdcard2, my sdcard will not be seen under storage and only the 127Mb internal storage will be seen.
Anyone can help ? :crying:

[Q] Hypderdrive ROM on MI1 has "Renamed" SD Card

I've installed Hyperdrive via SafeStrap today. It seems that when you create that Rom Partition, the OS seems to have been configured so that "SD Card" is actually internal device storage and in order to actually get to the External SD Card I you have to go to Root -> Storage -> ExtSDCard directory.
Also, when I plug it in to the computer, all I can see is the External SD card and this new "fake" SD Card partition in the computer. I can't even get to the Root of the phone.
The problem is things like Pictures and some applications only allow you to choose "Device" or "SD Card" for storage and no matter what you choose it's going to the same place and this virtual SD Card Partition is almost out of space!
Help!
Any help?
jbright44 said:
I've installed Hyperdrive via SafeStrap today. It seems that when you create that Rom Partition, the OS seems to have been configured so that "SD Card" is actually internal device storage and in order to actually get to the External SD Card I you have to go to Root -> Storage -> ExtSDCard directory.
Also, when I plug it in to the computer, all I can see is the External SD card and this new "fake" SD Card partition in the computer. I can't even get to the Root of the phone.
The problem is things like Pictures and some applications only allow you to choose "Device" or "SD Card" for storage and no matter what you choose it's going to the same place and this virtual SD Card Partition is almost out of space!
Help!
Click to expand...
Click to collapse
That's the way the Stock ROM works - /mnt/sdcard is the internal storage, /mnt/extSdCard is the external storage.
You can't mount the root because it's a Linux EXT4 filesystem. Windows doesn't understand it. Again, that's normal behavior.
My pictures, music, Ti Backup files, etc. are stored on my external SD card, so it's quite possible to do that.
Fixes and Question
Wrong thread, could not delete. Sorry.

Categories

Resources