phhusson / treble_experimentations

Notes about tinkering with Android Project Treble
3.4k stars 660 forks source link

[sailfish] flash arm64-ab-gapps.img FAILED (remote: 'size too large') #1161

Open satmandu opened 4 years ago

satmandu commented 4 years ago

This is the Pixel 1/OG Pixel. Full gapps flash fails. Is it possible to get a smaller version with gapps?

fastboot flash system system-quack-arm64-ab-gapps.img 
Sending sparse 'system_b' 1/6 (524284 KB)          OKAY [ 12.823s]
Writing 'system_b'                                 FAILED (remote: 'size too large')
fastboot: error: Command failed

Vanilla gapps flash succeeds, but when booted just shows Android on the screen on a loop. Maybe related to https://github.com/phhusson/treble_experimentations/issues/1059?

fastboot flash system system-quack-arm64-ab-vanilla.img 
Sending sparse 'system_b' 1/4 (524284 KB)          OKAY [ 13.745s]
Writing 'system_b'                                 OKAY [  3.496s]
Sending sparse 'system_b' 2/4 (524284 KB)          OKAY [ 13.172s]
Writing 'system_b'                                 OKAY [  3.535s]
Sending sparse 'system_b' 3/4 (524284 KB)          OKAY [ 12.622s]
Writing 'system_b'                                 OKAY [  3.539s]
Sending sparse 'system_b' 4/4 (120340 KB)          OKAY [  3.151s]
Writing 'system_b'                                 OKAY [  0.898s]
Finished. Total time: 54.328s

Partition info:

fastboot getvar all
(bootloader) version:0.5
(bootloader) hw-revision:PVT
(bootloader) mid:G-2PW4100
(bootloader) version-main:1.0.0.33
(bootloader) imei:*******
(bootloader) ramdump-mode:false
(bootloader) boot-mode:FASTBOOT
(bootloader) has-slot:radio:yes
(bootloader) has-slot:bootloader:yes
(bootloader) has-slot:reserve5:no
(bootloader) has-slot:devinfo:no
(bootloader) has-slot:fsg:no
(bootloader) has-slot:mfg:no
(bootloader) has-slot:board_info:no
(bootloader) has-slot:reserve4:no
(bootloader) has-slot:metadata:no
(bootloader) has-slot:pg2fs:no
(bootloader) has-slot:pg1fs:no
(bootloader) has-slot:ramdump:no
(bootloader) has-slot:frp:no
(bootloader) has-slot:reserve3:no
(bootloader) has-slot:cdt:no
(bootloader) has-slot:ddr:no
(bootloader) has-slot:modemst2:no
(bootloader) has-slot:modemst1:no
(bootloader) has-slot:fsc:no
(bootloader) has-slot:dip:no
(bootloader) has-slot:dpo:no
(bootloader) has-slot:devinfobak:no
(bootloader) has-slot:sec:no
(bootloader) has-slot:persist:no
(bootloader) has-slot:ssd:no
(bootloader) has-slot:misc:no
(bootloader) has-slot:xbl:yes
(bootloader) has-slot:reserve0:no
(bootloader) has-slot:userdata:no
(bootloader) has-slot:system:yes
(bootloader) has-slot:vendor:yes
(bootloader) has-slot:apdp:yes
(bootloader) has-slot:msadp:yes
(bootloader) has-slot:modem:yes
(bootloader) has-slot:devcfg:yes
(bootloader) has-slot:hosd:yes
(bootloader) has-slot:boot:yes
(bootloader) has-slot:aboot:yes
(bootloader) has-slot:cmnlib64:yes
(bootloader) has-slot:cmnlib32:yes
(bootloader) has-slot:hyp:yes
(bootloader) has-slot:pmic:yes
(bootloader) has-slot:rpm:yes
(bootloader) has-slot:tz:yes
(bootloader) has-slot:keymaster:yes
(bootloader) has-slot:bootlocker:yes
(bootloader) slot-count:2
(bootloader) current-slot:b
(bootloader) slot-retry-count:b:3
(bootloader) slot-unbootable:b:no
(bootloader) slot-successful:b:no
(bootloader) slot-retry-count:a:2
(bootloader) slot-unbootable:a:no
(bootloader) slot-successful:a:yes
(bootloader) battery-soc-ok:yes
(bootloader) battery-voltage:4251000
(bootloader) variant:US
(bootloader) secure:no
(bootloader) unlocked:yes
(bootloader) version-baseband:8996-130361-1905270421
(bootloader) version-bootloader:8996-012001-1908071822
(bootloader) off-mode-charge:1
(bootloader) charger-screen-enabled:1
(bootloader) max-download-size: 0x20000000
(bootloader) partition-type:userdata:ext4
(bootloader) partition-size:userdata:    0x635400000
(bootloader) partition-type:system_b:ext4
(bootloader) partition-size:system_b:    0x80000000
(bootloader) partition-type:system_a:ext4
(bootloader) partition-size:system_a:    0x80000000
(bootloader) partition-type:vendor_b:ext4
(bootloader) partition-size:vendor_b:    0x12c00000
(bootloader) partition-type:vendor_a:ext4
(bootloader) partition-size:vendor_a:    0x12c00000
(bootloader) partition-type:boot_b:raw
(bootloader) partition-size:boot_b:  0x2000000
(bootloader) partition-type:boot_a:raw
(bootloader) partition-size:boot_a:  0x2000000
(bootloader) serialno:*****
(bootloader) kernel:lk
(bootloader) product:sailfish
all: 
Finished. Total time: 2.211s
phhusson commented 4 years ago

Please provide logs for the no-boot issue.

Could you confirm that your system partition is 2GB?

rashydos commented 4 years ago

I Have the same problem, how can I check system partition size?

satmandu commented 4 years ago

@phhusson See above that partition-size:system_b: 0x80000000 0x80000000 in hex is 2147483648 in decimal. 2147483648 Bytes is 2Gb.

satmandu commented 4 years ago

Also I can't get a log since adb logcat is waiting for device during the android text pulsing on the screen at first boot.

phhusson commented 4 years ago

Yeah I've read fastboot logs too, but 2GB feels small, so I wouldn't mind another confirmation :-)

Are you running stock unmodified boot.img? Magisk could explain that you don't have adb on boot

Le ven. 6 mars 2020 à 17:29, satmandu notifications@github.com a écrit :

Also I can't get a log since adb logcat is waiting for device during the android text pulsing on the screen at first boot.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/phhusson/treble_experimentations/issues/1161?email_source=notifications&email_token=AAAA4OQUANWOUEXOIRZMKALRGEQF5A5CNFSM4LCY7OWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOB63OQ#issuecomment-595848634, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAA4OU3SQIWPHWQVW3XITTRGEQF5ANCNFSM4LCY7OWA .

rashydos commented 4 years ago

try fastboot with option -S 128M

satmandu commented 4 years ago

@phhusson I'm running stock boot, but I wiped userdata before trying to write the GSI so that might have wiped whatever permissions were needed for adb at boot.

@rashydos I tried flashing the gapps image with various iterations of -S X down below 128M with no success.

satmandu commented 4 years ago

@phhusson I think this thread on sailfish confirms ~ 2Gb for System. It is a 32Gb device, so I can see them skimping on system size when they built it.

satmandu commented 4 years ago

Also apparently other people are having an issue with being unable to boot sailfish without asking here, so happy to help troubleshoot this.

satmandu commented 4 years ago

replaced boot img with twrp, and here are the log files from /sys/fs/pstore/console-ramoops pmsg-ramoops-0.gz console-ramoops.gz

satmandu commented 4 years ago

Worth noting that system size is also 2Gb as per https://android.googlesource.com/device/google/marlin/+/refs/heads/master/sailfish/BoardConfig.mk

TARGET_USERIMAGES_USE_EXT4 := true
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x02000000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2147483648
BOARD_SYSTEMIMAGE_EXTFS_INODE_COUNT := 4096
BOARD_USERDATAIMAGE_PARTITION_SIZE := 10737418240
BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432
BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)
BOARD_EXT4_SHARE_DUP_BLOCKS := true