Related
hi,
i've been trying and searching for several hours to change some things within the /data partition. but it seems that i even didn't succeed in mounting the partition correctly. commands i've tried (for new edify updater-script):
Code:
run_program("/sbin/mount", "-o", "rw", "/dev/block/stl7", "/data");
run_program("/system/bin/mount", "-o", "rw", "/dev/block/stl7", "/data");
mount("MTD", "userdata", "/data");
mount("MTD", "data", "/data");
mount("BML", "data", "/data");
mount("rfs", "/dev/block/stl7", "/data");
run_program("mount", "rfs", "/dev/block/stl7", "/data");
nothing seems to work on my galaxy3 v2.1. in order to write stuff to /data i've tried package_extract_dir("data", "/data"); and also run_program("echo", "123", ">", "/data/sometestfile");
mounting /system and extracting files to /system works but i'm not able to access or write to /data
thanks for any input.
#SynergyROM Superwipe thanks Mike
ui_print("");
ui_print("");
ui_print("");
ui_print("==============================================");
ui_print("| Wiping Script |");
ui_print("| This operation will remove all your data |");
ui_print("| You have 10 seconds to remove the battery |");
ui_print("| to cancel this procedure |");
ui_print("==============================================");
ui_print("");
ui_print("");
ui_print("");
run_program("/sbin/sleep", "10");
ui_print("1. Erasing & formatting EXT4 *CACHE* partition");
assert(unmount("/cache") || ui_print("(cache is unmounted already)"));
run_program("/sbin/erase_image", "cache");
format("ext4", "EMMC", "/dev/block/mmcblk0p25");
ui_print("");
ui_print("");
run_program("/sbin/sleep", "5");
ui_print("2. Erasing & formatting EXT4 *SYSTEM* partition");
assert(unmount("/system") || ui_print("(system is unmounted already)"));
run_program("/sbin/erase_image", "system");
format("ext4", "EMMC", "/dev/block/mmcblk0p23");
ui_print("");
ui_print("");
run_program("/sbin/sleep", "5");
ui_print("3. Erasing & formatting EXT4 *DATA* partition");
assert(unmount("/data") || ui_print("(data is unmounted already)"));
run_program("/sbin/erase_image", "userdata");
format("ext4", "EMMC", "/dev/block/mmcblk0p24");
ui_print("");
ui_print("");
run_program("/sbin/sleep", "5");
ui_print("4. Erasing *BOOT* partition");
assert(unmount("/boot") || ui_print("(boot is unmounted already)"));
run_program("/sbin/erase_image", "boot");
ui_print("");
ui_print("");
run_program("/sbin/sleep", "5");
ui_print("5. Removing system files from SD Card");
delete_recursive("/sdcard/.android_secure");
delete_recursive("/sdcard/.bookmark_thumb1");
delete_recursive("/sdcard/.data/footprints");
delete_recursive("/sdcard/.data/mail");
delete_recursive("/sdcard/Android/data/com.android.providers.media");
delete_recursive("/sdcard/Android/data/com.google.android.apps.genie.geniewidget.news-content-cache");
delete_recursive("/sdcard/Android/data/com.google.android.apps.maps");
delete_recursive("/sdcard/.data/navigator/Data/Temporary");
delete_recursive("/sdcard/LazyList");
delete_recursive("/sdcard/LOST.DIR");
ui_print("");
ui_print("");
ui_print("");
ui_print(">>> All partition wiped successfully! <<<");
ui_print("");
ui_print("");
ui_print("");
run_program("/sbin/sleep", "5");
ui_print("6. Now checking filesystems for errors");
run_program("/sbin/e2fsck", "-p", "/dev/block/mmcblk0p23");
run_program("/sbin/e2fsck", "-p", "/dev/block/mmcblk0p24");
run_program("/sbin/e2fsck", "-p", "/dev/block/mmcblk0p25");
ui_print("");
ui_print("");
run_program("/sbin/sleep", "5");
ui_print("7. Creating log file on SD card");
run_program("/sbin/busybox", "cp", "/tmp/recovery.log", "/sdcard/superwipe.log");
ui_print("");
ui_print("");
run_program("/sbin/sleep", "5");
ui_print("==============================================");
ui_print("| Now you can flash SynergyROM |");
ui_print("| Device will reboot in recovery mode |");
ui_print("==============================================");
run_program("/sbin/sleep", "5");
run_program("/sbin/reboot", "recovery");
My thinking ???
Or do I need to change these lines:
ui_print("1. Erasing & formatting EXT4 *CACHE* partition");
run_program("/sbin/erase_image", "cache");
format("ext4", "EMMC", "/dev/block/mmcblk0p4");
ui_print("2. Erasing & formatting EXT4 *SYSTEM* partition");
run_program("/sbin/erase_image", "system");
format("ext4", "EMMC", "/dev/block/mmcblk0p3");
ui_print("3. Erasing & formatting EXT4 *DATA* partition");
run_program("/sbin/erase_image", "data");
format("ext4", "EMMC", "/dev/block/mmcblk0p8");
ui_print("5. Removing system files from SD Card");
delete_recursive("/mnt/sdcard/.android_secure");
delete_recursive("/mnt/sdcard/LOST.DIR");
BUMP... sorry =[
im quite curious as to the correct partition names aswell lol
Stokbroka said:
Or do I need to change these lines:
ui_print("1. Erasing & formatting EXT4 *CACHE* partition");
run_program("/sbin/erase_image", "cache");
format("ext4", "EMMC", "/dev/block/mmcblk0p4");
ui_print("2. Erasing & formatting EXT4 *SYSTEM* partition");
run_program("/sbin/erase_image", "system");
format("ext4", "EMMC", "/dev/block/mmcblk0p3");
ui_print("3. Erasing & formatting EXT4 *DATA* partition");
run_program("/sbin/erase_image", "data");
format("ext4", "EMMC", "/dev/block/mmcblk0p8");
ui_print("5. Removing system files from SD Card");
delete_recursive("/mnt/sdcard/.android_secure");
delete_recursive("/mnt/sdcard/LOST.DIR");
Click to expand...
Click to collapse
The original won't work at all, this looks better, but I'd remove the "erase_image" lines. Why erase if your going to format? Also, double check what partition types each one is supposed to be. I was thinking one of them was EXT3, but not sure.
If you look in the Samsung Epic 4G touch forum, development section for one of Caulkins ROMs, you should find a wipe all flashable script that is pretty good. I'd start with it and modifiy it for A500 partitions.
If I get a chance, I'll put one together for A500.
PS. partitions #'s in quoted post are correct. And don't forget flexrom.
Stokbroka said:
Or do I need to change these lines:
ui_print("1. Erasing & formatting EXT4 *CACHE* partition");
run_program("/sbin/erase_image", "cache");
format("ext4", "EMMC", "/dev/block/mmcblk0p4");
ui_print("2. Erasing & formatting EXT4 *SYSTEM* partition");
run_program("/sbin/erase_image", "system");
format("ext4", "EMMC", "/dev/block/mmcblk0p3");
ui_print("3. Erasing & formatting EXT4 *DATA* partition");
run_program("/sbin/erase_image", "data");
format("ext4", "EMMC", "/dev/block/mmcblk0p8");
ui_print("5. Removing system files from SD Card");
delete_recursive("/mnt/sdcard/.android_secure");
delete_recursive("/mnt/sdcard/LOST.DIR");
Click to expand...
Click to collapse
Only 1 way to find out now, isn't there?
The joys and pains of living in the Dev world
Only 1 way to find out. Slap that bad boy in your rom install.
What's the worst that could happen? You have to reset your partitions.
I assume at least half of Android users get Error status 6 while flashing ROMs. This can be explained in 2 reasons.
Number 1:The developer of the ROM was too stupid to fix this mistake
Click to expand...
Click to collapse
or
Number 2: You are tying to port a ROM and those errors come to you
Click to expand...
Click to collapse
So lets start fixing.
Extract the ROM. Open META-INF com google android and open with Notepad++ updater-scipt.
Find the line called mount("ext4", "EMMC", "/dev/block/some kind of Letters and Numbers ", "/system");
This command is telling the device to mount the system from a path. Each device has a different path.
The path is those some kind of letters and numbers up bellow.
Those numbers and letters are different for every device.
So maybe the letters are not correct and it can't find the path to mount the data.
What we need to do is change the path. For the path that is for your device.
Easiest way to do this is to find a ROM meant and tested for your device, open updater-script, got to the same line and replace the path.
Example change mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system"); to mount("ext4", "EMMC", "/dev/block/mmcblk0p22", "/system");
Click to expand...
Click to collapse
You may also find these two lines
format("ext4", "EMMC", "/dev/block/some kind of letters and numbers", "0", "/system");
mount("ext4", "EMMC", "/dev/block/some kind of letters and numbers", "/system");
The first line is telling the device to format the data.
The second line is telling the device to mount the data
The error is similar to the error up.
You need to change the path for the data
But the path for the data is different for the path for the system
So go to the same path on the ROM for your device and change the code
But remember the codes for the data and for the system are not the same.
Example Change format("ext4", "EMMC", "/dev/block/mmcblk0p29", "0", "/system"); and
mount("ext4", "EMMC", "/dev/block/mmcblk0p29", "/system"); to format("ext4", "EMMC", "/dev/block/mmcblk0p20", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p20", "/system");
Click to expand...
Click to collapse
And the errors should be fixed.
Post a reply there is still an error.
Leave a tnx or donate if I helped.
i've tried your solution for the cm7.2 rc3 aa-oc-firekernel rom for Galaxy Ace.
After having a status 7 error i removed the lines containing assert... etc.
now I'm gettin the status 6 error and i've modified the format and mount lines.
I've looked in 2 similar roms which can be flashed (one of 'm is my current rom).
the other one is the rom i've used before, so both work.
these roms start as follows:
Code:
format("ext4", "EMMC", "/dev/block/stl12", "0");
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
package_extract_dir("system", "/system");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
the update-script from the rom I'd like to flash starts like this:
Code:
package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
set_perm(0, 0, 0777, "/tmp/backuptool.sh");
run_program("/tmp/backuptool.sh", "backup");
show_progress(0.500000, 0);
format("ext4", "EMMC", "/dev/block/stl12", "0");
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
package_extract_dir("recovery", "/system");
package_extract_dir("system", "/system");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
a bit different but the format and mount lines are indentical.
I can't figure out why I'm keep getting this status 6 error.
can you help me with it?
DutchArjo said:
i've tried your solution for the cm7.2 rc3 aa-oc-firekernel rom for Galaxy Ace.
After having a status 7 error i removed the lines containing assert... etc.
now I'm gettin the status 6 error and i've modified the format and mount lines.
I've looked in 2 similar roms which can be flashed (one of 'm is my current rom).
the other one is the rom i've used before, so both work.
these roms start as follows:
Code:
format("ext4", "EMMC", "/dev/block/stl12", "0");
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
package_extract_dir("system", "/system");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
the update-script from the rom I'd like to flash starts like this:
Code:
package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
set_perm(0, 0, 0777, "/tmp/backuptool.sh");
run_program("/tmp/backuptool.sh", "backup");
show_progress(0.500000, 0);
format("ext4", "EMMC", "/dev/block/stl12", "0");
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
package_extract_dir("recovery", "/system");
package_extract_dir("system", "/system");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
a bit different but the format and mount lines are indentical.
I can't figure out why I'm keep getting this status 6 error.
can you help me with it?
Click to expand...
Click to collapse
if you get a Status 7 error then you have to flash the rom using different recovery.
hope I helped, if yes then plz hit the thx button.:good:
i'm getting Status 6 error with this
Code:
assert(getprop("ro.product.device") == "mako" || getprop("ro.build.product") == "mako" || abort("E3004: This package is for device: mako; this device is " + getprop("ro.product.device") + "."););
ui_print("Target: google/occam/mako:7.1/NDE63X/2167285:user/release-keys");
ifelse(is_mounted("/system"), unmount("/system"));
package_extract_dir("install", "/tmp/install");
set_metadata_recursive("/tmp/install", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644);
set_metadata_recursive("/tmp/install/bin", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755);
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "backup");
unmount("/system");
if is_mounted("/data") then
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
else
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data", "");
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
unmount("/data");
endif;
show_progress(0.750000, 0);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/platform/msm_sdcc.1/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
show_progress(0.020000, 10);
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "restore");
unmount("/system");
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
show_progress(0.200000, 10);
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
ui_print("flashing substratum");
package_extract_file("Substratum.apk", "/system/app/Substratum/Substratum.apk");
set_perm_recursive(0, 0, 0644, "/system/app/Substratum/Substratum.apk");
set_perm_recursive(0, 0, 0644, "/system/build.prop");
unmount("/system");
set_progress(1.000000);
i just added extra flashing process..
placed files in zip but getting error
i added extra lines from here
Code:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
ui_print("flashing substratum");
package_extract_file("Substratum.apk", "/system/app/Substratum/Substratum.apk");
set_perm_recursive(0, 0, 0644, "/system/app/Substratum/Substratum.apk");
set_perm_recursive(0, 0, 0644, "/system/build.prop");
unmount("/system");
set_progress(1.000000);
please reply asap..
Hey, I've got a problem, so I can not to deal with the "updater-script" ... I read that it is a bad write the same file format. I suggested this youtube.com/watch?v=h5QbsUsQx70 but it did not help ... So can you convert this to me somehow the script itself, To work?
Here gives a code from a script:
Code:
show_progress(0.200000, 0);
ui_print("Windows 8 ROM By DANiO");
ui_print("");
ui_print("Uruchamiam program konwertacyjny z RFS na EXT4");
package_extract_file("tools/busybox", "/tmp/busybox");
package_extract_file("tools/fsck.ext4", "/tmp/fsck.ext4");
package_extract_file("tools/tune2fs.ext4", "/tmp/tune2fs.ext4");
package_extract_file("tools/mkfs.ext4", "/tmp/mkfs.ext4");
package_extract_file("tools/mke2fs.conf", "/etc/mke2fs.conf");
package_extract_file("tools/su", "/tmp/su");
package_extract_file("bmlunlock", "/tmp/bmlunlock");
run_program("/tmp/bmlunlock");
unmount("/system");
run_program("/tmp/fsck.ext4", "-fy", "/dev/block/stl9");
run_program("/tmp/mkfs.ext4", "-O", "^ext_attr,^has_journal,^huge_file", "-L", "SYSTEM", "-b", "4096", "-m", "0", "-F", "/dev/block/stl9");
run_program("/tmp/tune2fs.ext4", "-c", "1", "-m", "0", "-o", "journal_data_writeback", "/dev/block/stl9");
run_program("/tmp/fsck.ext4", "-Dfy", "/dev/block/stl9");
unmount("/data");
run_program("/tmp/fsck.ext4", "-fy", "/dev/block/stl11");
run_program("/tmp/mkfs.ext4", "-O", "^ext_attr,^has_journal,^huge_file", "-L", "DATA", "-b", "4096", "-m", "0", "-F", "/dev/block/stl11");
run_program("/tmp/tune2fs.ext4", "-c", "1", "-m", "0", "-o", "journal_data_writeback", "/dev/block/stl11");
run_program("/tmp/fsck.ext4", "-Dfy", "/dev/block/stl11");
unmount("/cache");
run_program("/tmp/fsck.ext4", "-fy", "/dev/block/stl10");
run_program("/tmp/mkfs.ext4", "-O", "^ext_attr,^has_journal,^huge_file", "-L", "CACHE", "-b", "4096", "-m", "0", "-F", "/dev/block/stl10");
run_program("/tmp/tune2fs.ext4", "-c", "1", "-m", "0", "-o", "journal_data_writeback", "/dev/block/stl10");
run_program("/tmp/fsck.ext4", "-Dfy", "/dev/block/stl10");
unmount("/system");
format("ext4", "EMMC", "/dev/block/stl9", "0", "/system");
mount("ext4", "EMMC", "/dev/block/stl9" "/system");
unmount("/data");
format("ext4", "EMMC", "/dev/block/stl11", "0", "/data);
mount("ext4", "EMMC", "/dev/block/stl11", "/data");
unmount("/cache");
format("ext4", "EMMC", "/dev/block/stl10", "0", "/cache);
mount("ext4", "EMMC", "/dev/block/stl10", "/cache");
package_extract_file("bmlunlock", "/tmp/bmlunlock");
package_extract_file("boot.img", "boot.img");
run_program("/tmp/bmlunlock");
ui_print("Wgrywanie Kernel'a...");
run_program("/tmp/busybox", "dd", "if=boot.img", "bs=1", "count=40", "seek=786436", "of=/dev/bml15");
run_program("/sbin/busybox", "sh", "/sbin/fix_permissions");
unmount("/data");
package_extract_file("tools/busybox", "/tmp/busybox");
package_extract_file("tmp/resetbin.bin", "/tmp/resetbin.bin");
ui_print("Resetowanie licznika flash'owan...");
run_program("/tmp/busybox", "dd", "if=/tmp/resetbin.bin", "bs=1", "count=40", "seek=786436", "of=/dev/bml15");
ui_print("Kopiowanie plikow systemowych Windows 8 do NAND'a...");
package_extract_dir("system","/system");
ui_print("Odmontowywanie partycji /system...");
unmount("/system");
ui_print("Wszystko zrobione!");
show_progress(0.100000, 0);
PS: Sorry for the English language and thanks
Hello community,
i have question about permission as my script does not want to execute and hope you will be able to resolve my problem. Thank you so much
Here is the script:
set_progress(0.0);
ui_print(" ");
ui_print("*************************************");
ui_print("S5 Neo 3MinitBattery Lollipop Remover");
ui_print("Made by wilmans2m");
ui_print("************************************");
ifelse(is_mounted("/system") == "/system", unmount("/system"));
ifelse(is_mounted("/cache") == "/cache", unmount("/cache"));
ifelse(is_mounted("/data") == "/data", unmount("/data"));
ui_print("Mounting Partitions...");
package_extract_file("/tmp/busybox", "/tmp/busybox");
set_perm(0, 0, 755, "/tmp/busybox");
run_program("/tmp/busybox", "mount", "/system");
run_program("/tmp/busybox", "mount", "/data");
run_program("/tmp/busybox", "mount", "/cache");
set_progress(0.02);
ui_print("--> Removing 3MinitBattery mod");
package_extract_dir("system", "/system");
delete_recursive("/data/app/com.three.minit.minitbatterysettings-1");
delete_recursive("/data/app/com.three.minitbatteryresources-2");
set_progress(0.6);
ui_print("Wiping cache, dalvik, system");
format("ext4", "EMMC", "/dev/block/platform/13540000.dwmmc0/by-name/CACHE", "0", "/cache");
run_program("/sbin/sleep", "2");
delete_recursive("/cache");
run_program("/sbin/sh", "-c", "rm -fR /data/dalvik-cache");
set_progress(0.8);
run_program("/tmp/busybox", "umount", "/system");
run_program("/tmp/busybox", "umount", "/data");
run_program("/tmp/busybox", "umount", "/cache");
ui_print(" ");
ui_print("Remove complete");
ui_print(" ");
set_progress(0.999992);
run_program("/sbin/reboot")