AnsweredAssumed Answered

Recovery doesn't have some functions

Question asked by Qiulong Li on Dec 4, 2015
Latest reply on Dec 4, 2015 by Qiulong Li

Hi

My environment is i.MX6Q and Android4.4.2 1.0.0-rc3

I want to modify update.zip to support update uboot,and I follow Android_Frequently_Asked_Questions.pdf 's section How do I customize the reference OTA application

I added this command to the end of updater-script

# Write u-boot to 1K position.

# u-boot binary should be a no padding uboot!

# For eMMC(iNand) device, needs to unlock boot partition.

ui_print("writting u-boot...");

package_extract_file("files/u-boot-6q.bin", "/tmp/u-boot-no-padding.bin");

sysfs_file_write("class/mmc_host/mmc0/mmc0:0001/boot_config", "1");

simple_dd("/tmp/u-boot-no-padding.bin", "/dev/block/mmcblk0", 1024);

sysfs_file_write("class/mmc_host/mmc0/mmc0:0001/boot_config", "8");

show_progress(0.1, 5);

When I enter recovery mode,I failed and get this log:

Finding update package...

I:Update location: /cache/update.zip

Opening update package...

I:read key e=3 hash=20

I:1 key(s) loaded from /res/keys

Verifying update package...

I:comment is 1746 bytes; signature 1728 bytes from end

I:whole-file signature verified against key 0

I:verify_file returned 0

Installing update...

line 89 col 67: unknown function "sysfs_file_write"

line 90 col 68: unknown function "simple_dd"

line 91 col 67: unknown function "sysfs_file_write"

3 parse errors

E:Error in /cache/update.zip

(Status 6)

Installation aborted.

 

It said I didn't have some functions.Then I check what functions do I have in recovery,I get this:

./edify/expr.c:    RegisterFunction("ifelse", IfElseFn);

./edify/expr.c:    RegisterFunction("abort", AbortFn);

./edify/expr.c:    RegisterFunction("assert", AssertFn);

./edify/expr.c:    RegisterFunction("concat", ConcatFn);

./edify/expr.c:    RegisterFunction("is_substring", SubstringFn);

./edify/expr.c:    RegisterFunction("stdout", StdoutFn);

./edify/expr.c:    RegisterFunction("sleep", SleepFn);

./edify/expr.c:    RegisterFunction("less_than_int", LessThanIntFn);

./edify/expr.c:    RegisterFunction("greater_than_int", GreaterThanIntFn);

./updater/install.c:    RegisterFunction("mount", MountFn);

./updater/install.c:    RegisterFunction("is_mounted", IsMountedFn);

./updater/install.c:    RegisterFunction("unmount", UnmountFn);

./updater/install.c:    RegisterFunction("format", FormatFn);

./updater/install.c:    RegisterFunction("show_progress", ShowProgressFn);

./updater/install.c:    RegisterFunction("set_progress", SetProgressFn);

./updater/install.c:    RegisterFunction("delete", DeleteFn);

./updater/install.c:    RegisterFunction("delete_recursive", DeleteFn);

./updater/install.c:    RegisterFunction("package_extract_dir", PackageExtractDirFn);

./updater/install.c:    RegisterFunction("package_extract_file", PackageExtractFileFn);

./updater/install.c:    RegisterFunction("symlink", SymlinkFn);

./updater/install.c:    RegisterFunction("set_perm", SetPermFn);

./updater/install.c:    RegisterFunction("set_perm_recursive", SetPermFn);

./updater/install.c:    RegisterFunction("set_metadata", SetMetadataFn);

./updater/install.c:    RegisterFunction("set_metadata_recursive", SetMetadataFn);

./updater/install.c:    RegisterFunction("getprop", GetPropFn);

./updater/install.c:    RegisterFunction("file_getprop", FileGetPropFn);

./updater/install.c:    RegisterFunction("write_raw_image", WriteRawImageFn);

./updater/install.c:    RegisterFunction("apply_patch", ApplyPatchFn);

./updater/install.c:    RegisterFunction("apply_patch_check", ApplyPatchCheckFn);

./updater/install.c:    RegisterFunction("apply_patch_space", ApplyPatchSpaceFn);

./updater/install.c:    RegisterFunction("read_file", ReadFileFn);

./updater/install.c:    RegisterFunction("sha1_check", Sha1CheckFn);

./updater/install.c:    RegisterFunction("rename", RenameFn);

./updater/install.c:    RegisterFunction("wipe_cache", WipeCacheFn);

./updater/install.c:    RegisterFunction("ui_print", UIPrintFn);

./updater/install.c:    RegisterFunction("run_program", RunProgramFn);

and there are no sysfs_file_write and simple_dd,then I check the recovery's git log,I get this:

commit 4f14fa3dbed753ed474afc953e759934e48b2323

Author: guoyin.chen <guoyin.chen@freescale.com>

Date:   Fri Aug 23 17:27:30 2013 +0800

 

 

    ENGR00275477 Recovey: Mess code when enter recovery mode

   

    Init the text array to make sure default text is null

   

    Signed-off-by: guoyin.chen <guoyin.chen@freescale.com>

 

Do I have the wrong version?

Outcomes