Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Redfin) Build from source boots ok once, but on subsequent boots many errors #25

Open
nicedream06 opened this issue May 5, 2022 · 10 comments

Comments

@nicedream06
Copy link

I'm building Proton from source for Pixel 5 (redfin). No changes to the source, other than setting WITH_GMS to true for Gapps, and replacing the radio.img file that's not included in the NeutronBlobs repo due to size restrictions.

For the initial first boot, everything seems fine. I go through the pixel setup wizard with no problems, and everything seems normal.
But when I reboot, wifi/mobile/bluetooth all fail to connect. And then I start getting a flood of " has stopped working" messages. I've never seen anything like this, where things start to fail only on the 2nd boot and thereafter.

Checking the logcat shows a flood of "SELinux AVC denied" errors, so clear ly there is some reason the OS is prevented from accessing certain things, but I'm not sure why.

Any suggestions?

@nicedream06
Copy link
Author

Logcat:

logcat.txt

@kdrag0n
Copy link
Member

kdrag0n commented May 19, 2022

I haven't seen issues like this before. Make sure you're doing a user build, not userdebug, and make sure you flashed all built images (including vendor.img).

@nicedream06
Copy link
Author

I have been doing engineering builds (lunch redfin-eng), because that's mentioned in the build process on the ProtonAOSP website. I can try doing a user build if you think that may be the issue, but my impression was that the eng build would be the least likely to have errors relating to security because it's the least secure type of build.

I have also flashed all partitions based on the guide on the website, and have also tried it via 'fastboot flashall'. Same results either way.

@kdrag0n
Copy link
Member

kdrag0n commented May 19, 2022

Try user.

@nicedream06
Copy link
Author

Building it right now. Thanks.

@nicedream06
Copy link
Author

Unfortunately doing a user build did not work. From the first boot, during the initial Android setup, the sim card and wifi were completely inoperable.

I noticed that in the official build of Proton, it flashes avb_custom_key. Any chance that this could have anything to do with the problems w/ my custom build?

@TaeHagen
Copy link

I've also experienced this issue and after looking into it, it's a natural consequence of ProtonAOSP/android_frameworks_base@922d7b1 and ProtonAOSP/android_build_make@b8692a4 The seamless migration between test and release keys (first commit) checks Build.DISPLAY for test-keys, and the second commit always sets Build.DISPLAY to release-keys. Therefore on test builds, the system thinks it should convert the test keys to release keys, which then mismatch and cause signature issues on subsequent boots. A temporary workaround is to revert the second commit. I believe this is a bug.

@nicedream06
Copy link
Author

Thank you for this update. I knew there had to be something going on in the background here, because I have been building and flashing Android roms for years and never encountered something like this.

Have you tested reverting that second commit, and can you confirm that it fixes the issue?

@TaeHagen
Copy link

It does for me, building for oriole.

@nicedream06
Copy link
Author

@TaeHagen: I just got done building the latest release for Pixel 5 (redfin), and reverted the commit you suggested. Looks like it's working now. Thanks so much!

I hope that @kdrag0n sees this and incorporates what you found in a future release.

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

No branches or pull requests

3 participants