Since it was working in android, there must be a way to have it working in UBports. I had more or less the same issue in the Xperia X port and could make it work (see here). Turns out that the proper device to use was usb0 and not rnids0 (but editing some files was still required to have usb0 being available). If you are comfortable with linux command line and modifying bash scripts, you should try things along what I did.