It seems that it is not possible to flash TWRP on Moto E4 (XT1762)

Ergo Bibamus

Member
Mar 23, 2018
12
6
0
Pleas do me a favour and give me the output of:
Code:
fastboot get_var all
Thanks
Hi Spielmops,
Code:
fastboot getvar all
shows:
Code:
(bootloader)    max-download-size: 0x8000000
(bootloader)    partition-size:flashinfo: 1000000
(bootloader)    partition-type:flashinfo: raw data
(bootloader)    partition-size:otp: 2b00000
(bootloader)    partition-type:otp: raw data
(bootloader)    partition-size:userdata: 32000000
(bootloader)    partition-type:userdata: ext4
(bootloader)    partition-size:cache: 19000000
(bootloader)    partition-type:cache: ext4
(bootloader)    partition-size:system: c0000000
(bootloader)    partition-type:system: ext4
(bootloader)    partition-size:oem: 10280000
(bootloader)    partition-type:oem: ext4
(bootloader)    partition-size:hw: 800000
(bootloader)    partition-type:hw: raw data
(bootloader)    partition-size:metadata: 2000000
(bootloader)    partition-type:metadata: raw data
(bootloader)    partition-size:nvdata: 2000000
(bootloader)    partition-type:nvdata: ext4
(bootloader)    partition-size:frp: 100000
(bootloader)    partition-type:frp: raw data
(bootloader)    partition-size:utags: 80000
(bootloader)    partition-type:utags: raw data
(bootloader)    partition-size:efuse: 80000
(bootloader)    partition-type:efuse: raw data
(bootloader)    partition-size:persist: 3000000
(bootloader)    partition-type:persist: ext4
(bootloader)    partition-size:tee2: 500000
(bootloader)    partition-type:tee2: raw data
(bootloader)    partition-size:tee1: 500000
(bootloader)    partition-type:tee1: raw data
(bootloader)    partition-size:keystore: 800000
(bootloader)    partition-type:keystore: raw data
(bootloader)    partition-size:secro: 600000
(bootloader)    partition-type:secro: raw data
(bootloader)    partition-size:oemkeystore: 200000
(bootloader)    partition-type:oemkeystore: raw data
(bootloader)    partition-size:seccfg: 80000
(bootloader)    partition-type:seccfg: raw data
(bootloader)    partition-size:expdb: a00000
(bootloader)    partition-type:expdb: raw data
(bootloader)    partition-size:logo: 800000
(bootloader)    partition-type:logo: raw data
(bootloader)    partition-size:recovery: 1000000
(bootloader)    partition-type:recovery: raw data
(bootloader)    partition-size:boot: 1000000
(bootloader)    partition-type:boot: raw data
(bootloader)    partition-size:para: 80000
(bootloader)    partition-type:para: raw data
(bootloader)    partition-size:lk: 200000
(bootloader)    partition-type:lk: raw data
(bootloader)    partition-size:protect2: a00000
(bootloader)    partition-type:protect2: ext4
(bootloader)    partition-size:protect1: a00000
(bootloader)    partition-type:protect1: ext4
(bootloader)    partition-size:nvram: 500000
(bootloader)    partition-type:nvram: raw data
(bootloader)    partition-size:proinfo: 300000
(bootloader)    partition-type:proinfo: raw data
(bootloader)    partition-size:preloader: 40000
(bootloader)    partition-type:preloader: raw data
(bootloader)    serialno: **********
(bootloader)    off-mode-charge: 1
(bootloader)    warranty: no
(bootloader)    unlocked: yes
(bootloader)    efuse: yes
(bootloader)    secure: no
(bootloader)    kernel: lk
(bootloader)    product: WOODS
(bootloader)    hwid: 30
(bootloader)    version-preloader: 0.1.00
(bootloader)    version: 0.5
all: Done!!
finished. total time: 0.312s
I hope this will help.
 

Spielmops

Senior Member
Dec 14, 2016
58
6
8
Oldenburg
I wanted to make Photos of my smartphone while unlocking. That was the 4th time I made an unlock. This time my device was really unlocked. I got the lines
Code:
(bootloader)    warranty: no
(bootloader)    unlocked: yes
and could flash the TWRP as recovery. I tried to install SuperSU v. 2.82, but the install-process told me "failure". No root.
@Ergo Bibamus You have root? Which version of SuperSU did the work for you?
 

madbat99

Senior Member
Mar 1, 2014
5,538
3,285
113
I wanted to make Photos of my smartphone while unlocking. That was the 4th time I made an unlock. This time my device was really unlocked. I got the lines

and could flash the TWRP as recovery. I tried to install SuperSU v. 2.82, but the install-process told me "failure". No root.
@Ergo Bibamus You have root? Which version of SuperSU did the work for you?
Phh superuser
 

Spielmops

Senior Member
Dec 14, 2016
58
6
8
Oldenburg
Jap, I used Phh superuser.
Log of installation superuser.zip with TWRP:
Code:
Installing zip file '/external_sd/superuser.zip'
Checking for Digest file...
Skipping Digest check: no Digest file found
I:Update binary zip
I:Zip does not contain SELinux file_contexts file in its root.
I:Legacy property environment not used in updater.
+ fd=25 
+ '[' ! -L /proc/self/fd/25 ']'
+ zip=/external_sd/superuser.zip 
+ ui_print 'Installing seSuperuser...'
+ >>/proc/self/fd/25 
+ echo 'ui_print Installing seSuperuser...'
Installing seSuperuser...+ rm -Rf /tmp/superuser
+ mkdir -p /tmp/superuser
+ unzip -o /external_sd/superuser.zip -d /tmp/superuser/
I:[MTP] MtpServer::run fd: 22
E:[MTP] got unsupported command UNKNOWNE:[MTP] response write returned -1, errno: 19, exiting MtpServer::run loop
Archive:  /external_sd/superuser.zip
   creating: scripts/
  inflating: scripts/bootimg.sh
  inflating: scripts/.gitignore
  inflating: scripts/kernel_subkey.vbprivk
   creating: scripts/su/
  inflating: scripts/su/changes.sh
  inflating: scripts/su/su-communication.sh
  inflating: scripts/su/rights.sh
  inflating: scripts/README.md
  inflating: scripts/kernel_data_key.vbprivk
  inflating: scripts/kernel_data_key.vbpubk
  inflating: scripts/gitversion
   creating: scripts/keystore_tools/
  inflating: scripts/keystore_tools/README
  inflating: scripts/keystore_tools/make_key
  inflating: scripts/keystore_tools/BootKeystoreSigner.jar
  inflating: scripts/keystore_tools/BootSignature.jar
  inflating: scripts/kernel_subkey.vbpubk
   creating: scripts/bin/
  inflating: scripts/bin/su-x86
  inflating: scripts/bin/sepolicy-inject
  inflating: scripts/bin/sepolicy-inject-v2
  inflating: scripts/bin/futility-arm
  inflating: scripts/bin/bootimg-repack
  inflating: scripts/bin/su-arm
  inflating: scripts/bin/strip-cpio
  inflating: scripts/bin/bootimg-extract
  inflating: config.txt
   creating: META-INF/
   creating: META-INF/com/
   creating: META-INF/com/google/
   creating: META-INF/com/google/android/
  inflating: META-INF/com/google/android/updater-script
  inflating: META-INF/com/google/android/update-binary
+ cat /tmp/superuser/config.txt
+ modes='eng verity crypt' 
+ cd /tmp/superuser/scripts/su/
+ fstab=/etc/recovery.fstab 
+ '[' ! -f /etc/recovery.fstab ']'
+ grep -E '\b/boot\b' /etc/recovery.fstab
+ grep -oE '/dev/[a-zA-Z0-9_./-]*'
+ bootimg= 
Updater process ended with ERROR: 1
I:Install took 0 second(s).
Error installing zip file '/external_sd/superuser.zip'

@Ergo Bibamus: did you root it this way?
 

Spielmops

Senior Member
Dec 14, 2016
58
6
8
Oldenburg
Swipe does not work without root. And what has "swipe" to do with superuser.zip failing to root?
phh superuser thread
Excerp from that thread:
Originally Posted by kurtn

@phhusson is this root method still maintained?

It's no longer maintained, though I accept patches to support new ROM/devices.
I recommend using Magisk.
 

madbat99

Senior Member
Mar 1, 2014
5,538
3,285
113
Swipe does not work without root. And what has "swipe" to do with superuser.zip failing to root?

Excerp from that thread:
Originally Posted by kurtn
It still works. Just not maintained. It's how everyone rooted this phone initially. Magisk will work too, but because of Moto's f2fs loopback bug you cannot use magisk modules. Many still use phh superuser. Nougat is perfectly compatible, so phh is fine.

You can try magisk. It will root, just no modules. There is a fix for that. F2fs loopback bug workaround module.

Did you format data and install the no verity opt encrypt zip? To unencrypt. You must do that for root.
 
Last edited:

Ergo Bibamus

Member
Mar 23, 2018
12
6
0
Log of installation superuser.zip with TWRP:
Code:
Installing zip file '/external_sd/superuser.zip'
Checking for Digest file...
Skipping Digest check: no Digest file found
I:Update binary zip
I:Zip does not contain SELinux file_contexts file in its root.
I:Legacy property environment not used in updater.
+ fd=25 
+ '[' ! -L /proc/self/fd/25 ']'
+ zip=/external_sd/superuser.zip 
+ ui_print 'Installing seSuperuser...'
+ >>/proc/self/fd/25 
+ echo 'ui_print Installing seSuperuser...'
Installing seSuperuser...+ rm -Rf /tmp/superuser
+ mkdir -p /tmp/superuser
+ unzip -o /external_sd/superuser.zip -d /tmp/superuser/
I:[MTP] MtpServer::run fd: 22
E:[MTP] got unsupported command UNKNOWNE:[MTP] response write returned -1, errno: 19, exiting MtpServer::run loop
Archive:  /external_sd/superuser.zip
   creating: scripts/
  inflating: scripts/bootimg.sh
  inflating: scripts/.gitignore
  inflating: scripts/kernel_subkey.vbprivk
   creating: scripts/su/
  inflating: scripts/su/changes.sh
  inflating: scripts/su/su-communication.sh
  inflating: scripts/su/rights.sh
  inflating: scripts/README.md
  inflating: scripts/kernel_data_key.vbprivk
  inflating: scripts/kernel_data_key.vbpubk
  inflating: scripts/gitversion
   creating: scripts/keystore_tools/
  inflating: scripts/keystore_tools/README
  inflating: scripts/keystore_tools/make_key
  inflating: scripts/keystore_tools/BootKeystoreSigner.jar
  inflating: scripts/keystore_tools/BootSignature.jar
  inflating: scripts/kernel_subkey.vbpubk
   creating: scripts/bin/
  inflating: scripts/bin/su-x86
  inflating: scripts/bin/sepolicy-inject
  inflating: scripts/bin/sepolicy-inject-v2
  inflating: scripts/bin/futility-arm
  inflating: scripts/bin/bootimg-repack
  inflating: scripts/bin/su-arm
  inflating: scripts/bin/strip-cpio
  inflating: scripts/bin/bootimg-extract
  inflating: config.txt
   creating: META-INF/
   creating: META-INF/com/
   creating: META-INF/com/google/
   creating: META-INF/com/google/android/
  inflating: META-INF/com/google/android/updater-script
  inflating: META-INF/com/google/android/update-binary
+ cat /tmp/superuser/config.txt
+ modes='eng verity crypt' 
+ cd /tmp/superuser/scripts/su/
+ fstab=/etc/recovery.fstab 
+ '[' ! -f /etc/recovery.fstab ']'
+ grep -E '\b/boot\b' /etc/recovery.fstab
+ grep -oE '/dev/[a-zA-Z0-9_./-]*'
+ bootimg= 
Updater process ended with ERROR: 1
I:Install took 0 second(s).
Error installing zip file '/external_sd/superuser.zip'
@Ergo Bibamus: did you root it this way?
I didn't keep the logs but I know what I've done after flashing TWRP:
(You'll also need no-verity zip file)

- boot into bootloader (this time I used press & hold power + volume down button)
- press volume down until you see recovery mode
- press power button to boot into recovery mode
(- make a backup)
- wipe data
- click on Install, then select superuser zip file
- also install no-verity zip file
- reboot into Android and
- install phh superuser app (apk file)
That works for me.

You can verify root using the root checker app.
 

Spielmops

Senior Member
Dec 14, 2016
58
6
8
Oldenburg
Did you format data and install the no verity opt encrypt zip? To unencrypt. You must do that for root.
First time I heard of that "verity opt encrypt zip". I have a brand new phone and did nothing with it. I did not encrypt anything.

Or is the boot-partition encrypted and I need verity to unencrypt it? Where can I read about that and where to download it.
 

madbat99

Senior Member
Mar 1, 2014
5,538
3,285
113
First time I heard of that "verity opt encrypt zip". I have a brand new phone and did nothing with it. I did not encrypt anything.

Or is the boot-partition encrypted and I need verity to unencrypt it? Where can I read about that and where to download it.
The phone's data partition is encrypted upon first boot. When you flash no verity opt encrypt it sets the flag in boot to opt encrypt instead of force encrypt. Formatting data after the flash removes encryption.
There are guides for recovering after brick, which include root procedure.
https://forum.xda-developers.com/mo...t1762-build-nma26-42-75-t3688609/post74154048

The original root guide seems to be gone. There is also a link in that thread to their telegram chat with all files and procedures for this device.
 
Last edited: