From f68aaaf20c1f8f20825d51d6e984e9f9d75e4393 Mon Sep 17 00:00:00 2001 From: "Koushik K. Dutta" Date: Sun, 7 Mar 2010 13:39:21 -0800 Subject: [PATCH] run amend scripts from the command line --- extendedcommands.c | 56 +++++++++++++++++++++++++++++++++++++++++++++ mtdutils/Android.mk | 25 ++++++++++---------- recovery.c | 2 ++ 3 files changed, 70 insertions(+), 13 deletions(-) diff --git a/extendedcommands.c b/extendedcommands.c index 3f52947..23d4094 100644 --- a/extendedcommands.c +++ b/extendedcommands.c @@ -30,6 +30,9 @@ #include "roots.h" #include "recovery_ui.h" +#include "commands.h" +#include "amend/amend.h" + int signature_check_enabled = 1; int script_assert_enabled = 1; static const char *SDCARD_PACKAGE_FILE = "SDCARD:update.zip"; @@ -383,3 +386,56 @@ void do_mount_usb_storage() system("echo '' > /sys/devices/platform/usb_mass_storage/lun0/file"); system("echo 0 > /sys/devices/platform/usb_mass_storage/lun0/enable"); } + +int amend_main(int argc, char** argv) +{ + if (argc != 2) + { + printf("Usage: amend