yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] Kino87:
Are you sure you have applied the fix correctly? Actually I have 350+ mb of apks in /system/user_app and everything (Titanium Backup, Root Explorer, Android OS itself) reports correctly the free space.

For example Android tells me I have 592mb used on the internal memory (while that partition is not even that big) and still 166mb of free space (giving a sum of 750+ mb for a 420mb partition).

Titanium backup tells me that the internal memory is 442mb and that 172mb of that are free (so reporting the correct amount of memory simply ignoring the symlink).

can you give me the result of df? Open the terminal and type

su
touch /sdcard/freeSpace.txt
df > /sdcard/freeSpace.txt

and attach freeSpace.txt

Anyway if you are sure the fix is applied you can try to fix the problem downloading latest AppMover version, do a backup with BackupAndRestore.zip, update/reinstall the rom and restore back the apps with BackupAndRestore.zip
[Galaxy S I9000 Android Development] Vertron:
I remember having the exact same problem after updating my rom and using the script again.

I searched around on xda and some guy recommended installing lucky patcher as it removes unused codec once opened. It fixed the problem for me.

http://xdaforums.com/showthread.php?p=29044233
[Galaxy S I9000 Android Development] Not_So_There:
I went though the process of wiping the rom and installing from the beginning and while the apps restored with your scripts and the permissions were correct I could not install anything without the soft boot. After a lot of different attempts I flashed my backup only to find I was getting the soft boot again in the image that had been working.

I finally figured out that I was wrong about it being the permission on the file folder. When I changed the folder permission I just did it though Root Explorer since it was handy. But anytime I attempt to use Root Explorer it always tells me the system is read only and I have to change the mount. I had this same problem when I was attempting to use adb to make changes when I was troubleshooting. In adb I'll get errors like "mkdir failed for user_app, Read-only file system".

So short version; I can install and restore apps only if I open Root Explorer first and change it to Mounted as r/w. If I change it back or reboot it goes back to soft boot.

I'm still working on why I get the insufficient storage when updating or installing though the market.
[Galaxy S I9000 Android Development] Kino87:
Are you on CM10 with the i9000?

/data is bigger than it sould be

/cache is WAY bigger and

/system is about 500mb smaller than expected

Just for comparison this is the result on my phone

root@android:/ # df
df
Filesystem Size Used Free Blksize
/dev 195M 48K 195M 4096
/mnt/asec 195M 0K 195M 4096
/mnt/obb 195M 0K 195M 4096
/data 422M 254M 167M 4096
/cache 17M 2M 15M 4096
/radio 16M 14M 1M 4096
/system 1G 826M 1G 4096
/efs 12M 6M 5M 4096
/storage/sdcard1 7G 7G 137M 4096
/storage/sdcard0 5G 4G 1G 4096
/mnt/secure/asec 5G 4G 1G 4096
root@android:/ #

Looking at that I'd say you are not using a rom that uses the actual cm10 partition layout OR you are not on i9000 (international galaxy s). If you are on a different phone/rom I can try to help, but try to understand that the script is not intended for that use and I can't test it myself (wich means we'd need to talk a little bit on icq/msn/skype/irc or I won't be able to help you).

By the way make sure /data/app is a symlink (is pretty easy to verify with root explorer, just check that the destination folder is reported like in this picture).

If it is reboot in recovery, access via ADB and type this commands

mount /data
mount /system
rm /data/app
ln -s /system/user_app /data/app
chmod 777 /data/app
chown 1000:1000 /data/app

Edit: Actually after thinking a couple more times... I think there are two different versions of i9000, one for USA/Canada and one for almost everywhere else.. In that case the layout is pretty similar even if not identical and shouldn't be a problem itself, the problem seems to be in the way /system is mounted. If that's the case we can try to find a solution toghether, but I can't guarantee on the results
[Galaxy S I9000 Android Development] Vertron:
Did you try installing lucky patcher to fix the problem like I suggested earlier?
[Galaxy S I9000 Android Development] Kino87:
Done a little update, now the init.d ensures that /system is mount in RW. Don't know if will solve Not_So_There problem but it can't hurt (I hope :P)
[Galaxy S I9000 Android Development] Not_So_There:
Sorry, I am using a Fascinate. Some people in a AOKP thread on Rootz mentioned that this script was working for them and since it was in the family of phones I thought I would try it. I am using it with the CM10 Nightlys for the fascinate.

The symlink is created and working with the right permissions. But unless I change the system mount it will softboot.

Even when using ADB I have to change the mount before I can even ch mod something, example:

shell@android:/ # su
su
shell@android:/ # chmod 777 /data/app
chmod 777 /data/app
Unable to chmod /data/app: Read-only file system
shell@android:/ #mount -oremount,rw /dev/block/mtdblock3 /system
mount -oremount,rw /dev/block/mtdblock3 /system
shell@android:/ # chmod 777 /data/app
chmod 777 /data/app
shell@android:/ #

After I boot up my phone if I just open Root Explorer and change the mount permission things install fine. I am not sure why mine mounts that way.
[Galaxy S I9000 Android Development] Kino87:
I've posted a little fix while you where posting (expecting your answer). Try to get S99SystemApps from any file of the suite (I've just uploaded 0.3.1 version, all archives have it somewhere), put it in /system/etc/init.d and give it 755 or 777 permissions. Reboot and check if it solves your problems
[Galaxy S I9000 Android Development] Not_So_There:
I installed and it it worked after I ran the troubleshooting "remove fixes and backups" and then rebooted. Thank you.

It now appears to be mounting it at boot correctly so I don't have to use Root Explorer to do it or get any soft boots.
[Galaxy S I9000 Android Development] Kino87:
Good :) Only problem now is that I have to modify a little bit every script for those who don't get /system mounted in RW like you, so... expect a 0.3.2 for this night/tomorrow.And if anyone has this problem wait until then.

work work

EDIT: 0.3.2 uploaded.. I shall call it the "I-hope-all-the-goddamn-bugs-have-been-fixed edition". Well.. at least it looks like there have never been bugs in the scripts itself in first place but that the problems come out when people started to use them on variants of the i9000/CM10... Now the suite should be a little more flexible.

Well, I'll just wait for the next bug reports.
[Galaxy S I9000 Android Development] Jose_Paramore:
Thanks for the script, it works perfectly! I have used "Compact" edition an no problem at all. I'm using Elite JB rom 12.1.

Enviado desde mi GT-I9000 usando Tapatalk 2
[Galaxy S I9000 Android Development] Silentbob999:
OT question

Hi,

I was searching the web for a solution at a problem and the only valuable result I get bring me to your thread. My question is a bit Off Topic so I will understand if you dont answer.

"V 0.2 - Fixed an error in AppBackup.zip that could lead to follow recursively the symlink of the app directory (again and again and again..)"

I am searching for a way to detect recursive symlink and delete them, or a way to avoid loop when calculating size or moving folder.

I am to help for this issue : http://xdaforums.com/showpost.php?p=31476759&postcount=212 but I dont have the knowledge for it. And as I say all my research bring me to your note (fix v.0.2)

Thanks for your help.
[Galaxy S I9000 Android Development] Kino87:
this is way OT but what the hell... after all is a developers community. At the moment I don't have the time to check the script and hunt for bugs, but you can easily find if a file is a symlink with the condition -L in an if.

For example: imagine you have an array containing the list of files of a directory and you want to do something for each file in that directory that isn't a symlink you could end with something like this

[COLOR="DarkGreen"]#Dir you want to examinate[/COLOR]
DIR="/data/data"
[COLOR="darkgreen"]#List of files contained in a directory[/COLOR]
FILES=( file1 file2 file3 )

foreach examinatedFile in $FILES
[COLOR="darkgreen"]#Make sure file exists and is not a symlink[/COLOR]
if [[ -e "$DIR/$examinatedFile" &&[COLOR="Red"] ! -L "$DIR/$examinatedFile" [/COLOR]]]; then
[COLOR="DarkGreen"]#do something[/COLOR]
fi
end

I hope you can figure out how to use it youself from here, if you need more help send me a PM
[Galaxy S I9000 Android Development] Silentbob999:
Thanks, I will take a look at this ;)

Envoyé depuis mon GT-I9000 avec Tapatalk
[Galaxy S I9000 Android Development] iyahman:
It seems that it works,I find my apk in / system, but is it normal to still have apk in / data / app / after applying the fix?
[Galaxy S I9000 Android Development] Silentbob999:
Do you check with a file explorer that shows symlink? A normal file explorer will induce you in error. "root explorer" and "smanager ads" are good, "es explorer" still don't show symlink even if the told that will be consider 6 months ago....

To make it simple, yes it's normal.

Envoyé depuis mon GT-I9000 avec Tapatalk
[Galaxy S I9000 Android Development] h4z3r:
hello

i just read this on cyanogenmod google plus, perhaps it could help you (no need anymore to backup and restore)

bye

CM Protip

Are you a Tasker user tired of re-installing the Secure Settings helper after every flash? Have something on /system that you would prefer just stayed there after a CM update instead of being wiped out - inverted apps or otherwise?

Did you know CyanogenMod 9 and 10 have support for custom backup scripts?

The CM install script will respect and execute .sh files created in /system/addon.d/

Some of you likely already have this working without you even realizing it (ie gapps). Take a look at 50-cm.sh for a reference file, or read up on more advanced abilities over on our gerrit goo.gl/xEOVZ
[Galaxy S I9000 Android Development] Kino87:
Yhea, I noticed while working on the script, on developer edition that already works almost in the same way, if I drop the backup and restore script in addon.d it should work with little to no modification. Since you still have to drop files in the rom archive I prefear to modify also the updater-script so that end users get a little bit of visual feedback (saving and restoring apk is a slow operation).

I will see if I can adapt it to the normal versions so you don't have to manually backup and restore apps every time. Thanks for reporting (sometimes you know some things exists but you simply don't realize you can use them :P)
[Galaxy S I9000 Android Development] aways:
Kino87 thank you for good work but my user's have problem can't download apk's from market and from SD card phone rebooting can you tell me why ?
[Galaxy S I9000 Android Development] Kino87:
For those who don't read your rom thread:

The problem was caused by the order of execution of init.d scripts and has been simply solved renaming my script and so forcing to be executed as the last one.

For more interesting things: expect a complete rework of the suite in a couple of days, I can finally make it to a single script and users won't have to do anything but flash it once for activate it thanks to h4z3r (so, all of you: go at page 9 and hit thanks button on his post!)
[Galaxy S I9000 Android Development] aways:
thank you for your effort and support bro ;)
[Galaxy S I9000 Android Development] Vertron:
Will this solution h4z3r recommended work for non cm roms too?
[Galaxy S I9000 Android Development] Kino87:
Should work on any rom that uses cm10 partition layout AND still has the execution of scripts in addon.d at update time, wich should mean 90% of roms based on CM10 should work and maybe also some others.

I can't be more precise than this, but if you link me the rom you intend to use I can tell you if it will work or not (and maybe create a little list of working roms in the OP).
[Galaxy S I9000 Android Development] Vertron:
I want to use it with this rom; http://xdaforums.com/showthread.php?p=28856432
[Galaxy S I9000 Android Development] Kino87:
Just downloaded the rom and looked at the updater-script and backuptools.sh, it should work. Since you are interested I will test and debug the script using that rom.

If I don't find big problems during developing I will post an automated version tomorrow in the afternoon (centeral europe time).
[Galaxy S I9000 Android Development] muktheo:
hey kino..Im really confuse when I flashed the Paranoid JB ROM before..bcoz its have very small /data partition and Ive many apps to restore..

But since I found ur awesome script,now its ROM run Perfectly and great..very thanks for ur work sir.. :)

GBU

------------edit ------------

Emh i have a little question bout backupandrestore script..so if i want to flash an update from my rom,the step is :

1.flash backuprestore file

2.flash a rom update

3.flash again backuprestore file

4.and all of my apps will back to system/usr app?

Please correct if im wrong..

Thanks n sory foor noob quest n bad english..
[Galaxy S I9000 Android Development] Kino87:
I've uploaded the new automatic version

will NOT work on this rom: JRO03L 4.1.1 RC12.1

I'm trying to contact the author to fix the problem

Should work fine on CM10

Other roms are untested (post here if you want me to check if they work).

Didn't have enough time to test eveything out so I won't update the OP for now, test it yourself and report back.

Just flash the enabler to activate it, if you want to deactivate the fix flash the disabler.

Just 2 things:

-You must have enough free space for your backup in /data, /sdcard or /emmc, if not you will lose your apps

-With this script upgrading a rom will take longer depending on how many apps you have installed since every time the phone has to backup and restore all the apk files
[Galaxy S I9000 Android Development] Silentbob999:
Hey man, I don't use your script (the rom I use do not need it) but I always referring people to your thread. That new automation process seems fantastic!

Do you know if it will work with SlimBean? (people I am referring to you are mostly from that rom or cm10)

Envoyé depuis mon GT-I9000 avec Tapatalk
[Galaxy S I9000 Android Development] Kino87:
Just downloaded and checked, it lacks the support for addon.d scripts, so the best I can do is publish a Developer Edition version for SlimBean.

You can try to ask the author to enable it (he just have to copy 2 files from CM10 and add 4 lines of code in the updater-script)
[Galaxy S I9000 Android Development] Kino87:
Service post

SUPPORTED AND UNSUPPORTED ROM LIST for AUTOMATIC VERSION

Cyanogenmod 10 supported

C-RoM BeaN unsupported/Already Integrated

Tsunami X 1.0 unsupported/Should be Integrated starting from next version

SlimBean unsupported

Elite JRO03U unsupported (will be supported starting from next version)

MIUI JellyBean 2.9.14 unsupported

Your rom is not in the list? Send me a PM or post in the thread and as soon as possible I will test it
[Galaxy S I9000 Android Development] Vertron:
That's a shame. Thanks for attempting to contact Elite to fix the problem. The non-automatic version is still very good regardless.

---------- Post added at 04:04 PM ---------- Previous post was at 03:51 PM ----------

I've just seen your post from the JRO03L 4.1.1 RC12.1 rom thread.

Would it be possible for the user to install build.prop and manually modify the string ourselves to get the automatic script working? Or does the build.prop string change back to default when the rom is updated?

Btw the rom author uses htc mania; http://www.htcmania.com/showthread.php?t=417626. I'm not sure if he reads the xda thread.
[Galaxy S I9000 Android Development] Kino87:
I thought of that myself, but I think it will change back to the normal build.prop when the updater-script formats /system and copies back all the files, this way the script will start for backup but won't for restore and you will just end with a backup file in /data, /sdcard or /emmc (according to where there is enough space).

I can try to see if for some strange reason build.prop gets saved and restored, but I don't think that's the case
[Galaxy S I9000 Android Development] MoneyFace =p:
Hi dev i'm constantly wondering about this and would like to voice it out hope it doesn't offend you in any manner. :o

I understand that your script shifts all installed and newly downloaded apps directly into /system/user-apps which is on the slower Samsung moviNAND/SanDisk iNAND. However, the rationale for pawitp to use oneNAND /data for user apps is for apps to run fast on them, wouldn't the script render it original purpose of the partition swap useless in order to make apps run fast since no apps will be on the oneNAND?

I wonder if a script that allows for selective app movement would be a better option?
[Galaxy S I9000 Android Development] Vertron:
Performance isn't effected as the read speed on both chips is about the same.

It's the write speed which is slow. Only /data/app is moved because it doesn't need to write anything other than installing/updating apps. All the rest of the data is in /data/data which is still on the fast chip.
[Galaxy S I9000 Android Development] elhennig:
What is the problem with slim bean? Can you specify this a bit more precise, why this does not work with slim bean?
[Galaxy S I9000 Android Development] Kino87:
thanks, I couldn't explain it better and repeating the same things again and again is quite tiring (but right now I'm not sure I've explained it in the OP so maybe is my fault)

CM10 has a script (/system/bin/backuptools.sh, /system/bin/backuptools.function) that calls every script it finds in /system/addon.d when you are updating a rom (twice, once before formatting /system and once after).

This, as far as I know, is the only way to make a custom script to be executed at update time without modifying the rom installer. Problem is SlimBean doesn't have this script.

I can easily modify the updater-script of SlimBean and prepare the necessary files for it to work, it wouldn't take more than 10 minutes, but contacting the developer of every rom and asking them to patch their rom for a function that actually I'm the only one to use seems a little bit selfish and time consuming (I'm actually faster to write and test scripts than contacting devs, explain the situation and convince them to implement it). I'm doing this for Elite rom just because I know some of the betatesters of the rom and because in that case all the dev must do is modify one line in the script (that is there but is disabled).

If anyone wants to contact SlimBean devs explaining them the situation and trying to convince them to add the patched files to enable the CM10 backup and restore system I will gladly prepare the patch.

Keep in mind that that list is just for automatic version, the manual one should work just fine and since SlimBean doesn't update every day shouldn't be a big problem to backup and restore applications manually once in a while
[Galaxy S I9000 Android Development] monjovega:
Need help. I am using the latest nightly and flashed the auto-version of the script and got my phone up and running but the Google Play app is missing...

---------- Post added at 05:57 AM ---------- Previous post was at 05:21 AM ----------

For the meantime I reverted back to compact mode and got all of my app including Google Play...
[Galaxy S I9000 Android Development] Kino87:
Strange, I've just upgraded to the last nightly and I didn't had any problem.

Have you lost any other google apps (For example google talk)?

By the way you can download gapps from here http://wiki.cyanogenmod.com/index.php?title=Latest_Version/Google_Apps

Just download CM10 gapps and flash it

Even stranger, have you tried to shut down the phone and do a complete reboot? Sometimes when working on apps I can't see them until I reboot the system
[Galaxy S I9000 Android Development] monjovega:
Reboot a couple of times, re-installed GAPPS as well no luck. So I went back to Compact version with CM1020120917 w/ semaphore 2.1.1
[Galaxy S I9000 Android Development] Kino87:
I'll see if I can find something strange in my script and in the gapps backup script, maybe they interfere somehow but is still strange that it works for me (or so it seems, I've just installed the Semaphore app from the market).
[Galaxy S I9000 Android Development] monjovega:
That will be a big help. I was opting for the automatic version so I don't have to backup/restore.zip before and after I flash a new nightly. I am doing it correct by the way with the Compact version right? Run the compact (backup/restore) script before and after flashing but not the AppToggler script righty? Just do the Apptoggler.zip once or do I have to run that as well after every new rom I flash. Just to make sure I am doing it correctly.
[Galaxy S I9000 Android Development] Kino87:
yeah, you are doing right. AppToggler has to be flashed just once.
[Galaxy S I9000 Android Development] muktheo:
so the apptogler.zip is doesnt work anymore for JRO03L based ROM sir..?

after updating my ROM to the latest paranoid 2.12, the AppToogler.zip instalation is always aborted.. >_<

I flash AppToogler.zip again cause I want to revert to install my apk back to /data (games apk for sure) but its zip not worked again.. :(
[Galaxy S I9000 Android Development] Not_So_There:
I installed the new nightly of CM10 and everything worked great, it booted up and I was able to restore everything and install new apps. After I Something happened at some point though and it now has changed the system back to r/o. I did change the name of the script but it did not help.

It has to be something in one of the apps that is changing it as it was working fine initially. At this point I'm not worried about it since I know the cause and how to prevent it from happening. If I figure out what is causing it I'll let you know though.
[Galaxy S I9000 Android Development] Kino87:
Could be helpful, thank you

Actually the manual versions should work just fine, AppToggler exits with an error only if:

The apps are in /system and there isn't enough space in /data to contain them

The apps are in /data and there isn't enough space in /system to contain them (strange)

The apps are in /data but somehow there is still the dir /system/user_app and is too big to be moved back to /data

The first is two cases are not problems, is how the script is intended to work (and you wouldn't be the first one who has the script enabled without noticing it). You can check with root explorer if /data/app is a symlink and if /system/user_app exists.

The last one should be prevented by the script in init.d, but if you used an older version of the suite it may happen. Make shure you have a file called S99SystemApps or z99SystemApps in /etc/init.d. If you don't manually extract it from one archive (actually every archive of the suite has it, somewhere), copy it in /etc/init.d and give it execution permissions (755 o 777). Reboot the phone and you are good to go (with the fix applied at boot time)

I've searched a bit for a problem but I can't find anything. I will keep looking for it but since myself and some other users didn't experienced this problem for now I can only assume it was some problem with the update itself and not strictly related with the script.

If you can you try to use automatic version again and see if it happens once more could be helpful. In case do a full nandroid backup before updating, better safe than sorry ;)
[Galaxy S I9000 Android Development] monjovega:
Just flashed the Automatic version like you suggested. All apps seems to be there. Will definitely know on the next nighty update if there are anomalies. Will give feedbacks.Thanks.