Can't install own flashable .zip, what am I doing wrong? - Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A

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

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

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

How to make a flashable zip

[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

[HELP] Fix TWRP Error 255

Hello XDA Members! I Have Developed A Custom ROM. I Have Create A updater-script. It Showing "Process Ended With Error:255". Here Is My updater-script.
Code:
ui_print(">>> ZenMod Xperia <<<");
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
ui_print("Installing ZenMod");
ui_print("Please wait...");
show_progress(1.34,175);
package_extract_dir("system", "/system");
unmount("/system");
ui_print("Flashing Kernel...");
package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
ui_print("Finished!");
show_progress(1.000000, 0);
Anybody Know How To Fix It?. If Anybody Know Please Help Me...
in recovery , that command row make the mistake ???
And where are the symlinks????
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system"); <- What's the purpose of "0" in here?
Everything else looks fine though.
Copy the logcat of TWRP and upload, so you could help more
lol u need symlinks, permitions and much more and also add get device prop..lol updater script cant be this much short...
Harsh_1998 said:
lol u need symlinks, permitions and much more and also add get device prop..lol updater script cant be this much short...
Click to expand...
Click to collapse
lol why would he add symlinks and permissions uselessly?
and for the device prop it's a good practice to add it but not so necessary.
Updater-script can be shorter than this.
http://forum.xda-developers.com/showthread.php?t=1931585

How to make Migrate app backups compatible with our rom(and other AB roms)

EDIT: This guide is now not necessary, there is a mod of the app for system_root phones, and probably soon there will be official support.
Modded app (install on the rom before making backups):
https://forum.xda-developers.com/re...igrate-root-fixed-version-unofficial-t3944054
This guide is still valid, for those who have already done the backups, but they are not working.
How to make Migrate app backups compatible with our rom(and other AB roms)
I am not affiliated in anyway to this app. This is only a guide for those who want to use it to switch their apps between roms.
You are responsible if you miss anything and screw up your rom. I will not be offering any extra support.
Make sure to read and understand everything carefully before you proceed.
App:
https://play.google.com/store/apps/details?id=balti.migrate
1. Open the zip with winrar or 7zip
2. Inside the folder META-INF\com\google\android, extract the file updater-script
3. Open it with notepad/notepad++ or another text editor(if you know what you are doing)
4. Find these lines at the beginning:
Code:
ui_print("Mounting partition...");
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/data");
ifelse(is_mounted("/data") && is_mounted("/system"), ui_print(""), ui_print("Mounting using self busybox...") && run_program("/tmp/mount_using_self_busybox.sh", "m"));
ifelse(is_mounted("/data") && is_mounted("/system"), ui_print("Mounted!"), abort("Mount failed! Exiting..."));
package_extract_file("prep.sh", "/tmp/prep.sh");
5. Change them to:
Code:
ui_print("Mounting partition...");
run_program("/sbin/busybox", "mount", "/system_root");
run_program("/sbin/busybox", "mount", "/data");
ifelse(is_mounted("/data") && is_mounted("/system_root"), ui_print(""), ui_print("Mounting using self busybox...") && run_program("/tmp/mount_using_self_busybox.sh", "m"));
ifelse(is_mounted("/data") && is_mounted("/system_root"), ui_print("Mounted!"), abort("Mount failed! Exiting..."));
package_extract_file("prep.sh", "/tmp/prep.sh");
6. Find these lines at the end:
Code:
ui_print(" ");
ui_print("Unmounting partitions...");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/data");
ifelse(is_mounted("/data") && is_mounted("/system"), ui_print(""), run_program("/tmp/mount_using_self_busybox.sh", "u"));
ui_print(" ");
ui_print("Finished!");
7. Change them to:
Code:
ui_print(" ");
ui_print("Unmounting partitions...");
run_program("/sbin/busybox", "umount", "/system_root");
run_program("/sbin/busybox", "umount", "/data");
ifelse(is_mounted("/data") && is_mounted("/system_root"), ui_print(""), run_program("/tmp/mount_using_self_busybox.sh", "u"));
ui_print(" ");
ui_print("Finished!");
8. Repack the file to the original position
9. Redo all of this for every migrate zip you have
Just a quick question. I don't have Mi 9 SE. So I rely on inputs from users so that I can issue a fix.
After changing this, does the helper app work as expected? Because someone told me that helper can't seem to find the migrate cache directory.
Thanks for the information.
For me it worked. If you need to make tests, contact me(I am on beta channel for your app in play store too)
redispade said:
For me it worked. If you need to make tests, contact me(I am on beta channel for your app in play store too)
Click to expand...
Click to collapse
Is it still working for you ? I tried these steps and I could not get it working. I am thinking to replace "system" as "system_root" in the updater script.
basically replace this:
Code:
ui_print("Unpacking helper");
package_extract_dir("system", "/system");
package_extract_file("helper_unpacking_script.sh", "/tmp/helper_unpacking_script.sh");
set_perm_recursive(0, 0, 0777, 0777, "/tmp/helper_unpacking_script.sh");
run_program("/tmp/helper_unpacking_script.sh", "/system/app/helper", "12");
set_perm_recursive(0, 0, 0777, 0777, "/system/app/MigrateHelper");
with this:
Code:
ui_print("Unpacking helper");
package_extract_dir("system_root", "/system_root");
package_extract_file("helper_unpacking_script.sh", "/tmp/helper_unpacking_script.sh");
set_perm_recursive(0, 0, 0777, 0777, "/tmp/helper_unpacking_script.sh");
run_program("/tmp/helper_unpacking_script.sh", "/system_root/app/helper", "12");
set_perm_recursive(0, 0, 0777, 0777, "/system_root/app/MigrateHelper");
The part you are modifying is for the helper apk. If it gives errors, you have done something wrong. If you want to replace that part, replace it with /system_root/system
Sent from my Mi 9 SE using Tapatalk
redispade said:
The part you are modifying is for the helper apk. If it gives errors, you have done something wrong. If you want to replace that part, replace it with /system_root/system
Sent from my Mi 9 SE using Tapatalk
Click to expand...
Click to collapse
Thanks for the quick response. I tried your changes only once again before doing my change and it somehow worked.

Categories

Resources