Create OTA from Android 7.0 to 9.0

Hi there,

I was wondering if there was any way to create an OTA file to upgrade from Android Nougat to Pie (Or Oreo if required). We need to update a few of our devices via an OTA update and so far it seems impossible to do so.

So is there any to create a proper OTA that will make it possible to update our devices from Nougat (Based off Khadas’s repos) to Pie (Also based off Khadas’s repos).

Thanks!

Hello everybody. I’m also looking for an opportunity to upgrade from android 7 to android 9. while I see a solution through two-step-ota, but this requires the use of a new dtb from the 9th android

I think that maybe it will work through dd, but maybe I’m using the wrong parameters

getprop("ro.product.device") == "X96MINI" || abort("E3004: This package is for \"A95XF1\" devices; this is a \"" + getprop("ro.product.device") + "\".");
if ota_zip_check() == "1" then
backup_update_package("/dev/block/mmcblk0", "1894");
package_extract_file("logo.img", "/dev/block/logo");
write_dtb_image(package_extract_file("dt.img"));
package_extract_file("recovery.img", "/dev/block/recovery");
ui_print("update bootloader.img...");
write_bootloader_image(package_extract_file("bootloader.img"));
ui_print("update dtbo.img...");
package_extract_file("dtbo.img", "/dev/block/dtbo");
ui_print("update dtb.img...");
delete_file("/cache/recovery/dtb.img");
delete_file("/cache/recovery/recovery.img");
reboot_recovery();
else
ui_print("Target: OnePlus/OnePlus6/OnePlus6:8.1.0/OPM1.171019.011/06140300:user/release-keys");
show_progress(0.650000, 0);
ui_print("update bootloader.img...");
package_extract_file("bootloader.img", "/tmp/bootloader.img");
run_program("/sbin/busybox","dd","if=/tmp/bootloader.img","of=/dev/block/mmcblk0","bs=512","conv=sync");
run_program("/sbin/busybox","rm","/tmp/bootloader.img");
ui_print("update ENV.img...");
package_extract_file("env.img", "/tmp/env.img");
run_program("/sbin/busybox","dd","if=/tmp/env.img","of=/dev/block/mmcblk0","bs=512","seek=2531328","conv=sync");
run_program("/sbin/busybox","rm","/tmp/env.img");
ui_print("update logo.img...");
package_extract_file("logo.img", "/tmp/logo.img");
run_program("/sbin/busybox","dd","if=/tmp/logo.img","of=/dev/block/mmcblk0","bs=512","seek=2564096","conv=sync");
run_program("/sbin/busybox","rm","/tmp/logo.img");
ui_print("Patching Recovery image unconditionally...");
package_extract_file("recovery.img", "/tmp/recovery.img");
run_program("/sbin/busybox","dd","if=/tmp/recovery.img","of=/dev/block/mmcblk0","bs=512","seek=2596864","conv=sync");
run_program("/sbin/busybox","rm","/tmp/recovery.img");
ui_print("Patching DTB image unconditionally...");
package_extract_file("misc.img", "/tmp/misc.img");
run_program("/sbin/busybox","dd","if=/tmp/misc.img","of=/dev/block/mmcblk0","bs=512","seek=2662400","conv=sync");
run_program("/sbin/busybox","rm","/tmp/misc.img");
ui_print("Patching DTB image unconditionally...");
package_extract_file("dtbo.img", "/tmp/dtbo.img");
run_program("/sbin/busybox","dd","if=/tmp/dtbo.img","of=/dev/block/mmcblk0","bs=512","seek=2695168","conv=sync");
run_program("/sbin/busybox","rm","/tmp/dtbo.img");
ui_print("Patching BOOT image unconditionally...");
package_extract_file("boot.img", "/tmp/boot.img");
run_program("/sbin/busybox","dd","if=/tmp/boot.img","of=/dev/block/mmcblk0","bs=512","seek=2809856","conv=sync");
run_program("/sbin/busybox","rm","/tmp/boot.img");
ui_print("Patching VBimg image unconditionally...");
package_extract_file("vbmeta.img", "/tmp/vbmeta.img");
run_program("/sbin/busybox","dd","if=/tmp/vbmeta.img","of=/dev/block/mmcblk0","bs=512","seek=2957312","conv=sync");
run_program("/sbin/busybox","rm","/tmp/vbmeta.img");
ui_print("Patching VENDOR image unconditionally...");
package_extract_file("vendor.img", "/tmp/vendor.img");
run_program("/sbin/busybox","dd","if=/tmp/vendor.img","of=/dev/block/mmcblk0","bs=512","seek=3059712","conv=sync");
run_program("/sbin/busybox","rm","/tmp/vendor.img");
ui_print("Patching System image unconditionally...");
block_image_update("/dev/block/system", package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat");
run_program("/sbin/busybox","dd","if=/dev/block/system","of=/dev/block/mmcblk0","bs=512","seek=4009984","conv=sync");
show_progress(0.100000, 0);
ui_print("Patching odm image unconditionally...");
package_extract_file("odm.img", "/tmp/odm.img");
run_program("/sbin/busybox","dd","if=/tmp/odm.img","of=/dev/block/mmcblk0","bs=512","seek=3731456","conv=sync");
run_program("/sbin/busybox","rm","/tmp/odm.img");
ui_print("Patching PRODUCT image unconditionally...");
package_extract_file("product.img", "/tmp/product.img");
run_program("/sbin/busybox","dd","if=/tmp/product.img","of=/dev/block/mmcblk0","bs=512","seek=7262208","conv=sync");
run_program("/sbin/busybox","rm","/tmp/product.img");
if get_update_stage() == "2" then
ui_print("wipe...");
endif;
ui_print("STEP2...");
endif;
ui_print("STEP3...");
set_progress(1.000000);