yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] nscxp2005:
Hi dk_zero-cool,

I seem to be getting issues now with the Play Store force closing.

I have Apps, Data and Dalvik on the ext partition.

Any ideas why it is doing this?

Also, one other thing. When I try to restore apps with data using TB it just sits there saying it's 'Restoring App+Data' and does nothing else.

Please can help me get it to restore the App & Data.
[Android Software/Hacking General [Developers Only]] totalcmdext:
Settings Question

I would like your support to the following issue:

1. R-Mount is enabled (so /data moved to /sd-ext)

2. Dalvik Cache is enabled (from /data/dalvik-cache into /sd-ext/dalvik-cache)

3. Apps is disabled (/data/app)

4. Safe Mode is disabled

So, based on the logic of R-Mount the Dalvik Cache will be available on /data/dalvik-cache and Apps in /sd-ext/app.

I have checked the sd-ext i found the following:

/sd-ext/dalvik-cache

/data/app

Is this logic?

I want to move all the /data to sd-ext and only dalvik-cache locate in the /data

Thanks
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
For the sake of making this comment easier, let's call the partitions internal and external to avoid confusing them with the mount points.

When you enable r-mount and dalvik while keeping apps and data disabled, you will move dalvik to internal and keep the rest external. However, do remember that Android does not know about /sd-ext, so in order for Android to locate it's content (In this case dalvik-cache) an empty dalvik-cache folder is created on the external (/data) which then get's linked to the internal (/sd-ext).

Now I don't know if your example above is device or mount point related, but if you are talking about mount points, then /sd-ext/dalvik-cache and /data/app would be correct with your current configurations.
[Android Software/Hacking General [Developers Only]] totalcmdext:
I am talking about my device.

This mean that it isn't possible to find where is stored the dalvik,apps and data in the device?

If it is possible please tell me to check it

Thanks
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
You can run "m2sd log". Read it and see if the setup was handled correctly. Also it contains a df output so you can see which folder has been linked, which dalvIk should be
[Android Software/Hacking General [Developers Only]] nscxp2005:
Hi dk_zero-cool,

Here is the log that M2SD outputs.

http://db.tt/PIuRmuhg

I hope you can help me with the problems I am getting.

Also I can not restore TB backed up app. I have tried just restoring the apps on there own and it just sits there saying it us restoring.

I hope you can suggest a solution.

Thank you for your time.

All the best,

NSCXP2005
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Something is executing your scripts twice. What ROM are you using? Because there seams to be a problem with your init.d system
[Android Software/Hacking General [Developers Only]] nscxp2005:
I'm using TrueAncestor 1.5b with the Enhanced 58 firmware as base.

In the TrueAncestor thread is says flash the Enhanced 58 firmware first and then flash the ROM and then the Hot fix.

Can you take a look at the Hot fix to see if that is causing any issues as that is related to the init.d

Thank you for your time.

All the best,

NSCXP2005
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Links to it all please :)
[Android Software/Hacking General [Developers Only]] nscxp2005:
Here are the links to the ROM and and Hot fix

TrueAncestor 1.5b

http://www.mediafire.com/?53rxfhjdpjj446q

Hot fix for TrueAncestor

http://db.tt/74tPcJLc

I hope you can figure out what is going on.

Thanks

NSCXP2005
[Android Software/Hacking General [Developers Only]] tuxpeppe:
Hi, I've installed the script in the firs page, but I don't understand how to use it! All the new and old application are always in the internal memory and not in sd-ext memory (I've created a fat32 and ext-2 partition). and at last I can't move application, in "application manager", because the button "move to sd" is not enabled. :(
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
The sd-ext partition is controlled by a script, not an application. It is in no way integrated into android, so you cannot use any build-in android settings to control it. Android will always think that your apps are in the internal memory, otherwise it would not be able to find them. Like it sais in the first page, use the terminal to control it using the "m2sd" command.
[Android Software/Hacking General [Developers Only]] Ultrazauberer:
Thanks for this cool script. It solves the memory problems with my desire.

I'm running CM 7.2.0.1 with your script. You wrote that the ROM must support init.d for a correct implementation. I think CM 7.2 has it, but which files I have to edit and what entries have to be done? Currently it's running in safemode! Thanks for any advice.
[Android Software/Hacking General [Developers Only]] hgmichna:
I have a very simple question: Why do you use an ext partition? Why not simply folders on the SD card? Would that also be possible?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
First of all, the sdcard is unmounted when enabling UMS which would not be good if dalvik and data is on there, and the moved apps would also not be available until it is remounted.

Second, apps, dalvik and data requires specific permissions, and Fat32 does not support the linux permission schema.
[Android Software/Hacking General [Developers Only]] hgmichna:
Thanks for the explanation!

I have the feeling that these problems could be overcome. The moved apps don't have to be available before the SD card is mounted, perhaps with a few exceptions that could be kept internal. And the permissions may not really be important.

I understand though that a solution without the ext partition may require additional modifications.
[Android Software/Hacking General [Developers Only]] teeedubb:
Hi dk_zero-cool, thanks for all your work in the android community.

Im trying to get /data on to a EXT4 sd-ext but my phone is in safemode. Im using CM7 nightlies (20120701) on a HTC Desire GSM.

cat /system/etc/init.local.rc

(Ive also tried renaming the file to init.rc)

# CyanogenMod Extras

# Compcache - handle at boot
service compcache /system/bin/handle_compcache
user root
group root
oneshot

exec /system/bin/sysinit

cat /system/bin/sysinit

#!/system/bin/sh

export PATH=/sbin:/system/sbin:/system/bin:/system/xbin
/system/bin/logwrapper /system/xbin/run-parts /system/etc/init.d

Both files have execute permissions.

m2sd log

v/Initiating Mounts2SD (v:4.6.0) [Sun Jul 8 20:12:48 EST 2012]
v/Checking configurations...
w/SYSINIT MISSING: This script works best using sysinit as an executable rather than an service! Switching to safe mode...
v/Optimizing /system readahead...
v/Disabling /system atime & diratime...
v/Optimizing /data readahead...
v/Disabling /data atime & diratime...
v/Waiting for sdcard to initiate...
v/sdcard found at /dev/block/mmcblk0...
v/Setting sdcard readahead to 2048kb...
v/Running e2fsck on sd-ext...
v/Disabling sd-ext atime & diratime...
v/The sd-ext partition was mounted successfully at /sd-ext forced as ext4!
v/Creating link between /data/app and /sd-ext/app...
v/Creating link between /data/app-private and /sd-ext/app-private...
v/Creating link between /data/app-system and /sd-ext/app-system...
v/Mounting /cache/download at /sd-ext/cache...
v/Mounts2SD has been loaded!

Registered properties:
----------------------
[mounts2sd.cache.location]: [/sd-ext/cache]
[mounts2sd.cache.path]: [/cache/download]
[mounts2sd.cache.status]: [loaded]
[mounts2sd.sdext.device]: [/dev/block/mmcblk0p2]
[mounts2sd.sdext.status.apps]: [loaded]

Mount Points:
-------------
Filesystem Size Used Available Use% Mounted on
tmpfs 202.8M 32.0K 202.7M 0% /dev
tmpfs 202.8M 0 202.8M 0% /mnt/asec
tmpfs 202.8M 0 202.8M 0% /mnt/obb
/dev/block/mtdblock3 145.0M 131.4M 13.6M 91% /system
/dev/block/mtdblock5 287.6M 134.6M 153.0M 47% /data
/dev/block/mtdblock4 5.0M 796.0K 4.2M 16% /cache
/dev/block/mmcblk0p2 1007.9M 116.0M 891.8M 12% /sd-ext
/dev/block/mmcblk0p2 1007.9M 116.0M 891.8M 12% /data/app
/dev/block/mmcblk0p2 1007.9M 116.0M 891.8M 12% /data/app-private
/dev/block/mmcblk0p2 1007.9M 116.0M 891.8M 12% /data/app-system
/dev/block/mmcblk0p2 1007.9M 116.0M 891.8M 12% /cache/download

Im stumped as to why its not working... From what Ive read this should work with CM7 but I cant seem to find much info about CM7/sysinit/init.d...

Does anyone have any ideas as to why its not working?

Any help is greatly appreciated.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
First of all, do not add things to /system/etc/init.local.rc

CM7 should already have init.d support in /init.rc (CM9 does anyway), and if so it will make init.d run twice. If it's not in init.rc, then never mind.

Try running "m2sd safemode disable". I will have a look at the regexp checking for the init.d method, maybe there is a small bug in there. All CM ROM's should have proper init.d support, so it should work without disabling safe-mode.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
You cannot see the sd-ext from Android settings. You need a third party application that supports sd-ext in order to see it. However M2SD is working fine based on your log and df output. But do remember that it only moves the APK's using the 'apps' option. That means that dalvik-cache and apps data is still on the internal which also takes up space for each app installed.

And yes, when installing apps from market, it goes streight to the sd-ext as it is linket to data.
[Android Software/Hacking General [Developers Only]] teeedubb:
Thanks for the reply. Okay I undid all my changes and it looks like everything is as it should be with /init.rc

cat /init.rc |grep sysinit
# Run sysinit
exec /system/bin/sysinit

If theres any more info you need let me know.
[Android Software/Hacking General [Developers Only]] gshaw:
Thanks for the quick reply :)

Moved the cache, is data ok to run from SD? Saw some old threads somewhere saying you shouldn't move data to sd-ext so not sure if that still applies?
[Android Software/Hacking General [Developers Only]] rashid.fairus:
its just has issue when restoring data using titanium..
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
I have said this before, and I say it again. M2SD is not some advanced content control system that runs in the background controlling where different content should go. It is an automatic linking script, that during boot, links one folder to another folder. Once this task has completed, the script runs no more and the phone continues with it's regular boot.

If you have problems with TB using sd-ext, then take this up with the developer of TB. Course this issue is with the application and not this script. I use MyBackup and have no issues at all restoring, and why should I. The app should not be aware of sd-ext or take special action if present. It should just do a regular restore to the data partition, which because of the linked folders, will place the content to the correct locations.
[Android Software/Hacking General [Developers Only]] rashid.fairus:
chill,im not blaming your script,dont take me wrong,it is known issue for all a2sd script..:)
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
I was just explaining as some people seam to think that there is more to these scripts than actually true. I have even seen people blaiming ROM scripts for recovery issues :)
[Android Software/Hacking General [Developers Only]] rashid.fairus:
i have problem with my data connection(3g and hspa),i enable all feature in your script,any suggestions?
[Android Software/Hacking General [Developers Only]] Ultrazauberer:
Sorry for asking again: how is the proper way to activate m2sd for CM7.2.0.1? After installation it won't go out of the safemode. So I disabled safemode via terminal.
[Android Software/Hacking General [Developers Only]] guy_smiley:
I think peoples biggest problem with Titanium Backup is they don't set restore location to internal or are trying to restore too much so its running out of space, hence it hanging.
[Android Software/Hacking General [Developers Only]] totalcmdext:
Hello,

The m2sd log is the following:

v/Creating link between /data/m2sd and /sd-ext/m2sd...

v/The sd-ext partition was mounted successfully at /data using auto detection of the file system type!

v/Creating link between /data/dalvik-cache and /sd-ext/dalvik-cache...

v/Creating link between /data/property and /sd-ext/property...

v/Creating link between /data/misc and /sd-ext/misc...

v/Creating link between /data/system and /sd-ext/system...

v/Moving content from /data/m2sd to /sd-ext/m2sd...

v/Mounts2SD has been loaded!

Registered properties:

----------------------

[mounts2sd.rmount.status]: [loaded]

[mounts2sd.sdext.device]: [/dev/block/mmcblk0p2]

[mounts2sd.sdext.status.dalvik]: [loaded]

Mount Points:

-------------

Filesystem Size Used Available Use% Mounted on

tmpfs 201.7M 32.0K 201.7M 0% /dev

tmpfs 201.7M 0 201.7M 0% /mnt/asec

tmpfs 201.7M 0 201.7M 0% /mnt/obb

/dev/block/mtdblock3 195.0M 155.6M 39.4M 80% /system

/dev/block/mtdblock5 237.9M 106.2M 131.6M 45% /sd-ext

/dev/block/mtdblock4 2.0M 816.0K 1.2M 40% /mnt/cache

/dev/block/mmcblk0p2 1.9G 143.3M 1.6G 8% /data

/dev/block/mtdblock5 237.9M 106.2M 131.6M 45% /data/dalvik-cache

/dev/block/mtdblock5 237.9M 106.2M 131.6M 45% /data/property

/dev/block/mtdblock5 237.9M 106.2M 131.6M 45% /data/misc

/dev/block/mtdblock5 237.9M 106.2M 131.6M 45% /data/system

/dev/block/mtdblock5 237.9M 106.2M 131.6M 45% /data/m2sd

So, please could you clarify if the rmount is working as you descripted and davalink is locate in the internal memory and all other in the sd-ext memory?

Thanks
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
v/The sd-ext partition was mounted successfully at [B][U]/data[/U][/B] using auto detection of the file system type!

As you can see, it has been mounted at /data instead of /sd-ext, so this is correct.

v/Creating link between [B][U]/data/dalvik-cache[/U][/B] and [B][U]/sd-ext/dalvik-cache[/U][/B]

An dalvik-cache has been moved to /sd-ext/dalvik-cache which is where the internal partition is mounted when r-mount is enabled. So this is also correct.

/dev/block/mtdblock5 237.9M 106.2M 131.6M 45% /data/dalvik-cache

And this confirms that /data/dalvik-cache is a mount link to /dev/block/mtdblock5 which is the internal partition.

So yes, r-mount is working fine with only dalvik-cache (And some needed system folders) on the internal partition and the rest on the real sd-ext.
[Android Software/Hacking General [Developers Only]] Ultrazauberer:
Here is my output of m2sd log:

# m2sd log

v/Initiating Mounts2SD (v:4.6.0) [Sun Jul 8 22:27:14 CEST 2012]

v/Checking configurations...

v/Optimizing /system readahead...

v/Disabling /system atime & diratime...

v/Optimizing /data readahead...

v/Waiting for sdcard to initiate...

v/sdcard found at /dev/block/mmcblk0...

v/Setting sdcard readahead to 1024kb...

v/Running e2fsck on sd-ext...

e/Error detected while checking sd-ext. Auto correction was performed!

v/The sd-ext partition was mounted successfully at /sd-ext using auto detection of the file system type!

v/Moving content from /data/data to /sd-ext/data...

v/Creating link between /data/data and /sd-ext/data...

v/Creating link between /data/app and /sd-ext/app...

v/Creating link between /data/app-private and /sd-ext/app-private...

v/Creating link between /data/app-system and /sd-ext/app-system...

v/Mounts2SD has been loaded!

Registered properties:

----------------------

[mounts2sd.sdext.device]: [/dev/block/mmcblk0p2]

[mounts2sd.sdext.status.apps]: [loaded]

[mounts2sd.sdext.status.data]: [loaded]

Mount Points:

-------------

Filesystem Size Used Available Use% Mounted on

tmpfs 202.8M 32.0K 202.7M 0% /dev

tmpfs 202.8M 0 202.8M 0% /mnt/asec

tmpfs 202.8M 0 202.8M 0% /mnt/obb

/dev/block/mtdblock3 250.0M 134.0M 116.0M 54% /system

/dev/block/mtdblock5 147.6M 92.2M 55.4M 62% /data

/dev/block/mtdblock4 40.0M 2.0M 38.0M 5% /cache

/dev/block/mmcblk0p2 1007.9M 130.4M 826.3M 14% /sd-ext

/dev/block/mmcblk0p2 1007.9M 130.4M 826.3M 14% /data/data

/dev/block/mmcblk0p2 1007.9M 130.4M 826.3M 14% /data/app

/dev/block/mmcblk0p2 1007.9M 130.4M 826.3M 14% /data/app-private

/dev/block/mmcblk0p2 1007.9M 130.4M 826.3M 14% /data/app-system

#

I disabled safemode via terminal. Is m2sd working correctly or I'm running with this configuration into trouble?
[Android Software/Hacking General [Developers Only]] haris182:
After I flashed a ROM, should I boot into the ROM first then flash this script,

or flash this script without rebooting?

thanks
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
before rebooting
[Android Software/Hacking General [Developers Only]] has2:
Wow, so complex script, compare to ungaze data2sd or amarulzz data2sdx (ad2sdx)...

I have trying ad2sdx that just working for mounted /sdext, not /system/sd which is only applied in CM7.2.

Now I am using ungaze with custom rom SGSII v9 from rushabh for my Galaxy Ace.

You are real developers, sir ...

:good::good::good:
[Android Software/Hacking General [Developers Only]] maneken25:
Is there some terminal command to check if this script would run without safe mode on some rom?

I would like to check before installing, ty for answer in advance.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
grep exec /init.rc | grep sysinit

If you get any output, then your good to go
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Considering the attached m2sd.log, your phone is not running m2sd in safe-mode. It is working fine with both apps, dalvik-cache etc.
[Android Software/Hacking General [Developers Only]] guy_smiley:
OK, that definitely makes sense, for some reason in Aroma installer it's checked and I figured it might be because it wasn't quite right.

Cheers
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Enabled only means that it will switch to safe-mode if proper init.d execution was not detected, which it is on your ROM.
[Android Software/Hacking General [Developers Only]] purbaboy:
Sorry all for asking this question

Is this script worked on huawei ideos x5?

With CM7 installed?

Thanks in advamce for your kind help :D
[Android Software/Hacking General [Developers Only]] jolas:
Inside, there are several files e.g. .swap, .journal, etc.

.dalvik value is true but dalvik folder still exists in /data, same as cache folder.

Also, I had some apps crashing (e.g. JuiceDefender) and now I'm cleaning system to perform a recovery...

Is the ROM I'm using that makes these problems?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Of cause dalvik exists in /data otherwise Android would not be able to find it. But that is only a mount link. The real location is /sd-ext/dalvik-cache.

In the log there is a print of current mounts. Dalvik will be in there.

Also "m2sd status" will print which options are active and which are not.
[Android Software/Hacking General [Developers Only]] jolas:
But dalvik folder (inside /data) was full of files and in /sd-ext there was no dalvik folder.

Should I change the value of .dalvik file (inside .m2sd) to something else that 'enable' and try it again?

EDIT: Sorry, I forget that there is no option to disable the app2sd option. I only want to move the dalvik to ext4 and nothing else :rolleyes:
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Just tried on my phone, and it moved it just fine.

Try typing "m2sd log" and give me output.
[Android Software/Hacking General [Developers Only]] jolas:
Doing it right now...

EDIT: Nothing again...

This time I left only the file .dalvik (value enable), inside .m2sd folder...

Here is the log output...
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
The problem on your phone is that my script is not doing anything. You have another script that mounts sd-ext so my script just quits.

You need to remove any other App2SD scripts in your /system/etc/init.d/ folder.
[Android Software/Hacking General [Developers Only]] jolas:
I did remove every other app2sd script and flashed again your script, with no result. I checked inside .m2sd folder and found that the values of .dalvik was disable.

Changed it to enable and reboot, and dalvik was at sd-ext!!!!

Thanks a lot for your help :-)

Sent from my HD2
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Ok. Then I would write to the developer of the rom you are using, because in that case the init.d directory is executed twice which means that the rom has userinit in two places.
[Android Software/Hacking General [Developers Only]] jolas:
If you mean the /etc/init.d folder, yes it exist in root dir and also inside /system.

If I place all the values from .m2sd folder inside you're flashable script, is it going to work right after flashing it in a new ROM?

Sent from my HD2
[Android Software/Hacking General [Developers Only]] jolas:
dk_zero-cool,

Now that my dalvik cache has moved to ext4 partition, I'm going to continue my tests.

My swap partition is not been used (even if I set it to enable), so I am going to make a third ext partition: what do you suggest, since I already have an ext4?

If I undrestood correctly, is this third partition going to be the cache folder for my ROM, instead using Internal Memory?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
If you take a look at "m2sd log" you will properly see that swap is not supported by your kernel and therefore disabled. You need a kernel with swap support in order to use it.

And the script does not care how and where the swap partition is placed. It does not look for 2 or third partition for this. It checks every partition on your card until it finds a swap. But again, kernel with swap support.
[Android Software/Hacking General [Developers Only]] wapz:
Installed this on Pre-rooted Stock Gingerbread (3.14.405.1), and it worked perfectly. I had the apps2sd script enabled from this rom, so I had to remove that one, select the options with m2sd and it worked fine, just had to recover app data with titanium since it was already on sd-ext (it got lost, since I removed the script and rebooted).
[Android Software/Hacking General [Developers Only]] Dunc001:
Could you check your PM please? Need some help :(