Go Back   Android Forums > Android Phones > LG Optimus Elite > Elite - All Things Root

New Forums: Nexus 6 | Nexus Player | Nexus 9
test: Reply
 
LinkBack Thread Tools
Old September 25th, 2012, 07:01 AM   #1 (permalink)
Senior Member
Thread Author (OP)
 
MacFett's Avatar
 
Join Date: Mar 2011
Location: Sietch Tabr
Gender: Male
Posts: 3,230
 
Device(s): OnePlus One (Stock CM 11) & Samsung Galaxy Tab3 8" (CM11)
Carrier: T-Mobile

Thanks: 391
Thanked 740 Times in 559 Posts
Default [Help] Make a flashable zip to wipe data, cache and dalvik?

How would I go about to make a flashable zip for CWM to wipe my data, cache and dalvik-cache?

I am using Apps2zip to make a flashable app package for when I flash a ROM, but I'd love to be able to flash wipe all needed partitions.

Advertisements
__________________
Sign up for dropbox and we each get a bonus 500megs

"The world is indeed comic, but the joke is on mankind," H.P. Lovecraft 1890-1937
MacFett is offline  
Reply With Quote
sponsored links
Old September 25th, 2012, 08:05 AM   #2 (permalink)
Senior Member
 
Join Date: Jun 2012
Posts: 653
 
Device(s): LG-VM696: CM9, XT1049: 4.2.2, GT-P6210MAYXAR: CM10, CWM6
Carrier: Not Provided

Thanks: 182
Thanked 214 Times in 162 Posts
Default

Quote:
Originally Posted by MacFett View Post
How would I go about to make a flashable zip for CWM to wipe my data, cache and dalvik-cache?

I am using Apps2zip to make a flashable app package for when I flash a ROM, but I'd love to be able to flash wipe all needed partitions.
You could try this:

# Wipe data and dalvik

ui_print(" Clearing data and dalvik");
mount("ext4", "EMMC", "/dev/block/mmcblk0p13", "/data");
delete_recursive("/data");

# Wipe cache

ui_print(" Clearing cache");
mount("ext4", "EMMC", "/dev/block/mmcblk0p6", "/cache");
delete_recursive("/cache");
ktb83 is offline  
Reply With Quote
Old September 25th, 2012, 09:28 AM   #3 (permalink)
Senior Member
Thread Author (OP)
 
MacFett's Avatar
 
Join Date: Mar 2011
Location: Sietch Tabr
Gender: Male
Posts: 3,230
 
Device(s): OnePlus One (Stock CM 11) & Samsung Galaxy Tab3 8" (CM11)
Carrier: T-Mobile

Thanks: 391
Thanked 740 Times in 559 Posts
Default

I found another flashable wipe zip to take a look and see what was happening. with it.

It has two files within the zip.
/META-INF/com/google/android/updater-script
/META-INF/com/google/android/updater-binary

The contents of the script are:
Code:
ui_print("Performing Wipe...");
ui_print("Mounting mount points...");
run_program("/sbin/mount", "/dev/block/platform/s3c-sdhci.0/by-name/system", "/system");
run_program("/sbin/mount", "/dev/block/platform/s3c-sdhci.0/by-name/userdata", "/data");
run_program("/sbin/mount", "/dev/block/mtdblock4", "/cache");
run_program("/sbin/mount", "/dev/block/mtdblock2", "/boot"); 
show_progress(0.1, 0);
ui_print("Wiping BOOT, CACHE, DATA, SYSTEM");
delete_recursive("/boot");
delete_recursive("/cache");
delete_recursive("/data");
delete_recursive("/system");
show_progress(0.1, 10);
ui_print("Unmounting mount points...");
run_program("/sbin/umount", "/system");
run_program("/sbin/umount", "/data");
run_program("/sbin/umount", "/cache");
ui_print("Wipe Complete.");
The binary is just gobbledy gook.

Thinking about it, I should make one that does system too for doing a nandroid restore and not all ROM will wipe the system partition like Leslie Ann's does.
MacFett is offline  
Reply With Quote
Old September 25th, 2012, 10:02 AM   #4 (permalink)
Senior Member
 
Join Date: Jun 2012
Posts: 653
 
Device(s): LG-VM696: CM9, XT1049: 4.2.2, GT-P6210MAYXAR: CM10, CWM6
Carrier: Not Provided

Thanks: 182
Thanked 214 Times in 162 Posts
Default

Here, try this - http://www.sendspace.com/file/9brqqq
ktb83 is offline  
Reply With Quote
The Following User Says Thank You to ktb83 For This Useful Post:
MacFett (September 25th, 2012)
Old September 25th, 2012, 10:11 AM   #5 (permalink)
Senior Member
Thread Author (OP)
 
MacFett's Avatar
 
Join Date: Mar 2011
Location: Sietch Tabr
Gender: Male
Posts: 3,230
 
Device(s): OnePlus One (Stock CM 11) & Samsung Galaxy Tab3 8" (CM11)
Carrier: T-Mobile

Thanks: 391
Thanked 740 Times in 559 Posts
Default

Thanks, I'll try this next time I flash.

If you don't mind telling me what you did? I appreciate that you did it, but I'm trying to learn more to help the community.

What is the update-binary file? Where did you get it?

After making the zip does it need to be signed? You make a zip with no compression correct?

(Normally I try and learn from stuff others ask and post and I find around the net, but this is something I've been unable to find any info.)
MacFett is offline  
Reply With Quote
Old September 25th, 2012, 01:19 PM   #6 (permalink)
Senior Member
 
Join Date: Jun 2012
Posts: 653
 
Device(s): LG-VM696: CM9, XT1049: 4.2.2, GT-P6210MAYXAR: CM10, CWM6
Carrier: Not Provided

Thanks: 182
Thanked 214 Times in 162 Posts
Default

Quote:
Originally Posted by MacFett View Post
Thanks, I'll try this next time I flash.

If you don't mind telling me what you did? I appreciate that you did it, but I'm trying to learn more to help the community.

What is the update-binary file? Where did you get it?

After making the zip does it need to be signed? You make a zip with no compression correct?

(Normally I try and learn from stuff others ask and post and I find around the net, but this is something I've been unable to find any info.)
Just read the updater-script in the ZIP I posted.

The update-binary is a compiled file and just about every flashable ZIP contains one version or another. You don't make changes to it yourself. The one I've been using lately is from an update.zip which Titanium Backup creates.

It does not need to be signed, that's what makes CWM so useful.

No compression is prob a good idea, but I'm not sure whether it matters or not.

More info: Free Your Android - An introduction to the Edify (Updater-Script) language
ktb83 is offline  
Reply With Quote
The Following User Says Thank You to ktb83 For This Useful Post:
MacFett (September 25th, 2012)
Old September 25th, 2012, 01:51 PM   #7 (permalink)
Member
 
Join Date: Nov 2011
Gender: Male
Posts: 221
 
Device(s): Nexus 5, rooted
Carrier: T-Mobile

Thanks: 85
Thanked 34 Times in 33 Posts
Default

I've got two of them. One for installing a new rom and one for updating a rom that LeslieAnn made when I had my OV.
Will post when I get home in a bit.
mysticalnyte is offline  
Reply With Quote
Old September 25th, 2012, 02:44 PM   #8 (permalink)
AF Contributor
 
Join Date: Mar 2012
Posts: 1,176
 
Device(s): Samsung Galaxy Victory 4G
Carrier: Virgin Mobile USA

Thanks: 220
Thanked 374 Times in 275 Posts
Default

They won't work for elite. The ov was yaffs file system and elite is ext4.

Even if they were the same file system the partitions more than likely wouldn't be the same.
kwknott is online now  
Reply With Quote
Old September 25th, 2012, 02:52 PM   #9 (permalink)
Member
 
Join Date: Nov 2011
Gender: Male
Posts: 221
 
Device(s): Nexus 5, rooted
Carrier: T-Mobile

Thanks: 85
Thanked 34 Times in 33 Posts
Default

Quote:
Originally Posted by kwknott View Post
They won't work for elite. The ov was yaffs file system and elite is ext4.

Even if they were the same file system the partitions more than likely wouldn't be the same.
I tested the Prep for a new rom and it seemed to work fine, but I didn't test the update for a new rom.
Oh, well. Ok then.
mysticalnyte is offline  
Reply With Quote
Old September 25th, 2012, 04:33 PM   #10 (permalink)
AF Contributor
 
Join Date: Mar 2012
Posts: 1,176
 
Device(s): Samsung Galaxy Victory 4G
Carrier: Virgin Mobile USA

Thanks: 220
Thanked 374 Times in 275 Posts
Default

Maybe I'm wrong then.. I thought the difference in file system and partitions would prevent it from working . They made be made in a way that might work. I'll have to look at them
kwknott is online now  
Last edited by kwknott; September 25th, 2012 at 04:39 PM.
Reply With Quote
sponsored links
Old September 25th, 2012, 04:41 PM   #11 (permalink)
Senior Member
 
Join Date: Jun 2012
Posts: 653
 
Device(s): LG-VM696: CM9, XT1049: 4.2.2, GT-P6210MAYXAR: CM10, CWM6
Carrier: Not Provided

Thanks: 182
Thanked 214 Times in 162 Posts
Default

Quote:
Originally Posted by kwknott View Post
Maybe I'm wrong then.. I thought the difference in file system and partitions would prevent it from working . They made be made in a way that might work. I'll have to look at them
I wouldn't think it would work either, but I could be wrong.
ktb83 is offline  
Reply With Quote
Old September 25th, 2012, 04:50 PM   #12 (permalink)
Dr. Feelgood
 
Rxpert83's Avatar
 
Join Date: Aug 2011
Location: MN
Gender: Male
Posts: 17,375
 
Device(s): Nexus 7, Nexus 5
Carrier: Sprint

Thanks: 14,861
Thanked 12,631 Times in 7,288 Posts
Default

The thing that's going to matter is whether its written in edify or amend scripting, and which one your recovery uses
Rxpert83 is online now  
Reply With Quote
Old September 25th, 2012, 05:02 PM   #13 (permalink)
Senior Member
 
Leslie Ann's Avatar
 
Join Date: Feb 2011
Posts: 1,427
 
Device(s): Evo V, Evo 4g, Optimus V
Carrier: Not Provided

Thanks: 84
Thanked 895 Times in 390 Posts
Default

Flashable zips - Fast wipe for the Optimus Elite
__________________
❤❤❤Ahhhh, the wonderful life of a developer, so romantic, so glamorous! The candles, the music, the gentle glow of your phone as it sits on your desk stuck in a boot loop.❤❤❤
Harmonia Developer
Leslie Ann is offline  
Last edited by Leslie Ann; September 25th, 2012 at 05:08 PM.
Reply With Quote
The Following User Says Thank You to Leslie Ann For This Useful Post:
MacFett (September 25th, 2012)
Old September 25th, 2012, 05:03 PM   #14 (permalink)
Senior Member
 
Join Date: Jun 2012
Posts: 653
 
Device(s): LG-VM696: CM9, XT1049: 4.2.2, GT-P6210MAYXAR: CM10, CWM6
Carrier: Not Provided

Thanks: 182
Thanked 214 Times in 162 Posts
Default

Quote:
Originally Posted by Rxpert83 View Post
The thing that's going to matter is whether its written in edify or amend scripting, and which one your recovery uses
I was thinking it wouldn't work because the other phone probably uses mtd and so the script might just simply mount /data and /cache as opposed to specifying the partitions by mmcblk0p*. But yeah, if that is the case, it should be easy to update the script.

Isn't amend for CWM versions prior to v3?
ktb83 is offline  
Reply With Quote
Old September 25th, 2012, 05:07 PM   #15 (permalink)
Dr. Feelgood
 
Rxpert83's Avatar
 
Join Date: Aug 2011
Location: MN
Gender: Male
Posts: 17,375
 
Device(s): Nexus 7, Nexus 5
Carrier: Sprint

Thanks: 14,861
Thanked 12,631 Times in 7,288 Posts
Default

Quote:
Originally Posted by ktb83 View Post
I was thinking it wouldn't work because the other phone probably uses mtd and so the script might just simply mount /data and /cache as opposed to specifying the partitions by mmcblk0p*. But yeah, if that is the case, it should be easy to update the script.

Isn't amend for CWM versions prior to v3?
I personally won't use Cwm, so I don't know at what point it switched.

The recovery should handle the partitions and mounts. I would think the script should be easy enough to write
Rxpert83 is online now  
Reply With Quote
Old September 25th, 2012, 05:07 PM   #16 (permalink)
Senior Member
 
Leslie Ann's Avatar
 
Join Date: Feb 2011
Posts: 1,427
 
Device(s): Evo V, Evo 4g, Optimus V
Carrier: Not Provided

Thanks: 84
Thanked 895 Times in 390 Posts
Default

Quote:
Originally Posted by Rxpert83 View Post
The thing that's going to matter is whether its written in edify or amend scripting, and which one your recovery uses
Amend hasn't been used in a year, Edify has been standard since GB took over.

What it depends on is what the recovery supports (Amend or Edify), and what the install Binary is using, such as yaffs.

Another consideration is if the recovery know what partition is where. In our case the recovery doesn't understand that /system is located at block 12 so the installer has to account for that by telling it.



The link I posted has the flashable zips done for the Elite. They should work fine as they are based on the code used for formatting the roms.
Leslie Ann is offline  
Reply With Quote
The Following User Says Thank You to Leslie Ann For This Useful Post:
Rxpert83 (September 25th, 2012)
Old September 25th, 2012, 05:09 PM   #17 (permalink)
Dr. Feelgood
 
Rxpert83's Avatar
 
Join Date: Aug 2011
Location: MN
Gender: Male
Posts: 17,375
 
Device(s): Nexus 7, Nexus 5
Carrier: Sprint

Thanks: 14,861
Thanked 12,631 Times in 7,288 Posts
Default

Quote:
Originally Posted by Leslie Ann View Post
Amend hasn't been used in a year, Edify has been standard since GB took over.

What it depends on is what the recovery supports (Amend or Edify), and what the install Binary is using, such as yaffs.

Another consideration is if the recovery know what partition is where. In our case the recovery doesn't understand that /system is located at block 12 so the installer has to account for that by telling it.



The link I posted has the flashable zips done. They should work fine as they are based on the code used for formatting the roms.
Ah, your phone complicates things then. Thanks for clearing that up.


There are still plenty of alternative recoveries out there that support both scripts
Rxpert83 is online now  
Reply With Quote
Old September 25th, 2012, 05:10 PM   #18 (permalink)
Senior Member
 
Leslie Ann's Avatar
 
Join Date: Feb 2011
Posts: 1,427
 
Device(s): Evo V, Evo 4g, Optimus V
Carrier: Not Provided

Thanks: 84
Thanked 895 Times in 390 Posts
Default

Quote:
Originally Posted by Rxpert83 View Post
There are still plenty of alternative recoveries out there that support both scripts
Yes, many still do, but they are slowly falling by the wayside.

Edify is simpler and can do more.
Leslie Ann is offline  
Reply With Quote
Old February 13th, 2013, 03:34 PM   #19 (permalink)
Junior Member
 
TheByteSmasher's Avatar
 
Join Date: Aug 2011
Location: Atlantis
Gender: Male
Posts: 92
 
Device(s): Nexus 4, Nexus 7
Carrier: T-Mobile

Thanks: 4
Thanked 17 Times in 13 Posts
Default

Quote:
Originally Posted by MacFett View Post
Thanks, I'll try this next time I flash.

If you don't mind telling me what you did? I appreciate that you did it, but I'm trying to learn more to help the community.

What is the update-binary file? Where did you get it?

After making the zip does it need to be signed? You make a zip with no compression correct?

(Normally I try and learn from stuff others ask and post and I find around the net, but this is something I've been unable to find any info.)
It seems like you use CWM, but the TWRP website has a binary to use that seems to work on all.
TheByteSmasher is offline  
Reply With Quote
Old February 13th, 2013, 07:03 PM   #20 (permalink)
Senior Member
Thread Author (OP)
 
MacFett's Avatar
 
Join Date: Mar 2011
Location: Sietch Tabr
Gender: Male
Posts: 3,230
 
Device(s): OnePlus One (Stock CM 11) & Samsung Galaxy Tab3 8" (CM11)
Carrier: T-Mobile

Thanks: 391
Thanked 740 Times in 559 Posts
Default

Quote:
Originally Posted by TheByteSmasher View Post
It seems like you use CWM, but the TWRP website has a binary to use that seems to work on all.
CWM is the only working recovery for the Elite right now.
MacFett is offline  
Reply With Quote
sponsored links
Old February 13th, 2013, 07:20 PM   #21 (permalink)
Junior Member
 
TheByteSmasher's Avatar
 
Join Date: Aug 2011
Location: Atlantis
Gender: Male
Posts: 92
 
Device(s): Nexus 4, Nexus 7
Carrier: T-Mobile

Thanks: 4
Thanked 17 Times in 13 Posts
Default Re: [Help] Make a flashable zip to wipe data, cache and dalvik?

Quote:
Originally Posted by MacFett View Post
CWM is the only working recovery for the Elite right now.
OK.. but the zips from my thread that you downloaded used the TWRP binary... they worked, right?
TheByteSmasher is offline  
Reply With Quote
Old February 13th, 2013, 08:18 PM   #22 (permalink)
Senior Member
Thread Author (OP)
 
MacFett's Avatar
 
Join Date: Mar 2011
Location: Sietch Tabr
Gender: Male
Posts: 3,230
 
Device(s): OnePlus One (Stock CM 11) & Samsung Galaxy Tab3 8" (CM11)
Carrier: T-Mobile

Thanks: 391
Thanked 740 Times in 559 Posts
Default

The zips i got from you were used on a nexus4 and worked fine.
MacFett is offline  
Reply With Quote
Old February 13th, 2013, 10:32 PM   #23 (permalink)
Junior Member
 
TheByteSmasher's Avatar
 
Join Date: Aug 2011
Location: Atlantis
Gender: Male
Posts: 92
 
Device(s): Nexus 4, Nexus 7
Carrier: T-Mobile

Thanks: 4
Thanked 17 Times in 13 Posts
Default Re: [Help] Make a flashable zip to wipe data, cache and dalvik?

Quote:
Originally Posted by MacFett View Post
The zips i got from you were used on a nexus4 and worked fine.
Oh yeah... but the binary from those should work on any system really.
TheByteSmasher is offline  
Reply With Quote
Reply


Go Back   Android Forums > Android Phones > LG Optimus Elite > Elite - All Things Root
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 02:17 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.