[Tip] Going 'Pristine' : What, Why, How - Samsung Galaxy W I8150

People keep asking me what "Pristine" means, and I'm tired of having to re-re-retype everything every time, so I think I'll just gather everything about "Going Pristine" in this thread
What does "Going Pristine" means
Going 'Pristine' means: Installing a ROM with no leftover from the previous ROM
Why should I "Go Pristine"?
Short answer: To prevent 95% of the problems experienced by others when installing a Custom ROM
Long answer:
When you install an App (.apk), the data saved by the App -- even the .apk itself! -- might be optimized/customized based on your previous ROM. This means that if you change your ROM, the data might cause problems due to the differences between your previous ROM and your latest ROM.
This is especially a problem if you 'change generations' (e.g., upgrading from GB to ICS or ICS to JB/JB+).
I *always* do Pristine ROM installations, and am glad to say that I managed to avoid about 95% of the problems experienced by other users of the ROM I used.
Additional Info: There's a hidden folder called .android_secure in the root directory of your SD Card. This folder is not visible when the card is mounted in your phone. It might contain settings that depends on what ROM you're using.
Are there Drawbacks of "Going Pristine"?
Unfortunately, there's no such thing as a free lunch. Here's a list of some potential drawbacks of Going Pristine. See if you can live with them; if you can't, then you shouldn't go pristine.
You will lose your savegames.
And thus, avid gamers will likely go insane due to having to repeat all the levels
However, please read the 2nd post of this thread for some interesting thoughts.
.
You will have to re-download all apps.
Which will be *very* time-consuming unless you have a fast HSDPA connection, or able to access a fast & free Wifi hotspot, or both.
Also, please read the 2nd post of this thread for some interesting thoughts.
.
You have to set some (relatively) significant time to do the process.
Trust me, copying 10 GB worth of stuff from/to the SD Card takes a loooong time, especially if there are a huge number of small files like porn pics cute kitten & puppies pics.
How do I "Go Pristine"?
Make sure that you have ClockWorkMod installed
.
Make a backup of important data, such as SMS Log, Call Log, Contacts (if you don't sync to Google), etc.
No need to perform backup of apps, especially System apps!
.
Create a Nandroid backup of your current system, I suggest in .tar format instead of dup format.
This will be necessary if you need to go back to your previous ROM.
.
Turn off your phone, eject the SD Card
.
Backup (copy) the whole contents of the SD Card to a PC (Windows, Mac, Linux, no matter)
-- or --
Prepare a new SD Card
.
(Optional, but recommended, especially if you want to use Link2SD later on) Repartition your SD Card, even if it's previously partitioned.
Make 2 primary partitions; the 1st one as FAT32, the 2nd one as ext2
(You *don't* want ext3/4 on a flash memory. Trust me)
.
Format your SD Card accordingly. (I.e., 1st partition as FAT32, 2nd partition (if you made one) as ext2
.
Copy the following to the root directory of your SD Card:
Your ROM installer updatezip
(If needed/specified by the ROM) GApps updatezip
The /clockworkmod directory from the previous SD Card contents (you did backup your SD Card, didn't you?)
.
Insert your (partitioned, formatted, and copied-to) SD Card into your phone
.
Boot into Recovery
.
Wipe/format the following (find the proper entry in the CWM menu structure):
/data
/system
/cache
Dalvik Cache -- please note that this is *different* from the /cache of the previous line!
Internal SD
Battery Stats
Leave the External SD alone!
.
Install your new ROM, following exactly the instructions by the ROM-cooker/dev
.
Now, this is VERY IMPORTANT: DO NOT EVER RESTORE ANY APP FROM YOUR PREVIOUS TITANIUM BACKUP SET!!!
ALWAYS DO FRESH INSTALLS FROM THE PLAY STORE!
You are allowed to restore some data, though: SMS Log, Call Log, and Contacts Book. That's it. Nothing else
However, please read the 2nd post of this thread for some interesting thoughts.
.
I have been installing my ROMs with "Pristine" way. Yes, reinstalling everything *is* tedious, but as a benefit, the new ROM runs smoothly, and a lot of problems that others (who did not go the "Pristine" way) never happened on me.
=====
There you have it, a clear and complete description of "Going Pristine", complete with the steps and explanations.
Feel free to link to this thread, and as usual, if you find this thread helpful, leave a Thanks and/or rate this thread 5 stars.

Thoughts and Considerations on Restoring Apps
After doing *lots* of Pristine installs, and some deep spelunking within the folders and settings of various apps...
... and based on valuable inputs from XDA friends ...
... I've come to the conclusion that:
Perhaps 90% of apps are safe to be reinstalled from Titanium Backup.
A sizable number of apps are also safe to have their data restored by copying the relevant data directory in /data.
The question is: How to make sure that the app you're trying to restore is part of the 90%?
My terse answer: Unless you know *exactly* what the app is doing (e.g., by perusing its source code), you can't really be sure.
You can always experiment, though; just remember to do a Nandroid Backup prior to restoring an app.
What I can give you, are several guidelines:
Games that are not too 3D-oriented are most likely safe; they are not likely to install additional libraries to mitigate whatever shortcoming the W has
Games that heavily rely on 3D ... unknown. Some of them are known to delve really deep into the Android library files, and even install their own custom libraries depending on your ROM/kernel capability
Productivity apps, e.g., Office Suites or To-Do Lists or PDF Viewer or ... many others of their ilk, are most likely safe to be restored. They are never known to install their own libraries, and/or have settings dependent on the ROM/kernel
Utilities... now we're getting into unknown territory... some of them are safe (the ones that don't mess up with the innards of Android); some of them are dangerous. I recommend re-downloading from Play Store
Be wary of apps that, when they were first installed, requested to add "additional files", either via Play Store (you can see in the Notification Tray, "Additional Files") or on first run (usually they will call it "Downloading assets"); these apps might be downloading binaries that depends greatly on what the system state is at download time. Let's call them the unknowns.
That's it. So, the warning that "You'll lose your savegames" is not really absolute; if you're lucky, you can restore from a TiBU-made backup.
Always remember to do Nandroid Backup.
========================================
Games known to be restore-able:
Funky Smugglers
Minecraft
Subway Surfer
Utilities known to be restore-able:
ClockSync
Solid Explorer
-- Sent from Opera Mobile for Windows --

I think this topic must be stickies
.... coz this topic very important
Sory if my english is noot good

In some way thats true, i do believe though that much people never have a look at the stickies. Would be a shame if this topic wouldnt be seen
Sent from Galaxy W with CM10 (thanks to Arco!)

actually i dont think extensive rom flasher will follow this guide but i do agree with pep about going pristine
Sent from my GT-I8150

hadidjapri said:
actually i dont think extensive rom flasher will follow this guide but i do agree with pep about going pristine
Sent from my GT-I8150
Click to expand...
Click to collapse
Hehe... too much things to do for them, likely...
But if you're like me, flashing only to fix bugs, and already settled on a (relatively) stable ROM, going Pristine should be a habit
-- CM9b4 / CastagnaIT 7.3 BFS+ExtUV / DXKL1 / GT-I8150 --

hadidjapri said:
actually i dont think extensive rom flasher will follow this guide but i do agree with pep about going pristine
Sent from my GT-I8150
Click to expand...
Click to collapse
Well doing this just seems alot more effort if you have alot of apps and games and why alot of people won't do this. I mean I have 70 apps/games installed so having to manually install all of them again is just to much effort.

Broken Puzzles said:
Well doing this just seems alot more effort if you have alot of apps and games and why alot of people won't do this. I mean I have 70 apps/games installed so having to manually install all of them again is just to much effort.
Click to expand...
Click to collapse
Well, I also have a lot of apps and games, but for me the added stability is totally worth it.
Especially since there's a café providing fast and free wifi near my office
-- CM9b4 / CastagnaIT 7.3 BFS+ExtUV / DXKL1 / GT-I8150 --

Broken Puzzles said:
Well doing this just seems alot more effort if you have alot of apps and games and why alot of people won't do this. I mean I have 70 apps/games installed so having to manually install all of them again is just to much effort.
Click to expand...
Click to collapse
If you didn't want to install again all your apps one by one just backup your apps with titanium backup pro and then restore ONLY the apps after doing pristine route.
For me the pro version of titanium backup will automate the installation so just leave your phone after restoring from titanium backup cause it will automagically install all your backed up apps without you having to select it one by one.
And don't restore the apps data because it will ruins your halfway through pristine route.
Sent from my GT-I8150 using Xparent ICS Tapatalk 2

reddvilzz said:
If you didn't want to install again all your apps one by one just backup your apps with titanium backup pro and then restore ONLY the apps after doing pristine route.
For me the pro version of titanium backup will automate the installation so just leave your phone after restoring from titanium backup cause it will automagically install all your backed up apps without you having to select it one by one.
And don't restore the apps data because it will ruins your halfway through pristine route.
Sent from my GT-I8150 using Xparent ICS Tapatalk 2
Click to expand...
Click to collapse
Well... *most* .apk's *should* be safe...
But, considering that Play Store *can* detect what's your OS and *does* offer apps based on your OS, there's a possibility that the .apk has been optimized for your (previous) OS's generation (e.g., GB or ICS or JB). If you stick with the same generation, in general there shouldn't be any problems. But if you change generations, there *might* be problems.
I decided that it's better to be careful than sorry, so I don't restore any apps, even without attached data
-- CM9b4 / CastagnaIT 7.3 BFS+ExtUV / DXKL1 / GT-I8150 --

pepoluan said:
Well, I also have a lot of apps and games, but for me the added stability is totally worth it.
Especially since there's a café providing fast and free wifi near my office
-- CM9b4 / CastagnaIT 7.3 BFS+ExtUV / DXKL1 / GT-I8150 --
Click to expand...
Click to collapse
Thats weird since the stability is the same after factory reset your phone 5 times before flashing anything new and restore from Titanium backup. Also I don't know if you see the flaw in your method especially if you play alot of games and thats if you only reinstall the apk and not the data you have to start all over again and let me tell you that pisses off any gamer when it happens. Not just on a phone but on anything but just saying.
reddvilzz said:
If you didn't want to install again all your apps one by one just backup your apps with titanium backup pro and then restore ONLY the apps after doing pristine route.
For me the pro version of titanium backup will automate the installation so just leave your phone after restoring from titanium backup cause it will automagically install all your backed up apps without you having to select it one by one.
And don't restore the apps data because it will ruins your halfway through pristine route.
Sent from my GT-I8150 using Xparent ICS Tapatalk 2
Click to expand...
Click to collapse
I do use titanium backup to restore all my apps but I was just pointing out that while this method is good and has a possibility of making the ROM more stable it does provide more problems like I said above if you are an avid gamer and losing all your save data and having to start again will drive you insane.

Broken Puzzles said:
Thats weird since the stability is the same after factory reset your phone 5 times before flashing anything new and restore from Titanium backup.
Click to expand...
Click to collapse
Factory reset 5 times?? What's the point? Since a single factory reset already means a reformatting of your partition...
Your flash memory is not like an overly-dirty carpet that needs to be shampooed and vacuumed several times before all the grime comes out of it. One format -- done. Nothing left.
I'm just pointing out the fact: Many problems that many experienced when they flashed CM9 -- did not happen to me. Ever. And I *strongly* suspect that leftover bits (settings, incompatible code, etc.) is the culprit.
Broken Puzzles said:
Also I don't know if you see the flaw in your method especially if you play alot of games and thats if you only reinstall the apk and not the data you have to start all over again and let me tell you that pisses off any gamer when it happens. Not just on a phone but on anything but just saying.
Click to expand...
Click to collapse
That is a flaw that I'm perfectly capable of living with.
As you note, in the thread's title, I'm not claiming of something along the lines of: "Want your CM9 to be stable? This is the way!!1!one!!eleven". I use a simple title of "Going Pristine: What, Why, How".
The onus lies on the viewer of this thread, whether they can live with the consequences or not.\
Broken Puzzles said:
I do use titanium backup to restore all my apps but I was just pointing out that while this method is good and has a possibility of making the ROM more stable it does provide more problems like I said above if you are an avid gamer and losing all your save data and having to start again will drive you insane.
Click to expand...
Click to collapse
For me -- and other non-gamers, or non-avid gamers -- losing save data is not a 'problem'. An 'annoyance', for sure, but not 'problem'.
Again, I am not forcing my methods on you or other W users here. I'm just stating the fact: 1) What is meant by 'going pristine', 2) Why 'going pristine' is good, and 3) How to 'go pristine'.
That said...
I understand your concerns, and I'll edit my first posting to warn avid gamers that they will go insane :cyclops:

pepoluan said:
Factory reset 5 times?? What's the point? Since a single factory reset already means a reformatting of your partition...
Your flash memory is not like an overly-dirty carpet that needs to be shampooed and vacuumed several times before all the grime comes out of it. One format -- done. Nothing left.
I'm just pointing out the fact: Many problems that many experienced when they flashed CM9 -- did not happen to me. Ever. And I *strongly* suspect that leftover bits (settings, incompatible code, etc.) is the culprit.
Click to expand...
Click to collapse
Well I had problems in the past with only 1 factory reset as some left over stuff from the old rom was carried over to the new one so I do that just in case and it cleared up the problems I was having.
That is a flaw that I'm perfectly capable of living with.
As you note, in the thread's title, I'm not claiming of something along the lines of: "Want your CM9 to be stable? This is the way!!1!one!!eleven". I use a simple title of "Going Pristine: What, Why, How".
The onus lies on the viewer of this thread, whether they can live with the consequences or not.\
Click to expand...
Click to collapse
Not saying your not fine with that flaw but just pointing out that while your method is best suited to someone not using their phone for its entertainment features but more serious stuff.
For me -- and other non-gamers, or non-avid gamers -- losing save data is not a 'problem'. An 'annoyance', for sure, but not 'problem'.
Again, I am not forcing my methods on you or other W users here. I'm just stating the fact: 1) What is meant by 'going pristine', 2) Why 'going pristine' is good, and 3) How to 'go pristine'.
That said...
I understand your concerns, and I'll edit my first posting to warn avid gamers that they will go insane :cyclops:
Click to expand...
Click to collapse
Well obviously its not a problem if your not a gamer otherwise you would freak when losing your save data, not just on a phone but on any gaming device.
Not saying your forcing others to do this but again just pointing out that unless you are more of a casual user of your phone and don't really bother with gaming then this method is great otherwise like me you are going to just restore all your apps with data anyway.

Broken Puzzles said:
Well I had problems in the past with only 1 factory reset as some left over stuff from the old rom was carried over to the new one so I do that just in case and it cleared up the problems I was having.
Click to expand...
Click to collapse
Ah, you mean doing a factory reset after flashing the ROM?
I see. That might help... but since the non-resetted portion of your phone (SD cards) still contain leftover bits from the previous ROM, there is a possibility of additional problems. Which will lead to yet-another-factory-reset, ad nauseam (or at least until it's stable enough).
I personally prefer having it started out stable, then adding bits and pieces until it becomes unstable... easier to troubleshoot which part is the culprit
Broken Puzzles said:
Well obviously its not a problem if your not a gamer otherwise you would freak when losing your save data, not just on a phone but on any gaming device.
Not saying your forcing others to do this but again just pointing out that unless you are more of a casual user of your phone and don't really bother with gaming then this method is great otherwise like me you are going to just restore all your apps with data anyway.
Click to expand...
Click to collapse
Point taken. :good:
I've edited the OP to more clearly indicate some (potential) drawbacks in a (hopefully) humorous way

Is link2sd still work in our phone? I read somewhere that link2sd never work with cmw 6. Even myself see a wierd note when I boot into recovery after flashing link2sd.
Another question, please give me a reason why I use ext2 compare to ext3/4? I search the net but I only found speed for ext2 and data loss prevention and stability in ext3/4. I wonder why if there's any benefit specifically in our phone.
Thank you...
Sent from my GT-I8150 using Tapatalk 2

vhick said:
Is link2sd still work in our phone? I read somewhere that link2sd never work with cmw 6. Even myself see a wierd note when I boot into recovery after flashing link2sd.
Click to expand...
Click to collapse
Yes, it still works.
The 'weird' note that you saw must have been CWM's warning that the ROM *seems* to want to install a Recovery that will overwrite CWM.
Just ignore it. Choose 'No' for the answer (that is, just press the Home button to execute the first answer, which should be 'No' IIRC).
CWM shows the warning because the method used by Link2SD to initialize the 2nd partition hooks directly into a known method of restoring Recovery.
vhick said:
Another question, please give me a reason why I use ext2 compare to ext3/4? I search the net but I only found speed for ext2 and data loss prevention and stability in ext3/4. I wonder why if there's any benefit specifically in our phone.
Click to expand...
Click to collapse
Okay, the explanation is technical, please bear with me.
ext3/4 introduce what is known as 'journaling' to prevent inconsistent metadata on unclean interrupted writes. The 'journal' is a region of storage set aside to write a 'log' of metadata changes, circularly. Due to the circular log, the region will be intensively used. No problem on magnetic disks, *big* problem on flash memory due to two factors:
1. Limited number of write cycles. Every update to the circular log shortens the life of the Flash memory extensively.
2. The necessity of wiping a whole block of memory (1 or 4 MB, depends on manufacturer) even if ext3/4 need to overwrite just 1 KB of data. This requires *extremely* expensive read-modify-write cycles. Compounded with the single core we have on the W, this means expensive context switching as writes get stalled and the OS hands over timeslice to other waiting threads.
ext2 has no journal, so it's much more flash-friendly, but if writes (in this case, creation/deletion of files) got interrupted uncleanly, you might lose some data or worse.
However, since Link2SD only put apk files in the 2nd partition, and these apk files are never edited (except on upgrades), the drawback of ext2 is not really applicable (IOW, ext2 is *extremely* suitable for nearly-read-only storage access pattern).
-- CM9b4 / CastagnaIT 7.3 BFS+ExtUV / DXKL1 / GT-I8150 --

Hi Pepoluan, hope you don't mind, but I've linked to this thread in my "Rooting, ClockworkMod and Custom ROMs" (sticky) thread....think it will help a lot of people
Sent from my CM10 powered Wonder with Tapatalk 2......it's all good......

keithross39 said:
Hi Pepoluan, hope you don't mind, but I've linked to this thread in my "Rooting, ClockworkMod and Custom ROMs" (sticky) thread....think it will help a lot of people
Sent from my CM10 powered Wonder with Tapatalk 2......it's all good......
Click to expand...
Click to collapse
No problem. In fact, the honor is mine
-- CM9b4 / CastagnaIT 7.3 BFS+ExtUV / DXKL1 / GT-I8150 --

pepoluan said:
Yes, it still works.
The 'weird' note that you saw must have been CWM's warning that the ROM *seems* to want to install a Recovery that will overwrite CWM.
Just ignore it. Choose 'No' for the answer (that is, just press the Home button to execute the first answer, which should be 'No' IIRC).
CWM shows the warning because the method used by Link2SD to initialize the 2nd partition hooks directly into a known method of restoring Recovery.
Okay, the explanation is technical, please bear with me.
ext3/4 introduce what is known as 'journaling' to prevent inconsistent metadata on unclean interrupted writes. The 'journal' is a region of storage set aside to write a 'log' of metadata changes, circularly. Due to the circular log, the region will be intensively used. No problem on magnetic disks, *big* problem on flash memory due to two factors:
1. Limited number of write cycles. Every update to the circular log shortens the life of the Flash memory extensively.
2. The necessity of wiping a whole block of memory (1 or 4 MB, depends on manufacturer) even if ext3/4 need to overwrite just 1 KB of data. This requires *extremely* expensive read-modify-write cycles. Compounded with the single core we have on the W, this means expensive context switching as writes get stalled and the OS hands over timeslice to other waiting threads.
ext2 has no journal, so it's much more flash-friendly, but if writes (in this case, creation/deletion of files) got interrupted uncleanly, you might lose some data or worse.
However, since Link2SD only put apk files in the 2nd partition, and these apk files are never edited (except on upgrades), the drawback of ext2 is not really applicable (IOW, ext2 is *extremely* suitable for nearly-read-only storage access pattern).
-- CM9b4 / CastagnaIT 7.3 BFS+ExtUV / DXKL1 / GT-I8150 --
Click to expand...
Click to collapse
For long searching....at last I found the solution! Kudos!
Thank you so much, and its clearly now, specially using link2sd and understanding ext2/3/4 filesystem

sorry for the noob question but y should i have 2 partitions on my sdcard and wts the use of the second partition (ext2) and if i have a 32 GB sdcard wt will be the best partitioning for it (how much for the fat32 and for the ext2)

Related

[APP] Apps2NAND - fast data access - choose what to move! [added support for Froyo]

I think this better to be posted to Galaxy S I9000 Android Development.
So I posted it once more at here:
http://forum.xda-developers.com/showthread.php?p=7694817#post7694817
Board Admin, please feel free to delete this.
Hi all,
I took so many from here. It's time for me to contribute little to the community.
The lag issue of Galaxy S bother many ppl.
I tried many different method.
Yes the lag issue was improved and Quadrant score is higher.
But there are always some weird things happen... like sudden lag/black screen.
After I upgraded to firmwre I9000ZSJH1, the lag issue is improved a lot!
But still, there are rooms for improvement.
So I wrote a cmd which will help to generate a .sh file, which will move apps data stored under /data/data/ to the internal NAND memory (/dbdata/data) for faster access.
The Galaxy S built in 1xxMB of fast access NAND memory. It is a waste if we don't utilize them.
However, it is impossible to move all apps' data to the tiny NAND memory.
So here is a tool for you to customize what app's data you want to move.
Recommand to move the core Android apps and the apps that you use frequently.
Like Dialer, Contacts, Dolphin Browser, Facebook, Astro File Explorer......
Steps :
1. open [1.app.list.xls] and edit colume A and B.
colume A should be the data folder name of the apps you want to move.
colume B is the name of the apps (optional)
2. after you've done, simply "copy & paste" everything onto a notepad and save it as [2.apps.list.txt]
3. fireup the [3.Apps2NAND.cmd]
4. within few sec, a file [App2NAND.sh] will be created.
5. use Gscript to load and run the App2NAND.sh file. (the script requires root access. so make sure you have it!)
For experienced user :
Step 1 actually is just for user to manage the apps more clearly.
A user with little cmd knowledge may know the script only requires [2.app.list.txt] to work with.
You can skip Step 1 and directly go to Step 2 to edit the file.
The format should be { app data folder name + <tab> + app name }
Remarks :
Apps that moved to NAND may not be restore with Titanium Backup.
App link will be broken by doing so.
(I also include Linpack and Quadrant to the app list to cheat higher benchmark scores . You may remove it if you don't want to.)
Apps2NAND - fast data access - choose what to move! [added support for Froyo]
update 18 Nov 10:
Found some friends here still want to use this "old school" lagfix
1st of all, thanks to your support.
When I wrote this script, it was still the golden age of Eclair (2.1). So the script is definitely not prepared for Froyo (2.2).
However, just by changing few lines can make this script survives on Froyo. So here I updated a script for Froyo (apps2nand.Froyo.zip).
I haven't tested it since I am very satisfied with the [Spike Speedy Edition v3.0 OC], which comes with more advanced lagfix options (sztupy).
(I wrote something that even myself don't use now.... So it's really suprised and appreciated~)
But this script still has it merit ~~~~~~~~~ simple!
(and battery friendly, just a feeling~ no actually statistic~)
If you are interested in antique and brave enough, try it on Froyo. And let me know if any issues. I will try my best to fix.
===================================================
update 18 Aug 10:
Now included Installation and Uninstallation for this script.
Tried several times on my i9000 and it works.
Please read and follow the readme.txt inside the zip.
One tricky part for this script : it will failed when SU permission is not allowed in time during the script is running.
I have pause the script with 10 secs for you to allow the SU on i9000.
Make sure you allowed it.
If you failed to do so, no worry. it won't change anything.
Just simply re-run the script again.
===================================================
Hi all,
I took so many from here. It's time for me to contribute little to the community.
The lag issue of Galaxy S bother many ppl.
I tried many different method.
Yes the lag issue was improved and Quadrant score is higher.
But there are always some weird things happen... like sudden lag/black screen.
After I upgraded to firmwre I9000ZSJH1, the lag issue is improved a lot!
But still, there are rooms for improvement.
So I wrote a cmd which will help to generate a .sh file, which will move apps data stored under /data/data/ to the internal NAND memory (/dbdata/data) for faster access.
The Galaxy S built in 1xxMB of fast access NAND memory. It is a waste if we don't utilize them.
However, it is impossible to move all apps' data to the tiny NAND memory.
So here is a tool for you to customize what app's data you want to move.
Recommand to move the core Android apps and the apps that you use frequently.
Like Dialer, Contacts, Dolphin Browser, Facebook, Astro File Explorer......
For experienced user :
Step 1 actually is just for user to manage the apps more clearly.
A user with little cmd knowledge may know the script only requires [2.app.list.txt] to work with.
You can skip Step 1 and directly go to Step 2 to edit the file.
The format should be { app data folder name + <tab> + app name }
Remarks :
*** Apps that moved to NAND may not be restore with Titanium Backup. App link will be broken by doing so.
*** Please make a nandroid backup before apply this!
*** I am not responsible for any damage caused by this script.
(I also include Linpack and Quadrant to the app list to cheat higher benchmark scores . You may remove it if you don't want to.)
Is NAND where devices like HTC Desire and Nexus One store their Apps?
well this is almost what paul did some days after the phone got released...
lyno said:
Is NAND where devices like HTC Desire and Nexus One store their Apps?
Click to expand...
Click to collapse
Yes, which is why they needed APPS2SD in Froyo.
So....when are you posting the script?
If you want I'll create a program that spits out the .txt file rather than do it in excel, copy paste etc.
Jonas.M said:
well this is almost what paul did some days after the phone got released...
Click to expand...
Click to collapse
yes. that's what Paul did as I mentioned in my script.
But he simply push everything to NAND which oneday, you will find out of space.
Using my script, you can decide what to move, depending on the frequency of the apps usage.
lyno said:
So....when are you posting the script?
If you want I'll create a program that spits out the .txt file rather than do it in excel, copy paste etc.
Click to expand...
Click to collapse
the script is updated and posted.
the excel is just for user to maintain their app list easily.
my script only works with the txt file.
you may skip the excel part if you like.
and thanks for your offer, lyno.
Is it possible to make a script that automatically moves smaller apps to the nand?
I mean it's not worth moving large games, but anything under 2MB should be considered.
Maybe use some intellegent calculation, if all the apps under XMB use less than 50% of free space on nand, increase X until it is efficiently used up.
Also there is HEAPS of space to be freed in NAND, delete stock ringtones, and other.
seems great
hmm, would moving to nand make those specific apps run faster than they would be if they were previously running under ext2/3/4 partitions provided for by the various lagfixes out there?
What happens if an app in the list is not on the phone, does it just skip it?
sturmeh said:
Is it possible to make a script that automatically moves smaller apps to the nand?
I mean it's not worth moving large games, but anything under 2MB should be considered.
Maybe use some intellegent calculation, if all the apps under XMB use less than 50% of free space on nand, increase X until it is efficiently used up.
Also there is HEAPS of space to be freed in NAND, delete stock ringtones, and other.
Click to expand...
Click to collapse
MiG123 said:
hmm, would moving to nand make those specific apps run faster than they would be if they were previously running under ext2/3/4 partitions provided for by the various lagfixes out there?
Click to expand...
Click to collapse
sturmeh, that requires more complex scripting skills, which is out of my knowledge...
and I think instead of choosing the apps2NAND depending on size, I think the "Frequency" of using the apps may be more appropriate.
e.g. I use TouchPal IME a lot. So I move it to the NAND.
Now when I type, TouchPal act lightening!!!
MiG123, I haven't done a serious comparison. But as I remembered, Apps2NAND gives me more "smooth" feeling.
Actually, you shouldn't compare Apps2NAND to other Apps2SD or EXT.
Since Apps2NAND only offers you around 1xxMB of app storage space. Way too far from the others experts' methods.
I suggest using this is because I am using the latest 2.1 ROM, I9000TGYJH1 (http://www.multiupload.com/UTKSZPTKCG), which the lag problem seems improved a lot. But on top of it, I don't want to waste that 1xxMB of internal RAM, so I introduce this method.
To let user choose what core apps that should be put into NAND so
- space is not wasted.
- certain apps enjoy even faster response time.
lyno said:
What happens if an app in the list is not on the phone, does it just skip it?
Click to expand...
Click to collapse
yes.
the script will skip the apps that is not in the list.
MiG123 said:
hmm, would moving to nand make those specific apps run faster than they would be if they were previously running under ext2/3/4 partitions provided for by the various lagfixes out there?
Click to expand...
Click to collapse
Definitely, the hardware is multitudes faster.
Where's the file? Can't seem to find it on the first page
Anyhow. Do you symlink the old location to the new location, thus being able to keep the link intact? That should sort out any problems with backup solutions such as Titanium Backup.
How do you find the app's data folder name?
mekwall said:
Where's the file? Can't seem to find it on the first page
Anyhow. Do you symlink the old location to the new location, thus being able to keep the link intact? That should sort out any problems with backup solutions such as Titanium Backup.
Click to expand...
Click to collapse
lyno said:
How do you find the app's data folder name?
Click to expand...
Click to collapse
mekwall, sorry. removed by mistake.
have uploaded back again now.
yes. it uses symlink method (from Paul's concept) :
ln -s /dbdata/data/appsname /data/data/appsname
i dunno how's Titanium Backup works but it just failed to restore any apps that has used Apps2NAND...
that's why i provide the Uninstallation method to restore it back and then run Titanium Backup to backup all apps and data.
lyno, you may try the Astro File Explorer (market).
It has a function to backup the installed apps out to /sdcard.
The name of the backuped apps will be named exactly the same as it's data folder name.
e.g. Brut's Google Map -> brut.googlemaps.apk
this whoe procedure demands root-access, right?
yes. since it involves moving folders between /dbdata and /data.
Sent from my GT-I9000 using XDA App

[Q] Why your kaiser is NOT stable

Most of you reading this probably have unstable kaisers. I am here to tell you why. Many of the issues you are facing are due to old kernel's, bad overclocks, having data corruption etc.
The simplest way to get the latest kernel is to view the kernel thread that is stickied at the top. That alone may solve your issues. Also please do make sure you have the latest build of the one you choose to use.
Others of you out there have overclocked your kaiser. This is fine to do, I myself am overclocked to 572 Mhz. But this only fine if you do it right. Do not overclock through Atools. That causes some instabilities as the kaiser for some reason does not like being overclocked through the kernel. Use Rogue Tools instead and you should see issues going away and perhaps even be able to go to a higher overclock.
Finally, the most stable installation is to have SYS on NAND and Data on SD. Does it make sense to keep your eggs in one baskete? Certainly not. Also with this method Data goes through an additional check if it is not cleanly unmounted. This makes a big difference if you have a lot of apps.
aceoyame said:
Most of you reading this probably have unstable kaisers. I am here to tell you why. Many of the issues you are facing are due to old kernel's, bad overclocks, having data corruption etc.
The simplest way to get the latest kernel is to view the kernel thread that is stickied at the top. That alone may solve your issues. Also please do make sure you have the latest build of the one you choose to use.
Others of you out there have overclocked your kaiser. This is fine to do, I myself am overclocked to 572 Mhz. But this only fine if you do it right. Do not overclock through Atools. That causes some instabilities as the kaiser for some reason does not like being overclocked through the kernel. Use Rogue Tools instead and you should see issues going away and perhaps even be able to go to a higher overclock.
Finally, the most stable installation is to have SYS on NAND and Data on SD. Does it make sense to keep your eggs in one baskete? Certainly not. Also with this method Data goes through an additional check if it is not cleanly unmounted. This makes a big difference if you have a lot of apps.
Click to expand...
Click to collapse
This really really confused me a lot So... if I follow ur advice, i should install data over an... ext2 partition??? I thought all the oposite... that this made the system unstable... cause NAND allready included yaffs precisely to avoid or at least minimize this... or do u mean to an ext3, but someone told me journaling isnt a good idea for our oldtimers... so please correct me if im wrong....
Yes nand does have yaffs but nand itself is somewhat unstable still. What I mean is to install Sys on nand like usual and then pick the data on SD with ext2.img.
uhmm... thanks for ur quick answer aceoyame... gonna try this later...
albertorodast2007 said:
uhmm... thanks for ur quick answer aceoyame... gonna try this later...
Click to expand...
Click to collapse
We like data on NAND for two reasons:
SPEED, NAND is several times faster than the best SD card out there (probably more due to the kaiser sd reader than the SD itself.
Data access, DATA on NAND makes it impossible to mount the SD, unless you partition , yet Windows itself cannot access partitons other than the first on Removable drives.
Yet, ext2 is more stable than Yaffs. Now don't get us wrong, you get errors on DATA and not on SYSTEM with both on NAND, because DATA is mounted rw and system ro... otherwise, we would have errors on both of them.
daedric said:
We like data on NAND for two reasons:
SPEED, NAND is several times faster than the best SD card out there (probably more due to the kaiser sd reader than the SD itself.
Data access, DATA on NAND makes it impossible to mount the SD, unless you partition , yet Windows itself cannot access partitons other than the first on Removable drives.
Yet, ext2 is more stable than Yaffs. Now don't get us wrong, you get errors on DATA and not on SYSTEM with both on NAND, because DATA is mounted rw and system ro... otherwise, we would have errors on both of them.
Click to expand...
Click to collapse
shure, i've got that idea allready, I know they dont have the same function but /sys its like if we talk about the FLASH/BIOS on a regular PC, can't be accesed unless its flashed, and /data is more like the RAM, its constantly under I/O process... so... basically what ur saying is that: if /data is installed on an .img on sd, it will REDUCE (but wont completely solve) data corruption, sacrificing some of the speed, and the fact that u wont be able to unmount, unless its partitioned... pros are, i guess, u got more free space for ur apps, and less Data corruption
Again, please correct me if im wrong.
albertorodast2007 said:
shure, i've got that idea allready, I know they dont have the same function but /sys its like if we talk about the FLASH/BIOS on a regular PC, can't be accesed unless its flashed, and /data is more like the RAM, its constantly under I/O process... so... basically what ur saying is that: if /data is installed on an .img on sd, it will REDUCE (but wont completely solve) data corruption, sacrificing some of the speed, and the fact that u wont be able to unmount, unless its partitioned... pros are, i guess, u got more free space for ur apps, and less Data corruption
Again, please correct me if im wrong.
Click to expand...
Click to collapse
Yet i feel the biggest, baddest reason for the instability.... is due to the way we are (forced to) porting the Android. We're hacking our way, getting bits from here... bits from there... compiling generic rils because we can't make the official one work, creating strange scripts to mount data/sys instead of using vold (i assume this is standard), dealing with battery issues first for the hacking situation, second because, and we must accept this, our device is OLD, so are our batteries. Perhaps WM is more accepting of damaged/old/failing batteries, but android is not. Due to extreme power draws on situations, it's normal that our batteries drop to 3.3... 3.2.... perhaps even 3.0V. This won't happen as often with a new battery. Power is more constant.
We have to remind ourselves, this is a hack, a unsuported port.
We do our best, and we try to fix issues as they come. But we, as of yet, are not able to keep up with the issues. There's simply to many problems, to few resources for help...
I'm gratefull to the comunity, i've been using Android since cupcake on the Kaiser... on first boot, i as :O with its speed... how fluid it was against windows... i only wish they get better and better... but its like trying to read a book in a dark room in a foreign language suffering of extreme eye sight problems
To be correct... and honest.... i'me using Android on a Kaiser with a 2800mAh bat. The battery is sufficient. It lasts days with extreme usage. The device is constant, but unstable. I've found out that the longer i can keep the device from crashing/soft-reseting, the less i loose from /DATA. So, as of now, i'm happy.
But all this hard work is worthwhile when u slide ur hw keyb and decide to... PLAY POKEMON RUBY ON ANDBOID! and all ur friends are like: man how u do that?? f*** awsome!
albertorodast2007 said:
But all this hard work is worthwhile when u slide ur hw keyb and decide to... PLAY POKEMON RUBY ON ANDBOID! and all ur friends are like: man how u do that?? f*** awsome!
Click to expand...
Click to collapse
Please to be explaining!!!!!!
Like.... NOW
Dont u know another gameboy emulator? i remembered to even play a ds emulator on my iphone!

Kernel With Separate Cache Partition

Hello everyone,
I've compiled a kernel which separates the NAND memory into 3 partitions (well more then that but anyway). These partitions are system, data and cache like a native Android phone (which also has recovery but we don't need that). Previously cache was linked to a directory on the data partition which was constantly becoming corrupt causing errors on start-up. Often clearing dalvik-cache would allow Android to boot but data was lost. There's nothing to say that this will solve the problem but i'm giving it a go so thought I would post it up for you to try also.
The cache partition is 20mb which means the data partition is only 90mb or so. If you like a million apps on your phone either put some on your SD card or don't use it
I haven't completely incorporated this partition into the initrd which means that currently it will only mount if data is also on NAND but this can be changed easily enough, but for testing purposes I want everything on the NAND chip anyway.
Downloads from market on all versions of Android, unless the init.rc directory is changed in Gingerbread, all go to the cache partition and are deleted on restart. What this means is that you can't download and install an app larger then 20mb (which isn't recommended anyway with the small amount of data space available). This is a drawback but for those that use data on SD it should be possible in the future to utilise more of the NAND memory for cache so you can install whatever you want. I don't know of many apps larger then 20mb anyway though.
I have included a modified version of ATools in the zip. The standard version will overwrite the partition values and the kernel won't work properly so if you need to modify the kernel use the version included. It is also important that you DO NOT change the system or data partition sizes in ATools as this hasn't been modified to account for the cache partition so will mess it all up.
I have also included an androidupdate.tar modules update for the kernel in case your wifi doesn't work after flashing the kernel.
I think that's it for now, let me know how it goes!
EDIT::
One last thing, you will need to wipe your DATA partition to use this kernel because some of your data may be positioned where the cache partition is now, so if you load this kernel and android is heavily corrupt you know what you have to do!
To check the kernel is working correctly you can type "df -h" into a terminal and it should show all of the current partitions including one called cache on mtdblock4.
Should now work with polaris, kaiser and vogue. There is a VOGUEIMG.NBH included for those who have trouble with ATools. It is completely untested on Vogue so sorry if it doesn't work.
EDIT
I have re-uploaded a modified kernel because there was some issues with data with the last one. If you have already applied the last one flash the new one and apply the module update again
testing will leave feedback
Ok, using your Scoot CyanogenMod 6.1.2 (RLS6) [16.03.2011], overclock via atools+roguetools to 529, gpu oc, battery units tweaked to suit my battery.
No SIM card yet, don't have one to put there, sync with google to get contacts.
Installed GoLauncher. Enabled JIT and Keep Launcher in memory.
Once in a while, Android is killing all apps, launcher included... strange...
Nevermind that, it was Cyanogen and the LongPress BackKey. LongPress on our Kaisers during lag can become short press
First couple of days of heavy use I've had in ages with no corruption. First day of my new job today so it's been on Google Navigation for 3 hours and used extensively during the day. Had to do a hard reset at one point and everything was fine. had a few soft reset's too. Don't get me wrong, i'd be surprised if this is a fix, but it's been a while since I've used my Kaiser this much and not had to wipe my data partition!
Update: CM is a bit slow, trying:
VaniljEclair RLS11 - A fast & stable CM 5.0.8 for Vogue/Kaiser/Polaris [2010-08-19]
And everyting seems good. I've pushed it a little, several normal reboots.
Had to reflash system (didn't reflash data). No errors, FC's, whatevar. Everything works, yet didn't try to make/receive calls. Its 1am here...
Now this particular version, has a god damn bug that is get the best of me. The Power Button and the red button won't make the phone go to standby. If i long press, i get the normal reboot/power off/airplane etc menu, on both keys. But single press is ignore... Any idea ?
scooter1556 , i have a question. It is not the purpose of the thread or kernel, but how difficult would it be to activate scalling of the cpu ?
Right now, the two 3 biggest issues with Android on the Kaiser are, IMHO, Data corruption, Battery life, performance.
Please share your thoughts
Using this kernel with Valentine 1.02. GPU overclocked and CPU @ 520mhz. Super fast and for the first time... no data corruption! Verry happy so far!
daedric said:
scooter1556 , i have a question. It is not the purpose of the thread or kernel, but how difficult would it be to activate scalling of the cpu ?
Right now, the two 3 biggest issues with Android on the Kaiser are, IMHO, Data corruption, Battery life, performance.
Please share your thoughts
Click to expand...
Click to collapse
Well in theory not too hard, there is a feature built into the linux kernel called cpufreq which is currently disabled in our kernel because our cpu and chipset code doesn't support it but krazy-killa has been working on getting it working in his kernels with a little success as far as i'm aware but i'm not that sure. I haven't personally looked into it but if I get some spare time I definitely will. I've started a new job now which i'm sure will keep me quite busy but I still intend to so some work on the Kaiser when I get time
Best of luck on your new job! I wish i had enough knowledge to continue the kernel development, but i'm quite a ignorant
Still, thank you, till now it's one of the best kernels i've used.
Hi Scoot!
I love your kernel. No data corruption so far (two days). did a few stylus resets and stuff.. Magical =D. Now IMO we only need better sleeping and autofocus to call kaiser a fully android device! Please Keep up the awesome job, scoot! thanx, danke, sposeeba, bedankt, aciu, dzenkuja!
Nice job scooter, I've been using Scoot CyanogenMod 7.0.2 RLS2 [28/04/11] @ 500MHz, and it seems fine so far.
I tried Fat Free Froyo before CyanogenMod, which also worked great for the few hours it was running. I'm not sure which one to stick with though.
Keep up the good work. I wish I could help with the development, but I have yet to learn programming (been ten years now ).
This kernel looks pretty stable, but just a few quick questions:
1) What filesystem is used for the cache? If YAFFS, could it get corrupted? If Yes, what would happend then?
2) Is it really needed to have 20MB for the cache? ATM it seems to be used only by a like 1-2MB on the cache partition, would not it be enough to have for example 10MB for the cache leaving more space for apps?
3) What is the difference using apps in the system and data partitions? If I would run off the space on the data partition, can I put some apps in the system apps folder to save the space without wandering about how it works?
Thanx for your great work, finally it seems to be fully usable for me and if you and Krazy-Killa would be able to work together to manage the power consumption, then it would be amazing, because I am going to get new phone (running some new extensive business and I can not afford to be not reachable when something happends on Kaiser) and give this lovely piece of HW to my son... And I really do not want him to have a WM machine But Android needs to be stable for him to use Well... he will get it for his 10th birthday at 6.9. so we still have some time to tweak it a bit more
if this works then it would be magical, your CM builds were so fast and awesome and if there's no data loss then... <3
Made 2 mistakes when building kernel (selected tilt instead of normal and forgot to OC to 480MHz), and running kingshui's 12/15/2010 build 2.2.1. seems ROCK solid and fast! I applaud your use of ramzswap for the extra 20mb, bravo!
I'm just hoping I can go back and rebuild the kernel with the correct settings without messing up the system/data/cache partitioning.
PoXFreak said:
Made 2 mistakes when building kernel (selected tilt instead of normal and forgot to OC to 480MHz), and running kingshui's 12/15/2010 build 2.2.1. seems ROCK solid and fast! I applaud your use of ramzswap for the extra 20mb, bravo!
I'm just hoping I can go back and rebuild the kernel with the correct settings without messing up the system/data/cache partitioning.
Click to expand...
Click to collapse
They aren't mistakes, those are the settings I need for my Kaiser. I included a modified version of ATools for you all to modify the kernel for your devices as I stated in the first post
a.s.j said:
1) What filesystem is used for the cache? If YAFFS, could it get corrupted? If Yes, what would happend then?
2) Is it really needed to have 20MB for the cache? ATM it seems to be used only by a like 1-2MB on the cache partition, would not it be enough to have for example 10MB for the cache leaving more space for apps?
3) What is the difference using apps in the system and data partitions? If I would run off the space on the data partition, can I put some apps in the system apps folder to save the space without wandering about how it works?
Click to expand...
Click to collapse
1) The cache partition is still using Yaffs2 because it is the easiest filesystem to configure at the minute, but the idea of making it a separate partition like on a native android device is that it can be changed to another filesystem in the initrd relatively easily. If it gets corrupted it will do what it used to I guess, but I haven't had any corruption as of yet so it's difficult to say. Hopefully if the cache partition get's corrupted it shouldn't affect data so you should just be able to wipe and format dalvik-cache in the install menu.
2) I made it 20mb because most android devices have 30mb or bigger and this is mainly because market app downloaded get downloaded here before being installed, so if you installed google maps for instance it would use up 6mb, plus the standard 1-2mb normally being used, but if you only had a 10mb cache for instance, you would only be able to install apps less then 8mb which is a little limiting really. I don't really care much about installing lots of apps in data or on the phone at all for that matter so having 95mb for data is more then enough for me.
3) You can put apps in the system partition in /system/app. The system partition is read only so all data for the app still goes to the data partition. You can still save a little data partition space though if you need it. Most installs of android are 80-95mb which should leave you 5mb or so to play with. Some all language builds pretty much use up all of the partition though so you need to look and see what space you have to play with before putting apps on the system partition. If you overload it you will probably end up corrupting it and having to reinstall. But to answer your last question, the system partition works in the same way as the data partition apart fro the fact that it is read-only and data is read/write.
I've modified my Kernel to use the NAND mtdblock3 (/data for everyone else) as the cache partition, since my NAND is pretty much shot to begin with, and have system and data on SD Card. So far it's made downloading Market Apps twice as fast, loading webpages pretty fast, and basically anything else that the cache is used for.
scooter1556 said:
They aren't mistakes, those are the settings I need for my Kaiser. I included a modified version of ATools for you all to modify the kernel for your devices as I stated in the first post
Click to expand...
Click to collapse
Scoot:
I understand that the settings built into the .nbh are for your device. What I was meaning was I needed to modify the CPU clock up to 480MHz, and for some odd reason my device swaps the "@" and "!" buttons if I set it to "tilt", among other buttons being set wrong.
Also, I am used to having the left and right softkeys set as "vol up" and "vol down" respectively. Is this something I need to make an androidupdate for, or do I have to write a new NBH?
PoXFreak said:
Scoot:
I understand that the settings built into the .nbh are for your device. What I was meaning was I needed to modify the CPU clock up to 480MHz, and for some odd reason my device swaps the "@" and "!" buttons if I set it to "tilt", among other buttons being set wrong.
Also, I am used to having the left and right softkeys set as "vol up" and "vol down" respectively. Is this something I need to make an androidupdate for, or do I have to write a new NBH?
Click to expand...
Click to collapse
Can you not do all of this using the ATools i provided in the attachment in the first post? You should be able to load the nbh into ATools and then set the CPU speed, change the keyboard type and remap the buttons and then save it before flashing. Just don't change the partition sizes as this will mess up the cache partition I added until I make it more permanent.

[IDEA] Android rescue.zip project..

So i am here with a new idea. A rescue.zip which can be used to rescue any android device which have a recovery like the famous cwm.
So here is it..
Some times we people screw up our android os like hell, and to reboot the device we usualy do a recovery flash of a new os, flash back our nandroid backup ( both on worst conditions) or even do permission fix, clean cache or dalvic cache( those in 'not that worse' conditions) . So thats are all the options we got. Rit?
Although flashing recovery backups, new roms can fix all, it will also eatup our apps, current setups, contacts, msgs, etc( in case we dont have backups) and will probably screw us. All we can do is say " WTF..WTF..WTF.."
SO here is my idea,
Find out the causes of what causes a reboot, non-boot, hang,fc etc.
And keep a zip that can be flashed through recovery, that has a solution for our problem. They may be including..
1) fix permission of system, data, and user data.
2) zipalign the apps
3) fix the default clock speed of processor
4) defragment memory
5) flash a new copy of su and busy box
6)wipe data or system or ext or cache or dalvic cache
7) flash a new copy of framework.res, system-ui.apk, settings.apk with default permissions( those files are kept in separate "custom" folder on the zip, so that end user can put their own files to that "custom" folder for flashing., the reason behind it is known to all, yap. Not all devices have them in common, every device have its own files)
These are all i got for now, pls post ur ideas and knowledge for any possible cure about any problem u faced/ cured. So that we can make it an ultimate rescue.zip that have a cure for 99% problems android os have. The rest 1% will go with a clean flash.( well we cant avoid that if we did something that bad).
So my plan is to use aroma installer( now on hard learning to find how it works). Throw in some scripts, files etc. Into the zip.
And since its not a device specific .zip file, i want to know how and why any problems are caused in any device( there are many common problems, but that is not what i ask for. I ask for device/os specific problems, and not for a problem that we can cure after booting, but for a problem that can make the device un-bootable) . So u people may help me to find those problems and cures for it. For my knowledge i have experience with wildfire and hd2.
Well i will keep this thread for a week or two, so that u can post ur knowledge, and info. after that i will release the file for u.
To the admin. Of the forum, pls keep this thread as announcement so that all can take a look.
HYPERDROID EXTREEM EDITION-THE NEW BENCHMARK ROM FOR HD2.
If you plan to do this available to any android device, the file size will be so big that it will become useless. Every phone has different apk, and not only that, but those apk are different in different version of os. For example, CM9 framework should not work on google release. Worst, older CM9 framework might not work on newer CM9 and newer framework might not work on older. Also, one of the cause of bootloop that i have been experiencing since i have my GNexus is data corruption of apps. The only way i had was to wipe data. I dont think there is a way to know if your app are corrupted with script. I also seen a lot of strange problem on SGS II like the kernel being erased. Well, in this case this package would be useless. So i guess that having this package would be awesome, but wont happen. My best advice is that you could create a universal guide on how to recover from bootloop/fc/hang with the minimum of impact on the phone. This is just my opinion tho.
Sent from my Galaxy Nexus using xda premium
You could add using flags in the updates filename, see some roms or themes for the lg optimus 2x for more information. It uses sed. For example, "update-wc-wd.zip" would wipe /data and /cache.
You could also merge these features in a customized clockwork mod recovery, the up side would be that you could automatically make a backup of the last flashed full ROM's systemui etc. this would also allow usage of the touch screen/volume keys to choose an repair option. You could even allow users to backup specific applications along with their data, and let users restore it later on after a fresh flash. I have some basic knowledge in modifying the recovery so I might help you out a little if you're interested.
chadouming said:
If you plan to do this available to any android device, the file size will be so big that it will become useless. Every phone has different apk, and not only that, but those apk are different in different version of os. For example, CM9 framework should not work on google release. Worst, older CM9 framework might not work on newer CM9 and newer framework might not work on older. Also, one of the cause of bootloop that i have been experiencing since i have my GNexus is data corruption of apps. The only way i had was to wipe data. I dont think there is a way to know if your app are corrupted with script. I also seen a lot of strange problem on SGS II like the kernel being erased. Well, in this case this package would be useless. So i guess that having this package would be awesome, but wont happen. My best advice is that you could create a universal guide on how to recover from bootloop/fc/hang with the minimum of impact on the phone. This is just my opinion tho.
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
I told it already, the "custom" folder is not filled. It will be kept empty. The user can put a file, which ofcourse is the file of the device he/she have or want to get repaired. All he has to do is copy and paste the file from the working zip( zip file of his currently installed rom, that encounter the problem) of his rom to the custom folder inside the rescue.zip.
And the things that are common will be scripts, but those too will contains device specific mound points, paths, etc. I think that will be common( ie, the working of script, once the mound is done). Am i right?
So all i have to figure out is mount points, paths etc.. i got a couple of them, about 15 or so. And pls help me to find the rest.
HYPERDROID EXTREEM EDITION-THE NEW BENCHMARK ROM FOR HD2.
a good idea to add is a file system chech like windows systems has. By installing a rom the installer should first check for bad sectors and mem blocks before installing the rom. After all blocks and sectors are scanned and the bad ones marked as "bad or corrupt" it should run something like defrag and place the bad blocks at the end of the file table. When all is done .. then the true rom install should start.
This will prevent heaps of problems since the curent installs just write over a bad block or sector creating the most weird problems. A fault checker/repair will take away a lot of strange forced closes and othere software/hardware failures.
Most phones wont last that long so that bad blocks or sectors can occure. But for the flashing junkies among us its a serious problem what can occure. I guess after 1000 or more installs bad sectors or blocks will occure and not all are being able to be repaired
Sent from my Galaxy Nexus using XDA App
Mikevhl said:
You could add using flags in the updates filename, see some roms or themes for the lg optimus 2x for more information. It uses sed. For example, "update-wc-wd.zip" would wipe /data and /cache.
You could also merge these features in a customized clockwork mod recovery, the up side would be that you could automatically make a backup of the last flashed full ROM's systemui etc. this would also allow usage of the touch screen/volume keys to choose an repair option. You could even allow users to backup specific applications along with their data, and let users restore it later on after a fresh flash. I have some basic knowledge in modifying the recovery so I might help you out a little if you're interested.
Click to expand...
Click to collapse
I am totaly newbee to lg. I have experience with htc, few samsung, etc. So can u pm me the details? Also is it usable to create recovery? I think a zip file with selectable options is more friendly. The thing is building a recovery wont make it universal( or atleast common for a couple of devices) and we will have to port them for each and every device. Thats the problem.
But any way i want ur help in building it. Can u pm me an example for mounding script in lg devices? And any thing that may become useful. Thank you.
HYPERDROID EXTREEM EDITION-THE NEW BENCHMARK ROM FOR HD2.
wilwilwel said:
a good idea to add is a file system chech like windows systems has. By installing a rom the installer should first check for bad sectors and mem blocks before installing the rom. After all blocks and sectors are scanned and the bad ones marked as "bad or corrupt" it should run something like defrag and place the bad blocks at the end of the file table. When all is done .. then the true rom install should start.
This will prevent heaps of problems since the curent installs just write over a bad block or sector creating the most weird problems. A fault checker/repair will take away a lot of strange forced closes and othere software/hardware failures.
Most phones wont last that long so that bad blocks or sectors can occure. But for the flashing junkies among us its a serious problem what can occure. I guess after 1000 or more installs bad sectors or blocks will occure and not all are being able to be repaired
Sent from my Galaxy Nexus using XDA App
Click to expand...
Click to collapse
Pls pm me the idea how to make the checking script. Or links that have info in this. Thank u in figuring out such a prob. I am unaware of that.
HYPERDROID EXTREEM EDITION-THE NEW BENCHMARK ROM FOR HD2.
showlyshah said:
I am totaly newbee to lg. I have experience with htc, few samsung, etc. So can u pm me the details? Also is it usable to create recovery? I think a zip file with selectable options is more friendly. The thing is building a recovery wont make it universal( or atleast common for a couple of devices) and we will have to port them for each and every device. Thats the problem.
But any way i want ur help in building it. Can u pm me an example for mounding script in lg devices? And any thing that may become useful. Thank you.
HYPERDROID EXTREEM EDITION-THE NEW BENCHMARK ROM FOR HD2.
Click to expand...
Click to collapse
I'll send this as a PM as well, but people might learn from this. I am not talking about any specific mount points for LG phones, I just pointed out that there are some roms which use sed to check the filename of its update.zip and do tasks according to that, you need to have one line in your updater script to run the script which detects what to do. That way a user of a Galaxy Nexus would rename it to update-maguro.zip and it would know to use mount points for the maguro, while if the exact same update.zip was to be named update-p990.zip, it would know to use the mount points for the LG optimus 2x. This way you could easily keep the zip up to date for any device, because they all use the same update.zip
About the recovery, you would need to build it for every phone once, but you could make one change to the recovery source and easily compile the recovery for all phones which are capable of running CWM. I believe this method to be more user friendly, as a recovery image has support for actually choosing what you want to do, instead of having to rename the file. A recovery image also has a better way of communicating with the user. Where a update.zip can only say "Hey, I had an error and I'm quitting now, I won't give you any details what the problem was because that's just how update.zips roll", a recovery image would be able to give more advanced outputs, like "An error occurred when trying to mount /data." And then give you the option to either try again, manually fix it by using a computer with adb, or quitting.
But that's just my personal opinion. The recovery would be way harder to make, but I was the original porter of CM6, CM7 and HTC Sense to the xperia mini pro and mini back in the days. I also made a custom recovery and roms for the HTC desire Z, maintain a CWM port for the HTC Chacha which I don't even own and have used the LG optimus 2x before. (currently a maguro owner) but I'm trying to say that I've been experimenting a lot with different phones and know what the possibilities of Android are. you could even make a live Android build, tailored for recovering your phone, which is ran by an update.zip! How cool is that? That would be VERY device specific though..
let me know what you think is the best way to do this. I was thinking of making a mobile time machine app for some time so it's good I saw this thread.

[SCRIPT][CM7/9] /datadata/ low storage notification lagless fix - init.d script

Hello fellow I9000 users.
tl;dr - This fixes your low storage notification problems just by flashing it on CWM.
Disclaimer
First of all, I'd like to inform you that this post is a compilation of the work done by drafnel on the CyanogenMod forums, revthanki on the XDA-Developers forum, and as such I take little to no credit in it, as all I've done was ask for drafnel to help me in the cleanup code for me to put it in a flashable zip.
Sources:
http://forum.cyanogenmod.com/topic/39718-workaround-for-small-datadata-partition/
http://forum.xda-developers.com/showthread.php?t=1444333
Also, as you should know, you take full responsability should data loss or other kinds of damage occur.
Introduction
Lot's of people have encountered the problem where their /datadata partition fills up and then apps begin force closing. This is often confusing since there is usually a lot of space available on the internal 2GB storage partition. But these are two different partitions on cyanogenmod. The created the datadata partition on the fast internal memory so that apps would start up and run faster (i.e. less lag), but it is only about 170MB (which can't be helped).
One thing that can be done is to move the contents of /datadata onto the 2GB /data partition. That will solve the space problem, but then you have the lag problem. So, what we need is for the files that take up a lot of space to reside on the 2GB partition and the files that are accessed frequently by an app to reside an the fast 170MB partition. The files that are accessed often, or that affect app startup speed are the sqlite database files and the xml preferences files. These reside in the databases and shared_prefs sub-directories in each app directory. Drafnel has written a script to perform these operations.
Requirements
Samsung Galaxy S based phone (GT-I9000, Vibrant, Fascinate, Captivate, etc.)
Kernel that supports init.d scripts
How to use it?
As you would flash a ROM update or a Kernel:
Download the file to your sdcard.
Reboot your phone into CWM.
Choose 'install zip from sdcard', and choose the script from there.
It will run on boot everytime. It's pretty light so your total boot time shouldn't suffer. It will only do the operations if they are needed, and it will clean up after itself. No need to worry about broken links or stale resources.
What it actually does?
On every boot:
Runs a check to see if /data/data is still symlinked to /datadata/
Moves everything that isn't performance critical from /datadata/ to unlinked /data/data/
Cleans up old databases from uninstalled apps
Other stuff to watch out for
Titanium Backup users should tick the Preferences > Troubleshooting settings > Follow all symbolic links option
SlimICS users should follow this procedure
Changelog
11032012 - First working release.
LOL. I posted a request for exactly this script in the mintberry thread a few days ago!
Good work fella, Cheers.
OMG yeah! Was waiting for something like that . Will give it a try next time I'll encounter this problem .
Thanks mate.
Just flashed it. Cheers!
Sent from my GT-I9000 using xda premium
I had HUGE problems with Titanium Backup.
I lose all by backups some weeks ago because symlinked were corrupted after restore!
Njcki said:
I had HUGE problems with Titanium Backup.
I lose all by backups some weeks ago because symlinked were corrupted after restore!
Click to expand...
Click to collapse
According to this post, you can now force TB to follow all symbolic links for backup and restore.
what if i already moved all my apps data to sdcard? do i move it back to internal memory then flash the script, or just flash the script then move the data to internal memory? which is the correct way?
naTrium said:
According to this post, you can now force TB to follow all symbolic links for backup and restore.
Click to expand...
Click to collapse
Thanks! I'll try
AFAIK, if you have moved your apps to the SD card using the regular method (Apps2SD), the script will still work. This is because there's always leftover data on the phone, which then points to /.android_secure/ on the sdcard.
This script only changes the location of some data, but it's transparent to the phone.
If you don't feel safe about it, a full nandroid backup will restore the system to whatever setup you have now. (it also backs up what's mounted on the sdcard)
Well done! I knew I was never going to get round to this I'll close my old thread and redirect people here. Before I do so:
1) does the stock CM9 kernel support init.d scripts? If not stock kernel users will have to follow the manual method.
2) maybe it's worth putting a capitalised warning in your post to get people to set the option in Titanium Backup to follow all symbolic links
I flashed this script already but the low on space notification is still shown. It's definitely not working.
Do I have to create .nodatadata file inside /datadata and reboot now?
Sent from Ice-Cream flavored SGS GT-I9000 using Tapatalk
Free space in datadata folder,
Before flashing the script = 25mb
After flashing the script = 146mb
Definitely works without any lags.. one might experience lags on the first boot but after another reboot all gonna be super smooth like before!
Thanks a lot!!
It deleted some of my apps like Dolphin HD. I'm running CM9, with IcyGlitch Kernel. Oh well, restored.
Gr8 work
Many Thanks,
i have been waiting for this script ever since Darktremor Apps2SD (2010 !!! )
thank you!!!!!!!!!!!!!!
Great Job!
Excellent, it's very smooth like before, thanks a lot.
aha! that's the reason why all my apps suddenly began to lag like hell and some time after that force close. had only 1MB free space on /datadata partition lol. script works like a charm! thx
Sent from my GT-i9000 using xda premium
stfudude said:
I flashed this script already but the low on space notification is still shown. It's definitely not working.
Do I have to create .nodatadata file inside /datadata and reboot now?
Sent from Ice-Cream flavored SGS GT-I9000 using Tapatalk
Click to expand...
Click to collapse
I heard some kernels don't load init.d scripts on ICS, might be related to that.
finally......
before script 11mb and after got 168mb free space! thanks!
really nice stuff

Categories

Resources