TWRP recovery for IQI I4

First TWRP 3.0.3 recovery port for IQI I4 with multi-language support.

Requirements
I4 must have firmware v20170322
SP Flash tool must be a newer version, I use the v5.1628

*** WARNING ***
DO NOT APPLY any OTA update after you have flashed this recovery! This could (soft)brick your watch.
OTA updates require stock recovery.

Notes
Stock I4 ROM includes a service which overwrite recovery partition if it’s different from the stock.
To overcome this issue I included also a patched version of the boot.img from the v20170322 ROM which is exactly as the stock version but the recovery overwrite service is disabled.
The included scatter file is modified to load both the recovery and the boot image files; no changes to partitions layout are present.

Installation
To install, use the usual procedure for flashing the recovery with SP Flash Tool. Don’t do it if you are not 101% sure of what you are doing.
Usual disclaimers apply *** I am not responsible for anyone’s issues here. Use this at your own risk !! ***

  1. Load the supplied scatter file in SP Flash Tool
  2. Make sure that no other other files is selected, ONLY boot and recovery must be selected, and press “download”.
  3. Power off the watch and then connect it to your PC and it will flash in few seconds.

That’s all.

Download
recovery-twrp-303_I4-20170330.zip

Is there a root for the version AQR-LAUNCH-I4-1602-HEHUI-NHT-V01-20170731? Thanks.


You can install the TWRP of this thread, root your watch with SuperSU, then follow the instructions of THIS post to restore your current boot.img

How do I install the TWRP (recovery.img, right?) without the SP Flash Tool? Thanks.

You have to root the watch for doing that.

Apr 2, 2017 17:32:27 GMT 1 Ciro Danise said:
First TWRP 3.0.3 recovery port for IQI I4 with multi-language support.

Requirements
I4 must have firmware v20170322
SP Flash tool must be a newer version, I use the v5.1628

*** WARNING ***
DO NOT APPLY any OTA update after you have flashed this recovery! This could (soft)brick your watch.
OTA updates require stock recovery.

Notes
Stock I4 ROM includes a service which overwrite recovery partition if it’s different from the stock.
To overcome this issue I included also a patched version of the boot.img from the v20170322 ROM which is exactly as the stock version but the recovery overwrite service is disabled.
The included scatter file is modified to load both the recovery and the boot image files; no changes to partitions layout are present.

Installation
To install, use the usual procedure for flashing the recovery with SP Flash Tool. Don’t do it if you are not 101% sure of what you are doing.
Usual disclaimers apply *** I am not responsible for anyone’s issues here. Use this at your own risk !! ***

  1. Load the supplied scatter file in SP Flash Tool
  2. Make sure that no other other files is selected, ONLY boot and recovery must be selected, and press “download”.
  3. Power off the watch and then connect it to your PC and it will flash in few seconds.

That’s all.

Download
recovery-twrp-303_I4-20170330.zip


hi.where i can take twrp for i4air?thank's

Hi,

I’m interested in buying a IQI I4 PRO, and would like to try and build things for it, starting with TWRP, as i did for some other device.
Would this recovery work on a i4 pro ?

Do you know which device tree was used to build this recovery ?

Are there any sources available ?

So much questions

Thanks !

Use the I4 recovery here in the forum.

It works for all the I4 models that I have tested
Just follow what Ciro has written.
Use the custom boot image first with the recovery he made. Flash super su. Then flash your original boot image back to the watch.
Done.

Jan 28, 2018 5:40:51 GMT 1 RASC Moderators said:
Use the I4 recovery here in the forum.

It works for all the I4 models that I have tested
Just follow what Ciro has written.
Use the custom boot image first with the recovery he made. Flash super su. Then flash your original boot image back to the watch.
Done.


Ok thanks. From my android rom experience, i suppose the “self reinstalling recovery” problem is related to recovery-from-boot.p file and its flashing script in /system/etc.

But that was not the main question : I’m a developper looking for a new device to play with, so I’m only interested to know with which device tree this was built, as I couldn’t find it on GitHub.

Jan 28, 2018 10:16:47 GMT 1 pix106 said:

Jan 28, 2018 5:40:51 GMT 1 RASC Moderators said:
Use the I4 recovery here in the forum.

It works for all the I4 models that I have tested
Just follow what Ciro has written.
Use the custom boot image first with the recovery he made. Flash super su. Then flash your original boot image back to the watch.
Done.


Ok thanks. From my android rom experience, i suppose the “self reinstalling recovery” problem is related to recovery-from-boot.p file and its flashing script in /system/etc.

But that was not the main question : I’m a developper looking for a new device to play with, so I’m only interested to know with which device tree this was built, as I couldn’t find it on GitHub.


plz the H2 from microwear:)

Jan 28, 2018 13:51:05 GMT 1 soniasophie9697 said:

Jan 28, 2018 10:16:47 GMT 1 pix106 said:
Ok thanks. From my android rom experience, i suppose the “self reinstalling recovery” problem is related to recovery-from-boot.p file and its flashing script in /system/etc.

But that was not the main question : I’m a developper looking for a new device to play with, so I’m only interested to know with which device tree this was built, as I couldn’t find it on GitHub.


plz the H2 from microwear:)

I like the sobriety of the i4, and the 2GB ram of the i4 pro.
H2 is too thick imo.

Jan 27, 2018 22:41:06 GMT 1 pix106 said:
Hi,

I’m interested in buying a IQI I4 PRO, and would like to try and build things for it, starting with TWRP, as i did for some other device.
Would this recovery work on a i4 pro ?

Do you know which device tree was used to build this recovery ?

Are there any sources available ?

So much questions

Thanks !


Just a message to mention Ciro Danise, to see if he knows where to find sources for TWRP on i4 pro. No hurry, i don't have the smartwatch yet... but it's a matter of days now

I don’t know what can be built, what i can build… I have already built CyanogenMod for a MTK tablet, with some luck involved

I posted about this already.
The twrp here works for the I4 pro… You don’t need to do anything.

Ciro is not available and won’t be for some time. But you don’t need to ask him. It’s already posted here.

You can install the TWRP of this thread, root your watch with SuperSU, then follow the instructions of THIS post to restore your current boot.img[/quote]
See this post? Ciro already posted it.

Jan 29, 2018 21:56:21 GMT 1 RASC Moderators said:
You can install the TWRP of this thread, root your watch with SuperSU, then follow the instructions of THIS post to restore your current boot.img

See this post? Ciro already posted it.

We’re not talking about the same thing : I’m not trying to install this recovery, nor asking how to root the smartwatch.

I’m a developper, i’d like to build/compile TWRP from source for the i4, and maybe afterwards i’ll try to build a rom for it (i have already built TWRP for a few android tablets, and a few roms for one of them)

To do so, TWRP sources are needed (no problem there), with some other sources to build it for a specific hardware (device tree).
As you told, and as i could read , this recovery is working => that’s why i’m asking which I4 specific sources it was built with.

I suppose, as he posted it, that Ciro Danise has built it himself, or knows more about this.

If you just want to build TWRP, you can use a generic device with the watch_mdpi theme and then add the prebuilt kernel from the boot image.
This is how it’s usually done because of the missing kernel source.

Edit:
This BoardConfig should work:

# Architecture TARGET_ARCH := arm TARGET_ARCH_VARIANT := armv7-a-neon TARGET_CPU_ABI := armeabi-v7a TARGET_CPU_VARIANT:= cortex-a7

Recovery

TW_THEME := watch_mdpi
TW_ROUND_SCREEN := true
TW_NO_USB_STORAGE := true
TW_NO_REBOOT_BOOTLOADER := true
TW_NO_SCREEN_BLANK := true
TW_EXCLUDE_SUPERSU := true
TW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID := true
TW_BRIGHTNESS_PATH := “/sys/devices/platform/leds-mt65xx/leds/lcd-backlight/brightness”
TW_CUSTOM_CPU_TEMP_PATH := “/sys/devices/virtual/thermal/thermal_zone1/temp”

Device

BOARD_HAS_FLIPPED_SCREEN := true
BOARD_KERNEL_BASE := 0x80000000
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x04000000 --tags_offset 0x0e000000
TARGET_USERIMAGES_USE_EXT4 := true


Jan 29, 2018 23:39:15 GMT 1 Adios said:
If you just want to build TWRP, you can use a generic device with the watch_mdpi theme and then add the prebuilt kernel from the boot image. This is how it's usually done because of the missing kernel source.

Edit:
This BoardConfig should work:

# Architecture TARGET_ARCH := arm TARGET_ARCH_VARIANT := armv7-a-neon TARGET_CPU_ABI := armeabi-v7a TARGET_CPU_VARIANT:= cortex-a7

Recovery

TW_THEME := watch_mdpi
TW_ROUND_SCREEN := true
TW_NO_USB_STORAGE := true
TW_NO_REBOOT_BOOTLOADER := true
TW_NO_SCREEN_BLANK := true
TW_EXCLUDE_SUPERSU := true
TW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID := true
TW_BRIGHTNESS_PATH := “/sys/devices/platform/leds-mt65xx/leds/lcd-backlight/brightness”
TW_CUSTOM_CPU_TEMP_PATH := “/sys/devices/virtual/thermal/thermal_zone1/temp”

Device

BOARD_HAS_FLIPPED_SCREEN := true
BOARD_KERNEL_BASE := 0x80000000
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x04000000 --tags_offset 0x0e000000
TARGET_USERIMAGES_USE_EXT4 := true



Thanks

This BoardConfig.mk indeed looks similar to what i’m used to for one other MTK device, i note a few specific flags i’ll try, thanks !

fstab and system.prop files that were used to build this TWRP could be interesting to start (faster) with, maybe Ciro Danise has informations about it

system.prop is probably not needed and this should work for the fstab:

/dev/block/platform/mtk-msdc.0/by-name/boot /boot emmc defaults defaults /dev/block/platform/mtk-msdc.0/by-name/cache /cache ext4 defaults defaults /dev/block/platform/mtk-msdc.0/by-name/userdata /data ext4 defaults defaults /dev/block/platform/mtk-msdc.0/by-name/recovery /recovery emmc defaults defaults /dev/block/platform/mtk-msdc.0/by-name/system /system ext4 defaults defaults /dev/block/platform/mtk-msdc.0/by-name/para /misc emmc defaults defaults

Jan 30, 2018 0:08:11 GMT 1 Adios said:
system.prop is probably not needed and this should work for the fstab:
/dev/block/platform/mtk-msdc.0/by-name/boot /boot emmc defaults defaults /dev/block/platform/mtk-msdc.0/by-name/cache /cache ext4 defaults defaults /dev/block/platform/mtk-msdc.0/by-name/userdata /data ext4 defaults defaults /dev/block/platform/mtk-msdc.0/by-name/recovery /recovery emmc defaults defaults /dev/block/platform/mtk-msdc.0/by-name/system /system ext4 defaults defaults /dev/block/platform/mtk-msdc.0/by-name/para /misc emmc defaults defaults


ok thanks ! A few tweaks are needed to adapt the fstab to TWRP, if it is still needed (i saw in the "recent" commits that it could now read multiple fstab format), and a few other tweaks can be added to mark which partitions are to be backed up etc...

Anyway, i’d like to see the device tree that was used for this TWRP : if i may, and if i understood it well, publishing the source is mandatory to comply to GPLv3, which is the license used by TWRP.

Jan 30, 2018 18:55:11 GMT 1 pix106 said:
if i may, and if i understood it well, publishing the source is mandatory to comply to GPLv3, which is the license used by TWRP.


That's right, but beside the theme (which seems customized) the core function will be pretty much identical with the BoardConfig i posted. For TWRP only, there are no extensive device configurations needed.

Everything that is more advanced will necessary require the kernel source, but no (small) chinese company will ever provide those, as even big companies like Xiaomi struggle to comply.