3

As soon as I connect a USB modem to android device, system grabs ttyACM0 and ttyACM1 in an attempt to open connection. As a result, the ports are blocked and can not be opened by other services. How, if possible, can I disable RIL on android to avoid having it block ttyACM0 and ttyACM1 as soon as modem is plugged in? Is it doable without having to rebuild Android?

I have tried making following changes in init.rc, as well as deleting ril-deamon service entry.

setprop ro.radio.noril yes
setprop hw.nophone true
2

The consequences of disabling the RIL daemon (rild) is hardware dependent. Because RIL is getting more and more involved in all aspects of Radio related items, including WiFi. The easiest way to stop RIL is by killing rild. But you need to have a rooted device to do this. Open a command shell and get root prompt (#).

# kill -9 `pidof rild`

You can then check the current status with:

# getprop |grep init.svc.ril
...
[init.svc.ril-daemon]: [stopped]
[init.svc.ril-qmi]: [stopped]

To restart rild you have to point it to the right device and library files. You can find what these are with:

# getprop | grep rild.lib
...
[rild.libargs]: [-d /dev/smd0]
[rild.libpath]: [/system/lib/libril-qc-qmi-1.so]

Then restart with*:

# rild -l /system/lib/libril-qc-qmi-1.so -- -d /dev/smd0 

* PS. I haven't actually tried this line, so feel free to edit this post. It's possible you also need to supply the correct SE context to SU as well...

  • There doesnt appear to be any process named rild running. This is android 7.1.1. – Joel G Mathew Apr 24 '17 at 5:05
  • My original post was from 2014, so surely today, the more common name may be something else ril*, like ril-daemon as suggested below. – not2qubit Oct 1 '17 at 13:49
0

Killing the daemon is not the correct way although it would kill the service but you won't be able to access it again. Type stop service rild in adb shell and it would work again for other services properly. You can check by typing ps if rild process is there or not. Just worked on this a few days back.

0

1. how to stop rild

try1

kill -9 `pidof rild`

it'll auto start a new rild

try2

stop service rild

not work for me.

try3

stop ril-daemon

this worked, found it from /etc/init.rc:

on property:ril.reset.rild=1
    stop ril-daemon
    start ril-daemon
    setprop ril.reset.rild 0

//so setprop ril.reset.rild 1 may restart rild too.

about service name

service ril-daemon /system/bin/rild ...

found such line in init.rc, maybe this define the service name referred in try3

2. answer the question

maybe you can imitate config in try3, add this config line.

on property:ro.radio.noril=yes
    stop ril-daemon

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.