text:
Connecting to WiFi via ADB Shell
I've tried all publicly discussed methods I could find to connect to WiFi via ADB on a phone with a broken screen (no display/no touch). The closest I have got is via wpa_cli using the method #1 described below.
Other methods that I tried are also mentioned but with no success. My goal for this broken phone is to use it as a headless server either via LinuxDeploy or native apps for Android, and for that I need to get VNC running and for that I need to connect to Wifi somehow.
Solutions for connecting to Wifi OR otherwise getting VNC access to the Android display (using ADB usb only) are welcome. I don't have a USB-C Network card so using that isn't an option at this stage.
Method #1 - Using WPA_CLI
In this case I leave /data/misc/wifi/wpa_supplicant.conf and /data/misc/wifi/WifiConfigStore.xml untouched and just pop into wpa_cli using adb shell
wpa_cli Setup
> add_network
0
> set_network 0 scan_ssid 1
OK
> set_network 0 ssid "my_ssid"
OK
> set_network 0 key_mgmt WPA-PSK
OK
> set_network 0 psk "my_wifi_pass"
OK
> enable_network 0
OK
<3>CTRL-EVENT-STATE-CHANGE id=-1 state=3 BSSID=00:00:00:00:00:00 SSID=
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE
<3>Trying to associate with SSID 'fy-huawei-m9'
<3>CTRL-EVENT-STATE-CHANGE id=-1 state=5 BSSID=00:00:00:00:00:00 SSID=
<3>CTRL-EVENT-STATE-CHANGE id=0 state=6 BSSID=00:00:00:00:00:00 SSID=fy-huawei-m9
<3>Associated with 50:01:d9:41:d7:00
<3>CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
<3>CTRL-EVENT-STATE-CHANGE id=0 state=7 BSSID=50:01:d9:41:d7:00 SSID=fy-huawei-m9
<3>CTRL-EVENT-STATE-CHANGE id=0 state=8 BSSID=50:01:d9:41:d7:00 SSID=fy-huawei-m9
<3>WPA: Key negotiation completed with 50:01:d9:41:d7:00 [PTK=CCMP GTK=CCMP]
<3>CTRL-EVENT-CONNECTED - Connection to 50:01:d9:41:d7:00 completed [id=0 id_str=]
<3>CTRL-EVENT-STATE-CHANGE id=0 state=9 BSSID=50:01:d9:41:d7:00 SSID=fy-huawei-m9
<3>CTRL-EVENT-DISCONNECTED bssid=50:01:d9:41:d7:00 reason=3 locally_generated=1
<3>CTRL-EVENT-STATE-CHANGE id=0 state=0 BSSID=50:01:d9:41:d7:00 SSID=fy-huawei-m9
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS

Looks like the wifi interface associates momentarily with the SSID but then immediately disconnects.

Logcat Output

01-01 00:16:25.358  1074  1913 D WifiService: setWifiEnabled: true pid=2849, uid=0, package=com.android.shell
01-01 00:16:25.358  1074  1913 I WifiService: setWifiEnabled package=com.android.shell uid=0 enable=true
01-01 00:16:25.362   756   756 I android.hardware.wifi@1.0-service: Wifi HAL started
01-01 00:16:25.371   756   756 I android.hardware.wifi@1.0-service: Wifi driver is ready: Success
01-01 00:16:25.625   756   756 I WifiHAL : Initializing wifi
01-01 00:16:25.625   951   963 I LOWI-8.5.0.3.a: [LOWIController] isWifiEnabled: Wifi is now enabled
01-01 00:16:25.635   756   756 I WifiHAL : mpdu_size_threshold : 128, aggressive_statistics_gathering : 0
01-01 00:16:25.636  1074  1675 I WifiVendorHal: Vendor Hal started successfully
01-01 00:16:25.636  1074  1675 D WificondControl: Setting up driver for client mode
01-01 00:16:25.770  1074  1675 D WifiStateMachine: Setting OUI to DA-A1-19
01-01 00:16:25.772   756   756 E WifiHAL : wifi_set_scanning_mac_oui: requestResponse Error:-1
01-01 00:16:25.774  1074  1675 E WifiVendorHal: setScanningMacOui(l.1445) failed {.code = ERROR_UNKNOWN, .description = unknown}
01-01 00:16:25.784  1074  1675 I WifiVendorHal: Driver: 5.1.1.28U Firmware: FW:1.0.0.133.0 HW:WCN3990_V2.1
01-01 00:16:25.799  1074  1110 I WifiService: requestActivityInfo uid=1000
01-01 00:16:25.799  1074  1110 I WifiService: reportActivityInfo uid=1000
01-01 00:16:25.799  1074  1110 I WifiService: getSupportedFeatures uid=1000
01-01 00:16:25.835  1074  1675 D WifiConnectivityHelper: Firmware supported feature set: 48931bf
01-01 00:16:25.836  1074  1677 I WifiScanningService: wifi driver loaded with scan capabilities: max buckets=6
01-01 00:16:25.840  1074  1675 D WifiConnectivityHelper: Firmware roaming supported with capabilities: max num blacklist bssid=16 max num whitelist ssid=4
01-01 00:16:25.841  1074  1675 D WifiNative-wlan0: configureRoaming
01-01 00:16:25.842  1074  1675 I WifiStateMachine: disconnectedstate enter
01-01 00:16:25.844  1074  1675 D WifiStateMachine: resetting EAP-SIM/AKA/AKA' networks since SIM was changed
01-01 00:16:25.844  1074  1675 I chatty  : uid=1000(system) WifiStateMachin identical 2 lines
01-01 00:16:25.845  1074  1675 D WifiStateMachine: resetting EAP-SIM/AKA/AKA' networks since SIM was changed
01-01 00:16:25.854  1074  1110 I WifiService: requestActivityInfo uid=1000
01-01 00:16:25.854  1074  1110 I WifiService: reportActivityInfo uid=1000
01-01 00:16:25.854  1074  1110 I WifiService: getSupportedFeatures uid=1000
01-01 00:16:25.939  1835  1973 I QCNEJ/CndHalConnector: -> SND notifyWifiP2pStateChanged(5)
01-01 00:16:55.456  1074  1913 D WifiService: setWifiEnabled: true pid=2876, uid=0, package=com.android.shell
01-01 00:16:55.456  1074  1913 I WifiService: setWifiEnabled package=com.android.shell uid=0 enable=true
01-01 00:17:35.524  1074  1110 I WifiService: requestActivityInfo uid=1000
01-01 00:17:35.524  1074  1110 I WifiService: reportActivityInfo uid=1000
01-01 00:17:35.525  1074  1110 I WifiService: getSupportedFeatures uid=1000
01-01 00:19:35.647   756  2865 I WifiHAL : event received NL80211_CMD_VENDOR, vendor_id = 0x1374, subcmd = 0x6a
01-01 00:19:36.272   756  2865 I WifiHAL : event received NL80211_CMD_VENDOR, vendor_id = 0x1374, subcmd = 0x6b
01-01 00:19:36.441  1074  1675 W WifiConfigManager: Looking up network with invalid networkId -1
01-01 00:19:36.442  1074  1675 W WifiStateMachine: Connected to unknown networkId -1, disconnecting...
01-01 00:19:37.260   756  2865 E WifiHAL : Few pkt stats messages missed: rcvd = 0, prev = 0
01-01 00:19:37.260   756  2865 I WifiHAL : Fate Tx-Rx: Packet fate stats stop received
01-01 00:19:58.058  1074  1110 I WifiService: requestActivityInfo uid=1000
01-01 00:19:58.058  1074  1110 I WifiService: reportActivityInfo uid=1000
01-01 00:19:58.059  1074  1110 I WifiService: getSupportedFeatures uid=1000

The key line here are:
01-01 00:19:36.441  1074  1675 W WifiConfigManager: Looking up network with invalid networkId -1
01-01 00:19:36.442  1074  1675 W WifiStateMachine: Connected to unknown networkId -1, disconnecting...

Looks like the WifiConfigManager won't let me connect to a network which isn't defined in /data/misc/wifi/WifiConfigStore.xml
Method #2 - Naive definition in wpa_supplicant.conf
In this attempt I simply define the entwork in wpa_supplicant.conf and don't touch /data/misc/wifi/WifiConfigStore.xml
Here is what my wpa_supplicant.conf looks like:
wpa_supplicant.conf
update_config=1
ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi
eapol_version=1
ap_scan=1
fast_reauth=1

network={
    ssid="my_ssid"
    psk="my_wifi_pass"
    key_mgmt=WPA-PSK
    priority=241
}

I then proceed to disable and re-enable the wifi service using svc wifi disable and svc wifi enable, and even reboot the phone but in both cases it doesn't seem to even attempt connecting to the network. The invalid networkId -1 message still pops up.
Logcat Output:
01-01 00:00:06.649  1062  1062 D WifiService: resetting networks because SIM was removed
01-01 00:00:06.649  1062  1062 D WifiService: resetting country code because SIM is removed
01-01 00:00:06.649  1062  1062 D WifiService: resetting networks because SIM was removed
01-01 00:00:06.649  1062  1062 D WifiService: resetting country code because SIM is removed
01-01 00:00:06.649  1062  1670 D WifiStateMachine: resetting EAP-SIM/AKA/AKA' networks since SIM was changed
01-01 00:00:06.650  1062  1670 D WifiStateMachine: resetting EAP-SIM/AKA/AKA' networks since SIM was changed
01-01 00:00:07.055  1062  1073 D WificondControl: Scan result ready event
01-01 00:00:07.061  1062  1670 W WifiConfigManager: Looking up network with invalid networkId -1

Method #3 - Copying WifiConfigStore.xml from a different phone connecting to this SSID
As a last ditch attempt, I restored the original wpa_supplicant.conf and copied over WifiConfigStore.xml from a phone running the same Android version that successfully connects to the WiFi network in question. Then I rebooted the phone
WifiConfigStore.xml
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<WifiConfigStoreData>
    <int name="Version" value="1" />
    <NetworkList>
        <Network>
            <WifiConfiguration>
                <string name="ConfigKey">"fy-huawei-m9"WPA_PSK</string>
                <string name="SSID">"fy-huawei-m9"</string>
                <null name="BSSID" />
                <string name="PreSharedKey">"THEFORTUNE"</string>
                <null name="WEPKeys" />
                <int name="WEPTxKeyIndex" value="0" />
                <boolean name="HiddenSSID" value="false" />
                <boolean name="RequirePMF" value="false" />
                <byte-array name="AllowedKeyMgmt" num="1">02</byte-array>
                <byte-array name="AllowedProtocols" num="1">0b</byte-array>
                <byte-array name="AllowedAuthAlgos" num="1">01</byte-array>
                <byte-array name="AllowedGroupCiphers" num="1">0f</byte-array>
                <byte-array name="AllowedPairwiseCiphers" num="1">06</byte-array>
                <boolean name="Shared" value="true" />
                <int name="Status" value="0" />
                <null name="FQDN" />
                <null name="ProviderFriendlyName" />
                <null name="LinkedNetworksList" />
                <null name="DefaultGwMacAddress" />
                <boolean name="ValidatedInternetAccess" value="true" />
                <boolean name="NoInternetAccessExpected" value="false" />
                <int name="UserApproved" value="0" />
                <boolean name="MeteredHint" value="false" />
                <int name="MeteredOverride" value="0" />
                <boolean name="UseExternalScores" value="false" />
                <int name="NumAssociation" value="22" />
                <int name="CreatorUid" value="1000" />
                <string name="CreatorName">android.uid.system:1000</string>
                <string name="CreationTime">time=08-02 08:39:20.369</string>
                <int name="LastUpdateUid" value="1000" />
                <string name="LastUpdateName">android.uid.system:1000</string>
                <int name="LastConnectUid" value="1000" />
                <boolean name="IsLegacyPasspointConfig" value="false" />
                <long-array name="RoamingConsortiumOIs" num="0" />
            </WifiConfiguration>
            <NetworkStatus>
                <string name="SelectionStatus">NETWORK_SELECTION_ENABLED</string>
                <string name="DisableReason">NETWORK_SELECTION_ENABLE</string>
                <string name="ConnectChoice">"fy-net-ac"WPA_PSK</string>
                <long name="ConnectChoiceTimeStamp" value="1534074466002" />
                <boolean name="HasEverConnected" value="true" />
            </NetworkStatus>
            <IpConfiguration>
                <string name="IpAssignment">DHCP</string>
                <string name="ProxySettings">NONE</string>
            </IpConfiguration>
        </Network>
    </NetworkList>
    <PasspointConfigData>
        <long name="ProviderIndex" value="0" />
    </PasspointConfigData>
</WifiConfigStoreData>

wpa_supplicant.conf
01-01 00:00:05.424  1073  1637 D WifiConfigStore: Reading from user store completed in 4 ms.
01-01 00:00:05.440  1073  1637 D WifiConfigStore: Writing to stores completed in 16 ms.
01-01 00:00:05.440  1073  1637 D WIFI    : got request NetworkRequest [ TRACK_DEFAULT id=6, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 0
01-01 00:00:05.442  1073  1637 D WifiConnectivityHelper: Firmware supported feature set: 48931bf
01-01 00:00:05.442  1073  1637 D WifiConnectivityHelper: Firmware roaming supported with capabilities: max num blacklist bssid=16 max num whitelist ssid=4
01-01 00:00:05.443  1073  1637 D WifiNative-wlan0: configureRoaming
01-01 00:00:05.443  1073  1637 D WIFI    : got request NetworkRequest [ TRACK_DEFAULT id=3, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 0
01-01 00:00:05.443  1073  1637 D WIFI    : got request NetworkRequest [ TRACK_DEFAULT id=9, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 0
01-01 00:00:05.443  1073  1637 D WIFI    : got request NetworkRequest [ REQUEST id=1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 0
01-01 00:00:05.443  1073  1637 D WIFI_UT : got request NetworkRequest [ TRACK_DEFAULT id=6, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 0
01-01 00:00:05.443  1073  1637 D WIFI_UT : got request NetworkRequest [ TRACK_DEFAULT id=3, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 0
01-01 00:00:05.443  1073  1637 D WIFI_UT : got request NetworkRequest [ TRACK_DEFAULT id=9, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 0
01-01 00:00:05.443  1073  1637 D WIFI_UT : got request NetworkRequest [ REQUEST id=1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 0
01-01 00:00:05.445  1073  1676 I SupplicantP2pIfaceHal: Registering ISupplicant service ready callback.
01-01 00:00:05.447  1073  1689 I SupplicantP2pIfaceHal: IServiceNotification.onRegistration for: android.hardware.wifi.supplicant@1.0::ISupplicant, default preexisting=true
01-01 00:00:05.447  1073  1689 I zygote64: Looking for service android.hardware.wifi.supplicant@1.0::ISupplicant/default
01-01 00:00:05.449  1073  1689 D SupplicantP2pIfaceHal: entering getInterface()
01-01 00:00:05.449  1073  1689 D SupplicantP2pIfaceHal: getInterface() completed successfully.
01-01 00:00:05.449  1073  1689 D SupplicantP2pIfaceHal: leaving getInterface() with result = android.hardware.wifi.supplicant@1.0::ISupplicantP2pIface@Proxy
01-01 00:00:05.450  1073  1689 D SupplicantP2pIfaceHal: entering registerCallback()
01-01 00:00:05.450  1073  1689 D SupplicantP2pIfaceHal: registerCallback() completed successfully.
01-01 00:00:05.450  1073  1689 D SupplicantP2pIfaceHal: leaving registerCallback()
01-01 00:00:05.450  1073  1689 I SupplicantP2pIfaceHal: Completed initialization of ISupplicant interfaces.
01-01 00:00:05.484  1073  1632 I WifiService: getConfiguredNetworks uid=1000
01-01 00:00:05.543  1073  1073 D WifiService: resetting networks because SIM was removed
01-01 00:00:05.543  1073  1073 D WifiService: resetting country code because SIM is removed
01-01 00:00:05.543  1073  1637 D WifiStateMachine: resetting EAP-SIM/AKA/AKA' networks since SIM was changed
01-01 00:00:05.544  1073  1073 D WifiService: resetting networks because SIM was removed
01-01 00:00:05.544  1073  1073 D WifiService: resetting country code because SIM is removed
01-01 00:00:05.544  1073  1637 D WifiStateMachine: resetting EAP-SIM/AKA/AKA' networks since SIM was changed
01-01 00:00:05.556  1073  1676 D SupplicantP2pIfaceHal: entering setWpsDeviceName(Android_d3d3)
01-01 00:00:05.556  1073  1676 D SupplicantP2pIfaceHal: setWpsDeviceName(Android_d3d3) completed successfully.
01-01 00:00:05.556  1073  1676 D SupplicantP2pIfaceHal: leaving setWpsDeviceName(Android_d3d3)
01-01 00:00:05.556  1073  1676 D SupplicantP2pIfaceHal: entering setSsidPostfix(-Android_d3d3)
01-01 00:00:05.557  1073  1676 D SupplicantP2pIfaceHal: setSsidPostfix(-Android_d3d3) completed successfully.
01-01 00:00:05.557  1073  1676 D SupplicantP2pIfaceHal: leaving setSsidPostfix(-Android_d3d3)
01-01 00:00:05.557  1073  1676 D SupplicantP2pIfaceHal: entering setWpsDeviceType(10-0050F204-5)
01-01 00:00:05.557  1073  1676 D SupplicantP2pIfaceHal: setWpsDeviceType(10-0050F204-5) completed successfully.
01-01 00:00:05.558  1073  1676 D SupplicantP2pIfaceHal: leaving setWpsDeviceType(10-0050F204-5)
01-01 00:00:05.558  1073  1676 D SupplicantP2pIfaceHal: entering setWpsConfigMethods(virtual_push_button physical_display keypad)
01-01 00:00:05.558  1847  1956 I QCNEJ/CndHalConnector: -> SND notifyWifiP2pStateChanged(5)
01-01 00:00:05.559  1073  1676 D SupplicantP2pIfaceHal: setWpsConfigMethods(virtual_push_button physical_display keypad) completed successfully.
01-01 00:00:05.559  1073  1676 D SupplicantP2pIfaceHal: leaving setWpsConfigMethods(virtual_push_button physical_display keypad)
01-01 00:00:05.559  1073  1676 D SupplicantP2pIfaceHal: entering getDeviceAddress()
01-01 00:00:05.559  1073  1676 D SupplicantP2pIfaceHal: getDeviceAddress() completed successfully.
01-01 00:00:05.560  1073  1676 D SupplicantP2pIfaceHal: leaving getDeviceAddress() with result = 82:ad:16:7a:57:57
01-01 00:00:05.560  1073  1676 D SupplicantP2pIfaceHal: entering flush()
01-01 00:00:05.561  1073  1676 D SupplicantP2pIfaceHal: flush() completed successfully.
01-01 00:00:05.561  1073  1676 D SupplicantP2pIfaceHal: leaving flush()
01-01 00:00:05.561  1073  1676 D SupplicantP2pIfaceHal: entering serviceFlush()
01-01 00:00:05.561  1073  1676 D SupplicantP2pIfaceHal: serviceFlush() completed successfully.
01-01 00:00:05.561  1073  1676 D SupplicantP2pIfaceHal: leaving serviceFlush()
01-01 00:00:05.561  1073  1676 D SupplicantP2pIfaceHal: entering listNetworks()
01-01 00:00:05.562  1073  1676 D SupplicantP2pIfaceHal: listNetworks() completed successfully.
01-01 00:00:05.562  1073  1676 D SupplicantP2pIfaceHal: leaving listNetworks() with result = []
01-01 00:00:05.562  1073  1676 D SupplicantP2pIfaceHal: entering saveConfig()
01-01 00:00:05.569  1073  1676 D SupplicantP2pIfaceHal: saveConfig() completed successfully.
01-01 00:00:05.569  1073  1676 D SupplicantP2pIfaceHal: leaving saveConfig()
01-01 00:00:06.108  1073  1834 D WificondControl: Scan result ready event
01-01 00:00:06.113  1073  1637 W WifiConfigManager: Looking up network with invalid networkId -1

Still no luck. Don't know what else I can do at this point but not giving up just yet.

Do you know about https://github.com/Genymobile/scrcpy?

scrcpy looks quite interesting. I'll give it a go and report back here.

Thank you @Zulakis. scrcpy is working perfect and I couldn't be happier. I've managed to connect to Wifi normally and can resume my experimentation.

You're welcome! It's a great project :-)

svc wifi enable|disable should work if it's only about turning WiFi ON and OFF. Or you can use setWifiEnabled method directly by calling service wifi. On Android 8.1 its code (order) is 24, so you can do from adb shell:
~$ service call wifi s16 null i32 1    # Trun WiFi ON
~$ service call wifi s16 null i32 0    # Trun WiFi OFF

But since you also need to add new network to connect, it becomes difficult to go through Android APIs from commandline.
CONNECTING TO WIFI FROM COMMANDLINE:
Another approach is to use wpa_supplicant (and optionally wpa_cli) directly from CLI, don't rely on pre-generated WifiConfigStore.xml or wpa_supplicant.conf.
The following script includes the simple steps:
#!/system/bin/sh

IFACE=wlan0                 # WiFi interface name
SSID=abcxyz                 # WiFi network name
PSK=foobarfoobar            # WiFi network password
DIR=/data/local/tmp/WIFI    # temporary directory
mkdir -p $DIR

if [ "$1" = stop ]
then
    pkill wpa_supplicant
    ip ru del lookup main
    ip r f table main
    ip a f dev $IFACE
    rm -rf $DIR
    ndc resolver setnetdns 0 '' 0.0.0.0
    exit
fi

# set interface up, add rule to lookup into 'main' table
svc wifi disable
for i in /sys/class/net/*; do ip link set down dev $(basename $i); done
ip link set dev lo up
ip link set dev $IFACE up
ip rule add lookup main

# destroy set network  if any
ndc network default set 0

# create configuration file
<<-CONF cat >$DIR/wpa_supplicant.conf
    network={
        ssid="$SSID"
        psk="$PSK"
        scan_ssid=1
    }
CONF

# scan WiFi and connect to access point
wpa_supplicant -B -i $IFACE -c $DIR/wpa_supplicant.conf
until iw dev $IFACE link | grep -q '^Connected to'; do sleep 1; done

# create 'udhcpc' script
<<-'SCRIPT' cat >$DIR/udhcpc_default.script
#!/system/bin/sh

[ "$1" = bound ] || exit 0

# set IP address, add gateway route and set DNS
ip address add $ip/$mask dev $interface
ip route add default via $router dev $interface
ndc resolver setnetdns 0 '' $dns
SCRIPT

# start DHCP client to obtain IP from server
chmod 0755 $DIR/udhcpc_default.script
busybox udhcpc -v -f -q -i $IFACE -s $DIR/udhcpc_default.script

* Omit the DHCP part if you want to set IP, route and DNS manually.
* I use my own built wpa_supplicant binary. udhcpc is a busybox applet, ip, iw and ndc are part of stock Android.
* For further options see wpa_supplicant.conf and udhcpc samples.

DNS:
Apps built with Android SDK depend on Bionic libc resolver for DNS queries, so we need to set DNS servers through native APIs. But still the Java network stack is down, so some apps depending on Android APIs may not behave normally. Programs linked against other C libraries may require resolv.conf to exist. See details in How to configure DNS? and How does Android OS do DNS name resolution?
WIFI DRIVER AND FIRMWARE:
Another problem could be to load WiFi in-kernel driver (as module) and firmware on boot. This is handled by vendor specific wcnss_service which runs in combination with android.hardware.wifi@1.0-service HAL. For instance on my device with Qualcomm Atheros Prima WLAN module the service loads firmware (WCNSS_qcom_cfg.ini and related WCNSS_*) files from /vendor/firmware/wlan/prima/ or /persist.
Once you turn on WiFi after boot, all services are started (including wificond) and firmware is loaded. You can check using rfkill or iw phy commands or directly from /sys/class/rfkill. To manually load driver:
~# echo -n sta >/sys/module/wlan/parameters/fwpath

Some more details can be found here, here and here.
When loading driver/firmware WiFi interface should already be created. Check using iw dev or ip link. Or you can manually create:
~# iw $(busybox rfkill -no device list wifi) interface add $IFACE type managed


text:
Android owner locked: Can't update phone
i am samsung galaxy tab E user. I don't have custom recovery system in my device. The owner of tablet is locked and I forgot the password. I know the google account signed in owners it's mine but there is no option of using that to unlock owner. Earlier I used by creating another user but I cant update my device OS now. How do I reset owner account or get option of opening it using google account signed in in there?

You can try  resetting the device to factory then when you'll be promoted to verify your Google account, simply put the owner account that was synced with the device then after that you can put any account and you should be able to download OTA updates

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Does deleting a gmail account from one device erase all the activity for that device in the my activity section.
My s.o. found my activity in our shared account. I deleted the account from my phone. Will that erase for clear the activity for that device in the account history.

What kind of "activity" are you talking about?

Everything that I searched,  every app I used,  it even showed when I used a secure folder.. every thing I have done showed up. Lol

you may wanna check this out id you want to delete your complete google history
https://support.google.com/websearch/answer/465?co=GENIE.Platform%3DDesktop&hl=en

No, removing a Google account from a phone doesn't affect Chrome history, Google search history, or app installation history from the time before you removed the account. You can clear all the activity from the account, but you can't only clear the activity that was from a particular phone.
It's like if you use Facebook on a friend's computer and then log out of Facebook from that computer. Logging out doesn't remove the Facebook posts you made while you were logged in. You can't automatically delete all the posts made from that one computer, because they're associated with the account, not the computer you used.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Can I use my phone's internet to download files in a Win95 VM in Limbo emulator?
I installed Limbo emulator from the Play Store, and found a Windows 95osr2 .img file on the internet. I want to install Opera instead of IE inside the VM, and use it to download some music.
I can't use dial up when I'm using it in an app, because it's too slow. It lets me connect via proxy server. I was wondering if I could use my phone with unlimited 4G LTE (Also is my hotspot one) to download the music off the archive site on mobile data for the proxy server.

I don't think Limbo supports this. Limbo's networking support uses user-mode support inside the guest operating system, and since Windows 95 is not an OS they have explicit support for, they won't provide drivers for it.
Instead, download the songs you want from your phone or another computer, and copy them into the .img before starting the VM.


text:
Tasker - To switch between Wifi and Mobile Data
Can Tasker be programmer to do a one click:
1. Turn off Wifi and turn on Mobile Data
2. Turn off Mobile Data and then Turn On Wifi
I want something that's quick, one click to switch to WIFI only or Mobile Only.
Thanks.

Try Automate (free):

Wi-Fi set state block
Mobile data set state block (rooted device required)

no way to switch on data from non-rooted device?

@rvpals Unlikely. Maybe using the "svc data enable" shell command.


text:
How to install core GMS packages on Huawei 7 Plus?
I have a Chinese phone and I don't know what to do with that. I have Huawei 7 Plus (Android 7, EMUI 5.1.1 B223).
How to install core GMS packages on it?

Doesn't it come with the apps by default or there's a specific app you would like to have on phone

There's no legal way to do this. Google only offers Google Play Services for phones that are approved by the Open Handset Alliance. Manufacturers pay money and the phone model has to pass a conformance test suite to be approved.
Some manufacturers cheap out by not paying the fee or passing the conformance test, and then mislead customers by selling the phone as an "Android phone" even though it doesn't have access to most of Android's software ecosystem.
In March this year, Google added an anti-piracy feature to Google Play Services. Even if you obtain it and illegally install it on an uncertified phone, it will block you when you try to add a Google account.


text:
How to restrict an app to make changes in a folder?
There is an app that sucks my tablet and i don't won't to delete it. This app causes a huge trouble for me. I have granted it Storage Permission. But the apps also deletes some other folders, I want to restrict it from happening.

You should be more precise and name the app you have problems with. May be the community knows alternatives so that you can delete the problematic app.

Restricting an app from writing storage in modern Android is just impossible. In specially Android 4.4.4 it was possible by the Application Permissions option that was in Settings. In the modern Android, when you install an app it assumes you explicitly agreed it's permissions before the actual app installation


text:
What is the best practice to deal with suspected malware infections in Lineage/Android?
I have reason to believe that my Lineage OS (14.1-20180620 nightly build) may be infected with malware. How should I deal with this?
Other questions recommend running Malwarebytes. A question asking about typical malware techniques did not receive an answer.
Details:
With K9 mail I opened an Email that contained what appeared to be a png image and a link to a jar file (yniaaa.jar) hosted on doko.moe (an url known to be used for malware distribution) but showed only plain text (and not very much of it). This was followed by strange behavior of the K9 mailclient (it did not show all emails any more; in the webmail interface all emails were still present).
A google search for any of these details (file name, url, sender email address (probably forged, but still)) does not turn up very much.
I do have a backup of the email (But I do not know how to investigate it safely).
Possibilities:

Uninstall K9 (obviously)
Change all passwords (obviously)
Wipe everything, reinstall everything (disadvantage: it is inconvenient and currently impractical)
Find out what kind of malware it is and what it does since it may have sent emails in my name before the password change took effect? (disadvantage: I do not know how to do that.)
Run Malwarebytes (disadvantage: will this find and remove everything?? I do not know how it works. EDIT: I also do not understand it. In my case it does nothing besides running a really really dumb animation and show a welcome screen.)
Remove any leftover data of K9, reinstall then (disadvantage: 1. I do not know how. 2. Lineage itself may be compromised. I do not know anything about malware on Android/Lineage. From the abscence of root passwords etc, I assume that security standards are in general very very very low.)
Inspect the system with adb (disadvantage: I do not know how)

Versions Lineage OS (14.1-20180620 nightly build); K9 mail: version unknown (I uninstalled it before I thought of checking the version number. I do not know how to check the version number after the uninstall is complete.)

Best practice would be to not click on links from suspected bad emails or from senders you don't know, etc.

@SiXandSeven8ths Thank you for this comment. Please note that this is easier said than done if the only interface you have is a touchscreen and an app you are not 100% familiar with. I attempted to delete the email but ended up opening it.

If you want to investigate you may want to setup a virtual machine on a desktop and install Android-x86. Then install your K9 mail client. Afterwards, take md5hash and a list of file hierarchy of data, cache, system and boot partition respectively and save it outside the ANdroid-x86. This should be considered the pristine image of your Android machine. Now setup K9 mail client with your email ID. Open that suspicious email, then that attachment and observe if the same events occurred as with your phone. Now repeat the md5hash and file hierarchy for all partitions and compare with previous one

I cannot ensure how well this would work but if the Android-x86 would be infected, this is the way to go. Comparison of md5hash and file hierarchy can pinpoint changes, though you would have to eliminate obvious false positives in data partition. Make sure you are using the same Android-x86 version corresponding to Android version in your device.

Run Dr. Web Security Space Antivirus in full scan on your lineage. If it does not say there's a malware trust me there isn't. After that check what it recommends. Ignore only Google Play Services Adware warning
In order to wrap things up easily. When we look at a virus that can cause a computer or a phone to totally turn into nothing but a brick, then we surely mean a virus that can modify system components and hence cause system to malfunction.
Windows OS to start with, has an ability to enable programs to run as Administrator and hence can modify the system files like installing device drivers, accessing keystore and configuring hardware devices. If you're logged in as an administrator and you have explicitly allowed programs to run as administrator without prompt, you may be vulnerable to have programs with ill intentions to modify system components. We call these malware if they delete, replicate and hide files.
Talking about Linux based OS, specifically on computers like the Mac, Ubuntu, Resurrection etc, the administrator rights are granted by the SuperUser script which works after being initialized at boot by its daemon. This is just like a rooted android where an app can configure and access the root file system and execute system shell commands like removing, downloading data into a partition and creating file systems. Applications can use these to delete essential files like the framework files and hence spoil your Linux PC.
Lastly, we all know Android runs a modified Linux Kernel which means SuperUser rights can be granted by rooting. This way the ability to modify the system is possible but only by explicitly granting the rights by allowing root manager to allow the app to gain root access and modify the system. These are the only ways to brick a phone or PC. But naturally Android is not rooted by default and it makes it harder to get bricked.
The only type of problem we have in android is apps that popup adverts and that just irritates us but has no harm to the system.
I have noticed very well that some third party Androids come with pre-installed apps that can install other apps. This is enhanced by a main app at /system/app or /system/priv-app/, a framework file to render advertising UI and install apps at /system/framework/, a script for installing apps, at /system/bin or sbin and a library to support its main app at /system/lib/. I have seen this evident in some fake Sony phones but after running Dr. Web Security Space, it can identify all of them then you can root and delete them to avoid these ill behavior.
Please note that Google Play Services will be listed because they can popup adverts above apps but just ignore this since  these are essential services for entire Google apps
Why Dr. Web Security Space? Here I have tried a lot of antivirus software on android and surely many of them scan application permissions, known apps to cause problems. This doesn't go beyond discovery of apps that can access private information and what apps are known to cause things like ads and basic perceptible things. Dr. Web goes around scanning system apk files. Treating each as a zip archive and scanning their code and data and assets each to see what they can cause. This makes it able to discover even apps at your memory card which are not installed whether they are harmful or not. It scans framework files each as a jar archive to know what harm they can do and thus discover them. What does it mean. This software first tends to know what type of file is a file regardless of its file extension or name then scans in it file by file through code texts and through archives and through executables to know their harm. So it's the best I can recommend. It even shows you what it's scanning in a file and exactly what is harmful and recommends the best action. I don't think there's anything out there that does all these

Thank you for your answer. So you are saying that antivirus software for Android is so sophisticated that the user should not be worried about malware that is not caught by antivirus software. Could you please add some explanation why this is the case (why this level of sophistication is achieved in Android when this is elusive for other OS)? Could you please explain whether this applies in your opinion to all Android antivirus software or specifically only to Dr. Web Security Space. If it applies only to Dr. Web Security Space, could you please explain what makes this software so special?


text:
How to allow downloading multiple files again in Chrome?
When I was recently downloading files from a website, Chrome warned me, that website tries to download multiple files. I haven't seen that warning before and I guessed, that this may be security feature to prevent downloading unwanted .apk files, so I answered "no" (I disallow). Now I can download only one file at a time from that website and I have to reload whole page before downloading another. Really annoying.
Is there a way to undo my decision and allow downloading multiple files again? Or maybe disable this "feature" altogether?

Type in address bar chrome://flags and search for parallel. Change options for parallel downloading (Default / enabled / disabled)
Not tested but flags change the behavior and this is most likely what you want

You can ignore the warning in red on opening the flags page. You aren't doing anything dangerous

When this happened to me I clicked Google chrome Settings & under Advanced I chose Site Settings > Automatic Downloads then deleted the website link that was previously not allowed to perform multiple downloads under the "not allowed or block" section and copied the website link to the "allowed" section. If you don't want to be asked each time you're trying to download something turn off the "Ask first' button under Automatic Downloads sections.

I fixed it by going into "Settings > Privacy > Clear browsing data". Under the "Advanced" tab select "Cookies and site data" and "Site settings". Tap on "Clear Data".

I encountered this answer while trying to solve this on Brave desktop browser.
This is how I resolved it.

URL: brave://settings/content/all
Find the website you were on when you denied multiple downloads.
Click the trash can
Reload the site and click the download again.

Navigation:

Select "Settings" from the top right Hamburger button (three
horizontal lines)
Select "Privacy and security"
Select "Cookies and other site data"
Select "See all site data and permissions"

Version 1.46.133 Chromium: 108.0.5359.71 (Official Build) (64-bit)


text:
Get To Android Pie bluetooth Settings Without Turning Them Off
Is there an EASY way to get the Bluetooth settings without turning them off?
The new shortcut in Pie sucks because it an on/off button
The old design allowed you to click on the name under the icon to get to the settings to just disconnect one item if needed

Try long press on the shortcut icon, without lifting your finger until the new screen starts to appear.
On my Pixel 2, I was able to get to the Bluetooth Setting screen.

Yes hold your finger on it. It also works for Wi-Fi.
(BTW I find it really inconvenient since the screen on my new phone is so slippery, it's hard to hold my finger on one spot. But that's what it is...)


text:
How to make it possible to save raw photos on Samsung Galaxy A3 2017?
I have a rooted Galaxy A3 2017 (SM-A320F) running Android 8.0.0. I'm trying to capture raw photos, but neither the stock Camera app nor Open Camera show any relevant options (I have enabled Camera2 API). This option wasn't present before rooting too. On another phone, unrooted Galaxy Note8, the option is present at least in Open Camera.
So I suppose the option is somehow disabled in my A3. Can it be re-enabled without switching to a completely different firmware? How?
Note that another question proposed as a duplicate is 1) asking about very old version of Android — 4.2.2, which doesn't have Camera2 API, and 2) asks simply whether there exist any apps with such functionality, which today is of course yes. So this one is not a duplicate. This question is about how to re-enable the missing raw photo support instead.

Possible duplicate of Taking raw photos using Android devices

@Zackary it's not, see the edit.

It appears to already be possible, with the stock firmware! I was about to try tracing an NDK-powered camera app (thanks to Sisik's tutorial with a demo) with strace to see which API calls lead to which ioctls to aid further searches, when, while trimming down the demo, I noticed that the native camera API exposes AIMAGE_FORMAT_RAW16 with dimensions 4144×3106 on my Galaxy SM-A320F/DS. After I went ahead and tried capturing an image in this format, I indeed got a true 16-bit Bayer output, which after simplistic demosaicing and white-balancing resulted in a pretty decent raw image.
There's a small strangeness though: the bottom part of the image (pixels 2333 through 3106) is always filled with zeros. I'm not sure why this is so, but at least the upper 75% of the data are present and usable.
How to get RAW support in OpenCamera
Currently, OpenCamera detects whether a camera supports RAW by REQUEST_AVAILABLE_CAPABILITIES_RAW. If there's no such capability, the detection simply gives negative result. For SM-A320F this is incorrect, because it doesn't report this capability, but RAW16 format is among the supported output formats.
To work around this misdetection, we can apply the following patch to OpenCamera 1.47.3, and build our own APK. This patch will stub out the check for the capability, making OpenCamera search for the format desired regardless.
diff --git a/app/src/main/java/net/sourceforge/opencamera/cameracontroller/CameraController2.java b/app/src/main/java/net/sourceforge/opencamera/cameracontroller/CameraController2.java
index 2c6463c..939b00b 100644
--- a/app/src/main/java/net/sourceforge/opencamera/cameracontroller/CameraController2.java
+++ b/app/src/main/java/net/sourceforge/opencamera/cameracontroller/CameraController2.java
@@ -2062,7 +2062,7 @@ public class CameraController2 extends CameraController {
         //camera_features.picture_sizes.get(0).supports_burst = false;

         raw_size = null;
-        if( capabilities_raw ) {
+        if( true || capabilities_raw ) {
             android.util.Size [] raw_camera_picture_sizes = configs.getOutputSizes(ImageFormat.RAW_SENSOR);
             if( raw_camera_picture_sizes == null ) {
                 if( MyDebug.LOG )

I've reported this at OpenCamera's issue tracker as ticket 661.

Camera2 API alone doesn't necessarily mean you can shoot RAW, though you can run the free app Manual Camera Compatibility. If it shows that your phone supports RAW, you should be able to shoot RAW with the Manual Camera app itself.
Photoshop Lightroom is another app capable of capturing and editing RAW, so maybe that's worth a shot aswell.

Lightroom also doesn't work, which is unsurprising, given that the capability is not exposed via the API. And Manual Camera simply lies, saying that the device supports raw shooting (see also its reviews). Of course, I'm not going to buy it simply to find out that it doesn't work.

Fair enough, I didn't know the Manual Camera test lied, I had phones showing incompatibility on it earlier. What is the output of this app? That developer doesn't have any camera app to sell so maybe that app is more truthful.

Oh, nevermind me, I just saw your edit. So you're already aware that your device's HAL3 doesn't do RAW at all which is nothing you can do about sadly. This would be up to the phone manufacturer to do.

The Camera2 probe app does confirm that raw capture is not available. This one looks much more reliable. The question of how to re-enable raw support remains...

You can't just re-enable RAW support yourself or by flashing a custom firmware or ROM. Try contacting the manufacturer for a solution as only they are able to provide you with that functionality. This comes down to hardware level drivers, Camera2 API is only an interface to use available functions like RAW. Even while your camera sensor (Sony IMX 258) might be perfectly capable, if the manufacturer decided not to include RAW support, sadly, you're out of luck here.

If the manufacturer decided to provide me with this functionality, how could they do this if you claim that flashing another firmware won't work?

I said custom firmware, there are plenty of communities modding and customizing all sorts of firmwares and operating systems. Still, you won't find a custom firmware (feel free to search XDA, the largest community of those) that enables RAW support, that was what I am saying.

If the manufacturer decides to provide you with an updated image that enables support, of course you would have to flash it. I apologize for my poor wording.


text:
How to trace a process sending data over network?
I found that some mobile data is consumed by unknown process. There's a huge difference between my ISP report and glasswire report, around 40mb for each 100mb used.
I know my phone is infected and someone spying on me but couldn't find how to get rid of that.
I wiped boot/recovery/data/cache and dalvik partitions before installing a custom ROM (dotOS) from a trusted computer. I managed to root the phone and install a firewall to check what's happening but got nothing worth it.
My assumption is that some process is still running somewhere, I have no idea how can I, at least, see what's going on. I do not have any background with Android development but I understand most of the concepts around it.
It's not a system application so please do not mention that.

Afwall can only see user / system apps! That doesn't solve my problems.

Check your mobile data plan regarding the charge unit size - if it is large (e.g. 100KB) you loose a lot of mb just because your MNO is always rounding up to 100KB when the network coverage is interrupted even if only a few bytes were effectively transferred.

There are multiple ways to sniff outgoing network traffic. Since Android uses Linux kernel, we can make use of in-kernel reliable firewall: netfilter which is controlled using userspace utility iptables. It's the easiest available option for rooted phones.
Through a root commandline:
# iptables -I OUTOUT -j LOG --log-prefix "SNIFFER " --log-uid --log-level 7

This will log all outgoing traffic to kernel log that you can capture and save to text file:
# dmesg -w | grep SNIFFER

This will provide you uid of the all the processes sending out traffic, which can be used to trace the processes.
AFWall+ app also makes use of iptables owner module to block traffic from certain user/system apps (UIDs) including root.
For further details on capturing packets, see View network traffic requested by app.


text:
Samsung S7, Wifi keeps disconnecting
I've searched around, and so I can ensure that this is not a duplicate.

Smart Network Switch is off
Keep Wifi on during sleep
Wifi works excellent for other devices
Wifi disconnects randomly even while the screen is open and device is in use

I opened up the Developer options, and turned on "Wi-Fi verbose logging" and when it disconnected, I saw these messages:

NETWORK_SELECTION_PERMANENTLY_DISABLED
NETWORK_SELECTION_DISABLED_BY_WIFI_MANAGER=2

Also in another occasion these:

NETWORK_SELECTION_DISABLED_BY_ASSOCIATION_REJECTION=1
NETWORK_SELECTION_DISABLED_BY_WIFI_MANAGER=1

The issue seems to be since installing an application, but I've uninstalled all recent applications on my phone, and it hasn't gotten better.
Safemode seemed to fix it, so there must be some kind of application interference, but the Wifi Control History only lists applications that turned on the wifi.
My only solution so far has been to disable wifi and re-enable it, or open up the wifi network manager in android, and tap the wifi connection. (presumably to override the 'network selection disabled')

Some logcat details:
[ 08-14 13:44:35.460  1364: 2509 E/WifiStateMachine ]
Did not find remoteAddress {10.100.5.1} in /proc/net/arp

and
I WifiHs20Service: Message received 5014
E WifiHs20Service: received HS20_UTILITY_ACTION_TYPE_HS20_CONFIGURATION_CHANGED
D WifiStateMachine:  DisconnectedState !CMD_GET_CONFIGURED_NETWORKS uid=10225  rt=2982499/2982499 10225 0 num=40
D WifiStateMachine:  ConnectModeState !CMD_GET_CONFIGURED_NETWORKS uid=10225  rt=2982500/2982500 10225 0 num=40
D WifiStateMachine:  DisconnectedState !CMD_GET_CONFIGURED_NETWORKS uid=10225  rt=2982511/2982511 10225 0 num=40
D WifiStateMachine:  ConnectModeState !CMD_GET_CONFIGURED_NETWORKS uid=10225  rt=2982511/2982511 10225 0 num=40

When turnnig wifi back on, I sometimes see:
WifiStateMachine: There are no configured ssid

followed by many SSIDs of wifis I've already used. The SSID in range is not listed. Perhaps because the SSID in range is marked 'permanently disabled' (see above)

Additional Edit, more info:

I'm unable to reliably replicate this. It only disconnects when I'm assuming it'll work, and it doesn't seem to be crashing while I'm trying to use it.
I got a disconnect while doing a beyondpod (podcast app) update: https://pastebin.com/Edx7ADXZ Things to note:

I could not duplicate it with just the podcast app
If you search in the log for beyondpod, you'll see more information about where the disconnect happens. Sometime before: "08-23 12:53:46.600"

Update 3:
I wiped my phone, and it was fine for a while, but it came back. The same error codes: NETWORK_SELECTION_PERMANENTLY_DISABLED and NETWORK_SELECTION_DISABLED_BY_WIFI_MANAGER=2
I guess wiping it was not sufficient.
Is there anything I can run to constantly reset my wifi (when the hardware switch is on) to effectively cancel out whatever is turning it off?

I noticed this post, so I'm going to try and get adb logs to see if that provides more info: https://android.stackexchange.com/questions/143720/nexus-7-keeps-disconnecting-from-wi-fi

This seems relevant?: https://developer.samsung.com/forum/thread/wifi-turn-on-and-off-in-loop-android-601-on-sm-g900f-where-can-i-submit-a-bug/201/299651?boardName=SDK&startId=zzzzz~

I'm finding strings here that match my logcat, but I haven't narrowed down the logs to anything meaningful, and I'm hesitant to just dump all kinds of personal data: https://gist.github.com/czyzm/6a49abc9b5b0c0eb28d5999cccee0c77

If you are looking into logcat than you should look for specific time if you know when disconnection occured maybe something is there. How device works with other WiFi networks?

Do you know someplace I can upload ~2MB logs? pastebin.com doesn't work with a free trial. 2MB of logs is what I get when I try to cut it back to only one minute...

Since I don't have enough reputation to comment ill have to post here. Hi Isaaclw, I see that the problem started when you installed an application, What was that application? You can take "adb shell logcat" contains wpa_supplicant related logs. Wpa_supplicant is an open source application which is used in android phones to connect and manage Wi-Fi connections.This would help your disconnect issue. or "adb shell cat /proc/kmsg" which is the file where kernel dumps the logs. Here you can see Wi-Fi crash related logs.

adb shell cat /proc/kmsg responds with permission denied

The other comment has the same problem as the logcat above. I dont have anyplace to upload the full logs

Debugging is so painful, partly because the error comes and goes and is unreliable. I wrote a script that helps debugging: https://pastebin.com/3rkNFaXC
And now the error isn't happening anymore. Go figure. I think due to my schedule I'm reformatting this weekend.
UGH.

Another edit. I wiped my phone, and it came back. I wish I didn't have so much going on this week and could actually solve it. Is there a place I can export my application list that would help?

Android didn't indicate which applications where toggling the wifi status accurately, and the logs were unhelpful.
I later noticed that "MyCricket", an application that helps pay for my Phone Service, had a setting titled: Turning on Cricket Wi-Fi Manager
Turning off this setting fixed it. I wish the Android controls had been more helpful.

Go to settings/display/screen saver & enable it. It seems to keep the wifi running. Hope I can help. I know it is an old thread but people still use this phone & this search is #2 on googling "s7 wifi keeps disconnecting" I hope I can help people like me.

authors: Једноруки Крстивоје


text:
How do I stop a specific WiFi network from turning on WiFi automatically in Oreo
Background:
With my Samsung Galaxy S7 finally updated to Android Oreo recently, I got the option to turn on WiFi automatically when in places where I frequently am.
This is a great feature, which I used to achieve using Llama, and which I very much want to use.
However, there doesn't seem to be any control for the locations or networks that trigger it. I also have no idea how big the range is of what it counts as a distinct location.
The issue is that there is this WiFi network throughout the city which I use at one specific location frequently. I pass through the vicinity of that location several times a day, which unfortunately means WiFi is turned on every time. Which in turn means my phone is continuously trying to connect to that network and failing, because I'm just biking through. All the while it prevents a stable connection with my mobile network, because it's trying to connect to the WiFi.
Question:
Is there any way to prevent a specific location from triggering WiFi to turn on automatically?
Or, for that matter, is anything known about how the option precisely works? I'm assuming it looks at location, but how big is the range, how does it work if I connect to the same network in different locations, etc.?

No idea about Samsung ROMs but in WiFi preferences I have "Turn on WiFi automatically". Is this what you mean by "option to turn on WiFi automatically when in places where I frequently am"?

@SSS: Yes, that is the option I mean.

You can try an automation appoach usiing Tasker /Macrodroid or others. Define a Geofence and disable wifi on entering that and enable on exit

So I'm not sure how that option works but it's probably one of these two ways. Tracking location, if it track location and turn on WiFi it shouldn't have issues as far as location services are ON range shouldn't be much big if I had to guess I would have to say 20-30m. If it looks into available WiFi networks and if X is available then it connects, this is possible due to every newer phone scans almost always for WiFi and Bluetooth signals, in this case of there is some WiFi with same name (SSID) anywhere else it will turn on WiFi there.

What range we are talking about does it turn on WiFi half of kilometre away or?

@Једноруки Крстивоје: I have no idea what the range is, because I don't actually know what it decided as the location. My city is quite dense, so there is a lot of stuff quite close to each other.

To be honest it seems I didn't read entire question. So this actually works on recognising SSID or name of WiFi so if it's in range you will be connected. To make it specific location you'll need to use something else

@ЈеднорукиКрстивоје I honestly don't know whether it looks at location, the SSID, or both. So if my question implies one or the other, that is unintended. Regardless of the actual trigger, I would like to know how to remove a specific trigger from the internal list of triggers.

Well you'll probably need to use app like tasker, and you should maybe change your question "how do I automate X in X app" look into beeshyams comment up there

While that would be a potential workaround, that simply isn't what I was asking, so I see no point in changing the question to something completely different. I want to know how Android deals with this.

So, if the WiFi turned on automatically and is connecting to the network, you need to turn the WiFi off.
When I did that, I got the following notification:

Turn on Wi-Fi automatically
  "[SSID]" has been removed from your frequently used Wi-Fi networks.
  It will be added again if you use it more often.

Apparently that is enough to remove it temporarily at least. No idea how long it takes until it is added again.

Apparently it doesn't take too long. Probably about 2 weeks, but it probably depends on the frequency as well.

authors: Једноруки Крстивоје


text:
Recover access to Samsung Galaxy Tab A after forgetting the pattern lock
I have Samsung Galaxy Tab A and I put a pattern lock on it, but sometime later, I forgot the pattern.
I've looked it up and the only options to recover are to have the tablet off, but I can't turn the tablet off without the passcode.
How to recover access to it?

Push the down volume button and power button at the same time. It reset my tablet and I just reentered the pattern and it worked. I hope this helps.

There's a simple way out.
Assuming your tablet is connected to the Internet and you have Google account signed in, just enter pattern several times till the screen shows Forgot pattern. Click it then enter your Google account credentials to gain access to your tablet.

Drain the battery down if you can't shut it down. Then, volume up and power for a few seconds (until it shows its doing something) from there, you can wipe the device

Hold down the power button. Wait for the power off and restart to appear on the screen. You should see a restart in safe mode. Restart and if everything is ok do a regular restart
I didn't forget my pattern but it wouldn't work. Just blanked the screen if I put in the correct pattern. And said incorrect pattern if I tried an incorrect pattern. I also noticed it was not counting down the incorrect attempts.
I did the above combo just by trying combos. It worked.
Good Luck

Can't shut it off without entering the pin...


text:
How to stop being visible to others in Whatsapp after deleting my account
I have deleted my whatsapp account and application. Still my friends see my account, they believe I am still on and keep sending messages which never reach me. How to delete my account in such a way my friends no longer see me?

According to the this link, It's easy.
Open Whatsapp Application and tap the Menu Button > Settings > Account > Delete my account. Write your number and Delete account.
Important if you delete account:

Delete your account from WhatsApp.
Erase your message history.
Delete you from all of your WhatsApp groups.
Delete your Google Drive backup.


text:
L2TP VPN connection on Android via shell
Is there a way to open a predefined vpn (inbuilt vpn managment) connection on Android 8< via shell (on a rooted device), so it can be put in an init script?
Thanks


text:
How to optimize all my apps in “Battery Optimization”?
I have xiaomi mi max 32gb -Multirom 8.4.26
I make all my apps "battery optimized" except these apps: (Greenify+amplify+powernap+Launcher+Appops+Magisk+ Xposed).

But after rebooting my mobile, apps returns non-optimized. So I need to make all my apps optimized after every reboot. This task is tiring and wastes my time.
My Question: Can you help me batch optimize all apps after every reboot, please? By using tasker or terminal commands or adb commands or mod or anything
Please help me

up...............................up.............................up


text:
How do I remove applications that android automatically downloads, and stop it downloading apps that I don't want automatically?
I have an android phone, and every now and again, when I connect to WiFi, I notice it starts automatically downloading updates.
However, it also seems to download/ update a number of default apps, which I never use.
I now find myself running out of space, and don't want to delete the apps I do use (banking, traveling, etc), and don't want to delete photos, videos etc, until I am able to back them up to my computer...
I have tried removing a number of these apps (Flipboard, Google Play Books,  Music, etc, Google +), but they all still seem to be there. When I uninstall them/ set back to factory, they just seem to automatically update again when I next connect to WiFi.
I don't anticipate ever having a need for these apps, so how can I permanently remove them, and remove them from the automatic updates, to free up space for messages, photos, etc?

In general, to prevent auto updates - - Disable auto updates. Google Play Store → Settings → General → Do not auto update
The apps you mentioned seem to be system apps, those that came with the device (not user installed). You can remove  those only if your device is rooted. But this is not going to help you save space as they occupy space on the /system partition, which is not available to you.
However, you can reclaim some space by removing the updates of these apps.  Thanks to Izzy, who pointed in comments (now deleted)

If the apps are not to be used anyway, better approach is going to Settings › Apps and to disable them altogether – including force-stop and delete cache + data. That way: no more auto-updates for them, cleaner app-drawer, plus space saved (date + cache being removed). And don't forget that those updates indeed use up space outside /system (updates go to /data, regardless of system app or not)

If you need more space You haven't mentioned your device /Android version and whether it supports ext.SD card. If you are on Android version 6 and above you can convert your ext.SD to adoptable-storage or root your device and move apps to ext. SD. If these options are not possible, you are out of luck, barring using a cloud based service to back up

What about this answer is new, a question that can also be placed against the original query? Where is the [duplicate] indicator?

@wbogaczb I don't follow you. Are you saying that this a dupe? Could be but I couldn't find it. If you find it please flag. To clarify, I had deleted my original answer after Izzy clarified an important aspect (see edit history) and requested him to answer but he suggested that I amend the answer, which I did

This Query yielded 7 relevant questions focused on this just within 2 pgs of 850+ posts. Here are the numbers for reference of my opinioned duplicate questions, since full links would exceed comment length: 200384, 2051, 68785, 190791, 12058, 162909, 196134, and undoubtedly more on the further unread pages of search results.

@wbogaczb :Thanks for pointing out. May I request you to flag what you feel is the closest dupe?  I certainly didn't dig deep. I will happily take down my answer if dupe

Clearly my earlier search was cursory and I agree that dupes should be closed @wbogaczb


text:
WhatsApp's backup to Google Drive doesn't work
I recently reinstalled WhatsApp because it stopped working. Then, I restored the Google Drive backup. For this backup, I used my primary Google account. Restoring worked fine.
However, after restoring the backup, no new backups would work. It always just got stuck at some percentage of progress. After many failed attempts of canceling the backup after hours of being stuck at the same percentage, I added my secondary Google account to my phone and chose it as WhatApp's backup location. It then went on to make a 2.3 GB backup to the secondary Google account (according to the information WhatsApp stated). This backup again got stuck. Repeating it several times always made it get stuck at a higher percentage of progress.
Eventually, I gave up and deleted the backup in Google drive (secondary account). I noticed that my secondary account only used a few hundred MB in total, according to the information found in the bottom left corner of the Google Drive website.
After deleting the backup, I started another backup. WhatsApp showed that it already completed 2.3 GB of 4.6 GB right from the beginning. This got stuck again at 99%. After deleting the backup again and starting it again, it now started at 4.6 GB of 6.9 GB, apparently always increasing by 2.3 GB.
What should I do to perform a full backup?

Is your whatsapp updated? Next, try clearing the cache of WhatsApp - I don't know how this helps but is recommended

According to the Play Store, all apps are up to date. I already forced-stopped WhtasApp and cleared its cache prior to the last attempt but I'm going to try again.

Have you tried reinstalling WhatsApp itself?

@SSS If i were to do that, wouldn't I lose all my messages?

Whatsapp chat messages are locally backed up to /sdcard/WhatsApp/Databases, make a copy of the folder just in case.

I'm pretty sure that I figured out why it failed, though I can't test it anymore. When migrating WhatsApp to a new phone manually, one sent video wasn't readable. Not because of permissions but because reading the file always produced an I/O error.

The exact same happened to me, it would never finish uploading the backup to Google Drive and in every new attempt it would tell me that the backup size was bigger, start the upload and stop somewhere between 97% and 99%.
The only difference is this started happening spontaneously, it was successfully making and uploading backups every day and then one day, out of the sudden it couldn't finish uploading it.
After trying many of the suggestions that I found all over the Internet, like force stopping WhatsApp, clearing the cache, set it to use another Google account for backups, nothing helped.
At the end, the cause was the same issue pointed out in your last comment, I had a few corrupt 0 byte media files within WhatsApp's Media/ folder that couldn't be read, moved, copied or deleted: Operation not permitted.
I don't know how did that happen, but the best way I could get around it was to use a terminal App and run Linux commands for copying all non-corrupt files to a new folder:
cd WhatsApp
mkdir MediaCopies
cp -r Media/* MediaCopies

It will throw errors about the corrupt files but continue copying the good ones.
After checking MediaCopies/ looks right and contains all files then:
mv Media Media~
mv MediaCopies Media

Then open WhatsApp, poke around open pictures, videos, etc. and finally:
rm -rf Media~

It will fail to remove those corrupt files, but at least you won't have the rest of the files duplicated.
And voilà! No more issues uploading the backup.

Of course I can't test this anymore but it looks like it would work, so I'll accept this answer.. Thank you for writing it down for others. :)


text:
Samsung S6 Active will not boot; AP, ROM flash succeeds (bootloader flash fails); then BL flash works, but the device still won't boot
I am having trouble with my S6 Active. It has been stuck in a boot loop for a week now. It was running stock beforehand. I flashed a stock AT&T Nougat ROM with Odin. The AP, CP, and CSC all successfully flash but it is still stuck on the Samsung logo screen when it boots. Here is the log:
<ID:0/003> Added!!
<OSM> Enter CS for MD5..
<OSM> Check MD5.. Do not unplug the cable..
<OSM> Please wait..
<OSM> Checking MD5 finished Sucessfully..
<OSM> Leave CS..
<OSM> Enter CS for MD5..
<OSM> Check MD5.. Do not unplug the cable..
<OSM> Please wait..
<OSM> Checking MD5 finished Sucessfully..
<OSM> Leave CS..
<OSM> Enter CS for MD5..
<OSM> Check MD5.. Do not unplug the cable..
<OSM> Please wait..
<OSM> Checking MD5 finished Sucessfully..
<OSM> Leave CS..
<ID:0/003> Odin engine v(ID:3.1301)..
<ID:0/003> File analysis..
<ID:0/003> Total Binary size: 4539 M
<ID:0/003> SetupConnection..
<ID:0/003> Initialzation..
<ID:0/003> Set PIT file..
<ID:0/003> DO NOT TURN OFF TARGET!!
<ID:0/003> Erase...
<ID:0/003> ERASE_SECTOR: 1197824
<ID:0/003> Get PIT for mapping..
<ID:0/003> ERASE_OK
<ID:0/003> Firmware update start..
<ID:0/003> NAND Write Start!!
<ID:0/003> SingleDownload.
<ID:0/003> boot.img
<ID:0/003> recovery.img
<ID:0/003> system.img
<ID:0/003> userdata.img
<ID:0/003> modem.bin
<ID:0/003> Transmission Complete..
<ID:0/003> Now Writing.. Please wait about 2 minutes
<ID:0/003> Receive Response from boot-loader
<ID:0/003> cache.img
<ID:0/003> RQT_CLOSE !!
<ID:0/003> RES OK !!
<ID:0/003> Removed!!
<ID:0/003> Remain Port ....  0
<OSM> All threads completed. (succeed 1 / failed 0)

If I try to flash the Bootloader, and it fails. I receive the following:
<ID:0/003> Added!!
<OSM> Enter CS for MD5..
<OSM> Check MD5.. Do not unplug the cable..
<OSM> Please wait..
<OSM> Checking MD5 finished Sucessfully..
<OSM> Leave CS..
<ID:0/003> Odin engine v(ID:3.1301)..
<ID:0/003> File analysis..
<ID:0/003> Total Binary size: 4 M
<ID:0/003> SetupConnection..
<ID:0/003> Initialzation..
<ID:0/003> Erase...
<ID:0/003> ERASE_SECTOR: 1197824
<ID:0/003> Get PIT for mapping..
<ID:0/003> ERASE_OK
<ID:0/003> Firmware update start..
<ID:0/003> NAND Write Start!!
<ID:0/003> SingleDownload.
<ID:0/003> sboot.bin
<ID:0/003> FAIL!
<ID:0/003>
<ID:0/003> Complete(Write) operation failed.
<OSM> All threads completed. (succeed 0 / failed 1)

Is the bootloader the issue or is it just failing because it's bootloader locked? Is there anything I can try to get it to boot?
For reference, the ROM I am using is found here:
AP_G890AUCU6DQD1_CL10950877_QB13102601_REV02_user_ low_ship_meta.tar
BL_G890AUCU6DQD1_CL10950877_QB13102601_REV02_user_ low_ship.tar
CP_G890AUCU6DQD1_CP6129305_CL10950877_QB13102601_R EV02_user_low_ship.tar
CSC_ATT_G890AATT6DQD1_CL10950877_QB13102601_REV02_ user_low_ship.tar

I purchased this phone secondhand. I do not know if the prior user flashed it.
UPDATE: I was able to flash the most current firmware onto the device.
Model: Samsung Galaxy S6 Active SM-G890A
OS Version: Android Nougat V7.0
PDA/AP Version: G890AUCS7DRF2
MODEM/CP Version: G890AUCS7DRF2
CSC Version: G890AATT7DRF2
Region: USA AT&T
Security Patch Level : 2018-07-03

I flashed the BL, AP, CP, CSC, and used the .pit file, and everything went smoothly:
<ID:0/003> Added!!
<OSM> Enter CS for MD5..
<OSM> Check MD5.. Do not unplug the cable..
<OSM> Please wait..
<OSM> Checking MD5 finished Sucessfully..
<OSM> Leave CS..
<OSM> Enter CS for MD5..
<OSM> Check MD5.. Do not unplug the cable..
<OSM> Please wait..
<OSM> Checking MD5 finished Sucessfully..
<OSM> Leave CS..
<OSM> Enter CS for MD5..
<OSM> Check MD5.. Do not unplug the cable..
<OSM> Please wait..
<OSM> Checking MD5 finished Sucessfully..
<OSM> Leave CS..
<OSM> Enter CS for MD5..
<OSM> Check MD5.. Do not unplug the cable..
<OSM> Please wait..
<OSM> Checking MD5 finished Sucessfully..
<OSM> Leave CS..
<ID:0/003> Odin engine v(ID:3.1301)..
<ID:0/003> File analysis..
<ID:0/003> Total Binary size: 4644 M
<ID:0/003> SetupConnection..
<ID:0/003> Initialzation..
<ID:0/003> Set PIT file..
<ID:0/003> DO NOT TURN OFF TARGET!!
<ID:0/003> Erase...
<ID:0/003> ERASE_SECTOR: 1197824
<ID:0/003> Get PIT for mapping..
<ID:0/003> ERASE_OK
<ID:0/003> Firmware update start..
<ID:0/003> NAND Write Start!!
<ID:0/003> SingleDownload.
<ID:0/003> sboot.bin
<ID:0/003> param.bin
<ID:0/003> cm.bin
<ID:0/003> boot.img
<ID:0/003> recovery.img
<ID:0/003> system.img
<ID:0/003> userdata.img
<ID:0/003> modem.bin
<ID:0/003> Transmission Complete..
<ID:0/003> Now Writing.. Please wait about 2 minutes
<ID:0/003> Receive Response from boot-loader
<ID:0/003> cache.img
<ID:0/003> RQT_CLOSE !!
<ID:0/003> RES OK !!
<ID:0/003> Removed!!
<ID:0/003> Remain Port ....  0
<OSM> All threads completed. (succeed 1 / failed 0

HOWEVER, the device is still stuck on the Samsung logo when it boots. I'm not sure what else I can do at this point. It's out of warranty and Samsung wants $70 to fix it.

Was your device on Oreo or 7.1 and you flashed ROM of earlier version?  Samsung often prevents this. Also check if the ROM is exactly for your device variant

I'm unsure of Android on it beforehand. I do know it was an AT&T S6 Active (SM-G890A) and the rom I'm using is stock AT&T Nougat for SM-G890A. It does not look like Samsung ever updated the S6 Active to Oreo (looks like 7.0 was the latest and the "device is not eligible" for Oreo). There are some possible older firmwares I could try, but the downloads are all locked behind RapidGator (ugh).
The Nougat firmware flashes fine except for the BL. I don't know if that's the core of the issue - why it won't boot past the Samsung logo - or if that's unrelated to the boot issue.
Thanks!

It could well be bootloader related as Samsung often doesn't permit downgrading of bootloaders. Download the latest ROM for sammobiles dot Com and check

Unfortuantely, sammobile does not have any roms for SM-G890A. I was able to get the most recent rom flashed on it including the bootloader (see update in post), and it still doesn't work. So not I'm not sure what to do.

That's very strange. And unfortunate. Wait for a while - may be somebody can pitch in.

Try the latest Odin version or the version claimed compatible with your device

I bought a firmware for US$3 from G890AUCS7DRF2_G890AATT7DRF2_V7.0_Repair_Firmware_4Files_( USA AT&T ). It worked flawlessly. I could go back to Android 6.0 and had the phone labeled as S6 Edge, 16 GB storage, no baseband, etc.
I uploaded the following file to Google Drive: G890AUCS7DRF2_CL12599862_QB18539350_REV02_user_low_ship_meta. It is the firmware for Samsung Galaxy S6 Active (G890A) to fix boot or missing baseband.

Can you provide the instructions on flashing it?

@JoeMunden Wow, after trying 6 different SM-G890A ROMs, the one you listed worked for me.

From what I have read, they recommended you use the default Odin3 options. I previously botched a downgrade to 6.0 and had a partial 6.0 bootloader working (always failed after sboot.bin using different ROMs). For me, I turned on Nand Erase and Re-Partition with a PIT file that I extracted from the CSV file using 7.zip.
Thanks to Joe Munden for linking the correct file.
G890AUCS7DRF2_CL12599862_QB18539350_REV02_user_low_ship_meta

G890AUCS7DRF2_CL12599862_QB18539350_REV02_user_low_ship_meta.zip :

AP_G890AUCS7DRF2_CL12599862_QB18539350_REV02_user_low_ship_meta.tar.md5
BL_G890AUCS7DRF2_CL12599862_QB18539350_REV02_user_low_ship.tar.md5
CP_G890AUCS7DRF2_CP9924223_CL12599862_QB18539350_REV02_user_low_ship.tar.md5
CSC_ATT_G890AATT7DRF2_CL12599862_QB18539350_REV02_user_low_ship.tar.md5

(PIT file MARINELTE_USA_ATT.pit inside the CSC file)


text:
Screen won't turn on during a call
As soon as I'm connected on a call, both outgoing and ingoing, the screen goes blank, even if it's sitting on a desk (i.e. it's not the result of the proximity sensor).
I can't get the screen to go back on until the call is ended.  Pressing the power button does nothing; pressing the power button and then the fingerprint sensor gives the phone a brief vibration, but does nothing for the screen.
I can still speak and hear during the call, I just can't interact with the screen in any way.
Once the call is over, I can get the screen back on via power button + fingerprint sensor.
My Settings has no option under Calls for turning the screen on or off.
(Google Pixel XL, Android 8.1.0)

I guess it's faulty proximity sensor I had same problem with lg (suprise suprise) where screen goes black or doesn't turn off when it should solution was to recalibrate sensor I can't remember how I did it I think I had to boot into some mini OS or use some dieler code. To see if your sensor work properly download app called Aida 64 and in app under sensors find proximity and hover you sensor (in most cases it's above screen) and see if vaule has changed it mostly return 1 or 0, if not try searching how to recalibrate proximity sensor, if value is changing than problem is in settings or bug

Also in my case turning it off and on resolved problem temporarily. Keep in mind that in your case it may be a software bug see if there is an update, there should be android 9 available.

I installed Aida 64.  is TMD4903 Proximity Sensor what I'm looking for?  It's the only "proximity sensor" listed.  Its value never changes from 0.0 cm.

Well if it's only one labeled with proximity sensor than yes. Well that means that it's either hardware or software failure. Now I can't find any solution on how to recalibrate sensor but I find article for pixel 2 XL in which it says it received fix in June this year. I would contact support to see if there is workaround for recalibration. Did you dropped phone maybe in time when sensor started making troubles?

authors: Једноруки Крстивоје


text:
Location when on home wifi is wrong; can I disable using known wireless networks to get location?
I just moved to a new city and brought my home wifi router with me. Now whenever I'm connected to my home wifi network, Android thinks I'm at my old house! It's extremely frustrating. Is there a way to disable that method of location finding? Or even better, is there a way to get Google to update the location of this wifi network?
I've tried turning off Wi-Fi scanning and renaming my wireless network. What information does Android use to fingerprint a wireless network? Maybe I can change something about the network to make Android think it's a new, unseen network.

See: Location Error after moving

I suppose Android is recognizing the WiFi router with it's MAC address. Since this is not easily changeable on most routers (you could do so with a custom firmware like DD-WRT), you can set your Android to use only GPS as a location source as a workaround.
Depending on your Android version, you should be able to do that under  Settings - Security & Privacy - Location - Mode. Set it to Device only.
Please note that this disables location determination via mobile network so you might experience your GPS being used more often and the accuracy being lower when you're inside a building.


text:
Is there a way to remove everything in my Android phone Contacts and then transfer everything in Gmail contacts into the phone contacts?
I make extensive use of GROUPS in my Gmail account.  For example, all medical contacts are stored in MEDICAL, restaurants in RESTAURANTS, etc.  When doing this I specifically do not have the group entry appear in MY CONTACTS.  This removes clutter from MY CONTACTS.  I have 97 entries in MY CONTACTS, and 300 entries among the groups that do not appear in MY CONTACTS.  Somewhere I COPIED my Gmail to my phone contacts and to my surprise all the group entries from Gmail now also appear in MY CONTACTS on the phone which results in 397 phone contacts (97 + 300).  I would like the phone contacts to be exactly as they appear in the Gmail contacts.
I have tried Settings > More > Applications > Go right to all apps > scroll down to "Contacts Storage" Then clicked on contacts storage > Click Clear Data but that did not do the job.

If you only want a particular contact group to appear in the contacts app on your phone, then you can achieve it pretty easily by using the Contacts to display option in your Contacts app.

Open Contacts app.
Tap on the 3 dots at top right, choose Settings.
Select Contacts to display > customize.
Expand your Google account and uncheck all the other groups and keep only My Contacts.

Do note that when performing a search within contacts, it will still search within all the available contacts. But under normal display it will only show your 97 contacts stored under My Contacts group.

Thank you very much.  That solved my problem.  Under my Gmail account I checked MY CONTACTS and STARRED IN ANDROID and nothing else.  That is all that displayed under CONTACTS which is what I wanted.  I was still able to see individual entries in my various groups, which is also what I wanted.  Thanks again for helping me out.

@Donald Baltz I am glad that it has helped. Please consider up-voting the answer as that will help me in gaining some reputation :)

It depend on your device model. You should check the setting of contact application. You can disable google contact to show in contact application. By the way, Go to Google Contacts. Export contact list to a csv file. Import this file on your device and check the groups.

I Exported MY CONTACTS (97 records) from Gmail in vCard format and imported them into my phone's contacts.  The 300 entries from the various Gmail Groups that are not part of Gmail MY CONTACTS remain in the phone's CONTACTS.  I would have liked for them to have been removed (OR NOT APPEAR) in the phone's CONTACTS.


text:
How to add contacts on FireChat?
I just downloaded FireChat for my Android. I see it identify you with your email address by making you sign up, but I can't see anyway to add contact on FireChat. Does anyone know how I can add contact on FireChat?

Firechat by it's design doesn't have contacts as I understand. It's open to all and users hashtags for charts - though you can send private encrypted messages

@beeshyams - Thanks for reply, so I can send private message only after I have seen that user on public chat, right?

That's what I  understand from description. Haven't used

That's what I gather from help /FAQ on internet

You can figure out and self answer :)

@beeshyams Thanks, I appreciate your help :) But currently I can't find any use for this app :D


text:
Installing Gapps (space problem)
I have installed the custom ROM from TeamWin recovery mode for android 8.1 (don't judge ). Everything was installing fine with no errors but then I then installed Gapps, it then told me there is not enough free space on /system partition. How can I free up some space to install Gapps?
EDIT:
Check this log file!

Use a smaller Gapps package...

In general on a custom ROM it is recommended to use the GApps nano package. Otherwise you will have earlier or later every app installed twice (for each GApp one on the system partition and one updated app on the user data partition). Just use the nano package and download all GApps you want from PlayStore.

@acejavelin I installed the pico version and still has the same error.

Did you perform a CLEAN install? Meaning, did you wipe system, data, and caches prior to flashing? If yes, then I would suggest going to your maintainer of the ROM or the official support thread for the ROM on your device, they should have a recommended Gapps package

@acejavelin Yes I wiped the tablet clean before flashing. I'll check the forums. Thanks

I guess you have two way.

Go to Custom Recovery and wipe /System partition Then, reinstall Custom ROM. (Maybe /System partition have problem and after doing this step that's fixed. )
Download Nano Variant of gapps and install on your device. It's very light. Go to Play Store and install other Google Application. (If you install Google Application from Google Play, they installed on /Data partition and /System partition be free.)

After I tried this, it still didn't work. I think I give up at this point.

@Leon185 Test stock rom and do steps again.

How do I do that?

What is the model of your phone?

Take a look at the log, I edited the question to add a log.

Link is corrupted.

Its a Asus Nexus 7 2013 Edition

Its not corrupted. It still works


text:
How do I update an OTA while retaining TWRP and Magisk, only with my phone?
I have a OnePlus 6 that uses the A/B partition schema.
Previously with my OnePlus 5  with TWRP, I normally download the OTA package, reboot into TWRP to install it, and then TWRP img and Magisk ZIP afterwards. Then I have a fully updated system with TWRP and Magisk.
Now with A/B partition, the OTA gets installed immediately after downloading. I can only flash Magisk before rebooting, by manually extracting the boot image using command-line tools and Magisk's "Patch Boot Image" function, before flashing the patched boot image back. However, I see no option to install TWRP in this way (I'm currently not able to apply the ZIP using CLI tools). Any ideas?
Some good points for OnePlus over AOSP: OnePlus detects Magisk root and downloads full image instead of incremental OTA image, which saves the time for boot restoration, and also allows installing OTA even if /system is modified.
However, there's no "Disable Auto OTA Installation" in Developer Settings, so OTA installation may not be avoidable to some extents.

You can try this Magisk module looks promising

@beeshyams I think I have an answer of my own (suitable for fancier Android enthusiasts)

I just realized that I self-answered this question some time ago.
The answer is YES. After OTA, I use dd to pull out the new boot image, install TWRP in the way given above, and install Magisk over the TWRP-equipped boot image, and then dd it back. After rebooting, the after-OTA system has TWRP and Magisk ready.

This answer is more applicable to AOSP and not One Plus 6 as I realized post edit by OP. Retaining for general info

You can't ATM
Welcome to the convenience and complications of A/B partitions

Firstly, A/B devices don't have /recovery partition as recovery is included in the /boot partition. Which means everytime you update custom recovery is replaced by the stock recovery. For more details, see the second link in my answer here `Wipe Cache` option in Google Pixel 2!
For retaining root,that is Magisk, the developer has recommended a method for OTA installation which doesn't entail extracting / patching boot images
For custom ROM's too Gapps don't survive OTA updates unless the Gapps are modified (as in the case of official Lineage OS for my device MiA1 as an example)

It may be possible if the custom recovery is also modded to survive OTA like Gapps. AFAIK, this is the current state for A/B devices which means you can't update OTA on the go and have custom recovery without having a PC (reason for me to delay OTA updates)


text:
How to greatly improve privacy against Google apps such as Play Services?
This is really a long and tiresome journey. So I hope you become my companion!
Device info changed with build.prop and XPrivacy/Lua. Magisk/Xposed in Systemless mode.
I am on my way to achieve finest and most stringent privacy settings possible on android for Google services (Package - Pico). OS is Lineage OS 14.1 - 7.1.2
I am looking to fine tune the privacy settings for Google right now. I have been able to get amazing control over it with the help of XPrivacy/Lua modules of Xposed, but here is the catch. I am not able to get Google Play Store to connect, which is obvious. So I want to know what are the bare minimum permission requirements for it to work while keeping privacy in check?
I have firewalled through AFWall+. Only have allowed Google Play Store and Play Services (Group of apps) to connect.
Steps taken:
Most rights are revoked with the help of Privacy Guard of OS.
System apps are also paralyzed with restrictions.
Most permissions are actually allowed in XPrivacy and Lua.
Critical permissions (Network/Serial/Tracking/Analytics/Location) are denied.
Frozen many Google Apps (and System) with Titanium Backup.
AFWall+ has allowed only limited apps: GApps/Download Manager
After all this, device is stable. No boot loop. No app crash.
Only root apps have true access here. No other app, be it system or user apps, have any easy access to device info.
I am fine tuning each permission as I go. But any input from you can help accelerate this process.
Will you be my north star?

Please explain . I am not able to get Google Play Store to connect what settings in Xprivacy lua did you try? +1

What exactly are you thinking of restricting?

Google Play Store stuck at "Checking info..." screen. I have allowed all permissions in XPrivacy except for Serial (Identification) and Network for all Google apps. Lua is restricting tracking and analytics. I have tried bypassing Lua but in vain.

That is true. But I have setup Lua and XPrivacy in a way that they compliment each other. Lua has many of XPrivacy settings left out. Again, you know me, not an expert. So I am going all in! So basically I have mixed them both. One setting that is missing from Lua is handled by XP and like wise. Also, here's are my paranoid serrings. Any apps first passes through Privacy Guard then XPrivacy Lua and then Xprivacy. Once all checked. Firewall is openend. Could you please provide a link to XDA?

Neither am an expert. But the expert (developer) says Since XPrivacyLua is in many aspects better than XPrivacy, running XPrivacy and XPrivacyLua side by side isn't supported and if you think otherwise, you have to help yourself :-) Here's the link. Sincere suggestion to you is to stick to what's been recommended especially when you don't know how it works

Honestly, why are using Google apps at all if you already use a Google-free ROM? I'd go with e.g. microG (for location services and GCM if needed), and with F-Droid for apps. If you really need apps from Playstore, use the Yalp Store or Aurora Store apps (available at F-Droid). Much better in terms of privacy – and working fine, I'm using that for years already.

Not sure what you are asking here. Do you need help with making Google Services work with the lowest possible permissions or just want to know what else you can do to protect yourself? Also: XPrivacyLua covers everything relevant for privacy, you won't need XPrivacy. If you're missing certain things, you can use a custom hook from the Pro Companion or ask someone to write one for you.

beeshyams - They might not be compatible. But since I don't have a Pro version of Lua, I am experimenting with both. And it works just fine. I am really careful with them not contradicting each other. Izzy - I know that I should completely remove them. But that's not what I want now right now. I rely on some apps (Office) that requrie Google present. Namnodorel - I want to have minimum permission for Google. Alongside want to have most stringent privacy so I don't leak device info. I will get into details of Pro.

hello to everyone inside this tread, i am working with my lenovo zuk z2 pro with aosp10 magisk xposed xprivacylua-pro and spending a lots of time in this problem. the last answer is a long time ago and i want to ask each of you for the actual valid (mai2020) solution. @izzy is your post still valid
"microG (for location services and GCM if needed), and with F-Droid for apps. If you really need apps from Playstore, use the Yalp Store or Aurora Store apps" best regards

@Carsten yes, and I'm still using it that way myself (minus the Play Store access/GCM, which I do not use). And I do not expect that to change within the next 2 years either, before you ask ;)


text:
Why is IVPN so slow?
I use IVPN on my laptop, over Wi-Fi, with two proxies, each with just under 30ms delay. Web pages load snappily, and online gaming shows no perceptible drag.
Using it on my Android ‘phone (which probably has more processing power than my laptop), with only one of those proxies, over a 4G data link, leads to web pages taking a few seconds to load.
(How) can I improve this, as I would like to use IVPN for all traffic? Are there any settings that you can recommend? Does anyone else experience this delay?

Your 4G provider connects slowly to the VPN, I guess?

Could be, I suppose. I can contact them & ask. If so, seek another provider. My home WiFI uses a different provider, so I can compare when I get home in 6 hours or so

"which probably has more processing power than my laptop" - Note that many VPN client's are single-threaded software. A 2x2.2GHz CPU makes a faster VPN client than a 8x1.4GHz CPU, as examples.

True; don't know why I wrote that, I doubt that it plays any great role


text:
Prevent bloatware which gets reinstalled from starting
I had a problem with this app (I found on a package with the same name on Google Play, but I doubt it's the same thing) which kept getting installed all by itself again and again, and once istalled, it would start using my limited 3G internet traffic. My phone is not rooted and installing apps from unknown sources is forbidden. A scan with Malwarebytes doesn't detect anything.
From this I deduced that the offending app is somehow bundled by the manufacturer, so I won't be able to get rid of it without rooting (which I don't plan to do). Since uninstalling it didn't help as the app would get reinstalled, I figured I strip it of all permissions and forbid it to use background data. So far this solves my immediate problem with 3G traffic consumption.
However, I see that the app still gets started, consuming RAM (second entry in the list on a freshly booted phone, right after "Android OS") and creating storage data and cache objects. Is there anything I can do to prevent the app from getting started?
Edit: I have tried adb shell pm uninstall --user 0 com.freshmenu which indeed removes the package, but it gets reinstalled after a while. I have tried to search for installer in adb shell pm list packages -i com.freshmenu, and it's indeed set to null, so I could not discover the offender responsible for reinstalling. I have run adb shell dumpsys package to discover which apps have REQUEST_INSTALL_PACKAGES permission. There are 4 of them, and they don't look suspicious:

com.whatsapp (installer=com.android.vending)
android (installer=null)
com.google.android.apps.docs (installer=com.android.vending)
com.android.chrome (installer=com.android.vending)

There are 5 more apps having INSTALL_PACKAGES permission:

com.android.vending (installer=com.android.vending)
android (installer=null)
com.mediatek.datatransfer (installer=null)
com.google.android.packageinstaller (installer=null)
com.android.managedprovisioning (installer=null)

Going to the app list from settings and force stop the app- see if it helps

Possible duplicate of Why are disabled apps still running?

@beeshyams Thanks, I'll check that solution (the non-root part of it) once I get to a computer with adb installed. Force stop doesn't seem to help.

@beeshyams the app is not disabled. It's rather along the lines of Unwanted apps auto installing without me doing anything. How to stop them? / How to Block Pre-Installed Auto App Installer Malware? / Random apps keep installing on the phone. I'd suspect some "bad app" with the REQUEST_INSTALL_PACKAGES permission behind the scenes.

@izzy Yes. You are right. Retracted close vote. OP has enough material to figure out now

Does adb shell pm uninstall --user 0 PACKAGE_NAME also not work?

pm hide is for Lollipop, the command mentioned above should work on Marshmallow and Nougat.

@Firelord you mean that could keep the app from re-installing as it might not figure it's "not there"? Worth a try. If it works, we should pin that somewhere to find (some tag wiki for example), as those "self-installing-app-issues" come in waves it seems.

@Firelord adb shell pm uninstall --user 0 com.freshmenu looked like it worked, but I recently got my bloatware back :( Apparently the process installing it is smart enough to check if the app cannot start and reinstall if needed.

You can remove that app again using pm and install a dummy app with same package name. If the malware is not smart enough, it wouldn't know what to do with the dummy app with same package name. Since your device is not rooted, you can try narrowing down your hunt to those system apps having the permission android.permission.INSTALL_PACKAGES.

@Firelord sorry to bother you again, but how would I install a dummy app with a given name? Do I have to install Android Studio for this?

It is fine. I'm not bothered and it is my fault I didn't tell how to make that dummy app easily. You can use Tasker's "App Factory app" with "Tasker" (see tutorial; very easy) to create an app which could do nothing in fact, and would have package name com.freshmenu but obviously different developer's signature. Make sure you install this dummy app only when Freshmenu app is completely removed. After installing this dummy, installing Freshmenu app would result in  https://i.stack.imgur.com/v8aMU.png

I tested this by creating a dummy app which shows a toast and asks for no permission. Here you can find it: http://s000.tinyupload.com/index.php?file_id=72926899043468431377 // Do note that if your malware installer is intelligent enough, it would first remove any app with that package name and then install real Freshmenu app, which I don't think I can control without root access. // As for the last edit you made, my take is com.mediatek.datatransfer is compromised and does that, or your system is exploited using a vulnerability

I would suggest you uninstall that mediatek app using pm command (this may result in boot loop though because I don't know how critical that app is for your Android to function, so please ensure backup is already made at least). Otherwise, I suggest you use a firewall to virtually limit all the apps which you mentioned in your last edit, just to see whether Freshmenu app still gets installed. If it does not, than the culprit is from the list in that edit. Otherwise, you have a real malware exploiting your system well enough.

@Firelord I've installed your test app an will report in a couple of weeks. Unfortunately, I can't do much with that mediatek app (btw, it's called "Backup & Restore" in the app list and looks pretty legit). I tried to limit its permission via the Android Settings. Again, thank you so much!

After a rather long exchange in the comments, it was discovered that installing a dummy package with the same name as the bloatware helps, by making the bloatware installation silently fail.
@Firelord was nice enough to make a dummy package for me, future readers could make their own packages with Tasker + Tasker App Factory plugin. Those who don't need Tasker and don't want to pay for it should be able to grab a 7-day free trial here.

I'm of the never unlock an Android Device page.
I use the Applications tab, go in and disable as much of the bloatware I can.  Clean/clear the cache.  That strips them down to least objectionable.  Some you can't disable, but you can reset to factory settings & uninstall all updates. It again saves some space.
I've had an 8gb phone, on Android 6.x.  It sucked big time, & I could barely get the most needed Google Apps installed & updated.  The HTC & US Cellular bloat-scheize was worthless!


text:
Android CPU usage: What do the red, green and purple bars and the numbers mean?
The Internet as a truckload of myths about this. Today, it is time to bust the myths.
When the CPU usage bars that can be enabled in the developer options are being displayed, there is a list of active processes and three numbers above.Upper right screen corner (also covered by bars):
14.41 / 20.85 / 40.19
And then, there are three bars for each list item:[Green bar (usually the longest)] [red bar] [purple]
What do these bars and numbers actually mean?
 I would appreciate an explaination.

Your question would be much nicer if you could make a screenshot and add it to your question.

From Android - Handset built in Developer Tools - “Show Cpu Usage” option meaning?
Leszek's answer

Numbers in the first row shows average CPU usage in time intervals 1 minute/5 minutes/15 minutes. Color bars shows how much time CPU spends in userspace(green), kernel(red), i/o(blue).

Also see the accepted answer for a developer explanation

I see. Why is there no real-time CPU indicator for the last second?

You asked for meaning - you got it with backing. As to why last second is not shown that is best answered by Google and in any case if you are serious about that you can ask a separate question

I asked a separate question.


text:
WIndows Antivirus reports Arp Cache Poisoning Attack by Android device
A Windows computer running ESET reports Arp Cache Poisoning Attack by the IP of my android phone.
It's Redmi Note 4,
MIUI 9 Global Stable,
Android 7.0.
I scanned it with Avast, Malwarebytes, MIUI Security App, Google Play Protect. I didn't find any virus.
I scanned the ports with nmap. Nothing suspicious.
My question is what can cause it?