[Q] Fastboot ``cannot load system.img'' - Samsung Galaxy Nexus

I was flashing my yakjuxw over to yakju, when fastboot started failing to load system.img.
I have tried 4.0.2 and 4.0.1. Every image except for system.img works.
Code:
[[email protected] yakju-itl41f]# fastboot flash system system.img
error: cannot load 'system.img'
And it doesn't work using the zip either;
Code:
[[email protected] yakju-itl41f]# fastboot update *.zip
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
failed to allocate 325426112 bytes
error: update package missing system.img
I am running Archlinux.
Somewhere in the ./flash-all.sh script my ``sdcard'' was wiped, so I've lost my nandroid(s), but I can boot CWM from my PC. Help?

Open the zip file in a explorer-window somewhere and locate the system.img file and then try the first one over again.
None of these files are magic and they are pretty easy to explore to find the components you are looking for.
Are you sure you've unpacked things correctly?
What does the output from "ls -la" run in the the same folder say?

josteink said:
Open the zip file in a explorer-window somewhere and locate the system.img file and then try the first one over again.
None of these files are magic and they are pretty easy to explore to find the components you are looking for.
Are you sure you've unpacked things correctly?
What does the output from "ls -la" run in the the same folder say?
Click to expand...
Click to collapse
I unpacked the zip, so all the images in it are in this folder, but here's the output:
Code:
[[email protected] yakju-itl41f]# ls -la
total 663156
drwxr-x--- 2 david users 4096 Jan 18 20:17 .
drwxr-xr-x 4 david users 4096 Jan 18 20:07 ..
-rw-r----- 1 david users 93 Nov 21 18:20 android-info.txt
-rw-r--r-- 1 david users 4151296 Jan 1 2009 boot.img
-rw-r----- 1 david users 2363392 Nov 24 09:44 bootloader-maguro-primekj10.img
-rwxr-x--- 1 david users 831 Nov 24 09:44 flash-all.sh
-rw-r----- 1 david users 189165717 Nov 24 09:44 image-yakju-itl41f.zip
-rw-r----- 1 david users 12583168 Nov 24 09:44 radio-maguro-i9250xxkk1.img
-rw-r--r-- 1 david users 4491264 Jan 1 2009 recovery.img
-rwxrwxrwx 1 david users 325426112 Jan 1 2009 system.img
-rw------- 1 david users 140856312 Nov 22 11:09 userdata.img

Did you actually ever unlock fast boot? Just guessing here, at this point.
Sent from my Galaxy Nexus using Tapatalk

redownload stock images?

just an update, this is solved. The solution was found in rebooting my pc, which is something I, as a Linux user, seldom do, and my laptop cannot be trusted to boot due to its buggy BIOS.
Sent from my Galaxy Nexus

Korntoff said:
just an update, this is solved. The solution was found in rebooting my pc, which is something I, as a Linux user, seldom do, and my laptop cannot be trusted to boot due to its buggy BIOS.
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
Ridiculously old thread, I realize, so I feel kinda bad bumping it, but it's an early result on Google when searching for this problem, so I'll update a bit.
Rebooting will work, but isn't necessary, and is inconvenient. You just need to kill fastboot, it's hung with another process.
In linux, open up a terminal.
Code:
ps ax|grep fastboot
Note the PID(s)
Code:
kill -9 <PID1> <PID2>...<PIDn>

Another reason for this error is if you have device encryption enabled. In order to restore factory image, you first need to format /data to remove encryption.
I have no idea why this causes the error "cannot load system.img", but it definitely does.

Cerinthus said:
Ridiculously old thread, I realize, so I feel kinda bad bumping it,
In linux, open up a terminal...
Click to expand...
Click to collapse
Thanks for posting this.
In windows, I used task manager to find the ADB process and killed it, and then it worked fine.

groopk said:
Thanks for posting this.
In windows, I used task manager to find the ADB process and killed it, and then it worked fine.
Click to expand...
Click to collapse
To do this without searching thought task manager , just type "adb kill server " and then " adb start server" :thumbup:
Sent from my SCH-I605 using Tapatalk

quite an old thread again, but replying anyway.
The "failed to allocate ***** bytes" message means that it failed on memory of your computer, not on the storage of your phone.
Code:
fastboot.c
...
void *unzip_file(zipfile_t zip, const char *name, unsigned *sz)
{
...
*sz = get_zipentry_size(entry);
datasz = *sz * 1.001;
data = malloc(datasz);
if(data == 0) {
fprintf(stderr, "failed to allocate %d bytes\n", *sz);
return 0;
}
...
If it turns out that your machine has too small memory(unfortunately, which was also my case), you could unzip the file containing img files and flash system, boot and recovery images one by one. It's just the same.

great help
On the verge of flashing lolipop on my beloved n5, I got stuck with that stupid errror.
Thanks for the helpfull post.

downgrade to 4.4.4
just downgrade to 4.4.4 and then flash android 5.... mine worked....

FreakyTux said:
quite an old thread again, but replying anyway.
The "failed to allocate ***** bytes" message means that it failed on memory of your computer, not on the storage of your phone.
Code:
fastboot.c
...
void *unzip_file(zipfile_t zip, const char *name, unsigned *sz)
{
...
*sz = get_zipentry_size(entry);
datasz = *sz * 1.001;
data = malloc(datasz);
if(data == 0) {
fprintf(stderr, "failed to allocate %d bytes\n", *sz);
return 0;
}
...
If it turns out that your machine has too small memory(unfortunately, which was also my case), you could unzip the file containing img files and flash system, boot and recovery images one by one. It's just the same.
Click to expand...
Click to collapse
This was it! Thanks for posting!

Update ADB. That worked for me

same problem
i tried everything above but nothing works ..... can anyone help me out here

Alternate Way that always works..!!
1. Install TWRP recovery.
2. Mount USB Storage
3. Copy the system.img to phone storage
4. Select Install and then Select Install Image
5. Select the system.img file
6. Select partition as system
7. Confirm install
Done..
Korntoff said:
I was flashing my yakjuxw over to yakju, when fastboot started failing to load system.img.
I have tried 4.0.2 and 4.0.1. Every image except for system.img works.
Code:
[[email protected] yakju-itl41f]# fastboot flash system system.img
error: cannot load 'system.img'
And it doesn't work using the zip either;
Code:
[[email protected] yakju-itl41f]# fastboot update *.zip
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
failed to allocate 325426112 bytes
error: update package missing system.img
I am running Archlinux.
Somewhere in the ./flash-all.sh script my ``sdcard'' was wiped, so I've lost my nandroid(s), but I can boot CWM from my PC. Help?
Click to expand...
Click to collapse

rakesh.aggarwal said:
1. Install TWRP recovery.
2. Mount USB Storage
3. Copy the system.img to phone storage
4. Select Install and then Select Install Image
5. Select the system.img file
6. Select partition as system
7. Confirm install
Done..
Click to expand...
Click to collapse
with lots of thanks and much love!! fixed my device yeeyyyy!!!!

Related

Android Kitchen not working properly on Fedora 16 x64 [Solved]

Has anyone been able to get the android kitchen to actually work on Fedora 16 and if so, how?
The reason I ask is because it does start and it does find the system.img and boot.img but its complaining during the working folder set up. See below:
Code:
Creating working folder WORKING_112911_011054 ...
Copying boot.img ...
Copying system.img ...
Adding an update-script ...
Chunk size is 2048 bytes in system.img
Spare size calculated to be 64 bytes
Compiling unyaffs ...
In file included from /usr/include/features.h:387:0,
from /usr/include/sys/types.h:26,
from unyaffs.c:10:
/usr/include/gnu/stubs.h:9:27: fatal error: gnu/stubs-64.h: No such file or directory
compilation terminated.
Error: unyaffs not successfully compiled!
Never mind. I fixed it already.
So I'll share. If you run into that error just open up a new terminal and type:
Code:
su -
yum install glibc-devel.x86_64 --disablerepo=adobe\*
Simple enough, lol
sir
wildstang83 said:
Never mind. I fixed it already.
So I'll share. If you run into that error just open up a new terminal and type:
Code:
su -
yum install glibc-devel.x86_64 --disablerepo=adobe\*
Simple enough, lol
Click to expand...
Click to collapse
do you know how to add device in android kitchen?

Back to Stock (4.1.2 image) and re-root project - Help needed

Hello again.
After having ROMed and MODing to my liking, I decided to go back to stock since the 4.1.2 is up for my GN version (maguro).No other partition has been flashed (radio, kernel, etc).
My goal is to get into a stock state using 4.1.2 images and be unrooted.
I am thinking of booting into fastboot then:
fastboot flash all yakju-jzo54k-factory-92ff9457.tgz
I guess that command should:
- flash everything inside the .tgz
- install stock recovery image
- unroot the phone (?)
but wouldn't clear my data and apps I guess.So afterwards I could either:
- fastboot erase userdata
- lock and unlock the bootloader
The goal is to erase all apps and /sdcard parition.Right or wrong?
After I am set up I would like to root the phone but doing it manually and not via CWM .zip installation.
Is there a guide somewhere explaining what needs to be done for rooting cause searching didn't help much...
Thanks in advance.
The GNex toolkit is your friend....
http://forum.xda-developers.com/showthread.php?t=1392310
Download it, connect to phone to PC and follow the prompts. I recently did the same thing (I'm on VZW) completely unrooted and back to stock when VZW released the 4.1 update. Used it for a week or two and came back to CM10 Nightlies. Used the toolkit and re-rooted and what not....
I would recommend donating and getting the auto update feature activated. The link above includes the most recent released download, but it was actually a ways behind if you have the auto update feature active. The dev does not require a certain amount donated, so I felt $15 was plenty.
(Just checked the download link is 7.8 and the auto update brings you up to 8.2)
TR-909 said:
Hello again.
After having ROMed and MODing to my liking, I decided to go back to stock since the 4.1.2 is up for my GN version (maguro).No other partition has been flashed (radio, kernel, etc).
My goal is to get into a stock state using 4.1.2 images and be unrooted.
I am thinking of booting into fastboot then:
fastboot flash all yakju-jzo54k-factory-92ff9457.tgz
I guess that command should:
- flash everything inside the .tgz
- install stock recovery image
- unroot the phone (?)
but wouldn't clear my data and apps I guess.So afterwards I could either:
- fastboot erase userdata
- lock and unlock the bootloader
The goal is to erase all apps and /sdcard parition.Right or wrong?
After I am set up I would like to root the phone but doing it manually and not via CWM .zip installation.
Is there a guide somewhere explaining what needs to be done for rooting cause searching didn't help much...
Thanks in advance.
Click to expand...
Click to collapse
OK, let's get started.
- extract yakju-jzo54k-factory-92ff9457.tgz (tgz means it's a tar file, further compressed with gzip), in the end you'll see:
valhalla% ls -ltch gimages/yakju-jzo54k
total 246M
-rwxr-xr-x 1 bk201 users 831 Oct 13 10:47 flash-all.sh
-rw-r--r-- 1 bk201 users 2.3M Oct 13 10:46 bootloader-maguro-primelc03.img
-rw-r--r-- 1 bk201 users 232M Oct 13 10:46 image-yakju-jzo54k.zip
-rw-r--r-- 1 bk201 users 13M Oct 13 10:46 radio-maguro-i9250xxlf1.img
-rw-r--r-- 1 bk201 users 789 Oct 13 10:46 flash-base.sh
Click to expand...
Click to collapse
- edit flash-all.sh, which contains:
Code:
fastboot flash bootloader bootloader-maguro-primelc03.img
fastboot reboot-bootloader
sleep 5
fastboot flash radio radio-maguro-i9250xxlf1.img
fastboot reboot-bootloader
sleep 5
fastboot -w update image-yakju-jzo54k.zip
from here, we will flash bootloader, radio, and update-image, but to do it manually, first we need to extract image-yakju-jzo54k.zip.
valhalla% unzip -l gimages/yakju-jzo54k/image-yakju-jzo54k.zip
Archive: gimages/yakju-jzo54k/image-yakju-jzo54k.zip
Length Date Time Name
--------- --------- ----- ----
4472832 2009-01-01 00:00 boot.img
4823040 2009-01-01 00:00 recovery.img
410365584 2009-01-01 00:00 system.img
140856312 2012-10-03 22:09 userdata.img
93 2012-10-02 15:03 android-info.txt
--------- -------
Click to expand...
Click to collapse
- last step, all the files in the same folder (i'm assuming you have fastboot in your path and device in bootloader mode, connected to the pc), enter the following commands:
Code:
1) fastboot flash bootloader bootloader-maguro-primelc03.img
2) fastboot reboot-bootloader
(..device will reboot into bootloader, obviously wait for bootloader screen to come up again)
3) (optional but recommended) fastboot flash radio radio-maguro-i9250xxlf1.img
4) fastboot reboot-bootloader
5) fastboot flash recovery recovery.img
6) fastboot flash boot boot.img
7) fastboot flash system system.img
8) (will wipe /data/media; optional) fastboot flash userdata userdata.img
TR-909 said:
The goal is to erase all apps and /sdcard parition.Right or wrong?
Click to expand...
Click to collapse
It's best to fresh start yes, but userdata is just /data/media.
also, with this process, no need to unroot. /system will be wiped.
if you want to root manually, and i'm pulling this from my head, you just need to push su binary to /system/xbin and chmod 0755 06755 it, and push supersu.apk to /system/app and chmod 0644 it. attention, this will either require the use of an exploit (for example, the one available to root without unlocking bl), or
Code:
fastboot boot cwm_or_twrp.img
....remount system rw (we have temp root because of custom recovery)
Code:
mount -o rw /dev/block/platform/omap/omap_hsmmc.0/by-name/system /system
push su binary/supersu.apk to the previously said locations and set permissions (i've checked a flashable zip i got from efrant and it seems it's 06755)
Code:
adb push supersu/system/xbin/su /sytem/xbin/su
adb shell chmod 06755 /system/xbin/su
adb push supersu/system/bin/su /system/bin/su
adb shell chmod 06755 /system/bin/su
adb push supersu/system/app/Superuser.apk /system/app/Superuser.apk
adb shell chmod 0644 /system/app/Superuser.apk
adb reboot
done. someone please post if i missed/got anything wrong. this is i would go about it.
you could just have read this.
Hey bk201doesntexist.
Actually I read the guide of efrant and was questioning myself about fastboot flash all command but I probably haven't understand it well.I am going to proceed and do all steps as you suggest.
Back to work... will report soon.
Thanks.
EDIT: Currently on 4.1.2 updating gapps, whole procedure took less than 3 minutes including reboots! Didn't thoroughly check new update but first I am going to bring back my apps and stuff through TiB.
About Rooting: so basically I should boot temporarily on CWM and Adb do the root thingie.Ok let me look into it...

[Info] mmcblk* partitons reference of the P6 B107

Located in /dev/block, may be useful
Code:
mmcblk0p1 -> /xloader
mmcblk0p2 -> /round (-empty-)
mmcblk0p3 -> /nvme
mmcblk0p4 -> /misc
mmcblk0p5 -> /splash (-empty-)
mmcblk0p6 -> /oeminfo
mmcblk0p7 -> /reserved1 (-empty-)
mmcblk0p8 -> /reserved2 (-empty-)
mmcblk0p9 -> /splash2
mmcblk0p10 -> /recovery2 (-empty-)
mmcblk0p11 -> /recovery
mmcblk0p12 -> /boot
mmcblk0p13 -> /modemimage
mmcblk0p14 -> /modemnvm
mmcblk0p15 -> /modemnvm2
mmcblk0p16 -> /system
mmcblk0p17 -> /cache
mmcblk0p18 -> /cust
mmcblk0p19 -> /userdata
I took this info opening the direct accesses in /dev/block/platform/hi_mci.1/by-name
To extract the boot or recovery img with dd:
Code:
adb shell
su
dd if=/dev/block/mmcblk0p11 of=/sdcard/recovery.img
dd if=/dev/block/mmcblk0p12 of=/sdcard/boot.img
TheProd said:
To extract the boot or recovery img with dd:
Code:
adb shell
su
dd if=/dev/block/mmcblk0p11 of=/sdcard/recovery.img
dd if=/dev/block/mmcblk0p12 of=/sdcard/boot.img
Click to expand...
Click to collapse
I already extracted recovery.img But i can't unpack it, i use unyaffs.exe but i get "broken image file" D:
Same with the other *.img files
Code:
BOARD_KERNEL_CMDLINE vmalloc=512M k3v2_pmem=1 mmcparts=mmcblk0:p1(xloader),p3(n
me),p4(misc),p5(splash),p6(oeminfo),p7(reserved1),p8(reserved2),p9(splash2),p10
recovery2),p11(recovery),p12(boot),p13(modemimage),p14(modemnvm1),p15(modemnvm2
,p16(system),p17(cache),p18(cust),p19(userdata);mmcblk1:p1(ext_sdcard)
BOARD_KERNEL_BASE 00000000
BOARD_PAGE_SIZE 2048
BOARD_RAMDISK_ADDR 01400000
Unpacking ramdisk to "/ramdisk/" . . .
Compression used: gzip
2085 blocks
Done!
Boot.img unpacked, K3V2 uses ARMv7 Instruction Set. Let's see if we can't get something cooking already
I unpacked recovery and boot too
Sent from my HUAWEI P6-U06 using xda app-developers app
Good show, unless your planning on beginning work on a Custom Recovery what are you going to gain by unpacking the recovery.img?
I see your working on a CM port, so wish you all the best on that. I'll be porting MIUIv5 for the Ascend P6 as I did for a few other devices, also going to have another crack at porting Flyme OS since I already ported 90% to my previous device.
Best Regards,
s89
I unpacked boot and recovery to get info for BoardConfig.mk
Ty
Sent from my HUAWEI P6-U06 using xda app-developers app
If you've already got a build environment setup you may aswel build CWM from CM sources, we have more then enough information here to proceed. Even more convenient considering you have the recovery.img unpacked. Google "Build CWM Cyanogenmod" for more info. Failing that i'll setup a build environment and do so myself tomorrow evening.
Best Regards,
s89
I'm setting up the enviroment to build CWM, i hope to get it done in a few hours, anyways, i got bad news. My laptop screen broke today, and i send it to repair tomorrow and i don't know how much time will take :/
S34Qu4K3 said:
I'm setting up the enviroment to build CWM, i hope to get it done in a few hours, anyways, i got bad news. My laptop screen broke today, and i send it to repair tomorrow and i don't know how much time will take :/
Click to expand...
Click to collapse
Aww man that's unfortunate, wishing a speedy recovery for said laptop aha. Are you continuing the build on another machine or using an external monitor for the meantime?
Best Regards,
s89
Stickman89 said:
Aww man that's unfortunate, wishing a speedy recovery for said laptop aha. Are you continuing the build on another machine or using an external monitor for the meantime?
Best Regards,
s89
Click to expand...
Click to collapse
I got an small laptop and a pc, i have to install linux and will continue working (i think) i expect to be at least 1 week without my laptop (maybe i got it with screen broken ultil i wait the new screen)
Dam git sync, so ****ing long
Just a question, if i have in my .fstabfile the partition routes this way:
Code:
/dev/block/platform/hi_mci.1/by-name/sdcard
I have to change it to
Code:
/dev/block/mcblk....
In BoardConfig.mk or can i let it original? Looks the same for me, /dev/block/platform/hi_mci.1/by-name/ points the mcblk, i want to be sure
S34Qu4K3 said:
Just a question, if i have in my .fstabfile the partition routes this way:
Code:
/dev/block/platform/hi_mci.1/by-name/sdcard
I have to change it to
Code:
/dev/block/mcblk....
In BoardConfig.mk or can i let it original? Looks the same for me, /dev/block/platform/hi_mci.1/by-name/ points the mcblk, i want to be sure
Click to expand...
Click to collapse
EXT SDCard Mounts at:
Code:
/dev/block/mmcblk1p1
so your recovery.fstab should be setup like...
Code:
/sdcard vfat /dev/block/mmcblk1p1
So yup it needs to be changed to the second option.
I'm still syncing too... -.- ...zZzZzZzZz tired
Best Regards,
s89​
Stickman89 said:
EXT SDCard Mounts at:
Code:
/dev/block/mmcblk1p1
so your recovery.fstab should be setup like...
Code:
/sdcard vfat /dev/block/mmcblk1p1
So yup it needs to be changed to the second option.
I'm still syncing too... -.- ...zZzZzZzZz tired
Best Regards,
s89​
Click to expand...
Click to collapse
But /dev/block/platform/hi_mci.1/by-name/sdcard points to /dev/block/mmcblk1p1, so it shouldn't be necessary (i'll use /dev/block/mmcblk1p1 style, to be sure anyway)
In 4 hours, i leave my lapton in the shop, in another hour, i got it repaired (115€ D
I've built CWM from CM sources. Haven't tried it as of yet though.
Flash at your OWN risk. I will not take responsibility for any actions taken by the user in combination with the provided file... By downloading this image your accepting full liability for any issues that should arise as a result of undergoing ANY flashing/modding on YOUR device.
Removed for the time being! Do not use...
Best Regards,
s89
Stickman89 said:
I've built CWM from CM sources. Haven't tried it as of yet though.
Flash at your OWN risk. I will not take responsibility for any actions taken by the user in combination with the provided file... By downloading this image your accepting full liability for any issues that should arise as a result of undergoing ANY flashing/modding of your device.
Best Regards,
s89
Click to expand...
Click to collapse
My repo still 93% ;___;
Why you don't make a thread posting it??
Good job bro
We can try recoverys without flash using fastboot? Like the kernel?
S34Qu4K3 said:
My repo still 93% ;___;
Why you don't make a thread posting it??
Good job bro
We can try recoverys without flash using fastboot? Like the kernel?
Click to expand...
Click to collapse
I've tried "fastboot boot recovery.img" to no avail. The output is as follows...
Output:
Code:
downloading 'boot.img'...
OKAY [ 0.193s]
booting...
FAILED (remote: invalid command)
finished. total time: 0.194s
As you can see... It's expecting a boot.img so this command is only available for booting ramdisk & kernel.
Stickman89 said:
I've tried "fastboot boot recovery.img" to no avail. The output is as follows...
Output:
Code:
downloading 'boot.img'...
OKAY [ 0.193s]
booting...
FAILED (remote: invalid command)
finished. total time: 0.194s
As you can see... It's expecting a boot.img so this command is only available for booting ramdisk & kernel.
Click to expand...
Click to collapse
So, we have to flash it... Bad bad...D:
I tried fastboot boot recovery recovery.img but i get:
Code:
fastboot boot recovery recovery.img
cannot load 'recovery'
I don't think that command is applicable until post flash as according to cyanogenmod documentation:
Code:
Installing recovery using fastboot
You can use fastboot to install your recovery image to the device.
Installing ClockworkMod Recovery on the device
Connect the device to the computer via USB.
Make sure the fastboot binary is in your PATH or that you place the downloaded image in the same directory as fastboot.
Open a terminal on your PC and reboot the device into fastboot mode by typing adb reboot bootloader or by using the hardware key combination.
Once the device is in fastboot mode, verify your PC sees the device by typing fastboot devices
If you don't see your device serial number, and instead see "<waiting for device>", fastboot is not configured properly on your machine. See fastboot documentation for more info.
Flash ClockworkMod Recovery onto your device by entering the following command: fastboot flash recovery your_recovery_image.img where the latter part is the name of the file you downloaded.
Once the flash completes successfully, reboot the device into recovery to verify the installation. This can be done by typing fastboot boot your_recovery_image.img.
Note: Some ROMs overwrite recovery at boot time so if you do not plan to immediately boot into recovery to install CyanogenMod, please be aware that this may overwrite your custom recovery with the stock one.

Cannot boot to system - Always boot to TWRP

I've recently tried out some Generic System Images (or Project Treble ROMs). I did this by flashing the system.img and then doing a factory reset after every image. Some images later I wanted to go back to my daily system.img but It stopped working.
I don't know which step cause this error, but since I flashed my daily system.img again and wanted to boot it, it would always boot into TWRP.
I really don't know how to handle this error since I don't have the knowledge but I'll try to supply as much information as possible, starting with TWRP Logs
One strange thing I noticed is this:
Code:
ro.product.name=omni_berlin
ro.product.board=hi6250
ro.product.brand=Honor
ro.product.model=HONOR-6X
ro.product.device=berlin
ro.product.locale=en-US
ro.product.platform=hi6250
It says Honor-6X although I'm using the 7X and didn't flash anything for the 6X, but it seems like I must have overlooked something...
recovery.log
dmesg.log (1/2)
dmesg.log (2/2)
I'll provide any information needed as soon as possible and I'll be very thankful for any help!
Edit: I usually use [ROM][8.1][OpenKirin's RROS Oreo v6.0.0 - For Honor 7X], but today I've tries these:
[8.1.0][TREBLE] Pixel Experience [AOSP][r26][2018/05/27]
[Resurrection Remix] [Unofficial] [2018-05-19] Phh-Treble
[Lineage] [Unofficial] [2018-05-19] Phh-Treble
supervis0r said:
I've recently tried out some Generic System Images (or Project Treble ROMs). I did this by flashing the system.img and then doing a factory reset after every image. Some images later I wanted to go back to my daily system.img but It stopped working.
I don't know which step cause this error, but since I flashed my daily system.img again and wanted to boot it, it would always boot into TWRP.
I really don't know how to handle this error since I don't have the knowledge but I'll try to supply as much information as possible, starting with TWRP Logs
One strange thing I noticed is this:
Code:
ro.product.name=omni_berlin
ro.product.board=hi6250
ro.product.brand=Honor
ro.product.model=HONOR-6X
ro.product.device=berlin
ro.product.locale=en-US
ro.product.platform=hi6250
It says Honor-6X although I'm using the 7X and didn't flash anything for the 6X, but it seems like I must have overlooked something...
recovery.log
dmesg.log (1/2)
dmesg.log (2/2)
I'll provide any information needed as soon as possible and I'll be very thankful for any help!
Edit: I usually use [ROM][8.1][OpenKirin's RROS Oreo v6.0.0 - For Honor 7X], but today I've tries these:
[8.1.0][TREBLE] Pixel Experience [AOSP][r26][2018/05/27]
[Resurrection Remix] [Unofficial] [2018-05-19] Phh-Treble
https://forum.xda-developers.com/project-treble/trebleenabled-device-development/lineage-phh-treble-t3767690
Click to expand...
Click to collapse
The recovery was borrowed. or ported from Honor 6x, so that line is not a concern.
As far as the logs, I browsed through them. Nothing jumps out to me. There is some selinux permissive = 0 type errors, but dont think that is causing your problem.
I had to use stock recovery to do wipes (factory reset) between different treble rom installs. Without i had bootloop. I never had forced boot to recovery. .
as long as frp is not locked i would suggest flashing stock recovery to try a reset. And if it boots, put twrp back.
mrmazak said:
The recovery was borrowed. or ported from Honor 6x, so that line is not a concern.
As far as the logs, I browsed through them. Nothing jumps out to me. There is some selinux permissive = 0 type errors, but dont think that is causing your problem.
I had to use stock recovery to do wipes (factory reset) between different treble rom installs. Without i had bootloop. I never had forced boot to recovery. .
as long as frp is not locked i would suggest flashing stock recovery to try a reset. And if it boots, put twrp back.
Click to expand...
Click to collapse
Thanks for your fast response.
I've tried installing the stock recovery but I either get a 'Software install failed!' message and can only choose to reboot out of the recovery or it fails to flash through fastboot with this error message 'FAILED (remote: partition length get error)'
I've tried the recovery I can download through the Huawei Multi-Tool 8.0.4.9 'SR_BND-L21_B3xx_EMUI8.img' <- This flashed successfully but I get the Software install failed message.
And I've tried the recovery from this Google Drive folder 'BND-RECOVERY-NoCheck.img' but here I'll get the partition length error while trying to flash it through fastboot.
I think I caused the Software install failed through trying to reset my phone using these instructions
Code:
- Type in these commands:
dd if=/external_sd/BND-RECOVERY-NoCheck.img of=/dev/block/bootdevice/by-name/recovery
dd if=/external_sd/BND-RECOVERY-NoCheck.img of=/dev/block/bootdevice/by-name/recovery2
- If those went well type these as next:
echo --update_package=/sdcard/update.zip > /cache/recovery/command
echo --update_package=/sdcard/update_data_full_public.zip >> /cache/recovery/command
echo --update_package=/sdcard/update_full_BND-L21C_hw_eu.zip >> /cache/recovery/command
I've replaced 'external_sd' and 'sdcard' with 'usbotg' since I had the files on a usbotg device and not on an external sd card.
supervis0r said:
Thanks for your fast response.
I've tried installing the stock recovery but I either get a 'Software install failed!' message and can only choose to reboot out of the recovery or it fails to flash through fastboot with this error message 'FAILED (remote: partition length get error)'
I've tried the recovery I can download through the Huawei Multi-Tool 8.0.4.9 'SR_BND-L21_B3xx_EMUI8.img' <- This flashed successfully but I get the Software install failed message.
And I've tried the recovery from this Google Drive folder 'BND-RECOVERY-NoCheck.img' but here I'll get the partition length error while trying to flash it through fastboot.
I think I caused the Software install failed through trying to reset my phone using these instructions
Code:
- Type in these commands:
dd if=/external_sd/BND-RECOVERY-NoCheck.img of=/dev/block/bootdevice/by-name/recovery
dd if=/external_sd/BND-RECOVERY-NoCheck.img of=/dev/block/bootdevice/by-name/recovery2
- If those went well type these as next:
echo --update_package=/sdcard/update.zip > /cache/recovery/command
echo --update_package=/sdcard/update_data_full_public.zip >> /cache/recovery/command
echo --update_package=/sdcard/update_full_BND-L21C_hw_eu.zip >> /cache/recovery/command
I've replaced 'external_sd' and 'sdcard' with 'usbotg' since I had the files on a usbotg device and not on an external sd card.
Click to expand...
Click to collapse
I have been trying to get usbotg to work, with that method. Twrp recognize s it but the no-check recovery does not.
And the partition you are calling for recovery are wrong for emui8
Both the recovery file you are using and the partition name are nougat.
Oreo partition name is "recovery_ramdisk"
Do not do it to recovery2, "erecovery". It is not needed, or advised.
I have made this manual install process into an install zip. For twrp.
You can see it here
https://forum.xda-developers.com/honor-7x/how-to/guide-honor-7x-flash-oreo-update-t3781649
mrmazak said:
I have been trying to get usbotg to work, with that method. Twrp recognize s it but the no-check recovery does not.
And the partition you are calling for recovery are wrong for emui8
Both the recovery file you are using and the partition name are nougat.
Oreo partition name is "recovery_ramdisk"
Do not do it to recovery2, "erecovery". It is not needed, or advised.
Click to expand...
Click to collapse
Just before I read this message I retried it, I used these commands through TWRP
Code:
echo --update_package=/sdcard/update.zip > /cache/recovery/command
echo --update_package=/sdcard/update_data_full_public.zip >> /cache/recovery/command
echo --update_package=/sdcard/update_full_BND-L21C_hw_eu.zip >> /cache/recovery/command
and then flashed the recovery through Huawei Multi-Tool on recovery_ramdisk.
After a reboot the stock recovery showed up, and did something like verifying the update package (i couldn't read it since it passed very fast) and then stayed at 5% installing.
I now managed to get eRecovery to work but when i choose 'Wipe data/factory reset' it reboots back into eRecovery where it stops at exactly 5%, showing Reset failed!
Edit: I am now downloading a FullOTA-MF-PV for BND-L21 8.0.0.330(C432CUSTC432D2) and will try to follow your tutorial for updates while on Oreo.
supervis0r said:
Just before I read this message I retried it, I used these commands through TWRP
Code:
echo --update_package=/sdcard/update.zip > /cache/recovery/command
echo --update_package=/sdcard/update_data_full_public.zip >> /cache/recovery/command
echo --update_package=/sdcard/update_full_BND-L21C_hw_eu.zip >> /cache/recovery/command
and then flashed the recovery through Huawei Multi-Tool on recovery_ramdisk.
After a reboot the stock recovery showed up, and did something like verifying the update package (i couldn't read it since it passed very fast) and then stayed at 5% installing.
I now managed to get eRecovery to work but when i choose 'Wipe data/factory reset' it reboots back into eRecovery where it stops at exactly 5%, showing Reset failed!
Click to expand...
Click to collapse
Did install go past 5% ?
If not did you force it reboot to get out.
Do you have those update files on your sdcard?
If you have those files are they the correct ones for your region device?
mrmazak said:
Did install go past 5% ?
If not did you force it reboot to get out.
Do you have those update files on your sdcard?
If you have those files are they the correct ones for your region device?
Click to expand...
Click to collapse
I was thinking about forcing it to reboot since it stayed at 5% for some time, but eventually it rebooted by itself but as it did that it was still at 5%.
I might have used the wrong files since I already tried out a lot of things and didn't organize all those files at all :/
I will now retry this using the files I have stated in the update of my previous post and also using your zip file.
I put the files into the root directory of my sd card. So the root directory looks like this
Code:
PS J:\> ls
Verzeichnis: J:\
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 29.05.2018 22:09 21276664 update_data_full_public.zip
-a---- 29.05.2018 22:18 1834159779 update.zip
-a---- 29.05.2018 22:11 715530773 update_full_BND-L21C_hw_eu.zip
-a---- 29.05.2018 22:08 37144576 BND-RECOVERY-NoCheck.img
-a---- 06.04.2018 09:37 33554432 SR_BND-L21_B3xx_EMUI8.img
-a---- 29.05.2018 22:36 15024128 complete_twrp_ramdisk.img
supervis0r said:
I was thinking about forcing it to reboot since it stayed at 5% for some time, but eventually it rebooted by itself but as it did that it was still at 5%.
I might have used the wrong files since I already tried out a lot of things and didn't organize all those files at all :/
I will now retry this using the files I have stated in the update of my previous post and also using your zip file.
I put the files into the root directory of my sd card. So the root directory looks like this
Code:
PS J:\> ls
Verzeichnis: J:\
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 29.05.2018 22:09 21276664 update_data_full_public.zip
-a---- 29.05.2018 22:18 1834159779 update.zip
-a---- 29.05.2018 22:11 715530773 update_full_BND-L21C_hw_eu.zip
-a---- 29.05.2018 22:08 37144576 BND-RECOVERY-NoCheck.img
-a---- 06.04.2018 09:37 33554432 SR_BND-L21_B3xx_EMUI8.img
-a---- 29.05.2018 22:36 15024128 complete_twrp_ramdisk.img
Click to expand...
Click to collapse
They need to be in folder "HWOTA8" on sdcard
mrmazak said:
They need to be in folder "HWOTA8" on sdcard
Click to expand...
Click to collapse
Thank you
Edit: I now installed TWRP and copied the files onto the SD Card
The directory now looks like this
Code:
PS J:\HWOTA8> ls
Verzeichnis: J:\HWOTA8
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 30.05.2018 13:54 82757105 update_data_full_public.zip
-a---- 30.05.2018 13:59 769778671 update_full_BND-L21C_hw_eu.zip
-a---- 30.05.2018 14:02 1803590616 update.zip
-a---- 23.05.2018 02:42 1241 hwota8_update-auto-rename.zip
-a---- 15.04.2018 22:22 26314752 RecoveryNoCheckOreoHi6250.img
Update 1: EMUI Recovery is now 'Installing update...' at 25% and rising. This really looks promising! Im so hyped right now
Update 2: Honor Boot animation came up and now I'm waiting for the first use setup to prompt me.
Update 3: So I was at the first use setup but I couldn't activate Wifi and my internal memory was 0B. I'm now doing another Factory Reset from eRecovery
I am now back at EMUI 8 with the Build-Number BND-L21 8.0.0.330(C432) but I'm still unsure if C432 is from my device or from the files I flashed.
Nevertheless my phone is now working again and I am very happy about that! Internal storage is showing up correctly and I can use mobile data as well as WiFi.
Thank you so much for your help!

[GUIDE]Failed OTA update installation with root/TWRP

As this questions pops up every single month, I'm putting this information into a separate topic. It is for everyone who followed the Magisk A/B OTA update guide and OTA update still fails to install. https://github.com/topjohnwu/Magisk/blob/master/docs/tutorials.md
The usual culprit is TWRP - if you booted into TWRP and allowed system modifications (even once), OTA update won't install. The second common suspect is one of apps with root access, which might have tampered the system partition (AdAway or some other old apps).
Use these commands as root from ADB shell or terminal emulator on the phone and look for mount count (has to be 0) and last mount time (must be n/a). Anything else means that system partition has been mounted as R/W and you MUST reflash stock system.img manually.
Code:
[I][B]tune2fs -l /dev/block/sda12
tune2fs -l /dev/block/sda13[/B][/I]
sda12 is system_a, sda13 is system_b
Example of untouched system:
Code:
Filesystem created: Wed Dec 31 17:00:00 2008
Last mount time: n/a
Last write time: Wed Dec 31 17:00:00 2008
Mount count: 0
Maximum mount count: -1
Last checked: Wed Dec 31 17:00:00 2008
How to fix - reflash system.img with the same version as currently running (or reflash everything with newer ROM):
Option #1
- download full OTA zip (not the incremental one, size must be above 1gb)
- and this Windows tool https://androidfilehost.com/?fid=818070582850510260
- extract both and put payload.bin into payload_input folder. Then run payload_dumper.exe. Once it completes the job, you'll find all images which can be flashed via fastboot.
- flash system.img to the active partition
- install OTA update
Option #2
- set A as active partition
- download, extract and run flash_all_except_data_storage.bat from stock Fastboot ROM
- root with Magisk patched boot.img and apply OTA with the usual Magisk A/B OTA procedure
Before flashing, backup your important data, one can be never sure enough.
flash_all_except_storage.bat = flash_all_except_data_storage.bat
I have a few questions about this method of yours.
1) I downloaded the fastboot rom from this thread but I can't find the payload.bin mentioned in the first method. Did I download the right thing? All I can see are *.img files and system.img is there too. Can I flash that one?
2) I have both TWRP and magisk installed currently. Will I lose them if I follow your method? How should I go if I wanted to keep them?
3) Of course you advice us to make a backup beforehand. Can you tell me or link me a guide about how to backup and restore properly with the new A/B partion in the way?
I'm sorry for asking this much, but all the guides I'm following are either confusing or with conflicting info.
Thank you for the help, I just can't wrap my head around this dual partion thing :s
SirAugustin said:
I have a few questions about this method of yours.
1) I downloaded the fastboot rom from this thread but I can't find the payload.bin mentioned in the first method. Did I download the right thing? All I can see are *.img files and system.img is there too. Can I flash that one?
2) I have both TWRP and magisk installed currently. Will I lose them if I follow your method? How should I go if I wanted to keep them?
3) Of course you advice us to make a backup beforehand. Can you tell me or link me a guide about how to backup and restore properly with the new A/B partion in the way?
I'm sorry for asking this much, but all the guides I'm following are either confusing or with conflicting info.
Thank you for the help, I just can't wrap my head around this dual partion thing :s
Click to expand...
Click to collapse
1. Fastboot ROM can be used straight away (Option #2).
2. Well, the point of this guide is to restore phone to stock images, so you can install OTA update. TWRP can't be kept. You can flash Magisk without TWRP though.
3. Titanium backup pro is my #1 backup tool for years, except very few exceptions it can backup and restore all apps and their settings. Data partition is only one, so you might have luck using TWRP backup - I haven't tried it.
Thank you kindly for all the info. These days I will try the method you described. ?
_mysiak_ said:
As this questions pops up every single month, I'm putting this information into a separate topic. It is for everyone who followed the Magisk A/B OTA update guide and OTA update still fails to install. https://github.com/topjohnwu/Magisk/blob/master/docs/tutorials.md
The usual culprit is TWRP - if you booted into TWRP and allowed system modifications (even once), OTA update won't install. The second common suspect is one of apps with root access, which might have tampered the system partition (AdAway or some other old apps).
Use these commands as root from ADB shell or terminal emulator on the phone and look for mount count (has to be 0) and last mount time (must be n/a). Anything else means that system partition has been mounted as R/W and you MUST reflash stock system.img manually.
Code:
[I][B]tune2fs -l /dev/block/sda12
tune2fs -l /dev/block/sda13[/B][/I]
sda12 is system_a, sda13 is system_b
Example of untouched system:
Code:
Filesystem created: Wed Dec 31 17:00:00 2008
Last mount time: n/a
Last write time: Wed Dec 31 17:00:00 2008
Mount count: 0
Maximum mount count: -1
Last checked: Wed Dec 31 17:00:00 2008
How to fix - reflash system.img with the same version as currently running (or reflash everything with newer ROM):
Option #1
- download full OTA zip (not the incremental one, size must be above 1gb)
- and this Windows tool https://androidfilehost.com/?fid=818070582850510260
- extract both and put payload.bin into payload_input folder. Then run payload_dumper.exe. Once it completes the job, you'll find all images which can be flashed via fastboot.
- flash system.img to the active partition
- install OTA update
Option #2
- set A as active partition
- download, extract and run flash_all_except_data_storage.bat from stock Fastboot ROM
- root with Magisk patched boot.img and apply OTA with the usual Magisk A/B OTA procedure
Before flashing, backup your important data, one can be never sure enough.
Click to expand...
Click to collapse
I tried method 1, OTA installation still shows Error message
What next?
oseraphaels said:
I tried method 1, OTA installation still shows Error message
What next?
Click to expand...
Click to collapse
If you are running custom kernel, flash the stock boot.img to boot partition as well.
oseraphaels said:
I tried method 1, OTA installation still shows Error message
What next?
Click to expand...
Click to collapse
Was your system partition mounted as RW in the first place? Is it still untouched? Some apps with root access can still mount it as RW, even if you reflash system.img.
Frank.G said:
If you are running custom kernel, flash the stock boot.img to boot partition as well.
Click to expand...
Click to collapse
I have stock boot img running, still ota install failed
---------- Post added at 10:25 AM ---------- Previous post was at 10:22 AM ----------
_mysiak_ said:
Was your system partition mounted as RW in the first place? Is it still untouched? Some apps with root access can still mount it as RW, even if you reflash system.img.
Click to expand...
Click to collapse
I fastboot flash_all.bat , I think this should mount all ROM segments, including system partitions
I fast boot flashed the latest ROM v11.0.15 and it works perfectly.
_mysiak_ said:
Was your system partition mounted as RW in the first place? Is it still untouched? Some apps with root access can still mount it as RW, even if you reflash system.img.
Click to expand...
Click to collapse
I can't find any apps that may be mounting system partition.
Is there a way to find out?
oseraphaels said:
I can't find any apps that may be mounting system partition.
Is there a way to find out?
Click to expand...
Click to collapse
Yes, compare the last mount timestamp and Magisk log. You will see which app used root access at that time.
oseraphaels said:
As this questions pops up every single month, I'm putting this information into a separate topic. It is for everyone who followed the Magisk A/B OTA update guide and OTA update still fails to install. https://github.com/topjohnwu/Magisk/blob/master/docs/tutorials.md
The usual culprit is TWRP - if you booted into TWRP and allowed system modifications (even once), OTA update won't install. The second common suspect is one of apps with root access, which might have tampered the system partition (AdAway or some other old apps).
Use these commands as root from ADB shell or terminal emulator on the phone and look for mount count (has to be 0) and last mount time (must be n/a). Anything else means that system partition has been mounted as R/W and you MUST reflash stock system.img manually.
sda12 is system_a, sda13 is system_b
Example of untouched system:
I tried method 1, OTA installation still shows Error message
What next?
Click to expand...
Click to collapse
Flash ota ROM in recovery
Rajendran Rasa said:
Flash ota ROM in recovery
Click to expand...
Click to collapse
Thank you very much
I fastboot flashed the latest ROM and my device works perfectly
Hi,
I have similar issue. My current version is V11.0.1.0.QFQEUXM. The system update show can't install update.
I get the stock version of V11.0.1.0.QFQEUXM fastboot room, and get the system.img. Then I flash it into my current active slot - b. After reboot, I still get can't install update.
The specific error is W update_engine: [0615/084826.432657:WARNING:mount_history.cc(66)] Device was remounted R/W 1 times. Last remount happened on 2020-05-15 10:30:34.000 UTC.
The remount is cause by TWRP.
Is there other suggestion?
Flash ota ROM in recovery
Click to expand...
Click to collapse
Tried to sideload V11.0.2.0.QFQEUXM OTA.zip, but error also.
Thanks.
JackVoo said:
Hi,
I have similar issue. My current version is V11.0.1.0.QFQEUXM. The system update show can't install update.
I get the stock version of V11.0.1.0.QFQEUXM fastboot room, and get the system.img. Then I flash it into my current active slot - b. After reboot, I still get can't install update.
The specific error is W update_engine: [0615/084826.432657:WARNING:mount_history.cc(66)] Device was remounted R/W 1 times. Last remount happened on 2020-05-15 10:30:34.000 UTC.
The remount is cause by TWRP.
Is there other suggestion?
Tried to sideload V11.0.2.0.QFQEUXM OTA.zip, but error also.
Thanks.
Click to expand...
Click to collapse
You've found the culprit already.. Do NOT use TWRP to flash images, it must be done via fastboot.
_mysiak_ said:
You've found the culprit already.. Do NOT use TWRP to flash images, it must be done via fastboot.
Click to expand...
Click to collapse
Hi, the remount is at 15-May. Which I try to fix this issue.
I use fastboot to flash the system.img, but it still mentioned about "remount R/W".
After that, I boot into stock recovery and sideload the OTA.zip, still fail
Thanks
JackVoo said:
Hi, the remount is at 15-May. Which I try to fix this issue.
I use fastboot to flash the system.img, but it still mentioned about "remount R/W".
After that, I boot into stock recovery and sideload the OTA.zip, still fail
Thanks
Click to expand...
Click to collapse
You probably forgot to flash something (or used incorrect image). Just download the latest fastboot image, switch to slot A and flash it all (except storage).
Try flashing with V11.0.1.0.QFQEUXM boot.img and system.img at slot A and B, still couldn't update.
Will try to flash all with the V11.0.2.0.QFQEUXM.
Update status:
I finally solve this issue.
I flash the new fastboot ROM into slot A, my current active is slot B.
Thanks for help.
help please
doing these steps will erase my data like factory reset?
if yes, then how can i install ota without losinig any data
_mysiak_ said:
As this questions pops up every single month, I'm putting this information into a separate topic. It is for everyone who followed the Magisk A/B OTA update guide and OTA update still fails to install. https://github.com/topjohnwu/Magisk/blob/master/docs/tutorials.md
The usual culprit is TWRP - if you booted into TWRP and allowed system modifications (even once), OTA update won't install. The second common suspect is one of apps with root access, which might have tampered the system partition (AdAway or some other old apps).
Use these commands as root from ADB shell or terminal emulator on the phone and look for mount count (has to be 0) and last mount time (must be n/a). Anything else means that system partition has been mounted as R/W and you MUST reflash stock system.img manually.
Code:
[I][B]tune2fs -l /dev/block/sda12
tune2fs -l /dev/block/sda13[/B][/I]
sda12 is system_a, sda13 is system_b
Example of untouched system:
Code:
Filesystem created: Wed Dec 31 17:00:00 2008
Last mount time: n/a
Last write time: Wed Dec 31 17:00:00 2008
Mount count: 0
Maximum mount count: -1
Last checked: Wed Dec 31 17:00:00 2008
How to fix - reflash system.img with the same version as currently running (or reflash everything with newer ROM):
Option #1
- download full OTA zip (not the incremental one, size must be above 1gb)
- and this Windows tool https://androidfilehost.com/?fid=818070582850510260
- extract both and put payload.bin into payload_input folder. Then run payload_dumper.exe. Once it completes the job, you'll find all images which can be flashed via fastboot.
- flash system.img to the active partition
- install OTA update
Option #2
- set A as active partition
- download, extract and run flash_all_except_data_storage.bat from stock Fastboot ROM
- root with Magisk patched boot.img and apply OTA with the usual Magisk A/B OTA procedure
Before flashing, backup your important data, one can be never sure enough.
Click to expand...
Click to collapse
Thanks for the post.
When i ran flash system.img is says partition unknown!

Categories

Resources