How to make a flashable zip - Galaxy Ace S5830 General

[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 Memo.zip

Related

CWM Recovery Batch install issues

Hey all,
I created a little zip to be flashed in cwm recovery, It works great in almost every way, except some apps in /data/app and system/app in the zip do not get installed at all or are corrupted (both happen with diff apps). I've tried reflashing the same zip, repackaging it, and even installing the apks manually. Nothing works except installing the apks manually.
I've deduced that before packaging, the apks are fine. And because I've repacked it twice, and have had complete success packaging other flashable zips, I feel something is happening in CWM recovery, or maybe my updater script doesn't install to the directories the right way.
Is there a better way to batch install via recovery? Or something I'm missing in my script? Or is it not reliable to install apks via flashable zip?
This is how I do it.
In my zip I have:
Code:
/system
/app
/***.apk
/***.apk
/data
/app
/***.apk
/***.apk
/META-INF
/com
/google
/android
/update-binary
/updater-script
This is my updater script (modified from a remover script)
Code:
ui_print("---------------------------");
ui_print("SGS2 Batch Installer");
ui_print("and Bloatware Remover v0.2");
ui_print("---------------------------");
ui_print("Deleting useless bloatware ...");
delete("/system/app/AnalogClock.apk");
delete("/system/app/BuddiesNow.apk");
delete("/system/app/ChocoEUKor.apk");
delete("/system/app/Days.apk");
delete("/system/app/Dlna.apk");
delete("/system/app/DualClock.apk");
delete("/system/app/EmailWidget.apk");
delete("/system/app/GameHub.apk");
delete("/system/app/GenieWidget.apk");
delete("/system/app/Kies.apk");
delete("/system/app/KiesAir.apk");
delete("/system/app/kieswifi.apk");
delete("/system/app/Kobo.apk");
delete("/system/app/Microbesgl.apk");
delete("/system/app/MiniDiary.apk");
delete("/system/app/MtpApplication.apk");
delete("/system/app/MusicHub_U1.apk");
delete("/system/app/MusicPlayer.apk");
delete("/system/app/PhotoRetouching.apk");
delete("/system/app/PolarisOffice.apk");
delete("/system/app/PressReader.apk");
delete("/system/app/Protips.apk");
delete("/system/app/ReadersHub.apk");
delete("/system/app/SamsungApps.apk");
delete("/system/app/SamsungAppsUNA3.apk");
delete("/system/app/SamsungAppsUNAService.apk");
delete("/system/app/SamsungIM.apk");
delete("/system/app/SamsungWidget_News.apk");
delete("/system/app/SamsungWidget_ProgramMonitor.apk");
delete("/system/app/SamsungWidget_StockClock.apk");
delete("/system/app/SamsungWidget_WeatherClock.apk");
delete("/system/app/SecretWallpaper1.apk");
delete("/system/app/SecretWallpaper2.apk");
delete("/system/app/SevenEngine.apk");
delete("/system/app/SnsAccountFb.apk");
delete("/system/app/SnsAccountLi.apk");
delete("/system/app/SnsAccountMs.apk");
delete("/system/app/SnsAccountTw.apk");
delete("/system/app/SnsDisclaimer.apk");
delete("/system/app/SnsImageCache.apk");
delete("/system/app/SnsProvider.apk");
delete("/system/app/SocialHub.apk");
delete("/system/app/Talk.apk");
delete("/system/app/Talk2.apk");
delete("/system/app/TouchWiz30Launcher.apk");
delete("/system/app/Vending.apk");
delete("/system/app/VideoEditor.apk");
delete("/system/app/VideoPlayer.apk");
delete("/system/app/VoiceToGo.apk");
delete("/system/app/YouTube.apk");
delete("/system/app/Zinio.apk");
delete("/system/app/AnalogClock.odex");
delete("/system/app/BuddiesNow.odex");
delete("/system/app/ChocoEUKor.odex");
delete("/system/app/Days.odex");
delete("/system/app/Dlna.odex");
delete("/system/app/DualClock.odex");
delete("/system/app/EmailWidget.odex");
delete("/system/app/GameHub.odex");
delete("/system/app/GenieWidget.odex");
delete("/system/app/Kies.odex");
delete("/system/app/KiesAir.odex");
delete("/system/app/kieswifi.odex");
delete("/system/app/Kobo.odex");
delete("/system/app/Microbesgl.odex");
delete("/system/app/MiniDiary.odex");
delete("/system/app/MtpApplication.odex");
delete("/system/app/MusicHub_U1.odex");
delete("/system/app/MusicPlayer.odex");
delete("/system/app/PhotoRetouching.odex");
delete("/system/app/PressReader.odex");
delete("/system/app/Protips.odex");
delete("/system/app/ReadersHub.odex");
delete("/system/app/SamsungApps.odex");
delete("/system/app/SamsungAppsUNA3.odex");
delete("/system/app/SamsungAppsUNAService.odex");
delete("/system/app/SamsungIM.odex");
delete("/system/app/SamsungWidget_News.odex");
delete("/system/app/SamsungWidget_ProgramMonitor.odex");
delete("/system/app/SamsungWidget_StockClock.odex");
delete("/system/app/SamsungWidget_WeatherClock.odex");
delete("/system/app/SecretWallpaper1.odex");
delete("/system/app/SecretWallpaper2.odex");
delete("/system/app/SevenEngine.odex");
delete("/system/app/SnsAccountFb.odex");
delete("/system/app/SnsAccountLi.odex");
delete("/system/app/SnsAccountMs.odex");
delete("/system/app/SnsAccountTw.odex");
delete("/system/app/SnsDisclaimer.odex");
delete("/system/app/SnsImageCache.odex");
delete("/system/app/SnsProvider.odex");
delete("/system/app/SocialHub.odex");
delete("/system/app/Talk.odex");
delete("/system/app/Talk2.odex");
delete("/system/app/TouchWiz30Launcher.odex");
delete("/system/app/Vending.odex");
delete("/system/app/VideoEditor.odex");
delete("/system/app/VideoPlayer.odex");
delete("/system/app/VoiceSearch.odex");
delete("/system/app/VoiceToGo.odex");
delete("/system/app/YouTube.odex");
delete("/system/app/Zinio.odex");
ui_print(" ");
ui_print("Batch Installing!");
ui_print(" ");
ui_print("Extracting /system...");
package_extract_dir("system", "/system");
ui_print(" ");
ui_print("Extracting /sdcard...");
package_extract_dir("sdcard", "/sdcard");
ui_print(" ");
ui_print("Extracting /data...");
unmount("/data");
mount("ext4", "EMMC", "/dev/block/mmcblk0p10", "/data");
package_extract_dir("data", "/data");
unmount("/data");
ui_print("Done! Reboot that sh**!");
Anybody have any thoughts?
Thank you!
Endor

Can't install own flashable .zip, what am I doing wrong?

Hi! I followed (step by step) this Guide to make a flashable zip of some wallpapers for my phones: http://forum.xda-developers.com/showthread.php?t=1545165
But when I try to install it, CWM just says "installation aborted"...I was trying to make a .zip for some wallpapers but the folder name was too long (system/etc/customization/bla bla bla bla)and I tought to start by installing a small app (A QR code reader). This is my updater script:
ui_print(" QR droid ");
ui_print(" test zip ");
ui_print("cachanilla86");
mount("MTD", "system", "/system");
show_progress(0.100000, 40);
ui_print(" almost done ");
show_progress(0.100000, 40);
package_extract_dir("system", "/system/app");
unmount("/system/");
show_progress(1.000000, 10);
ui_print(" finished,now reboot ")
--BLANK LINE--
And in the main folder was "system/app" and inside of app the apk itself.
What's wrong here? I don't get it...its because i'm signing the zip with an older version of APK tool?
Thanks for reading.
just download sample.zip here http://forum.xda-developers.com/showthread.php?t=1721680
and drag&drop your files in the zip to: example /system/etc/customization/blah3x..
Try this bro.
mount("yaffs2", "MTD", "system", "/system");
ui_print("Installing");
package_extract_dir("system", "/system");
set_perm(0, 0, 0644, "/system/lib/libgsl.so"); just an example
unmount("/system");
You're signing the zip? What for? It doesn't need to be signed, just have the right update-binary.
Thanks fellas, I'll try again tonight

Dumb question.. How to make a update.zip

I know people talk about this all the time... I found a lot of thread of how to create a flashable zip file.. But every thread has it different than others. So I have tried it several ways and still get errors...
I'm trying to make a flashable zip to push an apk to system/app and I decided to do this to test it out...
This is the update-script I have tested it with
run_program("/sbin/busybox", "mount", "/system");
delete("/system/app/FlashBarService.apk");
package_extract_dir("system", "/system");
run_program("/sbin/busybox", "unmount", "/system");
Ok what I figure is the run_program is to mount system with busybox. Every line i see that it have this on there.. Then Im trying to replace an app from system/app so I put in delete("/system/app/name of app");
then package_extract_dir("system", :/system"); is so recovery can extract and push the zip file
and again run_program to unmount... But recovery is giving me an error status 4
I also deleted that delete line and still got status 4.
Again this is another way I tried it to do it with
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/cache");
run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("system", "/system");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/cache");
run_program("/sbin/busybox", "umount", "/data");
And this way too
mount("ext4", "EMMC", "/dev/block/mmcblk0p14", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p14", "/data");
package_extract_dir("system", "/system");
run_program("/sbin/busybox", "unmount", "/system");
run_program("/sbin/busybox", "unmount", "/data");
And till got status 4.
Inside my xxx.zip I have it set up this way META-INF/com/google/android
And other folder on root system/app
I have a GS3.
Like I said I have followed several threads about this and all looks different and none worked.
I know this is supposed to be the easies thing to do when it comes to android. But I just need to be directed to the right path.
Can somebody with more experience with this help me out?
Status 4 means that you have a syntax error somewhere... (yep, you have a syntax error or you're using notepad or wordpad to edit the files. That's it).
The best guide I ever seen out there is this one, take a look at it.
I use notepad++ to edit any android related files like build.prop. Thanks will look at that
Sent from my SGH-T999 using Tapatalk 4 Beta
Anyone?
gypsy214 said:
I use notepad++ to edit any android related files like build.prop. Thanks will look at that
Sent from my SGH-T999 using Tapatalk 4 Beta
Click to expand...
Click to collapse
Yeah. Notepad++ is best for this type of Editing in Windows.
Have you chosen the correct format in settings?
Edit>>EOL Conversions>>UNIX Format
The problem may be that windows use CR(carriage return) while unix(Android) uses LF (line feed) for a new line character.
You can also try to mount the system manually(there is option in CWM for that) & may be leave only the "package_extract_dir("system", "/system");" in the updater script.
Also, post the zip file here, so that problem can be easily identified.
GobletSky31689 said:
Yeah. Notepad++ is best for this type of Editing in Windows.
Have you chosen the correct format in settings?
Edit>>EOL Conversions>>UNIX Format
The problem may be that windows use CR(carriage return) while unix(Android) uses LF (line feed) for a new line character.
You can also try to mount the system manually(there is option in CWM for that) & may be leave only the "package_extract_dir("system", "/system");" in the updater script.
Also, post the zip file here, so that problem can be easily identified.
Click to expand...
Click to collapse
Will do.. But it works when I use notepad++ to add ui_print.

Help flashlable zip

Please help ...
I need to create a zip file flashlable
system / app
SystemUI.apk
Phone.apk
HtcDialer.apk
and another app
..............
/ framework
com.htc.resources.apk
framework-res.apk
here only those
my working
Hi
Ashle said:
Please help ...
I need to create a zip file flashlable
system / app
SystemUI.apk
Phone.apk
HtcDialer.apk
and another app
..............
/ framework
com.htc.resources.apk
framework-res.apk
here only those
my working
Click to expand...
Click to collapse
If you are only using System apks, then there is a Play Store App for that.
App2Zip
Search it.
I need to create a system app updater script and the framework / framework-res.apk, com.htc.resources.apk
My not working
mount("MTD", "system", "/system");
ui_print("started. . . .");
ui_print("flashable zip");
ui_print("");
ui_print("");
ui_print("");
ui_print("");
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/data");
run_program("/sbin/busybox", "mount", "/cache");
package_extract_dir("system", "/system");
delete("/system/app/HtcContacts.odex");
delete("/system/app/HtcContactWidgets.odex");
delete("/system/app/HtcDialer.odex");
delete("/system/app/Phone.odex");
delete("/system/app/SystemUI.odex");
delete("/system/framework/com.htc.resources.odex");
delete("/system/framework/framework-res.odex");
set_perm(0, 0, 0644, "/system/framework/framework-res.apk");
set_perm(0, 0, 0644, "/system/framework/com.htc.resources.apk");
unmount("/system");
unmount("/cache");
unmount("/data");
ui_print("Done. Reboot!");
Click to expand...
Click to collapse
Ashle said:
I need to create a system app updater script and the framework / framework-res.apk, com.htc.resources.apk
My not working
Click to expand...
Click to collapse
1. mount("MTD", "system", "/system"); is wrong for DX as DX is using EMMC instead of MTD
The correct one is mount("ext4", "EMMC", "/dev/block/mmcblk0p24", "/system");
2. You don't need mount("ext4", "EMMC", "/dev/block/mmcblk0p24", "/system"); when you have run_program("/sbin/busybox", "mount", "/system");
3. There is no such thing as com.htc.resources.odex and framework-res.odex as there is no smali in these files
4. You don't need set_perm(0, 0, 0644, for system/app and system/framework
5. Why do you want to delete those odex files ? Most of the time, a stock odex ROM will not boot when you mix with deodexed files because the boothclass is broken
ckpv5 said:
1. mount("MTD", "system", "/system"); is wrong for DX as DX is using EMMC instead of MTD
The correct one is mount("ext4", "EMMC", "/dev/block/mmcblk0p24", "/system");
2. You don't need mount("ext4", "EMMC", "/dev/block/mmcblk0p24", "/system"); when you have run_program("/sbin/busybox", "mount", "/system");
3. There is no such thing as com.htc.resources.odex and framework-res.odex as there is no smali in these files
4. You don't need set_perm(0, 0, 0644, for system/app and system/framework
5. Why do you want to delete those odex files ? Most of the time, a stock odex ROM will not boot when you mix with deodexed files because the boothclass is broken
Click to expand...
Click to collapse
Yes .... :thumbup: :thumbup:
Edit SuperSense5 rom...
Change battery icon not working...
Icon wifi,data......,icon picture call contact,frame,....ok
Sent from my HTC Desire X using xda app-developers app

Remove/Delete Bloatwares In Just Couple of Seconds Makeing Own Zip File :) .(Android)

What is this?
It's a zip file Containing some files.. You can make your own zip file which can remove bloatware apps (found in system/app partition) from stock or Custom recovery. It can remove more than 50+ apps within 2-3 seconds.
Why do You need it?
Assume you have flashed a new Custom/Stock rom. In any rom there are useless apps which consume memory and ram .and you dont know about them sometimes it makes device lagi and hanged.work slower
What Will You Do? Or Normal People Do
You now have to go through the pain of removing dozens of apps from system/app which you might not need. eg: some people hardly use google maps/swype/youtube/email/weather.apk or those several apps/widgets found in stock rom Or Any Custom Rom.
Okay fine, What else do I need to know The system partition contains important apps required for android. if you remove an app which is essential for android then your device might get stuck in bootloop. So know what
you're doing before trying this mod.
Advantage Of This:
1. Device gets much smoother
2. Less lags or no lags
3. Games will not hang and apps load faster
4. More Free Ram
5. More Internal Free
6. Device Will Boot up Fast
7. Battery Dosen't Drain Faster
8. Chances for hanging device will less
What you'll need: (Root Requiered)
1) Winrar
2) Notepad++
Customizing your "updater-script" file:
1) Download MyOwn.zip
2) Open it
3) Browse over to META-INF\com\google\android\
4) Extract the file "updater-script" to desktop
and open it with notepad++
5) As you can see in files that it deletes a number of apps from system/app in a row. This list is mine(not for
you) so you have to edit it according to your
liking. I ll upload list of useless apps soon from android 4.4.4 to 7.1.1 For Most of The Devices which you can delete
Select apps from lists according to your version. and edit in updater-script
For eg: If you want to delete swype.apk and youtube.apk(meaning swype keyboard and youtube) then edit and write
delete ("/system/app/swype.apk");
delete ("/system/app/youtube.apk);
text with these lines and so update-script will look like this:
ui_print("Useless stuff cleaning start");
ui_print(" ");
ui_print("Partitions mount");
#Properly unmounting to avoid issues
run_program("/sbin/busybox", "umount",
"/system");
run_program("/sbin/busybox", "umount",
"/cache");
run_program("/sbin/busybox", "umount",
"/data");
#Then mounting
run_program("/sbin/busybox", "mount",
"/system");
run_program("/sbin/busybox", "mount",
"/cache");
run_program("/sbin/busybox", "mount",
"/data");
ui_print(" ");
ui_print("Useless system app removal");
delete("/system/app/Swype.apk");
delete("/system/app/YouTube.apk");
ui_print(" ");
ui_print("Unmounting partitions");
run_program("/sbin/busybox", "umount",
"/system");
run_program("/sbin/busybox", "umount",
"/cache");
run_program("/sbin/busybox", "umount",
"/data");
ui_print(" ");
ui_print("Finish");
6) Once you have finished editing delete rows
in updater-script to your liking then hit save
button(ctlr+s) on notepad++
7) Drag drop your custom "updater-script" file
back inside META-INF\com\google\android\
folder in MyOwn.zip .winrar automatically update the zip file and Do not touch update-binary.
8) Your custom zip is ready. You can use this everytime when you flash your device with new rom.
Instruction of use:
1) Place your custom zip on root of sd
card (root means outside; not within any folder
of sd card)
3) Switch off you android device
4) Start your device in recovery mode
5) Select "apply zip from sd card"
6) Select your created zip fiile
7) Select Yes
8) Reboot
Yeahhhhhhh!! Enjoy Your Faster Device Ever
If u r using this comment and suggestions are needed.
Thaank You:good::good:
Please Press Thanks Button If It Helps

Categories

Resources