• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

N5X stuck with Device Corrupted screen after sideloading 7.1.1 DP2 OTA

Search This thread

RusherDude

Senior Member
Aug 24, 2012
2,013
615
Well, I was on Nougat and got the link for the fullOTA for N5X DP2 so said let's sideload it. (Link I found was https://android.googleapis.com/pack.../e5ded09c7ba5eb75e1bc576647f8ac4d9dccfe65.zip if you sideload it you may end up in my situation! )

When it was about 45% on the adb line command, after verifying, it said installing for a sec and the phone rebooted. The line command had an error which said "*failed to read command: Success" and stopped sending the file. The phone shown the "Your device is corrupt red warning" screen and moved directly to recovery where it shown the "locked" recovery android icon and 3 balls at the bottom of the screen (2 full and 1 empty), like 2/3 step going on (installer is apparently multi-step)

Code:
(!less_than_int(1478830170, getprop("ro.build.date.utc"))) || abort("E3003: Can't install this package (Fri Nov 11 02:09:30 UTC 2016) over newer build (" + getprop("ro.build.date") + ").");
getprop("ro.product.device") == "bullhead" || abort("E3004: This package is for \"bullhead\" devices; this is a \"" + getprop("ro.product.device") + "\".");

if get_stage("/dev/block/platform/soc.0/f9824900.sdhci/by-name/misc") == "2/3" then

  package_extract_file("recovery.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/recovery");
  set_stage("/dev/block/platform/soc.0/f9824900.sdhci/by-name/misc", "3/3");
  reboot_now("/dev/block/platform/soc.0/f9824900.sdhci/by-name/misc", "recovery");

else if get_stage("/dev/block/platform/soc.0/f9824900.sdhci/by-name/misc") == "3/3" then

  ui_print("Target: google/bullhead/bullhead:7.1.1/NPF26F/3468883:user/release-keys");
  show_progress(0.650000, 0);
  ui_print("Patching system image unconditionally...");
  block_image_update("/dev/block/platform/soc.0/f9824900.sdhci/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.100000, 0);
  ui_print("Patching vendor image unconditionally...");
  block_image_update("/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor", package_extract_file("vendor.transfer.list"), "vendor.new.dat", "vendor.patch.dat") || abort("E2001: Failed to update vendor image.");
  show_progress(0.050000, 5);
  package_extract_file("boot.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/boot");
  show_progress(0.200000, 10);
  ui_print("Writing bootloader...");
  package_extract_file("bootloader-flag.txt", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/misc");
  package_extract_file("bootloader.sbl1.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/sbl1bak");
  package_extract_file("bootloader.tz.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/tzbak");
  package_extract_file("bootloader.rpm.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/rpmbak");
  package_extract_file("bootloader.aboot.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/abootbak");
  package_extract_file("bootloader.pmic.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/pmicbak");
  package_extract_file("bootloader.hyp.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/hypbak");
  package_extract_file("bootloader.keymaster.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/keymasterbak");
  package_extract_file("bootloader.cmnlib.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/cmnlibbak");
  lge_bullhead_update_gpt();
  package_extract_file("bootloader.sbl1.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/sbl1");
  package_extract_file("bootloader.tz.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/tz");
  package_extract_file("bootloader.rpm.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/rpm");
  package_extract_file("bootloader.aboot.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/aboot");
  package_extract_file("bootloader.pmic.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/pmic");
  package_extract_file("bootloader.hyp.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/hyp");
  package_extract_file("bootloader.keymaster.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/keymaster");
  package_extract_file("bootloader.cmnlib.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/cmnlib");
  lge_bullhead_recover_gpt();
  package_extract_file("bootloader.sdi.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/sdi");
  package_extract_file("bootloader.imgdata.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/imgdata");
  package_extract_file("bootloader.sec.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/sec");
  package_extract_file("bootloader-flag-clear.txt", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/misc");
  ui_print("Writing radio...");
  package_extract_file("radio.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/modem");
  set_stage("/dev/block/platform/soc.0/f9824900.sdhci/by-name/misc", "");

else

  package_extract_file("recovery.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/boot");
  set_stage("/dev/block/platform/soc.0/f9824900.sdhci/by-name/misc", "2/3");
  reboot_now("/dev/block/platform/soc.0/f9824900.sdhci/by-name/misc", "");

endif;
endif;

set_progress(1.000000);

So checking the installer I though well, it did step 1/3 which was to flash boot and now is on 2/3 by partition misc and should do that step, but it was in "normal recovery mode" and had to unlock recovery with the buttons combinations to see nothing had changed (but the recovery said I was on 7.1.1 DP2). So I said let's try to sideload the full ota again, maybe its in "2/3" status and will work, but it happens the very same again, it reboots, corrupt device and moves directly to recovery showing the 2/3 balls. It's like when sideloading it cannot set stages and gets in a bucle apparently. And doesn't let the user boot system normall, gets stuck in recovery bucle.

This particular N5X has not bootloader unlocked so no way to flash another version, and when trying to sideload some stable version OTA it gives out the E3003 error because it's older than the DP2 (why the **** you can't flash last Nougat over the DP???). Probably when the next December Nougat version appears I will be able to flash it over this due date, but right now it's stuck..

Anyone knows how to fix the bucle to continue or why this happens? I will be able to flash the nougat december release probably but it will be good if it could be fixed before anyway, it's so strange and I feel this may happen on the stable full ota for 7.1.1 later this year.. if we cannot sideload multi-stage otas, this is an issue!!!!!!!!
 
Last edited:

Tech_Savvy

Senior Member
May 8, 2014
1,504
682
watertown
I captured the fullOTA link for DP2 in one of my N5X and sideloaded it on the other. I even pasted the link on the first message..

ahh well I have no idea, i guess i never mess with a locked device, I need twrp or fastboot before i trust anything and reading this just reassures me:p

edit this is causing ur error, there an unexpected file size or something (!less_than_int(1478830170,"
 
Last edited:

RusherDude

Senior Member
Aug 24, 2012
2,013
615
ahh well I have no idea, i guess i never mess with a locked device, I need twrp or fastboot before i trust anything and reading this just reassures me:p

edit this is causing ur error, there an unexpected file size or something (!less_than_int(1478830170,"

No.. the DP2 started flashing and the recovery says its on 7.1.1 on a Build of 11 nov, thats why recovery fails to flash Nougat november patch from 1 november, which is retarded because why can't you flash STABLE over DP??? it's soo retarded.

But the problem is not trying to flash an older ota, the problem is why the ota got the phone stuck on this point.


Thanks! Thats a way to unbrick, but I was interested in recovering without such methods and understanding why this multi staged ota failed :good:
 
Last edited:

sfhub

Senior Member
Oct 23, 2008
5,342
7,219
Have you tried signing off of beta on the other 5x then capturing the OTA they use to get you back to Nougat?

Presumably that script will flash using 7.1.1 recovery.
 
  • Like
Reactions: RusherDude

RusherDude

Senior Member
Aug 24, 2012
2,013
615
Have you tried signing off of beta on the other 5x then capturing the OTA they use to get you back to Nougat?

Presumably that script will flash using 7.1.1 recovery.

Good idea, tested it on a friends N5X aand fail... from DP2 to Nougat it's an incremental OTA, not full OTA and fails to patch partitions because the DP2 ota didnt flash them directly (it's the last step, doesn't get there) :(

Any idea to flash this patch? This sux :'(
 
Last edited:

RusherDude

Senior Member
Aug 24, 2012
2,013
615
Thanks a lot for the help, but I managed to fix it without using the LG tool!!!!!

I discovered a thing:
- When it booted with "Device is corrupt" screen and the boot partition forced to boot always in recovery, the recovery was getting the getprop values (date from the build, fingerprint, device), from the BOOT partition.
- But when you boot recovery DIRECTLY from the bootloader, the recovery gets the getprops values from the SYSTEM PARTITION.

So in this case, since in the stage 1 on the multi stage ota it only affected the kernel, entering from bootloader I was able to flash just the same OTA I had before trying to had the multi stage OTA, since it compared the dates and stuff with the data in the system partition, aka the old data before the fail flash!!

OMG :D :D :D
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Have you tried signing off of beta on the other 5x then capturing the OTA they use to get you back to Nougat?

    Presumably that script will flash using 7.1.1 recovery.