Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Lanchon committed Apr 6, 2016
1 parent 76054a2 commit 5d3390a
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 7 deletions.
84 changes: 77 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

- Automatically convert shell scripts to flashable zips with a single command.
- Don't mess with `ui_print` crap: standard output and error streams will work just fine.
- Can add binaries to or otherwise alter the runtime environment offered by the recovery.
- Flip Toybox the bird: includes ready-to-go Busybox binaries for various architectures.
<br>(Binaries borrowed from [busybox.net] (https://www.busybox.net).)
- Can automatically extract resources from the zipfile before invoking the script.
- Can automatically create a logfile of the output of the script.
- Displays (and possibly logs) the script exit code and reports it back to recovery.
Expand All @@ -18,7 +21,7 @@

#### Usage: FLASHIZE

Flashize (2016-03-28)
Flashize (2016-04-06)

Converts a shell script to a flashable Android recovery zip.

Expand All @@ -31,7 +34,7 @@ Names the output zipfile based on `<input-script>` if `<output-zip>` is null or
Can create a logfile on the device at runtime, according to the value of `<runtime-logfile>`:
- The absolute path of the logfile to be created.
- A relative path or filename to be interpreted against the path of the zipfile being run.
- A dot (.) to use the pathname of the zipfile being run with a '.log' extension.
- A colon (:) to use the pathname of the zipfile being run with a '.log' extension.
- Null or a dash to disable logging.

This setting can be overridden by creating a '/tmp/flashize-log' file on the target device:
Expand All @@ -43,14 +46,46 @@ Script debugging modes are enabled by creating dummy files on the target device:

<br>

#### Usage: FLASHIZE-EXT

Flashize-Ext (2016-04-06)

Converts a shell script to a flashable Android recovery zip. The resulting flashable zip
automatically extracts the full content of the zipfile before invoking the script.
This tool is compatible with Busybox and Toybox.

`flashize-ext <input-script> [<input-zip> [<output-zip> [<runtime-logfile> [<dest-dir>]]]]`

Reads the script from standard input if `<input-script>` is a dash (-).

Names the output zipfile based on `<input-script>` if `<output-zip>` is null or a dash.

Can create a logfile on the device at runtime, according to the value of `<runtime-logfile>`:
- The absolute path of the logfile to be created.
- A relative path or filename to be interpreted against the path of the zipfile being run.
- A colon (:) to use the pathname of the zipfile being run with a '.log' extension.
- Null or a dash to disable logging.

This setting can be overridden by creating a '/tmp/flashize-log' file on the target device:
- If the file is empty then enable logging to '/tmp/flashize.log'.
- Otherwise override the value of `<runtime-logfile>` with the contents of the file.

Extracts files to `<dest-dir>` or to '/tmp/flashize' if `<dest-dir>` is null or a dash.

Script debugging modes are enabled by creating dummy files on the target device:
- Create '/tmp/flashize-ext-debug' to trace the user-supplied script.
- Create '/tmp/flashize-debug' to trace file extraction.

<br>

#### Usage: FLASHIZE-EBB

Flashize-EBB (2016-03-28)
Flashize-EBB (2016-04-06)

Converts a shell script to a flashable Android recovery zip. The resulting flashable zip
can automatically extract resources bundled within the zipfile before invoking the script.
This tool is incompatible with toybox due to shortcomings of its 'unzip' command, and
requires BusyBox instead. Thus the toybox-based CyanogenMod 13 recovery is not supported.
This tool is incompatible with Toybox due to shortcomings of its 'unzip' command, and
requires Busybox instead. Thus the Toybox-based CyanogenMod 13 recovery is not supported.

`flashize-ebb <input-script> <input-zip> <output-zip> <runtime-logfile> <src-dir> <dest-dir> [<extra-src-spec>...]`

Expand All @@ -61,7 +96,7 @@ Names the output zipfile based on `<input-script>` if `<output-zip>` is null or
Can create a logfile on the device at runtime, according to the value of `<runtime-logfile>`:
- The absolute path of the logfile to be created.
- A relative path or filename to be interpreted against the path of the zipfile being run.
- A dot (.) to use the pathname of the zipfile being run with a '.log' extension.
- A colon (:) to use the pathname of the zipfile being run with a '.log' extension.
- Null or a dash to disable logging.

This setting can be overridden by creating a '/tmp/flashize-log' file on the target device:
Expand All @@ -74,6 +109,41 @@ Extracts files from the zip at runtime, according to the value of `<src-dir>`:
`<src-dir>` there. Also extracts files matching `<extra-src-spec>` to `<dest-dir>`.

Script debugging modes are enabled by creating dummy files on the target device:
- Create '/tmp/flashize-ext-debug' to trace the user-supplied script.
- Create '/tmp/flashize-ebb-debug' to trace the user-supplied script.
- Create '/tmp/flashize-debug' to trace resource extraction.

<br>

#### Usage: FLASHIZE-ENV

Flashize-Env (2016-04-06)

Converts a shell script to a flashable Android recovery zip. The resulting flashable zip
can temporarily add binaries to or otherwise alter the runtime environment offered by the
recovery before invoking the script.

`flashize-env <input-script> [<env-spec> [<output-zip> [<runtime-logfile>]]]`

Reads the script from standard input if `<input-script>` is a dash (-).

Can temporarily alter the runtime environment, according to the value of `<env-spec>`:
- The name (without extension) of a configuration provided in Flashize's 'env' directory.
- The path of a user-provided zipfile containing the environment configuration.

Names the output zipfile based on `<input-script>` if `<output-zip>` is null or a dash.

Can create a logfile on the device at runtime, according to the value of `<runtime-logfile>`:
- The absolute path of the logfile to be created.
- A relative path or filename to be interpreted against the path of the zipfile being run.
- A colon (:) to use the pathname of the zipfile being run with a '.log' extension.
- Null or a dash to disable logging.

This setting can be overridden by creating a '/tmp/flashize-log' file on the target device:
- If the file is empty then enable logging to '/tmp/flashize.log'.
- Otherwise override the value of `<runtime-logfile>` with the contents of the file.

Script debugging modes are enabled by creating dummy files on the target device:
- Create '/tmp/flashize-env-debug' to trace the user-supplied script.
- Create '/tmp/flashize-ext-debug' to trace environment setup.
- Create '/tmp/flashize-debug' to trace file extraction.

5 changes: 5 additions & 0 deletions make-readme
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ cat <<"EOF"
- Automatically convert shell scripts to flashable zips with a single command.
- Don't mess with `ui_print` crap: standard output and error streams will work just fine.
- Can add binaries to or otherwise alter the runtime environment offered by the recovery.
- Flip Toybox the bird: includes ready-to-go Busybox binaries for various architectures.
<br>(Binaries borrowed from [busybox.net] (https://www.busybox.net).)
- Can automatically extract resources from the zipfile before invoking the script.
- Can automatically create a logfile of the output of the script.
- Displays (and possibly logs) the script exit code and reports it back to recovery.
Expand All @@ -60,6 +63,8 @@ cat <<"EOF"
EOF

printUsage flashize
printUsage flashize-ext
printUsage flashize-ebb
printUsage flashize-env

} >README.md

0 comments on commit 5d3390a

Please # to comment.