diff --git a/clients/android/build-in-docker.go b/clients/android/build-in-docker.go index 3801ef879..6dec38ef1 100755 --- a/clients/android/build-in-docker.go +++ b/clients/android/build-in-docker.go @@ -65,8 +65,22 @@ func buildApp() { } cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr - if err := cmd.Run(); err != nil { - log.Fatalf("Error building Android app: %v", err) + + if _, err := os.ReadFile("./keystore.properties"); err != nil { + // no keystore. + // generate one that's in line with the one from devenv/Dockerfile. + + const keystore = `## Code generated by perkeep; DO NOT EDIT. +storeFile=/home/gopher/keystore +storePassword=gopher +keyAlias=perkeep +keyPassword=gopher +` + err = os.WriteFile("./keystore.properties", []byte(keystore), 0644) + if err != nil { + log.Fatalf("could not write default keystore.properties: %+v", err) + } + defer os.Remove("./keystore.properties") } }