[Q] Remove full wipe command on a rom - HTC EVO 3D

hello there! i think this is my first post here but ive been lurking since my evo 4g days. But my question is, is there anyway to remove the full wipe that comes with some roms? sometimes ill flash a kernel that hates my rom or my phone or more likely me. Or some other error happens and i would like to just flash the same rom over top to repair and be on my way. ive been running meanrom gb and it works no problem. but i tried running mikrunny 1.13 and i tried flashing rcmix kernel on it and apparently it wasnt for gingerbread i guess. but since it had full wipe built in i lost all my stuff and had to start fresh. sorry for the drawn out post but just trying to explain what my reasonings are. thanks everyone for being awesome here!

You can always do a advance backup of your data in 4ext recovery, cwm recovery I believe also has that option
(Don't ask me for help as I couldn't care if your phone explodes, eh!

It's a command in the install script. Now where and how to remove, I'm not sure.

jump454 said:
hello there! i think this is my first post here but ive been lurking since my evo 4g days. But my question is, is there anyway to remove the full wipe that comes with some roms? sometimes ill flash a kernel that hates my rom or my phone or more likely me. Or some other error happens and i would like to just flash the same rom over top to repair and be on my way. ive been running meanrom gb and it works no problem. but i tried running mikrunny 1.13 and i tried flashing rcmix kernel on it and apparently it wasnt for gingerbread i guess. but since it had full wipe built in i lost all my stuff and had to start fresh. sorry for the drawn out post but just trying to explain what my reasonings are. thanks everyone for being awesome here!
Click to expand...
Click to collapse
Look at the updater-script in the meta-inf folder you will see something that looks like this at the top of the script
Code:
format("ext4", "EMMC", "/dev/block/mmcblk0p24");
Remove any line that references formatting a partition. I wanna say that's all you'd need to do. If that doesn't work PM me a link to the ROM and I'll play with it and get it how you want it.

Editing the updater-script file
This might be more than you are interested in trying, but maybe not if you've been lurking since Evo 4G days.
All Android ROM and kernel installation scripts ultimately perform the installation using a scripting language called Edify, but some of them also have an Aroma script included as a preprocessor. Here's a good description of the relationship between Edify and Aroma explained by the Aroma developer.
To do what you are asking requires editing the /META-INF/com/google/android/updater-script file within the zip file you are going to flash. I use WinZip and UltraEdit on my PC but there are a number of editors and archiving programs that will work. You have to use an editor that will leave the Unix/Linux end-of-line characters and Notepad++ is a free editor that can do that.
Once you have the updater-script file open, look for lines like this:
Code:
ui_print("Formatting DATA Partition...");
unmount("/data");
run_program("/sbin/erase_image", "userdata");
format("ext4", "EMMC", "/dev/block/mmcblk0p24");
and change them to this:
Code:
# ui_print("Formatting DATA Partition...");
# unmount("/data");
# run_program("/sbin/erase_image", "userdata");
# format("ext4", "EMMC", "/dev/block/mmcblk0p24");
The lines above are from the updater-script file in the MikVirgin 1.01 zip file.
That will prevent your data partition from being formatted, although flashallthetime's suggestion to do an advanced backup of the data partition before flashing and advanced restore afterwards is effectively the same as the above script change. However, you may find other things you want to change in updater-script files if you become more familiar with them.
For more help with editing scripts just do a Google search for "edify script". If it's more than you want to tackle, PM ItzCrooK2UxD and ask him to make the changes for you.
ramjet73

thanks guys for the fast reply. i dont wanna do a backup everytime because the backup alone takes up more time then flashing the rom over itself plus then youd have to reflash the backup after the fact. i will try some suggestions and see if they work.

Not a full back up, just an advance data back up which takes no time at all
(Don't ask me for help as I couldn't care if your phone explodes, eh!

advance databackup? ive never heard of that. im gonna see if i can locate it in 4ext right now!

When you go into recovery you'll see backup/restore and you'll see advance restore
Sent from my PG86100 using Tapatalk 2

Related

Anti-theft android system?

Hi there, guys. I don't know if I should ask this here or in the general forum, so... here I go.
I use cerberus in my nexus one since several months ago, and after watching the SassiBoB review of this program, I started to think how could I get it permanently configured into my system, just in case the thief knows how to restore the system configuration of the phone.
She says something about installing it as a system app with... ¿Rom manager?
I can't understand it perfectly, english isn't my mother tongue.
Anyway, I used titanium backup and I was able to get it installed as a system app (I could also add it to the rom zip, but... I know, I'm such a lazy ), so this step is done. Next problem: the configuration. When you do the factory reset, the configuration of the cerberus app is deleted, so it doesn't matter if it's installed or not. It won't work.
Is there any way to keep the configuration in the system, even if you do a system reset?
I know there are several other problems, like the root apps to flash the phone, or even the recovery menu, but I would like to solve all the problems step by step, and I think this is the first one.
Thank you, guys.
Pretty sure this belongs in the question section.
I don't have it cerb but, my friend told me you go to there website https://www.cerberusapp.com/ and there's a flashable zip you download and install with Rom manger.
Yes, you are right. In the cerberus web page there is a zip file which contains the cerberus app, so you can flash it as a rom, and it keeps it installed as a system app, but unfortunately there isn't any difference with the other methods. It keeps the app after a factory reset, but the configuration is deleted, so it's like the app isn't installed. I have already sent an email to them asking if there is a way to keep the configuration, but I haven't received any answer yet (and it's new year, it's weekend...).
OK, step done. They will release another version (2.0) that keeps a copy of the configuration in /etc/system, so if we add the apk and this file to the ROM, it will be safe.
Next step: the app is installed and configured BUT it has to be added to the list of devices administration in the security and privacy option (it has to manage the device). To add it, you must open the app and set the "activate" option, so we have the same problem that we had, so now it's not an app problem, but a ROM problem.
Is there any way to change the apps aded to the devices administrator option? I supose it should be, as the configuration has to be stored somewhere...
A little step more. I think I found the file where the administration params are stored. It's in /data/system/device_policies.xml
New problem: this file is in the installed system, but I can't find it in the ROM.
¿Any idea? Thanks
Another hint: I found this:
http://hi-android.info/src/com/android/server/DevicePolicyManagerService.java.html
It seems this is the class who creates the file. It should be easy to modify it so it adds the required data to the file. New problem: I can't find this class in the ROM file. I'll keep searching...
FOUND!
It's in services.jar, inside the framework directory.
It's necessary to extract the classes.dex, convert it into .jar, extract the DevicePolicyManagerService class and decompile it as java code, and here it is:
Code:
private static JournaledFile makeJournaledFile()
{
File localFile1 = new File("/data/system/device_policies.xml");
File localFile2 = new File("/data/system/device_policies.xml.tmp");
return new JournaledFile(localFile1, localFile2);
}
I think I should be able to modify it. I can't right now, but I'll post it when I try it.
I was trying to change that java file, but it's a real pain in the ass to recompile it and avoid all the errors. Then I realized that I can just modify the update script to copy the file (yes, I'm such an idiot lol).
I was trying to get it done with the update-script in META-INF/com/google/andriod/updater-script, but I can't get it working. A little help would be appreciated
Another update (Were you missing me?). I decided to modify the flasheable zip of the cerberus, so it has all the configuration files. I added the data/system/device_policies.xml and also de etc/cerberus_conf.xml files to this zip. Then, I changed the updater:
Code:
show_progress(1.000000, 0);
ui_print("Mounting /system");
run_program("/sbin/busybox", "mount", "/system");
set_progress(0.125000);
ui_print("Mounting /data");
run_program("/sbin/busybox", "mount", "/data");
set_progress(0.250000);
ui_print("Deleting old APK from /system");
delete("/system/app/Cerberus.apk");
set_progress(0.375000);
ui_print("Deleting old APK from /data");
delete("/data/app/com.lsdroid.cerberus.apk");
delete("/data/app/com.lsdroid.cerberus-1.apk");
delete("/data/app/com.lsdroid.cerberus-2.apk");
set_progress(0.500000);
ui_print("Extracting files to /system");
package_extract_dir("system", "/system");
set_progress(0.625000);
--------------ADDED-------------------
ui_print("Extracting files to /data");
package_extract_dir("data", "/data");
set_progress(0.680000);
---------------------------------------
ui_print("Unmounting /data");
unmount("/data");
set_progress(0.750000);
ui_print("Unmounting /system");
unmount("/system");
set_progress(0.875000);
ui_print("Installation complete!");
set_progress(1.000000);
It's a standalone zip file, so you need to flash your ROM and flash this zip file after it. Anyway,
WARNING
This doesn't work. After flashing the second zip file, the ROM won't boot (It keeps booting, with the boot animation in loop). I suppose I break the data directory or something like that. I'll keep trying.
Yep, I tried several things and the problem is with this line:
package_extract_dir("data", "/data");
It seems it breaks the data directory or something like that. The other files are copied perfectly.
OK, problem found with adb. With this command, it deletes completely the /data/system directory, so it keeps only the new file. Time to fix it...
EDIT: my fault. /data/system is empty until we start the system for first time. We must flash the rom, boot it, restart and flash the patch with cerberus. This is starting to be kinda stupid... If we do this, we can select cerberus in the administrators menu, instead of flashing anything...
Last post for the moment with partial conclussions.
When we do a factory reset, it deletes ALL the content of the data directory. So it's impossible to solve this problem just flashing anything after the ROM. Is the ROM who HAS TO COPY the device_priorities.xml into /data/system/. There isn't any other way, it would be erased after a factory reset.
Now, time to find out how to get it done by the ROM. I'll let you know as soon as I get it.
Work!
I did a full wipe (Wipe Data / Factory Reset + Wipe Cache Partition Wipe Dalvik Cache) and installed the official samsung rom (Android 4.1.2). I installed the flashable ZIP from the site on my galaxy s2 and did not have to reconfigure anything. Everything worked as it should. I believe that the application connects to the user's account based on the information of the device recorded previously.
Avast anti-theft has a Function to protect the configuration after a wipe. Just discover how avast achieves this.
(Translated via google translator)
That's the one thing is that even Avast and Cerberus won't escape if /system is formatted, but Avast did make it through a full SBF followed by factory reset on my phone.

[Q] Recovery script for removing system apps

I've been running CM nightlies as long as they've been available for my device (Samsung Captivate). After each flash though, I have to go in through Titanium Backup and uninstall a number of system apps (mail, exchange services, music, DSP manager, news & weather, dev tools) that I do not use for various reasons. I know the ROM runs fine without these elements, as I've been removing them for years now. Manually removing them wasn't such an issue until my phone received a TWRP recovery, which effectively gets me much closer to a "one-click" nightly update making the manual cleanup more of a burden to my lazy lifestyle.
My question is, I'd like to create a CWM flashable zip that contains only an update script that removes the system apk's that I specify. Using TWRP I'd like to be able to flash the update, the kernel, and my custom "cleanup" zip in that order. I know the path to all the subject apks, but I know little about scripting or creating CWM zips. Can anyone point me in the right direction to do so? I know my way around a bash script, but I'm not even sure if that's relevant.
Why not open the zip on you pc with, for example Winrar, and remove the apk files from system\app ?
Much easier!
airtower said:
I've been running CM nightlies as long as they've been available for my device (Samsung Captivate). After each flash though, I have to go in through Titanium Backup and uninstall a number of system apps (mail, exchange services, music, DSP manager, news & weather, dev tools) that I do not use for various reasons. I know the ROM runs fine without these elements, as I've been removing them for years now. Manually removing them wasn't such an issue until my phone received a TWRP recovery, which effectively gets me much closer to a "one-click" nightly update making the manual cleanup more of a burden to my lazy lifestyle.
My question is, I'd like to create a CWM flashable zip that contains only an update script that removes the system apk's that I specify. Using TWRP I'd like to be able to flash the update, the kernel, and my custom "cleanup" zip in that order. I know the path to all the subject apks, but I know little about scripting or creating CWM zips. Can anyone point me in the right direction to do so? I know my way around a bash script, but I'm not even sure if that's relevant.
Click to expand...
Click to collapse
Good source is here: http://forum.xda-developers.com/showthread.php?p=17684719
To remove files you'll want:
Code:
mount("ext4", "EMMC", "/dev/block/mmcblk0p22", "/system");
delete("/system/app/blah.apk");
unmount("/system");
Your mount command will probably be different, so check the CM update-script for the equivalent one
RoadXY said:
Why not open the zip on you pc with, for example Winrar, and remove the apk files from system\app ?
Much easier!
Click to expand...
Click to collapse
I rarely use my own PC in the flashing process. Grandfathered in on an unlimited data plan, and I usually flash at work and connecting my phone to my work PC is verboten. Plus it takes about as much time to just uninstall them from TiBu.
Atarii said:
Good source is here: http://forum.xda-developers.com/showthread.php?p=17684719
To remove files you'll want:
Code:
mount("ext4", "EMMC", "/dev/block/mmcblk0p22", "/system");
delete("/system/app/blah.apk");
unmount("/system");
Your mount command will probably be different, so check the CM update-script for the equivalent one
Click to expand...
Click to collapse
That's exactly what I need! Thanks a ton!!
Posted in that other thread linked here but going to ask here as well:
Quick question, for a delete command can you use a wildcard?
Like this:
delete("/system/app/SamsungHub.*");
I only ask because some roms have .apk and some are .odex (for example). Looking to make one script work for any stock rom on my phone.
Also, according to my TWRP log I'm able to mount /system but /data threw an error:
mount: failed to mount /dev/block/mmcblk0p29 at /data: Device or resource busy
Looks right in the partition area:
Symlink_Path: /data/media/0
Symlink_Mount_Point: /sdcard
Primary_Block_Device: /dev/block/mmcblk0p29
Any thoughts why?
script file
airtower said:
I rarely use my own PC in the flashing process. Grandfathered in on an unlimited data plan, and I usually flash at work and connecting my phone to my work PC is verboten. Plus it takes about as much time to just uninstall them from TiBu.
That's exactly what I need! Thanks a ton!!
Click to expand...
Click to collapse
Hello, I'm also looking for same. can you share your remove/delete apk script file. I'll make the necessary changes myself.
Thankyou
jd2050 said:
Hello, I'm also looking for same. can you share your remove/delete apk script file. I'll make the necessary changes myself.
Thankyou
Click to expand...
Click to collapse
I'm not using one anymore. This thread is nearly 5 years old.

[Q] need help with new rom

hi guys, im not a developer and im not that noob.
i have galaxy s2 us cellular and i flashed it with the generic JB 4.1.2 rom. ODIN md5 file....everything works great including my network and data
but i wanted to change some stuff in build.prop but keep the rom without root and stock, so i extracted the md5 file with z7 and i took the factoryfs.img and opened with dsixda's Android Kitchen. the kitchen gave me an warning about there is no boot.img, so it will a created a fake boot.img.... looks good so far >>>i guess :silly:
anyway the kitchen processed to the end and i got the working_rom, i edited on build.prop with note++ and i entered 99 and then 2 "lazy"...
i got the rom with out boot.img, i was thinking even if i flash this rom and doesn't boot then i will flash the boot.bin with odin (from the same generic JB 4.1.2 package that i extracted)....
bottom line i tried to flash it with CWM, but it gives me an error status 0. i did ask and they told me to change mount("MTD", "system", "/system"); TO mount("yaffs2", "MTD", "system", "/system"); .... in updateR script i did that
but now it gives me error status 7.... i tried to make the system folder as factoryfs.img by selecting all files and folders inside in add archive with z7 and change the extension to img.. and then zip it to tar with z7.......BUT IT DIDNT WORK ....
i know sound i messed up a lot and i have know idea what im doing with this samsung rom....cuz i have been working on a few roms with htc and i loved it... just i feel it easier .....
thanks guys and i hope someone can help me????!!!!!!
btw im working on windows 7 x32 and i have ubuntu installed on my PC ....
hope this might help you
though it is not for our device its for tab2 but just have a look and it might help you...
Peaceful Droid said:
hope this might help you
though it is not for our device its for tab2 but just have a look and it might help you...
Click to expand...
Click to collapse
i will give it a shot :fingers-crossed: thanks

[Q] New cooked ROM from android kitchen gets status 7 error when flashing

Okay so uh...I'm trying to make my own custom ROM from a stock Galaxy S3 sgh-i747, using dsixda's Kitchen.
My problem is that I am getting a status 7 error when trying to flash it.
Now I know, since I read the FAQ, that it has something to do with the updater-script. The only info I could gather is that you need to go in and change the format/mount code.
I have this:
Code:
format("ext4", "EMMC", "/dev/block/mmcblk0p14");
mount("ext4", "EMMC", "/dev/block/mmcblk0p14", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/data");
So I suppose my real question is...what am I supposed to change (it to) so I can make it work? (and what else might I need to change?)
Any help greatly appreciated!
Edit: Oh and um...I'm also wondering.... If I put any new apks in the rom (such as note2 camera, etc.), do I have to put specific code in the script for them? (I'm a bit new to all this--everyone starts somewhere I guess)
same issue with me also .. Any one there to help?
Figure out your mount points if this is your error, also depending on your update-binary youay need to change the format of the arguments
As for the question about adding .apks, yes you need to modify updater-script to reflect this, and it depends on what folder they are in for ROM.zip and what partition you want them stored in.
Can't answer any further without more info but Google is your friend
Sent from my Nexus 4 using Tapatalk 2
Thats why i don't use kitchen, you wont LEARN anything.
and then you have this kind of problems, and you cant fix them.
And the last reply it usefull, check your mount points.
may be the updater-binary making the cause, try updater binary of working rom.
TroubleShooter™ said:
may be the updater-binary making the cause, try updater binary of working rom.
Click to expand...
Click to collapse
Try from the stock rom first (if the stock is running the same Android os version)

Updater-script help

Hello everyone!
I am trying learning how to create cwm flashable items. I have some questions though.
While i was trying to see how an updater-script was made, i edited some scripts from cwm for themes, wallpapers etc.
I saw that some files have:
run_program("/sbin/unmount", "/dev/block/mmcblk0p2", "/system");
run_program("/sbin/unmount", "/dev/block/mmcblk0p10", "/system");
run_program("/sbin/unmount", "/dev/block/mmcblk0p12", "/system");
What does it stand for? Which is the difference between mmcblk0p2,mmcblk0p10 and mmcblk0p12?
Thanks in advance
Anyone?
Thhey are the mount points for the memory, they are different for each device. If you have some that work for your device that point to the system partition, then just use them. Changing them will mean you will get a bootloop, or the mod wont flash
gregbradley said:
Thhey are the mount points for the memory, they are different for each device. If you have some that work for your device that point to the system partition, then just use them. Changing them will mean you will get a bootloop, or the mod wont flash
Click to expand...
Click to collapse
Thanks mate, but what if i want to create a cwm for another device? How am i supposed to know which one fits?
See my flashable zip tool thread
On general section
Press thanks if I helped

Categories

Resources