Skip to content

TWRP not working correctly #43

@lurepheonix

Description

@lurepheonix

If we dont tick off the marker "Wipe cache" in the app before rebooting to recovery, our TWRPS don`t install zips.
However, with commands rewritten for Open Recovery Script it works.
This was changed in ListFilesActivity.java:
os.writeBytes("rm -f /cache/recovery/command\n");

.............................

                            } else {
                                if (selectedOpts[0]) {
                                    os.writeBytes("echo '--wipe_data' >> /cache/recovery/command\n");
                                }
                                if (selectedOpts[1]) {
                                    os.writeBytes("echo '--wipe_cache' >> /cache/recovery/command\n");
                                }

                                os.writeBytes("echo '--update_package=/" + Utils.getRcvrySdPath() + "/OTA-Updater/download/" + name + "' >> /cache/recovery/command\n");
                            }

To this:
os.writeBytes("rm -f /cache/recovery/openrecoveryscript\n");

.........

                            } else {
                                if (selectedOpts[0]) {
                                    os.writeBytes("echo 'wipe data' >> /cache/recovery/openrecoveryscript\n");
                                }

                                os.writeBytes("echo 'install /" + Utils.getRcvrySdPath() + "/OTA-Updater/download/" + name + "' >> /cache/recovery/openrecoveryscript\n");

                                if (selectedOpts[1]) {
                                    os.writeBytes("echo 'wipe cache' >> /cache/recovery/openrecoveryscript\n");
                                    os.writeBytes("echo 'wipe dalvik' >> /cache/recovery/openrecoveryscript\n");
                                }

I also added "wipe dalvik" option.
The reason must be somewhere inside the TWRP recovery, since CWM works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions