Hello Robert,
Yesterday I started going down the dhcpcd.conf route.
Created a dhcpcd.conf
interface usb0
static ip_address=
192.168.1.2/24
static routers=192.168.1.254
static domain_name_servers=10.10.17.117 10.10.19.117
I noticed from logcat that init was looking for a dhcpcd_usb service. I am not sure what all the options mean to dhcpcd. They are not descibed when you ask for help.
Possible init.rc change based on other device examples.
a. service dhcpcd_usb0 /system/bin/dhcpcd -ABKL
class late_start
disabled
oneshot
b. service dhcpcd_usb0 /system/bin/dhcpcd -AL
class late_start
disabled
oneshot
I am not sure these will work though since they specify the "disable" option. Although init is looking for "service dhcpcd_usb0" it doesn't appear to be starting it explicitly. Do I also need to implement a hook?
Can you point me to an example of configuring the interface as described using LinkProperties and ConnectivityService?
Best Regards,
Allen Curtis
On Aug 12, 2014, at 12:24 PM, Robert Greenwalt <
rgree...@google.com> wrote:
> Alot of stuff is continuing to get locked down via selinux security policies. I wouldn't be surprised if ndc is whitelisted but your app is not.
>
> The normal way of configuring dns is having whatever android transport communicate it's ip config to ConnectivityService via a LinkProperties instance. Android != Linux and various traditional scripts/tools may not be supported. The NDC tool is a way to hack stuff during device bringup and is not intended for production use.
>
> R
> If the setprop stuff is ignored, what is the proper way of configuring the DNS?
>
> A weird problem I ran into is that calling the "ndc resolver" methods using popen() in a C program crashes. Typing the exact same commands on the command line works. Should I do this in a shell script as a service from init?
>
> Best Regards,
> Allen Curtis
>
> email:
ajcu...@ac2enterprises.com
> phone:
(949) 874-5566
> KeyID: 224003C35935A9EC