!UUYziobKGGxpovWyAN:nixos.org

Robotnix

265 Members
Build Android (AOSP) using Nix | https://github.com/danielfullmer/robotnix84 Servers

Load older messages


SenderMessageTime
7 Sep 2021
@kranzes:matrix.orgkranzes

danielrf

[kranzes@pongo /home/1TB-HDD/Android]$ store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh ./keys
Generating miatoll/releasekey key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating miatoll/platform key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating miatoll/shared key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating miatoll/media key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating miatoll/networkstack key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.hotspot2.osulogin key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.wifi.resources key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.conscrypt key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.media key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.media.swcodec key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.resolv key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.tzdata key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.adbd key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.art.release key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.cellbroadcast key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.extservices key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.i18n key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.ipsec key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.mediaprovider key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.neuralnetworks key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.os.statsd key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.runtime key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.permission key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.sdkext key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.telephony key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.tethering key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.wifi key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.vndk.current key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.vndk.v27 key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.vndk.v28 key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.vndk.v29 key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating microg key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating bromitewebview key
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 24: make_key: command not found
Generating com.android.conscrypt APEX AVB key
Generating RSA private key, 4096 bit long modulus (2 primes)
............................................................................................................................................................................................................................................................................................................................++++
...............................................................................................................................................++++
e is 65537 (0x010001)
store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh: line 34: avbtool: command not found
23:41:25
@kranzes:matrix.orgkranzes🤔23:41:34
@kranzes:matrix.orgkranzes
{
  description = "A (not so) basic robotnix configuration";

  inputs = {
    robotnix.url = "github:Kranzes/robotnix-forklineageos";

    device_xiaomi_miatoll = { url = "github:sairam1411/device_xiaomi_miatoll"; flake = false; };
    device_xiaomi_sm6250-common = { url = "github:sairam1411/device_xiaomi_sm6250-common"; flake = false; };
    vendor_xiaomi_miatoll = { url = "github:sairam1411/vendor_xiaomi_miatoll"; flake = false; };
    vendor_xiaomi_sm6250-common = { url = "github:sairam1411/vendor_xiaomi_sm6250-common"; flake = false; };
    kernel_xiaomi_sm6250 = { url = "github:sairam1411/kernel_xiaomi_sm6250"; flake = false; };
  };

  outputs = { self, robotnix, ... }@inputs: {
    robotnixConfigurations."miatoll" = robotnix.lib.robotnixSystem ({ config, pkgs, ... }: {
      device = "miatoll";
      flavor = "lineageos";
      androidVersion = 11;

      signing.enable = true;
      signing.keyStorePath = "/home/1TB-HDD/Android/keys";

      apps.bromite.enable = false;
      apps.chromium.enable = false;

      webview = {
        chromium = {
          enable = false;
          availableByDefault = false;
        };
        bromite = {
          enable = true;
          availableByDefault = true;
        };
      };

      microg.enable = true;

      source.dirs = {
        "device/xiaomi/miatoll".src = inputs.device_xiaomi_miatoll;
        "device/xiaomi/sm6250-common".src = inputs.device_xiaomi_sm6250-common;
        "vendor/xiaomi/miatoll".src = inputs.vendor_xiaomi_miatoll;
        "vendor/xiaomi/sm6250-common".src = inputs.vendor_xiaomi_sm6250-common;
        "kernel/xiaomi/sm6250".src = inputs.kernel_xiaomi_sm6250;
      };
    });
    defaultPackage.x86_64-linux = self.robotnixConfigurations."miatoll".generateKeysScript;
  };
}
23:42:06
@danielrf:matrix.orgdanielrf take a look at /store/nix/store/y7cph0jkl19apk6wi22sl8fb9as40kxp-generate_keys.sh. It should have a line starting with export PATH 23:44:39
@danielrf:matrix.orgdanielrf and in that PATH should be something ending with android-key-tools/bin 23:44:53
@danielrf:matrix.orgdanielrf make_key should be in that directory. Does it exist? 23:45:11
@kranzes:matrix.orgkranzes
#!nix/store/kxj6cblcsd1qcbbxlmbswwrn89zcmgd6-bash-4.4-p23/bin/bash
./
set -euo pipefail

if [[ "$#" -ne 1 ]]; then
  echo "Usage: $0 <keysdir>"
  echo "$#"
  exit 1
fi

mkdir -p "$1"
cd "$1"

export PATH=/nix/store/5phzsq8z7g5d82zfnm6bz5bvi2if2am0-openssl-1.1.1k-bin/bin:/nix/store/nnblnlg5ig16ky8cf8p4ijwgn547apfg-android-key-tools/bin:$PATH

KEYS=( miatoll/releasekey miatoll/platform miatoll/shared miatoll/media miatoll/networkstack com.android.hotspot2.osulogin com.android.wifi.resources com.android.conscrypt com.android.media com.android.media.swcodec com.android.resolv com.android.tzdata com.android.adbd com.android.art.release com.android.cellbroadcast com.android.extservices com.android.i18n com.android.ipsec com.android.mediaprovider com.android.neuralnetworks com.android.os.statsd com.android.runtime com.android.permission com.android.sdkext com.android.telephony com.android.tethering com.android.wifi com.android.vndk.current com.android.vndk.v27 com.android.vndk.v28 com.android.vndk.v29 microg bromitewebview )
APEX_KEYS=( com.android.conscrypt com.android.media com.android.media.swcodec com.android.resolv com.android.tzdata com.android.adbd com.android.art.release com.android.cellbroadcast com.android.extservices com.android.i18n com.android.ipsec com.android.mediaprovider com.android.neuralnetworks com.android.os.statsd com.android.runtime com.android.permission com.android.sdkext com.android.telephony com.android.tethering com.android.wifi com.android.vndk.current com.android.vndk.v27 com.android.vndk.v28 com.android.vndk.v29 )

mkdir -p "miatoll"

for key in "${KEYS[@]}"; do
  if [[ ! -e "$key".pk8 ]]; then
    echo "Generating $key key"
    # make_key exits with unsuccessful code 1 instead of 0
    make_key "$key" "/CN=Robotnix ${key/\// }/" && exit 1
  else
    echo "Skipping generating $key since it is already exists"
  fi
done

for key in "${APEX_KEYS[@]}"; do
  if [[ ! -e "$key".pem ]]; then
    echo "Generating $key APEX AVB key"
    openssl genrsa -out "$key".pem 4096
    avbtool extract_public_key --key "$key".pem --output "$key".avbpubkey
  else
    echo "Skipping generating $key APEX key since it is already exists"
  fi
done



if [[ ! -e "miatoll/avb.pem" ]]; then
  # TODO: Maybe switch to 4096 bit avb key to match apex? Any device-specific problems with doing that?
  echo "Generating Device AVB key"
  openssl genrsa -out miatoll/avb.pem 2048
  avbtool extract_public_key --key miatoll/avb.pem --output miatoll/avb_pkmd.bin
else
  echo "Skipping generating device AVB key since it is already exists"
fi
23:45:35
@kranzes:matrix.orgkranzesits trying to use the wrong store23:46:13
@kranzes:matrix.orgkranzesremember im using --store to change the store23:46:21
@danielrf:matrix.orgdanielrfAh, that would explain it!23:46:27
@kranzes:matrix.orgkranzesi guess i can just make it sign with the default store23:46:40
@danielrf:matrix.orgdanielrfyou could also nix-copy-closure the generateKeysScript from your other store to your main /nix/store23:47:13
@kranzes:matrix.orgkranzesoverkill 23:47:26
@kranzes:matrix.orgkranzesall keys generated 23:48:12
@kranzes:matrix.orgkranzesdo i need to chgrp/chmod the keys dir?23:48:30
@danielrf:matrix.orgdanielrfYep, if you're using the sandbox exception to sign releases23:49:03
@kranzes:matrix.orgkranzesalright23:49:11
@kranzes:matrix.orgkranzes
In reply to @kranzes:matrix.org
i'll @ you once i encounter it
encountered it
23:52:13
@kranzes:matrix.orgkranzeslet me show you in asec23:52:17
@kranzes:matrix.orgkranzeshttps://github.com/ForkLineageOS/android_frameworks_base/commit/ee9742b6728f0ecb089d8783c0b8bee17debacfa#diff-533c45df53f4235f81d5ded58da796ab9f55f21cb0939077cae48f48c961188b23:54:14
@kranzes:matrix.orgkranzessome of these changes are redundant when using microg.enable23:54:24
@kranzes:matrix.orgkranzes since the microg already applies some of these changes 23:54:37
@kranzes:matrix.orgkranzesimage.png
Download image.png
23:54:45
@kranzes:matrix.orgkranzesthere are two options for me, one to use git revert to revert that commit23:55:05
@kranzes:matrix.orgkranzes * there are three options for me, one to use git revert to revert that commit23:55:14
@danielrf:matrix.orgdanielrfDoes forklineageos already provide the MicroG apk as well as the patch?23:55:22
@kranzes:matrix.orgkranzessecond, remove some of the patches that microg through robotnix does23:55:41
@kranzes:matrix.orgkranzesthird to patch frameworks_base from forklineageos through robotnix23:56:09
@kranzes:matrix.orgkranzes
In reply to @danielrf:matrix.org
Does forklineageos already provide the MicroG apk as well as the patch?
no
23:56:11
@kranzes:matrix.orgkranzesit just has that spoofing thing23:56:11

Show newer messages


Back to Room ListRoom Version: 6