Created
July 31, 2013 23:12
-
-
Save archon810/6127062 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assert(!less_than_int(1374790134, getprop("ro.build.date.utc"))); | |
assert(getprop("ro.product.device") == "anchovy" || | |
getprop("ro.build.product") == "anchovy"); | |
assert(getprop("ro.hardware") == "eureka-b3"); | |
show_progress(0.800000, 35); | |
write_raw_image(package_extract_file("system.img"), "rootfs"); | |
show_progress(0.100000, 4); | |
write_raw_image(package_extract_file("boot.img"), "kernel"); | |
show_progress(0.100000, 4); | |
assert(package_extract_file("bootloader.eureka-b3", "/tmp/bootloader.img"), | |
run_program("/bin/flash_bootloader", "eureka-b3", "/tmp/bootloader.img"), | |
delete("/tmp/bootloader.img")); | |
delete("/cache/ota.zip"); | |
# fix permission of /factory partition, make files readable to all. | |
mount("yaffs2", "MTD", "factory_store", "/tmp/factory"); | |
set_perm_recursive(0, 0, 0555, 0444, "/tmp/factory"); | |
# Fix the client key file names on some devices. | |
getprop("ro.hardware") == "eureka-b1" && | |
symlink("client.key.nd.bin", "/tmp/factory/client.key.bin"); | |
# Delete left over files from key programming | |
getprop("ro.hardware") == "eureka-b1" && delete("/tmp/factory/otp.pkg"); | |
getprop("ro.hardware") == "eureka-b1" && delete("/tmp/factory/custk.img"); | |
unmount("/tmp/factory"); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment