Changes

Jump to: navigation, search

Embedded Android FAQs

874 bytes added, 17:21, 14 March 2018
ping c
==FAQs==
 
===Q: How to get the hardware serial number? (NXP i.MX6-based systems only)===
The hardware serial number (as defined [https://developer.android.com/reference/android/os/Build.html#SERIAL here]) can be programmatically accessed as described in [https://stackoverflow.com/questions/11029294/android-how-to-programmatically-access-the-device-serial-number-shown-in-the-av this page].
For more details, please see [https://stackoverflow.com/questions/7332931/get-android-ethernet-mac-address-not-wifi-interface this page].
 
===Q: Why am I getting <code>socket: Permission denied</code> when I run <code>ping</code> as root? ===
 
Android kernels by default uses <code>CONFIG_ANDROID_PARANOID_NETWORK</code> configuration, to enable Internet permission check with its API. This requires that all process that want to access network resources belongs to specific hardcoded GID
 
First of all you need to add those special GID to you root file system:
 
<pre>
groupadd -g 3001 aid_bt
groupadd -g 3002 aid_bt_net
groupadd -g 3003 aid_inet
groupadd -g 3004 aid_net_raw
groupadd -g 3005 aid_admin
</pre>
 
And then add <code>root</code> (or the user you want to allow to access network resources) to those group, e.g.:
 
<pre>
usermod -a -G aid_bt,aid_bt_net,aid_inet,aid_net_raw,aid_admin root
</pre>
 
Reference: https://stackoverflow.com/questions/36451444/what-can-cause-a-socket-permission-denied-error
743
edits

Navigation menu