[GUIDE] Build TWRP recovery

buffo1987

Senior Member
Jun 30, 2012
219
423
0
How to build TWRP Recovery

  1. You should be able to build CWM Recovery
  2. Download TWRP as ZIP from github
  3. Replace ~/android/cm9/bootable/recovery with TWRP
  4. Modify ~/android/cm9/device/samsung/ariesve/config/init.recovery.rc
    Code:
    on init
         export LD_LIBRARY_PATH .:/sbin // add this line
  5. Modify ~/android/cm9/device/samsung/ariesveBoardConfig.mk
    add to the end of file next to recovery stuff :
    Code:
    #TWRP
    TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
    DEVICE_RESOLUTION := 480x800
    TW_INTERNAL_STORAGE_PATH := "/sdcard"
    TW_INTERNAL_STORAGE_MOUNT_POINT := "sdcard"
    TW_EXTERNAL_STORAGE_PATH := "/external_sd"
    TW_EXTERNAL_STORAGE_MOUNT_POINT := "external_sd"
    TW_DEFAULT_EXTERNAL_STORAGE := true
    TW_FLASH_FROM_STORAGE := true	  	
    TW_HAS_DOWNLOAD_MODE := true
    TW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID := true
    TW_MAX_BRIGHTNESS := 255
    TW_BRIGHTNESS_PATH := /sys/devices/platform/msm_fb.196609/leds/lcd-backlight/brightness
    # End TWRP
    More flags for twrp can be found on the original thread by Dees_Troy http://forum.xda-developers.com/showthread.php?t=1943625

  6. Prepare device specific code
    Code:
    $ cd ~/android/[COLOR="Red"]cm9[/COLOR]/
    $ . build/envsetup.sh
    $ lunch //choose -> cm_ariesve-userdebug
  7. Compile recovery
    Code:
    make clobber && make -j[COLOR="Red"]#[/COLOR] recoveryimage  //[COLOR="Red"]#[/COLOR] CPU-Cores+1

credits
Dees_Troy
TeamWin
 
Last edited:

buffo1987

Senior Member
Jun 30, 2012
219
423
0
collected informations

Get latest kernel message after crash /proc/last_kmsg

[15:33] <+helicopter88> buffo1987, TARGET_PREBUILT_RECOVERY_KERNEL := specifies a kernel to be used during the building of recovery
[15:33] <@Dees_Troy> basically if you want recovery to be built with a different kernel than the boot image then you would use that ^
[15:34] <buffo1987> What could be the benefit?
[15:34] <buffo1987> stability?
[15:34] <@Dees_Troy> maybe
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone