text:
How to format SD card that has been formatted as internal storage for Android?
I have tried clean all command in Diskpart and it took an hour to be completed but at the end nothing has changed. I think the SD card is locked and when I try to format or re-partition the disk, either it will show a successful result or it will return "Windows was unable to complete the format" error. I have tried to format it in Linux (this answer) and Android as well but no luck. Is there a way to reuse my SD card as a portable storage?
UPDATE: GParted details when I delete the partition
GParted 0.30.0 --enable-libparted-dmraid --enable-online-resize

Libparted 3.2

Delete /dev/mmcblk0p2 (unknown, 59.46 GiB) from /dev/mmcblk0  00:00:08    ( SUCCESS )

calibrate /dev/mmcblk0p2  00:00:00    ( SUCCESS )

path: /dev/mmcblk0p2 (partition)
start: 34816
end: 124735454
size: 124700639 (59.46 GiB)
delete partition  00:00:08    ( SUCCESS )
libparted messages    ( INFO )

Input/output error during write on /dev/mmcblk0
========================================

Delete /dev/mmcblk0p1 (unknown, 16.00 MiB) from /dev/mmcblk0  00:00:01    ( SUCCESS )

calibrate /dev/mmcblk0p1  00:00:00    ( SUCCESS )

path: /dev/mmcblk0p1 (partition)
start: 2048
end: 34815
size: 32768 (16.00 MiB)
delete partition  00:00:01    ( SUCCESS )
========================================

GParted details when I try to format:
GParted 0.30.0 --enable-libparted-dmraid --enable-online-resize

Libparted 3.2

Format /dev/mmcblk0p1 as fat16  00:00:01    ( ERROR )

calibrate /dev/mmcblk0p1  00:00:00    ( SUCCESS )

path: /dev/mmcblk0p1 (partition)
start: 2048
end: 34815
size: 32768 (16.00 MiB)
clear old file system signatures in /dev/mmcblk0p1  00:00:00    ( SUCCESS )

write 512.00 KiB of zeros at byte offset 0  00:00:00    ( SUCCESS )
write 512.00 KiB of zeros at byte offset 16252928  00:00:00    ( SUCCESS )
write 4.00 KiB of zeros at byte offset 16711680  00:00:00    ( SUCCESS )
write 8.00 KiB of zeros at byte offset 16769024  00:00:00    ( SUCCESS )
flush operating system cache of /dev/mmcblk0  00:00:00    ( SUCCESS )
set partition type on /dev/mmcblk0p1  00:00:01    ( SUCCESS )

new partition type: fat16
create new fat16 file system  00:00:00    ( ERROR )

mkfs.fat -F16 -v -I '/dev/mmcblk0p1'    ( EXECUTING )

Failed to execute child process “mkfs.fat” (Input/output error)    ( ERROR )
========================================

Format /dev/mmcblk0p2 as fat32

Results for zeroing:
sudo dd if=/dev/zero of=/dev/mmcblk0 bs=8192

dd: error writing `dev/mmcblk0`: No space left on device

7795969+0 records in
7795968+0 records out
63864569856 bytes (64 GB, 59 CAB) copied, 3824.26 s, 16.7 MB/s

Results for amd64-stdtool status:
[+] Found RCA for /dev/mmcblk0: E624.
[+] Card CSD: 400E005A7B590001DED48F700R808006.
[+] Write protection state: Off.

You forgot to describe the actual problem, only that nothing has changed. Usually if you repartition and reformat the card you can simply use it.

Maybe SDCard is corrupt

@KirandeepMaan It's not corrupted. Android locks SD cards when they are formatted as internal storage.

Oh i get it, as i said if window say unable to format then there are two possibilities one is corrupt and other as you mention  locked which doesn't give permission to access its format operation and as alecxs said send some screenshots for reference to solve your matter.

windows does not allow multiple partitions on sdcard. use linux gparted (again, as you stated you already tried)

16.00 MiB is a bit small for partition, you should create new partition table and format fat32. the Input/output error may indicate physical dead (wear-out) but can also caused by linux incompatible card reader or wrong drivers

@alecxs I have not created the 16MB partition and it cannot be changed. it's ridiculous that Android is doing this to SD cards without providing any solution to recovering the SD Card. I tried this on a second SD card and the same problem occurred. So this case is not a hardware problem.

you can not delete/create partition table?

No, even after deleting the partitions the same partitions will appear again.

try sm set-force-adoptable false sm list-disks sm partition disk:123,45 public sm list-volumes all from adb shell

just linked for reference more or less relevant
problems 1, 2, 3
partitioning 4, 5, 6

@alecxs Your information is outdated. Windows 10 supports multiple partitions on SD-cards and USB sticks since AFAIK Win 10 1903.

This was possible even before Win10 with a little hack: http://www.etcwiki.org/wiki/Cfadisk_usb_driver

I think the problem is write protection.
I am currently experiencing this problem..
I initially used the sdcard as internal storage so I believe Android will put write protection in the sdcard.
To me the solution is to use Android command line or shell and run Linux command on the sdcard and remove the write protection knowing fully well that only device that encrypte the sdcard can decrypt it.

You may go to Settings > Storage. Then go to the more button at the top right corner. There should be an option "Format as portable". Would that work?

Thx for your answer. however, the question is about I/O errors on (new) MicroSD cards (even after zero-ing whole mmcblk0)

@alecxs most probably the card is dead. You can try using mmc-utils to get low level details e.g. Life Time Estimation and pre-EOL information. But mostly SD cards and USB thumb drives have dumb FTLs. Also many IOCTLs and CMDs don't pass through USB interface and card readers. So the symptoms determine that the card is dead.

@IrfanLatif it's not my question, but he tried this on a second SD card and the same problem occurred. there are similar unanswered questions - it sounds naiv/stupid but maybe it's true that android lock sd cards in some however way? on the other hand i aggree the best way is to get low level details and base answer on solid facts instead of speculation

i feel remembered the first day i ever heard about selinux


text:
Do any open source Android ROMs work on smart clocks?
Has LineageOS or any other open source Android ROM moved into the Smart Clock (bedside alarm clock space)?
It seems some of these run Android Things:

The touchscreen isn't as robust as Google's other smart displays, but it uses the same Android Things software which is a trimmed-down version of Google's mobile operating system meant for smart home gadgets.

It looks as though the Lenovo Smart Clock open source software is here.  Looking quickly it appears to be the kernel only.
The device's SoC appears to from MediaTek, codename mt8167s  possibly the same device powering the Lenovo Smart Display.  (The kernel config file is called mt8167s_ref_debug_defconfig).  I don't see any device repositories on github for this, but interestingly, there is a file for Google's Fuchsia OS Zircon microkernel for this board.
Somoene appears to have put the source on github here.  He (I assume "he"- the name is "deadman96385") has a TWRP recovery repo here for the smart clock (which may actually be named iot_mt8167s_som ??) which might be a good starting point for doing a full android port.
Also, looks like he dumped the rom here.

source: Stack Exchange

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

sort: votes


text:
Periodic filesystem consistency checks are probably a good idea. Do current Android devices ever do them?
Let me start out by giving you some general background information. My actual question is at the very bottom of this post.

Background, part 1: Journal replays vs. consistency checks.
Please assume that your Android device uses the ext4 filesystem for its internal storage, and the FAT32 filesystem for its removable MicroSD storage (if present).
On ext4, a "journal replay" is a partial filesystem check-and-repair operation which normally takes no more than few seconds. (Source.) The Android kernel does a journal replay whenever necessary. (Based on this source and this source.)
On ext4, a full filesystem consistency check takes longer. For an average Android device, it takes 12 seconds or so. (Based on this source.)
FAT32 is a non-journaling filesystem. So there are no journal replays. There are only consistency checks.

Background, part 2: It's probably a good idea for your OS to do periodic consistency checks. Here's why.
Microsoft program manager Kiran Bangalore writes that there are certain cases in which a filesystem can become corrupted. On a journaling filesystem such as ext4, such cases are exceedingly rare. On removable MicroSD cards, I suspect that such cases are not so rare.
The usual way to check for such corruption is to configure your OS to run a consistency-check tool every so often. Such tools include chkdsk, ScanDisk, Apple Disk Utility, fsck, and others.
Even on ext4 storage built into an Android device, periodic consistency checks are probably a good idea. The tune2fs manual page explains why:

Bad disk drives, cables, memory, and kernel bugs could all corrupt a filesystem without marking the filesystem dirty or in error. If you are using journaling on your filesystem, your filesystem will never be marked dirty, so it will not normally be checked. A filesystem error detected by the kernel [may] still force a [consistency check] on the next reboot, but it may already be too late to prevent data loss at that point.

(Note that, on Android, I think a filesystem error detected by the kernel will not lead to a consistency check on the next reboot. Android is strange that way.)

Background, part 3: Here's what other OSes do.
Windows
Windows Vista, and all later versions of Windows, include an NTFS self-healing feature. Kiran Bangalore therefore writes that, nowadays, Windows users no longer need to run periodic consistency checks anymore. He explains that the OS "will inform you when ... corruption is found".
Windows 10 Mobile
Windows 10 Mobile is probably the third-most-popular smartphone OS. I think it uses NTFS. So perhaps it also can do NTFS self-healing.
OS X
Mac OS X runs fsck_hfs -p during every boot. I don't know what this does. See the manual page.
Linux
It's true that some ext4 developers say that periodic ext4 consistency checks aren't particularly useful. But other ext4 developers say that these checks improve safety and reliability.
In practice, when a filesystem is marked in error, Linux runs a consistency check at the next reboot. At other times, modern Linux distributions don't do automatic periodic consistency checks, ever. Those who want them must schedule these checks themselves.
Android
Stock Android includes an ext4 consistency-check tool. As well, it includes a consistency-check tool which works on removable MicroSD cards of 32 GB or less (but may corrupt larger cards). Finally, your device may or may not also include fsck.exfat or exfatfsck, for running consistency checks on removable MicroSD cards of 64 GB or more.
But does the OS ever run any of these tools automatically?
iOS
The iOS filesystem is normally either HFSX or APFS, and fsck is included with the OS. I don't know whether or not iOS ever runs automatic consistency checks.

Here's my question.
Please consider the stock ROMs shipped with current Android devices.
Do such stock ROMs ever periodically run consistency checks, either on the internal storage device or (if applicable) on the removable MicroSD card?
(P.S. In cases where a device shuts down gracefully and has enough battery charge left, it's possible to run a consistency check at shutdown instead of at startup. But it takes some engineering effort to implement such functionality, and so operating system developers normally don't bother. I wonder what Android does.)
(P.P.S. I also wonder whether or not there exist any smartphones, running any OS, which do any routine periodic consistency checking. Again, please post comments below.)

Not-yet-released Android versions
There have been some recent improvements made to the Android source code.
The next maintenance release of stock Android will be either 7.2 or 8.0. In some future version of stock Android — either that maintenance release or a later release — Android will run the fsck -f -y command during every normal shutdown. This command forces a consistency check on the internal storage, no matter what. (Based on this source and this source.)
Hurrah! Considering that so few Android users ever do complete backups (e.g. Nandroid backups), I think that this may be a useful enhancement.
Unfortunately, I still don't know of any evidence that Android ever checks any removable MicroSD card.
The above answer is about stock Android. Still, I thank the CyanogenMod team and the LineageOS team for indirectly helping me to discover the above information.
Running checks yourself
The above paragraphs refer to versions of Android which haven't been released yet.
If you're running an earlier version of Android, you can run an internal-filesystem consistency check manually yourself if you so desire. You must unmount the filesystem first, so you must be in recovery mode. See here.
Checking your MicroSD card
If you have a removable MicroSD card, you should definitely check it on certain occasions, and also periodically. If you'd like more information, please see:

"When should I run a consistency check on my removable MicroSD card?"
"How can I run a consistency check on my removable MicroSD card?"

Hmm, what kind of influence will this have on shutdown/reboot speed?

Reboots won't trigger any consistency check. Shutdowns will take perhaps 12 seconds longer. Overall reliability may be improved.

Good to know, though as someone who flashes (and therefore does nandroid) on a monthly basis, I'm not quite the target of this change...

Agreed. Yeah, backups are important. To quote Tetsujin: "Any data stored in less than three distinct locations ought to be considered temporary. The more important the data, the more important the multiplicity of backups."

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

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


text:
SMS messages notification on my desktop computer?
Is there any way (application or other) to have PC receive notifications about text messages on Android phone (ability to reply is also welcome)? I don't want to have my messages uploaded to the cloud due to the privacy concerns, so it is preferable to have messages sharing only when using the same wifi network.
I tried using AirDroid and PulseSMS - however both are cloud-based as far as I can tell. I also tried Samsung Flow but did not like it very much (it uses bluetooth instead of wifi for communication).
Please note that this question differs from this one, as I do not want to have my messages cloud-synced.
EDIT: Forgot to add, I have Samsung Galaxy S8 as a phone and use Windows 10 on desktop. Cortana is unavailable in my language.

Push bullet is highly spoken of. As per this reddit or doesn't use cloud https://www.reddit.com/r/PushBullet/comments/18shwq/how_does_pushbullet_work_encryption_lanonly/

Haven't used the app yet. See app blog https://blog.pushbullet.com/2015/08/11/end-to-end-encryption/

@beeshyams Thanks! Encryption looks promising and I will give the app a go if no alternative is available: I would still prefer a solution that does not use any intermediary server though.

There seems to be alternative http://www.backuptrans.com/tutorial/connect-android-to-pc-via-wifi-for-messages-transfer.html

After extensive research I found two programs that seem to offer the desired functionality, that is Samsung SideSync and MyPhoneExplorer. For the time being I have decided to settle down on using the former, as the latter seems to suffer from stability problems (crashes, freezes).
Update: I use Your Phone now.

I'm not sure about windows based alternatives, but KDEConnect works locally. You need to be on the same WiFi connection to make it work. Alternatively you can take a look at this app and some suggestions in this thread

Doesn't KDEConnect requires KDE framework installed available for *nix type systems? Does it work on Windows too?

@Firelord Not the entire DE, just a few dependencies of KDE are required. works fine for me on Ubuntu Gnome. No, it doesn't work on Windows.

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


text:
Failure during official firmware update - phone powered off and won't boot
Phone: Asus Zenfone 2 ZE551ML
Long story short: I tried to install official firmware upgrade using TWRP > Install > .zip. The installation was going on for a couple of minutes and then the screen blacked out. Since then, the phone does not boot.

So, I got bored of my Android 5 and decided to install a custom ROM, but I had to upgrade official firmware before that.
At first, I dove into how to install custom ROM tutorials, so I did the rooting first:
I downloaded a BootLoaderUnlocker program from the official Asus website and unlocked the BL. Then, I followed a tutorial for one-click-root, and succeded. Then I installed TWRP and flashed the Recovery to the latest available img for my phone and tried to install the Lineage OS 14.1 but got status 7 error, meaning something is incompatible.
This post states, that in order to install Lineage OS 14.1 I have to have a firmware at least MM 4.21.40.xx which is Android 6, so I went to the official Asus website and downloaded the Firmware upgrade. Since, I probably had the wrong BL at that point, I flashed the bootloader with TWRP for Z00A (Lollipop)    2.8.7.3 from here, which is the same website from which the post suggest to download a BL for MM (Android 6). I thought, since I currently have the Lolipop, should install the BL for that, just to be sure. Then I started the firmware upgrade, which rebooted the phone into the BL, I didn't think, and just pressed Normal Boot and the phone booted as usual in the old Android. Then I tried to initiate the instalation again but couldn't (it's supposed to auto-detect the file in the storage root), so I got an idea to just boot the Recovery, maybe it will continue. So, I did that, and the TWRP showed up (I forgot about it already and thought that the instalation would just continue), so I just pressed Install and chose the firmware upgrade zip manualy. The installation was going on for a couple of minutes and then the screen blacked out.
Since then, the phone does not boot. If I try to, it vibrates like it is going to boot, but then nothing happens (not even a logo).
I even tried to disconnect the battery: removed all the screws, removed the back panel and manually disconnected it. When I put it back the phone vibrated like it was going to boot, but nothing happened again.
P.S. I tried to boot into the Recovery, but that just does not work, and even did not work before the firmware upgrade (I googled, that I must press power and volume up and hold until the logo appears, but that doesn't happen).
upd: plugged into the charger, periodically shows the battery icon on the screen.

Plug the device into a computer and see if it is recognized

@EthanZ I used Soc USB driver: it is recognized for a second then it disappears. I think every time I try to boot, it vibrates and shuts down immediately.

I think you're out of luck then. It's probably hard bricked.

@EthanZ do you mean the hardware could be damaged during the installation?

typo at first i just fixed. Hard bricked, or only fixable by the manufacturer

@EthanZ I went to a service and the dude said I might have screwed up the preLoader, so some might say it's a disastah

So, I went to a service and turns out I messed up the PreLoader, that boots the BootLoader. Sometimes this cannot be restored and costs a bunch of money to replace the memory block, but I got lucky and got the phone repaired.
P.S. Do not install official firmware with programs like TWRP, use only your manufacturer's software like, in my case, Asus flash-tool


text:
How to make Android device visible to Bonjour / Zeroconf with .local name?
I would like to access my device as myandroidthing.local, as I can do it with my (both Linux and Windows) laptops. Is it somehow possible?
Most ideally, it could be done by some app what I can install from an app store.
Responses to the answer:

Android.local works. But it finds only one of my Android devices. Is there a way to replace the Android mdsnd with a better configurable one which allows changing the name it advertises?
Does running a patched mdnsd require a rooted device?

Related: Why is "mdnsd" draining my battery and how to stop it?

@IrfanLatif Thanks, it helped a lot. I see a lot of apps to scan for mdns / dns-sd, but none which could make my phone visible. That I find quite surprising - if it can send udp packets to 224.0.0.251:5353, why it can't respond to others?

I haven't used MDNS much except for learning, so can't recommend an app. But as far the Android's official API is documented, it's very simple to broadcast your service as well as to discover other services. There are also third part libraries available like jmdns. This sample app demonstrates the possibilities in very detail.

@IrfanLatif That is dns-sd (service discovery). This question is about mdns (multicast dns). But the first probably includes the last. If it is correct, then any app which can advertise itself on dns-sd, will be also make my phone referable as myandroidthing.local .

My answer to Why is "mdnsd" draining my battery and how to stop it? explains the role of Android's mDNS Daemon which is an init service, started on demand. It provides Multicast DNS (host/domain name resolution) and DNS-SD (DNS-Based Service Discovery); both part of Zero Configuration Networking.
How to resolve Android's mDNS hostname to IP address?
Technically it's possible for DNS-SD to use the old unicast DNS to resolve the domain name found in the SRV record (of a broadcasted service) to an IP address. But mostly mDNS and DNS-SD are bound to each other. And this is the case with Android.
Android doesn't expose any setting or API to do only the name resolution (as mDNS Responder or Querier) and not the service discovery. Neither the name resolution mechanism uses mDNS. Android's mdnsd serves as mDNS broadcaster / responder only to DNS-SD service. You cannot use either of the both independently (as to my knowledge).
But there are a few options:

Run an app on your Android device with a discoverable service (even a dummy), which uses Android's official API (which in turn interacts with mdnsd underneath) to broadcast and discover services. So any other host on the local network with mDNS/DNS-SD capability can discover the service. For instance use avahi-browse command on a Linux system. Resolving the service provides the IP address of the Android device.

When mdnsd is running, Android device is already broadcasting itself with a hard-coded name: Android.local. If you don't want to broadcast a service, there's another option.
ADB relies on mDNS to discover devices on local network by registering a service of type _adb._tcp (see references here, here and here). So enable "USB Debugging" in Developer Options and you'll see mdnsd running on your device.
Or on a rooted device start mdnsd alone, without starting ADB, by executing setprop ctl.start mdnsd or simply start mdnsd.

In both above cases, when mdnsd is running, executing avahi-resolve-host-name Android.local on a Linux PC should return IP address of your Android device.
What if two Android devices have the same hostname?
In case of name conflict, as the name Android.local is hard-coded, the Android device which joins later automatically renames itself to Android-2.lcoal, Android-3.local and so on (see reference here). So you can resolve the names accordingly.
Any option to change the mDNS hostname?
Coming to the next problem, what if your OEM/ROM developer removed or modified the mdnsd service, or if you want to run with a name of your choice, not the hard-coded one?

Build and run your own more configurable mDNS responder like Avahi on Android device.

Even simpler, patch and rebuild Android's mdnsd to receive a commandline argument for name, or read from a config file if exists.
No, it doesn't need a rooted device. The patched mdnsd binary should run fine from adb shell, or even on a terminal emulator app like Termux. As of this writing, there's only one syscall in mdnsd source code which the seccomp blocks for apps. But it can be removed easily. Neither the DAC or MAC block the execution.

Hehh, very funny! Android.local works. Problem is, it finds only one of my androids... somehow I need to change the name it advertises.

Thanks! Unfortunately, the source clearly shows that there is no way to change it. Next question, is there a way to replace the android mdsnd with a better configurable one.

The simplest way is to patch and rebuild Android's mdnsd to receive a commandline argument for name, or read from a config file if exists.

That requires root and rooting a phone means that I risk bricking it. Furthermore, there is really free (as in freedom) android image only for a few phones. Sad, but I still can not have a rooted phone on this reason. Furthermore, I can not root the phones what are not mine, but I can talk to their owner to install X app.

Ok, so the mdns name is hardcoded to android.local. What is with the services? I think, I can install any app creating a service, and then use the service name to localize the ip.

Hopefully, someone benefits from this and doesn't go through everything I needed to do: How to compile Android's mdnsresponder

For reference: Starting from November 2021, Android resolver supports mDNS .local resolution.

I could not make anything work: mdnsd, avahi etc. It works between my Ubuntu PCs but for Android I could not easily make it work.
So then my solution was to just set a static IP for the device in my wifi: Wifi settings -> select the wifi -> edit -> set ip address and gateway as needed by your router (you can look at IP of existing devices to figure out the IP you need, and replace the last number with 1 to usually get your routers IP), and set the 2 DNS addresses e.g. to opendns 208.67.222.222 and 208.67.220.220
Now I just access this same IP and stop worrying about broadcasting a domain locally.

If you happen to already have an app handy to which you want to add this feature of advertising a custom device name, adding JmDNS as a dependency works quite nicely in order to configure a custom .local name:
package org.example.util;

import android.util.Log;

import androidx.annotation.Nullable;

import java.io.IOException;
import java.net.InetAddress;
import java.util.Objects;

import javax.jmdns.JmDNS;

/**
 * Advertises a custom .local hostname via mDNS
 */
public class HostnameBroadcaster {
    private static final String LOGTAG = "mDNS";

    private static JmDNS sJmDNS;
    private static String sHostname;

    private HostnameBroadcaster() {}

    /**
     * Set the hostname to be advertised via mDNS.
     *

     * Note: JmDNS does some network accesses on the calling thread on startup, so don't call this
     * method on the UI thread.
     *
     * @param addr The IP address to bind to. If null, JmDNS's auto-binding will be
     *             used.
     * @param hostname The hostname to advertise via mDNS. If null, the broadcaster is
     *                 shut down.
     */
    public static void setHostname(@Nullable InetAddress addr, @Nullable String hostname) {
        if (Objects.equals(sHostname, hostname)) {
            return;
        }

        if (sJmDNS != null) {
            try {
                sJmDNS.close();
            } catch (IOException e) {
                Log.d(LOGTAG, "Error stopping mDNS hostname broadcaster", e);
            }
            sJmDNS = null;
        }

        if (hostname != null) {
            try {
                sJmDNS = JmDNS.create(addr, hostname);
            } catch (IOException e) {
                Log.d(LOGTAG, "Error starting mDNS hostname broadcaster", e);
            }
        }

        sHostname = hostname;
    }
}

Hi, we appreciate your contribution, but considering Android Enthusiasts focuses on Android end-users (who are not necessarily app developers), I'm afraid this answer cannot be applied to the majority of end-users and out-of-scope on this site. If the wording can be revised for end-users, then consider [edit]ing it. Thanks.


text:
How to get contact from stolen Android phone?
I already read Recover contacts and images from stolen phone. And that answer did not work for me. I have explained it on the question.
My android phone was stolen. I need to get all contact of my phone. I had enable sync in that phone.
When I visit https://contacts.google.com/, it has only a very few contacts (only if contact has an email ). How can I get all contacts?

Voting to close cross-post as it now is effectively a double-post after migration.


text:
How to get contact from stolen Android phone?
I already read Recover contacts and images from stolen phone. And that answer did not work for me. I have explained it on the question.
My android phone was stolen. I need to get all contact of my phone. I had enable sync in that phone.
When I visit https://contacts.google.com/, it has only a very few contacts (seems like below 10% and all them has an email too). How can I get all contacts?

If you are seeing only few contacts its mean Mobile contacts were not fully sync with Google account.
Possibilities :

if he/she hard reset your phone already , there is no chance for
recovering   or retrieving contacts.
if he/she is near any known WiFi network for phone , Phone will get
connected with WiFi automatically and will get sync if sync is
enabled in phone.
Report police and try to get phone back and sync it manually with
google cloud and make sure all contacts available in cloud.


text:
Locked phone connected to the net with blocked SIM
I got my phone stollen today. I contacted my phone company and blocked the SIM card. I tested it by trying to call the phone and was denied.
However, using Whatsapp and K9 (with gmail), I could see that the phone was connected to the net a few hours later. Should I assume that the robber somehow managed to get passed the locking pattern? Or are there any other way to do it?
Note, the phone was only connecting to known WiFi, and not to open one.

Edit: Whatsapp, use tickles to indicate when a message was received. And K9 is a mail client. I could see on my gmail account, that the last IMAP sync (probably automatic) was made hours after the phone was stollen. The combination of those means that somehow the phone was on-line.
I used my phone with my home WLAN. And a few others. But the phone was not actively looking for WiFi to connect to. So it should not automatically connect to an open WiFi.

blocked the SIM card You may also inform the IMEI number(s) of the device to the network company so that the robber cannot use any other SIM in it. // I could see that the phone was connected to the net a few hours later. Can you please how you saw that by editing your question? What is K9? // Note, the phone was only connecting to known WiFi You mean, your phone connected to your own/any other saved WiFi network after being stolen?

There is another possibility like they changed and used their own SIM card with mobile data (which is unlikely, but still possible).

@GokulNC, I edited in some details. I hope that covers your questions?

@AndrewT., yeah, that would probably work... I have no idea about the profesionalism of the robber, so no option could be discarded...


text:
How can I bookmark a local file on Android Chrome browser?
I have a HTML file stored on the memory card of my Android phone. I can open it in my browser (Chrome) but cannot bookmark it -- the URL is content://com.google.android.blah.blah... (I was expecting file://...) and appears to expire after some time.
Howe can I get a permanent bookmark to a local file?

Which version of Android are you using? Have you tried to input the location manually as file:///storage/emulated/0/...?

@l3l_aze file:// protocol only works for certain directories on Android 10+, see Local files revisited: Opening local HTML files (file:///path/to/file) in Chrome on Android 10.x

A bit strange the URL starts with content://. That means it's accessing a content provider. Is that from an app?

I had the same problem after upgrading to Android 10. I used to be able to set a bookmark in FireFox even after upgrade. That stopped working as well.
The only solution I have found is to use a HTML Reader. Here is a link to one I have found to work well. https://play.google.com/store/apps/details?id=in.vineetsirohi.htmlreader


text:
How does Android Chrome manage to leak a Gmail.com log-in to the Gmail app?
Using Android 12 and Chrome, when I logged in to gmail.com, I got a new email notification from a Gmail app installed on the same device but never accessed by me.
How did supposedly secure Chrome leak my login to this Gmail app?
(And I can't remove the emails captured by the Gmail app from it. Despite removing the Google account from the device and disabling the Gmail app, when enabled it still shows my emails.)
UPDATE: This report is incomplete, omitting to mention that immediately prior, I'd logged-in to the Google Play Store app (to get Chrome). See my own answer below.

Are you logged into Google Play Store app or any other Google app on that device?

OP's follow-up question: How can I remove my emails from the Gmail app?

Asker here. Answer: It did not.
Further testing showed the culprit was not Chrome but Google Play Store (initially omitted from the report), and no log-ins to Gmail on Chrome are showing this leak.


text:
How to tell Android Auto not to use several rows of pixels at the bottom of the screen (physical frame/bezel is smaller than the screen behind it)
I got an after-market Android Auto infotainment. The issue is its physical frame covers several rows of pixels at the bottom of the screen.
Is there a way I can override the device screen dimensions in some config file somewhere so the system does not know about the 10-20 rows of pixels at the bottom? (So I don't have to cut the plastic bezel, which will surely turn out horrible.)
"Hey Android, I know you think the screen size is 2000x1000, but it is actually only 2000x990."

likely solution: https://forum.xda-developers.com/t/android-resize-resolution-calibrate-screen-height-position.2728354/#post-83476275

duplicate of: https://android.stackexchange.com/q/115484/176353


text:
How to see only new apps (not updates, or shows apps) in F-Droid "Latest" view?
I'd like to receive or browse new apps in F-Droid's app store.
Currently, it shows both new & updates.
Furthermore, I'd love to filter out apps by category, or by keywords, in F-Droid's "Latest" view or in "Categories".

is there a way to acheive it with current tools
is there an index I can download and grep / sort / query myself, either programmatically or via script?


text:
How to Block an IP Address on Android
There's an IP address keeping ICMP my network every minute.
I've already blocked the IP on my router, I'd like to know how to configure traffic control on Android if possible.
Please tell me if there's a way or app to control access from/to a specific IP address.

The incoming ICMP is IPv4 or IPv6? If it is V4 then it can not pass your router anyway.

@Robert it's V4, my network is under the CGNAT of ISP. It seems  my WIFI connections has got SynDrop DoS attacked, which I'm not pretty sure though.


text:
How can I configure Do Not Disturb so calls don't interrupt a Teams meeting?
When I'm connected to a Bluetooth headset, it seems Do Not Disturb is meaningless. I turn it on (sometimes allowing Starred Contacts to interrupt, sometimes none) and put on my earbuds to work, alternating between listening to media and joining Teams meetings. Unknown callers, suspected spam and even my ex-wife ring right thru and interrupt the audio of my meetings. Even if I decline the call, it takes several seconds more meeting audio to return to my headset.
Please help. If I'm giving a presentation and it's interrupted one more time by the phone ringing from someone I wouldn't answer even without DnD active I might do something drastic, like buying an iPhone.
By the way, I still love my Pixel 2, but I'll upgrade if that will fix this travesty.

It just happened when I wasn't even on a teams call. I'm on DND, no exceptions. I was about to start at some tunes when a suspected spam caller shows up on my screen. No audible ringtone, but the earbuds still came to life with an audible white noise. I'm gonna lose it.

On "Do Not Disturb" settings, there's also an option to "Allow repeat callers". Is this checked?


text:
Enable YouTube mobile live streaming
I have a YouTube channel: https://www.youtube.com/c/stfrancisschoolbatalaofficial. It has been marked "for kids". I am unable to stream live from my mobile even though I have more than 1K subscribers and there have been no strikes against the channel. There are no problems streaming to the same channel from the PC or from a different app. The YouTube android mobile app shows

"Your channel does not meet our updated eligibility requirements for
mobile streaming..."

How do I fix this?

Hi, I'm not really sure if we can't help other than suggesting the official YouTube Help. Have you checked the currently active account/channel on the YouTube app and make sure it's the one you want to live stream?

@AndrewT., yup, I have selected the current account.


text:
How to turn off ChromeVariations on Android?
To turn off ChromeVariations on Linux, one simply needs to create an /etc/opt/chrome/policies/managed/*.json file containing {"ChromeVariations": 1}. But what about on Android? See Extend (a way to turn off) ChromeVariations to Android.
One needs to be root on Linux to install Chrome, so editing /etc is no problem.
But on Android, one does not need to be root to install Chrome, so one does not wish to, yes, become a Super User and "root" one's phone (voiding warranty) to test if putting the same file in /etc on Android will work.
(Why would anybody want to turn off ChromeVariations? Well, just like when we disable Chrome Extensions to make sure it is not one of them causing a bug, we sometime wish to do the same with ChromeVariations. That way we can be sure, why Bill, with the same Chrome version, doesn't get the same results as Mary.)


text:
Values of successive wait durations for unsuccessful Android pattern tries
On my smartphone running Android 9, the pattern lock seems to work the following way:

The user is allowed 5 attempts to draw a pattern.

If all patterns in (1) above are incorrect, the user has to wait time t1 before they are allowed to make other 5 attempts.

After time t1, if all the next 3 attempts are incorrect, the user has to wait time t2 before they are allowed to make other 5 attempts.

After time t2, if all the next 3 attempts are incorrect, the user has to wait time t3 before they are allowed to make other 5 attempts.

And so on...

From my experiments, I know for a fact that the values of t1, t2, and t3 are 1 minute, 10 minutes, and 30 minutes respectively. My question is, is there a manual that lists the other next values for t4, t5, t6, ..., tn? Or, perhaps, is there a way to calculate them?

there is a formula on gist.github.com

@alecxs, If I'm interpreting the formula correctly, after 20 incorrect patterns, the user will need to wait for 30 seconds, correct? But on my device, when I test this, I'm notified that I need to wait an hour. What's more, for another device running Android 4.4.2, the wait duration is fixed at 30 seconds, regardless of the count of incorrect patterns entered (I can provide screenshot evidence if you so require it). What gives? Is the wait period manufacturer-defined or Android-defined?

android 7+ gatekeeper, wait for 30 sec after 5, 10 attempts. increase timeout after 30+ attempts up to 1 day after 140+ attempts. formula = 30 * (2^((x - 30)/10)) seconds


text:
How to transfer Apps using Samsung Switch?
I am trying to use Samsung's "Smart  Switch" to transfer apps from an old phone to a new phone (both Samsung S9's, both running Android v10). I followed the directions carefully but not all apps are installed on the new phone. In particular, apps I downloaded from the PlayStore were installed Ok, but none of my in-house-developed apps are installed. Is this expected behavior?
Notes:

All apps were successfully transferred (I see them when I tap "Apps") but they weren't installed. Am I out-of-luck?
I can manually install my apps using Android Developer Studio, but I have a lot of them and that would be a real pain.
I tried a "chatting" with Samsung tech support but they were clueless.
Interestingly, when I tried this a few days ago, I got messages saying that the apps were designed for an older version of Android and asked "Install Anyway?".  I always clicked YES but  they still were not installed. I no longer am asked this.

The Google device migration tool works the same way, apps from Play Store are re-downloaded, the rest ignored. Installing multiple apps is pretty easy if you have the APK files, just install them on comand-line via adb install <app.apk>. Even installing multiple APKs in one command is possible.

If I understand you correctly, I CANNOT migrate non-Playstore apps using SmartSwitch (?).  I did try the "adb install" method and that DID work well.


text:
Android and/or Whatsapp degrading photos
My friend asked me about a problem on her Android phone with Whatsapp.
Phone is Huawei, Y330-U01; Android 4.2.2.
No apps related to Cloud (see comments below) except latest versions of Google Drive and Huawei backup.
People send her pictures and they look fine the first time, but if she tries to open them the second time, they are "blurred" (her words).  She showed me one, and what is happening is that they have been degraded to something like twenty or thirty pixels wide!  Like TV stations do when nudity is on the screen--only far worse, like a whole person three blocks wide!
And videos that play the first time only, the second time cannot play at all.
I suspected some function was degrading them to save storage space, but the internal storage has almost a gigabyte available, and there is an SD card with almost four GB.
She had a lot of updates pending, but neither Whatsapp nor the O.S. were on the list.
What might be the cause and how to fix?

Device name and model? I'm asking this because there are some devices like Nextbit Robin that backs up photos to cloud and deletes them from the device automatically. Or is there any such cloud app installed?

Don't know model; four-year-old Huawei.  Don't know about cloud.  I will ask if I see her again.

Or do you think this maybe the reason? https://lifehacker.com/google-photos-can-now-free-up-space-on-your-phone-1743304827

No, they are not being deleted nor “degraded to high quality.”  They are being degraded to such a low quality that they can’t be recognized.  Also, the article says “will let you.’  Nothing is “letting‘ her do it, it is doing it without asking her.


text:
How to use "USB Mass Storage Mode" on Android 4.3+
Followup on How has USB File Transfer changed in Android changed over the years?
I've learned that Android 4.3 and later versions don't have this feature because Micro$oft.
Newer options, Media device (MTP) or Camera (PTP) mode, are horrendous.
It also causes other issues for (Windows) programs that relied on android having USB Mass Storage Mode.

Off hand reasons why MTP is awful.

Can't copy more than one thing at a time. (Device is busy warning)
Warnings that I need to convert files before copying every single time.
Just seems to be a lot slower at copying files.
Can't edit files on the phone from Windows.

So, how can you enable USB Mass Storage Mode on newer versions of Android?
Let's say I'm rooted and can install a custom iso if that makes a difference.
I've tried searching google, the app store, and xda forums for solutions.

The reason this was changed is because it allows the storage to be accessed by the PC while still mounted on the phone, whereas MSC required the SD card piece to be fully relinquished to the PC when attached. That caused issues where phones would have to have a partition boundary for the external storage space, meaning it could not be used for apps (so a 16 GB phone may only allow 2 GB of apps, and 14 GB of "files", and no way to alter that without re-partitioning). I assume it also would have caused problems for the adoptable storage feature added later on.

Here's the explanation from one of Google's engineers, BTW, which is the original source for my description: https://www.reddit.com/r/Android/comments/mg14z/whoa_whoa_ics_doesnt_support_usb_mass_storage/c30q93p/

@eldarerathis I'm aware of why they think its a good idea. It has it's down side though. For example usage in Windows. I'm sick of it warning me every time I copy a file that it's format isnt compatible format for my phone and that I should convert it when it's fine. Also it's just slower and you can't multitask copy operations. I have an older android phone that I like to use just because it has USB Mass Storage Mode. Well I don't want to be forced to just use that forever for my needs.

Also, the answers here are probably applicable:  How can I use my Galaxy Nexus as an external USB storage drive?

I'm not claiming that MTP is all roses, I'm merely pointing out what Google's rationale was since you've asserted that it was some kind of pressure from elsewhere (whereas Google - or at least their developers - have explicitly outlined the reason). There seems to be a lot of mystery surrounding this decision, and there has been for a long time, but they actually did have what they perceived to be a good reason (in reality, whether or not the pros outweigh the cons lies in the eyes of the beholder generally).

@eldarerathis I understand. I agree it has benefits. Thank you for elaborating on google's decision. I'd still like a solution though to use USB storage.

Thank you for clarifying why MTP is bogus. I understand it's benefits, but it's useability is close to none.

Related: Why can't I see Android storage as a partition on PC?

I reckon there might be workarounds. Currently, there are a few apps offering to restore the lost UMS option
Given that you device is rooted there are some options worth exploring:

Using USB MASS STORAGE (UMS) Enabler

This app's function is to enable Mass Storage Mode for mounting your
  Memory Card as a USB Drive in Computer from your rooted device
  [Android 4.0+].
It does not mount internal storage, and it will not work if your
  device doesn't have External Memory Card Support

Steps to Enable UMS:

Connect phone using USB cable to Computer or TV or DVD/Audio Player or Mac (or even to other phone with OTG) or whatever.
Open the 'UMS Enabler' app and press 'Enable Mass Storage' and give it root access.
(Try 2-3 times if it doesn't work the first time itself)
Before disconnecting USB, eject from Computer and then press 'Disconnect Mass Storage' in app.

If it doesn't work, go to App Settings and choose the required settings, and try again.
Avoid using memory card from phone when in UMS mode. Learn more here

Using QtADB

QtADB is an app based on adb. It requires working  android sdk
  (command “adb devices” listing your device),requires Qt libs version 4.7, root
  and busybox installed on phone.

#1 didn't work for my rooted note 4. I'll try #2 later.

Booting from twrp could offer some options. I don't actually know whether UMS enabler still works in 2024.

No solution.
So Google provides a Android Compatibility Definition Document for vendors to follow so that they can get Google Play Services on their devices.
From The Android Compatibility Definition Document -
 Section 7.6 Memory and Storage
Lists USB Mass Storage as

If device implementations have a USB port with USB peripheral mode support, they:

MAY use USB mass storage, but SHOULD use Media Transfer Protocol
  to satisfy this requirement.

So Device Manufacturers who want have Google Play Services on their device do not need to have USB Mass Storage support. So any driver or kernel modifications need not be implemented.

This answer somewhat suggests that it's possible? "MAY use USB mass storage, but SHOULD use Media Transfer Protocol" I'm confused. I'm open to, rooting, cfw, custom rom, whatever it takes to get USB mass storage.

Today I realize that in 2023, Android doesn't support USB Mass Storage. I don't understand, because even Windows XP started in 2001 support it.

@luigifab This is about treating the Android device as a 'mass storage device' connected to a PC. While optional, I'm not aware of any consumer device manufacturer not supporting MTP.


text:
How has USB File Transfer changed in Android changed over the years?
In Windows
I remember many years ago when I got my first android that USB connection seemed to work more like a flash drive. You could do multiple things at once without it saying the device was busy.
In all newer android versions I've seen I get an error saying the device is busy if I'm copying something and trying to browse files at the same time. Also I've noticed newer android devices seem to be slower with file transfers or even generating all the files in a folder.
So my question is what changed exactly and why was it implemented?
Bonus question: Can you give a detailed history on what happened with android USB and with what versions of android did it change with?

You might be referring to the USB Mass Storage Mode.

USB mass storage is the standard protocol used by flash drives,
  external hard drives, SD cards, and other USB storage devices. It also
  was used by Android devices and even many basic phones.

At some point most  Android developers decided to discontinue with this handy feature. They have legitimate arguments or at least justifiable reasons against the feature. It was discontinued sometime since Android 4.3 and later versions don't have this feature.
As one reddit user explained the reasons behind such discontinuation:

Earlier Android used to have /data partition for app data and
  /sdcard for movies, music and rest. Say you are an app freak and
  have installed lots of apps, what happens in /data fills up but still
  you can't use space from your /sdcard as it's a separate partition.
Now what Google has done is used unified file system. So that you can
  share space between /sdcard and /data. USB mounts storage on host
  and gives entire block level access to the host. If this is done the
  partition is unmounted from your phone. It was fine when /sdcard was
  separate now since both /data and /sdcard reside on same partition
  Android can't afford to allow full block access to another host. This
  is solved with MTP.
Another reason, Microsoft holds patents for long file name support on FAT filesystem. That's one patent for which they demand royalties
  from OEM's. If you use USB mount, you need to format your /sdcard as
  FAT because most users use windows. If you use FAT, you need to pay
  MS or risk a lawsuit. With MTP, Google can use ext3/4 btrfs whatever
  they please and there is no risk of lawsuit.
Finally, formatting filesystem with ext3/4 instead of FAT gives lots of read/write improvements since Android uses linux kernel.

The new options, Media device (MTP) or Camera (PTP) mode, are either unavailable to earlier editions of Windows and particularly difficult to use on other OSes e.g. Linux , or too limited in terms of functionality as well UI feel.
Credits
USB Mass Storage on Android Devices

MTP was added to Android in Honeycomb (3.0) https://developer.android.com/about/versions/android-3.0-highlights.html

@MorrisonChang Well yes there were introduced there, but the answer is just describing from the point where usb mass storage stopped and remaining options in these new Android versions, think of it as from 4.3 onwards


text:
How to prove that the bootloader of a device is unlockable when it currently shows as locked?
A newly bought Pixel device from a random seller can switch between carriers but the bootloader shows as locked.
Are all pixel devices' bootloaders locked by default? And how to show that it is possible to unlock the bootloader? And how to re-lock it for Pixel 2 XL. Any sources would be appreciated.
This phone is model G011C.

Locked by default. As long as it's not a Verizon variant it can be unlocked and relocked.

The question is how to PROVE it is not a Verizon variant. This phone is model G011C.

All Pixel's are bootloader locked by default, Google retail models can be unlocked easily while Verizon models cannot.
In the comments, you said "The question is how to PROVE it is not a Verizon variant. This phone is model G011C."
The model G011C is the Google Retail version, the Verizon version has a model of GA00152-US. Also, determining whether it's a Google or Verizon version is not difficult by other methods.
Method 1:
Go to the device Settings Menu, About Phone, and tap the Build Number repeatedly to enable Developer Options and then open that menu. If the OEM Unlocking option grayed out and it says "connect to the internet or contact your carrier" then you have the Verizon model.
Method 2:
Obtain the IMEI number and go to Verizon's BYOD Checker site and enter your IMEI number. If it is NOT a Verizon version, the message will be "PIXEL 2 XL NON-VZW" if it is a Verizon variant the message will be "PIXEL 2 XL VZW" or just "PIXEL 2 XL".
Method 3:
Chat with Google support and give them the IMEI number, they can tell you if the device is a Google Retail variant, or a Verizon variant.
And to answer the second portion of your question, "And how to re-lock it for Pixel 2 XL", this is a simple fastboot command away. Just enter fastboot flashing lock when the device is in the bootloader - Source
All non-Verizon versions can have the bootloader unlocked simply by enabling OEM Unlocking in the Developer Options menu, and using the fastboot command fastboot flashing unlock. No Verizon version of the Pixel 2 can have the bootloader unlocked by any known method.
Also, I don't know if your original question is mis-tagged or not, but you also used the sim-unlocking tag. SIM lock or carrier lock is something else entirely than bootloader lock (related to custom ROMs & TWRP tags). No Pixel device is SIM/carrier locked regardless of where it is purchased originally, or even can be SIM locked to my knowledge. Many people bought the Verizon version of Pixel & Pixel 2 outright from Verizon stores as they had them instock and immediately took them to different carriers with no issue.

The tag was just an accident. Of course, the question has nothing to do with carrier locking. Method 2 is good. So, the question is if the model is listed as "PIXEL 2 XL NON-VZW", does that mean the bootloader is unlockable? Or is the bootloader unlockable on both versions? (Also, Verizon model numbers are not G001C as you've said - they clearly sell a model number GA00152 in USA). Maybe you can edit the answer with that?

@Zac The bootloader can be unlocked on all non-Verizon versions. Only the Verizon version cannot be unlocked. You are correct about the model numbers, I will update my answer accordingly.

My devices is reported to be PIXEL 2 NON-VZW, but I can see "connect to the internet or contact your carrier" in dev options screen, hence unable to unlock the bootloader anyhow. @acejavelin, what does this mean? Is it possible that my device is some 3rd type? (I'm not the first buyer of the device, hence I do not know where from it's bought). Thanks for any help.

@andranikAzizbekyan No, there is no third type. I would contact Google support.


text:
Corrupted files on internal storage (now readonly), how to repair internal storage?
I have an GT-I9100 with Chameleon.3.0.4 ROM (and ROOT).
Android-Version is: 4.1.2
Since few month, my internal SD-Card (internal storage, not external SD) became readonly.
I cannot add/edit/delete any files on it anymore.
I noticed corrupted files in /storage/sdcard0/Android/data/com.google.android.youtube/
(wrong filesizes (each > 3GB) and wrong/unreadable filenames),
which I am unable to delete or fix.
So, I tried to execute fsck_msdos -y /dev/block/vold/259:3 (as root) via ADB-Shell, which shows me:
** /dev/block/vold/259:3

Boot sector contents:

sectors per cluster:..........64
number of reserved sectors:...2236
number of FATs:...............2
number of sectors are in FAT:.2946 (1473 KB)
cluster mask (bit):...........32

first cluster offset..........8000
cluster size(bytes):..........32768

hidden sectors:...............0
number of clusters:...........376963

volume serial number:.........407a-07d3
volume label:.................NO NAME    { 0x4f 0x20 0x4e 0x41 0x4d 0x45 0x20 0x20 0x20 0x20 0x46}

** Phase 1 - Read and Compare FATs
Attempting to allocate 1473 KB for FAT

Attempting to allocate 1473 KB for FAT

** Phase 2 - Check Cluster Chains

** Phase 3 - Checking Directories

Invalid long filename entry for /Android/data/com.google.android.youtube/�ILES

Remove? yes
check_dot_dot: '.' absent for /Android/data/com.google.android.youtube/�ILES.
check_dot_dot: '..' absent for /Android/data/com.google.android.youtube/�ILES.
Remove? yes

FSNext block (322159) is correct, NumClusters (376963)

12387 files, 646240 free (20195 clusters)

***** FILE SYSTEM WAS MODIFIED *****

Which looks good.
But when I re-run this command, I always get the same result.
Which shows me, the file system was not modified, cause it's readonly.
So, I tried to re-mount the storage in RW-Mode.
Fixing the file system, did not work for me. (fsck_msdos couldn't repair the fs)
Question:
How to repair the internal storage?

This is an answer to my own question:
I managed to fix this problem (until now), by doing following:
(NOTE: Do this at your own risk!)
01.  boot into Android and enable USB-Debugging
02.  backup data from SD
03.  update busybox via PlayStore
04.  reboot into recovery mode
05.  mount system partition (via recovery tools like CWM)
06.  connect to device via USB + ADB(-Shell)
07.  get internal SD device name (via mount which is for me/dev/block/mmcblk0p11)
08.  format internal SD (via mkfs.vfat -F 32 /dev/block/mmcblk0p11)
09. check new formatted partition (via fsck_msdos -y /dev/block/mmcblk0p11)
10. reboot into Android and check if internal SD is writable again
Until now, my internal SD became writable again!
Of course, all data is gone.
Cheers!

Why the downvote?!?!


text:
A questions about "wipe" in CWM Recovery
CWM Recovery has a many options for wipe and format partitions, and the options are:

wipe data/factory reset.
wipe cache partition.
format boot, system, data, cache, sdcard or sd-ext.
wipe dalvik cache.
wipe battery stats.

I wonder What is the difference between a wipe and format In terms of safe deletion of data?
How can I Completely Wipe Data from all partitions of phone device?
(I want do that before install a new ROM).
What is the overwriting Standard used in the wipe? ,thanx in advance.

Note: I don't know version of CWM Recovery but I'll use CWM Recovery from here:
https://forum.xda-developers.com/honor-4c/development/honor-4c-root-cwm-recovery-inshaalmirza-t3177770

I wonder What is the difference between a wipe and format In terms of safe deletion of data?

A wipe is, in any method, removes selected data from filesystem. It can be plain deletion or formatting the partition.
A format is a complete reset of a disk partition, by cleaning everything up and re-build its headers, inode records, file allocation tables, etc.

How can I Completely Wipe Data from all partitions of phone device? (I want do that before install a new ROM).

Use the 1st option wipe data/factory reset. That's enough.

What is the overwriting Standard used in the wipe? ,thanx in advance.

AFAIK there's no overwriting. It simply deletes files and/or formats partitions of your phone.

Add to 1.: the Format option is intended a.o. to change the file system. You can e.g. format a partition previously using vfat to ext4, or from ext4 to f2fs (not checked which systems CWM recovery supports, so don't nail me on that). Wipe usually is format without switching the fs (faster than delete) unless you define otherwise, at least with TWRP. // 2.: to be on the absolute safe side, one would also wipe system – but aggreed, that's optional and usually not needed.


text:
Android Chrome Password Pop-up
Does anyone know how to eliminate this annoying pop-up (see screenshot) in Chrome that has a separate window for passwords? I know it can be done but I can't find it and any every time I search for it, the result is only how to resolve the check your passwords compromised passwords pop up from chrome. Thanks in advance.

It is Chrome's password manager... If you don't want it, disable it. https://support.google.com/chrome/answer/95606

I don't want to disable the password feature, I just don't want the pop-up. An older version of Chrome had the fields just filled in rather than as a separate pop up. It's just another annoying "fix" and there's a way to disable it and go back to the old way but I just haven't found it. I had fixed it on a previous phone and cannot find the way to fix it again.

Chrome constantly changes.  This was one of the recent changes to Chrome.  The only way to disable the popup would be to delete the saved password for that particular website


text:
Use Powerpoint inking feature on my laptop from Android Tablet
When presenting Powerpoint slides via zoom on my Win10 laptop it is convenient to annotate on the slides in response to audience questions etc. Powerpoint has a convenient annotate feature but it's not easy to draw using it via the mouse or laptop touchpad.
On the other hand I do have a nice Android Tablet with an Active Stylus (Samsung S6) where it's a breeze to draw. But is there any way I can hook up the Tablet to the laptop (via a third party app etc. if needed) so that I can use the native Powerpoint annotation feature but via the Tablet.
PS. Right now I use a hack: I open a second zoom instance on my Android Tablet and use zoom's annotate feature (so I can use my stylus). But then the annotations have to be erased after each slide and cannot be saved easily etc.


text:
OG Pixel , I can only get to stock bootloader. device is not booting. How can I resurrect the device?
just checking if my device is permanently bricked or there is a chance to resurrect it? I can only get to bootloader.
device is stock
I cannot get to recovery mode (stuck on google logo)
I cannot boot to OS (also stuck on google logo)
the only I can get is boot loader.
fastboot oem unlock get this error
FAILED (remote: 'oem unlock is not allowed')
fastboot: error: Command failed

adb devices does not show my device.
using https://flash.android.com/ it says device not supported (only pixel 2 and up)
any chance to revive this ??
also tried dePixel8, but no luck
adb push dePixel8 /data/local/tmp
adb: error: failed to get feature set: no devices/emulators found

thank you
fastboot flash recovery C:\IT\twrp-3.5.0_9-0-sailfish.img
Sending 'recovery' (26477 KB)                      OKAY [  0.760s]
Writing 'recovery'                                 (bootloader) Command is not supported.
(bootloader) Please unlock device to enable this command.
FAILED (remote: '')
fastboot: error: Command failed

you can change boot slots from fastboot and try to enter recovery. once in recovery flash Full OTA Image

Ok. Let me try tomorrow thank you for the suggestions

check download mode for bootloader version


text:
How can I easily force a browser refresh without going into settings, clearing all caches?
On my Windows 11 PC Firefox browser, if I want to refresh my webpage and load the new style.css that I uploaded instead of using old cached one, I can do "control- [click on browser page refresh icon]"
On an Android device, with Chrome for example, is there an easy way to force a reload of the webpage and style.css instead of going into Settings and clearing all caches?

Maybe you can look at some of the options posted here.


text:
Found a film or strip stuck inside the back cover of Lenovo K3 Note
I have a a phone Lenovo K3 Note. I noticed something paper like stuck on the back cover of the phone. It is like a film, found on clothes of some stores so that no one can steal them. But what its use on my phone, I couldn't understand. These are the images of the sticker:
Stuck on the cover

Upper side

Was stuck like this

Do anyone know why it is put there, I am little suspicious about it.

Just a regular graphite sticker to help with radiation (the grainy texture and easily-crumpled nature hints at it) - this is getting typical nowadays. If you're not sure you could always cut the sticker apart and check if there are any wiring in it - if it's used for any other purpose it will have a circuit inside. Also, I'm voting this as Android-independent since it's not about the OS, but about a phone using the OS.

It may be just a sticker to counter radiation, as @Andy Yan said. I tore off the the sticker there was just some black slippery substance coated. There was nothing like the stickers on clothes bought from few stores. (So its not the RFID sticker @davidgo)
But, I browsed about such type of stickers, 'Anti Radiation Sticker' there were no supporting blogs or comments about its use found, other than on the sites selling them. Then why the company itself using them? I couldn't understand.
Visit the link, advocating uselessness of Anti Radiation Stickers
Edit - Its not a 'Anti Radiation Sticker', it absorbs dissipating heat, made from graphite while ARS are made of metal.
(Thanks to @AndyYan)

By "radiation" I mean dissipating heat, hence the graphite material. "Anti-radiation" stickers on the market, on the other hand, are usually made out of metal.

Oh! I understood it it. Now I will stick it again. Thankyou @AndyYan, Thanks

According to people at https://www.reddit.com/r/lenovok3note/comments/3eousk/could_the_lenovo_k3_note_be_optimised_for/ it's used for shielding the Sim cards.
I'd be surprised, and posit it is actually an anti-theft or tracking RFID sticker - possibly bigger then typical as it needs to work through more packaging?


text:
How to disable Google synchronization on Xperia XZ1 Compact?
Given that I'm an Android developer and know how to use Android, I'm yet again amazed by Google's ability to disguise options and to change them with every release (in addition to the device manufacturers doing the same thing).
What I want to achieve: disable auto-sync of all data with Google (including app data, contacts, SMS, calendar, ...)
The way it doesn't work on my device is by following the instructions you get from googling "android how to disable Google sync". I'm not stupid ;) I do know how to google.
I have a Sony Xperia XZ1 Compact with Android 8.0 Oreo. I'm unable to disable synchronization. Here are the screenshots:

Note: On the last screenshot, when scrolling down the list, I can see "Google Play Movies & TV" where it explicitly says "Sync is OFF". It doesn't say that for the other items.

Ahh. I found that "auto-sync account data" (shown on the first screenshot) acts as a master switch. Turning it on and then going to the "Account sync" screen then reveals the individual on/off sliders for the different items.


text:
What Percentage of Android Devices Runs on x86 Architecture?
This question might be redundant or a possible duplicate, but I use an NDK library that runs only on ARM devices. Is there a way I could know what percentage of Android devices my app can support based on CPU architecture just like these statistics on Android Platform Versions?
My goal is to ascertain the number of devices my app won't support.

Currently there's only Chromebooks with Android capability that actually use x86 chips.

Since ultimately you're deciding whether x86 is still worthy of spending effort to support, I'm listing several facts about x86 for Android devices here:

Intel had decided to discontinue the Atom SoC line for phones/tablets.
The last generation of handheld Atom SoC - x3, x5 and x7 series - were at best equipped on lower-end Chinese Android tablets. Some come with phone/data capabilities (based on x3-C3230RK). Regardless, none made it onto mainstream devices, specifically phones.
The last x86 Android device that's widely popular was ASUS' Zenfone 2, released in March 2015 - and even its subsequent variants shifted to Qualcomm's Snapdragon 410/615, partly due to the compatibility issues Android on x86 had back then.
Spreadtrum (now UNISOC) has a partnership with Intel and just announced SC9861G-IA in March 2017 / SC9853I in August 2017. However, this has yet to come to fruition on consumer devices, and given Spreadtrum's focus on low-end devices for emerging markets, this SoC likely won't give x86 on Android much significance.

EDIT: The first device utilizing the above Spreadtrum SoCs, the Leagoo T5c, is now on pre-sale. Leagoo is a small China-based firm, and the device mainly targets India, not to mention another variant of the same device (the T5) with a conventional SoC is sold at the same time, so it doesn't change the assumptions above that it will remain unpopular.

This essentially means that there are not a lot of devices out there that are not ARM based. Hence, I think my app will support a larger part of the multitude of Android devices. Thanks!

@iBug Same here (I actually owned 2, sold one of em). The driver issues make Windows on them sometimes a pain to use, let alone Android, I'd say.

@AndyYan Driver issue? No problem if you disable driver auto-update in WU

@iBug Nah - some drivers like touch panel and display occasionally malfunction and would require a reinstall. Not caused by auto driver updates.

@AndyYan For me, the stock (shipped) accelerometer driver is OK but WU keeps updating it to a non-working one, so I had to stop WU from updating my drivers and I check it once a few months.

OTOH, you may want x86 support and other tweaks to run the app on Chromebooks.

@AlexCohn True that. Didn't take CB into consideration since both the site's and my own focus are on Android.

I probably didn't express myself clear enough: Chromebook is not Android, but it can run Android apps natively.

Checking on Spreadtrum, they only ever launched two x86-64 SoCs, both in 2017, so they would appear to have given up.

I ended up with this conclusion after searching a lot.
Useful info in Unity Stats.

ARMv7: 98.1%

Intel x86: 1.7%

However I was not satisfied so I verified it from many resources.
According to Android Documentation.

armeabi was deprecated in r16. Removed in r17. No hard float.

and

Historically the NDK supported 32-bit and 64-bit MIPS, but support was
removed in NDK r17.

Summery after searching a lot

mips (deprecated)
mips64 (deprecated)
armeabi (deprecated)
armeabi-v7a (required — most popular architecture nowadays)
arm64-v8a (required — newer version of armeabi-v7a)
x86 (optional, very limited number of devices, like  Asus Zenfone 2, Genymotion/ Android emulator)
x86_64 (optional, very limited number of devices, like  Asus Zenfone 2, Genymotion/ Android emulator)

I should also mention that ChromeBook are using Intel processors based x86 and x86_64 architecture. (Only add these architure when you support ChromeBook)
Conclusion
If you app supports armeabi-v7a and arm64-v8a architectures because they have around 99% of Android devices.
Important Suggestion
Do you worry about app size (you should), you should split your apk for multiple abi. Android studio and play store support uploading multiple apk, so that app has only 1 architecture ndk files.
So this will be much efficient to build multiple apk.
Important links

What is ABI Management and CPU architecture
Unity Stats CPU VENDORS
Unity Stats on Android Hardware
Split apk guide
Find your device abi
Largest mobile database

From Google Play Console (supporting a minimum of Android 4.1 and landscape screen):

x86: 287 devices
arm64-v8a: 3136 devices
armeabi-v7a: 11716 devices

how did you find this information on google developer console? I can't find report with device architecture.

Can you please update stats to current (2022)?

A new doc has dropped:
https://developer.android.com/topic/arc/device-support
So officially Google says:

Most Android phones have ARM chipsets. However, many ChromeOS devices use x86 chips. The difference is not important for basic apps written in Kotlin or Java. However, for apps written in native code, including those created with game engines, the chipset in the device can be an important concern.

Ideally, all apps and games with native code ship with all four major Android ABIs (Application Binary Interfaces): armeabi-v7a (arm32), arm64-v8a (arm64), x86 (x86_32), and x86_64.


text:
Change user name which I see in adb
 ./adb shell pm list users
Users:
        UserInfo{0:*********:13} running
        UserInfo{999:XSpace:800010}

./adb shell dumpsys user
Users:
  UserInfo{0:*********:13} serialNo=0
    Created: <unknown>
    Last logged in: +39m10s436ms ago
  UserInfo{99:Airlock User:10000010} serialNo=1001
    Created: +386d6h17m29s394ms ago
    Last logged in: <unknown>
  UserInfo{999:XSpace:800010} serialNo=11
    Created: +540d9h24m8s349ms ago
    Last logged in: <unknown>

I would never set such a user name I've hidden behind the star symbols.
I couldn't find where it can be set in settings.
It's not a Wi-Fi AP SSID, not a bluetooth name, not a Lock Screen owner name.
How could that be? Even if someone took my phone, unlocked it with password, how they could do that? I'm puzzled.
Phone is Xiaomi Redmi 4 Pro with MIUI 9.

Did you cross-check that name with that reflected under Settings  -> Users? Alternatively,  in some devices the Contacts app permits setting up a Contact card which works as User name as well.

@Firelord I couldn't find neither Settings → Users nor this mystic username in my contact...


text:
Cell Phone is unresponsive, but after it ran out of power it was chargable again?
So yesterday my cell phone was acting strange, it didn't respond to charging and/or could not turn on (no charging light and blank screen).
Today (I assume after it ran out of power), it is charging fine now.
I have a samsung S6, my question is what could the root causes be? Are there any suggestions on how to prevent this from happening again.
I presume a software glitch prevented my phone light from working and/or the screen.
Is it bad to turn on your phone while it's charging?

Charging is a complex task for mobile devices now.  For example, power can come from either USB or a wireless charger.  When USB was developed in the early 90's, it was designed for peripherals such as mice and keyboards - smartphone charging wasn't even on the radar (pagers were the hot thing back then).  So USB charging is a mess of its own on the technical side.
What this means is that your phone's CPU and its firmware is involved in the charging process, and if the CPU is completely frozen, then the necessary communication between the phone and its USB chipset won't happen, and you could be in a situation where the charger won't work because the CPU isn't following the necessary steps.
The power button on a phone is a "soft switch" - it's software controlled, not a physical on-off button, and some part of the phone is always powered to respond to that button even when off (thus turning it on while charging should always be a non-issue).  Computers have been like this since the early 90's - and if you couldn't turn it off because of a complete lockup (rare, but possible), you'd have to resort to unplugging it.
The equivalent of "unplugging" on a smartphone is removing the battery.  Given the trend of non-removeable batteries, this isn't an easy option.  But if the battery completely dies and runs out of power, it's the same thing.
You may try holding the power button down for 10 seconds and see if it will restart.  If it's completely froze you have to wait until the battery runs completely out, or take the phone apart to unplug and replug the battery.
What can make a CPU completely freeze such that even holding power for 10 seconds won't reboot it?

OS issue - make sure Android is at latest version.
Bad charger/cord, try a different or new charger/cord.
If using a custom or aftermarket ROM, check for a later version or revert back to stock firmware.
Physical issue such as battery going bad, physical or liquid damage.


text:
Why don't I see Twitter's homescreen widget on my Android?
When I go to add widgets to my home screen, I don't have any widget from Twitter available. Other widgets are appearing in the widget list, can be added, and work fine. Just nothing from Twitter.
What could possibly be causing this?
I am on Android 6, but it couldn't possibly be too old, as i have an even older device running Android 4.3 where the Twitter widget is available. I have the Twitter app installed, I am logged into it, I can open it and use it. The only thing that is missing is their widget for my home screen.
I have tried removing the app and installing it again, logging back in again, restarted the device a couple times, but the widget just doesn't offer, neither for the default launcher, nor in Nova Launcher.

try to login twitter using chrome. after logged in tap on three dots on top-right portion of chrome and select 'Add to Home Screen'. This will act as twitter app icon. I am using the same, I don't have twitter app installed, but placed like this. By, tapping icon, it loads twitter in chrome, for your case, I think it will redirect action to twitter app.

@RahulGopi Like i wrote in my original post, the app works fine. It's the widget that is missing, and your suggestion will not give me the widget, nor an alternative to it.

Okay. Try with any other launcher. Or uninstall and reinstall twitter app and check.

Sorry, the Twitter widget is gone.
The Twitter widget was removed from service in the newer versions since release 6.8.0. See the report dated July 26, 2015 from Android Police. It is possible the version you are maintaining on the earlier OS was never updated (or can't be) to a widget-less version.
My Samsung S8 carries the latest Twitter App and no widget available, regardless of launcher. (I use Nova, but confirmed this too, by reverting to the default)

Thanks for the info! Never would have crossed my mind that that would be the case, especially with 3rd-party apps popping up to offer a homescreen twitter widget. I have now solved my need for the widget by installing the older version of their app. Cheers!


text:
How to debug error on installation from APK?
I'm working in a project. We are in a testing cycle and we are experiencing something that I don't know how to debug.
I built the APK. I installed it in my phone (S9+) and in many others with no problem. Then we sent the APK to some people to test it. 4 new Samsung S9. Totally new. No previous versions installed and same SDK and ONEUI and security patch as my own device.
When they try installing it they get an error on installation. I don't know what can be causing this and I don't know how to capture the error. How can I generate some log or debug it?

See my list of logging apps. One of the bug reporters might be helpful. Apart from that: development questions are off-topic here – so we won't answer with the part of how to include such code with your app directly.

Samsung offers a cloud device farm that allows to remotely operate real test devices. May be you can reproduce the problem on one of those devices.

Hi guys. Thanks for the answers. The problem was cause by Google Protect. I just disabled it and now works perfectly. Thanks!

Thanks for the answers. The problem was cause by Google Protect. I just disabled it and now works perfectly. Thanks!


text:
Minimal way to always have screen on on Android?
I'm preparing a bunch of tablets using a minimal android OS (https://slimroms.org/).  And was wondering if there's a way to always have the display on (i.e. disable Sleep and Auto Screen lock) without needing to use third party apps.  I've got full root access via SSH and ADB etc - hoping there's some setting in /proc or as a kernel boot argument that I can make.
These are intended to be "We would like your feedback" tablets which are out on public display - so the display should never dim or lock etc. They're always going to be plugged in so power saving etc isn't going to be an issue.

Related or possible duplicate: https://android.stackexchange.com/q/207081/247431

Hmmm - a bit hacky but this might work: https://stackoverflow.com/questions/29072501/how-to-unlock-android-phone-through-adb

https://play.google.com/store/apps/details?id=by4a.setedit22

Set the 'keep awake while plugged in' setting
(Screen will never sleep while charging)
Settings - Developer options - Stay awake: on
or from terminal
svc power stayon true

if the user can press the power button, set the screen lock to "none" (not even swipe) and
use Tasker/MacroDroid/Automate to watch the power button. or run a watchdog from shell
the following example depends on three android binaries
/system/bin/toolbox
/system/bin/toybox
/system/bin/input
# (replace first line with while 1)
until [ $(($(toybox cat /sys/class/power_supply/ac/online)+$(toybox cat /sys/class/power_supply/*usb/online))) -eq 0 ]
  do
    case "$(toolbox getevent -lc4 /dev/input/event2 | toybox head -n1)" in
      *KEY_POWER*)
        input keyevent KEYCODE_WAKEUP
      ;;
    esac
done

the above code checks for charger is connected as entry point for the loop. the loop exit when charger is disconnected. /dev/input/event2 may vary for your device. you can check which input event has only 3x buttons [Vol+|Vol-|Pwr] from getevent -il (for more generic code look here)

Ugh - maybe spoke too soon.  After a certain amount of time (even with "Settings -> Developer Options -> Stay Awake On") the screen will dim, and dims almost to the point where you can't see anything.  A "tap" will bring the screen back to full brightness - but is there a way to maintain 100% brightness ?

not sure if there is a keycode for unlock. the only other harmless input event i can imagine is a mouse cursor moving (not touch/swipe) but the cursor might be visible

Actually another thought I just had - is there somewhere where you can set the "dim" percentage for the display.  E.g. If dim is going to 30% of the total screen brightness, can I set "dim" to 100%.  This way - even if the screen is going into "dim" mode it won't matter (i.e. no need to send 'tap'/'mouse'/'key' events to the display)

Hmmm - wonder if I can use some of the commands from https://github.com/Genymobile/scrcpy/issues/101 to achieve what I want (via the "adb shell settings put system screen_*" commands).  After looking at https://developer.android.com/reference/android/provider/Settings.System there seems to be quite a few settings that have been deprecated though.....

@PatrickRynhart if you use it in kiosk mode with very limited gui, just send a tap to corner every 15 seconds i don't think this harms much (will drop notifications). for more safety you can increase the display timeout up to 30 min and decrease the tap frequency (even tap outside of display will work) while [ 1 ]; do input tap 720 1260; sleep 15; done

Thank you - yes we're using them for kiosks.  Will try this out but this looks like a good workaround.  Thank you - Patrick


text:
Does turning off cellular data override restrict background data?
I have always assumed that turning off cellular data under Android settings/Data Usage meant no data use is possible.
However, I found out there is another setting: restrict background data. If that is turned on, will the phone still use cellular data even when cellular data is off?

I see three questions:
1.) Does cellular data off override restrict background data?
A: No. It's possible to get Background Data through WiFi.
2.) I have always assumed that turning off cellular data under Android settings/Data Usage meant no data use is possible.
A: No. See above answer, and below.
3.) However, I found out there is another setting: restrict background data. If that is turned on, will the phone still use cellular data even when cellular data is off.
A: Yes, it's not impossible. That restricts Background Data only.
But, some Phones 'leak'.
I had everything turned off and set to use WiFi, even went to the "Data Usage" Setting and restricted each APP individually - but the Carrier was billing me for Data Usage.
I phoned to complain and the Call Taker thought I must have done something incorrectly - Supervisor!
The Supervisor said that I had used a few BYTES on a couple of days, and they were adding a Charge for "Under 5MB Usage". I assured her that I had turned everything off and bought the Phone from them. We agreed that no practical Web Page is that short and that I wasn't trying to Surf for free.
They added a Feature to my Account called "Data - 5MB Free" finally admitting that they got so many complaints about this that this is what they came up with.
I suspect that the Manufacturer's UI or the OS was not checking the Settings (a 'leak' / Bug) and since the change to "5MB Free" I'm no longer getting billed for using Data without intending to.
So, yes, technically it is possible to Set something (or read something on the Internet) and to get different results than you had hoped for. It's possible to turn Data off and for a tiny amount to get used, resulting in getting billed for it.
If you don't want to pay Cellular Data Charges (or ask the Carrier to completely disable it) then turn it off and check your Data Usage (on your Phone and Phone Bill). If it's leaking take it to the Store or convince them over the Phone that you have turned everything off on your end.
Ask if the Usage is extremely small, if it is and the Phone is theirs ask for at least 1MB free.

I think I found where the leakage is coming from, or at least how to block it.
I bought my phone unlocked and have not rooted it. If you have a carrier subsidised phone this may not work without their cooperation if they have locked the settings for "Connections -> Mobile Networks -> Access Point Names". I've had this problem on two phones from different manufacturers, so I guess it's a UI and Android problem.
The problem (or solution) is that "Connections -> Mobile Networks -> Access Point Names -> APN Protocol" is set to "IPv4/IPv6" - you need to change that to "IPv4" so that when you have Data turned off the setting is respected. Either it's 'by design' or a Bug that turning off Data isn't blocking IPv6 usage when your phone boots, either way it's a rip off to get a Bill for Data usage when it's turned off.
My Carrier has locked their settings so I couldn't alter them without either taking my phone in and explaining all this again (or scouring the Internet for a way to change the Carrier settings). Fortunately I am able to add a new setting and choose it (I bought my phone outright), if your phone is "Carrier Locked" you might not be able to create a new "Access Point".
While researching this (after discovering how to see the leakage) I found a few tools and webpages that are helpful.
The APP that showed me the Data trickle is NetTech's "Net Analyser".
On their "Information" tab at the bottom it shows the total IPv6 usage since last boot - prior to fixing this problem it said that I was using over 60kB of Data, not much but enough to get billed (prior to getting 5MB Free).
Here's a screenshot, notice at the bottom where it says: "Received Since Boot" and "Sent Since Boot" - previously those values were over 60kB, now they are zero. The leakage is prevented, money saved.

What you need to do:

Go to "Connections -> Mobile Networks -> Access Point Names" and click on your current setting. See the Android Central article: "What is an APN, and how do I change it?" for a longer explanation. You either need to be able to edit the fields or create a new entry for this fix.

Screenshot your current settings so you can keep a record of the original settings in case you make an error when you edit them, or so you can create a duplicate entry to modify.

Either modify the Carrier's original setting for "APN Protocol" or create a new entry in the "Connections -> Mobile Networks -> Access Point Names". If you create a new entry use the screenshots to exactly copy everything identically (spaces, and set to "none" versus "not set" must be identical,).

Change "IPv4/IPv6" to "IPv4".
Save and reboot.
Check Data usage with "Net Analyser" (or APP that shows IPv6 usage). There should no longer be any IPv6 data usage.

Fixed.
While searching for a solution I also found this webpage: "How to DISABLE IPv6 on Android?" but they say the solution is temporarily and needs to be done each boot - that's useless for us because our problem seems to occur during boot, before the UI Settings kick in.
A more helpful webpage appears to be: "IPv6 on Mobile Devices" and especially: "Android: IPv6 Data Leaks" (translated from the original German webpage) which explains how to turn off IPv6, though you'll likely need root to do it:
## Kernel
# Disable IPv6
echo 0 > /proc/sys/net/ipv6/conf/wlan0/accept_ra
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6

...will the phone still use cellular data even when cellular data is off?

No
The purpose of this setting (restrict background data) is to minimise cellular data when cellular data is enabled and the app is  running in background. Instead, when connected on WiFi background data is used
See this question for more
How does "Restrict background data" work?
Note that apps which are driven by GCM for notifications are unaffected by this setting as explained here Restrict background data for Facebook, but notifications still coming in
Edit In response to OP requesting for additional citation, see Optimizing Network Data Usage at Android developers  and Google help: Allow or restrict background data usage by app

One would hope you are correct

It is not the question of me being right or wrong- that's the way it's been designed- simply put restrict background data comes into play only when cellular data is enabled - it doesn't enable cellular data on its own. Both supporting answers are from moderators of the site :).

I wonder if there is another reference or source that actually confirms this.

The first link talks about Restrict background data but speaks not of cellular data off. The second link speaks about cellular data, but does not rule out the possibility of background data occurring with explicit mention. I may seem like splitting hairs but I am just not sure about this point.

The underlying fact 1. Restrict background data is applicable only for cellular data and not WiFi 2. Whenever data usage is mentioned, it is al in the context of cellular data. Your Q is basically asking if restrict background data working to enable cellular data - a valid doubt but the premise is wrong since restrict background data only works when cellular data is on and you want to save on data usage. Restriction is possible only when something is enabled- it by itself doesn't enable and then restrict

how do you know this bit: "since restrict background data only works when cellular data is on"

Because it is meant for cellular data (for WiFi you have metered networks a feature in recent Android versions, which also uses rules set up for cellular network ) and just as you can restrict flow of water only if water is present in the pipe. You can verify for yourself if you like using the app mentioned in this answer or wait for someone else to pitch in // contd

.  I doubt there is documentation around this. Not to be impolite, but user documentation explains the purpose but didn't deal with all exclusions/ inclusions

Unless you have in mind something like this http://android.stackexchange.com/q/82837/131553


text:
busybox ip link show doesn't work
I can't see the MAC address of my phone when I use command busybox ip link show on my rooted LG phone. Here is screen shot:

Does anyone know what seems to be a problem?

Try just busybox ip link. Also, netcfg is capable of showing your MAC address.

busybox ip link do the same thing, but netcfg showed MAC adress. thanks :D