Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Android NetUtils Wrapper: How do I add a SELinux Policy to use system/bin/ip-wrapper-1.0

$
0
0

I am wanting to route traffic on the android app I am developing, though I am having trouble accessing the ip tables on the kernel. I am not sure if this is even supposed to be accessible for normal app developers, but I am trying.

According to Android's network-stack, one is supposed to use /system/bin/ip-wrapper-1.0 to access the routing tables, for example, /system/bin/ip-wrapper-1.0 route add table 1001234 224.0.0.0/24 dev wlan0 to add a table and route multicast traffic.

Problem: This is giving me a permission denied issue. According to the documentation above, I need to add the following domain transition rule in the SELinux policy: domain_auto_trans(VENDOR-DOMAIN-NAME, netutils_wrapper_exec, netutils_wrapper)

What policy do I need to add this to? Do I need to create my own policy? How do I connect this policy to my specific program?

I have scoured the internet looking for documentation on what policy to add this to or how to create my own vender policy, but there's no clear documentation on this (or at least not that I understand...). I'd appreciate assistance on how to do this, or a firm answer on whether or not an app developer (not an android developer) should be touching this.


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>