[OnePlus 9 Pro] largeBrazilNut:
I need help with signing. I use https://wiki.lineageos.org/signing_builds procedure.

"mka target-files-package otatools" is successful. Then, I do:

line@m103:~$ sign_target_files_apks -o -d ~/.android-certs \
> $OUT/obj/PACKAGING/target_files_intermediates/*-target_files-*.zip \
> signed-target_files.zip
2022-10-08 15:56:05 - common.py - WARNING : Failed to read SYSTEM/etc/build.prop
2022-10-08 15:56:05 - common.py - WARNING : Failed to read VENDOR/etc/build.prop
2022-10-08 15:56:05 - common.py - WARNING : Failed to read PRODUCT/etc/build.prop
2022-10-08 15:56:05 - common.py - WARNING : Failed to read SYSTEM_EXT/etc/build.prop
Enter password for /home/line/.android-certs/media key>
Enter password for /home/line/.android-certs/networkstack key>
Enter password for /home/line/.android-certs/platform key>
Enter password for /home/line/.android-certs/releasekey key>
Enter password for /home/line/.android-certs/shared key>
Rewriting BOOT/RAMDISK/prop.default:
replace: ro.system.build.tags=test-keys
with: ro.system.build.tags=release-keys
replace: ro.build.display.id=lineage_lemonade-userdebug 11 RQ3A.211001.001 eng.line.20221007.133303 test-keys
with: ro.build.display.id=lineage_lemonade-userdebug 11 RQ3A.211001.001 eng.line.20221007.133303
replace: ro.build.tags=test-keys
with: ro.build.tags=release-keys
replace: ro.vendor.build.tags=test-keys
with: ro.vendor.build.tags=release-keys
replace: ro.odm.build.tags=test-keys
with: ro.odm.build.tags=release-keys
replace: ro.product.build.tags=test-keys
with: ro.product.build.tags=release-keys
replace: ro.system_ext.build.tags=test-keys
with: ro.system_ext.build.tags=release-keys
Rewriting ODM/etc/build.prop:
replace: ro.odm.build.tags=test-keys
with: ro.odm.build.tags=release-keys
signing: Backgrounds.apk (/home/line/.android-certs/releasekey)
signing: DeskClock.apk (/home/line/.android-certs/releasekey)
signing: Etar.apk (/home/line/.android-certs/releasekey)
signing: ExactCalculator.apk (/home/line/.android-certs/releasekey)
signing: Jelly.apk (/home/line/.android-certs/releasekey)
signing: LatinIME.apk (/home/line/.android-certs/shared)
signing: LineageThemesStub.apk (/home/line/.android-certs/releasekey)
signing: LocalContactsBackup.apk (/home/line/.android-certs/releasekey)
signing: ModuleMetadata.apk (/home/line/.android-certs/releasekey)
signing: PhotoTable.apk (/home/line/.android-certs/releasekey)
signing: PowerOffAlarm.apk (/home/line/.android-certs/platform)
signing: Recorder.apk (/home/line/.android-certs/releasekey)
signing: messaging.apk (/home/line/.android-certs/releasekey)
signing: webview.apk (/home/line/.android-certs/releasekey)
Rewriting PRODUCT/build.prop:
replace: ro.product.build.tags=test-keys
with: ro.product.build.tags=release-keys
Rewriting PRODUCT/etc/selinux/product_mac_permissions.xml with new keys.
signing: AccentColorAmethystOverlay.apk (/home/line/.android-certs/releasekey)
signing: AccentColorAquamarineOverlay.apk (/home/line/.android-certs/releasekey)
signing: AccentColorCarbonOverlay.apk (/home/line/.android-certs/releasekey)
signing: AccentColorCinnamonOverlay.apk (/home/line/.android-certs/releasekey)
signing: AccentColorGreenOverlay.apk (/home/line/.android-certs/releasekey)
signing: AccentColorOceanOverlay.apk (/home/line/.android-certs/releasekey)
signing: AccentColorOrchidOverlay.apk (/home/line/.android-certs/releasekey)
signing: AccentColorPaletteOverlay.apk (/home/line/.android-certs/releasekey)
signing: AccentColorPurpleOverlay.apk (/home/line/.android-certs/releasekey)
signing: AccentColorSandOverlay.apk (/home/line/.android-certs/releasekey)
signing: AccentColorSpaceOverlay.apk (/home/line/.android-certs/releasekey)
signing: AccentColorTangerineOverlay.apk (/home/line/.android-certs/releasekey)
signing: DisplayCutoutEmulationCornerOverlay.apk (/home/line/.android-certs/releasekey)
signing: DisplayCutoutEmulationDoubleOverlay.apk (/home/line/.android-certs/releasekey)
signing: DisplayCutoutEmulationHoleOverlay.apk (/home/line/.android-certs/releasekey)
signing: DisplayCutoutEmulationTallOverlay.apk (/home/line/.android-certs/releasekey)
signing: DisplayCutoutEmulationWaterfallOverlay.apk (/home/line/.android-certs/releasekey)
signing: FontNotoSerifSourceOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackCircularAndroidOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackCircularLauncherOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackCircularSettingsOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackCircularSystemUIOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackCircularThemePickerOverlay.apk (/home/line/.android-certs/platform)
signing: IconPackFilledAndroidOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackFilledLauncherOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackFilledSettingsOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackFilledSystemUIOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackFilledThemePickerOverlay.apk (/home/line/.android-certs/platform)
signing: IconPackKaiAndroidOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackKaiLauncherOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackKaiSettingsOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackKaiSystemUIOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackKaiThemePickerOverlay.apk (/home/line/.android-certs/platform)
signing: IconPackRoundedAndroidOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackRoundedLauncherOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackRoundedSettingsOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackRoundedSystemUIOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackRoundedThemePickerOverlay.apk (/home/line/.android-certs/platform)
signing: IconPackSamAndroidOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackSamLauncherOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackSamSettingsOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackSamSystemUIOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackSamThemePickerOverlay.apk (/home/line/.android-certs/platform)
signing: IconPackVictorAndroidOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackVictorLauncherOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackVictorSettingsOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackVictorSystemUIOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconPackVictorThemePickerOverlay.apk (/home/line/.android-certs/platform)
signing: IconShapePebbleOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconShapeRoundedRectOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconShapeSquareOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconShapeSquircleOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconShapeTaperedRectOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconShapeTeardropOverlay.apk (/home/line/.android-certs/releasekey)
signing: IconShapeVesselOverlay.apk (/home/line/.android-certs/releasekey)
signing: LineageBlackAccent.apk (/home/line/.android-certs/platform)
signing: LineageBlackTheme.apk (/home/line/.android-certs/platform)
signing: LineageBlueAccent.apk (/home/line/.android-certs/platform)
signing: LineageBrownAccent.apk (/home/line/.android-certs/platform)
signing: LineageCyanAccent.apk (/home/line/.android-certs/platform)
signing: LineageGreenAccent.apk (/home/line/.android-certs/platform)
signing: LineageLatoFont.apk (/home/line/.android-certs/platform)
signing: LineageNavigationBarNoHint.apk (/home/line/.android-certs/platform)
signing: LineageOrangeAccent.apk (/home/line/.android-certs/platform)
signing: LineagePinkAccent.apk (/home/line/.android-certs/platform)
signing: LineagePurpleAccent.apk (/home/line/.android-certs/platform)
signing: LineageRedAccent.apk (/home/line/.android-certs/platform)
signing: LineageRubikFont.apk (/home/line/.android-certs/platform)
signing: LineageYellowAccent.apk (/home/line/.android-certs/platform)
signing: NavigationBarMode2ButtonOverlay.apk (/home/line/.android-certs/releasekey)
signing: NavigationBarMode3ButtonOverlay.apk (/home/line/.android-certs/releasekey)
signing: NavigationBarModeGesturalOverlay.apk (/home/line/.android-certs/releasekey)
signing: NavigationBarModeGesturalOverlayExtraWideBack.apk (/home/line/.android-certs/releasekey)
signing: NavigationBarModeGesturalOverlayNarrowBack.apk (/home/line/.android-certs/releasekey)
signing: NavigationBarModeGesturalOverlayWideBack.apk (/home/line/.android-certs/releasekey)
signing: WifiResCommon.apk (/home/line/.android-certs/releasekey)
signing: Contacts.apk (/home/line/.android-certs/shared)
signing: Dialer.apk (/home/line/.android-certs/shared)
signing: Eleven.apk (/home/line/.android-certs/releasekey)
signing: HotwordEnrollmentOKGoogleHEXAGON.apk (/home/line/.android-certs/platform)
signing: HotwordEnrollmentXGoogleHEXAGON.apk (/home/line/.android-certs/platform)
signing: OneTimeInitializer.apk (/home/line/.android-certs/releasekey)
signing: SettingsIntelligence.apk (/home/line/.android-certs/releasekey)
Rewriting ROOT/default.prop:
signing: com.android.adbd.apex container (system/core/adb/apex/com.android.adbd)
: com.android.adbd.apex payload (system/core/adb/apex/com.android.adbd.pem)
NOT signing: com.android.apex.cts.shim.apex
(skipped due to special cert string)
signing: com.android.art.release.apex container (art/build/apex/com.android.art)
: com.android.art.release.apex payload (art/build/apex/com.android.art.pem)
signing: com.android.cellbroadcast.apex container (packages/apps/CellBroadcastReceiver/apex/com.android.cellbroadcast)
: com.android.cellbroadcast.apex payload (packages/apps/CellBroadcastReceiver/apex/com.android.cellbroadcast.pem)

ERROR: Failed to run signapk.jar: return code 1:
Picked up _JAVA_OPTIONS: -Xmx4g
Enter password for /home/line/.android-certs/networkstack.pk8 (password will not be hidden): java.lang.NullPointerException
at com.android.signapk.SignApk.decryptPrivateKey(SignApk.java:242)
at com.android.signapk.SignApk.readPrivateKey(SignApk.java:267)
at com.android.signapk.SignApk.main(SignApk.java:1144)

At the start of the script, I correctly enter passwords from all 5 keys.

At the error point at the end, the script does not wait for any input after the "(password will not be hidden)" prompt. NullPointerException happens immediately.

Build environment: Ubuntu 18.04.6 LTS

Lineage version: 18.1 here, but the exact same error happens when I try to sign 19.1 after building

Product: lemonade

Any thoughts / suggestions would be appreciated. Thanks.

/alex