[Blade General] xdarthanonx:
TWRP 3.0.2-0

​

SCREENSHOTS

​

PORTING RECOVERY

Unpack stock recovery.img with Carliv Image Kitchen for Android

Unpack and copy files from twrp_zte_a410.img (overwrite):

recovery.img-cmdline
ramdisk\init
ramdisk\sepolicy
ramdisk\fstab.goldfish
ramdisk\init.rc
ramdisk\init.recovery.usb.rc
ramdisk\ueventd.goldfish.rc
ramdisk\ueventd.mt6735.rc
ramdisk\etc\*
ramdisk\license\*
ramdisk\res\*
ramdisk\sbin\*
ramdisk\supersu\*
ramdisk\twres\*

The ZTE Blade A410 is a good choice to port from, since it has the same chipset (MediaTek MT6735M), the same OS (Android 5.1) and is from the same manufacturer.

Unpack and copy files from twrp-3.0.2-0-dende.img (overwrite):

ramdisk\supersu\install-supersu.sh
ramdisk\twres\* [COLOR="Green"]<resolution width="480" height="800"/>[/COLOR]

Modify recovery.fstab, default.prop, init.rc and init.recovery.usb.rc (see KEY FILES below for details)

Repack recovery image with Carliv Image Kitchen

KEY FILES

recovery.fstab

[COLOR="Green"]# mount point fstype device [device2] [length=] [flags][/COLOR]
[COLOR="Green"]# Modified by xdarthanonx 12-04-2018[/COLOR]
[COLOR="Green"]# <https://goo.gl/oR5fsX> ZTE Blade A110[/COLOR]
[COLOR="Green"]# <https://goo.gl/Zs8LW5> How to compile TWRP[/COLOR]

/boot emmc /dev/block/platform/mtk-msdc.0/by-name/boot flags=backup=1;display="Boot"
/cache ext4 /dev/block/platform/mtk-msdc.0/by-name/cache flags=backup=0;wipeingui;wipeduringfactoryreset;display="Cache"
/data ext4 /dev/block/platform/mtk-msdc.0/by-name/userdata flags=backup=1;wipeingui;wipeduringfactoryreset;display="Data";length=-16384
/nvdata ext4 /dev/block/platform/mtk-msdc.0/by-name/nvdata flags=backup=1;display="NVData"
/protect_f ext4 /dev/block/platform/mtk-msdc.0/by-name/protect1 flags=backup=1;display="Protect_f"
/protect_s ext4 /dev/block/platform/mtk-msdc.0/by-name/protect2 flags=backup=1;display="Protect_s"
/recovery emmc /dev/block/platform/mtk-msdc.0/by-name/recovery flags=backup=1;display="Recovery"
/system ext4 /dev/block/platform/mtk-msdc.0/by-name/system flags=backup=1;display="System"

[COLOR="Green"]# Removable storage[/COLOR]
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=backup=0;wipeingui;removable;storage;display="Micro SDcard"
/sd-ext auto /dev/block/mmcblk1p2 flags=backup=1;wipeingui;removable;display="SD-Ext"
/usb-otg vfat /dev/block/sda1 /dev/block/sda flags=backup=0;wipeingui;removable;storage;display="USB-OTG"

FURTHER READING: How to compile TWRP touch recovery

default.prop

[COLOR="Green"]#[/COLOR]
[COLOR="Green"]# ADDITIONAL_DEFAULT_PROPERTIES[/COLOR]
[COLOR="Green"]#[/COLOR]
[COLOR="Green"]# Modified by xdarthanonx 02-02-2017[/COLOR]
[COLOR="Green"]# https://goo.gl/oR5fsX[/COLOR]

[COLOR="Green"]# Run adbd as root[/COLOR]
[COLOR="Purple"][I]ro.secure=0[/I][/COLOR]
[COLOR="Purple"][I]ro.debuggable=1[/I][/COLOR]

[COLOR="Purple"][I]ro.adb.secure=0[/I][/COLOR]
[COLOR="Purple"][I]persist.sys.usb.config=mtp,adb[/I][/COLOR]
persist.service.acm.enable=0
[COLOR="Purple"][I]ro.oem_unlock_supported=1[/I][/COLOR]
[COLOR="Purple"][I]ro.allow.mock.location=1[/I][/COLOR]
ro.zygote=zygote64_32
ro.mount.fs=EXT4
camera.disable_zsl_mode=1
dalvik.vm.dex2oat-Xms=64m
dalvik.vm.dex2oat-Xmx=512m
dalvik.vm.image-dex2oat-Xms=64m
dalvik.vm.image-dex2oat-Xmx=64m
ro.dalvik.vm.native.bridge=0

[COLOR="Green"]# begin build properties[/COLOR]
[COLOR="Green"]# autogenerated by buildinfo.sh[/COLOR]
ro.build.id=LMY47D
ro.build.display.id=BLADE_A110_M01
ro.build.version.incremental=1461832295
ro.build.version.sdk=22
ro.build.version.codename=REL
ro.build.version.all_codenames=REL
ro.build.version.release=5.1
ro.build.version.security_patch=2016-01-06
[COLOR="Purple"][I]ro.build.version.base_os=ZTE/P635A60_AU_OPT/ZTE_BLADE_A110:5.1/LMY47D/20160428.163242:user/test-keys[/I][/COLOR]
ro.build.inner.version=OPS_AU_S_P635A60V1.0.0B11
[COLOR="Purple"][I]ro.build.date=Thu Apr 28 16:33:28 CST 2016[/I][/COLOR]
ro.build.date.utc=1461832408
[COLOR="Purple"][I]ro.build.type=userdebug[/I][/COLOR]
ro.build.user=diganyun
ro.build.host=build4-ThinkCentre-M4500k-N000
[COLOR="Purple"][I]ro.build.tags=test-keys[/I][/COLOR]
[COLOR="Purple"][I]ro.build.flavor=full_ztehz6735m_65u_l-userdebug[/I][/COLOR]
ro.product.model=ZTE BLADE A110
ro.product.brand=ZTE
ro.product.name=P635A60_AU_OPT
ro.product.device=ZTE_BLADE_A110
ro.product.manufacturer=ZTE
ro.product.version.base_os=Android5.1
ro.product.board=
[COLOR="Purple"][I]#drm.forwardlock.only=true[/I][/COLOR]
[COLOR="Green"]# ro.product.cpu.abi and ro.product.cpu.abi2 are obsolete,[/COLOR]
[COLOR="Green"]# use ro.product.cpu.abilist instead.[/COLOR]
ro.product.cpu.abi=arm64-v8a
ro.product.cpu.abilist=arm64-v8a,armeabi-v7a,armeabi
ro.product.cpu.abilist32=armeabi-v7a,armeabi
ro.product.cpu.abilist64=arm64-v8a
ro.product.manufacturer=alps
ro.product.locale.language=en
ro.product.locale.region=AU
ro.wifi.channels=
ro.board.platform=mt6735m
[COLOR="Green"]# ro.build.product is obsolete; use ro.product.device[/COLOR]
ro.build.product=ztehz6735m_65u_l
[COLOR="Green"]# Do not try to parse description, fingerprint, or thumbprint[/COLOR]
[COLOR="Purple"][I]ro.build.description=full_ztehz6735m_65u_l-user 5.1 LMY47D 1461832295 test-keys[/I][/COLOR]
[COLOR="Purple"][I]ro.build.fingerprint=ZTE/P635A60_AU_OPT/ZTE_BLADE_A110:5.1/LMY47D/20160428.163242:user/test-keys[/I][/COLOR]
ro.build.characteristics=default
[COLOR="Green"]# end build properties[/COLOR]
[COLOR="Green"]#[/COLOR]
[COLOR="Green"]# from device/ztehz/ztehz6735m_65u_l/system.prop[/COLOR]
[COLOR="Green"]#[/COLOR]
[COLOR="Green"]#[/COLOR]
[COLOR="Green"]# system.prop for generic sdk[/COLOR]
[COLOR="Green"]#[/COLOR]

rild.libpath=mtk-ril.so
rild.libargs=-d /dev/ttyC0

[COLOR="Green"]# MTK, Infinity, 20090720 {[/COLOR]
wifi.interface=wlan0
[COLOR="Green"]# MTK, Infinity, 20090720 }[/COLOR]

[COLOR="Green"]# MTK, mtk03034, 20101210 {[/COLOR]
ro.mediatek.wlan.wsc=1
[COLOR="Green"]# MTK, mtk03034 20101210}[/COLOR]
[COLOR="Green"]# MTK, mtk03034, 20110318 {[/COLOR]
ro.mediatek.wlan.p2p=1
[COLOR="Green"]# MTK, mtk03034 20110318}[/COLOR]

[COLOR="Green"]# MTK, mtk03034, 20101213 {[/COLOR]
mediatek.wlan.ctia=0
[COLOR="Green"]# MTK, mtk03034 20101213}[/COLOR]

[COLOR="Green"]#[/COLOR]
wifi.tethering.interface=ap0
[COLOR="Green"]#[/COLOR]

ro.opengles.version=196608

wifi.direct.interface=p2p0
dalvik.vm.heapgrowthlimit=128m
dalvik.vm.heapsize=256m

[COLOR="Green"]# USB MTP WHQL[/COLOR]
ro.sys.usb.mtp.whql.enable=0

[COLOR="Green"]# Power off opt in IPO[/COLOR]
sys.ipo.pwrdncap=2

ro.sys.usb.storage.type=mtp,mass_storage

[COLOR="Green"]# USB BICR function[/COLOR]
ro.sys.usb.bicr=yes

[COLOR="Green"]# USB Charge only function[/COLOR]
ro.sys.usb.charging.only=yes

[COLOR="Green"]# audio[/COLOR]
ro.camera.sound.forced=0
ro.audio.silent=0

ro.zygote.preload.enable=0

[COLOR="Green"]# temporary enables NAV bar (soft keys)[/COLOR]
qemu.hw.mainkeys=1

ro.kernel.zio=38,108,105,16
[COLOR="Green"]#ro.kernel.qemu=1[/COLOR]
[COLOR="Green"]#ro.kernel.qemu.gles=0[/COLOR]
[COLOR="Green"]#ro.boot.selinux=disable[/COLOR]

[COLOR="Green"]# Disable dirty region for Mali[/COLOR]
debug.hwui.render_dirty_regions=false

ro.sf.lcd_density=240

[COLOR="Green"]# performance[/COLOR]
ro.mtk_perf_simple_start_win=1
ro.mtk_perf_response_time=1

[COLOR="Green"]#[/COLOR]
[COLOR="Green"]# ADDITIONAL_BUILD_PROPERTIES[/COLOR]
[COLOR="Green"]#[/COLOR]
[COLOR="Purple"][I]ro.com.android.dateformat=dd-MM-yyyy[/I][/COLOR]
ro.config.ringtone=Beauty.ogg
ro.config.notification_sound=Glow.ogg
ro.carrier=unknown
ro.config.alarm_alert=Alarm_Classic.ogg
dalvik.vm.heapgrowthlimit=128m
dalvik.vm.heapsize=256m
ro.mediatek.chip_ver=S01
ro.mediatek.version.release=ZTE_BLADE_A110
ro.mediatek.platform=MT6735
ro.telephony.sim.count=2
persist.radio.default.sim=0
persist.radio.multisim.config=ss
persist.md.perm.checked=to_upgrade
persist.gemini.sim_num=1
ro.gemini.smart_sim_switch=false
ril.specific.sm_cause=0
bgw.current3gband=0
ril.external.md=0
ro.btstack=blueangel
ro.sf.hwrotation=0
ril.current.share_modem=1
curlockscreen=1
ro.mediatek.gemini_support=false
persist.radio.fd.counter=15
persist.radio.fd.off.counter=5
persist.radio.fd.r8.counter=15
persist.radio.fd.off.r8.counter=5
drm.service.enabled=true
fmradio.driver.enable=1
ril.first.md=1
ril.flightmode.poweroffMD=1
ril.telephony.mode=0
dalvik.vm.mtk-stack-trace-file=/data/anr/mtk_traces.txt
mediatek.wlan.chip=CONSYS_MT6735
mediatek.wlan.module.postfix=_consys_mt6735
ril.radiooff.poweroffMD=0
ro.frp.pst=/dev/block/platform/mtk-msdc.0/by-name/frp
persist.sys.timezone=Australia/Sydney
ro.mediatek.version.branch=L1.MP3.EE.WFC.DEV
ro.mediatek.version.sdk=4
ro.mtk_audio_profiles=1
ro.mtk_audenh_support=1
ro.mtk_lossless_bt_audio=1
ro.mtk_besloudness_support=1
ro.mtk_bessurround_support=1
ro.mtk_bt_support=1
ro.mtk_wappush_support=1
ro.mtk_agps_app=1
ro.mtk_voice_ui_support=1
ro.mtk_voice_unlock_support=1
ro.mtk_voice_contact_support=1
ro.mtk_wlan_support=1
ro.mtk_ipo_support=1
ro.mtk_gps_support=1
ro.mtk_omacp_support=1
ro.mtk_search_db_support=1
ro.mtk_dialer_search_support=1
ro.mtk_dhcpv6c_wifi=1
ro.have_aacencode_feature=1
ro.mtk_fd_support=1
ro.mtk_oma_drm_support=1
ro.mtk_cta_drm_support=1
ro.mtk_widevine_drm_l3_support=1
ro.mtk_eap_sim_aka=1
ro.mtk_fm_recording_support=1
ro.mtk_audio_ape_support=1
ro.mtk_flv_playback_support=1
ro.mtk_send_rr_support=1
ro.mtk_emmc_support=1
ro.mtk_tetheringipv6_support=1
ro.mtk_phone_number_geo=1
ro.mtk_shared_sdcard=1
ro.mtk_enable_md1=1
ro.mtk_flight_mode_power_off_md=1
ro.mtk_pq_support=2
ro.mtk_miravision_support=1
ro.mtk_miravision_image_dc=1
ro.mtk_wifi_mcc_support=1
ro.mtk_sim_hot_swap=1
ro.mtk_thumbnail_play_support=1
ro.mtk_bip_scws=1
ro.mtk_world_phone=1
ro.mtk_world_phone_policy=0
ro.mtk_perfservice_support=1
ro.mtk_cta_set=1
ro.mtk_mobile_management=1
ro.mtk_antibricking_level=2
ro.mtk_cam_mfb_support=0
ro.mtk_lte_support=1
ro.mtk_cam_mav_support=1
ro.sim_refresh_reset_by_modem=1
ro.mtk_live_photo_support=1
ro.mtk_motion_track_support=1
ro.mtk_privacy_protection_lock=1
ro.mtk_bg_power_saving_support=1
ro.mtk_bg_power_saving_ui=1
ro.have_aee_feature=1
ro.sim_me_lock_mode=0
ro.mtk_ims_support=1
ro.mtk_voice_extension_support=1
wfd.dummy.enable=1
ro.mediatek.project.path=device/ztehz/ztehz6735m_65u_l
persist.mtk.wcn.combo.chipid=-1
service.wcn.driver.ready=no
ro.com.android.mobiledata=false
persist.radio.mobile.data=0,0
persist.meta.dumpdata=0
ro.mtk_md_sbp_custom_value=0x0
ro.setupwizard.mode=OPTIONAL
ro.com.google.gmsversion=5.1_r2
ro.com.google.clientidbase=android-zte
ro.com.google.clientidbase.ms=android-optus-au
ro.com.google.clientidbase.am=android-optus-au
ro.com.google.clientidbase.gmm=android-zte
ro.com.google.clientidbase.yt=android-zte
persist.sys.dalvik.vm.lib.2=libart.so
dalvik.vm.isa.arm64.features=default
dalvik.vm.isa.arm.features=default
net.bt.name=Android
dalvik.vm.stack-trace-file=/data/anr/traces.txt

init.rc

[COLOR="Green"]# Modified by xdarthanonx 16-04-2018[/COLOR]
[COLOR="Green"]# https://goo.gl/oR5fsX[/COLOR]

[COLOR="Purple"][I]import /init.recovery.logd.rc[/I][/COLOR]
[COLOR="Purple"][I]import /init.recovery.usb.rc[/I][/COLOR]
import /init.recovery.${ro.hardware}.rc

on early-init
[COLOR="Green"]# Apply strict SELinux checking of PROT_EXEC on mmap/mprotect calls.[/COLOR]
write /sys/fs/selinux/checkreqprot 0

[COLOR="Green"]# Set the security context for the init process.[/COLOR]
[COLOR="Green"]# This should occur before anything else (e.g. ueventd) is started.[/COLOR]
setcon u:r:init:s0

start ueventd
start healthd

[COLOR="Purple"][I]service set_permissive /sbin/permissive.sh[/I][/COLOR]
[COLOR="Purple"][I]oneshot[/I][/COLOR]
[COLOR="Purple"][I]seclabel u:r:recovery:s0[/I][/COLOR]

on init
export PATH /sbin:/system/bin
[COLOR="Purple"][I]export LD_LIBRARY_PATH .:/sbin[/I][/COLOR]
export ANDROID_ROOT /system
export ANDROID_DATA /data
export EXTERNAL_STORAGE /sdcard

symlink /system/etc /etc

[COLOR="Purple"][I]mkdir /boot[/I][/COLOR]
[COLOR="Purple"][I]mkdir /recovery[/I][/COLOR]
mkdir /sdcard
mkdir /system
mkdir /data
mkdir /cache
[COLOR="Purple"][I]#insmod /sec.ko[/I][/COLOR]
[COLOR="Purple"][I]#mknod /dev/sec c 182 0[/I][/COLOR]
[COLOR="Purple"][I]#chmod 0660 /dev/sec[/I][/COLOR]
mkdir /sideload
mount tmpfs tmpfs /tmp

chown root shell /tmp
chmod 0775 /tmp

write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/vm/max_map_count 1000000

on fs
[COLOR="Purple"][I]#write /proc/bootprof "start mobicore (on fs)"[/I][/COLOR]
[COLOR="Purple"][I]#chmod 0600 /dev/mobicore[/I][/COLOR]
[COLOR="Purple"][I]#chown system system /dev/mobicore[/I][/COLOR]
[COLOR="Purple"][I]#chmod 0666 /dev/mobicore-user[/I][/COLOR]
[COLOR="Purple"][I]#chown system system /dev/mobicore-user[/I][/COLOR]
[COLOR="Purple"][I]## MobiCore Daemon Paths[/I][/COLOR]
[COLOR="Purple"][I]#export MC_AUTH_TOKEN_PATH /efs[/I][/COLOR]
[COLOR="Purple"][I]#start mobicore[/I][/COLOR]
[COLOR="Purple"][I]#write /proc/bootprof "start mobicore end (on fs)"[/I][/COLOR]
[COLOR="Purple"][I]mount pstore pstore /sys/fs/pstore[/I][/COLOR]

mkdir /dev/usb-ffs 0770 shell shell
mkdir /dev/usb-ffs/adb 0770 shell shell
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000

[COLOR="Purple"][I]on post-fs[/I][/COLOR]
[COLOR="Purple"][I]# Explicitly define login script for BusyBox shell (necessary)[/I][/COLOR]
[COLOR="Purple"][I]# https://is.gd/tqbRdv[/I][/COLOR]
[COLOR="Purple"][I]# https://is.gd/IFkWfh[/I][/COLOR]
[COLOR="Purple"][I]# https://is.gd/fOHomp[/I][/COLOR]
[COLOR="Purple"][I]export ENV /etc/profile[/I][/COLOR]

on boot
ifup lo
hostname localhost
domainname localdomain

class_start default

[COLOR="Green"]# Load properties from /system/ + /factory after fs mount.[/COLOR]
on load_all_props_action
load_all_props

on firmware_mounts_complete
rm /dev/.booting

[COLOR="Green"]# Mount filesystems and start core system services.[/COLOR]
on late-init
trigger early-fs
trigger fs
trigger post-fs
trigger post-fs-data

[COLOR="Green"]# Load properties from /system/ + /factory after fs mount. Place[/COLOR]
[COLOR="Green"]# this in another action so that the load will be scheduled after the prior[/COLOR]
[COLOR="Green"]# issued fs triggers have completed.[/COLOR]
trigger load_all_props_action

[COLOR="Green"]# Remove a file to wake up anything waiting for firmware[/COLOR]
trigger firmware_mounts_complete

trigger early-boot
trigger boot

on property:sys.powerctl=*
powerctl ${sys.powerctl}

service ueventd /sbin/ueventd
critical
seclabel u:r:ueventd:s0

service healthd /sbin/healthd -r
critical
seclabel u:r:healthd:s0

service recovery /sbin/recovery
[COLOR="Purple"][I]#seclabel u:r:recovery:s0[/I][/COLOR]

service adbd /sbin/adbd --root_seclabel=u:r:su:s0 --device_banner=recovery
disabled
socket adbd stream 660 system system
seclabel u:r:adbd:s0

[COLOR="Green"]# Always start adbd on userdebug and eng builds[/COLOR]
on property:ro.debuggable=1
[COLOR="Purple"][I]#write /sys/class/android_usb/android0/enable 0[/I][/COLOR]
[COLOR="Purple"][I]#write /sys/class/android_usb/android0/idVendor 0E8D[/I][/COLOR]
[COLOR="Purple"][I]#write /sys/class/android_usb/android0/idProduct 201C[/I][/COLOR]
[COLOR="Purple"][I]#write /sys/class/android_usb/android0/f_ffs/aliases adb[/I][/COLOR]
[COLOR="Purple"][I]#write /sys/class/android_usb/android0/functions adb[/I][/COLOR]
[COLOR="Purple"][I]#write /sys/class/android_usb/android0/enable 1[/I][/COLOR]
[COLOR="Purple"][I]#start adbd[/I][/COLOR]
[COLOR="Purple"][I]setprop service.adb.root 1[/I][/COLOR]

[COLOR="Green"]# Restart adbd so it can run as root[/COLOR]
on property:service.adb.root=1
write /sys/class/android_usb/android0/enable 0
restart adbd
write /sys/class/android_usb/android0/enable 1

[COLOR="Purple"][I]## Start Daemon (Registry directories should already be present)[/I][/COLOR]
[COLOR="Purple"][I]#service mobicore /system/bin/mcDriverDaemon -r /system/app/mcRegistry/020f0000000000000000000000000000.drbin -r /system/app/mcRegistry/05120000000000000000000000000000.drbin -r /system/app/mcRegistry/070b0000000000000000000000000000.drbin[/I][/COLOR]
[COLOR="Purple"][I]#user system[/I][/COLOR]
[COLOR="Purple"][I]#group system[/I][/COLOR]
[COLOR="Purple"][I]#class core[/I][/COLOR]
[COLOR="Purple"][I]#oneshot[/I][/COLOR]

init.recovery.usb.rc

[COLOR="Green"]# Modified by xdarthanonx 01-02-2017[/COLOR]
[COLOR="Green"]# https://goo.gl/oR5fsX[/COLOR]

[COLOR="Green"]# idVendor 0E8D (MTK/MediaTek)[/COLOR]
[COLOR="Green"]# idVendor 18D1 (Google)[/COLOR]
[COLOR="Green"]# idVendor 19D2 (ZTE)[/COLOR]
on fs
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 19D2
write /sys/class/android_usb/android0/idProduct 0306
write /sys/class/android_usb/android0/f_ffs/aliases adb
write /sys/class/android_usb/android0/functions mtp,adb
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
write /sys/class/android_usb/android0/iProduct ${ro.product.model}
write /sys/class/android_usb/android0/iSerial ${ro.serialno}

[COLOR="Green"]# Used to disable USB when switching states[/COLOR]
on property:sys.usb.config=none
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/bDeviceClass 0

on property:sys.usb.config=adb
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 19D2
write /sys/class/android_usb/android0/idProduct 0260
write /sys/class/android_usb/android0/functions adb
write /sys/class/android_usb/android0/enable 1
start adbd

on property:sys.usb.config=mass_storage,adb
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 19D2
write /sys/class/android_usb/android0/idProduct 1351
write /sys/class/android_usb/android0/functions mass_storage,adb
write /sys/class/android_usb/android0/enable 1
start adbd

on property:sys.usb.config=mtp,adb
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 19D2
write /sys/class/android_usb/android0/idProduct 0306
write /sys/class/android_usb/android0/functions mtp,adb
write /sys/class/android_usb/android0/enable 1
start adbd

on property:sys.usb.config=mtp,mass_storage,adb
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 19D2
write /sys/class/android_usb/android0/idProduct 2017
write /sys/class/android_usb/android0/functions mtp,mass_storage,adb
write /sys/class/android_usb/android0/enable 1
start adbd

FLASHING RECOVERY

The easiest way to flash the recovery image is by using a dedicated app, such as Flashify or Rashr. These apps can also back up current boot and recovery images.

Another method is to use fastboot:

C:\Users\xdarthanonx\Downloads\twrp>dir /b
[HIGHLIGHT]twrp_zte_a110[/HIGHLIGHT].img

C:\Users\xdarthanonx\Downloads\twrp>[COLOR="Blue"]adb reboot bootloader[/COLOR]
* daemon not running. starting it now on port 5037 *
* daemon started successfully *

C:\Users\xdarthanonx\Downloads\twrp>[COLOR="Blue"]fastboot flash recovery[/COLOR] [HIGHLIGHT]twrp_zte_a110[/HIGHLIGHT][COLOR="Blue"].img[/COLOR]
target reported max download size of 134217728 bytes
sending 'recovery' (11908 KB)...
OKAY [ 1.197s]
writing 'recovery'...
OKAY [ 0.431s]
finished. total time: 1.630s

C:\Users\xdarthanonx\Downloads\twrp>[COLOR="Blue"]fastboot reboot[/COLOR] && [COLOR="Blue"]adb wait-for-device reboot recovery[/COLOR]
rebooting...

finished. total time: 0.003s

FURTHER READING

How to Install TWRP

How to Flash the TWRP Recovery Environment to Your Android Phone

FILE MD5 CHECKSUMS

stock_recovery.zip\recovery.img - 33A64159025FAD30996C07E8DB34E80C

twrp_zte_a110-20170208-0200.zip\recovery.img - 2D95A5BEE9A4486C2FA9764A3511C046

twrp_zte_a110-20180421-0409.zip\recovery.img - 261989A4C3D6B26B2E493FAC57233E0B

THANKS

TeamWin

[MENTION=5186178]bluefirebird[/MENTION] (Carliv Image Kitchen for Android and CarlivScreenshot)

[MENTION=5088602]albertwesker17[/MENTION] (TWRP for ZTE Blade A410)

Kra1o5

[MENTION=5448769]makers_mark[/MENTION] (Recovery Screenshot)

RELEVANT LINKS

Official ROM - Indonesia (PT Tiphone Mobile Indonesia)

Official ROM - Thailand (DTAC)

UPDATE 23-04-2018

Added tzdata2017c to avoid "__bionic_open_tzdata: couldn't find any tzdata" errors:

ramdisk\system\usr\share\zoneinfo\tzdata

Modified init.rc to define login script for BusyBox shell:

on post-fs
export ENV /etc/profile

Added login script for BusyBox shell:

ramdisk\etc\profile

[COLOR="Green"]# /etc/profile: executed by the command interpreter for login shells.[/COLOR]

[COLOR="Green"]# System-wide profile file[/COLOR]

[COLOR="Green"]# Modified by xdarthanonx 21-04-2018[/COLOR]
[COLOR="Green"]# https://goo.gl/oR5fsX[/COLOR]

PATH=/sbin:/system/bin:/system/xbin

PS1=[COLOR="Purple"]'[$(date +%H:%M:%S)] \u@twrp:\w \$ '[/COLOR]

[B][COLOR="Blue"]export[/COLOR][/B] PATH PS1

[COLOR="Green"]# ALIASES[/COLOR]
[COLOR="Green"]# Alias substitution can be overridden by prefixing with a backslash[/COLOR]
[COLOR="Green"]# (e.g., \rm overrides alias rm='rm -i'). <https://is.gd/7kXd2I>[/COLOR]

[COLOR="Green"]# Interactive operation[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] rm=[COLOR="Purple"]'rm -i'[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] cp=[COLOR="Purple"]'cp -i'[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] mv=[COLOR="Purple"]'mv -i'[/COLOR]

[COLOR="Green"]# Directory listings[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] ll=[COLOR="Purple"]'ls -l'[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] la=[COLOR="Purple"]'ls -A'[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] lo=[COLOR="Purple"]'ls -Al'[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] lc=[COLOR="Purple"]'ls -Al --color=auto'[/COLOR] [COLOR="Green"]# Cygwin/mintty[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] dir=[COLOR="Purple"]'ls -Al --color=auto'[/COLOR] [COLOR="Green"]# Cygwin/mintty[/COLOR]

[COLOR="Green"]# Human readable format (e.g., 1K 243M 2G)[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] df=[COLOR="Purple"]'df -h'[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] du=[COLOR="Purple"]'du -h'[/COLOR]

[COLOR="Green"]# Miscellaneous[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] hd=[COLOR="Purple"]'hexdump -C'[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] gettz=[COLOR="Purple"]'getprop persist.sys.timezone'[/COLOR] [COLOR="Green"]# Get/set time zone[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] settz=[COLOR="Purple"]'setprop persist.sys.timezone'[/COLOR] [COLOR="Green"]# https://goo.gl/QSKLkn[/COLOR]

[COLOR="Green"]# FUNCTIONS[/COLOR]
[COLOR="Green"]# NB: Ash does not use 'function' command[/COLOR]
[COLOR="Green"]# <https://is.gd/25RNSD> POSIX syntax[/COLOR]
[COLOR="Green"]# <https://is.gd/2PmIYH> ash(1) man page[/COLOR]

[COLOR="Green"]# List directory contents in screen-size chunks[/COLOR]
lm () {
[B][COLOR="Blue"]ls[/COLOR][/B] -Al [B][COLOR="DarkOrange"]$@[/COLOR][/B] | [B][COLOR="Blue"]more[/COLOR][/B]
}

[COLOR="Green"]# List directories[/COLOR]
ld () {
[B][COLOR="Blue"]ls[/COLOR][/B] -Al [B][COLOR="DarkOrange"]$@[/COLOR][/B] | [B][COLOR="Blue"]grep[/COLOR][/B] ^d
}

[COLOR="Green"]# Print battery info[/COLOR]
getbatt () {
[B][COLOR="Blue"]echo[/COLOR][/B] [COLOR="Purple"]"CURRENT BATTERY STATE"[/COLOR]
[B][COLOR="Blue"]cat[/COLOR][/B] /sys/devices/platform/battery/power_supply/battery/uevent |
[B][COLOR="Blue"]grep[/COLOR][/B] -e [COLOR="Purple"]'STATUS='[/COLOR] \
-e [COLOR="Purple"]'HEALTH='[/COLOR] \
-e [COLOR="Purple"]'TECHNOLOGY='[/COLOR] \
-e [COLOR="Purple"]'CAPACITY='[/COLOR] \
-e [COLOR="Purple"]'BATT_VOL='[/COLOR] \
-e [COLOR="Purple"]'BATT_TEMP='[/COLOR] \
-e [COLOR="Purple"]'BATTERYAVERAGECURRENT='[/COLOR] \
-e [COLOR="Purple"]'CHARGERVOLTAGE='[/COLOR] |
[B][COLOR="Blue"]sed[/COLOR][/B] -e [COLOR="Purple"]'s/POWER_SUPPLY_/ /'[/COLOR] \
-e [COLOR="Purple"]'s/STATUS/Status/'[/COLOR] \
-e [COLOR="Purple"]'s/HEALTH/Health/'[/COLOR] \
-e [COLOR="Purple"]'s/TECHNOLOGY/Technology/'[/COLOR] \
-e [COLOR="Purple"]'s/CAPACITY/Level/'[/COLOR] \
-e [COLOR="Purple"]'s/BATT_VOL/Voltage/'[/COLOR] \
-e [COLOR="Purple"]'s/BATT_TEMP/Temperature/'[/COLOR] \
-e [COLOR="Purple"]'s/BATTERYAVERAGECURRENT/Current/'[/COLOR] \
-e [COLOR="Purple"]'s/CHARGERVOLTAGE/Charger voltage/'[/COLOR] \
-e [COLOR="Purple"]'s/=/: /'[/COLOR]
}

[COLOR="Green"]# Check and repair file systems[/COLOR]
fixfs () {
[B][COLOR="Blue"]umount[/COLOR][/B] -a -t ext2,ext3,ext4,vfat
[B][COLOR="Blue"]fsck.fat[/COLOR][/B] -aV /dev/block/mmcblk1p1 [COLOR="Green"]# SDcard[/COLOR]
[B][COLOR="Blue"]e2fsck[/COLOR][/B] -fpDC0 /dev/block/mmcblk1p2 [COLOR="Green"]# Link2SD partition[/COLOR]
[B][COLOR="Blue"]e2fsck[/COLOR][/B] -fpDC0 /dev/block/platform/mtk-msdc.0/by-name/cache
[B][COLOR="Blue"]e2fsck[/COLOR][/B] -fpDC0 /dev/block/platform/mtk-msdc.0/by-name/userdata
[B][COLOR="Blue"]e2fsck[/COLOR][/B] -fpDC0 /dev/block/platform/mtk-msdc.0/by-name/system
}