[Galaxy Ace S5830 General] beegeero:
[Guide]How to make a flashable zip SGA S5830[Screenshots step by step]

Rules:

If you do not know what you're doing, try to learn first.

If you understand something, you'll understand more. If you do not understand, try first to understand, search on Google, read, learn.

I just trying to expose something from my experience.

You do not have to follow my advice if you're not sure that what you want to do, is what you can or need to do.

Do it at your own risk.

I am not responsible for what you do with your phone.

-------------------------------------------------------------------------------------------------------------------------------------

When you want to make a custom ROM, you have some choices:

- to change the ROM and load it on the phone,

- or just add changes made, in the phone.

Just add the change is much simpler than load ROM for each change made.

To add just one or more changes, you need a flashable zip.

----------------------------------------------------------------------------------------------------------------------------------------

Flashable zip is an archive with which you can add one or more .apk or one or more files in the operating system of the phone. Using a flashable zip is very easy and can save you time, as you will see from the presentation below.

----------------------------------------------------------------------------------------------------------------------------------------

The presentation is for SGA S5830 and is made in Windows.

You need: 7zip, Notepad ++, a flashable zip for your phone (for SGA S5830 can download the archive below)

----------------------------------------------------------------------------------------------------------------------------------------

Open the archive with 7zip: you have 2 folders

- META-INF

- and app

View attachment 3176575

----------------------------------------------------------------------------------------------------------------------------------

To the address Memo.zip \ app \ - is Memo.apk

The address Memo.zip \ META-INF \ com \ google \ android \ - is update-binary and updater-script

Memo.apk is the application that we want to replace.

View attachment 3176579

updater-script is the script that we need to edit for make the replacement.

View attachment 3176580

-----------------------------------------------------------------------------------------------------------------------------------

Go to Memo.zip\app\ and delete Memo.apk, then add another Memo.apk with Drag and Drop in archive, or other file such as Calculator.apk

If we add another Memo.apk we do not have to edit updater-script, but if we add another .apk, like Calculator.apk, we need to edit updater-script.

------------------------------------------------------------------------------------------------------------------------------------------

Assuming that we replaced the Memo.apk with Calculator.apk we go and we will edit updater-script.

To edit updater-script, this must be opened with Notepad ++.

To open updater-script with Notepad ++ in 7zip, we have to tell to 7zip with what to do editing.

To do this go in 7zip to Tools-> Options-> Editor, looking for Notepad ++ in PC, and add to the Editor.

View attachment 3176584

Now we right click to the updater-script and then Edit.

View attachment 3176585

-----------------------------------------------------------------------------------------------------------------------------

This is the script for editing.

ui_print("Preparing system update");

mount("ext4", "EMMC", "/dev/block/stl12", "/system");

mount("ext4", "EMMC", "/dev/block/stl14", "/cache");

ui_print("Wiping Cache...");

delete_recursive("/cache");

ui_print("Applying Memo theme");

package_extract_dir("app", "/system/app");

run_program("/sbin/busybox", "chown", "root.root", "/system/app/Memo.apk");

run_program("/sbin/busybox", "chmod", "644", "/system/app/Memo.apk");

run_program("/sbin/umount", "/system");

run_program("/sbin/umount", "/cache");

ui_print("Done! Reboot system please!")

In updater-script we have the following lines that I will explain.

This will help you to change the script when you want to make other updates.

‘ -> displays in CWM

ui_print("Preparing system update");

‘-> mount system

mount("ext4", "EMMC", "/dev/block/stl12", "/system");

‘-> mount cache

mount("ext4", "EMMC", "/dev/block/stl14", "/cache");

‘ -> displays in CWM

ui_print("Wiping Cache...");

‘ -> delete cache

delete_recursive("/cache");

‘ -> displays in CWM

ui_print("Applying Memo theme");

‘->where will extract the .apk file

package_extract_dir("app", "/system/app");

‘->run as superuser

run_program("/sbin/busybox", "chown", "root.root", "/system/app/Memo.apk");

‘->granted permissions

run_program("/sbin/busybox", "chmod", "644", "/system/app/Memo.apk");

‘-> umount system

run_program("/sbin/umount", "/system");

‘-> umount cache

run_program("/sbin/umount", "/cache");

‘ -> displays in CWM

ui_print("Done! Reboot system please!")

--------------------------------------------------------------------------------------------------------------------------

To add Calculator.apk in place of Memo.apk, we must do these replacements:

ui_print("Preparing system update");

mount("ext4", "EMMC", "/dev/block/stl12", "/system");

mount("ext4", "EMMC", "/dev/block/stl14", "/cache");

ui_print("Wiping Cache...");

delete_recursive("/cache");

ui_print("Applying Calculator theme");

package_extract_dir("app", "/system/app");

run_program("/sbin/busybox", "chown", "root.root", "/system/app/ Calculator.apk");

run_program("/sbin/busybox", "chmod", "644", "/system/app/ Calculator.apk");

run_program("/sbin/umount", "/system");

run_program("/sbin/umount", "/cache");

ui_print("Done! Reboot system please!")

We replaced in 3 places, Memo with Calculator.

View attachment 3176586

Now save and close the archive.

-------------------------------------------------------------------------------------------------------------------------------------

Put the archive on SD card.

Go to CWM.

Install zip from SD card.

Reboot.

Done!

------------------------------------------------------------------------------------------------------------------------------------------

I hope this will be helpful to you.

Thank you for your attention.

If you find this thread that was helpful for you, please press the button "Thanks".

Thank you.

Credits and Thanks:

XDA community

brijeshep for [AROMA] Ace-i-Sure Plus Pack

SpaceCaker for explanations

And, sorry, I do not remember from where I downloaded the fashable zip, but thank you. ;)

View attachment 3176603