Hi, would it be possible for someone to create a zipped script that wipes the system, boot, data, cache and dalvik cache which can be flashed within the recovery? That would save us having to select each setting individually.
Thanks
cd993 said:
Hi, would it be possible for someone to create a zipped script that wipes the system, boot, data, cache and dalvik cache which can be flashed within the recovery? That would save us having to select each setting individually.
Thanks
Click to expand...
Click to collapse
+1
I like the sounds of this. Im so over having to manually select each over and over again. Would be so nice and easy just too flash a Wipe.zip before flashing
Anyone wanna give it a go creating this ? wouldnt be that hard would it seeing as when you flash a ROM anyways some have inbuilt wipe feature.
I found the following attached .zip (from HERE) which wipes system, data and cache. Is that all that needs to be wiped in order to be completely clean?
cd993 said:
I found the following attached .zip (from HERE) which wipes system, data and cache. Is that all that needs to be wiped in order to be completely clean?
Click to expand...
Click to collapse
+1
Thank you Very Much!!!!
And I usually Format boot,system,data,cache,dalvik cache. But this should be fine... I opened up the .zip and it doesn't look to hard to edit it too include more and it already includes all those except dalvik...
But Anyone tried this / confirmed working, before start editing it ?
Actually not sure if this will work. The update script in this .zip uses FORMAT iv noticed that Lee in his Rom uses the following code to formate /system on flash..
Code:
delete_recursive("/system");
So I think u would have to completely re-write the script in this to be usable...
But then again i havnt even got round to trying this yet, just having a look first
I think this is pretty much it . just figuring out the boot one and stuff..
Code:
ui_print("Easy WIPE by mero01");
ui_print("yeww");
ui_print(" ");
ui_print("Deleting EVERYTHING!!!...");
set_progress(1.000000);
mount("MTD", "system", "/system");
delete_recursive("/system");
mount("MTD", "userdata", "/data");
delete_recursive("/data");
delete_recursive("/data/dalvik-cache");
Can Someone please check this for me
EDIT********************
Nope this didnt work at all i keep getting syntax error or somthign someone ?
Related
For those who want an easy way to create and sign CWM flashable zips via windows, look no further... this is about as easy as it gets!
1. Unzip contents of package to a folder we'll call this folder "tools"
2. in "tools" you will now have the included files plus and "update" folder
3. in "update" folder you have "META-INF," "system," & "data" folders
4. place any files you want copied to system in "system" folder, make sure your structure is proper.
5. place any files you want copied to data in "data" folder, make sure structure is proper.
6. once you have everything set in place, you have four options:
• 6a: drag the folder on top of "DRAGandDROPzipANDsign.bat" wait for it to finish, you will end up with {folder_name}_update.zip in the same folder as 7za.exe
• 6b: double click SIGNandZIPmanual.bat, type the name of the working folder, hit enter, wait for it to finish, it will loop back and allow you to complete another task, or hit X + Enter exit.
• 6c: double click SIGNonlyMANUAL.bat, enter just the zip filename you want to sign (no extension), hit enter and wait for it to finish. It will loop back and allow you to sign another one or hit X + Enter to exit.
• 6d: drag a ZIP on top of DRAGandDROPsignONLY.bat to sign/re-sign a zip that's already been built.
Click to expand...
Click to collapse
I suggest if you are using this method to replace any system files, to delete the existing file first by adding some lines to the updater-script found in the META-INF folder. as follows:
Code:
delete("/system/app/Rosie.apk");
these lines can be added below the
Code:
mount("MTD", "data", "/data");
line... make sure filenames correct because they are case sensitive.
Hopefully this will make your lives a little easier =)
LATEST VERSION MIRROR: CLICK HERE
Code:
CHANGELOG:
1.1 - Current
~~* Silent update, forgot to include a couple of the updated files... oops! =)
1.0 - Update
~~* All drag & drop versions now support dragging and dropping from anywhere, not just the "working" directory.
~~* Fixed manual versions, where the loopback to work with more files was not working properly.
~~* Now deletes the unsigned zip after building the signed zip.
~~* Cleaned up folder a bit, now works from _bin folder, and outputs to _out folder. Batch file should stay in "main" folder, one level above _bin folder.
0.9 - Update
~~* Added sign only, manual plus drag & drop versions
~~* Included FR translation (google) of the d&d zip and sign
0.8 - Update
~~* removed the random .apk that was accidentally included in 0.6, not sure what happened to 0.7... lol
0.6 - Initial forum release
quick little update... apparently I had included a small .apk in the update folder... my bad, sorry for the waste of bandwidth =)
as the great homer simpson would say: DOH!
Hi ...
I'm not developer but it seems what you're doing will help other developers (and in the end: I'll benefit from that)...
Here's a "thank you" note..
... note: this post is just my way to become a post-whore like you.... j/k
would it also work for Amon-RA?
bestofrhcp said:
would it also work for Amon-RA?
Click to expand...
Click to collapse
yes, latest versions of amon-ra and cwm are both work only with edify scripts, so yes. you just need to know what your specific system & data paths are, system should be the same for everyone, but some devices use userdata /userdata instead of data /data... hopefully that makes sense =)
hope this helps =)
a new version, for the "manual" script will actually loop back when finished building/signing a zip, so that you can do multiple build/sign sessions, without having to reopen the script after every build/sign session will be updated shortly... I've already tested it and got it working... no real changes to the drag-and-drop file as it's not really necessary... I am trying to figure out a way to do a drag and drop sign only script, so once I have that figured out I will updated again...
updated =)
Thanks! This will save me from using Terminal Emulator after each cm nightly flash.
wilnotdie said:
thanks! This will save me from using terminal emulator after each cm nightly flash.
Click to expand...
Click to collapse
oops! Oops! ^~^
UDPATED... sorry if you downloaded 1.0, download again now @ 1.1... forgot to include a couple of the updated files... double checked everything this time though... =) enjoy!
looks like you might be able to answer my question
was playing around and deleted systemui.apk from system\app folder...
was trying to replace with another one... that did not work...
so i tired putting back the original one... and that does not install either...
is there a way to install that back on ?
if it is just guide me a lil bit...
will this procedure actually install the file?
http://forum.xda-developers.com/showthread.php?t=1268661
thank you
heart_crafter said:
looks like you might be able to answer my question
was playing around and deleted systemui.apk from system\app folder...
was trying to replace with another one... that did not work...
so i tired putting back the original one... and that does not install either...
is there a way to install that back on ?
if it is just guide me a lil bit...
will this procedure actually install the file?
http://forum.xda-developers.com/showthread.php?t=1268661
thank you
Click to expand...
Click to collapse
just do this
Code:
adb remount
adb push SystemUI.apk /system/app
adb reboot
no need to "install" it, it just needs to be in the system/app folder at boot time... you might actually want to "adb reboot recovery" instead of "adb reboot" and then clear dalvik before rebooting into OS again...
I tried testing it by droping a apk in a folder called app and then dropping the app folder in data and then went ahead and used the .bat. I went into recovery, flashed it without an error but nothing was installed once i booted. Any ideas? Dont scripts very like some have a run program system/xbin/busybox etc?
edit. I was able to move the folder from data to system and then ran the script and flashed it and it worked, it should up once it booted. Is there any way to get it to flash data/app?
benjamminzIS said:
just do this
Code:
adb remount
adb push SystemUI.apk /system/app
adb reboot
no need to "install" it, it just needs to be in the system/app folder at boot time... you might actually want to "adb reboot recovery" instead of "adb reboot" and then clear dalvik before rebooting into OS again...
Click to expand...
Click to collapse
thanks for the code...
but i already had copied the file into system/app... and it wasnt working (wasnt installing) just did a dalvic wipe now... and looked at that file permission and it was different from all other system apps... so i matched them up.. and rebooted ... and systemtray is back
thank you!
jgrimberg1979 said:
edit. I was able to move the folder from data to system and then ran the script and flashed it and it worked, it should up once it booted. Is there any way to get it to flash data/app?
Click to expand...
Click to collapse
here's the hint from the first post:
benjamminzIS said:
I suggest if you are using this method to replace any system files, to delete the existing file first by adding some lines to the updater-script found in the META-INF folder. as follows:
Code:
delete("/system/app/Rosie.apk");
these lines can be added below the
Code:
mount("MTD", "data", "/data");
line... make sure filenames correct because they are case sensitive.
Click to expand...
Click to collapse
copy the extract_package line that references "system" and change "system" to "data" in all cases, or if you have no need to copy anything to system then just change all "system" cases to "data" rename the "system" folder to "data" then add your files as necessary...
I am not sure i understand. Let me try and clarify what i am in trying to do. I am trying to build a flashable zip that contains an apk that i want to essential be installed in data/app directory. thats it.
What i see from the script below is that you have everything covered, system and data, so i am assuming if nothing is in the folder as system then it will be skipped over, correct
ui_print("");
ui_print("");
ui_print("Clearing dalvik cache ...");
delete_recursive("/data/dalvik-cache");
mount("MTD", "system", "/system");
mount("MTD", "data", "/data");
ui_print("");
ui_print("");
ui_print("Installing files to system ...");
package_extract_dir("system", "/system");
unmount("/system");
ui_print("");
ui_print("");
ui_print("Installing files to data ...");
show_progress(0.700000, 50);
package_extract_dir("data", "/data");
unmount("/data");
show_progress(10.000000, 1);
ui_print("Done.");
jgrimberg1979 said:
I am not sure i understand. Let me try and clarify what i am in trying to do. I am trying to build a flashable zip that contains an apk that i want to essential be installed in data/app directory. thats it.
Click to expand...
Click to collapse
oh ok... sorry... yeah I think for anything that goes to data, there needs to be an install command try adding install("/data/app/filename.apk"); for each file, after the package_extract_dir("data", "/data"); function... not sure if that is correct, but maybe?
I keep getting status 7 errors when I try to update my CM install on my i9505 international, (i'm using latest philz recovery). So far I have solved the problem by doing a full wipe and a ROM prep wipe. This is obviously not great because I have to set up the phone from scratch.
For various reasons I do not have access to a computer so cannot do the unzip / modify / rezip solutions referred to in many posts.
Is there another way i can update to the latest nightly builds? And what is causing this problem?
Thanks for help
as far as i know this is because the rom is build for us t-mobile edition.
you need to delete one line ... otherwise it won't work. so you need a computer for this.
also full wipe isn't enough. also delete preload and system.
hope this helps
birdr said:
I keep getting status 7 errors when I try to update my CM install on my i9505 international, (i'm using latest philz recovery). So far I have solved the problem by doing a full wipe and a ROM prep wipe. This is obviously not great because I have to set up the phone from scratch.
For various reasons I do not have access to a computer so cannot do the unzip / modify / rezip solutions referred to in many posts.
Is there another way i can update to the latest nightly builds? And what is causing this problem?
Thanks for help
Click to expand...
Click to collapse
You can do everything you need on your phone. I use Root Explorer to unzip, delete the format line and zip. Works fine if you do that and it's pretty easy to do.
chrisknife said:
as far as i know this is because the rom is build for us t-mobile edition.
you need to delete one line ... otherwise it won't work. so you need a computer for this.
also full wipe isn't enough. also delete preload and system.
hope this helps
Click to expand...
Click to collapse
That's not true and it's not why anyway. It's a problem with the recovery.
do you have any nfo ( workaround) how the update procedure can be done?
3bs11 said:
You can do everything you need on your phone. I use Root Explorer to unzip, delete the format line and zip. Works fine if you do that and it's pretty easy to do.
That's not true and it's not why anyway. It's a problem with the recovery.
Click to expand...
Click to collapse
ok sorry then...
i thought it's the same like on aokp nightlies.
for me it helped to delete preload and system...
had this error before too. after formating this it worked.
Thanks all. I got this working based on the advice given.
Precisely:
1. I extracted the nightly using ES file explorer.
2. I used a text editor to remove the line
format("ext4", "EMMC", "/dev/block/mmcblk0p16", "0", "/system");
from
/META-INF/com/google/android/updater-script
3. Then I re-zipped using ES file explorer.
4. Then i flashed as normal with philz recovery, wiped cache and rebooted.
Worked first time and everything upgraded as expected.
Thanks again for the help.
Okay so I am working on a custom rom and my first few attempts didn't copy anything into the /system so I decided to add the mount system into my updater-script-
I added the mount to system:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
but after flashing and grabbing a copy of the recovery.log I get the following error:
mount: failed to mount /dev/block/platform/msm_sdcc.1/by-name/userdata at /data: Device or resource busy
mount: failed to mount /dev/block/platform/msm_sdcc.1/by-name/system at /system: Device or resource busy
so I am wondering if something is wrong with the mount command or if something else could be wrong?
Any assistance will be appreciated
XxZombiePikachu said:
Okay so I am working on a custom rom and my first few attempts didn't copy anything into the /system so I decided to add the mount system into my updater-script-
I added the mount to system:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
but after flashing and grabbing a copy of the recovery.log I get the following error:
mount: failed to mount /dev/block/platform/msm_sdcc.1/by-name/userdata at /data: Device or resource busy
mount: failed to mount /dev/block/platform/msm_sdcc.1/by-name/system at /system: Device or resource busy
so I am wondering if something is wrong with the mount command or if something else could be wrong?
Any assistance will be appreciated
Click to expand...
Click to collapse
I'v got the same problem i tried to copy other roms updater scrips put it does not work too
XxZombiePikachu said:
Okay so I am working on a custom rom and my first few attempts didn't copy anything into the /system so I decided to add the mount system into my updater-script-
I added the mount to system:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
but after flashing and grabbing a copy of the recovery.log I get the following error:
mount: failed to mount /dev/block/platform/msm_sdcc.1/by-name/userdata at /data: Device or resource busy
mount: failed to mount /dev/block/platform/msm_sdcc.1/by-name/system at /system: Device or resource busy
so I am wondering if something is wrong with the mount command or if something else could be wrong?
Any assistance will be appreciated
Click to expand...
Click to collapse
These commands are correct actually... But are you following them with:
delete_recursive("/system");
package_extract_dir("system", "/system");
package_extract_dir("data", "/data");
If you use the updater-script from my stock ATT rom as an example it should boot for you...
Also you need to make sure you have Loki in the script and rom itself...
VECTUS said:
These commands are correct actually... But are you following them with:
delete_recursive("/system");
package_extract_dir("system", "/system");
package_extract_dir("data", "/data");
If you use the updater-script from my stock ATT rom as an example it should boot for you...
Also you need to make sure you have Loki in the script and rom itself...
Click to expand...
Click to collapse
I definitely have the delete recursive system followed by the extract system/data but I don't have the loki folder/commands for updater-script mainly because I don't know where to get them from/what is the command to run, when I get home I'll take a look at your updater-script and do what needs to be done(I don't want to be using other peoples scripts or files because I know some can get rather overprotective, so far I've been getting help from xdabbeb/bigfau but I don't want to have to ask for every little detail) thanks for the tip I'll update if anything good or bad happens
Sent from my potato d800
XxZombiePikachu said:
I definitely have the delete recursive system followed by the extract system/data but I don't have the loki folder/commands for updater-script mainly because I don't know where to get them from/what is the command to run, when I get home I'll take a look at your updater-script and do what needs to be done(I don't want to be using other peoples scripts or files because I know some can get rather overprotective, so far I've been getting help from xdabbeb/bigfau but I don't want to have to ask for every little detail) thanks for the tip I'll update if anything good or bad happens
Sent from my potato d800
Click to expand...
Click to collapse
Anything you want to use in that stock ROM is free to use. That's why I made it. The ROM includes loki with correct file structure. Loki install commands are at the end of the udater script in the ROM...
Edit. Lol I just remembered I threw in the data folder in the stock ROM as a place holder for apps etc. If you use the data command I'm your updater script you will need a data folder in the ROM but the data folder is not a must have for your ROM because it will be created anyway... The data folder is an old trick to load updated apks or system app Apks can be moved there to create more space for system/apps...
VECTUS said:
Anything you want to use in that stock ROM is free to use. That's why I made it. The ROM includes loki with correct file structure. Loki install commands are at the end of the udater script in the ROM...
Edit. Lol I just remembered I threw in the data folder in the stock ROM as a place holder for apps etc. If you use the data command I'm your updater script you will need a data folder in the ROM but the data folder is not a must have for your ROM because it will be created anyway... The data folder is an old trick to load updated apks or system app Apks can be moved there to create more space for system/apps...
Click to expand...
Click to collapse
The boot.img in your Rom is the 10d boot?
Yea I know about the data folder and I have it in to include some apps/others stuff and remove some of the system apps and use them as normal apps for greenify
Sent from my potato d800
hey @VECTUS after getting loki working(tested with some test splitwindow stuff I'm working on and in case you are wondering one of them force closes and renders the phone unusable while the other works but no apps show up so work in progress), I rebuilt my custom rom with new stuff(loki/kernel) and still get the mount failed in recovery, everything after the mount fails does it stuff extracting data/system, symlink and loki/boot flash(I don't see the recursive system delete in recovery.log), if you would like to take a look at the script/log let me know and i'll share a link for now I am taking a break because everything else I have made works(custom bootanimation/mods/etc) but the rom is a no go, in the last 2 days I've flashed like 15 different test and nothing if you have any insight please let me know
p.s. in your updater script you use the set_metadata/set_metadata_recursive, when I tried it I got a syntax error and changing it to set_perm/set_perm_recursive eliminates the error but then I get the /system is not a valid uid bla, bla, bla any thoughts on this?
XxZombiePikachu said:
hey @VECTUS after getting loki working(tested with some test splitwindow stuff I'm working on and in case you are wondering one of them force closes and renders the phone unusable while the other works but no apps show up so work in progress), I rebuilt my custom rom with new stuff(loki/kernel) and still get the mount failed in recovery, everything after the mount fails does it stuff extracting data/system, symlink and loki/boot flash(I don't see the recursive system delete in recovery.log), if you would like to take a look at the script/log let me know and i'll share a link for now I am taking a break because everything else I have made works(custom bootanimation/mods/etc) but the rom is a no go, in the last 2 days I've flashed like 15 different test and nothing if you have any insight please let me know
p.s. in your updater script you use the set_metadata/set_metadata_recursive, when I tried it I got a syntax error and changing it to set_perm/set_perm_recursive eliminates the error but then I get the /system is not a valid uid bla, bla, bla any thoughts on this?
Click to expand...
Click to collapse
Hey can you send me a link to your ROM? I have tomorrow to look at it... Just pm me...
I'm getting this exact same error with my SafeStrapped, GPE re-ROM'ed AT&T S4 (the one that Asurion had the nerve to replace a shattered first-gen Moto X of mine with) when attempting to take the Lollipop OTA from Joe-Tech's ROM... but then again, that's what you'd expect from a bootloader/recovery-locked device. Even so, it actually passes the verification stage... which is remarkable.
Orginally posted by Hawker (This Topic's Starter)
http://androidforums.com/members/hawker.632880/ on
http://androidforums.com/threads/a-true-wipe.481722/
A TRUE wipe
Going on from my Full wipe thread ( http://androidforums.com/threads/full-wipe-whats-the-big-deal-steps-to-take-15-mins.481696/ ) I was wondering what a Wipe data/Factory reset actually deletes from the device?
I would imagine it deletes /data, but does it remove anything else? Does it clear the root (/) filesystem full stop, or a select few folders?
I would also imagine that flashing a ROM would at least remove the /system folder and possibly a few others in the root prior to installation?
So this leaves potentially lots of untouched folders that will remain lurking indefinitely.
What is safe to remove?
For example, on my root partition I have the following folders:
acct
app-cache
cache (gets wiped in a Wipe Cache process)
config
customkernel
d
data (wiped in factory reset? The dalvik-cache folder is stored within here)
dbdata
dev
efs (very important!!!)
etc (symbolic link to /system/etc)
lib
misc
mnt
proc
res
sbin
sys
system
tmp
vendor
as well as a few files (build.prop and a few *.rc files)
And as for the /sdcard partition, I have LOADS of folders that remain untouched by a factory reset. Does the *# method wipe any these, or any other folders in the root filesystem that a factory reset does not? I think most of these have been lurking around since day 1 and probably a good few could be removed.
My concerns are :
How can i Backup everything ???
Flashfire- a solution ???
Then if nothing is there means how can i restore ???
Can i delete everything ???
How can i delete everything and install fresh original official firmware ???
My problem is i can use my phone but can use dual pacther.. i was using before.. recently i cant dual boot.. i posted logs in dual pacther forum ( http://forum.xda-developers.com/showpost.php?p=68217671&postcount=9602 ) as i am a flashaholic.
Hi everyone, I have installed in my Jiayu S3 the mentioned AOSP N 7.1, and that process was seamless.
Now, to update to 7.1.1 I read from the ROM thread:
Update for 7.1.1
Q: Can't install rom, TWRP says "Updater process ended with ERROR 7
A: Since 7.1.1 Update, you'll need to unmount /system first , then you can proceed with rom install.
Click to expand...
Click to collapse
I have tried many different ways to do that but I always get the ERROR 7 message and I cannot update.
For example, this is what I have done in one of my trials:
- Restart in Recovery
- From Recovery,
-- Wipe cache, dalvik, data & system
-- Mount section, deselect "system" and leave only cache, data, micro sdcard (deselected "mount system partition read-only")
-- Install section, select the update 7.1.1 zip file and install it.
-- Here is where the process stops and I get the error.
I have tried other ways (like wiping only cache, dalvik & data), mounting the system read only or combinations of those, but I cannot get it to work.
Any help is much appreciated! Can someone explain in a more detailed way how to install?
Thanks a lot in advance.
Ps. I would have asked in the ROM thread but I do not have sufficient permission for that.
Ps2. Here is a log of my problem: https://www.zerobin.net/?f8e33fec02b06703#Gn8wb81G+6zF7mssoMRDS2PK60GAfKnQerhfsJW3Myc=
EDIT: I managed to fix the problem, see my answer in the comments.
marabelec said:
Hi everyone, I have installed in my Jiayu S3 the mentioned AOSP N 7.1, and that process was seamless.
Now, to update to 7.1.1 I read from the ROM thread:
I have tried many different ways to do that but I always get the ERROR 7 message and I cannot update.
For example, this is what I have done in one of my trials:
- Restart in Recovery
- From Recovery,
-- Wipe cache, dalvik, data & system
-- Mount section, deselect "system" and leave only cache, data, micro sdcard (deselected "mount system partition read-only")
-- Install section, select the update 7.1.1 zip file and install it.
-- Here is where the process stops and I get the error.
I have tried other ways (like wiping only cache, dalvik & data), mounting the system read only or combinations of those, but I cannot get it to work.
Any help is much appreciated! Can someone explain in a more detailed way how to install?
Thanks a lot in advance.
Ps. I would have asked in the ROM thread but I do not have sufficient permission for that.
Ps2. Here is a log of my problem: https://www.zerobin.net/?f8e33fec02b06703#Gn8wb81G+6zF7mssoMRDS2PK60GAfKnQerhfsJW3Myc=
Click to expand...
Click to collapse
I just found this post:
https://forum.xda-developers.com/showthread.php?t=2522762
I will try to do what it says and report on the result.
As a request to the developers, it would be nice if the necessary change is already included in the ROM itself, but whatever.
Ciao!
marabelec said:
I just found this post:
https://forum.xda-developers.com/showthread.php?t=2522762
I will try to do what it says and report on the result.
As a request to the developers, it would be nice if the necessary change is already included in the ROM itself, but whatever.
Ciao!
Click to expand...
Click to collapse
Indeed, the post I refer up there was the solution to the problem.
I paste here my steps:
Download the ROM zip file and unpack. I used the file "aosp_7.1.1_s3_h560_20170213.zip"
Open in a text editor the file META-INF/com/google/android/updater-script
Remove the line starting with "assert". In this case the line was number 2. (Remember, even if in your editor it shows in several lines, you have to delete until the semi-colon.)
Save file.
Repack everything into a new .zip file, e.g. "aosp_7.1.1_s3_h560_20170213-FIX_ERROR7.zip".
Use that file to update your 7.1 to 7.1.1 from your TWRP.
Enjoy!
you need to unmount system first.