Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,780,441 Members 43,535 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] Build TWRP recovery

Tip us?
 
buffo1987
Old
(Last edited by buffo1987; 12th April 2013 at 02:12 PM.)
#1  
buffo1987's Avatar
Senior Member - OP
Thanks Meter 415
Posts: 218
Join Date: Jun 2012
Post [GUIDE] Build TWRP recovery

How to build TWRP Recovery
  1. You should be able to build CWM Recovery
    [GUIDE] 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/show....php?t=1943625

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

credits
Dees_Troy
TeamWin
The Following 14 Users Say Thank You to buffo1987 For This Useful Post: [ Click to Expand ]
 
buffo1987
Old
#2  
buffo1987's Avatar
Senior Member - OP
Thanks Meter 415
Posts: 218
Join Date: Jun 2012
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
The Following 2 Users Say Thank You to buffo1987 For This Useful Post: [ Click to Expand ]
 
alireza7991
Old
#3  
alireza7991's Avatar
Senior Member
Thanks Meter 2,260
Posts: 760
Join Date: Sep 2012
Location: Shahrekord

 
DONATE TO ME
Default Re: [GUIDE] Build TWRP recovery

Good Tutor !

At least for me

Thanks for your effort

Regards
AliReza
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.

Brian Kernighan
 
Ganesh A
Old
#4  
Ganesh A's Avatar
Recognized Contributor
Thanks Meter 762
Posts: 914
Join Date: May 2012
Location: Chennai
Default Re: [GUIDE] Build TWRP recovery

Great guide...
thnks a lot...

Sent from my GT-S5360 using Tapatalk 2
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes