3

As far as I can remember, some carriers disable this feature. Now, we have a few dozen phones that we want to deploy to some schools and we would like to disable this feature.

How do I achieve this? A few guesses that I have would be to add/edit something in build.prop or some hidden Android API (can't find any here).


Update: I figured it out a long time ago. The solutions here do work gracefully and the phones behave properly. Normal WiFi is not affected (because hostapd only manages the AP). Upon testing, the worst that happens is

2018-12-04 23:12:23.680 3207-3753/? E/SoftapController: Unable to open connection to supplicant on "/data/misc/wifi/hostapd/wlan0": No such file or directory

in the logcat. At the same time, the mobile hotspot setting switch flips back off automagically.

What I did was just rename hostapd to something else. Moving/deleting/changing permissions would also work.

1

In addition to the other answers, I'd like to add that you can alternatively remove the execution permission from that file:

su
mount -o rw,remount /system
chmod 0644 /system/bin/hostapd

This approach looks more Unix-styled.

To restore it, do the same commands again, but use 0755 instead of 0644 (i.e. put the execute permission back).

4

I managed to solve this without deleting hostapd file (with this method you can easily reactivate hotspot functionality renaming hostapd back to its original name).

  1. Root your phone
  2. Open up adb connection
  3. Enter these commands:
    su
    cd system
    cd bin
    mount -o rw,remount /system
    mv hostapd inactive_hostapd
    mount -o ro,remount /system
    
  4. Reboot your phone and you're ready to go.

If you want hotspot functionality back to your phone, just rename it back to 'hostapd' (mv inactive_hostapd hostapd).

Tested on Motorola Moto C Plus.

2

Erase this file (with root): system/bin/hostapd

0

Without rooting phone:

Install a display overlay app like "AppLock" and block access to "Settings".

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.