Closed locofocos closed 3 weeks ago
@locofocos Thank you so much for doing this; it will close a large number of outstanding tickets.
I will review in detail shortly.
(It will still be up to @jberkel to publish to Google Play.)
I'm really happy with the separation of records
into sender
and recipients
.
This will fix not just RCS, but almost every issue in the "half missing" category.
Again, many thanks.
@kurahaupo you're welcome! Thanks for the initial review. I'll get this cleaned up and tested further some time soon, I hope.
@kurahaupo I've given this some solid testing on my phone, and I'm happy with the result.
Is the travis CI build running against this PR? I was looking for the build output so I could at least see which tests I need to update.
edit - I might need some some more time to look over the results and debug more. All of those test cases look good. But I did a another huge backup last night, and I'm seeing some ungrouped messages.
I'll check on the CI when I get home to my PC
Hi I tried to compile from source but it keeps failing. Can someone post an APK please
@hubono I debated whether I should post a copy of my latest APK build, just in case life happens and we don't get this PR merged.
Caveats, if this wasn't obvious:
However, I've been using it for months. No promises, but I'm happy with the results. So here is the APK I built locally from ac71d552e62
@locofocos Question: I am currently running 1.5.11 from the app store. I want to try your improved version to see if it will fix the GMail threading issues I had. I am unclear what the upgrade path is. Since I am sideloading, do I need to uninstall 1.5.11 first? Also, you mention the "backup state" multiple times above but since this is technically a new app sideloaded, does that mean that by default, all my messages on my phone will get backed-up again into GMail?
@chadcancode Since you're sideloading, yeah, Android will force you to uninstall 1.5.11 first.
I made some clarifications to the upgrade path under Adopting this new version
above. The "backup state" is basically this app's knowledge of which SMS messages have been backed up so far. You're right - a new sideloaded app won't know which messages are backed up. IIRC this app will ask "Do you want to backup and skip all existing messages on this phone" the first time you launch it.
It's really up to you. If you want a perfect seamless state, do "the harder way". If you don't care about duplicates, use "the lazy way".
@hubono I debated whether I should post a copy of my latest APK build, just in case life happens and we don't get this PR merged.
@locofocos may I humbly request that you (or some other kind soul) provide a version compiled in 64-bit, please?
On my Pixel 8 Pro I get the error "you can't install the app on your device" when installing. My understanding is that newer phones or Android versions no longer support 32-bit apps. I did uninstall the old app first.
I made a few changes to get this compiling again - I think Google removed some library versions from their maven repo (thanks Google...).
I think we can compile it against 64 bit, but I'm not sure what all is required. I added ndk.abiFilters 'armeabi-v7a','arm64-v8a'
to app/build.gradle
following https://developer.android.com/google/play/requirements/64-bit#android-studio-gradle. Maybe that's sufficient to get it working. Or maybe someone needs to audit and upgrade every library/dependency to make sure those are using 64-bit-compatible versions.
@kranix0 See if this works on your Pixel 8: SMS.backup.RCS.maybe64bit.cb3a97f.apk.zip
Actually I think 64 vs 32 bit might not be the issue. Stackoverflow says
If there is no directory lib, it supports all architectures.
and the APK doesn't have any lib folder. So I think it already supported 64 bit phones.
This looks much more promising: https://www.reddit.com/r/GooglePixel/comments/17bzbcy/install_failed_deprecated_sdk_version_any_way/ This app uses minSdkVersion 14
and targetSdkVersion 29
. I'm curious if you can get the full error message by using adb to install it.
@kranix0 See if this works on your Pixel 8: SMS.backup.RCS.maybe64bit.cb3a97f.apk.zip
@locofocos amazing… it works! I haven't tested the RCS backup, but it seems to work at least as well as I had on my Pixel 6.
Thank you!!!
Fixes #1055 and #1027
This fixes RCS importing 🎉
It also improves how group MMS threads are imported. Basically it includes all the recipients in the "to" field, and puts everyone's name in the subject, so that gmail does a much better job mimicking the group threads on your phone.
I've been toying around with it on my Pixel 3a running Android 10. I've tested with a mix of SMS, group MMS chats, and RCS chats.
I'm completely open to the idea that I was a little heavy-handed with my refactor. I ran with what made sense. I'm fine if someone else wants to take this as as proof-of-concept and run in a slightly different direction to make this mergeable.
TODO
Testing
Tips for testing:
app/src/main/java/com/zegoggles/smssync/service/BackupQueryBuilder.java
. https://www.epochconverter.com/ is your friend here.Some test cases that I've gone through on my phone, and verified that the backup looks correct in Gmail:
BackupItemsFetcher.getItemsForDataType
andConsts.MMS_PROVIDER
/SMS_PROVIDER
. So we would have to build some intermediate caching mechanism that gathers all the SMSs, gathers all the MMSs, interleaves them, then feeds them into the existing logic.Adopting this new version
Here is my 2 cents for how affected users could get their backups into a clean-ish state:
old-backups
. Download the new app version. Reset the backup state (or reinstall the app) and backup everything again (to your favorite label, likeSMS
). For whatever time period you still have on your phone, delete emails from that time period with labelold-backups
. Verify that you have a nice continuity when looking at bothold-backups
andSMS
. Then change all theold-backups
emails over to theSMS
label.