[Android Software/Hacking General [Developers Only]] dnlilas:
Hello,

I tried to convert from SuperSU to PHH superuser but failed during TWRP flashing. Please advise.

Details:

Device: Zopo ZP998, Android stock ROM 4.4.2, SuperSU 2.79, TWRP 3.0-2.0.

Procedure:

Boot to TWRP, then flash osmOsis UnSU zip UPDATE-unSU-signed.zip, then flash superuser-r259.zip.

I tried all 3 versions:

- eng noverity nocrypt

- eng verity nocrypt

- eng verity crypt

Error message on TWRP screen:

Installing seSuperuser...

seSuperuser: Found bootimg at @ /dev/bootimg

Updater process ended with ERROR: 139

/tmp/recovery.log is included showing the 2 attempts ("eng noverity nocrypt" then "eng verity nocrypt").

MTP is enabled
I:Check_Lifetime_Writes result: '1089568'
I:Switching packages (TWRP)
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
created new mtpserver object
MtpServer::run fd: 30
mtppipe add storage 65537 '/emmc'
MtpStorage id: 65537 path: /emmc
mtppipe add storage 65538 '/external_sd'
MtpStorage id: 65538 path: /external_sd
I:Set page: 'install'
I:Set page: 'flash_confirm'
I:Set page: 'flash_zip'
I:operation_start: 'Flashing'
Installing zip file '/external_sd/UPDATE-unSU-signed.zip'
Checking for MD5 file...
Skipping MD5 check: no MD5 file found
I:Zip does not contain SELinux file_contexts file in its root.
I:Legacy property environment initialized.

unSU Script
by osm0sis @ xda-developers

Mounting...

mount: mounting /dev/block/mmcblk0p6 on /cache failed: Device or resource busy
Removing SuperSU...
mv: can't rename '/system/bin/app_process32_original': No such file or directory
mv: can't rename '/system/bin/app_process64_original': No such file or directory
mv: can't rename '/system/bin/install-recovery_original.sh': No such file or directory
strings: /system/xbin/su: No such file or directory

Unmounting...
umount: can't umount /system: Device or resource busy

Done!
I:Updater process ended with RC=0
I:Legacy property environment disabled.
Updating partition details...
...done
I:Set page: 'flash_done'
I:operation_end - status=0
I:Set page: 'clear_vars'
I:Set page: 'install'
I:Set page: 'flash_confirm'
I:Set page: 'flash_zip'
I:operation_start: 'Flashing'
Installing zip file '/external_sd/superuser-r259_noverity_nocrypt.zip'
Checking for MD5 file...
Skipping MD5 check: no MD5 file found
I:Zip does not contain SELinux file_contexts file in its root.
I:Legacy property environment initialized.
+ fd=34
+ [ ! -L /proc/self/fd/34 ]
+ zip=/external_sd/superuser-r259_noverity_nocrypt.zip
+ ui_print Installing seSuperuser...
+ echo ui_print Installing seSuperuser...
Installing seSuperuser...+ rm -Rf /tmp/superuser
+ mkdir -p /tmp/superuser
+ unzip -o /external_sd/superuser-r259_noverity_nocrypt.zip -d /tmp/superuser/
Archive: /external_sd/superuser-r259_noverity_nocrypt.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 noverity nocrypt
+ 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=/dev/bootimg
+ [ -z /dev/bootimg ]
+ ui_print seSuperuser: Found bootimg @ /dev/bootimg
+ echo ui_print seSuperuser: Found bootimg @ /dev/bootimg
seSuperuser: Found bootimg @ /dev/bootimg+ sh -x ../bootimg.sh /dev/bootimg eng noverity nocrypt
+ export TMPDIR=/tmp/
+ which mktemp
/sbin/mktemp
+ [ 4 == 0 ]
+ set -e
+ [ -f eng ]
+ scr=/tmp/superuser/scripts/su/changes.sh
+ trap cleanup EXIT
+ readlink -f ../bootimg.sh
+ dirname /tmp/superuser/scripts/bootimg.sh
+ scriptdir=/tmp/superuser/scripts
+ chmod 0755 /tmp/superuser/scripts/bin/sepolicy-inject
+ chmod 0755 /tmp/superuser/scripts/bin/sepolicy-inject-v2
+ chmod 0755 /tmp/superuser/scripts/bin/bootimg-repack
+ chmod 0755 /tmp/superuser/scripts/bin/bootimg-extract
+ chmod 0755 /tmp/superuser/scripts/bin/strip-cpio
+ [[ toto2 =~ toto ]]
sh: =~: unknown operand
+ r_file_perms=getattr open read ioctl lock
+ x_file_perms=getattr execute execute_no_trans
+ rx_file_perms=getattr open read ioctl lock getattr execute execute_no_trans
+ w_file_perms=open append write
+ rw_file_perms=getattr open read ioctl lock open append write
+ rwx_file_perms=getattr open read ioctl lock getattr execute execute_no_trans
+ rw_socket_perms=ioctl read getattr write setattr lock append bind connect getopt setopt shutdown
+ create_socket_perms=create ioctl read getattr write setattr lock append bind connect getopt setopt shutdown
+ rw_stream_socket_perms=ioctl read getattr write setattr lock append bind connect getopt setopt shutdown listen accept
+ create_stream_socket_perms=create ioctl read getattr write setattr lock append bind connect getopt setopt shutdown listen accept
+ r_dir_perms=open getattr read search ioctl
+ w_dir_perms=open search write add_name remove_name
+ ra_dir_perms=open getattr read search ioctl add name write
+ rw_dir_perms=open getattr read search ioctl open search write add_name remove_name
+ create_dir_perms=create reparent rename rmdir setattr open getattr read search ioctl open search write add_name remove_name
+ startBootImgEdit /dev/bootimg
+ readlink -f /dev/bootimg
+ f=/dev/bootimg
+ homedir=/tmp/superuser/scripts/su
+ mktemp -d
+ bootimg_extract=/tmp/tmp.ziKCeq
+ cd /tmp/tmp.ziKCeq
+ /tmp/superuser/scripts/bin/bootimg-extract /dev/bootimg
Segmentation fault
+ cleanup
+ rm -Rf /tmp/tmp.ziKCeq
Updater process ended with ERROR: 139
I:Legacy property environment disabled.
Error installing zip file '/external_sd/superuser-r259_noverity_nocrypt.zip'
Updating partition details...
...done
I:Set page: 'flash_done'
I:operation_end - status=1
I:Set page: 'clear_vars'
I:Set page: 'install'
I:Set page: 'flash_confirm'
I:Set page: 'flash_zip'
I:operation_start: 'Flashing'
Installing zip file '/external_sd/superuser-r259_verity_nocrypt.zip'
Checking for MD5 file...
Skipping MD5 check: no MD5 file found
I:Zip does not contain SELinux file_contexts file in its root.
I:Legacy property environment initialized.
+ fd=34
+ [ ! -L /proc/self/fd/34 ]
+ zip=/external_sd/superuser-r259_verity_nocrypt.zip
+ ui_print Installing seSuperuser...
+ echo ui_print Installing seSuperuser...
Installing seSuperuser...+ rm -Rf /tmp/superuser
+ mkdir -p /tmp/superuser
+ unzip -o /external_sd/superuser-r259_verity_nocrypt.zip -d /tmp/superuser/
Archive: /external_sd/superuser-r259_verity_nocrypt.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 nocrypt
+ 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=/dev/bootimg
+ [ -z /dev/bootimg ]
+ ui_print seSuperuser: Found bootimg @ /dev/bootimg
+ echo ui_print seSuperuser: Found bootimg @ /dev/bootimg
+ sh -x ../bootimg.sh /dev/bootimg eng verity nocrypt
seSuperuser: Found bootimg @ /dev/bootimg+ export TMPDIR=/tmp/
+ which mktemp
/sbin/mktemp
+ [ 4 == 0 ]
+ set -e
+ [ -f eng ]
+ scr=/tmp/superuser/scripts/su/changes.sh
+ trap cleanup EXIT
+ readlink -f ../bootimg.sh
+ dirname /tmp/superuser/scripts/bootimg.sh
+ scriptdir=/tmp/superuser/scripts
+ chmod 0755 /tmp/superuser/scripts/bin/sepolicy-inject
+ chmod 0755 /tmp/superuser/scripts/bin/sepolicy-inject-v2
+ chmod 0755 /tmp/superuser/scripts/bin/bootimg-repack
+ chmod 0755 /tmp/superuser/scripts/bin/bootimg-extract
+ chmod 0755 /tmp/superuser/scripts/bin/strip-cpio
+ [[ toto2 =~ toto ]]
sh: =~: unknown operand
+ r_file_perms=getattr open read ioctl lock
+ x_file_perms=getattr execute execute_no_trans
+ rx_file_perms=getattr open read ioctl lock getattr execute execute_no_trans
+ w_file_perms=open append write
+ rw_file_perms=getattr open read ioctl lock open append write
+ rwx_file_perms=getattr open read ioctl lock getattr execute execute_no_trans
+ rw_socket_perms=ioctl read getattr write setattr lock append bind connect getopt setopt shutdown
+ create_socket_perms=create ioctl read getattr write setattr lock append bind connect getopt setopt shutdown
+ rw_stream_socket_perms=ioctl read getattr write setattr lock append bind connect getopt setopt shutdown listen accept
+ create_stream_socket_perms=create ioctl read getattr write setattr lock append bind connect getopt setopt shutdown listen accept
+ r_dir_perms=open getattr read search ioctl
+ w_dir_perms=open search write add_name remove_name
+ ra_dir_perms=open getattr read search ioctl add name write
+ rw_dir_perms=open getattr read search ioctl open search write add_name remove_name
+ create_dir_perms=create reparent rename rmdir setattr open getattr read search ioctl open search write add_name remove_name
+ startBootImgEdit /dev/bootimg
+ readlink -f /dev/bootimg
+ f=/dev/bootimg
+ homedir=/tmp/superuser/scripts/su
+ mktemp -d
+ bootimg_extract=/tmp/tmp.Gjspox
+ cd /tmp/tmp.Gjspox
+ /tmp/superuser/scripts/bin/bootimg-extract /dev/bootimg
Segmentation fault
+ cleanup
+ rm -Rf /tmp/tmp.Gjspox
Updater process ended with ERROR: 139
I:Legacy property environment disabled.
Error installing zip file '/external_sd/superuser-r259_verity_nocrypt.zip'
Updating partition details...
...done
I:Set page: 'flash_done'
I:operation_end - status=1
I:Set page: 'clear_vars'
I:Set page: 'install'
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Set page: 'filemanagerlist'
I:Set page: 'filemanageroptions'
I:Set page: 'choosedestinationfolder'
I:Set page: 'filemanagerconfirm'
I:Set page: 'filemanageraction'
I:operation_start: 'Command'
I:Running command: 'cp "/tmp/recovery.log" "/external_sd"'

Thanks in advance.