Project

General

Profile

Actions

Issue #1876

closed

error when signinf build for i9100

Added by Fil Lupin over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Build system
Target version:
Start date:
04/03/2018
Due date:
% Done:

0%

Estimated time:
Resolution:
Device:
Galaxy S 2 (I9100)
Grant:
Type of work:

Description

Hi,
following instructions on the page https://redmine.replicant.us/projects/replicant/wiki/GalaxyS2I9100Build
I got this output when trying to sign the build ofr i9100:

$ ./vendor/replicant/sign-build i9100
rewriting BOOT/RAMDISK/default.prop:
  replace:  ro.bootimage.build.fingerprint=replicant_i9100:6.0.1/MOI10E/eng.debian.20180101.161037:userdebug/test-keys
     with:  ro.bootimage.build.fingerprint=replicant_i9100:6.0.1/MOI10E/eng.debian.20180101.161037:userdebug/release-keys
rewriting RECOVERY/RAMDISK/default.prop:
  replace:  ro.bootimage.build.fingerprint=replicant_i9100:6.0.1/MOI10E/eng.debian.20180101.161037:userdebug/test-keys
     with:  ro.bootimage.build.fingerprint=replicant_i9100:6.0.1/MOI10E/eng.debian.20180101.161037:userdebug/release-keys
  replace:  ro.build.display.id=replicant_i9100-userdebug 6.0.1 MOI10E eng.debian.20180101.161037 test-keys
     with:  ro.build.display.id=replicant_i9100-userdebug 6.0.1 MOI10E eng.debian.20180101.161037
  replace:  ro.build.tags=test-keys
     with:  ro.build.tags=release-keys
    signing: org.cyanogenmod.platform-res.apk (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
java.io.FileNotFoundException: /home/debian/replicant/replicant-6.0/vendor/replicant-security/platform.x509.pem (No such file or directory)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(FileInputStream.java:195)
    at java.io.FileInputStream.<init>(FileInputStream.java:138)
    at com.android.signapk.SignApk.readPublicKey(SignApk.java:160)
    at com.android.signapk.SignApk.main(SignApk.java:908)
()
   ERROR: signapk.jar failed: return code 1
()

How could I solve this issue?

Thank you.

For information, this issue follow a former issue (https://redmine.replicant.us/issues/1857) which is now solved since the script is now foundable.

Actions #1

Updated by Fil Lupin over 6 years ago

However, I see a new file is present:

$ ll out/dist/i9100/
total 24640
-rw-r--r-- 1 debian debian 25230860 Apr  3 13:57 signed-target_files-i9100.zip

Actions #2

Updated by Fil Lupin over 6 years ago

After removing the directory "replicant-6.0/vendor/replicant-security" and starting again the script, I got a similar error:

$> ./vendor/replicant/sign-build i9100
No keys present. Generating them now.

You are about to be asked to enter information that will be incorporated
into your certificate requests.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank.
For some fields there will be a default value.
Country Name (2 letter code) [AU]:FR
State or Province Name (full name) [Some-State]:France
Locality Name (eg, city) []:Paris
Organization Name (eg, company) [Internet Widgits Pty Ltd]F.Society            D
Organizational Unit Name (eg, section) []:IT
Common Name (e.g. your name) []:Fil
Email Address []:fil@fil.org
Enter password for '/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey' (blank for none; password will be visible): 
creating /home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey.pk8 with no password
Generating RSA private key, 2048 bit long modulus
.....................................................................+++
........................................+++
e is 65537 (0x10001)

Enter password for '/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform' (blank for none; password will be visible): 
creating /home/debian/replicant/replicant-6.0/vendor/replicant-security/platform.pk8 with no password
Generating RSA private key, 2048 bit long modulus
......+++
............+++
e is 65537 (0x10001)

Enter password for '/home/debian/replicant/replicant-6.0/vendor/replicant-security/shared' (blank for none; password will be visible): 
creating /home/debian/replicant/replicant-6.0/vendor/replicant-security/shared.pk8 with no password
Generating RSA private key, 2048 bit long modulus
...........+++
............................+++
e is 65537 (0x10001)

Enter password for '/home/debian/replicant/replicant-6.0/vendor/replicant-security/media' (blank for none; password will be visible): 
creating /home/debian/replicant/replicant-6.0/vendor/replicant-security/media.pk8 with no password
Generating RSA private key, 2048 bit long modulus
.+++
....................+++
e is 65537 (0x10001)

rewriting BOOT/RAMDISK/default.prop:
  replace:  ro.bootimage.build.fingerprint=replicant_i9100:6.0.1/MOI10E/eng.debian.20180101.161037:userdebug/test-keys
     with:  ro.bootimage.build.fingerprint=replicant_i9100:6.0.1/MOI10E/eng.debian.20180101.161037:userdebug/release-keys
rewriting RECOVERY/RAMDISK/default.prop:
  replace:  ro.bootimage.build.fingerprint=replicant_i9100:6.0.1/MOI10E/eng.debian.20180101.161037:userdebug/test-keys
     with:  ro.bootimage.build.fingerprint=replicant_i9100:6.0.1/MOI10E/eng.debian.20180101.161037:userdebug/release-keys
  replace:  ro.build.display.id=replicant_i9100-userdebug 6.0.1 MOI10E eng.debian.20180101.161037 test-keys
     with:  ro.build.display.id=replicant_i9100-userdebug 6.0.1 MOI10E eng.debian.20180101.161037
  replace:  ro.build.tags=test-keys
     with:  ro.build.tags=release-keys
    signing: org.cyanogenmod.platform-res.apk (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: framework-res.apk                (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: LegacyCamera.apk                 (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: BluetoothMidiService.apk         (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: CaptivePortalLogin.apk           (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: messaging.apk                    (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: DocumentsUI.apk                  (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
NOT signing: F-Droid.apk
    signing: BasicDreams.apk                  (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: ExactCalculator.apk              (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: PacProcessor.apk                 (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: ReplicantWallpapers.apk          (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: PicoTts.apk                      (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: Browser.apk                      (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: Calendar.apk                     (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: telresources.apk                 (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: KeyChain.apk                     (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: UserDictionaryProvider.apk       (/home/debian/replicant/replicant-6.0/vendor/replicant-security/shared)
    signing: AdvancedDisplay.apk              (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: Bluetooth.apk                    (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: Development.apk                  (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: CMFileManager.apk                (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: Terminal.apk                     (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: LiveWallpapersPicker.apk         (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: Stk.apk                          (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: SoundRecorder.apk                (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: Email.apk                        (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: LatinIME.apk                     (/home/debian/replicant/replicant-6.0/vendor/replicant-security/shared)
    signing: Exchange2.apk                    (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: webview.apk                      (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: HTMLViewer.apk                   (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: LockClock.apk                    (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: WAPPushManager.apk               (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: Gallery.apk                      (/home/debian/replicant/replicant-6.0/vendor/replicant-security/media)
    signing: DeskClock.apk                    (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: PrintSpooler.apk                 (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: Profiles.apk                     (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: SamsungServiceMode.apk           (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: WallpaperPicker.apk              (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: Provision.apk                    (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: DownloadProviderUi.apk           (/home/debian/replicant/replicant-6.0/vendor/replicant-security/media)
    signing: CertInstaller.apk                (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: RepWifi.apk                      (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
rewriting SYSTEM/etc/security/mac_permissions.xml with new keys.
rewriting SYSTEM/etc/permissions/ with new keys.
rewriting SYSTEM/etc/permissions/org.cyanogenmod.livedisplay.xml with new keys.
rewriting SYSTEM/etc/permissions/org.cyanogenmod.hardware.xml with new keys.
rewriting SYSTEM/etc/permissions/permissions_org.fdroid.fdroid.privileged.xml with new keys.
rewriting SYSTEM/etc/permissions/android.software.webview.xml with new keys.
rewriting SYSTEM/etc/permissions/org.cyanogenmod.audio.xml with new keys.
rewriting SYSTEM/etc/permissions/android.hardware.wifi.xml with new keys.
rewriting SYSTEM/etc/permissions/android.software.sip.voip.xml with new keys.
rewriting SYSTEM/etc/permissions/org.cyanogenmod.partner.xml with new keys.
rewriting SYSTEM/etc/permissions/org.cyanogenmod.appsuggest.xml with new keys.
rewriting SYSTEM/etc/permissions/android.hardware.camera.front.xml with new keys.
rewriting SYSTEM/etc/permissions/org.cyanogenmod.profiles.xml with new keys.
rewriting SYSTEM/etc/permissions/android.hardware.touchscreen.xml with new keys.
rewriting SYSTEM/etc/permissions/android.hardware.location.xml with new keys.
rewriting SYSTEM/etc/permissions/android.hardware.bluetooth_le.xml with new keys.
rewriting SYSTEM/etc/permissions/android.hardware.camera.xml with new keys.
rewriting SYSTEM/etc/permissions/android.hardware.sensor.accelerometer.xml with new keys.
rewriting SYSTEM/etc/permissions/org.cyanogenmod.telephony.xml with new keys.
rewriting SYSTEM/etc/permissions/platform.xml with new keys.
rewriting SYSTEM/etc/permissions/com.android.media.remotedisplay.xml with new keys.
rewriting SYSTEM/etc/permissions/android.hardware.wifi.direct.xml with new keys.
rewriting SYSTEM/etc/permissions/android.hardware.usb.accessory.xml with new keys.
rewriting SYSTEM/etc/permissions/org.cyanogenmod.livelockscreen.xml with new keys.
rewriting SYSTEM/etc/permissions/org.cyanogenmod.weather.xml with new keys.
rewriting SYSTEM/etc/permissions/org.cyanogenmod.platform.xml with new keys.
rewriting SYSTEM/etc/permissions/android.hardware.sensor.compass.xml with new keys.
rewriting SYSTEM/etc/permissions/handheld_core_hardware.xml with new keys.
rewriting SYSTEM/etc/permissions/com.cyanogenmod.android.xml with new keys.
rewriting SYSTEM/etc/permissions/android.software.live_wallpaper.xml with new keys.
rewriting SYSTEM/etc/permissions/android.hardware.camera.flash-autofocus.xml with new keys.
rewriting SYSTEM/etc/permissions/android.hardware.camera.autofocus.xml with new keys.
rewriting SYSTEM/etc/permissions/org.cyanogenmod.statusbar.xml with new keys.
rewriting SYSTEM/etc/permissions/org.cyanogenmod.theme.xml with new keys.
rewriting SYSTEM/etc/permissions/android.software.sip.xml with new keys.
rewriting SYSTEM/etc/permissions/android.hardware.sensor.gyroscope.xml with new keys.
rewriting SYSTEM/etc/permissions/android.hardware.touchscreen.multitouch.xml with new keys.
rewriting SYSTEM/etc/permissions/android.hardware.sensor.proximity.xml with new keys.
rewriting SYSTEM/etc/permissions/org.cyanogenmod.performance.xml with new keys.
rewriting SYSTEM/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml with new keys.
rewriting SYSTEM/etc/permissions/android.hardware.telephony.gsm.xml with new keys.
rewriting SYSTEM/etc/permissions/android.hardware.usb.host.xml with new keys.
rewriting SYSTEM/etc/permissions/android.hardware.sensor.light.xml with new keys.
rewriting SYSTEM/etc/permissions/com.android.location.provider.xml with new keys.
rewriting SYSTEM/etc/permissions/com.android.mediadrm.signer.xml with new keys.
rewriting SYSTEM/build.prop:
  replace:  ro.build.display.id=replicant_i9100-userdebug 6.0.1 MOI10E eng.debian.20180101.161037 test-keys
     with:  ro.build.display.id=replicant_i9100-userdebug 6.0.1 MOI10E eng.debian.20180101.161037
  replace:  ro.build.tags=test-keys
     with:  ro.build.tags=release-keys
    signing: CallLogBackup.apk                (/home/debian/replicant/replicant-6.0/vendor/replicant-security/shared)
    signing: CellBroadcastReceiver.apk        (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: SettingsProvider.apk             (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: CalendarProvider.apk             (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: Trebuchet.apk                    (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: WeatherManagerService.apk        (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: DownloadProvider.apk             (/home/debian/replicant/replicant-6.0/vendor/replicant-security/media)
    signing: ThemeChooser.apk                 (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: DataUsageProvider.apk            (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: CarrierConfig.apk                (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: Telecom.apk                      (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: ManagedProvisioning.apk          (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: SystemUI.apk                     (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: CMAudioService.apk               (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: LiveLockScreenService.apk        (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: Eleven.apk                       (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: AudioFX.apk                      (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: PackageInstaller.apk             (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: CyanogenSetupWizard.apk          (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: ContactsProvider.apk             (/home/debian/replicant/replicant-6.0/vendor/replicant-security/shared)
    signing: TeleService.apk                  (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: SharedStorageBackup.apk          (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: WallpaperCropper.apk             (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: StatementService.apk             (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: FusedLocation.apk                (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: OneTimeInitializer.apk           (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: Screencast.apk                   (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: BackupRestoreConfirmation.apk    (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: Shell.apk                        (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: Settings.apk                     (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: ExternalStorageProvider.apk      (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: MmsService.apk                   (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: CMSettingsProvider.apk           (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: ProxyHandler.apk                 (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: Dialer.apk                       (/home/debian/replicant/replicant-6.0/vendor/replicant-security/shared)
    signing: InputDevices.apk                 (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: ThemeManagerService.apk          (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: VpnDialogs.apk                   (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: TelephonyProvider.apk            (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: Contacts.apk                     (/home/debian/replicant/replicant-6.0/vendor/replicant-security/shared)
    signing: DefaultContainerService.apk      (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: MediaProvider.apk                (/home/debian/replicant/replicant-6.0/vendor/replicant-security/media)
    signing: FDroidPrivilegedExtension.apk    (/home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey)
    signing: WeatherProvider.apk              (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
    signing: ThemesProvider.apk               (/home/debian/replicant/replicant-6.0/vendor/replicant-security/platform)
META/otakeys.txt has no keys; using /home/debian/replicant/replicant-6.0/vendor/replicant-security/releasekey.x509.pem
/home/debian/replicant/replicant-6.0/build/tools/releasetools/common.py:1054: UserWarning: Duplicate name: 'META/releasekey.txt'
  zip_file.writestr(zinfo, data)
Traceback (most recent call last):
  File "/home/debian/replicant/replicant-6.0/device/samsung/galaxys2-common/releasetools/galaxys2_sign_target_files_apks", line 90, in <module>
    main(sys.argv[1:])
  File "/home/debian/replicant/replicant-6.0/build/tools/releasetools/sign_target_files_apks", line 516, in main
    apk_key_map, key_passwords)
  File "/home/debian/replicant/replicant-6.0/build/tools/releasetools/sign_target_files_apks", line 256, in ProcessTargetFiles
    "recovery.img", "recovery.img", tmpdir, "RECOVERY", info_dict=misc_info)
  File "/home/debian/replicant/replicant-6.0/device/samsung/galaxys2-common/releasetools/galaxys2_sign_target_files_apks", line 84, in GetBootableImage
    return RebuildBootableImage(name, prebuilt_name, unpack_dir, tree_subdir)
  File "/home/debian/replicant/replicant-6.0/device/samsung/galaxys2-common/releasetools/galaxys2_sign_target_files_apks", line 44, in RebuildBootableImage
    ramdisk_cpio = os.path.join(TARGET_DIR, "ramdisk-recovery.cpio")
  File "/usr/lib/python2.7/posixpath.py", line 70, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'
Actions #3

Updated by Kurtis Hanna about 6 years ago

I think this was figured out by Asara and Putti recently in the IRC. I believe it was an issue with the script being too picky with the type of text that is inputted or something.

Actions #4

Updated by Joonas Kylmälä about 6 years ago

  • Status changed from New to Closed

This issue is cause by the same input validation problem as in issue #1870. Let's continue discussion there.

Actions

Also available in: Atom PDF