OnePlus X (onyx) adb sideload failed

build-issues
support
oneplus

#1

Hi

I try to install /e/ on my OPX by following these steps :

My device initially run a lineageOS ROM

The install failed when I run the adb sideload e-0.5-n-201905099519-dev-onyx.zip
Here is the message :

Starting ADB sideload feature…
Installing zip file '/sideload/package.zip'
oppo.verify_trustzone() failed to read current TZ
version: 2
Updater process ended with ERROR: 7

Any help would be appreciated :sweat_smile:


#2

is twrp installed complied ?

is ‘adb devices’ showing your device ?

is adb sideload activated in twrp ?

if all is are *yes’ than you can transfer the also the zip file exxplorer from your pc


#3

Hi @harvey186 thank you very much for your reply.
I can confirm that all your questions are answered with a yes
The file I used is e-0.5-n-201905099519-dev-onyx.zip available at https://images.ecloud.global/dev/onyx/


#4

the real adb command I used is more like :

adb sideload /path/to/e-0.5-n-201905099519-dev-onyx.zip

#5

When I run fastboot devices I got error message

ERROR: Couldn't create a device interface iterator: (e00002bd)
ERROR: Couldn't create a device interface iterator: (e00002bd)
9fc82513	fastboot


#6

boot into twrp.
on your pc go into the folder where your zipis located
try adb shell "cd /data/local && mkdir tmp"
then adb push e-0.5-n-201905099519-dev-onyx.zip /data/local/tmp

if this will work successfull you csn flash the zip via TWRP / install


#7

Thank you @harvey186
Here is the logs I got

Updating partition details…
Failed to mount '/firmware' (Invalid argument)
Failed to mount '/system' (Invalid argument)
Failed to mount '/data' (Invalid argument)
Failed to mount '/cache' (Invalid argument)
Failed to mount '/persist' (Invalid argument)
…done
Unable to mount storage

#8

ah, ok, which command is showing this ?

and could you try this:’?


#9

It is the TWRP / install command.


#10

ok, than twrp isn’t installed, which clarify a lot. Tahn ls use this guide


#11

I follow the steps described here https://wiki.lineageos.org/devices/onyx/install#installing-a-custom-recovery-using-fastboot
My OPX now boot exclusively on TWRP twrp-3.3.0-0-onyx.img since I wipe everything

I retry the steps you mentioned with the old img version twrp-3.0.2-1-onyx.img

adb shell "cd /data/ && mkdir local"

then I run

adb shell "cd /data/local && mkdir tmp"

then

adb push e-0.5-n-201905099519-dev-onyx.zip /data/local/tmp

then I run the TWRP Install on /data/local/tmp/e-0.5-n-201905099519-dev-onyx.zip

Here is the TWRP results logs

MTP Enabled
Installing zip file '/data/local/tmp/e-0.5-n-201905099519-dev-onyx.zip'
Checking for MD5 file…
Skipping MD5check: no MD5 file found
oppo.verify_trustzone() failed to read current TZ version 2
Updater process ended with ERROR: 7
Error installing zip file '/data/local/tmp/e-0.5-n-201905099519-dev-onyx.zip'
Updating partition details…
Failed to mount '/firmware' (Invalid argument)
Failed to mount '/system' (Invalid argument)
Failed to mount '/data' (Invalid argument)
Failed to mount '/cache' (Invalid argument)
Failed to mount '/persist' (Invalid argument)
…done
Unable to mount storage

#12

Maybe a problem linked with that ?


#13

is a know problem on a lot of devices. Here is a solution, which works on all devoces


#14

When you can boot in this twrp, you are on a good :baby:away.
When your are in this twrp you are able to format data and wipe system, cache and ART/davlik.
And your PC must “see" your device and you must be able to copy the e.zip on your device.
After copy the zip you can flash it via twrp.

If you will get the error 7 while flashing e use the solution I have posted earlier


#15

I follow your solution and now i got

Invalid zip file format

:pensive:


#16

I think I did the same mistake. You have to zip the 6-7 things that are inside the “e-0.5-n-…” folder and not the “e-0.5-n-…” folder.


#17

better but not good.

Installing zip file '/data/local/tmp/e.zip'
Checking for Digest file…
could not detect filesystem for /dev/block/platform/msm_sdcc.1/by-name/system, assuming ext4
mount : failed to mount /dev/block/platform/msm_sdcc.1/by-name/system at /system: no such volume could not detect filesystem for /dev/block/platform/msm_sdcc.1/by-name/userdata, assuming f2fs
mount : failed to mount /dev/block/platform/msm_sdcc.1/by-name/userdata at /data: No such file or director unmount of /data failed; no such volume
Patching system image unconditionally…
E1001: Failed to update system image.
Updater process ended with ERROR: 7
Error installing zip file 'data/local/tmp/e/zip'
Failed to mount '/firmware' (Invalid argument)
Failed to mount '/system' (Invalid argument)
Failed to mount '/data' (Invalid argument)
Failed to mount '/cache' (Invalid argument)
Failed to mount '/persist' (Invalid argument)
…done
Unable to mount storage

Here is the updater-script file content :

ifelse(is_mounted("/system"), unmount("/system"));
package_extract_dir("install", "/tmp/install");
set_metadata_recursive("/tmp/install", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644);
set_metadata_recursive("/tmp/install/bin", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755);
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "backup");
unmount("/system");
if is_mounted("/data") then
package_extract_file("META-INF/org/lineageos/releasekey", "/tmp/releasekey");
run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
else
mount("f2fs", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data", "");
package_extract_file("META-INF/org/lineageos/releasekey", "/tmp/releasekey");
run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
unmount("/data");
endif;
show_progress(0.750000, 0);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/platform/msm_sdcc.1/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat") ||
  abort("E1001: Failed to update system image.");
show_progress(0.020000, 10);
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "restore");
unmount("/system");
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
show_progress(0.200000, 10);
set_progress(1.000000);

#18

What kind of update do you do ? Is your device a A/B device ? If yes, I was wrong, because I thought your TWRP was installed correct.

There are several guides how to install TWRP on a A/B device like this (for tissot)
1)fastboot boot recovery.img (https://dl.twrp.me/tissot/twrp-3.3.0-2-tissot.img)

2)Change Partition slot using twrp[Reboot–> Change_Slot]
(for example, if you’re in slot A, change it to Slot B and Vice versa)

3)flash twp-installer.zip (https://dl.twrp.me/tissot/twrp-installer-3.3.0-2-tissot.zip)

4)fastboot reboot recovery (else do it manually by hardware key combination power+volume up)

  1. copy ROM to device via MTP (file manager of PC)

  2. flash ROM via recovery


#19

I don’t have the feature Reboot/Change_Slot on my TWRP device so I suppose that my device is not “A/B device”


#20

mhm, I’m a little confused and I think I can’t find a solution for your device/problem. But I have found this here in forum. Hope it will help you