SpazeDog / mounts2sd

Android SD-Ext Script+App
GNU General Public License v3.0
78 stars 27 forks source link

application data is not all being moved #11

Closed skippernl closed 11 years ago

skippernl commented 11 years ago

Output of busybox root@android:/ # busybox df -h busybox df -h Filesystem Size Used Available Use% Mounted on tmpfs 202.2M 48.0K 202.2M 0% /dev tmpfs 202.2M 0 202.2M 0% /mnt/secure tmpfs 202.2M 0 202.2M 0% /mnt/asec tmpfs 202.2M 0 202.2M 0% /mnt/obb /dev/block/mtdblock3 250.0M 244.4M 5.6M 98% /system /dev/block/mtdblock5 147.6M 9.5M 138.1M 6% /data /dev/block/mtdblock4 40.0M 1.1M 38.9M 3% /cache /dev/block/mmcblk0p2 1006.9M 474.7M 481.1M 50% /sd-ext /dev/block/mmcblk0p2 1006.9M 474.7M 481.1M 50% /data/app /dev/block/mmcblk0p2 1006.9M 474.7M 481.1M 50% /data/app-private /dev/block/mmcblk0p2 1006.9M 474.7M 481.1M 50% /data/app-system /dev/block/mmcblk0p2 1006.9M 474.7M 481.1M 50% /data/data /dev/block/mmcblk0p2 1006.9M 474.7M 481.1M 50% /data/dalvik-cache /dev/block/mmcblk0p2 1006.9M 474.7M 481.1M 50% /data/app-asec /dev/block/mmcblk0p2 1006.9M 474.7M 481.1M 50% /data/app-lib /dev/block/dm-0 14.0M 12.1M 1.9M 87% /mnt/asec/com.accuweathe r.paid.android-2 /dev/block/dm-1 2.0M 100.0K 1.9M 5% /mnt/asec/com.keramidas. TitaniumBackupPro-1 /dev/block/dm-2 21.0M 18.7M 2.3M 89% /mnt/asec/com.quoord.tap atalkHD-2 /dev/block/vold/179:1 13.8G 4.1G 9.8G 29% /storage/sdcard0 /dev/block/vold/179:1 13.8G 4.1G 9.8G 29% /mnt/secure/asec root@android:/ #

Log of moving data V/Setting up the script enviroment V/Using the shell environment '/data/local/busybox sh' V/Using the busybox binary located at '/data/local/busybox' V/Collecting MMC partition information V/The external MMC was located at '/dev/block/mmcblk0' V/Located the sd-ext partition at '/dev/block/mmcblk0p2' V/The internal MMC was located at '/dev/block/mtdblock0' V/Located the 'system' partition at '/dev/block/mtdblock3' V/Located the 'data' partition at '/dev/block/mtdblock5' V/Located the 'cache' partition at '/dev/block/mtdblock4' V/Optimizing MMC devices and partitions V/Setting readahead on '/dev/block/mtdblock0' to '128kb' V/Setting scheduler on '/dev/block/mtdblock0' to 'deadline' V/Setting readahead on '/dev/block/mmcblk0' to '128kb' V/Setting scheduler on '/dev/block/mmcblk0' to 'deadline' V/Setting optimized mount parameters on '/dev/block/mtdblock3' V/Setting optimized mount parameters on '/dev/block/mtdblock5' V/Setting optimized mount parameters on '/dev/block/mtdblock4' V/Running a file system check on '/dev/block/mmcblk0p2' D/The file system type on '/dev/block/mmcblk0p2' is not ext4. Disabling journal handling on this device V/Attaching '/dev/block/mmcblk0p2' to '/sd-ext' D/Mounting '/dev/block/mmcblk0p2' to '/sd-ext' as 'ext4' with options 'noatime,nodiratime,relatime,noauto_da_alloc,data=ordered,commit=15,barrier=1,nouser_xattr,errors=continue,nosuid,nodev' V/Checking writable state on '/dev/block/mmcblk0p2' V/Preparing to move content between '/data' and '/sd-ext' V/Checking '/data/app' to see if something should be moved to '/sd-ext/app' V/Attaching '/sd-ext/app' to '/data/app' V/Checking '/data/app-private' to see if something should be moved to '/sd-ext/app-private' V/Attaching '/sd-ext/app-private' to '/data/app-private' V/Checking '/data/app-system' to see if something should be moved to '/sd-ext/app-system' V/Attaching '/sd-ext/app-system' to '/data/app-system' V/Checking '/data/data' to see if something should be moved to '/sd-ext/data' D/Retouching the directory '/sd-ext/data' with permissions '0771' and ownership 'system.system' D/Comparing '/data/data' size of '90MB' to remaining spaze on '/sd-ext' of '550MB' V/Moving '/data/data' to '/sd-ext/data' V/Attaching '/sd-ext/data' to '/data/data' V/Checking '/data/dalvik-cache' to see if something should be moved to '/sd-ext/dalvik-cache' V/Attaching '/sd-ext/dalvik-cache' to '/data/dalvik-cache' V/Checking '/data/app-asec' to see if something should be moved to '/sd-ext/app-asec' V/Attaching '/sd-ext/app-asec' to '/data/app-asec' V/Checking '/data/app-lib' to see if something should be moved to '/sd-ext/app-lib' V/Attaching '/sd-ext/app-lib' to '/data/app-lib' D/Running an S-On protection test on '/system' V/Linking system content to the '/system' location D/Linking content from '/data/app-system' to '/system/app' V/Enabling 'ZRAM' on '/dev/block/zram0' V/Setting swappiness to '0' D/The finalizing sub-process has been started V/Storage threshold is already set for '1%'. Leaving it as is D/The finalizing sub-process has been stopped D/The script was executed in 94 seconds

No errors here screenshot_2013-09-01-14-42-46

Error is : One or more directories are not moved or linked

All seems to be working...

dbergloev commented 11 years ago

Some options moves more than one folder, like the apps option which moves /data/app, /data/app-asec etc. and unlike the dalvik option which only moves one folder /data/dalvik-cache.

The warning you get, is something I have been trying to locate but still have not gotten any useful info from people reporting it. The data option contains only one folder on some Android versions (/data/data) and two folders on Android 4.2+ (/data/data and /data/user). I think that the app complains about /data/user not being moved, but unless you are running Android 4.2 or 4.3, this folder should not exist. So could you check if this folder exists? Maybe from a prev. installation with a newer Android version.

The problem I think is that the script and app has two different ways of checking the support. I may need to implement the script way into the app. The app checks the init.rc files to see if the folders exists, while the app just checks the data partition. The init.rc files is more correct as only true supported folders will be added there, while /data could contain an old folder from a prev install.

skippernl commented 11 years ago

I have Android 4.2.2 installed /data/user does exist And there are files in /data/user/0

2013/9/2 Daniel Bergløv notifications@github.com

Some options moves more than one folder, like the apps option which moves /data/app, /data/app-asec etc. and unlike the dalvik option which only moves one folder /data/dalvik-cache.

The warning you get, is something I have been trying to locate but still have not gotten any useful info from people reporting it. The data option contains only one folder on some Android versions (/data/data) and two folders on Android 4.2+ (/data/data and /data/user). I think that the app complains about /data/user not being moved, but unless you are running Android 4.2 or 4.3, this folder should not exist. So could you check if this folder exists? Maybe from a prev. installation with a newer Android version.

The problem I think is that the script and app has two different ways of checking the support. I may need to implement the script way into the app. The app checks the init.rc files to see if the folders exists, while the app just checks the data partition. The init.rc files is more correct as only true supported folders will be added there, while /data could contain an old folder from a prev install.

— Reply to this email directly or view it on GitHubhttps://github.com/SpazeDog/mounts2sd/issues/11#issuecomment-23650339 .

dbergloev commented 11 years ago

Hmm. Could you check all of your init.rc files to look for the line mkdir /data/user? It would seam then, that the Application it correct. Not all folders has been moved as /data/user is still on /data

skippernl commented 11 years ago

Could not find the line. added a zip file with all init*.rc files

2013/9/2 Daniel Bergløv notifications@github.com

Hmm. Could you check all of your init.rc files to look for the line mkdir /data/user?

— Reply to this email directly or view it on GitHubhttps://github.com/SpazeDog/mounts2sd/issues/11#issuecomment-23658113 .

dbergloev commented 11 years ago

Cannot find any attachments on neither github or my mail? But it's strange that this folder is not defined. All folders used by the system should be defined in the rc files, /data/app, /data/app-asec, /data/data etc. But if that cannot be trusted, I will just have to make a double check, both in the RC files and check the partition itself for the existence if the folders. This will fix the issue.

skippernl commented 11 years ago

Uploaded the file to google https://docs.google.com/file/d/0B9_4sUYyhwaCM0N6WHNwekJVclE/edit?usp=sharing

2013/9/2 Daniel Bergløv notifications@github.com

Cannot find any attachments on neither github or my mail? But it's strange that this folder is not defined. All folders used by the system should be defined in the rc files, /data/app, /data/app-asec, /data/data etc. But if that cannot be trusted, I will just have to make a double check, both in the RC files and check the partition itself for the existence if the folders. This will fix the issue.

— Reply to this email directly or view it on GitHubhttps://github.com/SpazeDog/mounts2sd/issues/11#issuecomment-23659857 .

dbergloev commented 11 years ago

Thanks. I will have this fixed. I have never seen any Android ROM where data folders was NOT defined in the RC files, so I assumed that this would be a safe way of checking the ROM support. Apparently, this was wrong. There should be a new release to day with a few fixes, this included.

v173k commented 10 years ago

A year latter but maybe I can help add more information to have this fixed for a similar problem. Let me know if you prefer that I open another issue:

I am using Mount2SD(v3.48) on T-mobile Galaxy S2 (SGH-T989) with CM10.2. I am getting similar messages:

W/Not everything from '/data/data' could be moved to '/sd-ext/data'
W/Not everything from '/data/user' could be moved to '/sd-ext/user'

Some more information to help debug the problem:

  1. I looked at these directories by booting into recovery (i.e. before Mounts2SD mounts partitions): [x] /data/user as a file called '0' as already mentioned which is just a symlink to /data/data [x] /data/data seems to be populated with data for system apps
  2. If the directories above are emptied (I backed up first though the data seemed mostly redundant only 980 bytes of files in total and mostly empty directories) Mounts2SD again still gives the same error in the log.
  3. Something seems to be generating the data in the above directories before the Mounts2SD script launches because I seem to have the two directories repopulated again. Its almost as though CM10.2 thinks that it has just been freshly installed and thinks that it needs to populate the data directory for first time boot.
  4. Ofcourse the Warning don't affect normal working of the phone as the mount still completes and Only I want this to be fixed for completeness.
  5. Additional observation. not sure if related: Once booted /sd-ext/data has the symlink '0' !? Even if I delete it, it get regenerated on next boot. Note that this symlink '0' is not in the /data/data directory in the internal memory before boot even in the repopulated /data/data. Not sure how the data is being copied by the Mounts2SD script but I suspect that there is some recursion or link following going on since the symlink '0' points to /data/data

I hope all this is making sense. I can clarify any questions you have or explain further if you like.

Thanks