Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMake Seedvault compile in AOSP properly #98
Conversation
d93b4ef
to
5848659
|
@stevesoltys do we still want to keep the prebuilt stuff around? IMO we can drop it in a separate commit, which also ensures that we'll always keep this AOSP build working. Anyone can still use the prebuilts if they want, we just don't provide an easy way to do it since it's no longer needed. |
|
I'm away for the weekend so I won't be able to properly review this PR / your suggestion until Sunday, but as long as we still have CI builds working I think we can drop prebuilts without issue. Though, if there is no additional development / maintenance effort required to keep the prebuilt repo, I don't see the harm in leaving it either. Some people may still find it useful, and they won't have to change their manifests again either. I can give a more definitive response to that on Sunday, hopefully I'm not blocking anything in the meantime. |
|
I am not an expect on the AOSP build scripts, but the Kotlin changes look good. I suppose you gave the app a quick test to make sure that all views are found and there's no crash being introduced? |
|
LGTM |
|
I think that if we can't get CI builds working inside the AOSP source tree (without significant build server resources) it's preferable to continue with prebuilt binaries. I say this because being able to compile against I feel there isn't much maintenance effort required to keep them either. Maybe we can consider removing them if we find that they are a burden to maintain? Let me know if you can think of anything that makes them problematic. |
|
Pending test confirmation before merge. Backup / restore / going through settings options should all work. @stevesoltys Compiling against I just wanted to make sure everybody used this build in AOSP instead of prebuilts to make sure it got the most testing and stayed updated / working. Prebuilts won't be a burden to maintain I guess, maybe we can add a warning / some info there about this - and mark this as the preferred way? What I mean is something like: https://www.phoronix.com/scan.php?page=news_item&px=Torvalds-Rust-Kernel-K-Build |
|
I think we just keep the current CI setup, but I don't think it is related to keeping a prebuilt script around as the CI is doing the gradle build which doesn't say how building in AOSP will work, but at least it can catch other kinds of errors and also run our test cases. |
|
@chirayudesai It does validate that the code compiles against AOSP, as long as it's up to date. I'm not referring to actually building in the source tree, which is why I said "as long as the dependencies are there". Yes, we can change the documentation to prefer this method over prebuilts. |
|
I guess that builds just in plain / pure AOSP right? tried it on LineageOS (16.0) and got
|
It requires at least Android 10 base to compile properly. Works on AOSP and derivatives like CalyxOS or LineageOS 17.1 |
relan
commented
Aug 5, 2020
|
I integrated this change into my custom build of AOSP 10 (not LineageOS derivative). Builds and works for me. Settings, backup, restore---no crashes. |
|
@relan awesome! Thanks for the feedback! |
|
Backup seems to work ok here, but restore from setupwizard via internal storage doesn't.
@relan what provider did you restore from, and through what way did you restore? |
|
Woops, hit the wrong button there. Need to go through all variables and double-check that they're all there. @stevesoltys things like these are exactly why I wanted to get rid of prebuilts and just mandate this for inclusion with AOSP builds. That way it keeps getting tested more. The gradle build would already be used for development, and if somebody wanted they could still use gradle to compile an apk and ship that. |
...a/com/stevesoltys/seedvault/ui/recoverycode/RecoveryCodeInputFragment.kt
Show resolved
Hide resolved
relan
commented
Aug 11, 2020
That was internal storage. I launched the RestoreActivity manually (not through the Setup Wizard), it didn't ask for the 12-word password. I reproduced those steps and now I can see it didn't restore app data, only installed APKs. Manual reinstallation (via adb) of APKs does not trigger data restoration despite the Automatic restore option being on. There are key-related exceptions in the log:
I kept the default, so it should be on. |
Ok, not asking for the password sounds like you didn't wipe, that's expected if so. We're on #seedvault on freenode if you want to discuss anything real-time btw. |
@chirayudesai I'm not understanding what you ran into / how prebuilts caused this. Could you explain please? |
|
My initial test with this had issues, but I retried afterwards and it seemed fine. Scenarios to test:
Prebuilts didn't cause any issues, but Android.bp may have. My point was we should standardize on Android.bp to make sure it gets tested well all the time. |
|
@chirayudesai Ah, okay. We can prebuilts if you think that's preferable to ensure this new build method is well tested. I think I misunderstood before. |
|
@chirayudesai I took a look and I don't see any other missing variable |
* Not available on AOSP.
* All previous aar versions have their modified date set to 0 which trigger the following openjdk bug: https://bugs.openjdk.java.net/browse/JDK-8184940 This fixes the following compilation error while building in AOSP environment: java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 0
|
I have tested the following a few times and I couldn't find any bugs caused by the Android.bp conversion:
|
|
Can merge this after a quick smoke test by @mikeNG It should compile now, I had github auto update - it merged, but that's fine since we're rebasing pull requests so we won't have double merge commits. |
|
I have tested backup/wipe/restore and it still works as before. This can be merged. |
c40c694
into
stevesoltys:develop

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

mikeNG commentedJul 9, 2020
•
edited