Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
User build Pixel XL: cannot install apps with F-Droid #648
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
thestinger
Jun 26, 2017
Contributor
You'll need to modify packages/apps/F-Droid/privileged-extension/app/src/main/java/org/fdroid/fdroid/privileged/ClientWhitelist.java to include your keys. I haven't had time to write documentation on how to do that or to make it automated.
|
You'll need to modify |
thestinger
closed this
Jun 26, 2017
thestinger
added
the
Type: question
label
Jun 26, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
Rudd-O
Jun 26, 2017
That at least should be added to the instructions, because the instructions by default do not mention it, and the result OS does not work as advertised. Ideally, this is done already and there's no need for instructions, just a footnote in the building docs.
Rudd-O
commented
Jun 26, 2017
•
|
That at least should be added to the instructions, because the instructions by default do not mention it, and the result OS does not work as advertised. Ideally, this is done already and there's no need for instructions, just a footnote in the building docs. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
Rudd-O
Jul 30, 2017
# Rekey Android F-Droid privileged extension with build keys.
releasefp=$(
keytool -list -printcert -file keys/releasekey.x509.pem | grep SHA256: | awk ' { print $2 } ' | sed 's/://g'
)
platformfp=$(
keytool -list -printcert -file keys/platform.x509.pem | grep SHA256: | awk ' { print $2 } ' | sed 's/://g'
)
pushd packages/apps/F-Droid/privileged-extension
git checkout app/src/main/java/org/fdroid/fdroid/privileged/ClientWhitelist.java
sed -i 's|// certificate SHA-256 of https//f-droid.org/FDroid.apk|// certificate SHA-256 of https//f-droid.org/FDroid.apk\n new Pair<>("org.fdroid.fdroid", "'$releasefp'"), // this build keys|g' app/src/main/java/org/fdroid/fdroid/privileged/ClientWhitelist.java
sed -i 's|// certificate SHA-256 of https//f-droid.org/FDroid.apk|// certificate SHA-256 of https//f-droid.org/FDroid.apk\n new Pair<>("org.fdroid.fdroid", "'$platformfp'"), // this build keys|g' app/src/main/java/org/fdroid/fdroid/privileged/ClientWhitelist.java
popd
# End rekey process.Enjoy!
Rudd-O
commented
Jul 30, 2017
# Rekey Android F-Droid privileged extension with build keys.
releasefp=$(
keytool -list -printcert -file keys/releasekey.x509.pem | grep SHA256: | awk ' { print $2 } ' | sed 's/://g'
)
platformfp=$(
keytool -list -printcert -file keys/platform.x509.pem | grep SHA256: | awk ' { print $2 } ' | sed 's/://g'
)
pushd packages/apps/F-Droid/privileged-extension
git checkout app/src/main/java/org/fdroid/fdroid/privileged/ClientWhitelist.java
sed -i 's|// certificate SHA-256 of https//f-droid.org/FDroid.apk|// certificate SHA-256 of https//f-droid.org/FDroid.apk\n new Pair<>("org.fdroid.fdroid", "'$releasefp'"), // this build keys|g' app/src/main/java/org/fdroid/fdroid/privileged/ClientWhitelist.java
sed -i 's|// certificate SHA-256 of https//f-droid.org/FDroid.apk|// certificate SHA-256 of https//f-droid.org/FDroid.apk\n new Pair<>("org.fdroid.fdroid", "'$platformfp'"), // this build keys|g' app/src/main/java/org/fdroid/fdroid/privileged/ClientWhitelist.java
popd
# End rekey process.Enjoy! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
thestinger
Jul 30, 2017
Contributor
Ideally it'd whitelist the OS releasekey automatically. I just don't have time to work on F-Droid too.
|
Ideally it'd whitelist the OS releasekey automatically. I just don't have time to work on F-Droid too. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
Rudd-O
commented
Jul 30, 2017
|
What's the OS release key and how do I do that? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
Rudd-O
commented
Jul 30, 2017
|
I mean, is what I did above sufficient to get F-Droid to install apps? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
thestinger
Jul 30, 2017
Contributor
I just mean ideally it would automatically use that releasekey.x509.pem key from within the OS rather than having the whitelist that needs to be changed.
|
I just mean ideally it would automatically use that releasekey.x509.pem key from within the OS rather than having the whitelist that needs to be changed. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
thestinger
Jul 30, 2017
Contributor
@Rudd-O Yes just saying it should really use the OS releasekey automatically rather than a hard-wired list.
|
@Rudd-O Yes just saying it should really use the OS releasekey automatically rather than a hard-wired list. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
Rudd-O
Jul 30, 2017
That's what the script is meant to do (and does). You should copy and paste that code into the build instructions.
Rudd-O
commented
Jul 30, 2017
•
|
That's what the script is meant to do (and does). You should copy and paste that code into the build instructions. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
Rudd-O
Jul 30, 2017
(Sorry I didn't come up with this sooner. I'm taking some time while I recover from surgery to spin up my build server and get this shit done, so I can finally begin using my Pixel. I did not have time before.)
Rudd-O
commented
Jul 30, 2017
•
|
(Sorry I didn't come up with this sooner. I'm taking some time while I recover from surgery to spin up my build server and get this shit done, so I can finally begin using my Pixel. I did not have time before.) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
thestinger
Jul 30, 2017
Contributor
Modifying source repositories isn't really appropriate for the build instructions which is why I haven't included this in the instructions. It should be fixed in the code so it uses that key at runtime. Signing is really supposed to be something that can be done entirely after building, i.e. you shouldn't need the keys before building which is currently the case due to both this issue and the new way dm-verity signing works.
|
Modifying source repositories isn't really appropriate for the build instructions which is why I haven't included this in the instructions. It should be fixed in the code so it uses that key at runtime. Signing is really supposed to be something that can be done entirely after building, i.e. you shouldn't need the keys before building which is currently the case due to both this issue and the new way dm-verity signing works. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
thestinger
Jul 30, 2017
Contributor
So ideally, that whitelist wouldn't be modified either by us or users, but instead the privileged extension should automatically trust the OS release key, fetched at runtime.
|
So ideally, that whitelist wouldn't be modified either by us or users, but instead the privileged extension should automatically trust the OS release key, fetched at runtime. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
Rudd-O
Jul 30, 2017
I, uh, completely agree with that! Yes. If I knew Java / Android, I'd whip that up right now. Unfortunately, that's not the case. Maybe this bug can be repurposed to track the progress of that, and therefore I can get an update to nil my build script snippet that does this, when the code is in place.
Rudd-O
commented
Jul 30, 2017
|
I, uh, completely agree with that! Yes. If I knew Java / Android, I'd whip that up right now. Unfortunately, that's not the case. Maybe this bug can be repurposed to track the progress of that, and therefore I can get an update to nil my build script snippet that does this, when the code is in place. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
Rudd-O
Jul 31, 2017
I want to report that my script above worked as intended and I can now use F-Droid inside the Pixel XL just fine.
Glorious. Thank you.
Rudd-O
commented
Jul 31, 2017
|
I want to report that my script above worked as intended and I can now use F-Droid inside the Pixel XL just fine. Glorious. Thank you. |
Rudd-O commentedJun 26, 2017
•
edited
Edited 1 time
-
Rudd-O
edited Jun 26, 2017
Errors out with "The privileged permissions have not been granted to the extension."
Ghost commander install attempted. Other apps fail in the same way.
I followed the build and install instructions to the letter.