[Q] Creating a CWM flashable zip - Samsung Galaxy Grand Quattro

Can anybody point me out how to create a CWM flashable zip? i did find a lot of topics, but i've noticed that any ZIP package has to be phone specific, at least a glimpse on the updater-script showed me partition names which i am very unfamiliar with.
The simplest method gives you a zip file where all you have to do is put system.img, boot.img and recovery.img on it, and a very basic script (i think):
Code:
ui_print("Starting ...");
ui_print(" ");
ui_print("Boot Partition Writing ...");
package_extract_file("boot.img", "/dev/block/mmcblk0p8");
ui_print("System Partition Writing ... ");
package_extract_file("system.img", "/dev/block/mmcblk0p15");
ui_print("Recovery Partition Writing ... ");
package_extract_file("recovery.img", "/dev/block/mmcblk0p13");
ui_print("Pass");
ui_print("Wipe data & Cache & Dalvik and reboot system ");
however, the code above, i found it on the GT-i9001 threads, so i dont want to risk anything...especially with the partition blocks.
the point of this thread is to convert our odin packages to cwm flshable zips, though the reason behind it is trying to flash a 4.2 rom from a identical device as ours, in fact, it is the same device, for more info check this thread

i think it's already exist now
PlutoDelic said:
Can anybody point me out how to create a CWM flashable zip? i did find a lot of topics, but i've noticed that any ZIP package has to be phone specific, at least a glimpse on the updater-script showed me partition names which i am very unfamiliar with.
The simplest method gives you a zip file where all you have to do is put system.img, boot.img and recovery.img on it, and a very basic script (i think):
Code:
ui_print("Starting ...");
ui_print(" ");
ui_print("Boot Partition Writing ...");
package_extract_file("boot.img", "/dev/block/mmcblk0p8");
ui_print("System Partition Writing ... ");
package_extract_file("system.img", "/dev/block/mmcblk0p15");
ui_print("Recovery Partition Writing ... ");
package_extract_file("recovery.img", "/dev/block/mmcblk0p13");
ui_print("Pass");
ui_print("Wipe data & Cache & Dalvik and reboot system ");
however, the code above, i found it on the GT-i9001 threads, so i dont want to risk anything...especially with the partition blocks.
the point of this thread is to convert our odin packages to cwm flshable zips, though the reason behind it is trying to flash a 4.2 rom from a identical device as ours, in fact, it is the same device, for more info check this thread
Click to expand...
Click to collapse
The below can be used fro CWM. I didn't try it yet, but it was posted in tools and utilities section.

mohamed_fattoh said:
The below can be used fro CWM. I didn't try it yet, but it was posted in tools and utilities section.
Click to expand...
Click to collapse
Oh, you probably misunderstood me. I needed to know how to create a ZIP so i can flash it through CWM. I already have it, exactly what you've pasted , thnx for trying to help btw.

Check this this out. http://pan.baidu.com/s/1qWyNG8O
Might be a flashable i8558 rom. Muamk1
It semms that download links for i8558 custom roms are removed from their sites.
Got that link fromb http://m.romjd.com/Rom/Detail/35720
Another rom here. http://m.romjd.com/Rom/Detail/27609

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.

Visual Land 7L stuck in clockworkmod v6.0.1.3

Tried to get a clockworkmod working on my Visual Land 7L. Found a thread that gave me a clockwork recovery that worked with the Visual Land 7 (NOT 7L) but it still installed normally and even booted into it. Volume rocker didn't interact with the recovery so I rebooted. Took the recovery that same recovery and used CWM's Recovery Builder but added touch support. It finished successfully so I flashed the new recovery, now I can move through the menu but when I restart my phone it always goes into clockworkmod. Any help fixing this would be great. If I could just downgrade the recovery to the one that didn't mess up my tablet I'm sure I'd be fine but I only have a recovery.img and somewhere I read putting it in a zip named update by itself should be fine but installation always fails. The error is "Installation aborted."
Ok so I've made some progress, turns out I can install another recovery (the one that didn't brick my device) but it needs to be a recovery.img inside of a .zip file. On top of that a META-INF file with four or five subdirectories with two files at the end. One of which I think is just initializes the other one. I was able to edit the updater-script because I kept getting status errors. Now it'll start to install the image and show a progress bar but comes up with an error when it has to ask me if it's ok to keep going. The error is now just with Assert. No idea what I need to change. This is what my updater-script looks like when you open it in notepad.
show_progress(1.000000, 0);
ui_print("");
ui_print(" Notion Ink Adam Clockworkmod 3.0.2.8 051311 ");
ui_print("");
ui_print("---------------installing recovery.img----------");
assert(package_extract_file("recovery.img", "/tmp/recovery.img"), write_raw_image("/tmp/recovery.img", "/system/bin/recovery"), delete("/tmp/recovery.img"));
ui_print("-----------------------------------------------");
ui_print("Installation done! Please reboot");
squirrelthingy said:
Ok so I've made some progress, turns out I can install another recovery (the one that didn't brick my device) but it needs to be a recovery.img inside of a .zip file. On top of that a META-INF file with four or five subdirectories with two files at the end. One of which I think is just initializes the other one. I was able to edit the updater-script because I kept getting status errors. Now it'll start to install the image and show a progress bar but comes up with an error when it has to ask me if it's ok to keep going. The error is now just with Assert. No idea what I need to change. This is what my updater-script looks like when you open it in notepad.
show_progress(1.000000, 0);
ui_print("");
ui_print(" Notion Ink Adam Clockworkmod 3.0.2.8 051311 ");
ui_print("");
ui_print("---------------installing recovery.img----------");
assert(package_extract_file("recovery.img", "/tmp/recovery.img"), write_raw_image("/tmp/recovery.img", "/system/bin/recovery"), delete("/tmp/recovery.img"));
ui_print("-----------------------------------------------");
ui_print("Installation done! Please reboot");
Click to expand...
Click to collapse
Im in the same boat i cant get out of CWM for nothing it keeps saying cant mount well anything

[Q] CWM recovery doesnt work

Hi guys I am new here and I can write into this topic: http://forum.xda-developers.com/showthread.php?t=1721680
So here is my problem...
I made a zip file following the instructions here. The only difference is I need to put files into data (but there was an answer in the topic how to make it so.. I renamed the folder system to data and changed the script)
My script looks like this
run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("data", "/data");
ui_print("Enjoy!");
I put the .zip file into mnt/sdcard/clockworkmod/backup and tried to use titanium backup to run it...
But it always crashes when I click the file sample.zip
Whats wrong?Can I use other apps to start it?
LetisXXX said:
Hi guys I am new here and I can write into this topic: http://forum.xda-developers.com/showthread.php?t=1721680
So here is my problem...
I made a zip file following the instructions here. The only difference is I need to put files into data (but there was an answer in the topic how to make it so.. I renamed the folder system to data and changed the script)
My script looks like this
run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("data", "/data");
ui_print("Enjoy!");
I put the .zip file into mnt/sdcard/clockworkmod/backup and tried to use titanium backup to run it...
But it always crashes when I click the file sample.zip
Whats wrong?Can I use other apps to start it?
Click to expand...
Click to collapse
what are you trying to do? Install an app?

[GUIDE] dsixda's Android Kitchen now on P760!!

Hi all guys, finally i've found the way to use this very nice tool on our device!!
I've tested it on my P760 with v20b stock ROM and with some little addon it runs fine
First of all i want to clarify that this guide uses a tool made for the xda comunity by dsixda, so the major credit goes to him.
Dont ask me if it works on other variants, i have the P760 only, so try by yourself and let us know.
What you need:
dsixda's Android Kitchen
dsixda Android Kitchen P760 addon
KDZ file or CWM backup of your stock ROM
...a bit of knowledge on what you are doing
_______
Download and install dsixda Android Kitchen from original thread
Download dsixda_Android_Kitchen_P760_addon and extract the contents somewhere to your pc.
You can see two folder "dsixda_edify_defs" and "brocken_sys_files", copy dsixda_edify_defs content to "\Cygwin\home\YourUserName\Kitchen\tools\edify_defs" folder.
Now we need system and boot from our rom. If you have a CWM backup just copy system.ext4.tar.a and boot.img to "original_update" folder of dsixda kitchen and rename "system.ext4.tar.a" to "system.ext4.tar"
If you want to use KDZ stock ROM please refer to this guide provided by kuma82 on how to extract system.img and boot.img
Now run dsixda Android Kitchen and setup your working folder (detailed info on hawto in the original thread).
When setup completed than copy the "brocken_sys_files" contents located in dsixda_Android_Kitchen_P760_addon.zip to the locations specified in the included readme file. I dont know why but dsixda kitchen doesnt process these files correctly so we have to add them manually. They are taken from V20b but should work on other version too.
Ok,now we are ready to apply our mods and cook!!
I've cooked my own ROM from KDZ file and tested some feature, root, deodex, zipalign, init.d, /data/app, all works fine. I've found only one issue releted to deodexing LG keyboard, just replace it with another one and all should be fine.
NOT tested with CM rom.
I'm NOT responsable of any kind of demage caused by using this method, so use it at your own risk.
@moderators
I dont know if this is the right section where to post this guide, if no than feel free to move it to the right one.
Credits:
dsixda (for Android kitchen)
kuma82 and cmahendra (for KDZ extraction)
___
Thanks for sharing the info, Android kitchen was already working but I had to change the updater-script and update-binary manually.
Lol, I didn't think about changing the CWM backup system .tar.a file to .tar I just used the dd command to extract (my current) system.img to my sdcard
Code:
dd if=/dev/block/mmcblk0p10 of=/sdcard/system.img
Note: my internal and external or swapped, so change accordingly
Another thing, thanks for giving me credit for my guide
@- shifu - thanks man! you have two pm!
@kuma82 how you change it?
format("MTD", "system");
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
....
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
Click to expand...
Click to collapse
with:
format("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.1/by-name/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.1/by-name/system", "/system");
...
package_extract_file("boot.img", "/dev/block/platform/omap/omap_hsmmc.1/by-name/boot");
Yup, to tell you the truth I haven't tried it yet, been to busy, to actually flash it, but if I'm not mistaken @Kid_Ding used it (android kitchen) to port pac rom to the P769
Sent from my LGMS769 using xda app-developers app
kuma82 said:
Thanks for sharing the info, Android kitchen was already working but I had to change the updater-script and update-binary manually.
Click to expand...
Click to collapse
for me it never worked, even changing updater-script.. but i've tried with stock ROM only, maybe with CM just made the changhes you've mentioned.
Anyway with my addon it works out of the box, no need to modify updater-script
Lol, I didn't think about changing the CWM backup system .tar.a file to .tar I just used the dd command to extract (my current) system.img to my sdcard
Code:
dd if=/dev/block/mmcblk0p10 of=/sdcard/system.img
Note: my internal and external or swapped, so change accordingly
Click to expand...
Click to collapse
yep, i've tried and it worked
Another thing, thanks for giving me credit for my guide
Click to expand...
Click to collapse
of nothing colleague
Very Useful.
Very useful Thread. Saved lot of time. Thanks

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