This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

4AJ1.1 Recovery Mode

Hi,

Does anyone try using the Recovery Mode in this release? and actually what does this recovery mode mean to? Can I recover my System Image back to the default after making some changes in the Android OS?

Many thanks! Your will be very appreciated. 

  • Zhi,

    You can boot into recovery mode by selecting the factory reset option through the settings menu in the Android UI, by pressing the back key when you power on the board (for Blaze Tablet), or by doing a "reboot recovery" in ADB.  You will see the Android recovery icon on the display.  Instead of booting into the normal boot.img, the u-boot should boot into the image flashed into the recovery partition, which is the same zImage combined with a different ramdisk (ramdisk-recovery.img).  The actions performed in recovery mode (such as a factory reset, erasing userdata/cache partitions, performing a software update, etc) are customizable and can be different depending on which method you used to enter recovery.

    Regards,
    Gina 

  • Hi Gina,

    Thanks for coming back to me. Strangely I didn't able to see any Icon display when it is in the Android Recovery. I guess if I am not mistaken I can go into this Recovery mode whenever I press the Back Key when it is power on right?

    In the serial console, I only saw Recovery Mode Enter... and later quite a number log messages display afterward then it went to restart and stop (could not boot up). Therefore I have to manually power off and power on back to boot back to normal.

    Is that normal? and Do I need to have my own recovery image? and How to do that?

    I am sorry if I have push too many questions too you.

  • Zhi,

    Are you using Blaze or Blaze Tablet?  I found that the recovery image loaded (and the Android recovery logo appeared) if I pressed the green button on the Blaze or the back button on the Blaze Tablet.  Note that you should have the key pressed before you power-on the board, not just press the key at any time.  You can check your u-boot /drivers/fastboot.c file (search for "recovery") for the behavior with different key presses.

    What kind of messages are you getting in the serial console?  Basically, I see that recovery mode is entered, and the kernel boots.  After a minute, the system reboots into the normal image.

    You can see the files used in the recovery image that are built with the Android filesystem: $MYDROID/out/target/product/blaze_tablet/recovery/root.

    Regards,
    Gina 

  • HI Gina,

    I am using Blaze. I will check the "recovery" keyword in the fastboot.c file. 

    I will post my messages in the serial console when I got it. What can you do when you are in the recovery mode? Is there a menu or options that allow you to do a reset or reflash the system (like upgrade) similar to a well known "ClockworkMod"?

    Where can I get information that is related to Recovery Mode because I would like to use this mode to apply updates or completely reset based on new system image.

    Many thanks Gina!

    Regards

    Yong

  • Yong,

    By default, Android boots into the recovery.img when recovery mode is selected.  Android also provides a default recovery UI that contains the animated icon (green Android robot) and progress bar.  It is up to the developer to provide any customizations, such as a custom icon, menu options, and additional functionality.  Clockwork Mod is a custom recovery that has added to the base Android functionality (see http://www.androidcentral.com/what-recovery-android-z), and it is not part of the TI OMAP Android releases.  You can find some information about the APIs for interacting with the recovery system here: http://developer.android.com/reference/android/os/RecoverySystem.html  If you are covered under NDA with TI, you can contact your TI representative for some additional documentation about system update and factory reset in the TI OMAP Android releases.

    Regards,
    Gina

  • Hi Gina,

    Yes, we do have NDA with TI and I believe there is no problem to contact my TI representative about system update and factory reset.

    There is one thing I need to find out while waiting my TI representative, can we modify the default recovery UI like menu options and additional functionality and where should I look into for? I can dig more into this once you give me the right direction to look into. 

    My main goal is I would like to reflash the entire System or Kernel partition either Factory reset or Down/upgrade Android OS from USB flash drive without any configuration in Android OS (in traditionally we need to go to Settings>About>Update). Restarted my device into Recovery Mode then select apply "ReFlash from USB".

    Can it be possible based on your experience and where should I look into?

    Regards

    Yong

  • Yong,

    Yes, you can customize the recovery UI and functionality by creating a folder named "recovery" in $MYDROID/device/<vendor>/<board>.  See, for example, the files in $MYDROID/device/ti/blaze_tablet/recovery.  

    Regards,
    Gina 

  • Hi Gina,

    Yes, I saw that from the $MYDROID/device/ti/blaze_tablet/recovery

    1. Android.mk

    2. bootloader.c

    3. bootloader.h

    4. recovery_ui.c

    5. recovery_ui.cpp

    6. recovery_updater.c

    Can I reused them and apply to my Blaze? Since you have mention about Blaze Tablet's Recovery source code, may I know does Blaze Tablet support the USB or external SD card plug-in? Why Blaze doesn't have the same Recovery Mode as the Blaze Tablet?

    Thanks Gina, You have made my day!

    Regards

    Yong

  • Yong,

    Blaze Tablet is the official release platform for 4AJ, on which the releases are fully validated.  The releases are sanity tested on Blaze, and build/boot work fine, but occasionally there is functionality that may be supported differently or not at all on Blaze.

    You can check the history of the recovery files for Blaze and Blaze Tablet, by checking these trees on git.omapzoom.org through your webbrowser.  For example:

    http://git.omapzoom.org/?p=device/ti/blaze.git;a=history;f=recovery;hb=jb-release
    http://git.omapzoom.org/?p=device/ti/blaze_tablet.git;a=history;f=recovery;hb=jb-release 

    There was a patch recently to disable recovery on Blaze until the code can be adapted for the new recovery mechanism.  Thus, I recommend that you use the Blaze Tablet recovery code as the example to port to your platform.

    The Blaze Tablet does support USB and external SD card just like on Blaze.  I don't believe the USB or SD card are integrated into the current recovery functionality on Blaze Tablet, but that is a customization you could add for recovery on your platform.

    Regards,
    Gina 

  • Hi Gina,

    Many thanks for all these helps. I am very appreciated. 

    I am actually quite confuse about the Recovery Mode. Like you mentioned before Blaze's Recovery Mode has been disable but how possible I am still be able to boot into the Recovery Mode?

    In Blaze/Recovery/ I saw there is only two files:

    1. Disable_Android.mk

    2. Recovery_UI.c

    Compare to Blaze_Tablet/Recovery, there are many files missing and if the Recovery Mode has been disable then how possible I still have the Recovery Mode boot up? Hope you can help me on this please especially how the data flow is on Recovery Mode.

    Also, I found useful information and I would like to share this out at: http://android-dls.com/wiki/index.php?title=Build_a_custom_recovery_image

    Regards

    Yong

  • Yong,

    If you have received the documentation from your TI representative, it contains more details about the code flow for recovery mode.  To summarize, when you select to reboot into recovery from Android (through Settings -> Factory Reset or through “adb reboot recovery”), the Android framework uses the reboot system call with the argument “recovery”, which performs a warm reset.  The u-boot reads the reboot argument and determines that recovery mode should be entered.  The u-boot also determines that recovery mode should be entered if a certain key is pressed during boot up.  In either case, the u-boot sets the boot command to load the recovery.img, instead of the normal boot.img.  (This is done in the u-boot/drivers/fastboot.c.)

    The recovery.img consists of the zImage plus ramdisk-recovery.img.  The ramdisk-recovery.img is generated from the files in $MYDROID/bootable/recovery.  This is mentioned in the link that you sent as well, except there the output file is $MYDROID/out/target/product/generic/.  In the TI Android releases, the output for Blaze is in $MYDROID/out/target/product/blaze/, and the output for Blaze Tablet is in $MYDROID/out/target/product/blaze_tablet/.  $MYDROID/bootable/recovery contains the .png files for the icons that are displayed.  $MYDROID/bootable/recovery also contains a default_recovery_ui.c, which contains mainly empty functions.  default_recovery_ui.c can be replaced by the device-specific recovery_ui.c (in $MYDROID/device/ti/blaze/recovery or $MYDROID/device/ti/blaze_tablet/recovery, for example).  This allows the user to customize the specific menu items, key presses, and actions to be performed. 

    So “disabling recovery for Blaze” means essentially removing $MYDROID/device/ti/blaze/recovery/recovery_ui.c.  It still looks like recovery is “working”, since the Android reboot system call, the loading of the ramdisk-recovery.img, and the default .png images are still displayed; there is just no customized functionality.  

    Regards,
    Gina

  • Hi Gina,

    Thanks for the long explanation. To be very honours, what you have explained here is better than the documentation I grab via the NDA stuff. The document is lack of explaining the recovery.img contents and how we can modify it to fit our purposes. 

    Another big puzzle to me so far is, how can I built the recovery image after I have customise said some .png image file. Would you mind to give me some directions in building my own recovery mode?

    Many Thanks for the helps!

    Regards

    Yong

  • HI Gina,

    Do you have another documents or any source that I can used as a guidance in customising my recovery mode. 

    About the Recovery source code (android/bootable/recovery), I could not find 'default_recovery_ui.c' file you mention previously but instead I found 'default_device.cpp', 'recovery.cpp', 'screen_ui.cpp', 'ui.cpp'. Also I realise that all the source code in recovery directory are using C++ language instead of C. Furthermore, I noticed that in Blaze Recovery Source Code(android/device/ti/recovery), they are all using C++ and no longer C. 

    About compiling my customise Recovery mode, what type of command I should used to compile them? Is the same command I used to build Android Source code?

    Please help!!! Many thanks

    Regards

    Yong

  • Yong;

    The file is located in:

    ./mydroid/bootable/recovery/default_recovery_ui.c

    Other pages to check for information are:

    http://omapedia.org/wiki/Android_Recovery

    http://omapedia.org/wiki/Android_Fastboot#Partitions_Setup

    http://omapedia.org/wiki/Android_eMMC_Booting

    The recovery image is added to the build system using mm from mydroid directory, the only cases when it is not added is when building without kernel nor the flag for no adding it is  enabled like in the case of when building a emulated image.

    There are some references to recoveryimagein next file,( check too for TARGET_NO_KERNEL nor TARGET_NO_RECOVERY condition for recovery code)

    /mydroid/build/core/Makefile

    but when I tried to run it using make command and erasing the image it was not generated again,

    probably some issue with my actual build environment that I needs to fix, but it could be that

    the recovery image is in the full build system using mm or m commands from envsetup.sh.

    for example deleting the .img file from out directory then doing make command to recreate them could help,

    check next link,

    http://omapedia.org/wiki/4AI.1.7_OMAP4_Icecream_Sandwich_Release_Notes#Preparing_eMMC_images

  • Hi 

    I am pretty sure there is no such file in mydroid/bootable/recovery. Below is a list of files that I have:

    adb_install.cpp
    adb_install.h
    Android.mk
    applypatch
    bootloader.cpp
    bootloader.h
    CleanSpec.mk
    common.h
    default_device.cpp
    device.h
    edify
    etc
    .git
    install.cpp
    install.h
    make-overlay.py
    minadbd
    minelf
    minui
    minzip
    mtdutils
    NOTICE
    recovery.cpp
    res
    roots.cpp
    roots.h
    screen_ui.cpp
    screen_ui.h
    testdata
    tools
    ui.cpp
    ui.h
    updater
    verifier.cpp
    verifier.h
    verifier_test.cpp
    verifier_test.sh

    About the build: I have done some tests and I think here is my instructions:

    Build Recovery Mode Source Code:

    cd $MYDROID

    source build/envsetup.sh

    lunch full_blaze-userdebug

    make recovery

    Customise Recovery Mode:

    1. Remove 'recovery' directory in mydroid/out/target/product/blaze/ and recovery.img

    2. 

    cd $MYDROID

    source build/envsetup.sh

    lunch full_blaze-userdebug

    make

    3. Rebuild all *.image

    cd $MYDROID
    source build/envsetup.sh

    lunch full_blaze-userdebug

    find out/target/product/$BOARD_TYPE -name *.img -exec rm -f {} \

    make

    4. Then copy all these img files to 'omap4_emmc_files_blaze' directory.

    5. Rebuilt boot.img using mkbootimg script & re-create cache partition in 'omap4_emmc_files_blaze' directory.

    I have managed to change the icon_error.png background images but I still can not customise those items to be selected in Recovery Mode. It seems to me that it ignore my Android.mk file. I use Blaze_Tablet's recovery_ui.cpp for this learning. If it is successfully using the recovery_ui.cpp that I was pointed to, it should show the following: (recovery_ui.cpp)

    const char* ITEMS[] = { "reboot system now",
    "apply update from ADB",
    "apply update from USB drive",
    "wipe data/factory reset",
    "wipe cache partition",
    NULL };

    but instead it show the default: (default_device.cpp in mydroid/bootable/recovery/)

    static const char* ITEMS[] = {"reboot system now",
    "apply update from ADB",
    "wipe data/factory reset",
    "wipe cache partition",
    NULL };

    Now, here is my Android.mk contents:

    ifeq ($(TARGET_DEVICE),blaze)

    LOCAL_PATH := $(call my-dir)
    include $(CLEAR_VARS)

    LOCAL_MODULE_TAGS := eng
    LOCAL_C_INCLUDES += bootable/recovery
    LOCAL_SRC_FILES := recovery_ui.cpp

    # should match TARGET_RECOVERY_UI_LIB set in BoardConfig.mk
    LOCAL_MODULE := librecovery_ui_blaze

    include $(BUILD_STATIC_LIBRARY)

    include $(CLEAR_VARS)

    # Edify extension functions for doing bootloader updates on Tuna devices.

    LOCAL_MODULE_TAGS := optional
    LOCAL_C_INCLUDES += bootable/recovery system/vold
    LOCAL_SRC_FILES := recovery_updater.c bootloader.c

    # should match TARGET_RECOVERY_UPDATER_LIBS set in BoardConfig.mk
    LOCAL_MODULE := librecovery_updater_blaze

    include $(BUILD_STATIC_LIBRARY)

    endif

  • Right, sorry, I was looking in ICS release and didn't check this post was for JB.

    Let me check this information again.

  • Yong;

    After comparing the code between JB and ICS you are right major changes are to use C++ instead of C for interface. Some other changes are the addition of SELINUX in code, minADB library that includes changes for USB configuration in init.rc and fixes some for the programming language changes.

    The file that is referred default_recovery_ui.c is now called default_device.cpp, you can check it in /mydroid/bootable/recovery/Android.mk.


    --- /4AI.1.4-P1/mydroid/bootable/recovery/Android.mk

    +++ /4AJ.1.1/mydroid/bootable/recovery/Android.mk

    @@ -42,20 +34,14 @@
     LOCAL_MODULE_TAGS := eng
     
     ifeq ($(TARGET_RECOVERY_UI_LIB),)
    -  LOCAL_SRC_FILES += default_recovery_ui.c
    +  LOCAL_SRC_FILES += default_device.cpp
     else
       LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB)
     endif

    I removed most of the changes just copied this one.

    This file matches the one in /4AJ.1.1/mydroid/device/ti/blaze_tablet/recovery/recovery_ui.cpp

    For the other file in this directory recovery_ui.c, this contains some more changes from the original default_recovery_ui.c that is used in ICS.

  • Hi Manuel,

    Thanks for your verification. At least I am not wrong but still I need to find a way to customise Blaze's Recovery Mode with more options in it.

    Just to remind you if you miss this info.

    In default, Blaze's Recovery Mode should be disabled but for unknown reason compiling Android did build the Recovery Mode image in mydroid/out/target/product/blaze/

    As you know, in mydroid/devices/ti/recovery there are only two files availble - disable_Android.mk & recovery_ui.c. With this 'disable_Android' file name, it should be disabled the Recovery Mode but it didn't and it looks like somewhere is overwriting it.

    Can you please kindly check for me?

    Another interesting test I have done was, I renamed the 'disable_Android' to Android.mk and added a directory, res/image/ contain my own .png files with the same name as those images in mydroid/bootable/recovery/res/image/. After compiling the code, in mydroid/out/target/product/blaze/recovery/boot/res/image did find the same images file that I have placed in my blaze directory. The Recovery Mode for Blaze looks like part of the Android compilation.

    So the question is, why Android Recovery Mode is not disable or will it be somewhere in the source code is always set to use default setting when compiling Recovery Mode for Blaze?

    I am basically stuck here and can you give me some helps? It is very urgent !

  • Ok, I am checking this tomorrow, but I can comment that in recovery directory inside Android.mk there is this line;

    /4AJ.1.1/mydroid/bootable/recovery/Android.mk

    # This binary is in the recovery ramdisk, which is otherwise a copy of root.
    # It gets copied there in config/Makefile.  LOCAL_MODULE_TAGS suppresses
    # a (redundant) copy of the binary in /system/bin for user builds.
    # TODO: Build the ramdisk image in a more principled way.

    LOCAL_MODULE_TAGS := eng

    it affect in some way that AFS is compiled, can you share the instructions you use to compile and lunch command just to get some information?

  • Hi Manuel,

    Thanks for coming back to me. 

    I have downloaded 4AI.1.4-P1 source code and I have make it running on my Blaze device. I did runs it's recovery mode but it doesn't seems to be working correctly. It did boot into Recovery Mode partition and but for unknown reason it restart with Blank screen. 

    Referring into its source code, it seems to have it enable in mydroid/device/ti/blaze/recovery/Android.mk. Funny thing here is it seems to have it enable in ICS and disable in JB but the outcome is reversed. 

    So this make me believe somewhere is overwriting the Recovery Mode Build.

  • Hi Manuel,

    Sure I am very happy to share my instructions how I compile it and the lunch command:

    1. No modification has been done on Android.mk in mydroid/device/ti/blaze/recovery/

    2. Build entire Android without make clean:

    cd $MYDROID
    source build/envsetup.sh

    lunch full_blaze-userdebug

    CORES=`cat /proc/cpuinfo | grep processor | wc -l`
    (time make -j${CORES} ) 2>&1 | tee ${LOG}/android_make.out

    3. Rebuild all images in mydroid/out/target/product/blaze/

    cd $MYDROID
    source build/envsetup.sh

    lunch full_blaze-userdebug

    find out/target/product/$BOARD_TYPE -name *.img -exec rm -f {} \;

    make

    4. Copy all *.img file into omap4_emmc_files_blaze
    cp -f ${MYDROID}/out/target/product/${BOARD_TYPE}/*.img ${YOUR_PATH}/omap4_emmc_files_${BOARD_TYPE}

    5. Rebuild Boot images

    cd ${YOUR_PATH}/omap4_emmc_files_${BOARD_TYPE}
    ./mkbootimg --kernel zImage --ramdisk ramdisk.img --base 0x80000000 --board omap4 -o boot.img 

    # Create Cache patition
    cd ${YOUR_PATH}/omap4_emmc_files_${BOARD_TYPE}
    dd if=/dev/zero of=./cache.img bs=1048510 count=128
    mkfs.ext4 -F cache.img -L cache

    6. Flash all partition over again

    cd ${YOUR_PATH}/omap4_emmc_files_${BOARD_TYPE}
    cp ${MYDROID}/device/ti/${BOARD_TYPE}/boot/fastboot.sh .

    sed -i 's/${FASTBOOT-".\/..\/..\/..\/..\/out\/host\/linux-x86\/bin\/fastboot"}/.\/fastboot/g' fastboot.sh
    sed -i 's/${PRODUCT_OUT-".\/"}/.\//g' fastboot.sh

    echo -e "\nRunning fastboot script!\n"
    sudo ./fastboot.sh

    I hope this is what you wanted.

  • Thanks for sharing this information it is helpful to understand what lunch command you use.

    I am still doing some investigations about adding

    TARGET_NO_RECOVERY := true

    But I haven't finished yet.

    There are next 2 patches for recovery implementation, they must help you,

    for Panda, preliminary patch

    http://review.omapzoom.org/#/c/30228/

    for blaze_tablet, check comments in patch.

    http://review.omapzoom.org/#/c/24693/

    Focus in your question about turning recovery off, from

    /4AJ.1.1/mydroid/build/core/Makefile

    there is next keys to compile it

    **************************************************************************************
    # -----------------------------------------------------------------
    # Recovery image

    # If neither TARGET_NO_KERNEL nor TARGET_NO_RECOVERY are true
    ifeq (,$(filter true, $(TARGET_NO_KERNEL) $(TARGET_NO_RECOVERY) $(BUILD_TINY_ANDROID)))
    **************************************************************************************

    in regular targets it seems that recovery image is always generated for the cases that don't fall in these keys.

    Only for the cases when it is an emulated image that is going to be generated this recovery image is not going to be generated, for example the ones for Android SDK.

    I am still investigating, but I think that with the information that got from TI Representative and the patch for adding recovery must be enough to get it working, unless there is the factor that JB releases are tested using Blaze Tablet not Blaze, check the note in the release notes. And the fact that you saw a Blank screen when entering recovery in Blaze it could be that it is the default configuration that is being used.

  • Hi Manuel,

    Many thanks on your great effort! It is fantastic! I can wait for your investigation and I believe everything we are working over here is worth it!

    At the meantime, I will also investigate the following tasks and I will need your help too!

    1. How to enable it in ICS source code

    2. How can I customise Recovery Mode in JB (at least implement Blaze Tablet Recovery Mode into the Blaze device).

    I really hope to get the Recovery Mode working in both ICS and JB OS. Currently, we are working in ICS source code but I am not sure when they will move to JB. Therefore I need at least one is working.

    If you have found anything please keep me posted! and I will dig more into it too.

  • Yong;

    The results from adding next line to next file is that recovery image is not generated in out directory.

    /mydroid/device/ti/blaze/BoardConfig.mk

    TARGET_NO_RECOVERY := true

    it is the same configuration that the one used in

    /4AJ.1.1/mydroid/device/ti/panda/BoardConfig.mk

    that is the answer to your question about not getting the recovery image compiled.

    It must be the same for ICS but like you mentioned, by doing a "gitk --all" in /mydroid/device/ti/blaze directory, and searching for recovery modifying it to be IgnCase at right side of the search box, then next at left side of it, you can find like 8 different patches for Blaze and recovery.

    1 of them is:

    http://review.omapzoom.org/#/c/17018/

    If one or more posts helped you with your issue, please verify them. If you have another question and this one is resolved, please open a a new post for it, thanks.

  • Hi Manuel,

    Thanks and I will need to spend sometimes to investigate it. So at the moment I will not assign any reply as the Answer.

    Another questions regarding to your find:

    1. If I changed TARGET_NO_RECOVERY := false then will I get my recovery.img & ramdisk-recovery.img re-compile even they are existed or should I remove them first? I can get them build only I have to remove them with TARGET_NO_RECOVERY remain 'true'.

    I think my main question in this post is: How to customise the functions of the Recovery Mode. So far, I have managed to customise the Background Image by adding res/image in mydroid/device/ti/blaze/

  • About #1,

    I tried it using by doing "make clobber" that erases all out directory then modify boardconfig.mk and compiling again, thinking it in order to run with a clean configuration files.

    For the question, then you are looking to add new features to the UI or a new element menu? that must be possible to be in this file, at the beginning of the file they describe base process.

    /mydroid/bootable/recovery/recovery.cpp

    for what I have read in the source code it is a defined process to follow for provided options.

  • Hi Manuel,

    Thanks. 

    Do you have a Blaze Tablet with JB 4.1.1 loaded? If you do, can you help me to check is Blaze Tablet recovery mode menu is displaying the right menu which it claim to be customised in /mydroid/device/ti/blaze_tablet/recovery?

    Reason of asking is, I try to port whatever customisation done on the recovery mode of the blaze_table, but I have no luck! It make me suspicious on somewhere in the source code have overriding all the customisation.  

    Would you mind to help me to test on this? Thanks

  • Can you please specify the steps to try? and comment on what are you seeing? is it a is it a Android Robot with a red exclamation sign?

    and there is this command "adb reboot recovery" to reboot in recovery.

  • Hi Manuel,

    The only info I can give you at the moment is:

    You should be able to see the following options in Recovery Menu for Blaze_Table- (recovery_ui.cpp)

    "reboot system now"
    "apply update from ADB"
    "apply update from USB drive"
    "wipe data/factory reset"
    "wipe cache partition"

    In default it should be- (default_device.cpp)

    "reboot system now"
    "apply update from ADB"
    "wipe data/factory reset"
    "wipe cache partition"

    And this is what I see on Blaze device.

    About the Background image, I did managed to modify it to my own background image. So I am pretty sure it works. How I did that? I simply create a directory res/images/ in mydroid/device/ti/blaze/recovery/. 

  • Hi Manuel,

    Do you have any updates on your finding?

    Yong

  • Yong;

    Yes, I got the recovery menu in Blaze device. I used these 2 sources.

    This link

    http://omapedia.org/wiki/Android_Recovery

    This link contains one patch with instructions that shows the menu in the screen, plus other important changes.

    and the information from the document about recovery that you got by contacting TI representative.

    I mean I followed it to be sure those changes where present.

    Can you try it and comment?

    There is an extra change that must be only for command acceptance.

    --- a/recovery/recovery_ui.c
    +++ b/recovery/recovery_ui.c
    @@ -99,6 +99,7 @@ int device_handle_key(int key_code, int visible) {
     
                 case KEY_ENTER:
                 case KEY_POWER:   // crespo power
    +            case KEY_OK:
                     return SELECT_ITEM;
             }
         }

  • Hi Manuel,

    I think you have reply on my very old post. My latest post was on 9th Nov. 

    I have no problem in getting into Blaze device but I have problem in customising the Recovery Mode menu something look like the Recovery Mode menu in Blaze Tablet. Can you please refer to my 9th Nov past? 

    Thank you

  • I see what you mean, if you replaced .c by .cpp files in device-recovery directory, that must be fixed by changing ITEMS to MENU_ITEMS in

    /mydroid/device/ti/blaze_tablet/recovery/recovery_ui.cpp

        const char* const* GetMenuHeaders() { return HEADERS; }
        const char* const* GetMenuItems() { return ITEMS; }

    and seems those must match with the elements in previous code. This menu is defined in the class or object base in ":: public Device" and the assignment is made in this point too.

    The original code is declared in MENU_ITEMS in .c code but it is not included, in the same way as in .cpp, in default_device.cppit shows how it is assigned, and there are other points where they makes reference to these values, recovery_ui.h and in recovery_ui.cpp for what I have found.

    It is not possible to identify the exact change since I don't know what changes have you made.

    Getting backwards from

    /mydroid/bootable/recovery/default_device.cpp

    it is defined in

    /mydroid/bootable/recovery/Android.mk

    ifeq ($(TARGET_RECOVERY_UI_LIB),)
      LOCAL_SRC_FILES += default_device.cpp
    else
      LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB)
    endif

    and then traced back 2 to points; one that is defined in Blaze Tablet and that must be added for Blaze.

    /mydroid/device/ti/blaze_tablet/BoardConfig.mk

    # Recovery
    TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888"
    TARGET_RECOVERY_UI_LIB := librecovery_ui_blaze_tablet
    # device-specific extensions to the updater binary
    TARGET_RELEASETOOLS_EXTENSIONS := device/ti/blaze_tablet

    this is mentioned in the patches for Panda and Tablet that we shared last week.

    http://review.omapzoom.org/#/c/30228/

    http://review.omapzoom.org/#/c/24693/

    then this TARGET_RECOVERY_UI_LIB gets its reference or compiled from

    /mydroid/device/ti/blaze_tablet/recovery/Android.mk

    # should match TARGET_RECOVERY_UI_LIB set in BoardConfig.mk
    LOCAL_MODULE := librecovery_ui_blaze_tablet

    that must be copied the same for Blaze if not then default configuration is going to be used.

    Check that if you add or remove elements it matches with the index where the array information is accessed, if the index doesn't exist it could lead to segfaults or incorrect selection.

    Is this answering your question? if it does, can be verified the post that helped you?

    and if there is a new questions they need to be in a new post. Thanks.