I’ve made another build of TWRP v3.0.0-0 for the Fairphone 2.
This port is based on this code : https://github.com/TeamWin/Team-Win-Recovery-Project
The changelog between v2 is here : https://twrp.me/site/update/2016/02/05/twrp-3.0.0-0-released.html
With the help of @Max_S, I’ve made a fully fonctionnal build with no SELinux errors and all the partitions includes in the .fstab.
For info, here is the fstab I’ve use in regard of the Fairphone 2 hardware :
/boot emmc /dev/block/platform/msm_sdcc.1/by-name/boot /system ext4 /dev/block/platform/msm_sdcc.1/by-name/system /cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache /data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata length=-16384 /sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="Micro SDcard";storage;wipeingui;removable /recovery emmc /dev/block/platform/msm_sdcc.1/by-name/recovery /persist ext4 /dev/block/platform/msm_sdcc.1/by-name/persist flags=display="Persist" /firmware vfat /dev/block/platform/msm_sdcc.1/by-name/modem flags=display="Firmware"
In order to work, the file must be in /device/fairphone_devices/FP2 and replace the original
For removing SELinux errors, I’ve need to add lots of lines in the
/external/sepolicy/recovery.te and some in
Be aware, in order to remove all SELinux errors, I’ve add the line
allow recovery kernel:security setenforce; in recovery.te witch mean that recovery can disable SELinux enforcement
If you don’t trust TWRP Team don’t use this build !
I can make, if someone want, a version without this permission but with some SELinux errors.
For the installation, it’s the same process that Max-S’s build.
The image is bigger because I doesn’t reconfigure the kernel but there’s no problem for flashing it.
Here is the recovery image to flash. md5sum :
This is the ramdisk for testing with an emulator. md5sum :
This and this are the
recovery.te I’ve need to modify.
This is the original recovery in case of problems or if you want to go back. md5sum :
What I’ve testing and work with my phone :
- Install ZIPs
- Wipe partitions
- Mount partitions
- Backup partitions
- Restore backup
- Terminal Emulation
- File Manager
- ADB Sideload
- ADB Shell
- Language translation
For information, TWRP can’t access to encrypted data partition.
Please not that I provide this build “as is” WITHOUT any warranties about damages it can produice on your device.
Note that’s possible to root your phone if you install SuperSU.zip from TWRP on a stock firmware.
If you want more informations, don’t hesitate to ask me and good flash !