ProtonAOSP / android_manifest

Manifest for ProtonAOSP: a minimal custom Android ROM focused on UI/UX and performance, with a touch of privacy.
63 stars 28 forks source link

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

Open nicedream06 opened 2 years ago

nicedream06 commented 2 years ago

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 commented 2 years ago

Logcat:

logcat.txt

kdrag0n commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

Try user.

nicedream06 commented 2 years ago

Building it right now. Thanks.

nicedream06 commented 2 years ago

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 commented 2 years ago

I've also experienced this issue and after looking into it, it's a natural consequence of ProtonAOSP/android_frameworks_base@922d7b120015e18c7225cd21737ed8442a1ba9de and ProtonAOSP/android_build_make@b8692a40f1a77aedff2e11b0f5e8e79f5b19a13c 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 commented 2 years ago

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 commented 2 years ago

It does for me, building for oriole.

nicedream06 commented 2 years ago

@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.