yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] Vertron:
That looks like the best solution imo. Changing the update script on each rom before you update it. I assume this will work on all roms, not just CM10?

I assume that will make the partition layout similar to DerTeufel1980's new layout?
[Galaxy S I9000 Android Development] Vertron:
I thought of a hopefully good idea that would allow you to update nightly roms. If it is possible and someone is willing to develop it.

For this to work you'll have to create an ext4 partition on an external sdcard of about 700mb.

Basically there will be 4 scripts, 1 of them to move /data/app to /system/app with a symlink. One for simply moving it back to /data/app if wanted. Then the other 2 scripts is to move /app to the sdcard partition when you want to update a nightly.

So my idea is; you install the rom for the first time, then run the 1st script to move /data/app to /system/app.

If you want to update the rom. Run a second script which moves /system/app to the external sdcard partition. Then flash the nightly rom as normal. Then install a 3rd script which moves /app from the external sdcard partition back to system/app.

The 4th script is to simply move everything back to /data/app if wanted.

The only downside to this is losing some space from your external sdcard. But it's worth it imo for having alot more storage space and having the ability to update nightly roms.

Do you think this is a feasible idea, or will updating the rom break the symlink?
[Galaxy S I9000 Android Development] Kino87:
This is how it works already.. well.. almost.

The Backup and Restore scripts do exactly what you want to do on an external partition (the only difference is that they don't copy the apk on an ext4 partition but they store them in a tar archive on /sdcard that preserve users and permissions regardless of the filesystem in use).

Would make a little more sense to use directly an ext4 partition on the sdcard or external sdcard since it would avoid you the trouble to backup your apps every time you update the rom (but then you will still have to flash a file at every update that tells to mount this external partition) but even then... I'm not fond of altering the partition layout at all even if doing it on /sdcard or /emmc would make it pretty easy to restore in case of problems.

By the way: I've finished the compact version of the suite (0.1c) and fixed a couple of bugs in the old version. Is actually online

BUT IS NOT TESTED IN ANY WAY

.

Don't use it until I update the OP and even then do a nandroid backup before using it

, it may be pretty buggy.

Hopefully if there are no bugs in a couple of hours of test I will report back
[Galaxy S I9000 Android Development] Vertron:
If your apps are backed up by using AppBackup.zip and you flash a updated rom, do you have to flash AppRestore.zip before the device boots with the new rom or can you let it boot then turn it off and run the script in recovery after?
[Galaxy S I9000 Android Development] Kino87:
It took me quite some time to understand, at the beginning I thought you where reporting an other problem... Well, now it should be fixed for good

It should make no difference, but I'd recomand to restore apps before rebooting the system

Scripting testing and debugging terminated... if anyone downloaded the scripts... well... download them again, I've make quite a few changes.

I will update the OP now.

As usual.. is pretty experimental (I'm not good at all at scripting) so there could be bugs... do a nandroid backup and in case of problems report back
[Galaxy S I9000 Android Development] Vertron:
I assume this script isn't restricted to CM10? Do the scripts work with any rom that uses the same partition layout as CM10?
[Galaxy S I9000 Android Development] Kino87:
I didn't test them with other roms but they should work as long as apk files are stored in /data partition and there is a /system partition big enough to contain your .apks.

So yes, in theory it should work with any rom with the CM10 partition layout unless the rom has some similar fix integrated.
[Galaxy S I9000 Android Development] aukent:
After flash AppToggler.zip on my Sumsung Galaxy Tab with CM10 Preview Build 4, all installed apps work perfect. Yet, system will reboot while a new app is installing.

Here is some details.

1/ system link is created on /data/app --> /system/user_app

2/ the permission of /system_app is system:system 771, that of apps in user_app is system:system 644

I've tried to Fix Permision with CWM, but don't work. And failed to chown, chmod with terminal. It say it's a readonly file system. well, I don't know how to deal with it. Any idea? Many thanks!
[Galaxy S I9000 Android Development] Bonta768:
@Kino87

A great idea, thank you. I was starting to think along the same lines myself.

I will use the seperate 4 scripts of 0.25.

AFAIK These will only help an SGS and variants, and only if you have a CM10 or closely related ROM. ie. not (current) HellyBelly.
[Galaxy S I9000 Android Development] gaurav2009:
it is really usefull for a user like me who have heavy apps and games thnxx you very much,,,,just a small request or suggestion can something like this can be done to data/data also????it really take much space...but anyway thanxx...love this script.. :D
[Galaxy S I9000 Android Development] Blackyyy:
Does I understand it right. I'm on Rom GNexus Port RC11. If I backup the app and install RC12 i can restore them in th right folder? With Titanium I can only restore a few apps and than I must push them to SD card. Does I only need 0.1c BackupAndRestore.zip?
[Galaxy S I9000 Android Development] Kino87:
that's strange. I don't think the problem is related to owner/permissions. I've got the same settings and it works fine. Infact the whole folder is not created but moved from data, so it should inherit all the properties he had: owner and permission should be exactly the one it had in /data.

Try to clean cache/dalvik cache and erease the market data/updates. If it still reboots try to move back apks to /data and fix permissions... If that does the trick I may need the logcat for the crash, if it doesn't... well.. I guess the problem is elsewere

It can be done but it doesn't make much sense... /data/data contains all the databases and libraries and moving them to /system would make the phone lag quite a lot (infact in the old CM10 partition layout the whole /data partition was on the slow memory and, expecially on older phones, it was somewhat slow).

If you really have no space (how many apps do you have? is pretty hard to fill 400mb with applications data) I could try to modify Wendigogo's script to move certain files to /system, but that would be quite a mess

BackupAndRestore.zip create an archive with the apks stored in /system/user_app. If for "restoring apps" you mean just restoring back apk files.. yes, BackupAndRestore is all you need. That's the reason I've created that file, to give an easy to use tool to update roms that format /system.

If for restoring apps you mean create a full backup like titanium backup does and then restoring it back because the rom did a full wipe of /data partition.. well.. it won't work. By the way going to titanium backup settings and selecting the option to follow symlinks should allow the program to create fully working backups
[Galaxy S I9000 Android Development] gaurav2009:
when i try to download any app fro playstore my phone get rebooted itself...??
[Galaxy S I9000 Android Development] Kino87:
ok, 2 reports it just few hours... It works fine for me (just installed a new app to test) but I guess it can't be random. What rom are you guys on? As I said I've tested it only on CM10. Also: try the step I wrote above for aukent

Edit: I've just read aukent is using it on galaxy tab... I've no idea how the partition layout is on that device, can you do a df for me? There may be some differences in the partition layout or the ownership that create this problem, as I said I've tested it (and wrote for) only on CM10 for i9000
[Galaxy S I9000 Android Development] gaurav2009:
i am on elite build 12..
[Galaxy S I9000 Android Development] aukent:
Thank you for your advice. I've got a logcat on https://dl.dropbox.com/u/101810693/logcat.0831.log. It is produced by flash the zip to move apps, reboot, install an app named me.shkschneider.dropbearserver. Then reboot automatically. After reboot then I have the logcat.

p.s. everything is fine if move the apps back to /data/app with the script.
[Galaxy S I9000 Android Development] Blackyyy:
Where I can find the setting. I have Titanium Backup Pro. Language is German. I searched under settings but I didn't find it. And would you tell me that if I activated this Point, I can backup and recover without problems?
[Galaxy S I9000 Android Development] Vertron:
Preferences / Troubleshooting settings
[Galaxy S I9000 Android Development] Kino87:
Just installed the rom (Elite Build 12), installed one app from the market, applied the toggler and installed other two apps from the market... It seems like I can't recreate the problem. Have you tried to install a particular app?

I can try to make a script that sets ownership and permissions to apk, but... As I said to gaurav2009 I can't recreate the problem and I seriusly doubt is about ownerships or permissions. Also it looks it installs on the sdcard so is pretty strange. Can you try to wipe everything and start from a clean installation? Also I've read you are using a galaxy tab, I don't know if it uses the same partition layout of the i9000. I will take some more time to test but at the moment I don't have any clue to be honest

It should work fine, you can find the option under preferences>resolution of problems (or something like that, I've got the italian app so I'm rougly translating. It should be the last voice in the preferences)>follow symbolic links.

By the way if you are just updating the rom (CM10) I'd just use my backup and restore script since is way faster and safer
[Galaxy S I9000 Android Development] gaurav2009:
@kino87 maybe its because i firstly tried appmover script 0.2.5 and then i moved to app toggler 0.1c i will flash rom again and then try your script and will then report..
[Galaxy S I9000 Android Development] Blackyyy:
Thank you a lot, it was the last point in setting and than the second. But does your script recover the apps with all the data/save games?
[Galaxy S I9000 Android Development] Vertron:
It doesn't touch the saved games. They are stored in /data/data. This script only moves /data/app
[Galaxy S I9000 Android Development] gaurav2009:
ok flashed elite build 12 installed one app installs fine then flashed app togler then install apps fine from playstore then flashed app mover strange app installs fine on that also ......strange its working ok now.. :D
[Galaxy S I9000 Android Development] Vertron:
What's the performance like compared to before you installed the script? I assume it's the same.
[Galaxy S I9000 Android Development] gaurav2009:
yup i did'nt find any performance flaw...its same for me atleast....
[Galaxy S I9000 Android Development] aukent:
thanks a lot for ur help. I am not a guy who familar with Android. I just have a guess and try to change the permission to see what will happen. So you dont really need to make a script for me. Anyway, thanks! Here is what I have try.

case 1: on cm10 b4, reboot to CWM, format system, wipe data, wipe cache, wipe dvlink. Flalsh cm10 b4, wipe dvlink, flash jb gapps, wipe dvlink. flash AppToggle. reboot. result: failed to install any new app.

case 2: move apps back to /data, everything is good. reboot to CWM, wipe cache wipe dvlink, flash AppToggle, wipe cache wipe dvlink again. reboot. result: still not fully function, you may see the result in my previous post.
[Galaxy S I9000 Android Development] Vertron:
Just wondering, a few people from certain threads (CM10, Elite RC12) recommend just moving all apps to sd using titanium backup.

So I'm wondering what the advantages are with using this script instead. Is it faster to open apps? Can't titanium backup move over all the apps? Thanks.
[Galaxy S I9000 Android Development] Vertron:
Right I answered my own question. Moved all the apps to sd using titanium backup. It left about 15mb on /data/app and I noticed everything felt alot slower, I guess all apps shouldn't be moved to the sd card. I tried to move it all back to /data/app and loads of apps started FC'ing. Couldn't recover it so had to reflash the rom....

Long story short, this script is better than moving apps to sd.
[Galaxy S I9000 Android Development] Vertron:
Installed the script without issue. It works perfectly.

You should give the scripts a higher version number as I think low version number is putting a few people off from using it, from what I've read from other threads. It's making them think that this is a very alpha script, when in reality it's very stable.
[Galaxy S I9000 Android Development] Kino87:
I've been unable to recreate (and so fix) the problem where installing new apps leads to a reboot. By the way installing the script in a fresh rom and then installing/restoring all your apps seems to fix the problem.

Published a new version of the script, intended for rom developers.

Is composed by a shell script and an updater-script that replace the original.

This script has been tested and should work fine but it still needs some cosmetic and functional refinement. Is functional enough to be used for rom testing (do not use in final versions yet, there are problems

in the whole suite

and I am aware of them, is just for testing) and for end users if they wish to update rom without manually saving and restoring apks.

Soon I will publish a complete update to the suite with various fixes, cosmetic changes and some security checks, also I will normalize version numerations since actually it could lead to some problems.
[Galaxy S I9000 Android Development] aways:
thank you Kino87 awesome work.!
[Galaxy S I9000 Android Development] thaidroid:
I'm on JRO03L 4.1.1 RC12.1 and installed the Appmover Zip.

Absolutely superb:good::good:

Phone is completely lagfree:o
[Galaxy S I9000 Android Development] blueberry60:
What means "according to necessity" ? Do we need to flash again AppToggler,Backup and Restore.zip in necessity though we extracted the files and drag them in CM10 Rom for 0.1d (Developer Edition) ?
[Galaxy S I9000 Android Development] Kino87:
A rom using that script should be completely automated, no need for other files. If the "space fix" is already applied and you flash a rom with the developer edition the update script saves temporarily the apps on the sdcard, formats /system, installs the updated rom and restores the apps.

If there is no fix applied it updates the rom and then moves apks to /system.

Only problem right now is if you clear /data partition (since it will delete symlink to /system, but not /system/user_app dir, disabling the fix). For this reason on the next release I will include a file in init.d that checks if /data has been cleared and in case remove all apk from system and move /data/app back to /system/user_app, only problem is that I have tests at the university, so I won't be able to work on this for some days
[Galaxy S I9000 Android Development] blueberry60:
Thx for your explanation in detail.
[Galaxy S I9000 Android Development] feroxxx:
hi

thanks a lot for scripts.

im using your scripts on p1000(galaxy tab 7).works great.

i have problem with reboot issue but solved it wipe cache,dalvik,fix permission and remove google play app's update.no reboot now.

thanks again.
[Galaxy S I9000 Android Development] Kino87:
thanks, do you mind if I report the underlined part in the OP?
[Galaxy S I9000 Android Development] feroxxx:
yes, if ican help anyone its wonderful.

edit: i have problem with reboot issue but solved it wipe cache,dalvik,fix permission and remove google play app's update.no reboot now.

this is temporarly fix for reboot issue.sorry about that. if you want permanently fix you have to do this:

"if play store update itself, you have to integrate play store to rom using titanium backup.this method completely fix for reboot issue."
[Galaxy S I9000 Android Development] thaidroid:
SUPERB

I'm on JRO03L 4.1.1 RC12.1 and installed the Appmover Zip.

This fix should be on every JB ROM out there, it's absolutely amasing. I have had it installed for about four days now with not a single hitch. Everything works as normal with the one exception and that is that everything is absolutely flying!

THIS THREAD SHOULD BE ON THE FIRST PAGE.....POST IF YOU ARE HAPPY OR SAD PEOPLE NEED TO BE MADE AWARE OF THIS BEAUTY!!!
[Galaxy S I9000 Android Development] ojojoj:
Hi, I dont understand this is bug or not:

then I try instal f.e. Real Racing 2 it moves automacally to SD card (internal) and games starts normally, but then I try move it to internal memory /system/user_app I got FC and it happens with NFS games series too.

I found way how to fix it, but it is annoying:

I must move app f.e. to system partition, then connect USB cable and enable mass storage, then my phone cant see internal SD ant then I can install my app. After that I disconnect USB and my app works from internal /system/user_app memory :)

So I have Q this only for me this happens or not?

I use latest CM10

Tnx

P.S. Dalvik and other cache was cleared.

Edit:

I think this is script problem, because f.e. my game Max Payne was in internal memory, but I moved it to SD card and game started, but then I moved it back to internal memory I got FC :( I made my trick where I wrote above and game started again:)
[Galaxy S I9000 Android Development] tusko5:
What happens if you flash AppToggler.zip to move apks back to data and you do not have enough space?
[Galaxy S I9000 Android Development] Kino87:
Will take a look ASAP.

It tries to move them and then verifies that everything is ok. If not (If there is not enough space for example) it will simply revert to having apps in /system (or at least, that's the theory).

On next release it will check if there is enough space before trying to move the apps, same result, way less time wasted.

As I said I have tests right now, so no time to work on the scripts. in a couple of days I should be able to find some time
[Galaxy S I9000 Android Development] Kino87:
I've done quite a lot of testing, it turned out is not related to the script but is a problem of the CM10 itself (infact I have wiped everything and disabled the script and with a stock system the problem is still there).. it looks like after moving an app (and his libs) to the sdcard it has some problems moving the lib back to /data/data.

This happens only on apps that have lib files (usually pretty complex apps like games or benchmark). I'm going to report it as a bug, but I can't do much more.
[Galaxy S I9000 Android Development] ojojoj:
Ok. Tnx man. I hope that CM team fix it soon.
[Galaxy S I9000 Android Development] Not_So_There:
I am having the reboot issue when I attempt to install or restore anything with Titanium on my Fascinate using today's nightly. I tried the above but it did not make a difference.

Also using the compact version it does undo the configuration and the log always reports that it has successfully moved things to system.

I have tried flashing it right after installing the ROM and letting it boot first and then applying. I have also tried to install an app and then do the switch. The app is moved, but if I attempt to uninstall it it says it is removed, but it will reappear after a reboot.

Attached is a logcat of the attempted restore and soft reboot.
[Galaxy S I9000 Android Development] Kino87:
Have you any problem with installing apps from the market?

Have you wiped /data while the fix was active?

What have you exactly done with scripts? (what script have you used and in wich order)

Try this out:

Reboot to recovery

connect the phone via usb cable and access to shell via adb

adb shell

give the following commands

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

See if the problem is still there and/or any of those commands return some sort of error. I've got an half idea about what the problem may be.
[Galaxy S I9000 Android Development] Not_So_There:
I did also have the issue when installing apps through the market or just trying to install them.

I was just coming back here to add that user_app was set to 771. I changed it to 777 and it works now and I can install and restore apps.

I had originally tried the AppMover.zip and then had attempted to use the AppToggler.zip from the compact version and had the issue with both.
[Galaxy S I9000 Android Development] Kino87:
will force ownership and permissions on the dir for the next release.. It shouldn't be necessary but it seems that in some occasions they get corrupted (I've done some research and it seems that sometimes is TB fault, anyway is not hard to solve so no problem)
[Galaxy S I9000 Android Development] Not_So_There:
System was the owner already so I did not need to do that. Should the directory have to be 777 or should it be able to work under 771?
[Galaxy S I9000 Android Development] Kino87:
should be able to work under 771, or at least.. under some phone, like mine, it does (and under some phone is the default setting) but converting to 777 has no drawback as far as I've tested and seems to be a solution to that problem (that was somewhat frequent on different phones using app2sd, so I guess is something related to having a symlink instead of a dir).

Only alternative I can see right now is to leave /data/app and move/link the single apk files, but that makes everything more complex AND has some drawbacks (like the fact that new apps are installed in /data/app and moved to /system just at the reboot), so if I can avoid it I will.
[Galaxy S I9000 Android Development] Kino87:
Version updated. Is pretty much the biggest (and most complex) update from the beginning so expect some sort of error... As usual do a full nandroid backup.

Since there are a few people that are not really sure on how this set of scripts works I'm going to rewrite part of the OP, it will take a few hours though
[Galaxy S I9000 Android Development] Jose_Paramore:
How can I choose which apps do I want to move to /system?

Enviado desde mi GT-I9000 usando Tapatalk 2
[Galaxy S I9000 Android Development] Kino87:
you don't.. Is not like moving an app to sdcard. All apk (and only apk) files get moved to /system, not their data or libs. Infact the whole /data/app is moved to system and linked back so that new apps get installed directly there.

Since /system is way slower in writing operations but almost identical while reading there is no noticeable performance loss.

Simply put:

If you have enough space for all your apps, you don't need this set of scripts

If you don't have enough space for all your apps it seems this set of scripts is actually the only solution that gives you more free space (quite a lot I'd say) without performance loss (moving apps to SD hurts performance pretty badly in the long term)
[Galaxy S I9000 Android Development] Vertron:
I've already moved all my apps over to /system using 0.1c. Can I use 0.3 now instead without any issues? Or do I need to move everything back to /data using 0.1c then move it back to /system using 0.3?
[Galaxy S I9000 Android Development] Kino87:
You can use 0.3 without any problem.
[Galaxy S I9000 Android Development] Not_So_There:
insufficient space

With .1c Compact edition I used I've started seeing a problem where I cannot update apps as it says I have insufficient space. It seems that when it is calculating the space used on /data/ that it is including the symlink folder (titanium for example says it is almost full when it really is not, I see the same amount of space added to system).

Is there anything I can do to prevent it from including the symlink in the calculation?