Giter Club home page Giter Club logo

twrp's Introduction

Rockchip TWRP Compilation Guidelines

Overview

Team Win Recovery Project (TWRP) is an open-source software custom recovery image for Android-based devices. It provides a touchscreen-enabled interface with partial material design that allows users to install third-party firmware and back up the current system which are functions often unsupported by stock recovery images. It is, therefore, often installed when flashing, installing or rooting Android devices, although it isn't dependent on a device being rooted to be installed.

Compilation Step

  1. Please get the Rockchip Android SDK and setup the build environment. Reference: https://source.android.com/setup/build/initializing

  2. Back up the default recovery, the directory path is bootable/recovery, so that you can restore the recovery at any time to provide the full SDK.

  3. Delete the default original recovery

    rm -rf bootable/recovery

  4. Clone a TWRP source from Rockchip.

    git clone https://github.com/rockchip-software/TWRP.git bootable/recovery

  5. source build/envsetup.sh Loading the Android development environment.

  6. lunch

    Select Android compile mode, generally choose rk****-userdebug mode.

  7. modify device/rockchip/common/device.mk

    BOARD_TWRP_ENABLE := true

  8. make clean

    Clearing the previously compiled content, because the files in the out directory that have been generated conflict with TWRP, will cause TWRP compilation to fail.

  9. make recoveryimage -j($ JOB)

    Compile the recoveryimage image, $JOB is the maximum thread +1 of the current compilation environment, which can be selected by the customer.

  10. The compilation is successful, and recovery.img is generated. The file is located at out/target/product/rkxxxx/.

Note: The original recovery of the backup must be retained. This TWRP cannot be fully compiled with the SDK. Currently, it can only be compiled separately. Compiling the complete update.img or ota package cannot use TWRP as the recovery. Currently, this TWRP is only provided as a separate image. It is not responsible for the consequences of deleting the original recovery.

In device/rockchip/common/device.mk, the variable BOARD_TWRP_ENABLE is the switch that controls whether to add the TWRP option. If you do not compile TWRP, please turn off this option.

Variable Description

  • TW_THEME
    This variable can be selected as landscape_hdpi landscape_mdpi portrait_hdpi portrait_mdpi, which is the high and low resolution of the horizontal and vertical screen.

  • TW_EXTRA_LANGUAGES
    This variable is whether to compile the remaining language packs, including Chinese, Japanese, Korean, etc. If set to false, you cannot select Chinese ,Japanese or Korean.

  • TW_DEFAULT_LANGUAGE
    This variable is set to the default language and can be selected as en zh_CN. The language pack is located at /gui/theme/common/languages/ and the accompanying language pack is located at /gui/theme/extra-languages/languages/.

  • DEVICE_RESOLUTION
    This variable is the resolution of the setup device.

  • TW_NO_BATT_PERCENT
    No battery equipment.

  • TARGET_RECOVERY_FORCE_PIXEL_FORMAT
    This variable can be selected more. Currently, Rockchip only supports RGB_565.

  • TW_HAS_MTP
    This variable depends on whether the device is an MTP setting and needs to modify part of the init in TWRP.

  • TW_IGNORE_MISC_WIPE_DATA
    This variable is an instruction to ignore the clear data partition passed from the bootloader. The misc partition here stores the instructions that the bootloader passes to the boot image (boot or recovery) to control the behavior they start.

  • TWRP_EVENT_LOGGING
    The variable is whether to print event information such as mouse, keyboard, etc.

FAQ

  • Unable to load internal storage

    If your project has data partition encryption enabled, and TWRP does not recognize the encrypted internal storage, it needs to be formatted after the internal storage is recognized. Use the Clear-Advanced Clear or Format Data Partition to format the operation.

  • Unable to mount storage

    The same is because your project has opened the data partition encryption, you need to format the storage before you can identify the partition.

twrp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

twrp's Issues

Which platform manifest should be used?

Hello, I'm trying to compile twrp for rk3328 and android 9. and i don't know what platform manifast should I use. I tried 'github.com/minimal-manifest-twrp/platform_manifest_twrp_omni' but I get errors about some components are missing like hardware/realtek not found and somethings like that. I need to be clone by git clone before compile but i think the appropriate manifest may solve them.
Also I did not know how can solve last error which I got:
'''
including device/rockchip/rk3328/vendorsetup.sh
2022-01-08T11:29:19.7102081Z Traceback (most recent call last):
2022-01-08T11:29:19.7103854Z Your device can't be found in device sources..
2022-01-08T11:29:19.7106058Z File "build/tools/roomservice.py", line 297, in
2022-01-08T11:29:19.7107222Z fetch_dependencies(device)
2022-01-08T11:29:19.7108513Z File "build/tools/roomservice.py", line 248, in fetch_dependencies
2022-01-08T11:29:19.7109938Z raise Exception("ERROR: could not find your device "
2022-01-08T11:29:19.7111275Z Exception: ERROR: could not find your device folder location, bailing out
'''

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.