It's hard to compare those two, because it's something different:
- Firebase Realtime Database is a hosted service (=backend) from Google which comes with SDKs which make synchronization and offline usage easy. It's a third party library, not part of Android SDK.
- SyncAdapter is part of Android SDK and it helps you create periodic synchronization with any backend.
So which one to choose? It depends on you backend - if you have existing backend, use SyncAdapter. If you are creating a new app and you don't have backend yet, Firebase might be easier for you. You don't need to do any synchronization logic, it also handles offline. However you should consider Firebase pricing.
About SyncAdapter - it's kind of obsolete part of SDK, I wouldn't use it for new app. It's also kind of pain to implement with all the Content Providers etc. Instead I would use JobScheduler API for scheduling periodic sync and also trigger sync via push messages - it's much more efficient and faster than periodic sync.