Flirting with CM7 -- Notes and Observations - G Tablet General

I have been a big fan of VEGAn Ginger -- sure it has some issues but it works pretty well. But recently I was wondering how much of an issue would it be to install CM7.02, the VTL Launcher, and whatever other extras and just keep up to date.
I did and for the most part it works the same. A few things were FC that didn't on VEGAn and a few things worked that FC on VEGAn. No big difference on too many things.
However, two issues came up.
1) CM really wanted to install ROM Manager. The CM forum implied it works ok so I tried it. It DOES work on my system but it expects everything on /mnt/emmc which was a pain since all my backups and recovery were on the external sdcard /mnt/sdcard2 in VEGAn and /mnt/sdcard in CM7. What's worse is apparently it will refuse to flash over it self with an old version! So it wasn't insurmountable, just required me to move everything for awhile. But I finally got tired of it and reflashed good old bekit 0.8 using nvflash. So if you experiment, be sure you have a backup of partition 9 (clockwork mod) or you know how to unpack the ZIP file and flash it.
2) This brings up an interesting issue. I was going to try it but I didn't because I realized I'd have to repack the root directory and I didn't want to do it. But if the Gingerbread ROM repackagers were interested this would be easy for them to do. I'd propose having 3 directories in /mnt (well, plus the others, but 3 we are interested in): /mnt/emmc /mnt/sdcard /mnt/sdcard2
What you would do is let CM7 mount /mnt/emmc as always and change vold.conf to mount the external card at /mnt/sdcard2. Then you bind mount /mnt/emmc over /mnt/sdcard. That way you have the exact same filesystem at /mnt/emmc and /mnt/sdcard and in CM7 and the other ROMs it would "just work" since regardless of where you were looking for the SDCARD you'd wind up with the internal unless you looked for sdcard2.
I understand not all devices have big internal SD and that's why CM is set up the way it is, but if we are mucking with the mount scheme anyway, why not like this?
I may go in and try it again if I reinstall CM7. Without having to recast the ROM you'd have to put a userinit script in that DID not block but would spin off a process to wait for /dev/emmc to mount and then moved /mnt/sdcard to /mnt/sdcard2 and then created /mnt/sdcard again and did the bind mount. This requires a remount of root to make it writeable, etc. Kind of a pain.
Something like this (untested):
#!/system/bin/sh
( until mount | grep -l sdcard
do
mount -o remount,rw / /
mv /mnt/sdcard /mnt/sdcard2
mkdir /mnt/sdcard
chown 1000 /mnt/sdcard
chgrp 1015 /mnt/sdcard # whatever sdcard_r gid is? 1015? 1025?
chmod 076 /mnt/sdcard
mount -o bind /mnt/emmc /mnt/sdcard
mount -o remount,ro / /
done ) &
Something like that. Would be easier if you could just get vold to mount on sdcard2 to start with and have /mnt/sdcard and /mnt/sdcard2 already created in /mnt.
Just a thought.
By the way, another trick like this that I do is to mount sdcard2 as a subdirectory of sdcard. That works great EXCEPT when you USB mount the tablet it never works until you unmount. Not a big deal but a pain.

Good suggestion, but it's easier to just symlink /mnt/sdcard to /mnt/emmc and mount the internal SD card there--assuming that vold does not check that the mount point is not a symbolic link. The external SD card can be mounted on /mnt/sdcard2.
However, this might be a temporary problem. Google, for Gingerbread, wants the removable SD card on all devices, whether cell phone or tablet, to always be mounted on /mnt/sdcard (or /sdcard) and the internal SD card to be mounted elsewhere (/mnt/emmc, I believe), which is why Gingerbread-based firmwares like CM7 have /mnt/emmc and /mnt/sdcard as mount points.
In 6 months, hopefully, everybody will be on Gingerbread+ and the current multiplicity of possible mount locations will cease to be an irritation.

you have emmc and sdcard mountable right now. you can also mount a usbdisk. you can have 2 mounts going at the same time currently.

Screenshots? Last I checked (7.0.2) you still could not take a SS by any method on CM7.
That's pretty much why I'm on VEGANginger.
I used the vold.fstab.zip thing floating around here or on the CM forums to change the fstab on CM7 to be like VEGANtab/froyo for mounting the internal sdcard - makes all the 3rd party apps happy.

schettj said:
Screenshots? Last I checked (7.0.2) you still could not take a SS by any method on CM7.
That's pretty much why I'm on VEGANginger.
I used the vold.fstab.zip thing floating around here or on the CM forums to change the fstab on CM7 to be like VEGANtab/froyo for mounting the internal sdcard - makes all the 3rd party apps happy.
Click to expand...
Click to collapse
Same thing here, it makes almost everything back to normal, unless you try to use ROM Manager automagically, which will fail.

rajeevvp said:
Good suggestion, but it's easier to just symlink /mnt/sdcard to /mnt/emmc and mount the internal SD card there--assuming that vold does not check that the mount point is not a symbolic link. The external SD card can be mounted on /mnt/sdcard2.
However, this might be a temporary problem. Google, for Gingerbread, wants the removable SD card on all devices, whether cell phone or tablet, to always be mounted on /mnt/sdcard (or /sdcard) and the internal SD card to be mounted elsewhere (/mnt/emmc, I believe), which is why Gingerbread-based firmwares like CM7 have /mnt/emmc and /mnt/sdcard as mount points.
In 6 months, hopefully, everybody will be on Gingerbread+ and the current multiplicity of possible mount locations will cease to be an irritation.
Click to expand...
Click to collapse
Symlinks don't work for everything -- especially any FS that is VFAT. Bind mounts always work even through a chroot, etc. I don't think you can mount on top of a symlink either although I could be wrong. Same problem with trying to symlink /mnt/sdcard/sdcard2 => /mnt/sdcard2. The sdcard FS is VFAT so...

schettj said:
Screenshots? Last I checked (7.0.2) you still could not take a SS by any method on CM7.
That's pretty much why I'm on VEGANginger.
I used the vold.fstab.zip thing floating around here or on the CM forums to change the fstab on CM7 to be like VEGANtab/froyo for mounting the internal sdcard - makes all the 3rd party apps happy.
Click to expand...
Click to collapse
screen shots are in cm7 now.

wd5gnr said:
Symlinks don't work for everything -- especially any FS that is VFAT. Bind mounts always work even through a chroot, etc. I don't think you can mount on top of a symlink either although I could be wrong. Same problem with trying to symlink /mnt/sdcard/sdcard2 => /mnt/sdcard2. The sdcard FS is VFAT so...
Click to expand...
Click to collapse
No, symlinks will work in this case because the link in not on the VFAT filesystem--it's outside it. And, you can mount through a symlink.

pershoot said:
screen shots are in cm7 now.
Click to expand...
Click to collapse
Hm... they didn't work in 7.0.2 when I flashed it. So they're in the nightly since? I could flash over and kick the tires.

Related

Unable to mount loopback

I created a zeroed file with dd and attempted to mount it with:
mount -o loop /sdcard/test.img /data/test
and
losetup /dev/block/loop0 /sdcard/test.img
However, no loopback devices are displayed when I invoke mount. Can anyone clue me in? Feel like i'm missing something basic. By the way, I am running these commands from Saurik's busybox with the losetup /dev/block/loop fix.
p.s. I'd ask on the G1 hackers mailing list, but it's gone a bit bonkers in the past few days.
I'm not sure, but doesn't the image file you're trying to mount have to contain an actual file system?
Yea, I subsequently created a filesystem for it with mke2fs (which is mysteriously missing from busybox for android?). Still no go. Same when I tried to mount other partition-in-a-files like the module.cramfs or recovery.img
If I try to losetup the loop device then mount that, it returns error:
mount: mounting /dev/block/loop0 on /data/test failed: No such device
If I try to mount directly with -o loop, it returns:
mount: cannot setup loop device: No such file or directory
And yet Saurik seems to have been able to loop mount fine. Perhaps it is because I am testing on the qemu instead of hardware?
That might be it. You might try busybox's mount also.
But yeah, It definitely does work on the phone at least.
I've been trying to figure out how to load debian on the emulator, but I can't get the ext2 image mounted. I had to recompile the kernel first so support loadable modules, but even after that, it would not work (can't remember the specific error). Has anyone gotten an ext2 file system mounted on the emulator successfully?
The reason I'm doing this is so I can do native compiles, without actually having to do it on the phone. It has advantages in that I can crank up the clock speed and the RAM.
So I was able to mount loopback just fine on the actual hardware, but i'm having trouble getting it to run from the init.rc file. This is what i'm typing at the shell (it works):
(after insmod ext2.ko)
mount -o loop,noatime,nodiratime,nosuid,nodev -t ext2 /sdcard/loopy/app.img /data/app
It works fine and i'm able to install and run apks from the sdcard (/dev/block/loop2 on /data/app type ext2). Of course this is no good unless it can be mounted before the launcher starts (or it won't see any of our apks). The syntax for init mounting is different from sh, so I tried this (this is in /data/init.rc btw):
on userdata
#mount loopback file from sdcard
insmod /system/modules/2.6.25-01843-gfea26b0/kernel/fs/ext2/ext2.ko
mount ext2 /sdcard/loopy/app.img /data/app noatime nodiratime nosuid nodev loop
I know the script is being run since the ext2.ko module is getting installed. But the mount command isn't being executed. Can anyone shine a light on this? I'm not very familiar with the init daemon.
jashsu said:
So I was able to mount loopback just fine on the actual hardware, but i'm having trouble getting it to run from the init.rc file. This is what i'm typing at the shell (it works):
(after insmod ext2.ko)
mount -o loop,noatime,nodiratime,nosuid,nodev -t ext2 /sdcard/loopy/app.img /data/app
It works fine and i'm able to install and run apks from the sdcard (/dev/block/loop2 on /data/app type ext2). Of course this is no good unless it can be mounted before the launcher starts (or it won't see any of our apks). The syntax for init mounting is different from sh, so I tried this (this is in /data/init.rc btw):
on userdata
#mount loopback file from sdcard
insmod /system/modules/2.6.25-01843-gfea26b0/kernel/fs/ext2/ext2.ko
mount ext2 /sdcard/loopy/app.img /data/app noatime nodiratime nosuid nodev loop
I know the script is being run since the ext2.ko module is getting installed. But the mount command isn't being executed. Can anyone shine a light on this? I'm not very familiar with the init daemon.
Click to expand...
Click to collapse
Try
mount ext2 [email protected]/sdcard/loop/app.img /data/app noatime nodiratime nosuid nodev
JesusFreke said:
Try
mount ext2 [email protected]/sdcard/loop/app.img /data/app noatime nodiratime nosuid nodev
Click to expand...
Click to collapse
Tried that one earlier too. No love.
jashsu said:
Tried that one earlier too. No love.
Click to expand...
Click to collapse
I betcha the sdcard hasn't been mounted yet.
Is there anything in dmesg that looks relevant? Or maybe logcat?
Try temporarily moving the image file to /data, and see if you can get it to mount. That should verify that it has something to do with it being on the sdcard
JesusFreke said:
I betcha the sdcard hasn't been mounted yet.
Is there anything in dmesg that looks relevant? Or maybe logcat?
Click to expand...
Click to collapse
Agh! You're right. The mount daemon runs at line 192, in the services section. Long after the /data/init.rc is parsed.
service mountd /system/bin/mountd
socket mountd stream 0660 root mount
Any way around this short of manually mounting the sdcard in the /data/init.rc?
Edit: dmesg bingo:
<3>[ 1.920368] init: unable to mount [email protected]/sdcard/loopy/app.img to /data/app
as ext2
<6>[ 1.921498] yaffs: dev is 32505860 name is "mtdblock4"
<6>[ 1.922016] yaffs: passed flags ""
<4>[ 1.922322] yaffs: Attempting MTD mount on 31.4, "mtdblock4"
<4>[ 1.927204] yaffs: restored from checkpoint
<4>[ 1.927845] yaffs_read_super: isCheckpointed 1
<3>[ 1.960002] init: unable to mount /system/xbin.cramfs to /system/xbin as c
ramfs
<3>[ 1.965221] init: service 'console' requires console
<4>[ 2.161895] mmc_sd_init_card: Delay 250 ms
<4>[ 2.522535] mmc1: host does not support reading read-only switch. assuming
write-enable.
<6>[ 2.523359] mmc1: new SDHC card at address cd4e
On a side note, it looks like the mount action for xbin.cramfs in the main init.rc is failing because it's redundant with an earlier mount in /system/init.rc. I'm guessing this is a vestige of development on cramfs loopback mounting (mentioned here by Saurik).
6) at Jesus Freke's suggestion, setup /system/xbin (and later /system/modules) to mount from a compressed image
Click to expand...
Click to collapse
Yeah, I had left in an extra mount for xbin.cramfs in the base init.rc. I believe that's fixed in v1.3. I'll check again and make sure
So I gather the reason for wanting to mount a loopback device is to be able to create an ext2 fs as a file on the sdcard fat fs instead of creating 2 separate parittions on the sdcard , one for fat and one for ext2?
If this can be done, this would be a much better solution for getting apps to run on the sdcard than the previous hack which requires creating an ext2 partition on the sdcard.
Yeah that was what I was looking into. However as noted above, the I couldn't mount the image on the sdcard because the point at which /data/init.rc gets parsed occurs before the sdcard service starts up. The partition method doesn't have this problem because it creates a node for paritition #2 in the init.rc
jashsu said:
Yeah that was what I was looking into. However as noted above, the I couldn't mount the image on the sdcard because the point at which /data/init.rc gets parsed occurs before the sdcard service starts up. The partition method doesn't have this problem because it creates a node for paritition #2 in the init.rc
Click to expand...
Click to collapse
so u can't mount the sdcard in /data/init.rc?
dwang said:
so u can't mount the sdcard in /data/init.rc?
Click to expand...
Click to collapse
Not sure, I didn't try mounting partition #1. You could give it a shot by using mknod in /data/init.rc like the parted sdcard method. The sdcard service might not like that the card has already been mounted though.
There are two major reasons I abandoned this concept. The first is I didn't want to figure out how to get permission to mount /sdcard (since / is ro). The second is that making the sdcard available as a usb mass storage device makes it exclusively unaccessible from Android. I suppose that might not be so bad if you are only offloading /data/app, as long as you don't try to execute any new apps while your mass storage connection is going. It's non-ideal.
jashsu said:
Not sure, I didn't try mounting partition #1. You could give it a shot by using mknod in /data/init.rc like the parted sdcard method. The sdcard service might not like that the card has already been mounted though.
There are two major reasons I abandoned this concept. The first is I didn't want to figure out how to get permission to mount /sdcard (since / is ro). The second is that making the sdcard available as a usb mass storage device makes it exclusively unaccessible from Android. I suppose that might not be so bad if you are only offloading /data/app, as long as you don't try to execute any new apps while your mass storage connection is going. It's non-ideal.
Click to expand...
Click to collapse
I don't think the 2nd reason is that big of a deal. If google is planning on implementing the file based method for apps on the sdcard, they could just block access to apps when the sdcard is mounted to a pc. Its a lot better than the alternative of having to create a 2nd ext2 partition on the sdcard. Of course google should have really solved this issue before the g1 came out.
Anyways, I don't see /data/init.rc on my jf rc 1.2 g1. I only see /init.rc and /system/init.rc. Is /data/init.rc something that you created just for the purpose of mounting the file.
dwang said:
I don't think the 2nd reason is that big of a deal. If google is planning on implementing the file based method for apps on the sdcard, they could just block access to apps when the sdcard is mounted to a pc. Its a lot better than the alternative of having to create a 2nd ext2 partition on the sdcard. Of course google should have really solved this issue before the g1 came out.
Anyways, I don't see /data/init.rc on my jf rc 1.2 g1. I only see /init.rc and /system/init.rc. Is /data/init.rc something that you created just for the purpose of mounting the file.
Click to expand...
Click to collapse
Yeah it's referenced in /init.rc Easier to use since unlike /system/init.rc, it's not in a ro folder. You could use /system/init.rc too. Either way really.
jashsu said:
Yeah it's referenced in /init.rc Easier to use since unlike /system/init.rc, it's not in a ro folder. You could use /system/init.rc too. Either way really.
Click to expand...
Click to collapse
Ok.. I'll probably just stick with partitioning the sdcard into fat and ext2. Its working well for me and there really isn't a whole lot of advantages having the ext2 as a file on the fat partition.
I have 41 apps installed on the sdcard now (including some huge games like bonzai blast and brain genius deluxe) and I still have 59 megs of free internal storage. I think everybody that has a rooted g1 should put apps to the sdcard.

[Q] SD Card will not mount after ext4 part.

Attempting to partition sd card with ext4 -a process I completed multiple times successfully on a Nexus One, the process appeared to complete but now the phone will not mount the sd card. I've tried a wipe/reset, to no avail. I can still access and partition the sd card through adb, but the phone cannot mount it to format/partition, restore from recovery, partition sd-card from within ClockWork Recovery, nothing. I've re-partitioned the sd card through adb, which indicated a successful completion, but the phone still refuses to mount the sd card. If this weren't a Nexus S with it's cursed internal sd-card I would simply swap out the sd card with another or format it externally like all the google topics I pull up on the subject suggest.
Is this fixable or has the fused sd-card scenario become a liability?
Common Error messages:
Can't mount /sdcard
Can't mount /sdcard/.android_secure
Phone: Nexus S (US, T-Mobile, manufactured Dec. '10)
Recovery Img: ClockworkMod Recovery 3.0.2.4
Rom: CM 7.0.3 (now wiped, cannot put back on since sd card won't mount)
fstab:
/dev/block/mtdblock4 /cache yaffs2 rw
/dev/block/platform/s3c-sdhci.0/by-name/userdata /data ext4 rw
/dev/block/platform/s3c-sdhci.0/by-name/system /system ext4 rw
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard vfat rw
Can mount everything except the last one, /sdcard.
I've tried all the recommended procedures garnered from the first 10 or so pages in google, xda, cyanogem forum, etc:
Restore from nandroid: Not possible, can't mount the SD,
Wipe/Reset: can't wipe /media as sd card won't mount,
partition sd card from within Clockwork: indicates success but does nothing,
format from within clockwork: unable to mount,
repartition using adb: works, parted can see them, I can move files to from, but the phone will not mount,
clearing fstab: no effect,
Fastboot works, but I don't have the proper images. ADB works, as do the installed utilities. Have not tried ODIN as again, I don't have the proper images. Should I attempt to compile my own images from source?
Update: SOLVED, Microsoft Windows. To whom it may concern: I was able to mount the /dev/block/platform/s3c-sdhci.0/by-name/media from two different laptops running OSX and Fedora/Ubuntu then successfully been able to partition them with fat32 as the ClockworkMod (and maybe Cyanogen?) expect with 0 progress. Then I pulled out an old Windows machine, installed the JDK/ADK's +tools and performed the same procedure and that time it worked. I'm uncertain as to what particular quality a 'genuine' Windows formatting provides, but either this phone or the particular software combination I'm running require it. I was able to mount & re-partition the /sdcard in Clockwork, then manually remove rebuild them and upgrade to ext4 using tune2fs as usual. In the interim for work and such, I had to find a surrogate (for the SIM) and could only find and old k750i (which still had a full charge and worked flawlessly all day, btw). Wow phones used to be small.
I think I was missing something about the way ClockworkMod handles fstab, because everytime I would modify it specifically to the specs I passed to parted while creating the partitions with mkpartfs, it would either ignore or overwrite them. So be careful messing with the sd-card, the S's aren't like the One's in the sense that if you screw it (the sd-card) up or it goes bad you can't just take it out and format it in another machine/phone, you have to appeal to ClockworkMod. ODIN $ucks by the way, I found fastboot to be much more effective.
If you format the sd partition ext4, then you should change the fstab too.
from
Code:
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard vfat rw
to from
Code:
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard ext4 rw
or from
Code:
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard auto rw
The 2nd last entry there is the file system type.
Likely, this would have solved your problem.
Of course, I don't know, whether the recovery has the vfat type in fstab. You might have to change it there too. On my linux box auto works very well in fstab.
Of course, if you partition your sd partition ext4, you won't be able to use it as usb memory from windows. (At least I am pretty sure you can't, haven't tried)
Well of course I couldn't let it die, I went back and started tinkering again now that I have a way back. I can't change the fstab it seems, whatever I change it to gets over written everytime either Clockwork or the Rom starts. It's weird, I know I'm missing something and I don't know much about CWMod. (had Amon_Ra on the N1, which had the nifty fsupgrade script)
The 2nd last entry there is the file system type.
Likely, this would have solved your problem.
Click to expand...
Click to collapse
I'm quite familiar with unix style fs and fstab, it's the stubbornness I'm not used to. I'm also spoiled by vi and nano. CW has some nice scripts built in as well though.

Idea for creating extra storage space

I have a good 2 GB of space that I am unlikely to use on the /data partition. So I created an 'sdcard' directory in there. What I'm trying to do is trick the system into believing that it's a second SD card. Can android support more than one? It's all good getting the directory to work as a secondary storage place, but the problem is, media scanner will not show pictures/music that are in that directory.
So my question is, is it possible to edit the ramdisk (init.rc) or vold.fstab etc or any other files, so the system is tricked into believing it's an actual storage card? I have tried making symlinks and doing directory bindings from /data/sdcard to /storage/sdcard1, but haven't had any luck.
Edit:
something like this maybe in init.rc??
symlink /storage/sdcard /sdcard
symlink /storage/sdcard1 /data/sdcard
export EXTERNAL_STORAGE /storage/sdcard
export SECONDARY_STORAGE /storage/sdcard1
I'm sure something is possible.
The nicest thing would be to have vold bind-mount a directory or loop-mount a filesystem image, but I'm not sure vold can do that at all and if it can I don't know what the syntax for that would be.
This would probably be a bit different between sense and aosp as it looks like vold is different.
You can easily bind-mount it yourself.
Either way, if you want to mount it on (say) /sdcard2 or anywhere on the root file system, you have to edit the ramdisk in the boot image.
But you can also mount it on top of /sdcard
mkdir /data/extra_sd
mkdir /sdcard/extra_sd
busybox mount --bind /data/extra_sd /sdcard/extra_sd
( ^^^-- I found that /system/bin/mount doesn't do --bind or -o loop and that busybox mount does.)
I tried this and it works. I have not yet experimented with putting it in an init.d script or so to mount it on boot and see if mediascanner scans it.
However, using this method you may corrupt stuff when you USB-mount your sdcard onto your PC. I'm not sure.
-Jobo
I've actually been trying numerous ways of mount bind all day. From init.d to repacking kernels with adjusted init.rc. Nothing worked.
The only way that works is using ScriptManager to run a busybox mount -o bind command at startup. It binds a subfolder in /sdcard/music to /data/media, where I've offloaded 1.5 GB of my music. I've rebooted many times and it seems to mount on time before messing up the media storage, and now I have 1.5 G extra SD space
Well, you could try "partitioning" the phone with LVM.
Which would actually be really interesting. I've got an extra gig of space in each of /system and /data that I'm not using. Being able to span that with /sdcard would be handy.
Actually, with that in place, you could combine /data and /sdcard into a single large partition and then just have both directories on that.
ardax said:
Well, you could try "partitioning" the phone with LVM.
Which would actually be really interesting. I've got an extra gig of space in each of /system and /data that I'm not using. Being able to span that with /sdcard would be handy.
Actually, with that in place, you could combine /data and /sdcard into a single large partition and then just have both directories on that.
Click to expand...
Click to collapse
That would be the ideal solution, which I have been hoping since day 1 becomes available from our phone, but does it not require S-OFF?
djsubtronic said:
That would be the ideal solution, which I have been hoping since day 1 becomes available from our phone, but does it not require S-OFF?
Click to expand...
Click to collapse
I don't think it should, since it's not changing the partition layout of the internal memory itself, just globbing it together and slapping virtual volumes on top with LVM. The biggest things are making sure that the kernel has LVM support and binaries built in and that recovery can get to those LVM binaries.
Perhaps I'm wrong though.
djsubtronic said:
I've actually been trying numerous ways of mount bind all day. From init.d to repacking kernels with adjusted init.rc. Nothing worked.
The only way that works is using ScriptManager to run a busybox mount -o bind command at startup. It binds a subfolder in /sdcard/music to /data/media, where I've offloaded 1.5 GB of my music. I've rebooted many times and it seems to mount on time before messing up the media storage, and now I have 1.5 G extra SD space
Click to expand...
Click to collapse
I really like the idea using data to get some extra space.
I tried "busybox mount --bind" via console and it works. Now i will have a look at ScriptManager.
But what happens if you are installing/updating a new ROM. Do you lose all your things located in /data?
regards
If you format /data then yes, obviously. You are only creating a "shortcut" to /data/folder.
Also, if you run out of space in /data/app/ you can move apps to /system/app instead.
I did that on my blade with a way too big /system/ partition and way too small /data/ partition
djsubtronic said:
I've actually been trying numerous ways of mount bind all day. From init.d to repacking kernels with adjusted init.rc. Nothing worked.
The only way that works is using ScriptManager to run a busybox mount -o bind command at startup. It binds a subfolder in /sdcard/music to /data/media, where I've offloaded 1.5 GB of my music. I've rebooted many times and it seems to mount on time before messing up the media storage, and now I have 1.5 G extra SD space
Click to expand...
Click to collapse
Could I get a hold of that script by chance?
Daiskei said:
Could I get a hold of that script by chance?
Click to expand...
Click to collapse
+1. Yes, please share.
One S | Xparent Blue Tapatalk 2 | Viper 1.2.1 | Bricked Beastmode
So updating a ROM without formating data partition should be no problem.
But for installing a new ROM i have to backup the folder in the data partition.
I tried to use ScriptManager, but this app seems to be bit overloaded.
After this i installed GScriptsLite.
In there i made a new script with something like this:
busybox mount --bind /data/myfolder /sdcard/myfolder
The script is not started automatically after a reboot, but after running the script via GScriptsLite the folder is mounted.
Yeah I suppose it could be difficult if changing ROMs, but I use CM only so I never worry about changing the data partition. But if I do, I just copy the /data/media folder onto my PC using adb pull, then do the wiping/flashing, and finally push the media folder back before booting the ROM.
As for the script, it's essentially just this one line:
Code:
busybox mount -o bind /data/media /storage/sdcard0/Music/Music2
I've kept the script file itself on the /data partition as well. In script manager I've set it to run the script as SU and on boot, and that's it. I've mounted it into a sub folder within Music since I use PlayerPro and it only adds music found within /sdcard/Music.
Yes, ScriptManager is a lot more complicated than GScripts, but it always mounts it automatically on boot so saves the hassle of having to remember to manually run the script if you ever reboot. Plus you only have to sort it out once then never open the app again if you don't want to

Vold.fstab missing?

For some reason I don't have the vold.fstab file under system/etc/ . I want to swap sdcard0 and sdcard1 but without vold.fstab I'm not sure if there are other methods. Thanks in advance for swapping suggestions or answers to the missing vold.fstab file. I'm on Lollipop.
yang_k_vue said:
For some reason I don't have the vold.fstab file under system/etc/ . I want to swap sdcard0 and sdcard1 but without vold.fstab I'm not sure if there are other methods. Thanks in advance for swapping suggestions or answers to the missing vold.fstab file. I'm on Lollipop.
Click to expand...
Click to collapse
It's been deprecated since android 4.3 the sdcard is now mounted in fstab which means you would have to unpack the boot.img
I too hav the same prob plz help...
Unjustified Dev said:
It's been deprecated since android 4.3 the sdcard is now mounted in fstab which means you would have to unpack the boot.img
Click to expand...
Click to collapse
Plz help me guys void. Fstab is missing on my device.... What to do
I'm really stuck on this too. I switched to a Sony Z1C recently, but it had a locked bootloader. I can't install Cyanogen. My last phone had Cyanogen and my SDcard is mounted ext4. I really want to mount this card while keeping the ext4 filesystem (it's 128GB. It's also full. All my music...well A-W...ran out of space. It took forever. I'm not reformatting. Don't ask).
I can mount the sdcard manually via the adb shell:
mount -t ext4 /dev/block/mmcblk1p1 /storage/sdcard1
And if I look at the directory in the console, everything shows up. But it doesn't show up in any apps! What gives? How do I fix this?
download Link2 Sd on playstore.
djsumdog said:
I'm really stuck on this too. I switched to a Sony Z1C recently, but it had a locked bootloader. I can't install Cyanogen. My last phone had Cyanogen and my SDcard is mounted ext4. I really want to mount this card while keeping the ext4 filesystem (it's 128GB. It's also full. All my music...well A-W...ran out of space. It took forever. I'm not reformatting. Don't ask).
I can mount the sdcard manually via the adb shell:
mount -t ext4 /dev/block/mmcblk1p1 /storage/sdcard1
And if I look at the directory in the console, everything shows up. But it doesn't show up in any apps! What gives? How do I fix this?
Click to expand...
Click to collapse
Go into link2 sd on phone and the first time you open it IT WILL ASK YOU 1 time!! pick wisely.. which ext1 (2) (3) you want to run... Solved!!

method to set 0123-4567 as mount point for removable sdcard

This is a very annoying issue but I have not found any thread about it.
I'm trying to upgrade my external/removable sdcard for an android 6 device.
The new sdcard gets mounted to /mnt/media_rw/XXXX-XXXX (i.e. not 0123-4567), so no app works as files can't be found.
The linux way (ln) wont work. Simply creating /mnt/media/0123-4567 causes bad bootloop on my device. This suggests that FolderMount app or Magisk modules such as fbind are a bad idea. selinux is enforcing.
It appears that Android assigns different mount points are to different sdcards and the first sdcard always gets 0123-4567. It that's right, Android probably stores sdcards' identifiers so as to know which mount point to use at boot time. So, deleting the identifiers database would probably mean that the next card inserted would get 0123-4567 as mount point.
I have looked at the data of com.android.externalstorage, but there is nothing there. I don't see other obvious candidate apps.
Where is this ext sdcard data stored?
I was wrong. Android sets mount points matching sdcard uuid
How to change vfat partition UUID?
How do I change the UUID of a vfat partition? For ext2 / ext3 / ext4, this is done with a simple: tune2fs -U <new-uuid> /dev/<partition> Is there a similar command for vfat partitions?
superuser.com

Categories

Resources