Flashable zip - Samsung Galaxy Nexus

Hello guys!
I'm trying to make a flashable zip so each time I flash a CM10.1 nightly, I flash after that this zip to put a custom font on my GNexus.
However, I tried two different ways but they don't work, and I receive an ERROR on recovery (I'm using TWRP, latest release).
There are the two scripts i've tried:
Code:
ui_print("Applying Ubuntu Font");
run_program("/sbin/busybox", "mount", "/system");
delete("/system/fonts/Clockopia.ttf");
delete("/system/fonts/DroidSans.ttf");
delete("/system/fonts/DroidSans-Bold.ttf");
delete("/system/fonts/Roboto-Regular.ttf");
package_extract_dir("fonts", "/system/fonts");
run_program("/sbin/busybox", "umount", "/system");
ui_print("New Fonts installed!");
and...
Code:
ui_print("Applying Ubuntu Font");
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("fonts", "/system/fonts");
run_program("/sbin/busybox", "umount", "/system");
ui_print("New Fonts installed!");
What am I doing wrong?
I have the folders OK (i have a fonts folder inside the flashable zip and the regular META-INF, etc.). However, the script isn't working.
Can someone help me?
Thanks and best regards!

mrasquinho said:
Hello guys!
I'm trying to make a flashable zip so each time I flash a CM10.1 nightly, I flash after that this zip to put a custom font on my GNexus.
However, I tried two different ways but they don't work, and I receive an ERROR on recovery (I'm using TWRP, latest release).
There are the two scripts i've tried:
Code:
ui_print("Applying Ubuntu Font");
run_program("/sbin/busybox", "mount", "/system");
delete("/system/fonts/Clockopia.ttf");
delete("/system/fonts/DroidSans.ttf");
delete("/system/fonts/DroidSans-Bold.ttf");
delete("/system/fonts/Roboto-Regular.ttf");
package_extract_dir("fonts", "/system/fonts");
run_program("/sbin/busybox", "umount", "/system");
ui_print("New Fonts installed!");
and...
Code:
ui_print("Applying Ubuntu Font");
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("fonts", "/system/fonts");
run_program("/sbin/busybox", "umount", "/system");
ui_print("New Fonts installed!");
What am I doing wrong?
I have the folders OK (i have a fonts folder inside the flashable zip and the regular META-INF, etc.). However, the script isn't working.
Can someone help me?
Thanks and best regards!
Click to expand...
Click to collapse
Hi, I discovered this thread by accident and if you still need some opinion, i can tell you that my font change script is exactly the same as the first one you posted. So maybe you're just using a wrong template.zip file to begin with. Good luck!

Related

[Question] updater-script

can anyone tell me what I did wrong here? I flashed it in recovery, but nothing changed, didnt even remove the old file.
Code:
ui_print("Installing Trueblood Boot Animation By Deaconfrost");
show_progress(0.1, 0);
# clearing dalvik cache
ui_print("Removing Old Boot Animation At /system/media/bootanimation.zip");
delete("/system/media/bootanimation.zip");
# copy system
show_progress(0.5, 10);
ui_print("Extracting New Boot Animation To /system/media/bootanimation.zip");
package_extract_dir("system", "/system");
# installation complete
ui_print("Installation Complete");
ui_print("Please Give Me Thanks On XDA");
thanks
deconfrost said:
can anyone tell me what I did wrong here? I flashed it in recovery, but nothing changed, didnt even remove the old file.
Code:
ui_print("Installing Trueblood Boot Animation By Deaconfrost");
show_progress(0.1, 0);
# clearing dalvik cache
ui_print("Removing Old Boot Animation At /system/media/bootanimation.zip");
delete("/system/media/bootanimation.zip");
# copy system
show_progress(0.5, 10);
ui_print("Extracting New Boot Animation To /system/media/bootanimation.zip");
package_extract_dir("system", "/system");
# installation complete
ui_print("Installation Complete");
ui_print("Please Give Me Thanks On XDA");
thanks
Click to expand...
Click to collapse
Code:
[b]run_program("/sbin/mount", "/dev/block/mmcblk0p25", "/system");[/b]
ui_print("Installing Trueblood Boot Animation By Deaconfrost");
show_progress(0.1, 0);
# clearing dalvik cache
ui_print("Removing Old Boot Animation At /system/media/bootanimation.zip");
delete("/system/media/bootanimation.zip");
# copy system
show_progress(0.5, 10);
ui_print("Extracting New Boot Animation To /system/media/bootanimation.zip");
package_extract_dir("system", "/system");
[b]run_program("/sbin/umount", "/system");[/b]
# installation complete
ui_print("Installation Complete");
ui_print("Please Give Me Thanks On XDA");
Try these...
just tried that
getting error (status 6)
scratching my head
deconfrost said:
just tried that
getting error (status 6)
scratching my head
Click to expand...
Click to collapse
Which clockworkmod recovery are you using?
I'm using 3.0.0.6
deconfrost said:
can anyone tell me what I did wrong here? I flashed it in recovery, but nothing changed, didnt even remove the old file.
Code:
ui_print("Installing Trueblood Boot Animation By Deaconfrost");
show_progress(0.1, 0);
# clearing dalvik cache
ui_print("Removing Old Boot Animation At /system/media/bootanimation.zip");
delete("/system/media/bootanimation.zip");
# copy system
show_progress(0.5, 10);
ui_print("Extracting New Boot Animation To /system/media/bootanimation.zip");
package_extract_dir("system", "/system");
# installation complete
ui_print("Installation Complete");
ui_print("Please Give Me Thanks On XDA");
thanks
Click to expand...
Click to collapse
Code:
ui_print("Installing Trueblood Boot Animation By Deaconfrost");
show_progress(0.1, 0);
#mount system
mount("ext3", "EMMC", "/dev/block/mmcblk0p25", "/system");
ui_print("Removing Old Boot Animation At /system/media/bootanimation.zip");
delete("/system/media/bootanimation.zip");
# copy system
show_progress(0.5, 10);
ui_print("Extracting New Boot Animation To /system/media/bootanimation.zip");
package_extract_dir("system", "/system");
# installation complete
ui_print("Installation Complete");
ui_print("Please Give Me Thanks On XDA");
#unmount system
unmount("/system");
Corrections above, forgot to mount and unmount
Sent from me LeeDrOiD loaded Desire HD using the Android XDA Premium app
this is really having me scratch my head
I tried mount and unmount before with same error with various different ways I can find
tried both phunky and lee, same error.
problem in mounting thats about all I can figure out
deconfrost said:
this is really having me scratch my head
I tried mount and unmount before with same error with various different ways I can find
tried both phunky and lee, same error.
problem in mounting thats about all I can figure out
Click to expand...
Click to collapse
Is there any encoding in your updater? Needs to be a clean script, if your on windows, notepad++ is best, on Linux I would recommend Kate
Sent from me LeeDrOiD loaded Desire HD using the Android XDA Premium app
Download this: View attachment update-binary.zip
Extract, and replace yours with this one.
was just downloading notepad++ after I replied last, gonna give that a try now, was using just windows notepad before, have ubuntu on dual boot but I haven't finish setting that up yet, for some funny reason it took over 6hrs to repo sync and it wasnt finished, so I stopped it and start again another time.
phunkycow said:
Download this: View attachment 540717
Extract, and replace yours with this one.
Click to expand...
Click to collapse
sorted
thanks phunky and lee
the binary did the magic
deconfrost said:
sorted
thanks phunky and lee
the binary did the magic
Click to expand...
Click to collapse
No problem, glad you got it sorted!
deconfrost said:
was just downloading notepad++ after I replied last, gonna give that a try now, was using just windows notepad before, have ubuntu on dual boot but I haven't finish setting that up yet, for some funny reason it took over 6hrs to repo sync and it wasnt finished, so I stopped it and start again another time.
Click to expand...
Click to collapse
Glad you got it sorted
Yeh, windows notepad was the issue, utf8 standard formatting, results in additional code being added.
As far as the repo sync goes, 6 hours could be about right.
I personally would specify individual branches, I.e "-b froyo" or "-b gingerbread", the entire thing is just over 6 gig
Sent from me LeeDrOiD loaded Desire HD using the Android XDA Premium app
I might do the repo sync on a day im out for the whole day mine might take longer since Im on 3G.
thanks guys

[Q] Creating a Kernel update zip file

Ok I'm a bit confused. After hours upon hours of trying, I have yet to successfully create a WORKING update.zip file for flashing a kernel.
I'm trying to create an update.zip file for the 2.6.35.10 kernel from the leaked T-Mobile US Gingerbread 2.13.531.5 ROM.
I properly unpacked the boot.img from the ROM, and my updater-script file seems correct, then I create the zip, sign it and flash thru CWM. The update completes without errors, however, when I reboot the phone, it still says I have 2.6.32.28. I'm stuck. My updater-script is as follows:
Code:
ui_print("");
ui_print("T-Mobile US - G2 Kernel Update");
ui_print("Kernel Version: 2.6.35.10");
ui_print("Prepared by: spyral");
ui_print("");
ui_print("Using: AnyKernel Updater by Koush.");
ui_print("");
set_progress(1.000000);
ui_print("Clearing dalvik and boot cache ...");
delete_recursive("/data/dalvik-cache");
delete_recursive("/data/boot-cache");
ui_print("Extracting System Files...");
set_progress(2.000000);
mount("yaffs2", "MTD", "system", "/system");
package_extract_dir("system", "/system");
unmount("/system");
set_progress(5.000000);
ui_print("");
ui_print("Extracting Kernel files...");
package_extract_dir("kernel", "/tmp");
ui_print("Installing kernel...");
set_progress(6.000000);
set_perm(0, 0, 0777, "/tmp/dump_image");
set_perm(0, 0, 0777, "/tmp/mkbootimg.sh");
set_perm(0, 0, 0777, "/tmp/mkbootimg");
set_perm(0, 0, 0777, "/tmp/unpackbootimg");
run_program("/tmp/dump_image", "boot", "/tmp/boot.img");
run_program("/tmp/unpackbootimg", "-i", "/tmp/boot.img", "-o", "/tmp/");
run_program("/tmp/mkbootimg.sh");
write_raw_image("/tmp/newboot.img", "boot");
set_progress(10.000000);
ui_print("Done!");
I've tried multiple times, with no luck. Any ideas?
Btw, sorry if I posted this in the wrong forum Mods... feel free to move it if need be. I'm still learning the ropes of this place.
Sent from my HTC Vision using XDA Premium App
Nothin so far, huh?
Sent from my HTC Vision using XDA Premium App
Still nothin on this??
Sent from my HTC Vision using XDA Premium App

Question about HTC Kitchen

Messing around with the HTC Kitchen and I am getting an error when trying to build a ROM.
Error is:
Code:
format() expects 3 args, got 2
(status 7)
installation aborted
Any ideas?
Find the line it is referring to in the update(r) script. Should be the 7th line as it tells you that. There is probably a comma missing between the numbers in the parenthesis
This is what the script is
Code:
format("MTD", "cache");
format("MTD", "boot");
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
format("MTD", "userdata");
mount("MTD", "userdata", "/data");
package_extract_dir("data", "/data");
set_perm(1000, 1000, 0771, "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
format("MTD", "system");
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
I try taking out the format lines, and I get the same error except on mount() this time.
Did you run the script checker?
Don't remove the lines manually... open your kitchen and change " the wipe status if your ROM"
Vinchenzop said:
Did you run the script checker?
Click to expand...
Click to collapse
Script checker only works for update-scripts' not updater-scripts. At least to my understanding... unless there is another one out there ? I am running HTC Android Kitchen, v0.161 on Ubuntu btw.

Flashable ZIP How To?

How do you make flashable zip?
i have alot of mods on my arc s and i want them all in one and flashable..
http://forum.xda-developers.com/showthread.php?t=1374394
Flashable Zip
In few words:
You make a zip file with the order of how the files go.
You make an updater-script which are the instructions for CWM to flash the correct order.
You sign it and that's it.
Everything is in the tutorial XperienceD posted.
XperienceD said:
http://forum.xda-developers.com/showthread.php?t=1374394
Flashable Zip
Click to expand...
Click to collapse
IM sorry but im kinda slow... in the "Flashable Clockwork Mod (CWM) zip:"
TO UNDERSTAND UR GUIDE I OPEN SOME SCRIPT TO GET AN IDEA BUT I FOUND SOME LINES THAT IS NOT INCLUDED IN YOUR EXAMPLE.
LIKE THESE:
show_progress(1.000000, 0);
set_progress(0.125000);
mount("MTD", "system", "/system");
package_extract_file("fix_permissions", "/tmp/fix_permissions");
set_perm(0, 0, 0777, "/tmp/fix_permissions");
WHAT IS show_progress(1.000000, 0); AND set_progress(0.125000); ??
I GUESS mount("MTD", "system", "/system") IS THE SAME AS run_program("/sbin/mount", "/system"); ??
AND ALSO GUESS THAT package_extract_file("fix_permissions", "/tmp/fix_permissions"); AND set_perm(0, 0, 0777, "/tmp/fix_permissions"); IS FOR THE PERMISSIONS, IF U HAVE IN UR ZIP RIGHT?
I DONT REALLY UNDERSTAND THOSE OR I CAN JUST IGNORE THEM?

framework-res permissions

is this permissions script is right? always getting installation complete.
Code:
ui_print("SET FRAMEWORK-RES PERMISSIONS");
mount("MTD", "system", "/system");
set_perm(0, 0, 0644, "/system/framework/framework-res.res");
unmount("/system");
after reboot i'm getting boot loop, forgot set permissions for framework-res.res...
its ok, after one hour of search and making a topic i only saw that type of file is apk not res

Categories

Resources