[ROM Makers] xVold - G1 Android Development

this is repost of thread I've created here. Please post all related messages there. TIA
Hi!
I'd like to share my project called xVold:
xVold
What is xVold?
Vold is Android volume management daemon.
xVold is extended version made to help in "native" (aka Magpie or no-script) Apps2SDExt implementation created by Firerat and me.
xVold can mount Ext4 partition at /sd-ext and create all needed directories.
Here is an example of vold.fstab that will mount sd-ext at boot time:
Code:
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
## Format: ext_mount <label> <mount_point> <part> <sysfs_path1...>
ext_mount sdcard /sd-ext 2 /devices/platform/msm_sdcc.2/mmc_host/mmc1
(Please note that one can safely skip "/devices/platform/goldfish_mmc.0 as it's intended for emulator and not real device)
xVold is also capable of bind mounting /data/data to /sd-ext/data (which is usefull if your target phone is similar to HTC Dream). This binding is done only if
Code:
ro.data2sdext=1
property is in build.*.prop file
Current source tree is available on GitHub. Please use master branch.
I've attached binary that should work with CM6 based ROMs.

love it
not had a proper look yet, but I love it anyway
Need to add all the is "sd-ext mounted logic" to Magpie, so I'm sure this will make that easier

I look forward to it in my gingerbread build at some point.
btw do you know if the user gets a notification if the ext partition exists but fails to mount? (A required feature for my support sanity.. just wondering if its out of box or something for my list of things to do if I ever get around to it..)

Firerat said:
love it
not had a proper look yet, but I love it anyway
Click to expand...
Click to collapse
Need to add all the is "sd-ext mounted logic" to Magpie, so I'm sure this will make that easier
Click to expand...
Click to collapse
I kinda started doing it but got distracted while trying to simplify logic in DefContainer ;o) Now I'd like to get Settings to show sd-ext (seems faster to do than digging in framework again ;o) ) and than get back to framework.
ezterry said:
I look forward to it in my gingerbread build at some point.
Click to expand...
Click to collapse
I'd say sooner the better Just to avoid all the hassle with scripts and some legacy support. If you don't use ext_fs it's almost drop-in replacement (and it works also when init.d script mount sd-ext before vold starts). Just this morning I came to think that mounting sd-ext at boot should be property driven too. Just I'd like to have some bigger agreement on used property namespace. I was thinking about ro.vold.* and (maybe) sys.vold for runtime report.
btw do you know if the user gets a notification if the ext partition exists but fails to mount? (A required feature for my support sanity.. just wondering if its out of box or something for my list of things to do if I ever get around to it..)
Click to expand...
Click to collapse
There will be none. Vold is not really meant to advertise it. It starts too early in the bootup and there would be noone to listen.
Framework talks to vold and might ask it if sd-ext is mounted or why it wasn't.
Early mounting of /sd-ext is mainly for tricks like data2sdext. I believe that getting apps only from sd-ext would be similar to getting apps from FAT (framework asks sdcard to be mounted then issues "asec list")

xVold 2.1.3
I've updated first post in http://forum.xda-developers.com/showthread.php?t=935988 with info on xVold 2.1.3

Related

[CONCEPT] Single Partition No-Format Apps2SD

So I was using Slax. Great LiveCD/USB linux, extremely customizable, modular, fast, and small, and has the capability of either:
- saving changes to its rootfs onto an AUFS mounted on a non-linux FS (FAT32, NTFS) using posixovl (POSIX Overlay FS) with metadata (permissions, etc.) being held in files
- saving changes to a fixed-size loop mount image.
This got me thinking.
If we could insert all the necessary modules, code, etc. for posixovl into the Android linux, and make a modified a2sd script that takes advantage of posixovl, we could effectively do away with the requirement for crazy partitioning.
It should be simple enough for ROM devs to implement, assuming it's ready and installed:
1. Create folder on main partition if it doesn't exist, something like /sdcard/system/[app, app-private, dalvik-cache, app_s]
2. In the init scripts, before the a2sd stuff, mount /sdcard/system with posixovl on /system/sd
3. Run a2sd as normal, it should automatically just work.
I'll hopefully test this once I get my phone to a stable development/testing stage, and I don't need to make phone calls for a while. Anyone else is welcome to try to implement this idea.
My current test environment:
- HTC Dream (T-mo G1) with the deadly SPL of doom
- Cyanogen Experimental, latest build
- Amon_RA's modded recovery
- Wipe /data, move all existing apps to backup, remove a2sd partition, Backup for Root Users to restore some settings and data
Anyone with ideas or improvements, please let me know.
To be tested:
- Feasibility (can it work?)
- Functionality (does it work?)
- Portability (Can it work on other ROMs and devices like Hero, Pulse, Blur etc.? If so, will likely be moved to XDA's new Android board)
- Stability (Will everything Force Close on boot? Does it run fast enough? Does anything get corrupted over time?)
Links:
- http://sourceforge.net/projects/posixovl - Sourceforge page for posixovl
In desktop linux you can create a file with the touch command, and mount the file to a mountpoint after formatting it to ext4 for example.
Maybe this is the easier way?
I have done this about 5 years ago, but I will try it today and report if it worked.
edit: ok done already:
1. create a file of the desired size, eg: dd if=/dev/zero of=filename bs=filesize count=1
2. use mke2fs to format the file
3. create a mountpoint and mount the file
thats all. Now I have a 128MB file on my PC, mountable and usable like a partition.
Archont said:
In desktop linux you can create a file with the touch command, and mount the file to a mountpoint after formatting it to ext4 for example.
Maybe this is the easier way?
I have done this about 5 years ago, but I will try it today and report if it worked.
Click to expand...
Click to collapse
As far as I know, you can do that on the mobile Android, too, and that does work in theory. This technique involves mounting a loop filesystem, and it too will allow one-partition apps2sd, but it's less flexible, and I would think slower, than the overlay method.
For a 512MB apps image:
Create empty 512MB file
# dd if=/dev/zero of=/sdcard/apps.img bs=1024k count=512
Format it to Ext2
# mke2fs -L Apps2SD /sdcard/apps.img
Unmount existing a2sd
# umount /system/sd
mount new a2sd image
# mount -t ext2 -o loop /sdcard/apps.img /system/sd
Make the usual directories, and a mountpoint for the old a2sd partition
# mkdir /system/sd/app; mkdir /system/sd/app-private; mkdir /system/sd/dalvik-cache; mkdir /system/sd/apps-tmp
Mount the old a2sd partition
# mount -t ext2 /dev/mmcblk0p2 /system/sd/apps-tmp/
Move all files from the old partition to the image file
# mv /system/sd/apps-tmp/* /system/sd/
Unmount and remove the mountpoint, we don't need it anymore
# umount /system/sd/apps-tmp
# rmdir /system/sd/apps-tmp
Finally, you add the following line to the init script where the a2sd auto mount happens, and comment out the old line.
Code:
[...]
mount -t ext2 -o loop /sdcard/apps.img /system/sd
#mount -t ext2 /dev/mmcblk0p2 /system/sd/
[...]
This should do what you described, in theory. I can't say whether it will work or not. I can't tell whether it will or won't screw up your phone, I can't be held responsible if you screw something up or overlook the details. Either of us might have made a typo somewhere; apply common sense before doing anything.
This sounds great! I think this would also be usefull for someone like me, who has a sd card that doesn't want to be partitioned anymore (cross-linked files??). Only thing possible is fat32 or ntfs.
Am I correct with my assumption?
This sounds a lot harder and more complicated then partioning. Your also talking about a lot of work needing to be done just so people can avoid doing a simple thing like partioning a sd card. I would say it would be very difficult alone to get the os to run a virtual mounting service especially since that will take up resources and slow down the phone. There is a reason they only use this technique on live cds is it works but its slow. most of the computers they are running on have 1gig of ram and 2ghz cpu's. i really dont think the g1 can push this.
I do not think that this is great, it definitely is slower than a ext4 partition on a good class 6 microSD card. And it is more vulnerable to data loss since 2 different filesystems including a 20 year old non-journaling fs at the base of this construct are involved.
Another problem that came to my mind: when you mount your SD card as external USB device to a PC, the file containing your apps will no longer be accessible, or Android will make using the phone as external data storage impossible.
Interesting.
There is, however, a major problem: What happens when you unmount the fat partition on the phone in order to connect with a computer using UMS? Answer: everything on the phone will crash and burn since the apps filesystem will suddenly disappear = BAD.
posixovl is a nice find though...
Note that aufs, loopmount linux filesystems, etc., wouldn't be needed with this since posixovl appears to be vfat with posix extensions, so you should be able to just use posixovl directly on the sdcard.
There are several problems with that though... i.e. how reliable is posixovl regarding users tampering with it?
In any case, a prerequisite for use of it would be certain other changes being planned...
You might want to contribute to this thread:
http://forum.xda-developers.com/showthread.php?t=577941
(note: the thread links to a thread at android-platform, the one here has, as expected, gone off on a tangent... just ignore the junk.)
TylTru said:
So I was using Slax. Great LiveCD/USB linux, extremely customizable, modular, fast, and small, and has the capability of either:
- saving changes to its rootfs onto an AUFS mounted on a non-linux FS (FAT32, NTFS) using posixovl (POSIX Overlay FS) with metadata (permissions, etc.) being held in files
- saving changes to a fixed-size loop mount image.
This got me thinking.
If we could insert all the necessary modules, code, etc. for posixovl into the Android linux, and make a modified a2sd script that takes advantage of posixovl, we could effectively do away with the requirement for crazy partitioning.
It should be simple enough for ROM devs to implement, assuming it's ready and installed:
1. Create folder on main partition if it doesn't exist, something like /sdcard/system/[app, app-private, dalvik-cache, app_s]
2. In the init scripts, before the a2sd stuff, mount /sdcard/system with posixovl on /system/sd
3. Run a2sd as normal, it should automatically just work.
I'll hopefully test this once I get my phone to a stable development/testing stage, and I don't need to make phone calls for a while. Anyone else is welcome to try to implement this idea.
My current test environment:
- HTC Dream (T-mo G1) with the deadly SPL of doom
- Cyanogen Experimental, latest build
- Amon_RA's modded recovery
- Wipe /data, move all existing apps to backup, remove a2sd partition, Backup for Root Users to restore some settings and data
Anyone with ideas or improvements, please let me know.
To be tested:
- Feasibility (can it work?)
- Functionality (does it work?)
- Portability (Can it work on other ROMs and devices like Hero, Pulse, Blur etc.? If so, will likely be moved to XDA's new Android board)
- Stability (Will everything Force Close on boot? Does it run fast enough? Does anything get corrupted over time?)
Links:
- http://sourceforge.net/projects/posixovl - Sourceforge page for posixovl
Click to expand...
Click to collapse
lbcoder said:
Interesting.
There is, however, a major problem: What happens when you unmount the fat partition on the phone in order to connect with a computer using UMS? Answer: everything on the phone will crash and burn since the apps filesystem will suddenly disappear = BAD.
Click to expand...
Click to collapse
I kinda overlooked that point. Oops.
Though this same problem does exist on regular apps2sd when you remove the card without dismounting it, killing all apps and their processes, and freezing Dalvik's method of autostarting some apps.
I do tend to swap cards every now and then, but only after a reboot. Dalvik re-enumerates and caches dex, which makes for a slow boot, but it seems to just work in most cases that the apk install doesn't drop the app's functional payload (helper Linux/shell utils, libraries, NDK .so's) in /data/data (like some emulators, the Android Scripting Environment)
lbcoder said:
There are several problems with that though... i.e. how reliable is posixovl regarding users tampering with it?
Click to expand...
Click to collapse
As far as I know, the metadata files are marked as hidden and system files, and begin with a '.'. And I haven't tried this, but I think modifying the actual files under Windows has no negative effects, but moving, deleting, or copying files would likely be a no-no.
Also, I don't think there's a 'fsck' for posixovl, meaning that if any metadata files were screwed with the wrong way, the entire overlay FS would be trashed.
lbcoder said:
In any case, a prerequisite for use of it would be certain other changes being planned...
You might want to contribute to this thread:
http://forum.xda-developers.com/showthread.php?t=577941
(note: the thread links to a thread at android-platform, the one here has, as expected, gone off on a tangent... just ignore the junk.)
Click to expand...
Click to collapse
I checked that out. It was actually a small inspiration for what I was thinking of.
In any case, Android's package management system needs an overhaul. The package storage needs to be de-Linuxified, as all it is is a bunch of .apk files and .dex/.odex files, the UIDs of apps are in the AndroidManifest.xml, right?
In a somewhat unrelated note, app data needs to be moved to a specified folder structure on the sdcard. My card is full of folders in the root directory with random names.
If I'm understanding you correctly, you're talking about storing an image file on the normal SD card partition(which has to be FAT32 as far as I've seen) and then mounting it, correct? This idea has been talked about at length before on at least 3 separate occasions(2 of which were on this very forum) and found to be a bad idea due primarily to massive security risks since FAT32 has no permissions.
Also, I believe cyanogen ended up dumping unionfs/aufs due to rampant memory issues.
If you are talking about mounting an image from the FAT32 partition, please don't endorse this. We don't want to be throwing in security bugs into android, especially ones such as this which can't be plugged up.
As a modification to what I said: If you're suggesting doing this(or something similar) on a separate filesystem, after that project to change the AOSP to support one with permissions is finished, then I'm in full support.
If you want to go for a single partition on the sd card, why don't you just make the entire card use ext4? Your linux desktop reads it anyway, it uses journaling and so on, I guess it would be faster compared to fat32 and it is definitely safer to use.
And i guess it is not too complicated to mount this partition and use it for pictures, music and so on.
I have not tried this (yet) and I go to bed in 20 minutes, but maybe I will start testing something in that direction tomorrow.
[email protected] said:
If I'm understanding you correctly, you're talking about storing an image file on the normal SD card partition(which has to be FAT32 as far as I've seen) and then mounting it, correct? This idea has been talked about at length before on at least 3 separate occasions(2 of which were on this very forum) and found to be a bad idea due primarily to massive security risks since FAT32 has no permissions.
Also, I believe cyanogen ended up dumping unionfs/aufs due to rampant memory issues.
If you are talking about mounting an image from the FAT32 partition, please don't endorse this. We don't want to be throwing in security bugs into android, especially ones such as this which can't be plugged up.
As a modification to what I said: If you're suggesting doing this(or something similar) on a separate filesystem, after that project to change the AOSP to support one with permissions is finished, then I'm in full support.
Click to expand...
Click to collapse
UNIX permissions don't do anything in the way of "security" unless you have no access to the actual storage device from another computer (as is the case with the unrooted Dream's internal memory), or unless encryption is used. The posixovl driver OVERLAYS Unix permissions over Fat32 filesystems. But even still, with Unix permissions, nothing's stopping someone else from mounting the Ext2 partition and using chown and chmod.
And the image file on the SD card's Fat32 partition is a complete Ext2 partition complete with Permissions. Nothing is lost.
Archont said:
If you want to go for a single partition on the sd card, why don't you just make the entire card use ext4? Your linux desktop reads it anyway, it uses journaling and so on, I guess it would be faster compared to fat32 and it is definitely safer to use.
And i guess it is not too complicated to mount this partition and use it for pictures, music and so on.
I have not tried this (yet) and I go to bed in 20 minutes, but maybe I will start testing something in that direction tomorrow.
Click to expand...
Click to collapse
We'd just have to find the part in the Android that mounts /sdcard/, and change 'vfat' to 'ext2'. The only reason I wouldn't do this, is because it would immediately make it incompatible with Windows and Mac's default FS drivers. As far as I know, the only FS's that are supported universally within Linux, Mac, and Windows, are FAT and NTFS. And NTFS can be made to have crude support for permissions through security descriptors. Although, the Dream SPL, the Recovery images, and most of Android only uses FAT32.
This is discussed in android-platform Group :
http://groups.google.com/group/andr...read/thread/bf0709c157451cd9/f6aee1830c84620f
The goal is to be able to integrate this in android.
And not having to partition the SDCard is one of the requirements so far...
Unix permissions are not stored using fat or vfat, and ntfs is not really supported in desktop linux and i guess it cannot be used in android linux.
I would not use windows anyway so this is no problem to me, and there are drivers around to mount ext systems in windows. As Mac OS is based on unix there will be a solution for this too.
Access usind adb push and pull, via ftp and so on is not touched by using ext4 on the entire sd card I guess.
And if you don't go the easy way using gparted on a live cd or usb device to create 2 partitions, you will have to live with some disadvantages anyway.
Finally I want to say that my ideas are far from being perfect or usable at all, I see this thread as a kind of brainstorming.
im not as linux or android savvy as probably any of you but before the current method of creating a swap partition became the "standard", people used a swap file on the sdcard and linked that. seems similar to what you are suggesting here.
ofcourse when mounting the fat partition elsewhere (ums in windows for example) that swap file could no longer be used within android. i dont see a way to get passed the same issue, but worse here, due to android not having crucial apps when the fat partition is mounted.
then again, i am pretty much over my head in this conversation and could be over looking something...
I'm kind of fascinated by the FUSE + posixovl method of doing this. In the long run I have a feeling that it's going to perform like ****, but I think it's worth testing.
I managed to get both libfuse and mount.posixovl built and running on Android.
posix-overlay(/sdcard/fuse) on /sdcard/fuse type fuse.posixovl (rw,nosuid,user_id=0,group_id=0,default_permissions)
Giving this a little testing now, it definitely works.
Code:
/sdcard/fuse # ls -l
drwxr-xr-x 2 1000 1000 4096 Nov 5 17:17 test
TylTru said:
UNIX permissions don't do anything in the way of "security" unless you have no access to the actual storage device from another computer (as is the case with the unrooted Dream's internal memory), or unless encryption is used. The posixovl driver OVERLAYS Unix permissions over Fat32 filesystems. But even still, with Unix permissions, nothing's stopping someone else from mounting the Ext2 partition and using chown and chmod.
And the image file on the SD card's Fat32 partition is a complete Ext2 partition complete with Permissions. Nothing is lost.
We'd just have to find the part in the Android that mounts /sdcard/, and change 'vfat' to 'ext2'. The only reason I wouldn't do this, is because it would immediately make it incompatible with Windows and Mac's default FS drivers. As far as I know, the only FS's that are supported universally within Linux, Mac, and Windows, are FAT and NTFS. And NTFS can be made to have crude support for permissions through security descriptors. Although, the Dream SPL, the Recovery images, and most of Android only uses FAT32.
Click to expand...
Click to collapse
Ya, I meant more from the standpoint of a rogue app. Since FAT32 has no permissions, what would prevent such an app from modifying the stored image file to, say, change a trusted app with superuser permissions to some new code of its own making to, for example, watch for credit card numbers and send them back to the person who made the original rogue app? I'm always hesitant with any ideas that suggest storing an image file on the sdcard for appstosd for this reason.
Forget it, it's useless.
An overlay filesystem prevents you from enabling USB storage.
If you want to play around with FUSE on Android, here's a repository for my port of libfuse..
http://github.com/cyanogen/android_external_fuse
Hi,
I have an idea. I used symbian S60 of Nokia, Symbian can install app to sdcard. I see that when I mount sdcard to PC, my phone immediately hold all activations of all applications on my phone. And they have a PC sync software that help us access sdcard but not mount sdcard (like that we copy file from computer to sdcard via debug mode on android).
I think we should find out how symbian can do it and we will use their way .
I'm not a developer, I'm just an user.
I talked to a few people about this, and some deep kernel voodoo is going to be needed for this to really happen without partitioning.
Another idea is to forge ahead with this, and ditch the "unmount fs for usb storage" and use RNDIS + Samba or something like that instead to access files on SD. I kind of like this idea.

[MOD]Swap external-internal SD Gingerbread Version

i've ported file vold.fstab that was intended for Froyo version.
Tough the gingerbread version is a little bit different.
Before using this modified vold.fstab, i use the file for froyo, and i was unable to connect using usb storage mode at gingerbread. But now using this modified file, i'm able to connect using usb storage mode, flawlessly.
Here's the code:
Code:
## Vold 2.0 Generic fstab
## - San Mehat ([email protected])
##
#######################
## 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
######################
# internal sdcard
{
ums_path = /sys/devices/platform/usb_mass_storage/lun0/file
asec = enable
mbr_policy = overwrite
}
dev_mount sdcard1 /mnt/sdcard/external_sd 1 /devices/platform/mmci-omap-hs.1/mmc_host/mmc0
# externel sdcard
{
ums_path = /sys/devices/platform/usb_mass_storage/lun1/file
asec = disable
discard = enable
mbr_policy = skip
}
dev_mount sdcard /mnt/sdcard 1 /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
#end line ## keep this line
And here's the file
View attachment vold.rar
http://www.4shared.com/file/ofMosTOk/vold.html?
Click to expand...
Click to collapse
Remember that i'm not responsible for everything caused by this file.
And if you like it, just press thanks.
Dude where is the file???
Sent from my GT-I9003 using XDA App
try that, my mistake
Good job but not the best idea as of now. Chances are your going to be reflashing in a few weeks or less anyways. Dev version is still glitchy so careful
thanks man nice work,here the attachment
Nice work man
Sent from my Galaxy SL using XDA Premium App
Nice work buddy.
Sent from my GT-I9003 using XDA App
thks man,been waiting for this
Misledz said:
Good job but not the best idea as of now. Chances are your going to be reflashing in a few weeks or less anyways. Dev version is still glitchy so careful
Click to expand...
Click to collapse
I enjoy using XXKP9 for everyday use, because it works flawlessly for me. No panic kernel, no SOD, both camera work well, even when i use touchwiz4 it's no problem at all. I think it's worth to be used while we are waiting for the final release.
bala242 said:
thanks man nice work,here the attachment
Click to expand...
Click to collapse
thank's for the help
There's word going around that there's another release in a weeks time. I'm eager to see the changes and what they cropped +.+. Nevertheless will be trying this going to reflash anyways
Sent from my GT-I9003 using Tapatalk
Misledz said:
There's word going around that there's another release in a weeks time. I'm eager to see the changes and what they cropped +.+. Nevertheless will be trying this going to reflash anyways
Sent from my GT-I9003 using Tapatalk
Click to expand...
Click to collapse
well, this will be useful too if GB released offically
So, you will not have usb issue after placing this file? in GB version?
lazyelf88 said:
So, you will not have usb issue after placing this file? in GB version?
Click to expand...
Click to collapse
yes, it won't be any issue
is it works other galaxy series pohones? for exmp. gio, ace?
tam35 said:
is it works other galaxy series pohones? for exmp. gio, ace?
Click to expand...
Click to collapse
Is galaxy ace has internal sd?i don't think so. Then it can't work
nurseto said:
i've ported file vold.fstab that was intended for Froyo version.
Tough the gingerbread version is a little bit different.
Before using this modified vold.fstab, i use the file for froyo, and i was unable to connect using usb storage mode at gingerbread. But now using this modified file, i'm able to connect using usb storage mode, flawlessly.
Here's the code:
Code:
## Vold 2.0 Generic fstab
## - San Mehat ([email protected])
##
#######################
## 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
######################
# internal sdcard
{
ums_path = /sys/devices/platform/usb_mass_storage/lun0/file
asec = enable
mbr_policy = overwrite
}
dev_mount sdcard1 /mnt/sdcard/external_sd 1 /devices/platform/mmci-omap-hs.1/mmc_host/mmc0
# externel sdcard
{
ums_path = /sys/devices/platform/usb_mass_storage/lun1/file
asec = disable
discard = enable
mbr_policy = skip
}
dev_mount sdcard /mnt/sdcard 1 /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
#end line ## keep this line
And here's the file
View attachment 643784
Remember that i'm not responsible for everything caused by this file.
And if you like it, just press thanks.
Click to expand...
Click to collapse
Hi There, just copy & paste to GB I9003 will do? any special command/step require?
Thanks.
Can anyone provide the original version of vold.fstab?
I forgot to make a buckup
P.S. I'm using XXKPE and SD can't be detected even i've formatted the SD card as FAT32 in card reader.
By the way, I finally made it with the version below from a chinese forum
Sadly, there are USB issues.
Finally I made it with your attachment! But what confused me is that I can only successfully apply the new vold.fstab by the "adb push" command, anytime i replace it by root explorer it doesn't work.
Anyway, thank you very much
calvinljh said:
Hi There, just copy & paste to GB I9003 will do? any special command/step require?
Thanks.
Click to expand...
Click to collapse
Yes, there's no other step required. That's assuming your phone is already rooted.

[script] 98swapon by -FuFu-

Hi there,
here now the official thread for my 98swapon script...
Latest Version: V11
Download: http://droid-world.bplaced.net/index.php?cat=Downloads&page=Scripte
there you will always find the latest version
Infos about the Script you can find here: http://droid-world.bplaced.net/index.php?cat=Milestone&page=Swap Aktivieren
but its German
here a translation using google translate (so please excuse the bad english, but i think my english is not much better then google translate)
Simply download the latest zip and copy to /sdcard/Open Recovery/updates and then run in the Open Recovery by apply update.
Best done previously a Nandroid backup of your current system, which you can import in case of problems again.
UPDATE
As of Version 9, there is on the SD card, the file swapon.conf with which you can adjust the different variables of the script, so it's no longer necessary to directly edit the script.
SWAPSIZE is the amount of swap in MB
If you put SWAPINT to 1, the internal memory is used for swap.
Swapdev determines which internal partition to use, possible / are cache and / data, all other partitions were too small to use it for swap.
RESETSWAP at 1 and at every reboot the swapfile is created, what is nützlch when changing SWAPSIZE.
SWAPIONLY set to 1 and it will only set the value for swappiness with boats, the rest are ignored.
For the rest of the values ​​consulted with Google, I can not say at all what may.
To edit the swapon.conf please use Notepad + + or it may cause problems.
Click to expand...
Click to collapse
i only test the script on cm7 and there it works fine...
if you have problems or find some issues, please let me know...
please post your swapon.log from /cache if you have a problem, and also your swapon.conf from sdcard.
changelog
V11
- add dos2unix to script, so that is now also possible to edit the swapon.conf with windows editor
V10
- add disable funktion to the script
- script now work on cm7 and cm10
Works perfectly on CM10.
Erovia said:
Works perfectly on CM10.
Click to expand...
Click to collapse
Did you try internal memory settings? It doesn't work for me on CM10.
main problem is, that the swapon.conf will not be found on boot...
so i need the mount points on bootup to see if the sdcard will be mount and for that i have line 19 in the script only thing to do is to delete the "##" to activate the line...
you also can edit the line directly in the zip befor apply it via OR apply update...
but if there still "/sdcard/swapon.conf not found..." in /cache/swapon.log there is something wrong...
may sdcard will not be mount on boot
or
there is no swapon.conf an sdcard
koodiifin said:
Did you try internal memory settings? It doesn't work for me on CM10.
Click to expand...
Click to collapse
Nope. I have serious concerns about using the internal memory as swap.
@Erovia
did you also have "/sdcard/swapon.conf not found..." in /cache/swapon.log?
if so i think its a mounting issues on cm10
I think you misunderstood me.
I have concerns about the idea of swapping on the internal memory, not problems with the script itself.
i understand you
i only want to know if the script found the swapon.conf on sdcard
Oh, in that case I misunderstood you.
You are right. It seems the config file is not found on CM10.
(Maybe if you use /mnt/sdcard/swapon.conf ? I know it is basically the same, I just dont have any other idea. Or maybe CM10 mounts the sdcard after the script runs? )
i add a mount command to the script, for cm7 it works fine but i think on cm10 it wont work...
but i dont kwno why...
for me it will be a help if you also delete the "##" on line 19 in the 98swapon script, the in the swapon.log all mountpoints will be shown....
on line 18 the script will try to mount the sdcard, but maybe on cm10 the mountpoint is different to cm7
i think i must flash cm10 this weekend to test it
I guess I found the source of problem.
It seems that sdcard is not being mounted. (although sd-ext is mounted)
on cm7 also the sdcard is not mountet on boot, first i try to mount with "mount /sdcard" but it wont work so i try "mount -t vfat -o rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,shortname=mixed,utf8 /dev/block/vold/179:1 /sdcard" and that works on cm7, after that the sdcard is mount on /mnt/sdcard and /sdcard
but i think that not work for cm10, but dont know way, maybe the sdcard will be mount but not on /sdcard.
for that i have add line 19 to the script to check that (for debugging its helpfull, but for release i comment out that line) so i have all mountpoint in the swapon.log to see what is mountet and where...
so i think i must flash cm10 to test it here to see where is the problem and its the fastes way for me
as i know the sdcard will not be mount on boot on no rom, cause there is no need to, the sdcard will be mount from android when the system is load
Wish I could help more, but I'm not really an expert in this kind of stuff.
An easy "workaround" would be if the config file was placed on the sd-ext as it is mounted properly. I know then it would be not as easy to edit it (for windows users) but it should work.
if i find no other way, i will add a option to use also /data and /sd-ext for the config file
at the moment i flash cm10 on my second device for testing
maybe its just a mountpoint issues
I think I found a solution.
I edited row #17 to this:
mount -t vfat /dev/block/vold/179:1 /sdcard >>$SWAPLOG
Basically I just deleted the parameters.
The log shows no error and /mnt/sdcard is mounted properly.
I ran some test and it doesn't work.
im testing
now i have 4 mount commands in the script an one of them work ^^ now i must find the one that work
i think i found the right command
maybe you can test it and confirme?
use
Code:
mount -t vfat /dev/block/mmcblk0p1 /sdcard
here it works, i reboot now 10 times and on every boot it mounts sdcard
if you confirm, i will update the script so that all can be test it ^^
now i just must test if it also works for cm7
Confirmed.
Works fine. :good:
Great job, again.
okay so now the latest version ist V10 ^^
i edit the first post and also uploaded the new script to my homepage
http://droid-world.bplaced.net/load.php?file=download/scripts/98swaponV10or.zip
it also works on cm7
now i have 1 device on cm7 and one on cm10 and btw, cm10 with 32mb swap on cache and sslauncher may works smooth so i stay on cm10 and test some days
Hey fufu I'm trying to enable internal memory swap with your new script. But now I'm getting a new error in the log.
Here's my config:
## 98swapon config file
##
## set to 1 to disable swap on boot
DISABLE=0
## set swapfile size in MB
## default setting is 32 for 32mb
SWAPSIZE=32
## set to 1 to use intern memory for swap
SWAPINT=1
## settings for use swap on intern memory
## use /cache or /data for swap
SWAPDEV=/cache
## recreate swapfile on every boot
## set to 1 to recreate swapfile on every boot, may be helpfull if you change SWAPSIZE
RESETSWAP=0
## set to 1 to set only swappiness value all other values will be ignored
SWAPIONLY=0
## vm settings
## swappiness
SWAPPINESS=15
## dirty radio
DRADIO=80
## dirty backgriound radio
DBRADIO=30
## vfs cache pressure
VFSCP=10
## dirty expire centisecs
DEC=1000
## dirty writeback centisecs
DWC=1000
## laptop mode value 0 or 1
LAPTOPM=0
## oom kill allocating task value 0 or 1
OOMKAT=1
## panic on oom value 0 or 1
POOOM=0
Here's the log:
please set DISABLE in swapon.conf to 0 or 1
swap disabled in case of wrong DISABLE value
Sent from my Milestone using xda app-developers app

[Q] iRola DX752 Internal SD SWAP External SD [HELP]

Okay, so this might get a bit lengthy, and i will post my exact vold.fstab file a little later (currently cannot because i am at work), first of all yes my system is rooted (first thing i did when i bought it.) id like to use the vold.fstab edit method if possible as i can control the entire outcome and it is not left up to a piece of software that can become currupted.
So the issue is i swap the sdcard & external_sd of the following: (note this was copied offline, not my exact but is damn near close, mine has those three, only thing im unsure if it is correct is the rk29part.)
dev_mount flash /mnt/sdcard auto /devices/virtual/mtd/mtd9/mtdblock9
dev_mount sdcard /mnt/external_sd auto /devices/platform/rk29_sdmmc.0/mmc_host/mmc0
dev_mount udisk /mnt/usb_storage auto /devices/platform/usb20_host/usb /devices/platform/usb20_otg/usb
so it looks like:
dev_mount flash /mnt/external_sd auto /devices/virtual/mtd/mtd9/mtdblock9
dev_mount sdcard /mnt/sdcard auto /devices/platform/rk29_sdmmc.0/mmc_host/mmc0
dev_mount udisk /mnt/usb_storage auto /devices/platform/usb20_host/usb /devices/platform/usb20_otg/usb
and i reboot, and i CAN download apps to my external SD BUUUUUT the real issue is, after i install the apps and then reboot, none of the apps i installed are showing up. and i have done this mutiple times, normally i am not one to ask for help, but i have scoured the net and it seems noone is having a similiar issue, so i joined these forums for this specific question....please help?
Shinytish said:
Okay, so this might get a bit lengthy, and i will post my exact vold.fstab file a little later (currently cannot because i am at work), first of all yes my system is rooted (first thing i did when i bought it.) id like to use the vold.fstab edit method if possible as i can control the entire outcome and it is not left up to a piece of software that can become currupted.
So the issue is i swap the sdcard & external_sd of the following: (note this was copied offline, not my exact but is damn near close, mine has those three, only thing im unsure if it is correct is the rk29part.)
dev_mount flash /mnt/sdcard auto /devices/virtual/mtd/mtd9/mtdblock9
dev_mount sdcard /mnt/external_sd auto /devices/platform/rk29_sdmmc.0/mmc_host/mmc0
dev_mount udisk /mnt/usb_storage auto /devices/platform/usb20_host/usb /devices/platform/usb20_otg/usb
so it looks like:
dev_mount flash /mnt/external_sd auto /devices/virtual/mtd/mtd9/mtdblock9
dev_mount sdcard /mnt/sdcard auto /devices/platform/rk29_sdmmc.0/mmc_host/mmc0
dev_mount udisk /mnt/usb_storage auto /devices/platform/usb20_host/usb /devices/platform/usb20_otg/usb
and i reboot, and i CAN download apps to my external SD BUUUUUT the real issue is, after i install the apps and then reboot, none of the apps i installed are showing up. and i have done this mutiple times, normally i am not one to ask for help, but i have scoured the net and it seems noone is having a similiar issue, so i joined these forums for this specific question....please help?
Click to expand...
Click to collapse
I just bought mine....how did you root yours? I've looked all over the net...nothing.
Yes please tell how you rooted it. Secondly does the stock kernel support apps2sd?
Easy Root
So this ones easy, after some research I found out that the iRola was previously known as the Kocasco m752 which is built the same as the m760 so I just followed this guide here.
W w w (.) androidtablets.net/forum/attachments/ice-cream-sandwich/8946d1352809516-rooting-kocaso-m760-how-root-kocaso-760 (.) pdf
Shinytish said:
So this ones easy, after some research I found out that the iRola was previously known as the Kocasco m752 which is built the same as the m760 so I just followed this guide here.
W w w (.) androidtablets.net/forum/attachments/ice-cream-sandwich/8946d1352809516-rooting-kocaso-m760-how-root-kocaso-760 (.) pdf
Click to expand...
Click to collapse
has rooting it made any difference?
gmfirebird said:
has rooting it made any difference?
Click to expand...
Click to collapse
for me yes, running AnTuTu benchmark stock for me ran around 5100 from what i remember (i'll know more when my replacement shows up, first one broke 6 days after getting it), after removing a lot of bloatware from it and running it again it gave a 7166.
mind you that it has 4GB share internal, part for the O.S., part for the image recovery file, part for user space, and part for the system recovery.
the more apps you have on it, the slower this thing will be. it only has a single core 1.2GHz Rockchip rk2926

[Completed] Swapping mount points

I have a cheapo DragonTouch Y88X. I'm not looking for a custom ROM or anything - its for the kids and honestly it does everything they need, with one exception: Disney Movies Anywhere can't download videos to the external SD card.
As near as I can tell, this is an application problem - hardwired looking for /mnt/sdcard instead of using the Google API to find where the SD card is mounted, and DragonTouch was brain dead an mounted part of the internal storage to /mnt/sdcard (the actual SD card gets mounted to /mnt/extsd).
OK, so I'm not going to get Disney to change the app, so I started poking around how to change the mount points. I'm reasonably familiar with linux, sys admin duties and the like. But the format and options on the fstab file are a bit unfamiliar to me... All I really want to do is make the external SD card be mounted at /mnt/sdcard (and maybe mount the internal partition to something useful - maybe app cache space or something?)
I managed to get root and installed ES File Explorer, and the fstab file (/fstab.sun8i to be specific) has the following lines that I think are relevant...:
...
/devices/virtual/block/nandk auto vfat defaults wait,check,noemulatedsd,voldmanaged=sdcard:auto
/devices/platform/sunxi-mmc.2/mmc_host auto vfat defaults wait,check,noemulatedsd,voldmanagedsd=sdcard:auto
/devices/platform/sunxi-mmc.0/mmc_host /mnt/extsd vfat rw,realtime,fmask=0000,dmask=0000,wait,check,voldmanaged=extsd:auto
/devices/platform/sunxi-mmc.1/mmc_host /mnt/extsd vfat rw,realtime,fmask=0000,dmask=0000,wait,check,voldmanaged=extsd:auto
...
I don't know quite enough about either fstab or Android/DragonTouch's variant of it to know why both sdcard and extsd have two entries each... Or exactly how to swap them. I could try to change the voldmanaged=[name] entry on each - would that be safe?
Is what I'm trying to do crazy, or should this work?
Thanks
Hello,
Welcome to XDA.
Most android devices have a setting to set download location to extsdcard, also, there is usually a setting in most apps that can be used to choose the location the app data downloads to. Since you are rooted then you may be able to create a script that directs your download to where you want but I'm not as knowledgeable about scripts as others here are.
Try posting your question in the forum linked below.
http://forum.xda-developers.com/android/help
The experts there may be able to help.
Remember to register an XDA account so you can post and reply in the forums. Good luck.

Categories

Resources