Create update.zip patch for firmware through recovery



Rep: (254)

FAQ on creating a patch update.zip for firmware through recovery

Editing Updater-script. Information, solutions, commands, signature patches.
Instructions for installing system and user applications using recovery
Editing installed firmware and removing system applications

(keywords)


If an error occurs, state it as accurately as possible (and be sure to post a log ) and under the spoiler attach the script code.
But first try to figure it out yourself by doing the suggested actions described under the spoiler."Errors"


I remind you, this is not a table of orders .. Posts asking for a zip for "xxxx" Recovery Offtop

All applications for creating / editing update.zip leave in the subjectOrder table for creating and editing patch update.zip for firmware through recovery

Messages that are not related to the discussion topic (offtopic) are deleted without warning.


Opportunities
  • Add multiple user / system applications "one click" (one patch).
  • Add / remove system applications without root rights and auxiliary programs.
  • Change the firmware (replacing files, decorations, etc.).
  • Update the program or firmware.
  • Remapping memory (discussion in another topic)
  • Getting root rightsSuperuser, SuperSU, Magisk


Tools and files
Instruments
  1. Installed on the phonecustom recovery ( CWM / TWRP )
  2. NotePad ++(editor with saving Unix format)
  3. Zip_signer (archive subscriber)
  4. ZIP Archiver
  5. Sample.zip blank file (or update-binary for manual build)
    Attached fileZip_signer.rar(13.28 KB)
    Attached filesample-patch.rar(4.77 MB)
    Attached fileupdate-binary.rar(113.25 KB)
  6. Additional versions of the binary.Attached filebinary_all.rar(649.36 KB)
  7. Binary (archive / source)
    Binary (source)
    Binary sources, main link:
    https: //android.google...ootable/recovery/+refs
    choose for instance "android-9.0.0_r18", then looking for the folder "updater", in the folder "updater" source binaries

    For examplehttps: //android.google...droid-9.0.0_r18/updater- you can look at all the commands that binaries can execute in android 9.0.0 (in the install.cpp file, at the very bottom)

    © Octanium

  8. Linux Subscriber:Attached filesignapk.zip(9.24 KB)
    + Android update-script (Post Nyashnaya # 63580419)
Attention! Patches are created only for mod.rekovery and effectively work only in them. In the stock recovery (on the devices out of the box) patches do not work.

programs | Scripts to create update.zip
Creature
In order to install new apk system applications into your device, you must perform three steps:
  1. Build your update.zip (from sample.zip)
  2. Sign update.zip with the Zip_signer utility
  3. Throw on the flash drive and install into the device via ClockWorkMod Recovery
These steps are universal, i.e. suitable for other similar operations.

STEP # 1
Build a new update.zip using sample image sample.zip
The procedure for using sample.zip:
  1. Unzip sample.zip archive
  2. Delete signature files META-INF / CERT.RSA, CERT.SF, MANIFEST.MF (as we will create them for our assembly in 2 steps)
  3. Place your custom application in the / data / app folder (xxxxx.apk)
  4. If necessary, edit the updater-script file (more later)
  5. Archive all (META-INF and data) ZIP without compression
STEP №2
Sign update.zip using Zip_signer utility
The procedure for using the utility Zip_signer:
  1. Rename your edited (i.e. already with the application inside) sample.zip to update.zip
  2. Put it in the folder with the program Zip_signer
  3. Run zip_signer.bat file
  4. Wait for the process to complete.
  5. The file update-finished.zip appears in the folder - this is the signed file.
  6. Rename update-finished.zip at its discretion (according to the patch logic)
STEP №3
Installing a new application
  1. Transfer (renamed) update-finished.zip to a flash drive and install it into the device via TWRP or CWM (install zip from sdcard ->chooze zip from internal sdcard ->Yes, install sample.zip)
  2. Reboot machine
Linux Creation
The actions are the same as described above, except for the signature.
ZIP archive signature:
  • Download signapk.zip and unzip to folder<folder signapk>
  • Assign rights to all content - "rwxrwxrwx" (chmod -R 777 ~ /<folder signapk>)
  • We execute the signature program (signapk<archive name with extension>)



A little manual for creating an update script based on system.img and boot.img

Attention! Patches are created only for mod.rekovery and effectively work only in them. In the stock recovery (on the devices out of the box) patches do not work.

Patch Structure | Edit update-script
Structure
Patch root:
  • folder META-INF
  • folder application installation source (system, data, sdcard, cache, sd-ext)
    Required files:
  • META-INF / com / google / android / update-binary - the system tool for launching this patch, also creates a temporary working folder tmp
  • META-INF / com / google / android / updater-script - executable script for which copy operations take place, etc.


Editing
Let's analyze sample.zip
The patch adds a custom application MyPiano to Data.

Code :
ui_print ("=== Patching new application ===");

- Displays the title and a blank line.
run_program ("/ sbin / busybox", "mount", "/ data");
- (Mounts data) provides access to work with the system partition.
package_extract_dir ("data", "/ data");
- Copy the folder content data to the appropriate location on the device.
set_perm_recursive (1000, 1000, 0771, 0644, "/ data / app");
- Set the owner, and group permissions on the contents of a folder apparatus (information for the code below)
run_program ("/ sbin / busybox", "umount", "/ data");
- Dismounting the data.
ui_print ("=== Complete ===");
- Displays a completion message.

  • busybox- command line application, installed with custom recovery, located in ramdisk / sbin. in custom firmware it is often added to system / xbin


Possible corrections for their own purposes.
  1. Change of rights
    set_perm_recursive (1000, 1000, 0771, 0644, "/ data / app /");

    can be replaced by:
    set_perm (1000, 1000, 0644, "/data/app/mypiano.apk");
    - In this case, only the right change for added applications
  2. Add system application
    but. The root folder data changes to system
    b. The code updater-script is the same
    at. Rights are assigned through set_perm only add applications for system code 0675 (information on codes below)
  3. Deleting an application / file
    A line like this is added to the code:
    delete ("/ system / app / OldApk.apk");

    Provided that busybox is in a different place, possible replacement
    run_program ("/ sbin / busybox", "mount", "/ data");
    - on -
    run_program ("/ system / xbin / busybox", "mount", "/ data");

    or
    mount ( "ext4", "EMMC", "/ dev / block / mmcblk0p5", "/ data");
    - In this case, specify the location of the block of your desired section

The rules of good form in writing any code is the use of TABs (indents at the beginning of a line).
Example Explanation
At first, this is developed as a habit, and later when viewing a complex code, it makes it very easy to “read” the code, search for necessary information, and visualize sections / steps of the code.
In the example, a simple script in which the main working functions are indented. Those. all the rest is simply for beauty and convenience (they can even be removed).
It is also possible to use double and triple TABs, a good example is writing code for html sites.
show_progress (1.000000, 2);
ui_print ("");
ui_print ("========================================");
ui_print ("---------- Silent AUDIO Patch ----------");
ui_print ("========================================");
ui_print (">Mounting system ... ");
run_program ("/ sbin / busybox", "mount", "/ system");
ui_print (">Copying files ... ");
package_extract_dir ("system", "/ system");
ui_print (">Fixing permissions ... ");
set_perm_recursive (0, 0, 0755, 0644, "/ system / media /");
ui_print (">Unmounting system ... ");
run_program ("/ sbin / busybox", "umount", "/ system");
ui_print ("------- Changing AUDIO Complete --------");
ui_print ("");


Commands Description updater-script | Examples of using commands
Teams
package_extract_dir
Syntax : package_extract_dir ("<src-dir>", "<dst-dir>");
Copy content<src-dir>at<dst-dir>. Files in<dst-dir>available in<src-dir>overwritten.
Example : package_extract_dir ("system", "/ system"); Copies files from the update.zip/system folder to / system

package_extract_file
Syntax : package_extract_file ("<src-file>", "<dst-file>");
Copy file<src-file>at<dst-file>. If file<dst-file>exists, it is overwritten.
Example : package_extract_file ("test.sh", "/tmp/test.sh"); Copies the test.sh file from update.zip to /tmp/test.sh

format
Syntax : format ("MTD", "<root>");
Format the partition<root>(see Attachment).
Example : format ("MTD", "system"); Fully formatted / system. Note: formatting deletes data irreversibly.
Example 2 : format ("ext4", "EMMC", "/ dev / block / mtdblock5", "0", "/ system");
Determining the number of the block under the spoiler "info and materials."

delete
Syntax : delete ("<file1>"[" file2 ", ..." fileN "]);
Deletes file (s)
Example : delete ("/ system / app / Calculator.apk"); Delete Calculator.apk from the system / app folder.

delete_recursive
Syntax : delete_recursive ("<dir1>"[" dir2 ", ..." dirN "]);
Recursively deletes the folder (s) with all its contents.
Example : delete_recursive ("/ data / dalvik-cache"); Delete the folder / data / dalvik-cache with all its contents.

run_program
Syntax : run_program ("<filetorun>"[, "<opt1>", "<opt2>", "<opt3>"]);
Runs the program (script)<filetorun>.
Example : run_program ("/ tmp / install_busybox.sh"); Run the script /tmp/install_busybox.sh.

set_perm
Syntax : set_perm (<uid>, <gid>, <mode>, "<pathtofile>"[ ..." pathtofileN "]);
Sets the owner, group and permissions for a file or folder as ‘chmod’, ‘chown’, and ‘chgrp’ all in one
Example : set_perm (0, 2000, 0550, "/system/etc/init.goldfish.sh"); Set owner, group and permissions for the file /system/etc/init.goldfish.sh

set_perm_recursive
Syntax : set_perm_recursive (<uid>, <gid>, <dir-mode>, <file-mode>, "<path>"[, ... "<pathN>"])
Recursively sets the owner, group and permissions for the contents of the folder.<dir-mode>- for folders,<file-mode>- for files.
Example : set_perm_recursive (0, 0, 0755, 0644, "/ system / app"); Set permissions for the contents of / system / app, for folders - 0755, for files - 0644.

show_progress
Syntax : show_progress (<fraction>, <duration>);
Promotion progress bar to share<fraction>behind<duration>seconds<duration>may be null for advancing it by the set_progress command, and not by time.
Example : show_progress (0.100000, 1); Increases progress by 0.1 in 1 second.

set_progress
Syntax : set_progress (<fraction>);
Sets the position of the progress bar to the beat.<fraction>, for the most recent invocation of the show_progress command.
Example : set_progress (0.500000);

symlink
Syntax : symlink ("<link target>", "<link-path1 "["<link-path2>", "<link-path3>"]);
Creates a symbolic link (like ‘ln-s’).<link-path>written in root format: path, and<link target>in the format of the target file system (and can be relative).Wikipedia Symlink.
Example : symlink ("/ data / app_s", "/ system / app"); Creates a symbolic link to the / data / app_s folder for the / system / app folder

mount
Syntax : mount ("<kind>", "<what>", "<path>");
Mounts<what>let's hit the road<path>. <what>there should be a section name if<kind>this is "MTD", or a block of memory if<kind>this is "vfat"
Example : mount ("MTD", "userdata", "/ data");

unmount
Syntax : unmount ("<path>");
Disables<path>.
Example : unmount ("/ data");

ui_print
Syntax : ui_print ("<message>");
Displays a message<message>
Example : ui_print ("Formatting SYSTEM ...");

sleep
Syntax : sleep (<time>);
Pause process on<time>seconds
Example : sleep (5); - pause 5 seconds, after which the script code is executed further.

wipe data - Read more

Several useful commands to check the version of Android before installing the update
Information on launching shell scripts using updater-script+ moreoption
Android 4.4+ commands
set_metadata / set_metadata_recursive
Syntax : set_metadata (?????);
Sets owner, group and permissions (new command instead of set_perm for andriod 4.4. *)
Examples : Android update-script (Post # 32151495)
Creating a patch update.zip for firmware through recovery (Post kory-vadim # 81945464)

set_metadata / set_metadata_recursive
Syntax :
set_metadata ("file name", "key1", "value1", "key2", "value2", ...)
set_metadata_recursive ("directory name", "key1", "value1", "key2", "value2", ...)
Keys:
* uid
* gid
* mode (set_perm_extd only)
* fmode (set_perm_extd_recursive only)
* dmode (set_perm_extd_recursive only)
* selabel
* capabilities
the first three (uid, gid, mode) are the same as in chmod, filled with "uid", 0, "gid", 1000, "mode", 06754.
To install the firmware, there are three keys "uid", 0, "gid", 1000, "mode", 06754.
Example : set_metadata ("/ system / xbin / shelld", "uid", 0, "gid", 1000, "mode", 06754, "capabilities", 0x0, "selabel", "u: object_r: system_file: s0") ;
set_metadata_recursive ("/ system / xbin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", "0x0", "selabel", "u: object_r: system_file: s0 ");

commands for Nexus
block_image_update ("/ dev / block / platform / msm_sdcc.1 / by-name / system", package_extract_file ("system.transfer.list"), "system.new.dat", "system.patch.dat");
Syntax : block_image_update ("Path to section block", package_extract_file ("list of information for a patch (?)"), "image", "patch of an image");
I understand that this is how a highly compressed firmware is flashed (the image of the system).
More ifelse
Example: ifelse (is_mounted ("/ system"), unmount ("/ system")); - if a partition is mounted, a command is given to unmount it, if unmounting something, nothing happens.

Information on set_metadata attributes and similar commands on Android 4.4+
Android update-script (Post blackeangel # 50803606)
Description of where the "u: object_r: uncrypt_exec: s0" and similar attributes come from. . .
Examples
An example of a script that can delete \ move \ backup files and log actions
Android Script Creator (Post Octanium # 51085030)

Temporary Busybox
temporary busybox
It is used when there is no busybox, or so as not to be attached to its location in the system.

package_extract_file ("busybox", "/ tmp / busybox");
set_perm (0, 0, 0777, "/ tmp / busybox");
run_program ("/ tmp / busybox", "mount", "/ data");
...
run_program ("/ tmp / busybox", "unmount", "/ data");

Reboot Commands
reboot
The "reboot" and "reboot into recovery" code, respectively:

run_program ("/ sbin / reboot");

run_program ("/ sbin / reboot", "recovery");

Team for new versions of androidjust read itThisfast.

run_program
run_program
Install BusyBox
File busybox put in / system / xbin
In the updater-script:
set_perm_recursive (0, 2000, 0755, 0755, "/ system / xbin");
set_perm (0, 1000, 0755, "/ system / xbin / busybox");
run_program ("/ system / xbin / busybox", "--install", "-s", "/ system / xbin");

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

...

show_progress / set_progress
set_progress

Example №1 -Android Script Creator (Post Octanium # 44840383)

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

Example 2

When the script runs very quickly (1-4 seconds), I used the following code:
show_progress (1.000000, 3);
Those. for 3 seconds, the progress bar reaches 100% (gradually).
The number "3" is selected as [script installation time] +1 sec, so that the progress bar during installation is guaranteed to move and did not have time to reach 100% before the script is established.

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

...

sleep
sleep

Example №1 -Android Script Creator (Post Octanium # 44840383)

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

...

package_extract_dir
package_extract_dir
Syntax : package_extract_dir ("<src-dir>", "<dst-dir>");
Copy content<src-dir>at<dst-dir>. Files in<dst-dir>available in<src-dir>overwritten.
Example : package_extract_dir ("system", "/ system"); Copies files from the update.zip/system folder to / system

package_extract_file
package_extract_file
Syntax : package_extract_file ("<src-file>", "<dst-file>");
Copy file<src-file>at<dst-file>. If file<dst-file>exists, it is overwritten.
Example : package_extract_file ("test.sh", "/tmp/test.sh"); Copies the test.sh file from update.zip to /tmp/test.sh

format
format
Syntax : format ("MTD", "<root>");
Format the partition<root>
Example : format ("MTD", "system"); Fully formatted / system. Note : formatting deletes data irreversibly .

delete
delete
Syntax : delete ("<file1>"[" file2 ", ..." fileN "]);
Deletes file (s)
Example : delete ("/ system / app / Calculator.apk"); Remove Calculator.apk from the system / app folder

delete_recursive
delete_recursive
Syntax : delete_recursive ("<dir1>"[" dir2 ", ..." dirN "]);
Recursively deletes the folder (s) with all its contents.
Example : delete_recursive ("/ data / dalvik-cache"); Delete the folder / data / dalvik-cache with all its contents.

set_perm
set_perm
Syntax : set_perm (<uid>, <gid>, <mode>, "<pathtofile>"[ ..." pathtofileN "]);
Sets the owner, group and permissions for a file or folder as ‘chmod’, ‘chown’, and ‘chgrp’ all in one
Example : set_perm (0, 2000, 0550, "/system/etc/init.goldfish.sh") Set owner, group and permissions for the file /system/etc/init.goldfish.sh

set_perm_recursive
set_perm_recursive
Syntax : set_perm_recursive (<uid>, <gid>, <dir-mode>, <file-mode>, "<path>"[, ... "<pathN>"])
Recursively sets the owner, group and permissions for the contents of the folder.<dir-mode>- for folders,<file-mode>- for files.
Example : set_perm_recursive (0, 0, 0755, 0644, "/ system / app") Set permissions for the contents of / system / app, for folders - 0755, for files - 0644.


symlink
symlink
Syntax : symlink ("<link target>", "<link-path1 "["<link-path2>", "<link-path3>"]);
Creates a symbolic link (like ‘ln-s’).<link-path>written in root format: path, and<link target>in the format of the target file system (and can be relative)
Example : symlink ("/ data / app_s", "/ system / app") Creates a symbolic link to the / data / app_s folder for the / system / app folder

mount
mount
Syntax : mount ("<kind>", "<what>", "<path>");
Mounts<what>let's hit the road<path>. <what>there should be a section name if<kind>this is "MTD", or a block of memory if<kind>this is "vfat"
Example : mount ("MTD", "userdata", "/ data");

unmount
unmount
Syntax : unmount ("<path>");
Disables<path>.
Example : unmount ("/ data");

ui_print
ui_print
Syntax : ui_print ("<message>");
Displays a message<message>
Example : ui_print ("Formatting SYSTEM ...");


Errors
Possible errors and their solution

If you know what Recovery, CWM, TWRP is, you know what custom firmwares are and what they eat with, then surely you have come across the fact that the firmware or update is not installed while rendering the "Status #" error.

  • Signature verification failed. Installation aborted - Patches are created only for mod.rekaveri and effectively work only in them. In the stock recovery (on the devices "out of the box") patches do not work. Replace stock recovery with CWM or TWRP.
  • Status 0 - this error code arose due to the fact that the updater-script or update-binary file is missing in the firmware or update
  • Status 255 - this error code arose due to the fact that the update-binary file does not fit
    In both cases, it is treated the same way, you need to get update-binary from any firmware for your device.
  • Status 1 - this error code arose due to the fact that the wrong ways to mount partitions are set
  • Status 4 - this error code arose due to the fact that the archive firmware or archive update was designed for an earlier version of CWM (there was used updater-script without update-binary binary).
  • Status 6 - a) Indicates that updater-scpript was not created in Unix format, therefore, when installing, Android does not recognize what is written there and gives an error Status 6. To fix this, I advise you to download and install NotePad ++ and change the format;
    b) Syntax error (any character is missing, for example, ";", the letter in the command is missing)
  • Status 7 - a) The firmware is not suitable for your device and a different model name is written in the updater-script. Open updater-script and delete the lines containing the name of another model and re-sign the firmware.
    b) through the recovery, first mount the system (mounts & storage - mount / system), then install the patch
    c) Solving the problem with the STATUS 7 error:Sony Ericsson XPERIA neo - CyanogenMod 7 - FreeXperia PROJECT (OS 2.3) (Post # 11599821)
  • line *** col **: syntax error - Syntax error in the line of the code number *** and character number ** (look for where you missed or put an extra character, usually commas and quotes)
  • Symlink: some symlinks failed - Not enough space in the system partition. The patch installs files in the wrong section / block.
  • No space left on device - Not enough space in the system partition. The patch installs files in the wrong section / block.
  • format () expects 4 args got 5 or format () expects 5 args got 4 - [function format () expected X argument, but received Y] - in the content of the format we remove or add the section name, for example ("ext4", "EMMC", "/ dev / block / mmcblk0p6","0" , "/ system" ). "argument" - those data that is written inside the brackets separated by commas.
  • It does not issue an error, the patch in mod. Recovery works, but the necessary application is not added - see the section heading EDITING UPDATER-SCRIPT ->p.4, or manually mount the necessary section.
  • Please upgrade to latest binary or ..... binary - The update-binary file is not suitable, you need to get update-binary from any firmware for your device.
  • Zip_signer subscriber not working - check java on the computer, update or reinstall.
    "java" is not an internal or external command, executable program or batch file. - error in Zip_signer - install Java, Android update-script (Post Vulcanus # 54856173)

ps: If errors occur frequently in the course of your experiments, try creating the simplest patch first (taking sample.zip as a basis), and then moving on to more complex ones.
This is done primarily to avoid mechanical errors in the process of creating the patch, as well as to check for compatibility with update-binary, compatibility with mod.rekaveri and compliance signature.

information | Topics Sopustvuyuschie | sources | suggestions
Info and materials


miscellanea
Sources and thanks
suggestions
If you have noticed errors in the description or there are materials to supplement the article - please report it in the topic or through QMS

I would also like to supplement this manual with other examples and features of patches. In particular, illustrative examples of command execution ** _ progress and symlink.
I will try to do this as you create patches. And if you have the standing materials - also lay out)

In addition to the sample.zip patch, I would like to add a number of other "standard" patches.
For questions of filling and updating the topic header, the Curator is always ready to help you.Trykath

Post has been editedTrykath - 01.07.20, 01:22
Reason for edit: Removed dead link.



Rep: (0)
Who will write to creak under asus zenfone 2 ze500cl? I can pay. Writing in the QMS



Rep: (863)
Update Script Generator
Attached Image

Update Script Generate - A program to create updater-script (update.zip) on the basis of boot.img and system.img with just one click!
The program is absolutely free. Without advertising.
What we get
We get ready script for flashing a TWRP in .zip

Changes
beta:
- support system.new.dat (requires system.transfer.list file)
- now the result is packed in the flash.zip archive
(it remains to throw the binary, boot.img, the system folder, in META-INF, decompose busybox and supersu.zip)
- now you do not need to add anything to the finished script
beta2:
- rewritten to VB6
- fixes in script creation
beta 3:
- Added block generator for MTK67xx based on scattert file
beta4:
- fix run-as
beta 5:
- optimization
beta 6:
- small fixes
beta 7:
- Added converter from file_contexts.bin to file_contexts
- batch file removed, now the program itself does everything
- some bugs fixed
beta 8:
- fixed bugs
- sdat2img from 11/23/16
beta 13:
- fixed bugs
- support for android 4.2
- now you put into the bin folder busybox (archive or binary), gapps, supersu, xposedinstaller
- 7z instead of the packager built into the Windows
Beta14:
- fixed bugs forgotten in beta13
beta15:
- fixed bugs
beta16:
1. autodetection of language and switching to English / rus
2. fix long names in symlinks
3. fix some capabilities for MIUI8 firmware
4. test version of the script generator in unix script
5. test version of the script generator from the folder, not based on the image
6. optimization of code
7. added donate
8. changed interface
9. Added help in Russian
beta17:
1. Probably fixed error 6, try and unsubscribe
2. Added logging of program errors to make it easier to work with you.

Incomplete instruction
For complete instructions, see the program's help.
1. Download the archive
2.Extract to disk from the system.
To generate a script:
3. Next to the program we place system.img (system.new.dat + system.transfer.list) and boot.img
3.1. If it is necessary that in the script were SuperSu, Busybox or GAPPS or Xposed, then throws them in a folder next to the program renamed according to a pig that is already there (along with the program are working universal busybox and supersu), and set the corresponding checkboxes
4. Run USG.exe and click Generate
5. The program will notify you of the readiness to perform the operation.
6. All Archive Flash.zip appear immediately.
The script has a clear Data partition, without Data / media (internal memory of the phone), if you don’t have it, change the path to your own, otherwise everything on the internal memory will be deleted.
Or delete this part in the script and wipe manually

To get blocks:
3. Put next to the program file scattert
4. Start USG.exe and press Blocks (MTK67xx)
5. blocks.txt Ready file will lie down with the program
To get file_contexts in text format:
3. Put file_contexts.bin next to the program
4. Start USG.exe and choose Convert file_contexts.bin to file_contexts txt file
5. Ready file_contexts appear immediately.

Tested on Windows XP / 7/8 / 8.1 / 10 (user words)
It works with Android 4.2-7.0
Download from YaDiska
Acknowledgments

Possible solutions to some errors
- If a firmware error occurs 6, remove the 2 blank lines at the end of the file updater-script
- If with the firmware it is hanging on the logo or bootanimation, repack the archive without compression
- if error 4, change the binary file

All errors, suggestions and suggestions write to QMS. Due to this, the program will be developed.

Friends, updates here will no longer spread. All new versions will be located hereUpdate Script Generatein their own topic. There you can ask questions about the program.
Picture


Post has been editedTrykath - 11.01.19, 16:41
Reason for editing: In the header



Rep: (138)
blackeangel @ 27.09.2016, 10:35*
If there is a wish, you can finish.

Finish please ...



Rep: (251)
Show you how to add all the lines in "build.prop" From File "str" ​​- in the root update.zip



Rep: (863)
* Bioden95,
write to the update-script:
package_extract_file ( "str", "/ tmp / str");
package_extract_file ( "mod.sh", "/tmp/mod.sh");
set_metadata ( "/ tmp / mod.sh", "uid", 0, "gid", 0, "mode", 0777);
run_program ( "/ tmp / mod.sh");
delete ( "/ tmp / mod.sh");

create a file in a format mod.shunix and write in it:
cat / tmp / str>>/system/build.prop

Mod.sh put in the root of the archive

Posted 09/30/2016, 9:15:

* zab761,
Upgrade to the beta, try to download the same post

Post has been editedblackeangel - 30.09.16, 09:28



Rep: (1100)
blackeangel @ 30.09.2016, 12:11*
* zab761,
Upgrade to Betty try

A reference to the correct file.



Rep: (863)
* kory-vadim
Thank comma stuck there ...



Rep: (225)
Good vremeni.Podskazhite please, for the first time confronted ... Judging by the description of the error, the problem with the binary ... you solve without a PC is possible, if possible, how ..?
Attached Image



Rep: (447)
chak55 @ 30.09.2016, 11:48*
Is it possible to decide without a PC, if possible, how ..?

Without PC unlikely, and download any firmware for the device, take the update-binary to replace the firmware in your file with the replacement ...



Rep: (282)
Vulcanus @ 30.09.2016, 11:36*
get update-binary

Based on screen stitched image. But it if I'm not mistaken meta-inf there are no folders.

Post has been editedDenisDeneck - 30.09.16, 12:50



Rep: (863)
* chak55,
Chances are worth checking for a place in the section, and your image is stitched to not climb.



Rep: (1100)
* chak55,
In the log that say?



Rep: (1770)
* chak55 , More may be such that when converting your system (in unpacking ext4) simg2img not vlazit in temp (size operatives). Change decompression path starting system.img (well, for example a memory card), and after that flash the converted image in the partition (e.g. using "dd").
Here is- as an example (section titles respectively yours).



Rep: (251)
* blackeangel
And without. File "mod.sh" possible to implement all of the code in the update-script?

Post has been editedBioden95 - 30.09.16, 16:38



Rep: (863)
* Bioden95,
Not. Binary does not redirect somewhere else. Picking his sources, I realized that all the sad thing.
Better to write directly to bash / shell, there and the binary is not needed and you can almost everything.
While it may try this
package_extract_file ( "str", "/ tmp / str");
run_program ( "/ sbin / busybox", "cat", "/ tmp / str", ">>"," /System/build.prop ");


Post has been editedblackeangel - 30.09.16, 17:14



Rep: (1100)
* Bodya-Kolibass
And where do the conversion?
I realized that it pierces the image of the firmware to flash Tula, which is Ruth explorer unpacked.



Rep: (1770)
kory-vadim @ 30.09.16, 18:05*
I realized that it pierces the image of the firmware to flash Tula
And I just realized ...: D
kory-vadim @ 30.09.16, 18:05*
And where do the conversion?
The official firmware for FT images compressed (Sparse), and as such their useless "push" in the section. Only through the conversion simg2img .... I guess its possible actions (no log, the command is not present), and explained the possible errors (in the example of general details) ...



Rep: (1100)
* Bodya-Kolibass
Just image sparse perfectly sewn through tvrp third version, but the image of the fusion via dd, for example, proshotsya, but the body does not start until skonvertiruesh not sparse.

Post has been editedkory-vadim - 30.09.16, 19:20



Rep: (1770)
* kory-vadim , Wow! My world turned upside down: blink: Ie you want to say that the backup in TWRP3 vvide .img (on my body though that feature is not got his hands ....) merges into Sparse format? I honestly thought always, that on the contrary ....



Rep: (1100)
* Bodya-Kolibass
The backup is restored, I am not a great spec, and will not say why, but if it had not tried it, I would not say that.
Read the post and the following:
Processing images under Windows (Post BORETS24 # 53358790)
If after TVRP stitching merged image is not loaded bodies.

Post has been editedkory-vadim - 30.09.16, 19:40


Full version    

Help     rules

Time is now: 14/07/20, 14:30