Open mmirg opened 6 years ago
Increasing the size of the image using count=2194629 (which I imagine is too big since du says that the rootfs directory is 2110834 but I bumped it up just in case) allowed the script to run and for successful rooting.
Just wanted to (belatedly) say thanks for both pointing this issue out, and following up with your workaround.
I've now had a chance to inspect the Pixelbook recovery image (but not the Pixelbook itself unfortunately), and I can see that its system.raw.img is indeed about double the size of the older Intel Chromebook's. Comparing the files therein with e.g. the R11's, the difference appears to be the inclusion of x84_64 compatible files, where previously the subsystem appeared to only contain (and support) x86. Interesting! ...The chief space hog seems to be the 64 bit PrebuiltGmsCoreRelease. I wonder if all the newer Chromebooks will support 64 bit Android going forward.
Anyway, It looks we can quite easily add a conditional to the script which checks for ro.product.cpu.abilist64=x86_64, perhaps by reading build.prop, or maybe piping getprop to the android-sh script, e.g. printf "getprop ro.product.cpu.abilist64" | android-sh
then adjusting the size of the created container accordingly.
Maybe something slightly smaller than what worked for you would be good for now, although I guess we may want to reserve some extra space for potential customizations, such as hosts files, extra fonts and so on (per the other open issue here, the rooting process currently breaks certain non-English fonts which are mounted in a weird way from Chrome OS, and the easiest fix appears to be just copying the required ones over into /system/fonts/chromeos, which can take up extra space...
Coming from a device with 16 gigs of storage, I've been keen to preserve 'disk space', although this is less of an issue on the newer devices, I suppose...
Take advantage of sparse files to use just enough space and no more on the real file system.
/usr/bin/truncate/truncate -s 2G /usr/local/Android_Images/system.raw.expanded.img
Interesting suggestion, will look into this. Cheers!
I'm receiving "out of space" errors when running the first script on a Pixelbook.
It seems like I need to increase the size of the image created by the script? Can I just try to double the size and see if it works?