Proguard problem with accessory sdk


I have a wearable app for Tizen based watches.
I use the Samsung Accessory SDK and it works with a companion app on Android phone.
Normally app works fine, but when I start using Proguard , SAAgent service does not work, it crash with following exception:

2021-10-12 23:17:45.298 2640-18530/? E/JavaBinder: *** Uncaught remote exception!  (Exceptions are not yet supported across processes.)
    java.lang.RuntimeException: No service descriptions found in Accessory Service configuration XML
        at android.os.Binder.execTransactInternal(
        at android.os.Binder.execTransact(

I had other issues with proguard and then I found the information that I had to use following configuration on proguard:

    - keepclassmembers class** { *;}
    - keep class** { *; }
    - dontwarn**
    - keepattributes InnerClasses
    - keepclassmembers class [Application’s SASocket or SAAgent extended class].** { *; }
    - keep class [Application’s SASocket or SAAgent extended class]** { *; }

These helped me to solve the other issues, but now I have the issue with accessoryservices.xml
How can I prevent Proguard spoiling the xml file ?

I got it with the following configuration:

-keepclassmembers class** { *; }
-keep class** { *; }
-keepattributes InnerClasses,SourceFile,LineNumberTable

-keepclassmembers class** { *; }
-keep class** { *; }

 -keep class **.R
 -keep class **.R$* {

and a keep.xml under res/raw:

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools=""

Hello, I think you might get better assistance if you submit a support request here