Skip to content

grapheneos android 17 - #391

Open
mio-19 wants to merge 30 commits into
nix-community:masterfrom
mio-19:gos17
Open

grapheneos android 17#391
mio-19 wants to merge 30 commits into
nix-community:masterfrom
mio-19:gos17

Conversation

@mio-19

@mio-19 mio-19 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

it works

@mio-19
mio-19 marked this pull request as ready for review June 26, 2026 06:23
mio-19 and others added 8 commits June 26, 2026 21:49
apexer hardcodes absolute paths like /bin/cp, /bin/ls, and
/usr/bin/fallocate that are missing on NixOS and break APEX signing.

Co-authored-by: Cursor <cursoragent@cursor.com>
Revert the unshare FHS wrapper around apexer. apexer passes absolute
paths like /bin/cp to FindBinaryPath, which only checks that literal
path instead of searching tool_path_list. Use bare tool names so PATH
from --apexer_tool_path works on NixOS.

Co-authored-by: Cursor <cursoragent@cursor.com>
com.android.webapp is a new mainline APEX in Android 17 with an embedded
WebAppService.apk that needs an explicit extra_apks entry at release signing.

Co-authored-by: Cursor <cursoragent@cursor.com>
generate-factory-images-common.sh already writes $PRODUCT-factory-$VERSION.zip
in the working directory. When VERSION equals buildNumber (numeric GrapheneOS
releases), the release script's mv to the same filename fails and aborts before
writing updater metadata.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mio-19

mio-19 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

I am running system based on this branch on my husky and pixel tablet. it works

@jaspinegz

jaspinegz commented Jun 30, 2026

Copy link
Copy Markdown

Thanks for making these changes. I tried to build a GrapheneOS image on NixOS using your branch, and got this error while executing the release.sh script from robotnixConfigurations.<name>.releaseScript.

unshare: unshare failed: Operation not permitted

I suppose this is due to the change under modules/base.nix to fixOtaTools which tries to setup an FHS environment to run the apexer utility. I think it would work if I ran the release script as root but this isn't ideal.

Do you have any ideas? Maybe we could do the FHS environment a different way.

edit: I think maybe buildFHSEnv would be the best approach. That uses bwrap so it doesn't require privileges.

Replace the manual unshare wrapper with pkgs.buildFHSEnv for apexer in order to fix 'Operation not permitted' issues on some systems.
@mio-19

mio-19 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

@dcurgz The latest commit might help

mio-19 and others added 2 commits July 7, 2026 15:00
Signed-off-by: The one with the braid <info@braid.business>
Comment thread modules/signing.nix Outdated
"WifiDialog.apk" = "${config.device}/releasekey";
"Bluetooth.apk" = "${config.device}/bluetooth";
})
// (lib.optionalAttrs (lib.versionAtLeast config.stateVersion "3" && config.androidVersion >= 17) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this guarded behind stateVersion? I'm at stateVersion = 1 but I wouldn't think that would cause an issue.

Comment thread modules/signing.nix Outdated
Co-authored-by: Brian McKenna <brian@brianmckenna.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants