[Q][RK2818|Archos 7HTv2] "No Space left on Device" during flash - Android Software/Hacking General [Developers Only]

A little background, I am trying to flash a Honeycomb rom to my Archos 7HTv2. This is a custom rom that I put together. I know that Honeycomb requires much more power than my Archos can give me. I know that it would probably be unusable, but I was curious, and it brought up a problem.
The system.img for the HC rom is ~112mbs, the total update.img is ~123mbs
The system.img for the stock rom is ~51mbs the total update.img is ~54mbs
I first tried to flash it and got a "not enough space" error when flashing the system. I assumed that the stock rom barely fit in the system partition, so I went looking for how to make it bigger.
Flashing on the Archos is by putting an update.img in the SDcard, or by using the "BatchUpgrade" utility from the computer, which copies it to some temp on the device. Then the recovery takes over and installs the rom.
Code:
Writing KERNEL:...
Checking KERNEL:...
Writing BOOT:...
Checking BOOT:...
Writing SYSTEM:...
E:Write failed(No space left on device)
E:Failure at line 16:
write_image PACKAGE:system SYSTEM:
Update failed, please reboot and update again!
Line 16 refers to the update-script file which has the list of Writing & Checking.
When I flash the rom from the computer using "BatchUpgrade" it fails before it can attempt unpacking. It just tells me "FAILURE" and no specifics as to why. Because the img never begins unpacking makes me believe it might be the temp area is not big enough for the .img and the extracted components.
I found this mtd information in the HWDEF file (part of update.img)
Code:
#Format: part_name offset:size
parameter 0x00000000:0x00002000:fh
misc 0x00002000:0x00002000:f
kernel 0x00004000:0x00004000:f
boot 0x00008000:0x00002000:f
recovery 0x0000A000:0x00004000:f
system 0x0000E000:0x00030000:f
backup 0x0003E000:0x0003A000:
cache 0x00078000:0x0003A000:
userdata 0x000B2000:0x00100000:
user 0x001B2000:0xFFFFFFFF:
END
I changed the system and backup partitions to be bigger (the above is stock) but nothing happened. I then found the PARAMETER file which had a similar string of mtd definitions, I updated them as above. Still no luck.
Anyone have any ideas?
Thanks

Do you had any luck?

Related

[Q] Boot Process

I've looked in quite a few threads, including the custom mix ROMs. What I want to know is who has knowledge of how this thing boots? I've noticed on the 2 droids I've messed with you upgrade them with an update.zip and basically an empty file on the SD card.
I'm guessing the update.zip contains a squashfs or something similar along with a kernel, but I don't know for sure. Who can explain exactly what happens on boot, what devices it looks for filesystems/loop filesystems on etc?
muqali said:
I've looked in quite a few threads, including the custom mix ROMs. What I want to know is who has knowledge of how this thing boots? I've noticed on the 2 droids I've messed with you upgrade them with an update.zip and basically an empty file on the SD card.
I'm guessing the update.zip contains a squashfs or something similar along with a kernel, but I don't know for sure. Who can explain exactly what happens on boot, what devices it looks for filesystems/loop filesystems on etc?
Click to expand...
Click to collapse
The best way to learn about this stuff is by tearing down existing .zip flashers and reading about how boot.img files are built and trying to build your own.
The boot process is controlled by the bootloader (the thing that displays the Viewsonic birds logo and decides whether you are trying to boot into recovery, APX mode, or a standard boot).
The ZIP files that you flash actually run a script that writes an .IMG file contents to one or more partitions.
Most ROM flashers have two images they flash - a boot.img and a system.img. The system.img is a filesystem image of the system partition. The boot.img consists of two parts - a kernel and a ramdisk image (well, and a boot header). The kernel is the Linux kernel that's been compiled to provide all the core system functionality for Android. The ramdisk image (which is a GZIPed CPIO file) contains the init.rc file that does all the initialization, mounting of the main filesystem images and so on.
Once everything is mounted and configured, the Android ROM itself boots up.
I recommend reading this page for more info:
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
Hope that helps!
That's more or less what I wanted, but for our device do you know the exact boot order? Mtd partitions then SD sd2 and maybe a USB disk? I'd really like to put a custom Roman on the sd2 and leave the rom factory.
muqali said:
That's more or less what I wanted, but for our device do you know the exact boot order? Mtd partitions then SD sd2 and maybe a USB disk? I'd really like to put a custom Roman on the sd2 and leave the rom factory.
Click to expand...
Click to collapse
I *think* (could be wrong) that both the externalSD (/sdcard2) and the USBDISK (/usbdisk) are mounted dynamically, via vold.
At least that's the way I understood it...
There's a thread here in this forum, about (dual) booting Ubuntu, that does something along the lines of what you're asking about...
Jim
rcgabriel said:
The best way to learn about this stuff is by tearing down existing .zip flashers and reading about how boot.img files are built and trying to build your own.
The boot process is controlled by the bootloader (the thing that displays the Viewsonic birds logo and decides whether you are trying to boot into recovery, APX mode, or a standard boot).
The ZIP files that you flash actually run a script that writes an .IMG file contents to one or more partitions.
Most ROM flashers have two images they flash - a boot.img and a system.img. The system.img is a filesystem image of the system partition. The boot.img consists of two parts - a kernel and a ramdisk image (well, and a boot header). The kernel is the Linux kernel that's been compiled to provide all the core system functionality for Android. The ramdisk image (which is a GZIPed CPIO file) contains the init.rc file that does all the initialization, mounting of the main filesystem images and so on.
Once everything is mounted and configured, the Android ROM itself boots up.
I recommend reading this page for more info:
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
Hope that helps!
Click to expand...
Click to collapse
rcgabriel,
When you do an nvflash (ala bekit's), does the contents of bootloader.bin end up getting stored permanently on the Gtab's internal SDcard? And, whenever the Gtab is booted, the code in that bootloader is the first code that runs, deciding, as you said, whether or not to do a recovery or execute the boot.img?
Thanks,
Jim
Isn't the bootloader on one of the MTD partitions and not the sdcard? What I'm having the hardest time wrapping my head around is how this system boots in comparison to an x86 Debian 5.0 system.
The basic picture I have is that there is the rom/flash portion of the boot process and then the kernel and real filesystem are loaded and mounted. But using these custom roms, is it changing the flash and bootloader or just the kernel and OS? Meaning where exactly is the first thing the CPU hits to boot? Flash MTD partitions for the bootloader. Then is the kernel on the mtd partitions or on some separate partition on sdcard.
Since you can basically stick 2 files on an external uSD and send it into upgrade mode, can't you customize the filesystem contained in a zip and then stick it in and have a custom system with whatever you wanted added or removed?

[Q] Stuck y installing android

Hi,
I'm trying for 2 complete days to install android 2.2 on my polaris now but I cant get it working.
Since i'm a complete newby probably it will be something very simple (i hope) but i'm getting verry frustrated at the moment haha.
I'm stepping over from WM6.1
What i have done:
I have a HTC Polaris POLA100
I have a 4gb Micro sd HC class 4
I'm trying to install Incubus26Jc's Super FroYo RLS16 All Languages trough NAND
I have HARD SPL V2 on the phone
I have done all this steps: sourceforge. net/apps/ trac/androidhtc/wiki/HowToInstallWithAtoolsNand
When i boot my phone now i get:
linux logo in top: lots of text lines
then I get:
Mount: mounting /dev/block/mmcblk0p1 on/sdcard failed: invalid argument
sh: 0: unknown operand
found boot parameter for system
system on nand partition
found boot parameter for data
data on nand partition
failed
install module for this kernel
On the sd-card I have
POLAIMG.NBH
andboot
*androidupdate.TGZ
*androidinstall.TGZ
*install-seq.sh
I've tried the NAND option on this page also: http://forum.xda-developers.com/showthread.php?t=921053
But i get the massage:
failed
install module for this kernel
hooliead said:
I've tried the NAND option on this page also: http://forum.xda-developers.com/showthread.php?t=921053
But i get the massage:
failed
install module for this kernel
Click to expand...
Click to collapse
Download the modules form here:
http://sourceforge.net/projects/androidhtc/files/modules/
Rename the tgz file to "androidupdate.tgz" ,than put it in /sdcard/andboot/.install it when you enter the installer menu.Problem will be solved.
Same problems...
When i restart te phone with a soft reset and wait i will get the massage:
Failed
Install module for this kernel
When i manual try to install by keep pressing up the volume button after soft reset i get the massage
there is no such file on sdcard androidupdate.tar
I have checked several times there is a androidupdate.tar and a androidupdate.TGZ (same for androidinstall)
I also tried with only the .TGZ file and only the .TAR file
reformat the sd card.
done it several time... no succes

Error on OTA [EMUI 3.1 6.1.1]

Hello,
I am trying to update my H60-L12 from 6.1.1 to 6.1.16 (and then beyond) using OTA.
I have my phone rooted and with custom recovery. I know I have to unroot and restore stock recovery to get the OTA updates. Yesterday I learnt also that to get 6.1.16 I have to use TAPVPN to connect to the internet via Singapore (thanks to @bcostea for the hint).
Now I find that my phone downloads the update and when it tries to install there is an error in the process at the 6%.
I learnt that the update process logs its progress in the file /splash2/recovery_log
There I find this:
Code:
UI percent:5%.
file "/system/framework/com.google.widevine.software.drm.jar" doesn't have any of expected sha1 sums; checking cache
failed to stat "/cache/saved.file": No such file or directory
failed to load cache file
script aborted: assert failed: apply_patch_check("/system/framework/com.google.widevine.software.drm.jar", "6189c99c76c84310f35b967e768440088e140f78", "7b4afc644b4d388fe159120f434f769a635a8c5e")
str1:/system/framework/com.google.widevine.software.drm.jar, str2:6189c99c76c84310f35b967e768440088e140f78
[2016-02-11 16:04:21 903] int try_update_binary(const char*, ZipArchive*, int*),line=231: err_no = 34
[2016-02-11 16:04:21 903] int try_update_binary(const char*, ZipArchive*, int*),line=233: push binary errno 34
[2016-02-11 16:04:21 903] int try_update_binary(const char*, ZipArchive*, int*),line=238: assert info: assert_filename:/system/framework/com.google.widevine.software.drm.jar
E:assert failed: apply_patch_check(E:
It seems that my com.google.widevine.software.drm.jar is not the one expected by the process.
That makes some sense, as after I installed the full stock rom, I was not able to apply the pa_gapps (some error related to not being possible to install them in a system that did not had a previous version installed to avoid conflicts) (more details on this are available if anybody has a hint or is willing to trobuleshoot it).
Thing is that I applied open_gapps, which are working just fine, but seem to have a different com.google.widevine.software.drm.jar version.
Till 6.1.1, I was able to replace the com.google.widevine.software.drm.jar file in my phone with one from the system.img of the Stock ROM, and then the update was working.
With 6.1.1 I have not been able to find the right file (one with a SHA-1 hash of 7b4afc644b4d388fe159120f434f769a635a8c5e, seems to be necessary).
I have 3 files with hashes:
6189c99c76c84310f35b967e768440088e140f78
654d36de1c8e9e84979a67e897f36dc17a6f7565
bb6bfd30b3d6d03ecf9531e37bcdb0b5a8123e11
They come from stock, from pa_gapps and from open_gapps, but none of them work.
I put them in the \system\framework folder, but the update still fails with the same error.
Can anyone give me a hint? I am going to try by deleting the file, as I have seen that in the log there is one that is not found and the process does not complain that much.
Maybe someone has the right file in this phone and can send it to me. That would be great!!
Thanks in advance!
Well, it seems I managed to make it work.
Instructions below are without warranty. You know that. It's your phone, if you break it, it's your fault. Not mine. You acknowledge that.
Here is how I did it (if you don't know how to execute any of the steps, just google. Instructions have been provided a million times on how to boot in recovery, how to flash an image or how to do a full backup from custom recovery...):
1. I downloaded the full image of the release I had in my phone (I.e. 6.1.1)
2. Using Huawey Upgrade Extractor I extracted system.img and recovery.img
3. I restarted into custom recovery (TWRP) and took a full backup of my phone to the SD. I then removed the SD.
4. I restarted in fastboot mode and using fastboot.exe I flashed recovery.img and system.img (in my case that did not remove anything from my phone, but as I said before, I took a backup beforehand, just in case).
5. I rebooted the phone. Everything was working just fine.
6. I used TAPVPN app to connect through Singapore, so I could get the update to 6.1.16.
7. The update downloaded and installed as expected.
8. Then I used again TAPVPN to get 6.2.1.
9. Same result: download and installation as expected.
10. Then I rooted again and installed custom recovery by using Honor Multi-Tool.
I hope this helps.

Not able to flash Stock image with custom Recovery (TWRP 3.1.1.1.)

Hello guys,
Today I wanted to update my Honor 8 (FDR-L09) because it was showing me, that there is a new update ready to install (FRD-L09C432B405) and I was on a very old firmware (something from mid 2017). So it was time for me to update.
I downloaded the latest update (FRD-L09C432B405) and tried to wipe the cache, dalvik, and Data, but for some reason it "couldn't mount /data" and the wipe failed.
After an advanced wipe it worked and I tried to flash the stock image (the update which was shown to me (FRD-L09C432B405) with TWRP (3.1.1.1.)).
Now my hassle starts:
1. The Rom couldn't get flashed because of "Error: 7" --> I fixed it with the common "Error 7 fix --> editing the update-script and removing the assert line. (And yes, I'm 100% sure that it was the right ROM.
2. Now TWRP seemingly starts to flash the rom but inbetween the lines there is "mountencrypt: failed to mount /data: no such file or directory and it ends with "unknown command [[]" and it takes just two seconds, so the flash obviously isn't succsessfull.
I tried the "failed to mount /data" fix, where I change the data system to ext3 and then back to f2fs and change it back, but it won't work.
In my frustration I did another pretty bad thing and made another advanced wipe and wiped the system too, so now I don't have an OS on my system.
Maybe it's also important to note that there was a window showing up for a very short amount of time, with something like "encryption/encrypted" showed up.
What should I do now? Is there a way to fix the "/data couldn't be mounted" problem? Or am I missing a vital step in flashing the stock rom?
Thanks for your kind help!
You can not flash an update with twrp unless you use hurupdater. You essentially bricked your phone. Look for hurupdater here on xda and follow the instructions and you'll be fine

OxygenOS installation fails at resizing partitions

I have an 8T-KB005 device and I'm trying to get OxygenOS ver 11.0.11.11 KB05AA synchronized on both slots.
Using the copyPartitions.zip failed;
Installing a full OTA twice using Oxygen's built in updater kinda worked but it created 3 additional "cow" partitions;
Installing OOS to both slots through TWRP failed; and
trying to install OOS using the manual fastboot method failed.
With regard to the "cow" partitions, I deleted them and found I was again not able to boot from both slots. I went though this process three times just to check and the outcome was always the same. (Does the on-phone update process create these -cow partitions for everyone?)
At one point I used Fastboot -w to clear everything then start fresh. I have found that if I delete, then recreate, all the logical partitions on both slots, then *sometimes* all 5 logical partitions will resize when I flash system, vendor, product, etc. image files and then I can boot to system from that particular slot, but then the logical partitions will NOT all resize when I switch to the opposite slot and try to do the same. This is the error message I get when I'm using the fastboot method:
Code:
C:\xxx\xxx>fastboot flash system_ext system_ext.img
Invalid sparse file format at header magic
Resizing 'system_ext_a' FAILED (remote: 'Not enough space to resize partition')
fastboot: error: Command failed
I can currently boot to system on one slot and get a Qualcomm Crashdump kill init error when I try to boot to the other. I could use the phone pretty well if I had to with just one slot operational but if I don't fix it this issue will eventually come back to haunt me.
Which instructions did you follow for flashing from fastboot?
These worked for me: https://forum.xda-developers.com/t/...epo-of-oxygen-os-builds.4193183/post-85466569
Pay attention to the fastboot delete-logical-partition commands (which have to be issued in fastboootd).
I've seen the OTA updater create temporary partitions that were not ending in cow, so check out for other partitions that may have been left over from the last failed update.
You may want to try deleting all logical partitions and recreating them with small sizes. You can definitely remove all logical partitions that contain cow in their name.
I've attached the output of
Code:
fastboot getvar all
with the device running fastbootd. It contains the stock partition layout for the latest US firmware installed with the full OTA on both slots.
I followed the write-up from xstefen and also this one from coomac, both very good. They say the same thing but combined they give a lot of detail.
As per their instructions, I always deleted ALL logical partitions and then re-created the a/b ones. But looking at the text file you sent to me, I see that one has 3 of the cow partitions. Interestingly, every time I did an OTA update on my phone I ended up with 2 or 3 of the cow partitions, but not consistently the same ones. I've spent very much time over the last 2 days scouring through the output lists from fastboot getvar all trying to get to the bottom of this.
You can definitely remove all logical partitions that contain cow in their name.
Click to expand...
Click to collapse
This is what I have been doing but as I stated, it results in not being able to boot on one or the other slot. On the other hand, because the creation of the cow partitions is unpredictable, even when using exactly the same OTA update file, I am reluctant to just rebuild all 5 of those partitions in addition to the usual one as listed in the instructions from xstefen and coomac.
The instructions in the thread you linked look good and seem equivalent to the ones I linked.
Another thing you can try is to flash a downgrade package for OP8T, following the same instructions.
Fif_ said:
The instructions in the thread you linked look good and seem equivalent to the ones I linked.
Another thing you can try is to flash a downgrade package for OP8T, following the same instructions.
Click to expand...
Click to collapse
Thank you, Fif_, for your replies and for providing the text file. All of it gave me some clues to follow up.
I beat this problem to death over the past couple of days. What I learned during the downgrade-then-upgrade process gave me a better understanding of what's going on with the logical partitions. I posted my conclusions on the thread I referenced above. I hope it helps someone.

Categories

Resources