I am trying to implement OTA functionality for a msm8998 board running Android 8.1. I've generated the OTA file and followed the standard way of doing it,
I've run into two problems, solving either one would solve the issue:
...
Finding update package...
I:Update location: /data/update.zip
Opening update package...
E:Failed to mount /data: Invalid argument
E:Unable to open '/data/update.zip': No such file or directory
E:failed to map file
W:failed to read uncrypt status: No such file or directory
W:Failed to read /sys/class/thermal/thermal_zone28/temp: Invalid argument
W:Failed to read /sys/class/thermal/thermal_zone27/temp: Invalid argument
I:current maximum temperature: 44756
I:/data/update.zip
I:0
I:time_total: 0
I:retry: 0
I:temperature_start: 44814
I:temperature_end: 44756
I:temperature_max: 44814
I:
Installation aborted.
Turns out you have to use RecoverySystem.installPackage(...)
method AND have the OTA file be in /data/
.
Previously I had tried RecoverySystem.installPackage(...)
method but with file in /sdcard/
, and separately by setting /cache/recovery/command
myself and using /data/
When using RecoverySystem.installPackage(...
) and the file in /data/
, seems uncrypt
is run on it before reboot, and that makes the update accessible to the recovery.