How do I disable the Mobile Hotspot feature? 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.
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).


Root your phone
Open up adb connection
Enter these commands:


su
cd system
cd bin
mount -o rw,remount /system
mv hostapd inactive_hostapd
mount -o ro,remount /system

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.