1. Can somebody make a script to wipe dalvik cache?
2. When format data (with format("yaffs2", "MTD", "userdata")), it will delete olso the dalvik cache?
3. Please give me a script to format sd-ext with ext4 file system. I tried with superwipe.zip (format("ext2", "EMMC", "/dev/block/mmcblk0p2")) and it formats sd-ext with ext2 filesystem, also tried format("ext4", "EMMC", "/dev/block/mmcblk0p2") but it's not working, it doesen't know what is "ext4"
Thanks, Razvan.
Sorry to post again, but I think it would be fine to make superwipe do ext4 filesystem...I've search a lot but no results in how to make the script to format sd-ex with ext4.
And it is possible to choose cluster size and start sector of first partition?
Related
So, this has been a question/subject of much mystery. Does wiping /cache also 'wipe' the Dalvik? A bunch of us know that the Dalvik is located within /cache so, it's assumed that wiping /cache will also wipe the Dalvik, but most have gone the route of being careful, just in case. Which is fine.
In getting a CWM log from someone to port my Nullifier and something I caught a glimpse of but was too busy to go back and check on, we now have objective proof that wiping /cache will also wipe your Dalvik:
Code:
-- Wiping cache...
Formatting /cache...
I:Formatting unknown device.
I:Formatting ext3 device.
tune2fs 1.41.6 (30-May-2009)
Setting current mount count to 1
e2fsck 1.41.6 (30-May-2009)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p2: 11/16384 files (0.0% non-contiguous), 7478/65536 blocks
Cache wipe complete.
E:unknown volume for path [/sd-ext]
rm: can't remove '/cache/dalvik-cache': No such file or directory
rm: can't remove '/sd-ext/dalvik-cache': No such file or directory
Dalvik Cache wiped.
And if this isn't enough, go format your cache, then wipe your dalvik and then check the log at advanced>show log.
Was actually wondering about that last night when I ran the nullifier... thanks for the peice of mind!
Pin it to Win it.
Not a problem, I'll likely post a link to this thread in the Nullifier Q&A, I'm sure it'll get asked at some point.
One less step for crackflashers to do. Yes 5 secs more is a lot of time especially when a new rom comes out
Sent from my LG-P999 using xda premium
Remember, the Nullifier will now format /cache for you, so it's a great AIO. And there's also a second one for just one wipe.
Волк said:
Remember, the Nullifier will now format /cache for you, so it's a great AIO. And there's also a second one for just one wipe.
Click to expand...
Click to collapse
Yeah its a great tool. Thanks
Sent from my LG-P999 using xda premium
np. Also decided to make on just for /cache. Will likely make it and put it up tomorrow night.
That's awesome.
Edit: off topic sorry.
Sent from my LG-P999 using xda premium
PM me and we can discuss it. I don't want to get off topic.
it will wipe cache unless this line is in your build.prop
dalvik.vm.dexopt-data-only=1
in that case dalvik cache is stored on the data partition
like in CM9 because stock partition size is a bit to small
you can resize it using NVFLASH and store the dalvik back on the cache partition
ohh and by the way cleaning dalvik cache is not needed...
arcee said he never did it, i never did it and i never had any troubles caused by dalvik cache
android checks the dalvik cache and if there is a mismatch it will just throw away the dalvik cache and re create it
As we discussed yesterday in the Nullifier thread, dalvik is not cleared by a /cache wipe unless a ROM specifically places it there (which I have not seen on the G2x)... I have only seen it contained in /data on these devices.
Simple proof.
Do a /cache wipe.
Does dalvik rebuild upon reboot?
No.
overground said:
As we discussed yesterday in the Nullifier thread, dalvik is not cleared by a /cache wipe unless a ROM specifically places it there (which I have not seen on the G2x)... I have only seen it contained in /data on these devices.
Simple proof.
Do a /cache wipe.
Does dalvik rebuild upon reboot?
No.
Click to expand...
Click to collapse
just like i said
if the ROM has this line defined
dalvik.vm.dexopt-data-only=1
dalvik cache will be stored on the data partition
in that case a cache wipe will not wipe the dalvik
you can place this line in the build.prop
dalvik.vm.dexopt-data-only=0
and delete dalvik cache you will see it will be rebuild on the cache partition
but this is not smart the cache partition is really small on this device
you can resize it with NVFLASH to check but just believe us
clearing cache will only clear the dalvik if the dalvik is on the cache partition otherwise not
it is like formatting your D: partition and losing your windows that is installed on the C: partition it just make no sense!
I have the latest stock Gingerbread ROM, AmonRA, ROQ kernel and I'm unsing link2SD.
I'm getting short of space on my data partition and I would like to recover some space from my cache partition (that is now 64Mb big).
Is there anyway to move some Mb from /cache to /data?
Possibly recovering a whole NAND backup.
I saw scripts for "Cusotm MTD Partitions" but they all looked for different phones.
Thank you very much
pdario said:
I have the latest stock Gingerbread ROM, AmonRA, ROQ kernel and I'm unsing link2SD.
I'm getting short of space on my data partition and I would like to recover some space from my cache partition (that is now 64Mb big).
Is there anyway to move some Mb from /cache to /data?
Possibly recovering a whole NAND backup.
I saw scripts for "Cusotm MTD Partitions" but they all looked for different phones.
Thank you very much
Click to expand...
Click to collapse
u can't change internal partitions in p500. but u can change the size of SD-ext partition that link2sd uses to store apps. U can do that with the help of ur recovery. But remember that changing size of sd-ext partition will format ur whole sd crd. so make the necessary backups
Souron29 said:
u can't change internal partitions in p500. but u can change the size of SD-ext partition that link2sd uses to store apps. U can do that with the help of ur recovery. But remember that changing size of sd-ext partition will format ur whole sd crd. so make the necessary backups
Click to expand...
Click to collapse
I'm running out of space in /data partition, /sd-ext is ok.
I see I can nandroid backup all partitions: can't I edit them somehow and then recovery them back?
BTW: I would use a Windows partition resizing software on the SD mounted in my PC to do what you meant, that should not lose any data
pdario said:
I'm running out of space in /data partition, /sd-ext is ok.
I see I can nandroid backup all partitions: can't I edit them somehow and then recovery them back?
BTW: I would use a Windows partition resizing software on the SD mounted in my PC to do what you meant, that should not lose any data
Click to expand...
Click to collapse
when u backup ur partitions it just means u r backing up the content of ur partitions as a whole. So editing them won't do any good.
instead flash an app2sd script which moves dalvik cache to sd too. like this one. http://forum.xda-developers.com/showthread.php?t=1668247
My dalvik cache is already on SD, using LInk2SD; the problem is the /data content; it would be great to move the data to SD too
I also used link2sd till recently and switched to S2E (simple2ext) from the market but I think it only works for cm7 and cm7 based roms.
If you use a lot of apps including games I would suggest making the ext partition 1gb when using set script.
Backup your apps with titanium backup, wipe the phone clean, flash the rom.
Install S2E, open it.
Press menu key and go to Settings, and enable “Mount as ext4″ (mandatory).
Close and reboot.
Open S2E again and select the folders you want to move to SD card. I recommend selecting Applications, Application Data and Dalvik cache. Leave Private apps and Download cache unselected.
Reboot and changes will take effect. (This reboot will be slower than usual as your dalvik cache will be rebuilt.)
Done.
Now you can restore from the titanium backup and you shouldn't have any more problems with space.
p.s.: don't backup or restore link2sd, it will mess with s2e
You mean it will move the /data folders too, in contrary to Link2SD?
pdario said:
You mean it will move the /data folders too, in contrary to Link2SD?
Click to expand...
Click to collapse
Yes
Sent from my LG-P500 using xda premium
Is it correct that, in the steps you listed, the old sd-ext partition is not needed? S2E won't read it, right?
pdario said:
Is it correct that, in the steps you listed, the old sd-ext partition is not needed? S2E won't read it, right?
Click to expand...
Click to collapse
The sd-ext partition is very needed. that's where all your apps and data and dalvik cache will go. S2E works basically like Link2SD only it moves data as well, to the same place.
When I said wipe the phone, I meant formating the system, internal and ext partitions + dalvik cache so you have a clean slate and bug free installation.
Souron29 said:
when u backup ur partitions it just means u r backing up the content of ur partitions as a whole. So editing them won't do any good.
instead flash an app2sd script which moves dalvik cache to sd too. like this one. http://forum.xda-developers.com/showthread.php?t=1668247
Click to expand...
Click to collapse
Use the script mentioned here. it moves ur \data partition to ext. it will give u ample amount of storage. and remember that u should increase the size of ext partition only if u have class 6 sdcards or else ur phone will suffer serious lag
Sorry, I meant the content of the sd-ext partition before this upgrade: I have to reinstall all apps, I don't need the old installations in the sd-ext, right?
Thank you!
I'm wanting to write some edify code to wipe data, dalvik and cache. I think i've got the right idea for data and dalvik, but I'm not certain on cache.
Here's my following code for data and dalvik wipe. Is this the standard for wiping data? Do i need to delete everything from data and not just in the app directory?
Code:
mount("ext4", "EMMC", "/dev/block/mmcblk0p37", "/data");
delete_recursive("/data/app");
delete_recursive("/data/dalvik-cache");
unmount("/data");
Also, i'm going to assume i can mount the cache, but i didn't know the block to mount it.
Any help would be greatly appreciated.
Edit: Thanks to this post, i was able to figure out the block i needed for cache. I would still like to know if this is the proper way of "wiping" the data, cache or dalvik-cache. Should i be formatting instead?
I'm not very familiar with edify, so I may be wrong, however I'll try to help by pointing some issues you may find when investigating this subject.
First look on the code above ... In general, it seems to be ok. Btw I can see that you are not trying to wipe /data but /data/app only...
To fully wipe data partition you shall run delete_recursive("/data"); and after that no additional dalvik-cache wipe will be necessary, as it lies on data so it will be deleted along with it.
Instead of recursive files deletion you may try format command or even some variation of mke2fs... it will create completely new filesystem instead of performing large amounts of delete i/o operations on the old one, along with not deleting filesystem stats, etc.
Hovewer, you have to know that running delete_recursive("/data"); or even format("/data") or something similiar seems to be not the best idea - be aware that real location of files from /sdcard is /data/media which is then bound with FUSE driver to /sdcard during the boot, so it acts like an sd memory BUT it still lies along with all your "regular" data files on /data partition. Doing such a recursive deletion will result in losing not only files from /data, but also from /data/media = /sdcard, which is probably not the thing we want to happen ;]
You may want to figure out how to avoid this, as you may lose the data which you didn't want to lose (for example: nandroid backups, if you keep them on /sdcard)! I personally don't know the exact solution and don't have time and possibility to figure it out at the moment
Also, please be aware that Android has the "wipe" command built-in, put "wipe" in terminal emulator to find out the syntax. I am not sure but it may avoid the sdcard when wiping automatically, as it is native android tool and it may be adapted for Android's file stricture.
Last but not least, you can find out device-partition pairs by inputting such a command via terminal or adb shell (seeking for a device name which is mounted as /cache in example below):
Code:
cat /proc/mounts | grep cache
esgie said:
I'm not very familiar with edify, so I may be wrong, however I'll try to help by pointing some issues you may find when investigating this subject.
First look on the code above ... In general, it seems to be ok. Btw I can see that you are not trying to wipe /data but /data/app only...
To fully wipe data partition you shall run delete_recursive("/data"); and after that no additional dalvik-cache wipe will be necessary, as it lies on data so it will be deleted along with it.
Instead of recursive files deletion you may try format command or even some variation of mke2fs... it will create completely new filesystem instead of performing large amounts of delete i/o operations on the old one, along with not deleting filesystem stats, etc.
Hovewer, you have to know that running delete_recursive("/data"); or even format("/data") or something similiar seems to be not the best idea - be aware that real location of files from /sdcard is /data/media which is then bound with FUSE driver to /sdcard during the boot, so it acts like an sd memory BUT it still lies along with all your "regular" data files on /data partition. Doing such a recursive deletion will result in losing not only files from /data, but also from /data/media = /sdcard, which is probably not the thing we want to happen ;]
You may want to figure out how to avoid this, as you may lose the data which you didn't want to lose (for example: nandroid backups, if you keep them on /sdcard)! I personally don't know the exact solution and don't have time and possibility to figure it out at the moment
Also, please be aware that Android has the "wipe" command built-in, put "wipe" in terminal emulator to find out the syntax. I am not sure but it may avoid the sdcard when wiping automatically, as it is native android tool and it may be adapted for Android's file stricture.
Last but not least, you can find out device-partition pairs by inputting such a command via terminal or adb shell (seeking for a device name which is mounted as /cache in example below):
Code:
cat /proc/mounts | grep cache
Click to expand...
Click to collapse
Thanks a bunch! I didn't even think about the sdcard getting wiped...
=Death259;48255914]Thanks a bunch! I didn't even think about the sdcard getting wiped...
Click to expand...
Click to collapse
What you can do is extract and call a bash script and recursively remove all content from /data excliding the media folder (sdcard)
Also dalvik is in /data already so wiping data automatically wipes dalvik
Hi, I'm new to flashing custom rom. I've accidentally change the file system of my Dalvik Cache to FAT, (the default is ext4). I want to revert it back to ext4 but when I select it, it says invalid partition selection. I haven't flashed a custom rom yet. What should I do next?
gianski said:
Hi, I'm new to flashing custom rom. I've accidentally change the file system of my Dalvik Cache to FAT, (the default is ext4). I want to revert it back to ext4 but when I select it, it says invalid partition selection. I haven't flashed a custom rom yet. What should I do next?
Click to expand...
Click to collapse
AFAIK, dalvik-cache is just a directory present inside /data partition, which is EXT4 formatted (or even F2FS)..
How did you even do that??
There's no separate partition for dalvik-cache.
Maybe you would have changed the file system of /cache partition..
And, to make it clear, /cache partition doesn't hold dalvik-cache.
GokulNC said:
AFAIK, dalvik-cache is just a directory present inside /data partition, which is EXT4 formatted (or even F2FS)..
How did you even do that??
There's no separate partition for dalvik-cache.
Maybe you would have changed the file system of /cache partition..
And, to make it clear, /cache partition doesn't hold dalvik-cache.
Click to expand...
Click to collapse
In TWRP, there's a Wipe option and then I selected Dalvik-cache and mistakenly change the File System to FAT. Now I can't mount it.
I'm creating a ZIP file to flash with TWRP.
I would like to add a command to the shell script to WIPE files of this paths.(/system/cache/dalvik/data)
How can I write the command?
wipe PARTITION :
format PARTITON, one by line:
cache,
system,
dalvik,
data.
cooltt said:
wipe PARTITION :
format PARTITON, one by line:
cache,
system,
dalvik,
data.
Click to expand...
Click to collapse
ty