[Q] RAZRi disable virtual sd card - RAZR i Q&A, Help & Troubleshooting

Ok guys, so this is my problem.
As you all know the RAZRi has 8gb of built in storage, but as I am aware, there is a 5gb virtual sd card which you have access to, for installing apps etc. The rest is for os. Now when you insert an sd card it counts as a 2nd sd card.
So you get 5gb of data fofjr apps, but as i think the phone thinks its on an sd card already, you cant move apps to your external sd card.
So when you have a few large games like max payne, that 5gb disappears real quick.
I have tried manually moving data for apps to my sd card but it did not work and the apps would not load.
What are your suggestions?
On my old motorola defy you could just install apps to either the internal storage or the sd card, nice and simple.
Can you disable this feature or is there a way to install large apps to external media.
Thanks in advance!!!!

Yes I found it rather odd too. Also the SD mount point has got a very funny path. It is /mnt/external1
I am afraid that I must disappoint you here. According to person called "Badger1313" most of root exploits are through the App file transfer software. Due to the fact Motorola decided to secure this vulnerability by disabling 'Move to SD'.
Uncle Google came unhelpful this time giving me no answers to this question. The only valid way to make it possible is to have your phone rooted. Lets hope JB will bring some changes.

zmesler said:
Yes I found it rather odd too. Also the SD mount point has got a very funny path. It is /mnt/external1
I am afraid that I must disappoint you here. According to person called "Badger1313" most of root exploits are through the App file transfer software. Due to the fact Motorola decided to secure this vulnerability by disabling 'Move to SD'.
Uncle Google came unhelpful this time giving me no answers to this question. The only valid way to make it possible is to have your phone rooted. Lets hope JB will bring some changes.
Click to expand...
Click to collapse
Razr I is "rootable" so how to mount sdcard to /sdcard ?
Maybe some stuff to edit in init.d !?

Maybe something like this:
http://www.theandroidsoul.com/use-external-sd-card-as-internal-memory-on-droid-razr/

Le_Poilu said:
Maybe something like this:
http://www.theandroidsoul.com/use-external-sd-card-as-internal-memory-on-droid-razr/
Click to expand...
Click to collapse
For sure, but at the moment this is still not possible to flash anything from the recovery.
Would a manual editing of the vold.fstab file to set the following line work ?
Code:
dev_mount sdcard /mnt/sdcard auto /devices/platform/mmci-omap-hs.0/mmc_host/mmc0
(still did not buy this awesome phone)

Or maybe using Directory Bind, don't know but I use it to mount my SD Card on diferent points for my SGS2.

JackyJack said:
For sure, but at the moment this is still not possible to flash anything from the recovery.
Would a manual editing of the vold.fstab file to set the following line work ?
Code:
dev_mount sdcard /mnt/sdcard auto /devices/platform/mmci-omap-hs.0/mmc_host/mmc0
(still did not buy this awesome phone)
Click to expand...
Click to collapse
I did try a manual edit of vold.stab, unsuccessfull
Each time I still have the intern memory accessible and extern1 still here but empty.
Here is the vold.fstab file of the Razr i, if you have an idea what to change.
Code:
# Copyright (C) 2009 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
## Vold 2.0 fstab for the Morrestown Platform
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
# Mounts the first usable partition of the specified device
dev_mount sdcard-ext /mnt/external1 auto /devices/pci0000:00/0000:00:04.0/mmc_host/mmc1 /devices/pci0000:00/0000:00:02.3/gadget/lun0

Le_Poilu said:
I did try a manual edit of vold.stab, unsuccessfull
Each time I still have the intern memory accessible and extern1 still here but empty.
Here is the vold.fstab file of the Razr i, if you have an idea what to change.
Code:
# Copyright (C) 2009 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
## Vold 2.0 fstab for the Morrestown Platform
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
# Mounts the first usable partition of the specified device
dev_mount sdcard-ext /mnt/external1 auto /devices/pci0000:00/0000:00:04.0/mmc_host/mmc1 /devices/pci0000:00/0000:00:02.3/gadget/lun0
Click to expand...
Click to collapse
Well, actually the vold.fstab file on the Razr i only handle the scard-ext partition (wich I don't know what it's used for, but for sure this not /sdcard either /external1).
I guess there is some init script somewhere or config file regarding sdcard and external1 mappings.
BUT, as /sdcard is mounted from internal memory, if you replace it with your µSD, then you'll lost the space used by the /mnt/sdcard partition, unless you mount it elsewhere...
I may be wrong there...

BUT, as /sdcard is mounted from internal memory, if you replace it with your µSD, then you'll lost the space used by the /mnt/sdcard partition, unless you mount it elsewhere...
I may be wrong there...
Click to expand...
Click to collapse
I think you right about this.
This is what appends for Droid Razr user when they use this:
http://www.theandroidsoul.com/use-external-sd-card-as-internal-memory-on-droid-razr/
External SD take the place of internal SD.
For me it's a very little problem. I can lost 5GB if I win 32GB on the other side (or even more as the Razr i can handle 64GB SDXC card.)
But maybe can we have both. My first android phone was the first Samsung Galaxy i7500 which had 8BG of internal SD storage and a SDHC extension slot. Both internal and external was fully usable as SDCard
Maybe with a custom ROM in the futur.

Yeah, maybe we should focus first on tweaking the recovery so we can flash custom roms, this partition stuff looks like deep modding...
I am looking for some documentation about our partition tables, don't really know where to find what size are /boot, /system and all other partition that may exists...

Im using JB..and still it doesnt work

I use directory bind and it works great i have 20gb of game data

Related

[HACK] mount sdcard as ext4

These patches add ext4 support for your sdcard (in the Nexus S - the internal card.) There are a number of reasons you might want to do this - performance (ext4 is faster, plus mounting ext4 is basically instantaneous, which is very nice on reboots...no more checking sdcard), it's more efficient, you get a bunch of file system security features (if you care...)
You should not apply them if you don't really know what you are doing. The patches are resonably benign. Converting your sdcard partition to ext4 is NOT NOT NOT benign and you can really hose yourself doing it.
I'm not going into great depth with these instructions. If you don't understand them, play around with building cyanogen, installing it, etc until they are crystal clear.
To swap your sdcard to ext4:
* Apply the patches and rebuild cyanogen. Rebuild it. They will change your recovery image and vold.
* Install vold and flash (and/or boot) the recovery image.
* Boot into recovery, mount your sdcard and back it up to your computer (i.e., not nandroid, copy the files.) Nandroid would be a good idea too.
* Format your media partition to ext4 (the one that is vfat, by-name is media, mine is partition 3) mkfs.ext4 can be found by googling, or you can use make_ext4fs from /system/bin. I used mkfs.ext4.
* You should be able to manually mount that.
* Push your files back.
* sync and reboot.
Et Voila, you should have an ext4 sdcard partition.
THIS IS VERY DANGEROUS.
YOU CAN REALLY HOSE YOURSELF DOING IT.
Here are the patches:
http://review.cyanogenmod.com/#change,1705
This one adds ext4 support to vold, thus allowing gingerbread to mount ext4 partitions for the sdcard (which on the Nexus S, is the 'media' partition.)
and:
http://review.cyanogenmod.com/#change,1716
This is a change to recovery, making it seamlessly mount ext4 partitions for /sdcard.
Code:
# mount
/dev/block/platform/s3c-sdhci.0/by-name/system on /system type ext4 (ro,noatime,barrier=1,data=ordered,noauto_da_alloc)
/dev/block/platform/s3c-sdhci.0/by-name/userdata on /data type ext4 (rw,nosuid,nodev,noatime,barrier=0,data=ordered)
[b]/dev/block/vold/179:3 on /mnt/sdcard type ext4 (rw,nosuid,nodev,noexec,noatime,barrier=1,data=ordered,noauto_da_alloc)[/b]
/dev/block/vold/179:3 on /mnt/secure/asec type ext4 (rw,nosuid,nodev,noexec,noatime,barrier=1,data=ordered,noauto_da_alloc)
tmpfs on /mnt/sdcard/.android_secure type tmpfs (ro,relatime,size=0k,mode=000)
....and if you turn on USB Storage, the sdcard shows up as an ext4 disk...
As expected, but this is going to be one for the Linux geeks.
Wow, it is VERY nice to have that sdcard mount instantly on boot. VERY nice.
oh the read/write speeds
If anyone is interested in playing with this, I submitted the change to cyanogen:
http://review.cyanogenmod.com/#change,1705
The tricky bit is getting the filesystem created. You can use:
/system/bin/make_ext4fs.
That leaves me with a recovery which will not currently mount sdcard as ext4 unless I fiddle with fstab and mount it myself. On to look at that.
...and, here's a patch to the recovery which will let it mount /sdcard as either ext4 or vfat, making this change reasonably seamless.
http://review.cyanogenmod.com/#change,1716
i would love to see a Quadrant or a benchmark after this
this is and awesome hack to use with App 2 SD
it'll be lag less
the only annoyance, is that if you want to MOUNT USB on a Windows PC, then you'll need a software to read EXT4
for anyone interested this will be handy
http://www.ext2fsd.com/?page_id=16
i'll definitely be doing this MOD, as i'll be running anything i can from the Internal SD
So this will only work on CM7?
Please some of the genius here may post a step-by-step tutorial or howto for this one? It will be very apreciated.
No, it will work with any build, but you need to rebuild vold in order to get it to mount. The easiest way to get them outside of the CM tree would be to build cm and then copy the vold out and use that. It should work with any ROM.
The latest versions - which are in CM's gerrit - include modifications to the sdcard utility to use fuse to mount the filesystem using FAT semantics (i.e. - bypass security). Frankly, this is a waste. It slows everything down, noticeably, and app problems are few and easily fixed if you know how to fire off a chmod.
I haven't provided step by step instructions since it can seriously hose your phone if you don't know what you are doing.
DebauchedSloth said:
No, it will work with any build, but you need to rebuild vold in order to get it to mount. The easiest way to get them outside of the CM tree would be to build cm and then copy the vold out and use that. It should work with any ROM.
The latest versions - which are in CM's gerrit - include modifications to the sdcard utility to use fuse to mount the filesystem using FAT semantics (i.e. - bypass security). Frankly, this is a waste. It slows everything down, noticeably, and app problems are few and easily fixed if you know how to fire off a chmod.
I haven't provided step by step instructions since it can seriously hose your phone if you don't know what you are doing.
Click to expand...
Click to collapse
Wait so it's a waste? It isn't worth using ?
Anderdroid said:
Wait so it's a waste? It isn't worth using ?
Click to expand...
Click to collapse
If done right this would increase the read/write speeds. For example, your boot up time would be much faster and ext4 is more effecient. So it's not a waste but it has to be done correctly otherwise is could do more damage than good
Using the version I posted to CM gerrit, which bounces the file system through fuse and mimics FAT security, is still better than FAT (IMO), but it's not nearly as fast as just mounting the filesystem as Ext4 - though it is more compatible.
I've been running mine mounted as straight ext4 for a couple of weeks. Probably the single best mod I've made to any of my phones. There are occasional app bits that I need to fix manually (such Dropbox resetting file ownership), but it's worth it for the quicker boot up and faster overall operation.
Here you find the ROM CyanogenMod 7 compiled for Nexus One with ext4 sdcard mount support:
- https://github.com/diegostamigni/nexus/tree/master/one
Is the only reason to pipe it through fuse to get it to mount on m$? If so I'm not going to bother - I only use linux almost exclusively these days
diego.stamigni said:
Here you find the ROM CyanogenMod 7 compiled for Nexus One with ext4 sdcard mount support:
- https://github.com/diegostamigni/nexus/tree/master/one
Click to expand...
Click to collapse
No version for Nexus S?
Looking forward to this develpoing, as the ext4 conversion (done via modaco rom beta2 in recoverymode) made a HUGE difference to the galaxy tab i have (halved the loading times of everything). ^^
Unfortunately im far to noob to help out though ...will be keeping a keen eye on it all and learning
Forgive my ignorance, but why don't phones come like this?
NicholasQ said:
Forgive my ignorance, but why don't phones come like this?
Click to expand...
Click to collapse
window$ more then likely.
window$ can't even see Linux file systems without special drivers installed.
if i mess this up would it brick my phone? i'm really wanting to try this but i don't want to turn my Nexus S into a paperweight
so if we did this, would the windows computer be able to read the mounted sd card? is there any other things that would be needed after this mod? or just format to ext4 and be done with it?

Possible to put stock image on sd card

I am on rooted 1.1 v2 and everything works great. The only thing missing is the in store reading free books for an hour a day. I was wondering if I could boot stock BN image on sd card when I am in the BN store, so I could get the in store feature?
I have been reading a lot and many people with 1.1 v2 cannot get access to the free one hour reading. I am a newbie, so alot of android dev forum is a little over my head.
If anyone knows of another way to get in store reading, I would appreciate the help.
Not a bad question. In theory i bet its possible. Id love to have an sd for stock use....
Sent from my Nook Color (zoom2) using Tapatalk
I just want it for in store reading.
Why no one has thought of this before I have no idea, but its a Great Idea, Count me in if they can come up with this, maybe some high and mighty dev will come by and hear our pleas.
It would be great to have the Free Reading and to get books on free book Friday, Also i think they have in-store coupons.
therealguppy said:
Why no one has thought of this before I have no idea, but its a Great Idea, Count me in if they can come up with this, maybe some high and mighty dev will come by and hear our pleas.
It would be great to have the Free Reading and to get books on free book Friday, Also i think they have in-store coupons.
Click to expand...
Click to collapse
I believe it was tried previously, but there's things in the stock ROM that have hard coded reference points to parts of the system (if memory serves). The person trying to do this early on gave up for that reason. I could be wrong, but I think this was in mid December.
I was getting ready to ask this question when I found your thread. I really hope something like this does pop up in the Dev section - I'll use my nook daily with a custom froyo rom, but it would be nice to be able to use the stock image off a SD when I stop into a B&N.
Well, in theory it's quite easy to do. Read the entire post before attempting the trick.
As usual, I'm not responsible if your NC starts speaking Flemish. Be careful with your Internal partitions!
Requirements: stock on internal, gparted, maybe my UMS utility (DEV), an SDCard (8GB at least, to be safe), a few minutes.
Partition an SDcard following stock layout.
You can partition the SD by using gparted. Create a new partition table, then create the partitions. Then apply. Don't forget to use "round to cylinder" and always leave a 1mb space at the beginning of each partition (except boot). Or else, you'll end up with corrupt partitions, writing over one another. Partition size can be changed, just make sure they're big enough..
Make sure the first partition has the bootable/boot flag.
To print the layout, use ADB command "fdisk /dev/block/mmcblk0 -l".
Or search for the layout in dev forum.
Layout looks like this (by heart, so check):
(Primary: )
p1: boot = FAT32 ~70 MB
p2: rom = FAT32 ~70 MB
p3: factory = ext2 ~??MB (this can left at 1mb, its a recovery partition, no use here)
p4: extended (not a partition strictly speaking, it's an extension)
(Logical: )
p5: system = ext2 ~470MB
p6: data = ext3 ~900MB (this can be bigger, app data storage)
p7: cache = ext3 ~350MB
p8: media = media FAT32 ~5GB (this can use all the remaining space, as big as you can/wish: media storage, books, films)
Then, you'll need to copy partition contents onto the SDCard's newly created partitions.
The easyiest way of doing it is by making .tar files of internal partition contents and extracting the files onto the SD partitions.
To create the tar files:
- either use <tar XXX.tar *> adb command on each partition, make sure you compress the actual content, not the container folder (i.e tar system content and not system, the * in the command stands for all content). Then pull the tar file. Delete it afterwards from internal!
- OR, probably more user friendly, use my USB mass storage utility found in DEV, mount each partition and create tar files with your usual UI (Ubuntu, Windows, OSX).
Copy every tar file onto your PC.
Tar files of internal partitions aren't all mandatory, all depends on if you want to make a complete backup of running stock rom, or if you just want the general stock rom on an SD. For instance, cache and media can be ignored, if you just want a general version. If you want to backup your media, tar media as well.
Then, extract each file onto the corresponding partition of you partitioned SD. Delete .tars afterwards from SD partitions.
THEN: download attached file, erase uRamdisk from you SD's boot partition and replace it with the one in the attached zip file (rename SD-STOCK-uRamdisk to uRamdisk). Without this step, your SD will boot from system and data internal partitions.
This uRamdisk has adb activated, so you should be able to push files to the SD once booted. Some internal commands won't work though (i.e, mount). You'll have to install busybox and root (su) the system, well if that's your goal that is.
Then insert the SD and boot.
In theory, this should boot up to stock from SD.
I could be missing something, it's late here, and I haven't tried any of this.
Beware: recovery, even from SD, will affect the internal partitions! Maybe it's best you delete uRecRam and uRecImg from your SD's boot (NOT INTERNAL!).
NB: you need to edit vold.conf. See second page of this thread.
Note: you could also use 'dd' command instead of making tars, but you'd end up with huge .img files.
PS: If you have no way of accessing your SD partitions once they're created, use the following command from ADB while booted from working internal system, with SD inserted in NC:
echo /dev/block/mmcblk1 > /sys/devices/platform/usb_mass_storage/lun0/file
Click to expand...
Click to collapse
This last command should open every SD partition in you PC's explorer.
Sam
I don't see the point in asking a question if you're not interested in the answer...
Sent from my HTC Desire using XDA App
samuelhalff said:
I don't see the point in asking a question if you're not interested in the answer...
Sent from my HTC Desire using XDA App
Click to expand...
Click to collapse
I for one appreciate it, but missed that reply. I'm going to need to stockpile some microSD cards for all these various things to try .
I tried these instructions and it boots to the initial setup screen. I can see broadcasting AP's, but unfortunately I can't get it to connect any WiFi hotspot.
It appears to associate, sits at obtaining IP, but eventually gives up.
ADB connects and I was able to look at dmesg, but nothing stands out.
I went back to the eMMC and registered, exported /data, imported it to the SD card, and was able to bypass registration. However, it still doesn't connect to WiFi.
Only point that is probably worth noting is that I used a 2GB SDCard and here's what my mount output looks like:
mount
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
/dev/block/mmcblk1p2 /rom vfat rw,sync,noatime,nodiratime,uid=1000,gid=1000,fmask=0117,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,errors=remount-ro 0 0
/dev/block/mmcblk1p5 /system ext2 ro,errors=continue 0 0
/dev/block/mmcblk1p6 /data ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,data=ordered 0 0
/dev/block//vold/179:17 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,
shortname=mixed,utf8,errors=remount-ro 0 0
Click to expand...
Click to collapse
Any ideas?
Success
I could follow the instruction and made a 8gb stock bootable micro sd card. Only problem I can see is it mounts the boot partition of sd card as "/sdcard" and creates few folders like "B&N Downloads", "My Files". Is there any way to disable the sd card mount.
If anyone is interested in getting a copy of the sd card I can upload.
pbcal said:
I could follow the instruction and made a 8gb stock bootable micro sd card. Only problem I can see is it mounts the boot partition of sd card as "/sdcard" and creates few folders like "B&N Downloads", "My Files". Is there any way to disable the sd card mount.
If anyone is interested in getting a copy of the sd card I can upload.
Click to expand...
Click to collapse
I'm interested in it, or at least a "dummies guide" to doing this via a Windows PC..
I mean, as I read samuelhalff's post, it looks like it should be relatively easy to follow, but I have a few questions...
I see things like creating the partitions on the SD using gparted (which appears to be a linux command) so I don't know if I can maybe use EASEUS in Windows do do it? And am I reading it correctly, that TAR is a command I can run from inside an ADB SHELL? (i.e. type ADB Shell, then TAR)
I'll upload it tonight and post the link.
pbcal said:
I'll upload it tonight and post the link.
Click to expand...
Click to collapse
only reason that might not be a good idea is copyrights... not sure what if any might make it against the rules here, or something B&N would frown upon... then again, I guess its no worse than the .ZIP image in the recovery threads?
In any case, Thank you!!! I do appreciate it!
pbcal said:
I could follow the instruction and made a 8gb stock bootable micro sd card. Only problem I can see is it mounts the boot partition of sd card as "/sdcard" and creates few folders like "B&N Downloads", "My Files". Is there any way to disable the sd card mount.
If anyone is interested in getting a copy of the sd card I can upload.
Click to expand...
Click to collapse
I eagerly await this...and thank you for the work. I would use this as a dual-boot SD card with my daily-use ROM installed to internal memory. There are fairly easy-to-follow directions here on xda that will allow us to dual boot your SD card and internal memory. If you choose to boot from internal memory, then the SD card just becomes your external storage. No SD card swapping needed to go between your daily OS and the B&N stock. Very cool.
Thanks again.
You're welcome..
Sent from my Desire HD using XDA App
I'd love to get this as well. I had a 1.1 rooted stock which didn't give me the free hour in the store laast weekend. Sort of bummed as I heard it worked for some people.
Dan
Sent from my NookColor using Tapatalk
As I mentioned above, this would be great for dual-booting from eemc and sd card. I messed around with this a bit this evening and got it working nicely with one of the old Honeycomb images. The instructions for setting up dual boot are here:
http://forum.xda-developers.com/showthread.php?t=947698&highlight=dual+boot
I did have to mess around with the SD card a bit as once you boot from the internal memory, it is the first partition of the SD card that is used as your SD storage. Most SD card images have this as a very small boot partition with the fourth partition the larger SD card partition. I used a free program called Parted Magic to move the second, third, and fourth partitions over and expand the first partition into the unused space, creating a 5GB boot partition. I then put the multi-boot files from the thread above into the large boot partition. Worked like a charm - when booting from the SD card, Honeycomb used the fourth partition as the SD card storage space. When booting from internal memory, CM7 (the ROM I have installed to internal memory) used the 5GB boot partition as the SD card storage space.
Eageraly awaiting someone to build this and post an image file. I will admit that I am not smart enough to carry out the lengthly and excellence directions posted by samuelhalff.
Here is the link for the image. You will need a 8 GB or higher SD card.
Sorry for the large file. It has all partitions with stock data except data, cache and media.
Post your results / issues.
[COLOR="Red"][B]Removed[/B][/COLOR]
Click to expand...
Click to collapse
To avoid having /sdcard mounted on boot, you need to edit /system/vold.conf :
Code:
volume_sdcard {
## This is the direct uevent device path to the SD slot on the device
media_path /devices/platform/mmci-omap-hs.1/mmc_host/mmc0
partition 8
media_type mmc
##mount_point /sdcard
mount_point /media
ums_path /devices/platform/usb_mass_storage/lun0
}
volume_sdcard2 {
## Currently points to internal eMMC, assumes eMMC is formatted as FAT32
media_path /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
media_type mmc
##mount_point /media
mount_point /sdcard
ums_path /devices/platform/usb_mass_storage/lun1
}
Add "partition 8" in the sdcard section.
Explanation: see, media is set to partition 8 of internal. That's right. But here, sdcard will mount automatically the first sdcard partition (boot), as partition isn't set. You need to manually set it mount partition 8 (sdcard)..
Sam

Alternate Webtop partition

I was hoping to be able to figure all of this out on my own (so that I could impress everybody with my brilliance, of course! ), but I've hit a brick wall, so I figured I would see whether anybody had any suggestions.
The short version: I'd like to be able to create an alternate and larger /osh partition that we can run Ubuntu off of so that we can install software more freely as well as not worry about any future software updates that might conflict with the partition contents.
My thought was that it should be possible to have an alternate partition to /osh that's used to run from (whether it's mounted on /osh or not is largely irrelevant).
However, the problem I'm hitting up against is a matter of timing. The best entry point I've found to modify behaviour is /system/bin/mountosh when it's called by /init.rc, especially since it's responsible for most of the webtop setup. The catch is that by the time mountosh is called, the only partitions mounted are through p16, meaning that internal storage (p18) isn't available and the SD card (mmcblk1) isn't available either, meaning that there's no way to use either (a loopback file on the former, a partitioned SD card for the latter). I suppose it would theoretically be possible to create a loopback file on p16 (data), but that's only 2 GB and would conflict with other uses.
Does anybody know how to force internal storage and/or the SD card to be mounted earlier? Or is this going to require hacking a kernel (and bootloader and...) that we don't have the source code to yet? If I can get past this piece, then I'll be able to help other users get a webtop that would be in much better shape (especially since this would let us start using apt without having to worry so much about space issues). Thanks!
I am not sure off hand at the moment, but you might have a look at /etc/fstab and see if you can have the sdcard mounted earlier there. While having it mounted earlier may have some unexpected side effects; I presume the driver for the sd card reader is compiled into the kernel, so I don't see a reason it can't be mounted earlier.
But, not having an atrix anymore I can't test this outright.
Fenny said:
I am not sure off hand at the moment, but you might have a look at /etc/fstab and see if you can have the sdcard mounted earlier there. While having it mounted earlier may have some unexpected side effects; I presume the driver for the sd card reader is compiled into the kernel, so I don't see a reason it can't be mounted earlier.
But, not having an atrix anymore I can't test this outright.
Click to expand...
Click to collapse
/etc/fstab is pretty meaningless, unfortunately. Most of the mounting is performed within /init.rc, and I see no entries for the external storage there. As it stands, the entry for the internal storage is more in the format of "on X, do Y" rather than the more traditional procedural format, so I'm not sure how much control I can have over that.
Also, second thoughts tell me that putting a filesystem file in /mnt/sdcard would be stupid, because it would cause all kinds of issues when attempting to USB mount the partitions from a computer.
I think the best way to attack this would be to pivot to another filesystem structure on the external sdcard. I'll take a look at init.rc later today and see what can be done.
agentdr8 said:
I think the best way to attack this would be to pivot to another filesystem structure on the external sdcard. I'll take a look at init.rc later today and see what can be done.
Click to expand...
Click to collapse
So you'd think. And that's what I did. I have a nice 2 GB ext3 partition on my SD card with the contents from the /osh partition (p13) rsync'ed over. But, only the mmcblk0 partitions are available when mountosh runs (up through p16), with no mmcblk1 partitions. Naturally, /dev/block/vold is empty as well.
I might need to poke some contacts to see if it's possible to detect mmcblk1 earlier, but in the meantime, I might just create a filesystem file in /data (p16). Hell, /data is almost 2 GB large, and I'm only using a little over 500 MB in it, so there's plenty of free space there. Why did they make it so large? Do people really download that much crap to their phone?
Grr...
So, even creating a file in /data and mounting that via loopback doesn't work, even if it's mounted on top of the existing /osh partition. I'm guessing that they have some level of verification.... So yeah. Something else is missing here.
I had two sucessful ways of overcoming this. The first way was to move /usr onto /data, and to symlink it back. But, I wanted a way of not modifying /osh, so I ended up creating a init.d script to bind a copy of /osh over /osh. I don't have access to a dock or HDMI monitor at the moment, so I can't confirm if the webtop launches with either of these methods, but full functionality worked in the command line.
shawnbuck said:
I had two sucessful ways of overcoming this. The first way was to move /usr onto /data, and to symlink it back. But, I wanted a way of not modifying /osh, so I ended up creating a init.d script to bind a copy of /osh over /osh. I don't have access to a dock or HDMI monitor at the moment, so I can't confirm if the webtop launches with either of these methods, but full functionality worked in the command line.
Click to expand...
Click to collapse
Yeah, that's the thing. Everything worked on the command line, but X itself refused to start, even after I completely disabled TOMOYO (even when running /etc/init.d/startX.sh by hand).
I might decide to poke at it another time, but I'll at least wait for the SBF situation to sort itself out first.

swapping emmc with sdcard on cm10?

Hi, I'm wanting to swap my emmc and my sdcard mount points on cm10.
My current (vanilla) /etc/vold.fstab is:
Code:
## Vold 2.0 Acclaim
## emmc
dev_mount emmc /storage/sdcard0 10 /devices/platform/omap/omap_hsmmc.1/mmc_host/mmc0
## sdcard
dev_mount sdcard /storage/sdcard1 5 /devices/platform/omap/omap_hsmmc.0/mmc_host/mmc1
I am wanting to do this:
Code:
## Vold 2.0 Acclaim
## emmc
dev_mount sdcard /storage/sdcard0 10 /devices/platform/omap/omap_hsmmc.1/mmc_host/mmc0
## sdcard
dev_mount sdcard-ext /storage/sdcard1 5 /devices/platform/omap/omap_hsmmc.0/mmc_host/mmc1
Anyone else tried this?
kcuf it, I'm doing it!
WISH ME LUCKKKKKKKKKKK
and that didn't work? that's odd.
Even this suggests essentially the same thing?: http://forum.xda-developers.com/showthread.php?p=33253737
abense said:
and that didn't work? that's odd.
Even this suggests essentially the same thing?: http://forum.xda-developers.com/showthread.php?p=33253737
Click to expand...
Click to collapse
It didn't work because of the way verygreen mounted emmc in the initialization code. He did not use vold. I could probably make you a userinit.d script to do it but not sure how quickly I will get to it.
Why do you want to do this? Running from a small SD and you want apps to use emmc?
Sent from my HD+ running CM10 on SD with XDA Premium
leapinlar said:
Why do you want to do this? Running from a small SD and you want apps to use emmc?
Click to expand...
Click to collapse
I have quite an array of MicroSDs lol
Should you care to know, I developed an affinity for them during my days of PSP hacking, as can be seen here:
http://i7.photobucket.com/albums/y266/thebense/f20b_engine_pics/catashtrophe/psp1.jpg
http://i7.photobucket.com/albums/y266/thebense/f20b_engine_pics/catashtrophe/psp2.jpg
In fact, during this time period, the girl I was dating gave me THREE 8GB microsdhcs for Christmas one year. Thats all she gave me lol!
But anyways, yes. I have a lot of them. However, their "stop the world" characteristics (eloquently described here) seems to me to be a very drastic performance issue our application.
From what I've read, the fastest cards seem to be the smaller cards anyways. I was mostly asking about this for performance reasons.
abense said:
I have quite an array of MicroSDs lol
Should you care to know, I developed an affinity for them during my days of PSP hacking, as can be seen here:
In fact, during this time period, the girl I was dating gave me THREE 8GB microsdhcs for Christmas one year. Thats all she gave me lol!
But anyways, yes. I have a lot of them. However, their "stop the world" characteristics (eloquently described here) seems to me to be a very drastic performance issue our application.
From what I've read, the fastest cards seem to be the smaller cards anyways. I was mostly asking about this for performance reasons.
Click to expand...
Click to collapse
I'm still not sure why you want to do this, but it does not matter, I have your answer.
You need to go to Terminal Emulator and enable superuser mode by typing su enter. Then enter these two commands:
Code:
mount -o bind /int-data/media /storage/sdcard1
mount -t vfat -o umask=0000 /dev/block/vold/179:29 /storage/sdcard0
That will swap emmc and sdcard until the next reboot.
If you want to make it permanent, edit /system/bin/clear_bootcnt.sh to append these three lines:
Code:
sleep 15
mount -o bind /int-data/media /storage/sdcard1;
mount -t vfat -o umask=0000 /dev/block/vold/179:29 /storage/sdcard0;
Then reboot, they will be remain swapped every time you boot. If you want to swap them back, comment out or delete those lines and reboot again.
Edit: Make sure if you edit that file that its permissions remain the same. That is for execution.
Edit2: If on the Hybrid, change the 29 number to 27.

[Guide] Link2SD (or Apps2SD) on Galaxy Tab A (SM T-580)

Hello folks. Before going further I need to apologize. I really fighted to use Link2SD on my Galaxy tablet and I succeeded more or less. I thought that my tentative could be useful to others. So I posted this topic.
I worked a little more, and now I am convinced that I was wrong from the beginning.
The reality is that Apps2SD and Link2SD are obsolete utilities.
Forget creating a second volume on your external SD Card :
- Android/Samsung declare your SD Card as corrupted and always wants to reformat it.
- TWRP mounts the wrong partition and you have to manually unmout it and remount the good one
- The partitions need to be declared with a wrong type and this is really not clean
etc...
I suggest that you do not loose your time, forget Link2SD, and read this excellent topic:
https://www.xda-developers.com/divi...gles-fuse-replacement-will-reduce-io-overhead
My Galaxy tab A has only 11 Go available for the user. I bought a 128 Go external SD card to extend both /storage/emulated/0 and /data.
When you first install your SD Card, Android automatically mount this card as /storage/xxxx-xxxx.
This is a FAT volume extended on all your SD Card (128 GB for me).
This is fine for storing ebooks, music, video, and your backups.
But impossible for Link2SD to move your apps on this volume and put a symbolic link on the previous location, because FAT is not a UNIX file system. Link2SD (or Apps2SD) needs a second disk volume on partition 2 (/dev/block/mmcblk1p2) formatted with a UNIX file system (ext4 is fine).
Of course you need to have rooted your device. [A non rooted tablet is not better than a vulgar iPhone ]
To re-partition my SD Card I used ROEHSOFT PARTITION TOOL (SD-USB). (I tried unsuccessfully Aparted, it crashed every time I launch it). ROEHSOFT is convenient but tricky to be used by an advanced user :
- You cannot create a partition in a specific slot (for example /dev/block/mmcblk1p2): It automatically use first slot for the first partition you create, the second slot for the following partition, and so on.
- If you try to foul it, deleting a partition and recreating it in another empty space, it suddenly decides to reorganize your 4 slots. It really wants /dev/block/mmcblk1p1 to be the first partition on your SD Card, /dev/block/mmcblk1p2 the following, etc...
- You cannot create a partition at a specific offset inside an empty space.
After fighting with ROEHSOFT I finally won. I discovered too late that "fdisk" is part of BusyBox. If you know "fdisk" my advice is to use it instead of fighting with a software which pretends to be user friendly but is too limited.
OK, stop bla-bla and work.
1 - Dismount your SD Card : Parameters/Device Maintenance/Storage/Menu-Storage Parameter/Dismount
2 - Delete the only one partition
3 - For a misterious reason, my Android was not happy with his FAT volume on /dev/block/mmcblk1p1. Link2SD wants his UNIX volume on /dev/block/mmcblk1p2. So, if you use ROEHSOFT you need now to create a small dummy partition on /dev/block/mmcblk1p1. For me I created a 4 Go partition to be used by Linux Deploy. This partition needs to be declared as FAT32 (LBA) but should not be formatted as a FAT file system. EXT4 is a good choice.
4 - Create the second partition for Link2SD. I suggest not too much space for it, because you probably want a huge space for the third partion. This partition needs to be declared as FAT32 (LBA) but should be formatted with a UNIX file system. EXT4 is a good choice.
5 - Create the third partition to be used as SD extension for Android. This partition should be very large : you will store on it your music, your movies, your ebooks, and above all your backups. This partition needs to be declared as FAT32 (LBA). I formatted this partition as a EXFAT file system.
6 - Reboot. If you are lucky you will get two notifications : one saying that you have a corrupted memory card, and one saying that you are ready for media files. You will get those two notifications at each reboot.
8 - Recreate mounting scripts inside Lin2SD (or Apps2SD), and reboot.
7 - If you are a UNIX user just type "df -h" in a terminal to verify that the two partitions are mounted with correct sizes).
8 - You can look what Android think of your partitioning :
/Parameters/Device Maintenance/Storage/Menu:Storage Parameter/.
Do not try to mount the two first volumes and NEVER try to reformat them with Android. Those volumes are declared as corrupted but this is normal. Android does not expect to find a UNIX file system on a partition declared FAT32.
If one day, you forget this and ask to Android to reformat a corrupted partition you will have the terrible surprise that Android will not only erase your partition, but will erase everything and recreate one and only one big empty partition. (I guess that you keep all your backups on this SD Card, like me, so this is a really bad surprise).
Do not ask me why Android does not want his SD-Card on first partition. I have no idea. I guess that Android or Samsung reserve this partition for something else.
Do not ask why I had to declared all my partitions as FAT32 even if two of them are formatted as EXT4. I just realized that this configuration works well after fighting during a full day.
I hope that this topic will help some of you.
You really need the second partition on the SD? Or you can have only one ex4 partition that fills all the SD? (Remove the FAT and only have one ext4)
Palatosino said:
You really need the second partition on the SD? Or you can have only one ex4 partition that fills all the SD? (Remove the FAT and only have one ext4)
Click to expand...
Click to collapse
No, I tried but it doesn't work.
I found today a very interesting topic that I will try to master and hopefully wil, understand everything better :
https://www.xda-developers.com/divi...gles-fuse-replacement-will-reduce-io-overhead
Maybe I was wrong from the beginning : perhaps LinkSD and apps2SD are historic patch that are not useful anymore. Perhaps all the burden will be fixed easily just by not using those utilities anymore.
"sdcardfs" is something very new for me who is an old UNIX fellow. This seems to be a major improvement for Android.
I will update this topic when everything will be clear for me.
I didnt have this problem on android 6, but on android 7 . My phone wants to use ext4 as data partition and says its corrupted, link2sd detects this second partition normally, but my data partition fat 32 detected on phone settings and its says its ready but there is no option to mount it.
As far as i understand from this tutorial i need to make 1 fake ext4 partition say 1mb, then second partition ext4 for use with link2sd, and third partition fat32 for use as data storage ??
My phone is samsung j7 2016
So i did follow this , but now my phone wont detect fat32 and link2sd didnt detect 1 of other ext4 partitions
Looking for a definitive way to Root and use link2sd to have my SM-T580 use the SD as a primary parition for apps and data. Been researching and trying a dozen different methods already to no avail. Bonus if there's a way to roll it back easily. Am on the latest android release.
Thank you for all replies.
larpoux said:
I hope that this topic will help some of you.
Click to expand...
Click to collapse
You're my saviour, thank you ! I've been fighting on the same issue for days and didn't think about that trick to declare an ext partition as FAT32 !
I know you probably won't see this, but I just wanted to tell you how much I appreciated this guide.
I have a Galaxy Tab S3 and every since going to a custom rom, I haven't been able to get this working which was such a pain with less than 23 gb of storage. The Rom improved my performance far too much for me to change back and every guide I attempted pointed me in the wrong direction but finally, I'm able to use my 120 gb SD card which has made my tablet worth using again.
To anyone who may attempt in the future,
I'm using Android 9 + Magisk. Using the Advanced type Mount script was the only way it get it functioning but I've had no issues with linking apps and no message regarding a corrupted SD card. It can take a few minutes on boot for everything to properly load in, but the apps all update and there's no performance/loading time issues.
Thanks again!

Categories

Resources