Hi everyone :wave: I’m working with Room in an And...
# android
m
Hi everyone 👋 I’m working with Room in an Android app. • In debug builds, Room works perfectly without any special configuration. • But in release builds, Room breaks unless I add ProGuard/R8
-keep
rules for my
@Entity
models, DAO interfaces, and sometimes even fields. My concern is: If I keep these classes, their names and structure are no longer obfuscated in release builds. Doesn’t this expose the database schema to reverse-engineering? How do people handle this securely? Any guidance or best practices would be really helpful!
not kotlin but kotlin colored 6
b
@malik bilal I add normally
@ColumnInfo(name = "id")
to avoid this issue, you can't really protect your schema... About security, it is frontend so the maximum a hacker can get is the db schema but they can do nothing with it to harm other user.... and they don't need to reverse engineer even, if a phone is rooted, they can access the whole DB schema too. basically as a rule of thumb, on frontends you can never have full security against such things, you can only make it harder that is why you can never put private keys because no matter what they can be retreived.
👍 2
g
are you using modules ? where are enabling obfuscation ?
🚫 1
c
Image from iOS.jpg
👍 1
👃 1
p
BTW there is a dedicated channel for #C7KS458SJ
👃 1