AOSP recovery image is too large for partition - Android Q&A, Help & Troubleshooting

Hi, I have a build problem when building AOSP kernel using Vim3Pro for AOSP kernel development with android kernel 5.10.
I cloned AOSP kernel images following the below command.
git clone https://android.googlesource.com/kernel/hikey-linaro -b android-amlogic-bmeson-5.10
Then, I inserted some additional kernel functions and commands like ‘printk’ and rebuilt it.
The size of recovery.img file increased 32 MB → 32.X MB, and I modified BOARD_RECOVERYIMAGE_PARTITION_SIZE 32MB to 64MB in ‘device/amlogic/yukawa/BoardConfigCommon.mk’ file.
However, when using uboot and fastboot, I still get the below message.
target reported max download size of 117440512 bytes
sending 'recovery' (33412 KB)...
OKAY [ 1.832s]
writing 'recovery'...
FAILED (remote: too large for partition)
finished. total time: 1.845s
Which file or option should I modify other files or options?

JWChoi1996 said:
I modified BOARD_RECOVERYIMAGE_PARTITION_SIZE 32MB to 64MB in ‘device/amlogic/yukawa/BoardConfigCommon.mk’ file.
Click to expand...
Click to collapse
Why? That will make recovery larger than 32mb

aIecxs said:
Why? That will make recovery larger than 32mb
Click to expand...
Click to collapse
I added some additional kernel functions and operations to the original aosp source code for debugging.
Then, the build program generated recovery.img larger than 32MB.
So, I had to fix that variable. if not the build program makes a failure.
Is the increased recovery image file wrong?
Had I some mistakes on aosp source code?

your recovery partition is 32mb, you must not create file larger than 32mb. use another toolchain, clang compiler will half the kernel size compared to gcc.

aIecxs said:
your recovery partition is 32mb, you must not create file larger than 32mb. use another toolchain, clang compiler will half the kernel size compared to gcc.
Click to expand...
Click to collapse
Thank you, I'll try it.
Can I ask you a question?
Is it normal for recovery.img size to increase when I add printk?

Idk, but if recovery is build on edge full 32gb, of course any addition will exceed size I guess.

Related

mtd kernel driver hacks?

Hi devs,
Are you aware of any work (for other Android phones, for instance), where an altered mtd kernel driver was used to allow (raw) root access anyplace within flash memory? (For example, maybe a raw pseudo-partition which overlaps all the other partitions?) The stock mtd driver creates devices in the kernel device tree only for specific partition slices (boot, system, recovery, data, cache) - for obvious safety and security reasons.
After all these months, I stumbled across this tonight
Code:
C:\foo>fastboot oem listpartition
...
INFO[radio]:(OTHER) block start=0, size=332 (42496 KB)
INFO[hboot]:(RAW) block start=333, size=6 (768 KB)
INFO[misc3]:(RAW) block start=339, size=2 (256 KB)
INFO[mfg]:(RAW) block start=341, size=2 (256 KB)
INFO[sp1]:(RAW) block start=343, size=6 (768 KB)
INFO[misc2]:(RAW) block start=349, size=3 (384 KB)
INFO[mfg2]:(RAW) block start=352, size=3 (384 KB)
INFO[recovery]:(RAW) block start=355, size=40 (5120 KB)
INFO[boot]:(RAW) block start=395, size=20 (2560 KB)
INFO[system]:(YAFFS) block start=415, size=1360 (179520 KB)
INFO[cache]:(YAFFS) block start=1775, size=1040 (137280 KB)
INFO[userdata]:(YAFFS) block start=2815, size=1276 (168432 KB)
INFO[misc]:(RAW) block start=4091, size=5 (640 KB)
INFO[microp]:(OTHER) block start=0, size=0 (0 KB)
INFO[nv]:(OTHER) block start=0, size=0 (0 KB)
INFO[tp-melfas]:(OTHER) block start=0, size=0 (0 KB)
OKAY [ 0.071s]
finished. total time: 0.071s
I had never seen references in the Eris forums to the misc3, mfg, sp1, misc2, or mfg2 partitions - I suppose one or more are for boot images. Maybe interesting to boot a kernel image that had access to them, and have a peek at them?
bftb0
You are venturing into an area that is slightly beyond my current level of understanding. (Although we can all learn more.)
Is this even close to what you are looking for?
http://forum.xda-developers.com/showthread.php?t=754805
I'm thinking not, since they appear to be resizing the existing partitions, which doesn't seem to be quite what you are looking for.
I was asking about this a while back to see if anyone was able to get read access to the splash1 (i'm guessing sp1) partition so we could dump the REAL original splash screen for people that needed to go back to full stock. This was basically the only thing that is left out of going to stock since the "original" boot image that I had used for the android skateboards in my post about changing the boot logo was just a resized version I found online somewhere which is slightly bigger than the original if you look closely. I had some info laying around somewhere but it was definitely something about people modifying the mtd drivers in the kernel to get this done.
Without the modified drivers there is no way to do a FULL nand dump at this point.
gnarlyc said:
You are venturing into an area that is slightly beyond my current level of understanding. (Although we can all learn more.)
Is this even close to what you are looking for?
http://forum.xda-developers.com/showthread.php?t=754805
I'm thinking not, since they appear to be resizing the existing partitions, which doesn't seem to be quite what you are looking for.
Click to expand...
Click to collapse
Well, I'd seen that before - but THANK YOU - your post encouraged me to do a better job of searching, and I came up with this:
http://forum.xda-developers.com/showthread.php?t=542688
[SIZE=+2]Awesome![/SIZE] It appears that no mtd kernel hack is needed - as long the Eris kernels we are using accept those parameters (obviously, a little additional work is needed to get the offsets correct for the Eris).
I knew that partitions could be resized - but I wasn't aware that you could add new partition definitions. If it works for the Eris, then cool. (I have to say - the G1/G2/Hero devs surely have turned over a lot of stones that have helped us.)
bftb0
Mohahahhahahahaaha (rubbing hands together deviously). I smell either some interesting development or at least some interesting information coming out of this.
It's working.
More details later.
Flash Memory Map for the Eris:
Code:
PARTITION START END SIZE(1KB) SIZE(128KB) NOTES
radio 0x00000000 - 0x02980000 42,496 332 (3)
- gap! - 0x02980000 - 0x029a0000 128 1 (3)
hboot 0x029a0000 - 0x02a60000 768 6 (2)
misc3 0x02a60000 - 0x02aa0000 256 2 (5)
mfg 0x02aa0000 - 0x02ae0000 256 2 (6)
sp1 0x02ae0000 - 0x02ba0000 768 6 (4)
misc2 0x02ba0000 - 0x02c00000 384 3 (4)
mfg2 0x02c00000 - 0x02c60000 384 3 (4)
recovery 0x02c60000 - 0x03160000 5,120 40
boot 0x03160000 - 0x033e0000 2,560 20
system 0x033e0000 - 0x0dde0000 174,080 1360
cache 0x0dde0000 - 0x15fe0000 133,120 1040
userdata 0x15fe0000 - 0x1ff60000 163,328 1276
misc 0x1ff60000 - 0x20000000 640 5
( You can verify the above on your own phone with a combination of examining /proc/mtd, "dmesg" output immediately after the boot, and output of "fastboot oem listpartition" )
(1) Note all partitions are aligned to a 128-KB boundary (0x20000 - 18 bits)
Presumably this is why "fastboot oem listpartition" reports sizes in this unit
(2) Hboot images from HTC for the Eris have always been exactly 512 KB. Slack space is here,
but I found nothing but 0xFF's in the slack area.
(3) Attempting to dump the from this partition produces many, many error messages of the form:
mtd: MEMGETBADBLOCK returned -1 at 0x02940000 (errno=5)
mtd: MEMGETBADBLOCK returned -1 at 0x02960000 (errno=5)
(4) On my phone, dumps of partitions "sp1", "mfg2" and "misc2" produced un-interesting data blobs: all 0xFF's
Note that I have never flashed a custom boot splashscreen.
(5) Nearly "empty" - bytes not 0x00 or 0xFF are all string data (including CID)
(6) Contains "interesting" string data (including handset ID, manufacturing date, etc) and other binary data. Performing interesting handset operations and then recapturing a partition dump (before/after) and performing a binary diff could reveal strategic locations.
[SIZE=+1]HOW-TO[/SIZE]
Most people have absolutely no business doing this - you have been warned.
Under no circumstances should you hand-type any of these addresses; a simple typo could lead to disaster.
Code:
fastboot -c " mtdparts=msm_nand:[email protected](misc),[email protected](recovery),[email protected](boot),[email protected](system),[email protected](cache),[email protected](userdata) " boot recovery-RA-Eris-v1.6.2.img
will produce the standard kernel partition mappings. Note the leading and trailing spaces in the quoted string - and that the order of appearance is critically important
You may append one or more** of the following, separated with commas as shown in the above (standard mapping) command.
[email protected](radio)
[email protected](hboot)
[email protected](misc3)
[email protected](mfg)
[email protected](sp1)
[email protected](misc2)
[email protected](mfg2)
** I performed individual boots adding only one non-standard partition, and can not guarantee that a disaster will not result if you try to append more than one - or all of them - in one boot.
You can verify the additional partitions have been kanged into the kernel's device tree with
adb shell cat /proc/mtd
and may dump individual partitions via the command "dump_image" (provided by Amon_RA in /sbin), as in the following example:
mount /sdcard
dump_image mfg /sdcard/part.mfg.img
bftb0
If you just want to dump a specific Eris flash memory partition(s) off your phone, there is an even easier method. (Doh!)
Prerequisites:
- 1.49.2000 S-OFF bootloader is installed on your Eris.
- working device drivers on PC and fastboot utility
Steps:
1) Connect via USB to your PC and put phone in FASTBOOT mode (Power up with Send+End)
2) Get the partition names listing using
Code:
fastboot oem listpartition
3) Using the following fastboot syntax, plug in the desired partition name (PNAME):
Code:
fastboot oem saveprt2sd PNAME -n PNAME.bin -a
for example, the "sp1" partition:
Code:
$ fastboot oem saveprt2sd sp1 -n sp1.bin -a
... INFOSaveImageToSD partition file name:sp1
INFOSaveImageToSD output file name:sp1.bin
INFOCmd5 CMD_TIMEOUT
INFOsdcc_poll_status(): i=21
INFOCmd5 polling status timed out
INFOSD: CMD5 fail, rc=2 ..
INFOSD 2.0
INFOHC card
INFO Searching free data sectors....
INFO [SAVE2SD] 131072 bytes saved.
INFO [SAVE2SD] 262144 bytes saved.
INFO [SAVE2SD] 393216 bytes saved.
INFO [SAVE2SD] 524288 bytes saved.
INFO [SAVE2SD] 655360 bytes saved.
INFO [SAVE2SD] 786432 bytes saved.
INFO [SAVE2SD] Done.
OKAY [ 1.728s]
finished. total time: 1.728s
Yep, it really is that simple.
bftb0

LZMA compression tool

Hey , this is a small tool -you can call it patch - to compress kernel / recovery ramdisk .
Why this tool ?
Simply some devices have little space for kernel / recovery like samsung galaxy star which has about 10MBs for kernel/recovery .
How to use :
You must first activate LZMA support for ramdisks in kernel Go to your kernel config file then change this
Code:
# CONFIG_RD_LZMA is not set
TO
Code:
CONFIG_RD_LZMA=y
Clone the tool under device/vendor_name/device_name.
Add those line to your BoardConfig.mk file .
Code:
# LZMA compression for recovery's & kernel ramdisk....
BOARD_CUSTOM_BOOTIMG_MK := device/vendor_name/device_name/custombootimg.mk
BOARD_CANT_BUILD_RECOVERY_FROM_BOOT_PATCH := true
Enjoy .
Note :
This tools is used while you building any ROM/Kernel/Recovery from source .
This tool should work with any device .
LZMA compression takes more time to decompress than GZIP but When I tested it didn't take more than 1 or 2 more seconds to decompress .
You won't be able to decompress boot.img or recovery.img using boot-repacker or unpack tool for linux as you will get an error because those tools won't be able to decompress ramdisks for recovery or kernel -boot-repacker only gives you kernel zImage- and If you want to edit anything in ramdisk you will need to build it again from source !!!
This tool derived from
http://review.cyanogenmod.org/#/c/96227/
http://review.cyanogenmod.org/#/c/118533/​
Results using this tool :
Before :
Kernel ramdisk : 1.1 MB (1,117,760 bytes) .
recovery ramdisk : 4.2 MB (4,158,392 bytes) .
Total kernel.img : 9.1 MB (9,111,552 bytes) .
Total recovery.img : 12.2 MB (12,152,832 bytes) .
After :
Kernel ramdisk : 579.3 kB (579,257 bytes) .
recovery ramdisk : 2.7 MB (2,736,844 bytes) .
Total kernel.img : 8.6 MB (8,572,928 bytes) .
Total recovery.img : 10.7 MB (10,731,520 bytes) .
Something to discuss :
Maybe you find that these compress is not enough to save up the space or you maybe find this is very suitable for you , In my case it was useful in some aspects and not in others .
I tried to use LZMA compression for kernel zImage it self and it was pretty good (8 MBs to 2.9 MBs) but the problem that the kernel wasn't loaded so It themes that the bootloader of my device hate LZMA compression or anything else I didn't figure it out so If you find anyway to run and support LZMA compression for kernel please kindly let me know .
Download :
LZMA compression tool
Credit :
Andreas Blaesius
Dan Pasanen
LehKeda (ME )
Neat idea. How do I implement this into a ROM? I see boot.img and recovery.img tutorials but nothing for ROM.
RatchetPanda said:
Neat idea. How do I implement this into a ROM? I see boot.img and recovery.img tutorials but nothing for ROM.
Click to expand...
Click to collapse
You mean compress system.img with LZMA ? if yes , no you can't .
LahKeda said:
You mean compress system.img with LZMA ? if yes , no you can't .
Click to expand...
Click to collapse
Do you think you could modify TWRP so it could handle zips zipped using LZMA instead of just plain deflate? It'd be very useful to get 300-500mb zips down to 200-350mb
RatchetPanda said:
Do you think you could modify TWRP so it could handle zips zipped using LZMA instead of just plain deflate? It'd be very useful to get 300-500mb zips down to 200-350mb
Click to expand...
Click to collapse
It won't reduce the actual size of the ROM it will reduce the zip file size -you will have to download/upload 200 to 300 mb instead of 300 to 500 mb- so it isn't useful that much as you can compress rom zip file before uploading then decompress it again after downloading .
BTW ... Is it good to replace device default bootloader with another one ? and Is there any way to backup it ?
LahKeda said:
It won't reduce the actual size of the ROM it will reduce the zip file size -you will have to download/upload 200 to 300 mb instead of 300 to 500 mb- so it isn't useful that much as you can compress rom zip file before uploading then decompress it again after downloading .
BTW ... Is it good to replace device default bootloader with another one ? and Is there any way to backup it ?
Click to expand...
Click to collapse
Yes that's what I mean is reducing the zip file size, I don't care about the size of the ROM. You probably can on Nexus devices since they are developer friendly however I do not know about other devices.
RatchetPanda said:
Yes that's what I mean is reducing the zip file size, I don't care about the size of the ROM. You probably can on Nexus devices since they are developer friendly however I do not know about other devices.
Click to expand...
Click to collapse
Messing with recovery mechanism doesn't theme so much fair while you can do it by any other file compressor
LahKeda said:
Messing with recovery mechanism doesn't theme so much fair while you can do it by any other file compressor
Click to expand...
Click to collapse
What I'm saying is TWRP cannot currently handle flashable zips using anything other than plain Deflate so it would need modifying to support zips zipped using LZMA2 or Deflate64 for example.
RatchetPanda said:
What I'm saying is TWRP cannot currently handle flashable zips using anything other than plain Deflate so it would need modifying to support zips zipped using LZMA2 or Deflate64 for example.
Click to expand...
Click to collapse
that's theme a little bit interesting .....maybe I'll look into it .

Build Cyanogenmod recovery LG-D160

Hi,
i want to build CM recovery.
I download the source from github cyanogenmod with repo sync.
I took the boot.img from the device partition with dd and create the device tree successful with mkvendor.sh.
make recoveryimage was successfull.
Now i want to correct the different values in the config files for the recovery to get it working on my LG-D160 device.
Iam looking for the
- recovery image size,
- boot image size,
- system image size,
- userdata image size
- block size
- flash size
I know tune2fs, df, cat /proc/partitions, mount
/proc/mtd and /proc/emmc doesnt exist.
Could someone put me on the right way please ?
Thank you.
papaandy

[ALI] postmarketOS (full GNU/Linux distro based on alpine linux)

Hi everyone, I recently ported postmarketOS to the Moto G6.
I do not recommend installing this if the device is your daily driver. Not much works besides the screen. This is more of a proof-of-concept.
https://wiki.postmarketos.org/wiki/Motorola_Moto_G6_(motorola-ali)
If you would like to try it, you can follow the instructions here for "motorola" and "ali" : https://wiki.postmarketos.org/wiki/Installation_guide
Kernel source: https://github.com/msm8953-mainline/linux
Updates
6/3/2020:
64-bit support has been added, thanks to the work of the the RevengeOS project.
11/21/2022:
Firmware has been added (meaning things like wifi and GPU acceleration are now working)
The RevengeOS kernel has been replaced by a recent Linux fork (version 5.18.3)
A patch has been submitted to upstream Linux to add initial support for our device (only the PVT2 variant)
Uclydde said:
Hi everyone, I recently ported postmarketOS to the Moto G6.
I do not recommend installing this if the device is your daily driver. Not much works besides the screen. This is more of a proof-of-concept.
https://wiki.postmarketos.org/wiki/Motorola_Moto_G6_(motorola-ali)
If you would like to try it, you can follow the instructions here for "motorola" and "ali" : https://wiki.postmarketos.org/wiki/Installation_guide
Kernel source: https://github.com/Uclydde/kernel-msm/tree/lineage-16.0
Click to expand...
Click to collapse
Does wifi work?
vibraniumdroid said:
Does wifi work?
Click to expand...
Click to collapse
no
MarlonBrZ said:
no
Click to expand...
Click to collapse
It's still pretty cool though! We're seeing some development on a device I though was dead.
On the wiki it states:
"As of 8/10/2021, the Moto G6 is able to boot the msm8953 mainline kernel fork. It works fairly well, with features like display, touchscreen, and wifi working."
Where do I find that kernel and how do I install it. If I could get wifi to work this could actually be quite useful.
JPutz said:
On the wiki it states:
"As of 8/10/2021, the Moto G6 is able to boot the msm8953 mainline kernel fork. It works fairly well, with features like display, touchscreen, and wifi working."
Where do I find that kernel and how do I install it. If I could get wifi to work this could actually be quite useful.
Click to expand...
Click to collapse
Have you found a way yet?
I've seen many repos named msm8953, but had no clue it was for this device, I'll look up my browser history and post back here if I find any helpful instructions.
adhamnasr said:
Have you found a way yet?
I've seen many repos named msm8953, but had no clue it was for this device, I'll look up my browser history and post back here if I find any helpful instructions.
Click to expand...
Click to collapse
GitHub - brunorolak/kernel_motorola_msm8953
Contribute to brunorolak/kernel_motorola_msm8953 development by creating an account on GitHub.
github.com
This is the most up to date kernel we use, I have no Idea how you can implement it for postmarketos tho.
I remember seeing that blurb mentioning how it was working better on the mainline kernel and assumed they literally meant the mainline Linux kernel.
I assume that is the case, or maybe their own tree they are calling "close to mainline":
(Close to) Mainline - postmarketOS
wiki.postmarketos.org
In any case, I haven't tried installing PostmarketOS in a while, so I've no idea the actual status.
Any progress on this? Would love to have another mobile Linux device besides my Pinephone!
J-Mizzle said:
Any progress on this? Would love to have another mobile Linux device besides my Pinephone!
Click to expand...
Click to collapse
Yes, I've submitted an update to postmarketOS to use a close-to-mainline fork of the Linux kernel for our device.
Also, firmware support has been added, meaning that things like wifi and GPU acceleration are now working.
However, the display backlight isn't working, as well as several other things like audio, battery data, and camera.
adhamnasr said:
Have you found a way yet?
I've seen many repos named msm8953, but had no clue it was for this device, I'll look up my browser history and post back here if I find any helpful instructions.
Click to expand...
Click to collapse
Mainline kernel development for all devices with this SoC is happening here: https://github.com/msm8953-mainline/linux
vibraniumdroid said:
Does wifi work?
Click to expand...
Click to collapse
With the most recent update, now it does. You'll need to enable firmware when installing postmarketOS.
Uclydde said:
Yes, I've submitted an update to postmarketOS to use a close-to-mainline fork of the Linux kernel for our device.
Also, firmware support has been added, meaning that things like wifi and GPU acceleration are now working.
However, the display backlight isn't working, as well as several other things like audio, battery data, and camera.
Mainline kernel development for all devices with this SoC is happening here: https://github.com/msm8953-mainline/linux
With the most recent update, now it does. You'll need to enable firmware when installing postmarketOS.
Click to expand...
Click to collapse
I thought this was for the Moto G6 Play. I'm far less excited now. Good progress for those with the normal G6.
J-Mizzle said:
I thought this was for the Moto G6 Play. I'm far less excited now. Good progress for those with the normal G6.
Click to expand...
Click to collapse
You can find the Moto G6 Play's forum here: https://forum.xda-developers.com/c/moto-g6-play.8553/
By the way, the G6 Play has some postmarketOS support - but not from me. Here's the wiki page for it: https://wiki.postmarketos.org/wiki/Motorola_Moto_G6_Play_(motorola-aljeter)
Uclydde said:
You can find the Moto G6 Play's forum here: https://forum.xda-developers.com/c/moto-g6-play.8553/
By the way, the G6 Play has some postmarketOS support - but not from me. Here's the wiki page for it: https://wiki.postmarketos.org/wiki/Motorola_Moto_G6_Play_(motorola-aljeter)
Click to expand...
Click to collapse
Yes, I've got both those pages bookmarked. For some reason I failed to notice I ended up in the G6 forum vs the G6 Play. The Play variant doesnct seem to get much attention Android development. I follow PostmarketOS' Mastodon account as well as a handful of device maintainers and the G6 Play doesn't seem very active. I've got a Pinephone and have been considering picking up a OnePlus 6(T) as a more powerful alternative.
Hello, I tried to install this using
pmbootstrap init and pmbootstrap install to setup the installation with xfce4 and the commands from the wiki
it installs /system successfully but i can't boot to it and booting to boot.img fails, what can I do?
Code:
[20:49:45] DONE!
[email protected]:~$ pmbootstrap flasher flash_rootfs
[20:50:02] (native) flash rootfs image
[20:50:07] (native) install android-tools
< waiting for any device >
(bootloader) is-logical:system: not found
Sending sparse 'system' 1/2 (519524 KB)
OKAY [129.331s]
Writing 'system' OKAY [ 6.951s]
Sending sparse 'system' 2/2 (456977 KB) OKAY [114.314s]
Writing 'system' OKAY [ 6.170s]
Finished. Total time: 264.514s
[20:54:53] NOTE: chroot is still active (use 'pmbootstrap shutdown' as necessary)
[20:54:53] DONE!
[email protected]:~$ pmbootstrap flasher boot
[20:55:29] (rootfs_motorola-ali) install device-motorola-ali
[20:55:37] (rootfs_motorola-ali) install postmarketos-mkinitfs
[20:55:41] (rootfs_motorola-ali) mkinitfs postmarketos-qcom-msm8953
[20:55:51] (native) boot postmarketos-qcom-msm8953 kernel
[20:55:51] (native) install android-tools
Sending 'boot.img' (10858 KB) OKAY [ 2.589s]
Booting FAILED (remote: '')
fastboot: error: Command failed
[20:55:56] NOTE: The failed command's output is above the ^^^ line in the log file: /home/t/.local/var/pmbootstrap/log.txt
[20:55:56] ERROR: Command failed (exit code 1): (native) % fastboot --cmdline boot /mnt/rootfs_motorola-ali/boot/boot.img
[20:55:56] See also: <https://postmarketos.org/troubleshooting>
now i can't even mount '/system' through twrp (invalid argument) xd, please help
to the lack of information i got, i've thought i could install it overwriting a android custom rom i was using (Lineage 19.1, arm64)
gabriela-fazoli said:
Hello, I tried to install this using
pmbootstrap init and pmbootstrap install to setup the installation with xfce4 and the commands from the wiki
it installs /system successfully but i can't boot to it and booting to boot.img fails, what can I do?
Code:
[20:49:45] DONE!
[email protected]:~$ pmbootstrap flasher flash_rootfs
[20:50:02] (native) flash rootfs image
[20:50:07] (native) install android-tools
< waiting for any device >
(bootloader) is-logical:system: not found
Sending sparse 'system' 1/2 (519524 KB)
OKAY [129.331s]
Writing 'system' OKAY [ 6.951s]
Sending sparse 'system' 2/2 (456977 KB) OKAY [114.314s]
Writing 'system' OKAY [ 6.170s]
Finished. Total time: 264.514s
[20:54:53] NOTE: chroot is still active (use 'pmbootstrap shutdown' as necessary)
[20:54:53] DONE!
[email protected]:~$ pmbootstrap flasher boot
[20:55:29] (rootfs_motorola-ali) install device-motorola-ali
[20:55:37] (rootfs_motorola-ali) install postmarketos-mkinitfs
[20:55:41] (rootfs_motorola-ali) mkinitfs postmarketos-qcom-msm8953
[20:55:51] (native) boot postmarketos-qcom-msm8953 kernel
[20:55:51] (native) install android-tools
Sending 'boot.img' (10858 KB) OKAY [ 2.589s]
Booting FAILED (remote: '')
fastboot: error: Command failed
[20:55:56] NOTE: The failed command's output is above the ^^^ line in the log file: /home/t/.local/var/pmbootstrap/log.txt
[20:55:56] ERROR: Command failed (exit code 1): (native) % fastboot --cmdline boot /mnt/rootfs_motorola-ali/boot/boot.img
[20:55:56] See also: <https://postmarketos.org/troubleshooting>
now i can't even mount '/system' through twrp (invalid argument) xd, please help
to the lack of information i got, i've thought i could install it overwriting a android custom rom i was using (Lineage 19.1, arm64)
Click to expand...
Click to collapse
Reinstall stock with partitons commands
Hello.
I have the same problem as @gabriela-fazoli .
I have reinstalled stock as advised by @brunogroa but even after this I get the same error as shown above.
Do I need to install lk2nd maybe?
If I do then can someone please advise as to how I compile it.
I am using debian 11 and have installed the required dependencies including:
gcc-arm-none-eabi
device-tree-compiler
build-essential
I do not know what is meant by "Replace TOOLCHAIN_PREFIX with the path to your tool chain." when issuing the make command ie: make TOOLCHAIN_PREFIX=arm-none-eabi- <SoC>-secondary
Also is <SOC> meant to be replaced with sdm450-motorola-ali
I am a major newb when it comes to cross compiling.
Thank you for any assistance. I am very excited to give PostmarketOS a whirl on the G6.
Cheers
Bill
For any one else who might have issues compiling lk2nd I can highly recommend this website:
GCC Cross-Compiler - OSDev Wiki
wiki.osdev.org
Have compiled successfully using above instructions and the following make command:
make TOOLCHAIN_PREFIX=~/opt/cross/bin/arm-none-eabi- msm8953-secondary
Haven't tried it yet but fingers crossed.
No good.
I installed lk2nd with the following response:
fastboot flash boot lk2nd.img
(bootloader) is-logical:boot: not found
Sending 'boot' (288 KB) OKAY [ 0.178s]
Writing 'boot' (bootloader) Image not signed or corrupt
OKAY [ 0.028s]
Finished. Total time: 0.208s
Click to expand...
Click to collapse
Couldn't get lk2nd to boot though with Volume-Down pressed at varying intervals.
Then did the following:
[email protected]:~/pmbootstrap$ pmbootstrap flasher flash_rootfs
[10:33:14] (native) flash rootfs image
[10:33:16] (native) install android-tools
(bootloader) is-logical:system: not found
Sending sparse 'system' 1/3 (522136 KB) OKAY [ 19.229s]
Writing 'system' OKAY [ 5.087s]
Sending sparse 'system' 2/3 (517848 KB) OKAY [ 18.848s]
Writing 'system' OKAY [ 4.920s]
Sending sparse 'system' 3/3 (135789 KB) OKAY [ 4.943s]
Writing 'system' OKAY [ 1.128s]
Finished. Total time: 54.896s
[10:34:11] NOTE: chroot is still active (use 'pmbootstrap shutdown' as necessary)
[10:34:11] DONE!
[email protected]:~/pmbootstrap$ pmbootstrap flasher boot
[10:34:23] (rootfs_motorola-ali) install device-motorola-ali
[10:34:28] (rootfs_motorola-ali) install postmarketos-mkinitfs
[10:34:30] (rootfs_motorola-ali) mkinitfs postmarketos-qcom-msm8953
[10:34:38] (native) boot postmarketos-qcom-msm8953 kernel
[10:34:38] (native) install android-tools
Sending 'boot.img' (10858 KB) OKAY [ 0.397s]
Booting OKAY [ 0.587s]
Finished. Total time: 0.993s
[10:34:39] You will get an IP automatically assigned to your USB interface shortly.
[10:34:39] Then you can connect to your device using ssh after pmOS has booted:
[10:34:39] ssh [email protected]
[10:34:39] NOTE: If you enabled full disk encryption, you should make sure that osk-sdl has been properly configured for your device
[10:34:39] NOTE: chroot is still active (use 'pmbootstrap shutdown' as necessary)
[10:34:39] DONE!
Click to expand...
Click to collapse
It then reboots and shows the blue screen with the yellow Motorola 'M' and Powered By Android in white at the bottom.
Then it does nothing else.
I hold the power button in and it does the reboot loop thing but without the blue Motorola screen.
I can get into fastboot and TWRP without problem.
Any ideas?

android LOS17 build on gCloud

Hi,
I'm tring to build LOs17.1 from source, but when I try to "brunch" it, I'm getting error:
Code:
set_selinux_xattr: No such file or directory searching for label "/bt_firmware"
e2fsdroid: No such file or directory while configuring the file system
loaded 4265 fs_config entries
Out of space? Out of inodes? The tree size of /home/mincaeuro/android/lineage/out/soong/.temp/tmpo5Xs2R is 1415868416 bytes (1350 MB), with reserved space of 0 bytes (0 MB).
The max image size for filesystem files is 2684354560 bytes (2560 MB), out of a total partition size of 2684354560 bytes (2560 MB).
13:57:20 ninja failed with: exit status 1
found those folders, not sure what am I missing:
find . -name "bt_firmware"
Code:
./out/target/product/oneplus2/root/bt_firmware
./out/target/product/oneplus2/recovery/root/bt_firmware
./out/target/product/oneplus2/obj/PACKAGING/target_files_intermediates/lineage_oneplus2-target_files-eng.mincaeuro/RECOVERY/RAMDISK/bt_firmware
./out/target/product/oneplus2/obj/PACKAGING/target_files_intermediates/lineage_oneplus2-target_files-eng.mincaeuro/ROOT/bt_firmware
mincaeuro said:
Hi,
I'm tring to build LOs17.1 from source, but when I try to "brunch" it, I'm getting error:
Code:
set_selinux_xattr: No such file or directory searching for label "/bt_firmware"
e2fsdroid: No such file or directory while configuring the file system
loaded 4265 fs_config entries
Out of space? Out of inodes? The tree size of /home/mincaeuro/android/lineage/out/soong/.temp/tmpo5Xs2R is 1415868416 bytes (1350 MB), with reserved space of 0 bytes (0 MB).
The max image size for filesystem files is 2684354560 bytes (2560 MB), out of a total partition size of 2684354560 bytes (2560 MB).
13:57:20 ninja failed with: exit status 1
found those folders, not sure what am I missing:
find . -name "bt_firmware"
Code:
./out/target/product/oneplus2/root/bt_firmware
./out/target/product/oneplus2/recovery/root/bt_firmware
./out/target/product/oneplus2/obj/PACKAGING/target_files_intermediates/lineage_oneplus2-target_files-eng.mincaeuro/RECOVERY/RAMDISK/bt_firmware
./out/target/product/oneplus2/obj/PACKAGING/target_files_intermediates/lineage_oneplus2-target_files-eng.mincaeuro/ROOT/bt_firmware
Click to expand...
Click to collapse
I have always seen posts to add bt_firmware to your file_contexts in sepolicy and file.te, but for me this doesn't work (the directory for me is firmware though...)
here is an example: https://github.com/mukul2259/device_oneplus_oneplus2/commit/2fb4e45a292468bec5205087c99880fab0bd0a65
TheSSJ said:
I have always seen posts to add bt_firmware to your file_contexts in sepolicy and file.te, but for me this doesn't work (the directory for me is firmware though...)
here is an example: https://github.com/mukul2259/device_oneplus_oneplus2/commit/2fb4e45a292468bec5205087c99880fab0bd0a65
Click to expand...
Click to collapse
Hi,
did it yesterday , the build was successful, but the ROM is not working :/ bootloop
mincaeuro said:
Hi,
did it yesterday , the build was successful, but the ROM is not working :/ bootloop
Click to expand...
Click to collapse
you need to be precise, do you at least see the lineageOS boot animation or just the logo of your mobile phone brand?
you need to study the logs why it refuses to boot, maybe it's trivial
for me the sepolicy thing didn't solve the error message have no clue how to fix
TheSSJ said:
you need to be precise, do you at least see the lineageOS boot animation or just the logo of your mobile phone brand?
you need to study the logs why it refuses to boot, maybe it's trivial
for me the sepolicy thing didn't solve the error message have no clue how to fix
Click to expand...
Click to collapse
I haven't tested it.. need functional phone now...
one user on discord tested it and reported a bootloop on animation logo:
yes, i tried with different gapps and just with the os and nothing, just stuck in the los animation
Click to expand...
Click to collapse

Categories

Resources