text:
Android reports file sizes different than windows
Android and windows report different file sizes for the same files. why is that?
Looking at two video files, on device both the Gallery and file manager report a certain size, but browsing to those files on Windows 10 (USB connected)- shows they're significantly smaller

Vid A

Android: 2.289GB
Windows: 2.13 GB (2,294,649,056 bytes)
Difference: +7.46% on Android

Vid B

Android: 394MB
Windows: 375 MB (393,532,962 bytes)
Difference: +5.1% on Android

Windows shows more specificity, so I assume it's correct.
Is android just approximating? 5-7% seems like a pretty big difference to me.
Phone: LG G7, Android 9
Windows: 10 Build 19042

Possibly due to kilobyte vs kibibyte Both showing almost the same bytes though.

Vid B is pretty much clear (375 MiB = 394 MB) but for Vid A you made a mistake (2.13 GiB > 2.289 GB) windows is bigger than android because space occupied on windows disk (in bytes) is not equal file size in bytes

In addition to MB vs MiB difference already mentioned, recommended read: Why are there so many different ways to measure disk usage?. Or at least understand how du -b and du -B1 differ. du manual.


text:
no IPV6 via Mobile Hotspot
I have two Android phones. Same hardware model, one with android 10 and the other with 11.
Both phones connect to the same telco.
On both phones I can browse to test-ipv6.com and get a 10/10 indicating IPV6 on each handset is working.
I then enable mobile hotspot and test from my laptop.
Via the android 10 phone the laptop receives a V6 IP and the above website reports a 10/10 from the laptop
Via the android 11 phone, the laptop does not get a V6 IP, and the above website report 0/10.
I have looked though as many settings on Android 11 handset as I can, and scoured the internet for ideas but I cannot determine why a V6 IP is not allocated from the 11 handset.
Ideas?

Which device model are you talking about? Are both phone non-branded? Some times manufacturer introduce bugs in new (major) Android versions, if the device is the same this could be such a case.

Both are samsung a31

Can confirm, IPv6 via hotspot on my A52s with Android 11 does not work.

Thanks for dropping the comment. It looks like a regression in the version upgrade.

source: Stack Exchange

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

sort: votes


text:
Data partition corrupted TRT-LX2
Please read this question first!!!
I've disabled dm-verify and then it says the data partition is corrupted!
I did a low-level factory reset, but it is still showing that annoying message when I try to boot it up.
How to fix this?

you probably destroyed encryption, this can happen if Universal DM-Verity ForceEncrypt Disk Quota Disabler is used without reading the instructions:

The zipname tells the installer what to do. Here are the current options:

Add 'enfec' to zipname to keep forceencrypt enabled if present

This may have caused mismatch between different fstabs. Either restore backup of boot + vendor, or fix fstabs manually, or flash stock ROM

Thanks, flashing stock ROM worked for me!

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


text:
ES File Explorer - Space not freed after deletion from Recycle Bin
Every few months, my internal storage begins to fill up.
I store everything I can to SD Card, but Android has a limited ability to do so.  I'm running Oreo, unrooted.
The biggest dir by far is /storage/emulated/0/DCIM/.thumbnails/, which can stand around 3.1GB for some reason.  I used ES File Explorer to delete it, then went to the Recycle Bin in the app and emptied it.  The 3GB was not freed-up.
I've restarted my phone several times, looked around for residual files, could not find LOST.dir.  I'm honestly at a loss.  Where did it go?
How can I get the OS to free up this space?
What better way can I use to get rid of this stuff?

What Android version? How to you check how much free space you have? An alternative way would be to look at the free space of the user partition e.g. in {DiskInfo](https://play.google.com/store/apps/details?id=me.kuder.diskinfo)

Does this answer your question? How disk space is used on Android device?

It might be issue with file system. Unfortunately you can't do much without root access (for example checking discrepancy between df and du). Factory reset is your last option


text:
How do I upgrade my Alcatel Idol 4s (6070O) from Android 6.0.1 to a newer firmware?
I have an old Alcatel Idol 4s laying around which is on Android 6.0.1 and I was wondering if there's any way to upgrade it to Android 7 or 8? I tried every single method I could find but no luck. Almost every single method needs a rooted device (which I also couldn't find a solution for), I even tried using the Alcatel Mobile Upgrade Tool but it gave me a prompt saying there's no update available, and obviously, I couldn't find any software updates in the settings as well, so I need help.

If there is no official update you can only check for a custom ROM. A rooted device is not really required, but a bootloader unlocked device is usually a requirement.

Thank you for the response @Robert. Do you know where I can possibly find ROMs compatible with my phone model?

Use your favorite search engine and check xda dev forums. But based on the Android version and the manufacturer you may not find one. You device is a little bit too old, most developers have already switched to a newer device (so you are about five years too late) and Alcatel is not really a popular manufacturer.


text:
How to turn on Gmail Android app text autocomplete
When I use Gmail's web version, it makes autocomplete suggestions to the text I'm typing (for example, if I type "long time no" see might show in autocomplete). It also underlines in red grammar mistakes and suggests grammar improvements underlining the text in blue.
I recently bought myself an android tablet (Samsung A7). I tried using Gmail Android app because it's hard for me to use the web version with my tablet. The app works fine, but it doesn't give me the above text autocomplete feature nor the grammar notifications.
Is there a way to enable this? This video goes through pretty much all settings and, although it lists an autoreply feature, I can't find anything about text autocomplete or grammar. Is this possible at all on the Android app?

Open Gmail, go to Settings.
Select your account. Enable Smart Reply in email

Thank you! but even when I enable these options it still doesnt work, I neither get writing suggestions nor squiggly underlines for grammatical mistakes. I'm using a Samsung Galaxy Tab A7


text:
is it possible to replace the bootloader firmware to unlock a 64bits cpu?
Sm-j700m cpu is arm64 but only allows 32bits android on it.
From here: https://www.reddit.com/r/LineageOS/comments/p9p3s3/comment/h9zan52/
I thought that, if the bootloader could be replaced or tweaked (change some bytes on it), it could allow 64bits android (lineage os 64bits build) to be installed on it.
But these are the only clues i got til now, any tips? Can it be done? Is there some software for that device, or other devices, that could do that on that device?
Related? Unlocking bootloader to change rom or firmware

https://forum.xda-developers.com/showthread.php?t=4057503

If your bootloader boots the kernel only in 32 bit mode, the only way: contact your OEM, get the bootloader source code and their private key, make necessary changes to the source code, recompile it to boot in 64 bit mode, sign it with their private key and flash to the device. Now compiling a 64-bit ROM (kernel and AOSP code) is up to you: Could a 64-bit hardware device run a 32-bit Android version?

Running a 64bit Linux on that phone with 1.5GB RAM doesn't make sense at all as there is no advantage. Also 64bit software usually requires slightly a bit more RAM and RAM is already short on your phone. And if you have an app that requires 64bit than it will also demand more RAM, more as your device can provide.

@IrfanLatif can root+adb be used to make the bootloader's private key unnecessary? I just think samsung will give nothing, but i may be wrong.

No. Root / ADB are high level userspace things. Under userspace lies kernel, and under kernel lies bootloader. So they have nothing to do with each other. Root just gives you access to the bootloader. You can extract it but cannot modify it. Bootloader binaries are signed with OEM's private key. Read about Android Verified Boot to know more. Any changes to bootloader are near to impossible. Except if the bootloader is open-source e.g. LittleKernel used in some Mediatek devices. But OEM's signature can be a limiting factor there too. Private keys are meant to be “private”, they aren't shared.

https://duckduckgo.com/?q=How+to+modify+Android+bootloader. Understanding OEMs' chain of trust: https://lineageos.org/engineering/Qualcomm-Firmware/. Android boot process: https://android.stackexchange.com/a/220678/218526 and https://javigon.com/2012/08/24/from-poweron-to-android-the-boot-sequence/


text:
How to find phone when mobile data switched off and ringtone off
My phone fell out of my pocket while I was out walking the dog. The kids use my phone sometimes, so I had switched mobile data off. My wife is a very light sleeper, so the phone was on silent. This made it very difficult to find my phone.

Key parts of this solution:

I had previously used my wife's phone as a hot-spot.
I could call the lost phone and knew it was receiving the call.
I had a way to visit android.com/find to find my own phone and make it ring loudly.
I knew it had about 25% battery left, so I knew I could keep calling it.

The approach:

Enable hot-spot on a friend's phone which you've previously used as a hot-spot.
Keep calling the lost phone.  This will keep the lost phone "awake".  While it's awake, it'll look for WiFi.
Retrace your steps while carrying your friend's phone. Keep looking at the "Connected Devices" screen on your friend's phone.
When your phone appears in the "Connected Devices", you're close.
At this point you can use android.com/find.  How you do that will depend on what resources you have available.  You might have to phone home and ask someone to do it on a laptop, or you might be lucky enough to have an old Android device with you, connected to the hot-spot on your friend's phone.

To figure out the method, I went out to the beach with my wife's phone and an old Android of my own (no SIM).  I put the old Android on the ground and walked away with the hot-spot so I could figure out what the conditions needed to be for it to regain the WiFi connection to the hot-spot.  The key thing was that after leaving the old Android on the ground for a while, it didn't matter how close the hot-spot was, the old Android wouldn't pick it up ... until I pressed a button and made the screen light up.
It took a bit of experimentation, conviction that I would succeed, and a lot of walking, but I eventually found it.  Phew!
Edit
A note on battery consumption
When I first left the house with my phone for the dog walk, I noticed the battery was on 37%. I made a short call while I was out but didn't use it otherwise. While hunting for the phone, I must've called it 30 or 40 times, letting it ring for a minute each time. When I picked it up, the battery was on 20%.


text:
Does the bootloader reset after removing the battery?
After successfully flashing a modern custom ROM on my old phone, I tried doing the same with my girlfriend's old Lenovo Vibe P1m.
However, after mistakenly pulling out the USB cable at the worst time imaginable (flashing the recovery image), the phone wouldn't start anymore. Nothing worked - power button, power + volume up, down, both - nothing! So I'm guessing the recovery flash got corrupted. In great despair and guilt, I started looking for second-hand phones to swap the internal storage with.
After leaving it unplugged over the weekend though, the battery got drained, and, even though the power button still didn't work, the power + vol down buttons did show the boot menu, from which I managed to boot it normally.
That was a great story, but my question here is: what happened when I (practically) removed the battery? I know the clock resets of course, all cache goes away, but.. is the bootloader/recovery also reset?

The bootloader is in flash and thus is totally independent of the battery. Sounds more like the phone was in a state where you thought it would be off but actually it was running. May be a hard reboot (pressing the power button 10-60 seconds) would have had the same effect like leaving it unplugged over weekend.

First your recovery got corrupted during flash interrupt. Then you booted into recovery accidentially, which made device crash. It stucked in crashed state and did not react to buttons, until battery drained. After you charged battery it powered on normally. During boot, recovery was restored from recovery-from-boot.p


text:
Blur of the last app appears on screen
I've watched a physics video and I realized it is still showing part of screen. Why it originates?
Edit :
screenshot doesn't include the blur of the last video Ive watched

Reboot your device.


text:
I am having problems with the app when leaving Wi-Fi and connecting to cellular via mobile router on a samsung tablet
I am using a Samsung tablet for an application to manage a fleet of transportation vans. Inside the van we have a wireless router (Pepwave), when in the parking lot the Pepwave has priority to connect to the yards access point. This is to upload any surveillance video needed from the van.  I am trying to get rid of the data plan on the tablet and run off of the data plan on the Pepwave via Wi-Fi entirely.  It works great... for the most part.  The problem I am having is that when leaving the yard the Pepwave switches from Wi-Fi to cellular when the Access point is out of range.  The application does not refresh when this data provider transfer takes place.  All other apps like YouTube or internet browser for fine after connection reestablishes. The only solution so far is to toggle the Wi-Fi on the tablet on and off. Any suggestions would be greatly appreciated.

I would use an automation assistant such as Tasker or Automate.
You can set these to detect the WiFi change of state and then toggle your tablet's WiFi setting off then on automatically.
It may only be a workaround for the problem but it may be the simplest fix.

Thanks, i'll give it a shot.


text:
Cannot remove google account from Samsung android phone. Remove button greyed out
I cannot remove my google account from my android phone. Samsung XCover 4s Android 10.
This is a work phone and I only used my account to download whatsapp for work communication group.
I have deleted whatapp App.  I understand how to go to  -settings -account-tap on the gmail address I want to remove.  The problem is the Remove button is greyed out and diabled.
I can sign out of this device out from my laptop but all my contacts remain on the phone and my google account still on the phone.
I have tried clearing data in playstore, google etc.  I have signed in, signed out.  Sync ON then OFF.  I keep going back and the button is still not activated.
I really need help with this.  It is a privacy issue.

If it is a work account that Google account may allow your company to administer your device and therefore you can't disable the account. You should ask the admins of your company to remove your device from their device list, may be that allows you to remove the account.

Thank you Robert. Yes perhaps that is it. It is definitely encrypted with company securities and policies. I might need to get the phone reconfigured.  Will give it a go. I appreciate your reply. As I tried everything else it must be something outside the standard fixes.
Audrey

You can check in Settings -> Security -> Apps for device Administration which apps can manage your device. One should be from "Google for Work" or something like that. Not sure if it is possible to disable the app as administration app in this dialog.


text:
Phone Stolen- I removed my google account from the device, any way to still remote wipe?
I should have tried to erase the phone before removing the account from the phone, but was too hasty.  I've changed all my passwords, but can the thief still see all my old emails and messages?
Is there any way I can still remote wipe this phone?

Assuming your phone is locked your data is secure


text:
Is it possible to autocorrect the last word when sending an SMS?
iOS has the capability that, when pressing the send button in the Message app, that the last word gets autocorrected, without having to hit the spacebar after the last word. Is there a way to do this for Android, via a messaging app or particular keyboard, or some other means?

you have the freedom to install 3rd party keyboard app

@alecxs, that may be a good start. What's a keyboard app that does what is described in the question.

This has been requested many times (from as early as 2016) in various forums such as Reddit, keyboard forums but has not been addressed so far; to the best of my search. Maybe you could try Grammarly keyboard that corrects as you type?

I tested Microsoft's SwitftKey keyboard for you and it does not help.  I also tested a couple SMS apps, including Textra, and none of them helped either.

BTW, although I understand why you want this feature, it does have its risks and downsides.  Auto-correct can often insert unintended (and sometime inappropriate) words, so I personally don't mind pressing the space bar to see what it proposes.  But it would be a nice option for people like yourself that are willing to assume the risks in exchange for the benefits.

@RockPaperLz-MaskitorCasket, thanks for checking. And I think you are right about downsides. I think it depends heavily on what the person is used to. I'm sure I'll be used to hitting spacebar or something like that before sending texts.

Some Android devices auto-correct the last word when pressing the backspace button. So, if you type a word incorrectly and press space and it doesn't auto-correct the last word, you can press backspace and it will fix the error.
But this depends on the model you're using, in fact, some devices do the opposite: they undo the auto-correct.


text:
Phone Crashing due to too many files/directories on SDCard
My Galaxy S9+ running Android 10 crashes whenever I insert my microsd card containing upwards of 9000 sub-directories and 92000 files. The SDCard is using 330GB out of 400GB.
Basically the way this happens is that I insert the sdcard and then a notification displays saying "Checking SanDisk SD card... Reviewing current content
Obviously some kind of timeout is occurring when android attempts to scan the sdcard.
I have tried to disable the scanning a number of ways, making all the sub-directories hidden by prefixing them with a dot, putting a .nomedia file in every sub-directory and by not using any sub-directories and instead having all the files loose in the top level of the sdcard. This last "solution" actually works to stop the crashing but is unacceptable to me.
Basically my question boils down to this: Is there any way to disable android scanning the sdcard upon boot and when it is inserted ? I have rooted my phone so I could make modifications to the system to achieve this.
I simply want the sdcard to be usuable like on my linux desktop computer, I insert the sdcard, browse it with a file browser, and that's it. I don't want anything to happen by itself when it is inserted, no scanning, no indexing, nothing!
The MicroSD Card is formatted as exFAT

There is one major problem: the indexing operation builds the AndroidMedia database. This database is the only way to write to the sd-card for apps without root option. A lot of apps also use this database for finding files as direct file-system access is more and more reduced in newer Android versions. Therefore if the sd-card is not indexed then some apps may not be able to find some the files on this card or even add new files.

I don't need any apps without root access to be able to write to the sd-card, I use rsync with root access to write into the top level of the sd-card or I can just write on the sd-card from my PC. The only app I use to access this sd-card for reading is gonemad media player which can simply access a folder, no indexing required.

So if you know how to disable this indexing, please let me know ! :)

Disable auto-mounting of SD card and mount it manually. To disable auto-mounting edit fstab (https://android.stackexchange.com/a/217355/218526) or create a small first partition on SD card which gets auto-mounted, and not the second one. Another option is to format the SD card with a filesystem which isn't supported on SD card e.g. ext4 (https://android.stackexchange.com/a/220020/218526) but it can be mounted manually. Another option is to use a partition ID which isn't supported by vold.

So I am trying what you suggested now, what kind of partition ID is not supported by vold ? making a small first partition on the sdcard surprisingly doesn't stop the phone from auto-mounting in my case, the phone simply mounts both partitions even if one is ext4, and I don't really want to mess with the fstab so I think the partition ID trick could be my best option

I mentioned partition IDs in the second answer I linked in the above comment which you probably didn't read. Stock Android supports 5 MBR partition IDs and one GPT ID. So you can use some other e.g. Linux's ID (0x83 in case of MBR ...

... or 0FC63DAF-8483-4772-8E79-3D69D8477DE4 in case of GPT). Read fdisk/gdisk manuals to know how to set these identifiers. // As far as the auto-mounting of second partition is concerned, yes you are correct. Recent Android releases support auto-mounting multiple partitions from SD card or USB. But at least ext4 is not supported (only FAT and exFAT are), as evident from here ...

... and here. // Note that some custom ROM developers and OEMs may add support for more partition types and filesystems. See the case of LineageOS here and here.

Irfran Latif's comment answered my question, I ended up mounting formatting the SDCard as ext4 and mounting it from the command line with appropriate namespaces and permissions.


text:
Error with `adb sideload`when trying to install Android 12 in recovery mode
According to Google's "Get Android 12" guide,

The easiest way to get Android 12 Beta on a Google Pixel device is to enroll your device in the Android Beta for Pixel program.

but also

Alternatively, you can flash or manually install the latest Android 12 Beta build on your Pixel device. These approaches can be useful when you need more control over testing, such as for automated testing or regression testing.

I had previously joined the beta program to test Android 11 developer preview so for Android 12, I thought I'd try the flashy way.
I followed this guide to flash the update to my Pixel 3XL. However, when I finally typed the adb sideload command and pressed "Enter", it gave
adb sideload ~/Downloads/crosshatch-spb4.210715.011-factory-cbdbee68.zip
adb: sideload connection failed: no devices/emulators found
adb: trying pre-KitKat sideload method...
adb: pre-KitKat sideload connection failed: no devices/emulators found

and adb devices doesn't find any devices connected, although my Pixel 3XL is indeed connected through the cable, and is in recovery mode, up to step 6 of the guide. How do I get pass the error?

It turned out that I had not completed the final part of step 6 of the guide, namely, after selecting "Apply update from ADB" in Recovery Mode, I had not pressed the power button one more time.
Once I noticed that and pressed the power button, I suppose that that got my device ready for flashing from my Mac, and adb devices started showing the device, and adb sideload was ok.


text:
How to force use the front camera when the rear camera is not working?
I have Samsung Galaxy J4+ (SM-J415F). When I try the stock Camera app and also more than 10 camera apps from Play Store, all of them crashed. The rear camera is showing null, but the front camera is normal.

Is there a way I can only use the front camera?


text:
Getting a ton of notifications when going back from airplane mode
When I disable airplane mode, I get all notifications for events that occurred while the phone had been offline. Typically that would be a couple of hundred Facebook messenger messages. The phone sounds like a machine gun for a while when it plays the notification sound repeatedly.
Is there a way to turn that off?

Use the "Do not disturb" mode

So I enable that before turning off flightmode then?

Exactly. Than the notification sound should be silenced.

But there is no way to have that builtin into "turn off flightmode"?

Or try automation. For example, with MacroDroid, create a macro like this (download macro to test) //This records your notification volume level when you put on aeroplane mode and when you disable aeroplane mode, it reduces notification volume to 0 for 2 minutes (configurable) for your machine gun to stop :) and then restores to earlier volume level //I haven't tested, hence as a comment than answer

Correction - download and import Macro into the app

are you aware of android native app notification settings? just block such spamming apps completely, or disable sound at least

But I never asked how to get rid of notifications or sound. @alecxs


text:
Bridge phone's mobile data internet connection to a WiFi network without internet connection
I want to know if it is possible to basically bridge the mobile data connection of my phone to a WiFi network I am connected to where the WiFi network does not have a connection to the internet, so that the devices on the WiFi network can use the mobile data connection of the phone to access the internet.
I do not want to use a hotspot which is provided by the phone since I would like this to work automatically whenever I get in range of a device on the WiFi network and I don't want to have the phone's hotspot constantly enabled.
So basically, I want to use the phone as an internet connection for a WiFi network hosted by a different device. So, the phone would be the gateway/NAT for the WiFi network, which is hosted by a different device.
I know that it is possible on Windows since you can set a network device to use the computer's internet connection.
Is there a way to do this on Android? And if so, then how?

Possible with root. Let me know if you have a rooted device, I'll answer.

Unfortunately I do not currently have a rooted device, as all my previous attempts of getting root access have not been successful. I will continue try to get root access again though.

This Speedify app worked for me to bridge WiFi and cellular networks into a VPN profile.
Not sure how trustworthy they are though as I saw a few bad reviews online.


text:
Difference between factory reset and forgotten password erase all data
Is there a difference between performing a reset from recovery mode, or clicking on the forgotten password button on the locked screen, which offers to "erase all data"? I assume there isn't, but I wanted to be sure.
I don't know if this is useful information or not but I have a Redmi Note 8.
Thanks!
Update: Clicking on the "Next" button on the forgot password screen that informs me it will delete all data just shows instructions on how to get into recovery mode, so it turns out there aren't actually two ways to reset this device in case of forgotten password like it seemed.

Usually they both are the same. But it depends on the OEM. They can implement them differently.

Beware it will activate FRP and requires both, google play account + mi account to unlock!

Thank you for the answer and the tip! I was not logged in with a mi account so I assume that won't be a problem. As for google, would I be able to use it to unlock my phone instead? I read that it should appear as an option after several unsuccessful attempts but it never did for me, despite being signed in.

google stopped offering all screenlock by-pass options via google account, what you have read is therefore outdated

Thank you for the clarification!


text:
Installing an app (.apk file) from the native Android HTMLViewer 8.1
I have a tablet that's locked up pretty good (Android 8.1). Locked bootloader, managed android OS, proprietary apps, etc... I'm trying to see if I can get an app to install on it. One way I've thought of is through the Android HTMLViewer (version 8.1).
The tablet has a help file that's HTML, which opens with HTMLViewer. So I tried throwing an apk file in the same directory, and seeing if I could modify the help.html file with an anchor tag that points to the apk.
I've tried the following:
download

download

download

download

Each one gives that same result. The viewer simply tries to parse the file and gives me a huge jumble of whacky characters.
I thought about writing a small script in Javascript utilizing the FileReader object, such as this.
However, I'm quite certain that HTML viewer is so slimmed down, it probably doesn't support this object. It is compatible with jquery, so I suppose there is some hope for this.
Any ideas on how I could tweak this to accomplish my goal would be greatly appreciated.

I think your main problem is not the download but how you start the package manager which is responsible for app installation. But based on your description it is not clear how the device is locked. What have you tried so far and why does each method fails?

@Robert This device built for a secure environment... So it's super tight. No adb, slimmed down settings, fileObserver that deletes files that aren't supposed to be there. In short, it's one helluva challenge. It's a customized ROM. There was one exploit that worked, and has since been patched. So I'm looking for other potential.


text:
Is it possible to install WPA3 on the OnePlus3?
As I understand it, WPA3 is software, so it should be possible to install it, right? If so, how?
I would clearly like to have all my devices on the latest security.
Thanks!

No. WPA3 is not a software. It's a security standard which the hardware manufacturers follow. You need to use a phone which has a Wi-Fi chip with WPA3 support. And your WiFi router should also be supporting WPA3.

My router supports WPA-3. Is WPA-3 provided in the WiFi client hardware? I thought it was just an algorithm.

Theoretically it might be possible to make a device WPA3 certified by firmware upgrade. But I don't think that happens on Earth. If your device doesn't already support WPA3, it's very unlikely to get support ever. Here is what you need to do to make your Android device WPA3-compatible. Do you think you can do it on your own; changes to kernel, proprietary Wi-Fi HAL (firmware) and AOSP code (Android 10 at least)? Definitely not.

Unlikely.
OnePlus 3 was released in 2016.
Qualcomm announced WPA3 mobile chipset support in 2018.

Qualcomm Technologies expects to incorporate WPA3 security features into chipsets in summer 2018 for mobile devices beginning with the Qualcomm® Snapdragon™ 845 Mobile Platform

The Android framework started supporting WPA3 with Android 10.
and requires:

Wi-Fi chip with support for WPA3 and OWE

So in addition to using a device with a supporting WiFi chipset, you'll need to be running at least Android 10 as well.

Sounds like an excuse to get a new phone :D


text:
adb shell input key event : perform a toggle button on off action
Questions

How do   I in Android 10 toggle  on /off the hotspot using adb
Su switch on / off for shell- How do I turn on Magisk manager &&  goto security options  && there  turn on / off the option to grant su to  shell. (see attached screenshot ) using adb

This question is here since it pertains to programabiliy  of  Android not an admin question.

So far

Using this guide I can using this commmand come to the point of  simulating the action of entering hotspot settings
  adb shell am start -n com.android.settings/.TetherSettings

Hoever after that i am left with a situation that needs to perform a toggle switch on to turn on my Hostpot and in case of Magisk Manager I Need to get inside and then go to security options and turn off Su for Shell . How can above both be accomplished

Have you tried Macrodroid

hadnt heard that ...sounds interesting..will give it a shot. I'd imagine there'd be a simple way to simulate toggle on hotspot and some activity of magisk manager that can  be called via adb. I am not an Android dev but now feel like i should open a few things under the hood


text:
Oppo A15 mobile phone not detected memory card
I've an oppo A15 mobile phone. I purchased a new Toshiba 16gb micro sdhc flash memory card.BUT PHONE'S NOT DETECTED MEMORY CARD AT ALL?
I tried all file browser's but it seems obvious that it's actually going to need to be registered/somehow?

how did you format

I have tried file apps and Toshiba sites which seems to be SanDisk. I've a Toshiba flash memory microSD card SDHC 16GB WHICH I JUST CAN'T GET MY OPPO a15 -CPH2185AU_11_A.27- to detect at all, it's been days.

I didn't? Help would be great!

https://android.stackexchange.com/tags/adoptable-storage/info


text:
How to add a virtual/mock camera device internally/externally to android 11+ and set it as the default camera?
I need a virtual camera to override the system camera on android 11+ phone to stream frames that are sourced from an image file. Basically injecting image into the camera device.
I need it to test camera functionality on mobile native apps/webapps.
I would have easily done it with a custom camera app before Android 11 but now it isn't possible. See link!
Assume that I have both root access and unlocked bootloader on my phone.
Any Ideas?

Ideas that I was thinking of:

Emulating a external USB camera to feed only an image: But how do I set it as a system camera?
Adding a loopback device as a kernel module and makng it the default camera device. https://github.com/umlaeute/v4l2loopback


text:
Determine power usage for specific timeframe
Under battery usage, I can see “battery usage since full charge,” broken down by app (and, if toggled on, non-app phone processes). I’d like to see that breakdown but in a more specific timeframe (and, if possible, prior to my last full charge).
The phone is a Motorola “moto g power” running Android version 11, security update June 1, 2021.
Context:
Last night, I went to bed with my phone at 49% (I checked because had been a bit since I charged it); this morning it was dead. The battery usage graph showed four days of steadily-declining battery, to just under 50% as I saw it last night, followed by a nose-dive to 0% in a few hours. The breakdown of usage showed about a third used by Firefox (makes sense, that’s the overwhelming majority of my usage of the phone), about a third used by “mobile network standby” (which makes little sense, I have pretty good signal), and the rest divided among a bunch of different things.
My assumption is that Firefox was the dominant usage over most of those four days, and mobile network standby is what caused the precipitous drop last night. However, I don’t know that—it could be that mobile network standby is always draining my battery more than I think it is, and something else (probably increased usage by Firefox?) last night caused the drain.
Question:
Is there any way to get that same battery usage breakdown, but for just those hours last night, rather than “since last full charge”? For that matter, I have since charged the phone, so now it displays no data since it just charged—is the record I described above just gone now?

I am afraid the data you are looking for is lost. Battery stats are re set when you face shutdown at 0% or when you  charge to 90%

@beeshyams The data I describe in this question came after the phone died at 0%, charged some, and restarted, so I know the first half of that is untrue (now, for this phone, anyway). Even if the data is gone, though, I would want to know for the future.


text:
Remove Termux's extra keys
I can reduce the extra keys on Termux to one row like this:
extra-keys = [[ESC, TAB, CTRL, ALT, {key: '-', popup: '|'}, DOWN, UP]]

but this doesn't get rid of them:
extra-keys-style = none

How do I get rid of Termux's extra keys?

add the following line to the ~/.termux/termux.properties file:
extra-keys = []

apply the changes by running (or restart Termux):
termux-reload-settings


text:
How to dictate single letters and number to Android?
at the job we routinely use a web application through our smartphones and on one of its screens we have to input the chassis number of cars, technically called V.I.N.. Just to let you know, a likely VIN could be something like "LJCP013X00123...4F"
We would like to dictate those VINs because we usually wear gloves while we use this web app.
Now... I tried to dictate single letters as "El", "Jay", "Cee", "Pee", "Zero", and so on.
But Android goes nuts, tries to come up with a word that obviously does not exist and just stop listening.
Do you know if there is a workaround to dictate single letters and digits to Android?

So it turns out this behaviour was partially dependant on our application. Our application used to mingle with the dictated text to convert in upper case and to remove blanks while dictating. Once this behaviour has been turned off, we are able to dictate letters and digits too.

And how exactly did you dictate?


text:
How to debug dysfunctional internet access on mobile data?
On a new Shift 6mq with Android 10 (light version without Google services) apps don't have internet access via mobile data. Unfortunately I usually use WiFi so I didn't notice when internet vi mobile data stopped working.
Since I've fiddled with the system a bit (unlocked bootloader, installed Magisk + some plugins) maybe the best would be to first reset everything and start from a working system but I'm curious how to find the broken link, so maybe you give me some hint's how to narrow down the problem generically.
Here is what I'm observing and what I already tried:

Apps don't have internet access via mobile data but they do via WiFi
I cleaned the sim card and tried it on another phone
therefore I rebooted the phone
mobile network is activated, airplane mode deactivated
in system settings mobile data seems to be working, carrier is shown, no problems reported
data saver is disabled
Data usage is 0 bytes which looks like even system layer has no access
Magisk, AFWall+, XPosed deinstalled
Check your APN settings - maybe you have to transfer them from a working phone

Now, are there any further things I can check to find the root cause? Maybe via adb shell?

Are you sure AFWall+ is not blocking it? Start with ping and dig. Then check network routing with ip rule and ip route. Use iptables to check firewall blocking.

I even deinstalled it, but it's not been AFWall but a wrong APN entry. Was a bug in latest firmware..


text:
Blocking torrent in Android
Is it possible to completely block torrents in android?
I have tried to use many porn blockers like BlockerX, Remojo etcetera. I can block the torrent websites by blocking the keyword - 'torrent' .But there are many torrent search apps like Torrcrow and Torrent Revolution which can still fetch the torrent results. I also used SafeDns to block it but they all seem impotent.
Can we block torrent downloading at system level? Like making it impossible for torrent client to connect with peers or disallowing the torrent search in different apps.
Any suggestions would be greatly appreciated. I want to bolster self control that's why I need to implement this feature.

There's no universally working method. See How to effectively block torrents on my network? and How to block torrent sites? to get a general idea why it's so.

@Irfan Latif...Isn't it possible after rooting the device?

May be. But what would you do with root? Blocking ports or IP addresses, DPI, uninstalling apps. These can all be done without root too but aren't very effective.


text:
How to automatically turn on the screen on double touch of turned-off screen?
Is it possible to turn on my Android 10 phone's (Samsung Galaxy S9) screen like my Android 11 tablet (Samsung Galaxy Tab S6), by double touching the turned-off screen? Or when detecting that it has been lifted up or somehow it changed its orientation a little bit?
I've searched this website but did not find something useful.

Only some ROM developers add that feature.

You can enable "Lift to wake" from:
Settings -> Advanced features -> Motions and gestures
That's a feature in Samsung's OneUI.

Please mention your device and/or ROM. It's not a stock Android's feature.

@IrfanLatif That's a feature in Samsung's OneUI.

You have two other options in addition to what Omar mentioned.
Settings > Display > Navigation Bar > Hard Press Home Button
With this activated, there's an area at the bottom of the display, that when pressed, will wake the screen.
Also, if you set the Always on Display to 'Tap to Show', it will wake the Always on Display (might not be what you're wanting though).
Settings > Lock Screen > Always On Display


text:
Is date safe in encrypted phone without passcode
If my phone does not have a passcode, but is encrypted by default, and I factory reset it, is my data safe? Or is there a way someone can decrypt it since it had no passcode

If no password is set default_password is your password which is used to derive keys used for encryption. With factory reset they should be gone and cannot be recovered.


text:
Samsung infinite scroll apps
I recently bought a Samsung smartphone which has its OneUI.
App drawer has horizontal scroll, but does not support infinite scroll. Is there any setting or an app I can install to get the infinite scroll?
To elaborate, in the app drawer, apps are arranged on different pages, with 4 x 5 apps per page. Suppose I'm on the last page, and I want to open an app in the first page, I'll have to scroll left all the way back to first page and then open the app. If infinite scroll is enabled, I can just scroll right and it would bring me to first page.

Try different home launcher apps. There are many with that feature.

Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.

Did you try Nova Launcher? It supports, if I understood your question correctly

Okay, will try that. Though I feel it's overkill to use a full-fledged launcher just for this small task... A small setting or an app would be better.


text:
`UPDATE.APP` file in Huawei firmwares
I found an UPDATE.APP file inside of TRT-LX2 firmware ZIP (ROM), but I want to know what does the file do? What does it contain?

Huawei OTA updates are traditionally slow for various reasons. However, Huawei let's users manually update their firmware manually and this is where update.App comes in. It has the boot and system image files.
User downloads the latest firmware from Huawei website, extracts this update.App and flashes it to update the firmware to the latest. See this blog for the steps. This process may vary for your device and it's best to check on XDA forums to be sure.
Broadly speaking this is the  purpose of the update.App, though the process seems to have become more complicated over the years (I owned a Honor 6 phone about 4 years ago)


text:
How to trust a Root CA for VPN use on Android 11
I want to connect my Android 11 phone to a VPN. The VPN is authenticated by a certificate signed by my own Certificate Authority (very typical).
I load the Root CA on the Android device by importing from local storage and the Root CA shows perfectly fine in the UI.
However, when connecting to VPN, the logs I get show that it can't validate the VPN server because it's certificate can't be validated because the Root CA isn't trusted.
Yet, the Android settings UI shows it is trusted.
The exact log message I get with logcat is:
received end entity cert "CN=xxxxxxxx"
received issuer cert "C=US,ST=......... CN=Intermediate CA"
received issuer cert "C=US,ST=......... CN=Root CA"
   using certificate "CN=xxxxxxxx"
   using trusted intermediate ca certificate "C=US..... CN=Intermediate CA"
checking certificate status of "CN=xxxxxxxx"
   using untrusted intermediate certificate "C=US..... CN=Root CA"
checking certificate status of "C=US.... Intermediate CA"
   self-signed certificate "C=US.... CN=Root CA" is not trusted

That does not make any sense as both the Root CA and Intermediate CA are loaded in the user's trusted CA store.
The certificates were created with OpenSSL, have the CA=True flag, etc.
Anyone knows how to get that to work?

How long is the validity time of the VPN cert? In Chrome Google started to accept only certificates with a validity period of less than 2 years (or less I am not sure). May be Android now behaves similar for VPN certs?

Had this thought also. CA should be able to be much longer than 1-2 year... what Chrome does not accept is server certificate being longer. I verified and even with a 1 year certificate identifying the VPN endpoint, it complains the CA is not trusted.

Why is the root CA certificate sent to the client?

@ecdsa That's how PKI works. TLS works the same. When you go to an HTTPS web site, the web site sends you it's certificate which is signed by a CA and your browser validates the certificate because you have the CA already trusted in your browser (done by Google, Mozilla, Microsoft). The CA certificates must be on the client station.

That's exactly why I asked why the root CA certificate is sent. It makes no sense as the client has to trust that beforehand (you say so yourself). It can't establish trust in a self-signed root certificate received from a random host it connects to. So why does the server send it? Also, that the client doesn't find a trusted version of that certificate (it only finds the received one) could indicate that there is something wrong with your PKI (e.g. the root CA you installed on the client not being the one that issued the received intermediate CA certificate).


text:
How to remove the Ubuntu Touch kernel at startup?
I have tried the latest Ubuntu Touch on Nexus 5, but it was useless because an exential app doesn't work with Anbox.
So i want to try an Lineage 18.1 unofficial image.
I have installed the image with no problems.
But I cannot remove/erase the ubuntu kernel at start.
I have tried those commands
fastboot flash bootloader android/roms/twrp-3.3.1-0-hammerhead.img
Sending 'bootloader' (13290 KB)                    OKAY [  0.640s]
Writing 'bootloader'                               FAILED (remote: 'invalid bootloader image
')
fastboot: error: Command failed

fastboot flash recovery2 android/roms/twrp-3.3.1-0-hammerhead.img
Sending 'recovery2' (13290 KB)                     OKAY [  0.640s]
Writing 'recovery2'                                FAILED (remote: 'partition table doesn't exist')
fastboot: error: Command failed

fastboot erase bootloader
Erasing 'bootloader'                               FAILED (remote: 'Partition table doesn't exist
')
fastboot: error: Command failed

How to remove the kernel at startup?

you are mixing up bootloader with boot (which is dangerous). furthermore you are mixing up boot with recovery. bootloader is proprietary and is not changed in any way from ubuntu touch

Does this answer your question? What is the difference between aboot and boot?

Thanks for the info, so Ubuntu touch has modify the application bootloader?

So a correct title can be "boot" instead of bootloader?

Solution found, works on Linux. The phone in example in Nexus 5 so you had to adapt to YOUR phone.
WARNING: , I am not responsible for any kind of damage to your phone, follow this solution at your own risk.
Connect the phone to usb port of a Linux pc, called "host", all commands must be run from this pc.
a)Download the factory image for Nexus 5 then connect the phone to pc WARNING: IS FOR NEXUS 5 HAMMERHEAD, you MUST select another image if use another phone.
ensure this command return the right thing
fastboot device

b)then extract the zip image, enter in the dir created and run
sh flash-all.sh

from the computer host
It will reboot in the factory image of Android 4(sic!) and then you can install Ubuntu touch or a "free" Android rom.


text:
Headphone mode keeps toggling between ON and OFF on its own. How to fix this?
My Xiaomi phone keeps switching from "headphone mode" to "normal mode" constantly (~2-3 times per second), completely on its own. This persists even if headphones are actually plugged in.
Before this is marked as duplicate, questions like this one and many others on the internet have the issue where their phone is stuck in headphone mode, not toggling on its own, so the solutions therein don't work.
I tried:

Cleaning the headphone jack
Plugging headphones in, turning the phone OFF, then ON, and unplugging.
Downloading "toggleheadset" apps. These work in the sense that if headphone mode is ON it switches it off and viceversa, but 0.2 seconds later it changes again on and off and on and off and on and off...

There must be some way of "disabling" the headphone jack completely (I have a Bluetooth headset so idc). Resetting the phone should be a last resort, and I don't think it would fix it.
Edit: following beeshyams' comment I went into Safe mode, but the behaviour persisted. I tried "disable headphones" apps but they did nothing. Finally I did a hard reset, but this didn't fix it either :/

I guess, taking it to service center is the only alternative given that factory-reset didn't help! //Your edit doesn't say if you flashed firmware. Possibly you could try that too?

I didn't know what that meant! I spent too much time on it but I figured out how to do it. However, I got an error: "Erasing 'boot' FAILED (remote: 'not allowed in locked state')". After Googling this it seems there's no easy way around this. Oh well


text:
Storage isn't loading
I'm trying to clear up space to install Snapchat, and I have no apps to uninstall. So I go into settings to clear space from some apps. I load the "Apps" setting in the storage settings. The screen loaded, but all the apps say "Calculating" under them. And I can't clear the storage in the apps. If anyone knows how to fix this, please let me know. Thanks!

Try from safe mode. Google how to enter safe mode for your device

clearing app cache is per-app setting, therefore locate the storage settings in the app settings (opposite)


text:
Network unlock a never-activated phone
I currently have a Motorola Moto G6 Play that was originally purchased 3 years ago from Virgin Mobile USA (which doesn't exist anymore), and was never activated. Interested in getting it network-unlocked, I called Boost Mobile (which acquired Virgin Mobile USA's assets), but was told to do that I'd first need to activate it for at least 12 months as per their contract.
Is there any way around that requirement? Does such a contractual requirement to activate a phone before network-unlocking it last in perpetuity, or does it expire at some point? It's pretty unclear what the helpline person was telling me in this regard.

Policy matters are unrelated to Android. For technical details regarding network lock see https://android.stackexchange.com/a/217365/218526

Does this answer your question? How does carrier/network lock work? How is it implemented?

@IrfanLatif: Where can I resolve such policy/legal details?

@RockPaperLz-MaskitorCasket: No.

@DanielR.Collins sorry I don't know.


text:
Notification showing on my android without a specific App
I have a Xiaomi Note 9s phone updated with the latest security patched running
MIUI Global 12.0.4.0(RJWMIXM)
Android version: RKQ1.200826.002
Android Security Update: 2021-07-01
I am getting a notification on my phone that does not specify which app is sending it. It looks pretty phishy and I have not tapped it yet, afraid it might be from an attacker or a virus. Especially that it is titled "Delete User" in Arabic. I have taken a screenshot and added to my question here. The Arabic title translates to "Delete User and the body translates to "Listen to your own voice"
I tried to block it but it cannot be blocked as every time I click on "more settings" it displays a message saying "the app wasn't found in the list of installed apps".
How is it possible that I receive a notification from an app that isn't installed on my phone? and could this be an attacker? I tried using the built in security scanner and it said there are no viruses.
What should i do to get rid of it?

Maybe some website you visited on your browser? Delete the cache of browser, possibly cookies too and check?

Could you also write the Arabic text on here, just in case we need it to do some research?

Sure, The Arabic text is:
مسح المستخدم
It translates to: Delete user
The 2nd line text is: استمع الي صوتك
Which translates to: Listen to your voice

I do allow notifications from my chrome browser, like both notifications above and below this one, but as you can see on the upper left corner, it specifies which app is sending it. This notification is like a ghost thing! No app, no references to anything and I am afraid it might be a phishing attack

Do you have a guest or additional user set up on your device? Top searches suggest that //Also tag the person whom you want to reply to - otherwise they won't get notified (e.g. @guy who commented)

kindly share output of 'adb shell dumpsys notification — noredact'


text:
Auto IMEI randomization in Android (like WiFi MAC randomization)
How do I set the IMEI number to automatically randomly change every time I connect to a cellular network?
Android 9 introduced a feature that was a huge boon to the privacy of Android users: WiFi MAC Address Randomization.

https://source.android.com/devices/tech/connect/wifi-mac-randomization

Starting in Android 8.0, Android devices use randomized MAC addresses when probing for new networks while not currently associated with a network. In Android 9, you can enable a developer option (it's disabled by default) to cause the device to use a randomized MAC address when connecting to a Wi-Fi network.
In Android 10, MAC randomization is enabled by default for client mode, SoftAp, and Wi-Fi Direct.
MAC randomization prevents listeners from using MAC addresses to build a history of device activity, thus increasing user privacy.

As stated, this feature is enabled by default in >= Android 10. So now when you connect to a WiFi network, the owner of the WiFi networks are less able to track your activity between networks.

MAC addresses are the unique identifier of the hardware device that connects to a WiFi network.

IMEI numbers are are the unique identifier of the hardware device that connects to a cellular network.

While this change in Android 9/10 greatly increases a user's privacy on WiFi networks (ie MAC randomization), I've seen no such improvements to increase a user's privacy on cellular networks (ie IMEI randomization).
IMEI randomization is especially important in-light of recent research discovering that loads of PII (including IMEI numbers) are being uploaded to both Google and Apple on average every 4.5 minutes

https://www.scss.tcd.ie/doug.leith/apple_google.pdf

Abstract — We  investigate  what  data  iOS  on  an  iPhone  shares with  Apple  and  what  data  Google  Android  on  a  Pixel  phone shares with Google. We find that even when minimally configured and  the  handset  is  idle  both  iOS  and  Google  Android  share data  with  Apple/Google  on  average  every  4.5  mins.  The  phone IMEI,  hardware  serial  number,  SIM  serial  number  and  IMSI, handset  phone  number  etc  are  shared  with  Apple  and  Google. Both  iOS  and  Google  Android  transmit  telemetry,  despite  the user  explicitly  opting  out  of  this.  When  a  SIM  is  inserted  both iOS and Google Android send details to Apple/Google. iOS sends the  MAC  addresses  of  nearby  devices,  e.g.  other  handsets  and the  home  gateway,  to  Apple  together  with  their  GPS  location. Users  have  no  opt  out  from  this  and  currently  there  are  few,  if any,  realistic  options  for  preventing  this  data sharing.

Similar to the WiFi MAC randomization feature, how can I setup IMEI randomization? If this is not currently possible, when is it being planned to be added to AOSP?

Read more to understand why apps ask for IMEI info (though answers are dated, they are valid), so if you randomize them apps may misbehave, as in, music app not pausing when you get a phone call // If you still want to do that, root your phone, install Edxposed modules like XPrivacyLua // when is it being planned to be added to AOSP - ask Google, not here-no one here can answer that

IMEI is used for legal purposes e.g. to identify mobile theft and to enforce carrier agreements wit users. I don't think it'll happen ever.

MAC addresses are used for legal purposes e.g. to identify a device on a wifi network. I didn't think WiFi MAC randomization would ever be baked-into AOSP and enabled by default, but here we are. It seems at least some of the architects at Google care about privacy

MAC address is used to identify a device in a local network, just for the purpose of DHCP IP assignment and L2 routing in Ethernet protocol. IMEIs are used to identify devices by MNOs who operate at global level. There are authorities who allocate IMEIs. And IMEI cloning is a crime in many countries. So MAC and IMEI cannot be compared. They are entirely different types of identifiers.

But your concern is valid. Govt. agencies use IMEI to track you. This must be circumvented. But IMEI randomization doesn't seem to be an option. Even if it is, there are other ways to track you. The entirely isolated operating systems of SIM (Java) card and baseband processors of 3G/4G modems. Who known what runs inside them.

It should be noted that oppressive governments aren't the only issue. Of course there's many that have a history of violating human rights, dragnet collection of innocent people's PII, and also having this data stolen in breaches. But there's also countless malicious apps that use IMEI numbers to track & sell user's data without their permission. And malicious multinational corporations that have been found guilty of the same. The point is: the best way to keep your data safe is to make it useless -- either by widespread adoption of randomization (eg MAC) or standardization (eg Tor Browser).

Since Android 10 normal user apps cannot read IMEI: https://developer.android.com/about/versions/10/privacy/changes#non-resettable-device-ids. So it's no more a big issue. But the ROMs provided by OEMs aren't open source. They have privileges to read everything. So is the privileged Google Mobile Suite (Play Services and company). And as I said hardware components aren't open source like BP. So what will you gain by just ensuring that apps are not be able to read the IMEI. The bigger privacy concerns remain unresolved.

https://forum.xda-developers.com/t/imei-change-and-legality-mods-please-read.4155591


text:
What is this random arrow in the centre left of my Chrome screen?
Arbitrarily an arrow appears on the center left of my mobile Chrome browser. I cannot even click this arrow. It doesn't really affect any underlying features of my web browsing, at least not on the obvious. It is just a bothering little arrow, which has no reason in being there.
My phone details are:
My phone is: Samsung Galaxy M31
Model: SM-M315F/DS
Application version: Chrome 92.0.4515.131
Operating system: Android 11; SM-M315F Build/RP1A.200720.012

Attaching screenshot of my Chrome browser where the arrow can be seen.
As far as I can recall, this arrow disappears without any apparent activity.
Had anyone seen this? Or can shed some light as to what this is? And if it can be removed?

As suggested in Google forums-When I rotate the phone an obnoxious arrow overlays the middle of the screen?, force stopping worked.
You may try restarting if issue is not resolved.


text:
Couldn't unlock phone and stuck in a reboot loop after my battery completely died once, sideload doesn't fix
So one day my Pixel 3a's battery died (and since I quite urgently need the phone) I force it to boot up (cause sometimes you can still juice out a few minutes) but as it booted up, the wallpaper displayed correctly but the date/time is wrong, when I drag down the control center it's blank (though it sometimes pop up fine, but I think just once), stuck within plane mode (though I doesn't turn it on prior the shutdown), battery showing blank while in power off it clearly shows it charged to certain percentage of battery, and unlocking doesn't do anything. Then after a while the phone just reboots itself again and now I'm stuck within this loop.
My first thought is to just re-install the system through adb sideload as perhaps something corrupted (as once in a while, after many reboot a recovery mode like notice will pop up stating that the system might be corrupted and if you saw this message multiple times, you might need to try factory resetting). But now I sideload the newest pixel 3a official image (11.0.0 (RQ3A.210805.001.A1, Aug 2021)) I'm still stuck in the loop I described above, I still can't unlock my phone and my phone just keeps rebooting it.
Previously (prior to sideloading) I remember recovery mode showing:

WARNING: Previous installation has failed.
Your device may fail to boot if you reboot or power now.

(Though it may be result of me for doing other thing like testing apply update from SD card or letting adb to timeout as I forget to download the image first.) But it seems that after sideloading the warning doesn't show up, so perhaps I did sideload it correctly? (So as getting a 0-return value) But still the issue persists.
But since I've gone to the newest version of the image, it seems that I couldn't downgrade it anyway. So is there any other way to solve my problem (besides factory resetting it as I kinda want to maintain the data within it, and I still couldn't access my data through USB currently).
I don't think I've enabled USB debugging prior this event, so unless enabling it is possible to achieve without needing to enter the system (like settings), otherwise it makes no help.
I thought sideloading official image meant the system will be re-install completely such that any corrupted file would be fixed. Is it the case? And since there seems to be no cache in Pixel 3a, does it means something other than system might have corrupted? And if so is there still hope to recover it?

system is read-only and most likely not the cause of boot-loop. The only writeable partitions are userdata and cache - both will formatted on factory reset (which will fix boot-loop)

@alecxs but is there any way to recover the phone without resetting?

No, there is not (except your bootloader was unlocked previously)

@alecxs How about methods to backup photos? As since I haven't unlock bootloader yet, it seems I couldn't mount the phone through adb, which makes me wonder is there any other way to (perhaps bypass the unworking system) and directly access the file system. Or if the partition is encrypted by default (which I think is likely?), is it possible to unlock the phone and access it through like Android Studio's emulator?

one purpose of bootloader lock is to prevent direct access to file system, there is nothing you can do. If stock recovery options cannot fix boot-loop, this device is garbage. check your clouds https://photos.google.com, https://drive.google.com/drive/backups

sometimes there are old instructions left after failed OTA. try to wipe cache partition (if exist) it won't harm userdata. try to swap slots from fastboot (if possible). last, try re-install ROM via apply update from SD card

fastboot --set-active=a (or b)

Good to know I'm not alone. Since data is unrecoverable, I'm trying a factory reset. Not sure it will fix the freezing bootloop. https://android.stackexchange.com/questions/241453/is-the-data-on-flash-memory-plain-or-encrypted

During reset I got a E:can't send spi message: Try again error a whole bunch. Not sure what on the board or which peripheral uses SPI, but it's possible that component failed, and the firmware panics because it needs to communicate with that peripheral to boot. After the standard update screen, but white this time instead of black like when I sideloaded an update via ADB, the boot freezes in the exact same place.

I ended up discovering that my two front-facing cameras were plugged back into the wrong slots. I had them flipped around. If I unplug them, the phone starts. If I plug them back in opposite, it starts. Too bad I already factory reset.


text:
Note 20 Ultra, deleted files
I lost the ability to post on the other form of this question.
If the bottom comment is right and there is 0 chance of decryption or rooting the deleted data, how do police do forensic downloads?
Does the Samsung Note 20 Ultra have discard enabled by default? And if an app DB was deleted over 2 months ago, is this recoverable?
I know that Android trims/discards every 3 days, but I also assume it depends on whether the file system is set up for this. I need to recover deleted chats from an app that was uninstalled over 2 months ago then reinstalled from the secure folder. I have the PIN, so would data recovery be possible?

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.

Comments are not for extended discussion; this conversation has been moved to chat.


text:
How to I unlock the bootloader on an Honor 7s?
I've attempted to unlock the bootloader using the fastboot method using ADB tools on my pc, which have yielded no results. I open powershell in the folder containing all the ADB tools and run "adb devices". My phone (not yet in fastboot) shows up. I than run adb reboot bootloader and my phone opens up into fastboot. All my screen shows in that is fastboot FRP unlock. Than running fastboot devices yields no output and no following commands work. Am I doing something wrong?

Does this answer your question? Can we consider Huawei phones as unrootable?

Does this answer your question? ADB can discover devices but not fastboot

No, I've tried everything mentioned and nothing works

I have disabled driver signature before that comment, but I had not done some of those things within that guide. I will try them out

No, this guide dosent work either. Should I just take it that my phone is not rootable? I've tried every possibility now

I've managed to get it working after reinstalling a driver and it all works up to the fastboot oem unlock part. How do I get the code for my bootloader? DC unlock costs money and its no longer available on the Huawei website. I do not plan on spending anything

Of course one must buy 4 credits on https://www.dc-unlocker.com/buy


text:
Why does encryption doesn't work/apply to access device storage or Google photos or drive when we upload a file from device/cloud to any webpage/apps
Example : YouTube, Facebook, Instagram, Chrome ( any app )
If I'm accessing YouTube or any other app where I can upload content from Android device with or without the app lock features, whenever I click on add file, it doesn't ask for gallery password even though I have my phone's gallery encrypted with app lock, infact, in some apps even the hidden files also appear. What's the point of having app lock if anyone can access all the files through any other app's upload feature ? Does Android not provide any security or encryption facility to access  device storage when accessing it (storage) through a third-party app? Anybody can access Google photos, drive storage etc without any password if they have access to the device, doesn't matter whether the apps are password protected or not.
To explain further , in this case let's say my Chrome isn't password protected, if anyone has access to my device's Chrome browser, they can access all of my content from Google photos, drive, phone's storage etc just by using any webpage's upload file feature. What's the point of keeping password pr applock to gallery / or Google storage if they're acceible like that?
Faced this issue is most Android devices ( Redmi note 5 pro, Samsung devices, Nokia, oppo, vivo etc.)

Isn't it already visible in the app name "applock"? It locks apps not files. A more fine granulated access system to files on the sd-card section was introduced with Android 10/11 - it is named scoped storage.

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.

Does this answer your question? Check for the existence of files without root privileges


text:
Which user-agent string is most optimal for use in ADM or similar download management applications?
I thoroughly comprehend what a user-agent string is, and how to spoof/parse them.  What I can't seem to find in the endless sea of search results that all speak about the same two aforementioned points is: which should I use?  For my use-case, it'd be specific to using Advanced Download Manager & Torrent downloader (ADM) on an Android device for downloading videos.  Which — if any — would be optimal in terms of file accessibility, speed, stability, etc?  Which should be avoided in the practical sense?  I understand this is likely dependent upon the web developer's end, but in a more general sense I'm wondering if the UA has any inherent impact to these factors, if all else remains the same?
EDIT: to clarify, from my observations the typical use cases seem qualitative — whether a particular file is served or not, i.e., true|false.  I'm wanting to confirm there are no other functional impacts from the user's standpoint aside from whether a file is made available or not (disregarding build variants based on UA, so assuming for example's sake that they are identical).

This question seems to target a specific Android app but you only denote it's short name. In case you refer to an app please always include the full name and a link to a store where it is available. Regarding your question: A user agent string is just a string. A server can use it or not.

@Robert I've edited to include the link to application.  Regarding the use case, the application settings include a list of browsers and a "custom" entry specific to the app itself (listed as "ADM", have not parsed the string myself to see what the difference is).  Am I to understand that the only functional differences are qualitative (pass/fail for server to serve file), nothing else?

A user-agent string is just one of the many http headers your browser sends to the http server when requesting a webpage. Usually it contains information about your browser version and operating system. I don't think it has much to do with file accessibility, speed or stability. The only reason one would want to fake user-agent can be due to compatibility reasons, or in some cases privacy reasons (but the latter is a different debatable topic). So your definition of "optimal" is quite unclear here. Keep using the default one, unless you have a specific problem.

Well, honestly, while it might be possible, a server discriminating download speed/stability based on user agents seems a bizarre idea.


text:
What is causing these elements/artifacts to be rendered as shown?

My wife changed my minimum width recently, but this hasn't broken browser rendering before in any of our previous devices.  Any ideas?

Clear the browser cache and reload page.

@Robert Did not fix the issue


text:
Apply system wide screen rotation
I've recently replaced a screen on my phone and it displays images slightly rotated. It's just a couple of pixels but it's really annoying.
I was wondering if there was some setting or API method to rotate whole system image, not just a single view image?

Hi, the title stated "Apple". Is the issue about iPhone or Android devices? Note that for Apple-related products, it's off-topic here but on-topic on our sister site, [apple.se]. Otherwise, consider mentioning the device model and Android version.

You can't rotate the content for just a few pixels. If the screen is mounted with a small rotation then you have to fix that by rotating the display (repairing).

@Robert No, it's not the screen that is rotated, it's an image. Straight lines drawn by the applications are not parallel to the pixel lines.


text:
How to safely delete/destroy data from a bricked phone?
I have a "Xiaomi Redmi Note 8 Pro".
My phone is bricked beyond repair (as far as I can tell).
I want to safely delete all data before I throw it away.
Can I drill a hole in somewhere?
I do not what to risk my health by short-circuiting the battery or something like that.
Edit:
My lock screen has 4 digits.

Typically you will find a tear-down videos for each phone model so you can so you can estimate which component is located where in the phone.

https://closingtheloop.eu

Does this answer your question? Wipe data from dead Android phone

Might you explain "bricked beyond repair" it could be the most ecologically way trying to repair and do a factory reset. Also you can learn about data recovery. If you know the pin and cannot recover data, who else could? Indeed the right pin is the only gate to recover data, there is no other way. This user harshly wanted back his data and badly failed on gatekeeper (spoiler: it turned into 480 seconds timeout between bruteforce attempts, see chat) https://android.stackexchange.com/q/239189

Unless you have a means to power the device on and wipe the data properly, you need to physically destroy it. The data lives inside an eMMC chip which is conceptually just a SD card soldered to the motherboard. It will not be damaged by salt water (suggested in another answer) or other means that do not physically break the chip into tiny bits. Unless you understand how it works well enough to judge what would destroy it, just assume most things don't.
Pry the phone open, remove the battery, then destroy the rest of the phone physically in a trash compactor or whatever.

Option 1)
In case the phone still boots in recovery mode (usually hold Vol Up and Power-on) and you have root access you could run the command:
dd if=/dev/null of=/dev/block/by-name/userdata

This will put 0x00 to all your userdata.
As you said, the risk of drilling the battery with a drill is too high.
Option 2)
If there is no power at all, you have to open the device to find the main board and destroy it. And it's a little complicated process because you have to put heat on the screen to unglue it from the back part. And then just remove the main board and put holes on every shield you find.
Option 3)
I have seen many phones been destroyed by a professional company. What they did was to put the phone into salt water for about 30 minutes. It makes all boards completely unusable.
If you're just a regular user (not a public person) option 3 should be enough. But if you are really, really worried about your data getting in wrogn hands, I would say option 2 is better.

Option 4) just keep it as is, because data is already secure by login credentials, encryption and bootloader lock

"What they did was to put the phone into salt water for about 30 minutes. It makes all boards completely unusable." <-- this does NOT securely delete anything. The data is inside the eMMC chip (essentially a SD card soldered to the motherboard) and will not be harmed at all by salt water.


text:
Google Calender: Prevent the notification of an event disappearing after the event time?
Say, I have set a monthly event at a specific time and date on Google Calender. I have enabled "1 minute before" notification for it. The notification shows up at the expected time, but if I happen to be doing something else and think I will do the event later, after that time, the event notification automatically disappears from the phone, even though I have not swiped it out. This sometimes makes me forget that I should do the event.
Is there a way to make the event notification NOT go away even after the time of the event, until I manually swipe it out?

That's the designed behavior of events and Google Calender doesn't provide a way to keep notification alive.
You can instead enable reminders on your calendar and set up a reminder  so that notification stays alive till you manually dismiss.
For more see What is the difference between Events, Reminders and Tasks? and
What is the difference between a reminder and an event in Google Calendar?

If you still want to use events, you can mail yourself the notification text and see the email unread notifications

I've been using a workaround for this for some time - it's an app called Events Notifier (I have no affiliation with the app). You turn off notifications from your calendar app and allow the notifier to present the notifications instead. The notifications will not disappear unless you explicitly dismiss them.


text:
Are there any ports opened on an Android device by default?
Title says it all.  Looking at a Samsung S10 phone and would like to know if there are any ports opened on device by default?

Setup adb and try this command: adb shell netstat -natup. To emulate factory default conditions, a factory reset is needed to go back to factory/pristine state. Safe mode might also work, but I never cross checked the two for opened ports, so can't say for sure.

Need clarification: is the question about a specific device (Samsung S10 with Google and Samsung services), or vanilla Android (AOSP)?

Open ports is a vague term. Do you mean listening ports or the ports which can be accessed externally? There can be some listening ports like 5555 used by ADBD and 5353 used by mdnsd. Both are used to discover devices on local network. But usually phones aren't accessible from internet, so open ports don't make sense. // @Firelord I think OP means listening ports. So netstat -nltup (or ss -nltup) gives more precise results. -a gives all results including the ports used for outgoing connections which aren't open ports technically.


text:
Missing photos after inserting external sd card into Samsung galaxy Tab s6 lite
I want to appologize in advance if this is the wrong forum.
Whats the problem?
I am photographing on my fuji xt4 and wanted to transfer all photos to my Samsung galaxy S6 Lite (using a basic card reader). The storage is correctly recognized and mounted. The first few times were no problem. However now all photos up from a certain point are not displayed/lost. Once inserted into the tablet the new photos and Videos are permanently gone (the camera doesnt displays them either).

Sony tough sd card 64gb (exFat)
Fujifilm xt4
Samsung galaxy tab s6lite (Android 11, not rooted)

What i tried

rebooting the tablet
reinserting the sd card
different card reader
accessing the photos by connecting to the camera via ptp is no problem
using more powerful file browser did not reveal anything new

I have currently no access to a normal computer and therefore cant properly investigate the problem further. I tried nearly all recovery android Apps but none scanned extertal USB storage. My last idea was to mask the card reader as internal sd card but Samsung seems to Block adoptable storage and any further advances in included formating the sd card.
My best guess is that my tablet is resetting the block-bitmap from the sd card to the state of the last time it was mounted.
Has anyone an idea on what is happening and what the best approach in recovering the lost data may be?


text:
Galaxy Fold: programmatically turn on the cover screen?
How can I programmatically turn on the cover screen (if the phone itself is actually unfolded/opened)?
Why would I do this?
(Some) Galaxy phones have the ability to charge your wearables via "Wireless PowerShare":

However, during this operation, the phone itself is unusable since it's facing downwards.
Wireless PowerShare is nice, but devices need to be aligned perfectly, otherwise charging will stop.
If I unfold/open the phone, it turns on the inner screen (and turns off the cover/outer screen), but PowerShare is not stopping, so this phone can charge my devices while being unfolded/opened.
Now, due to this, I would like to find a way to turn on the cover screen while the phone is opened because in this case, I can use it while it keeps charging my devices.
I know this is marginal, but this phone can actually use both displays simultaneously, i.e. during camera (cover screen preview).
So I'm looking for a way to force the cover screen turning back on after I opened the phone.
Update
I have recorded some Logcat during display switching, and while using both screens:
OPEN! (Main screen on, cover screen off)
2021-08-31 21:41:44.085 1107-2429/? D/PowerManagerService: [api] setDualScreenPolicy: dualScreenPolicy: 0 (uid: xxxx pid: yyyy)
2021-08-31 21:41:44.085 1107-1787/? D/DisplayPowerController: animateScreenStateChange: target=2, targetInternal=2, dualScreenPolicy=0

SCREEN DIM/LOCK? (phone is still opened)
2021-08-31 21:42:18.892 1107-1787/? D/DisplayPowerController: animateScreenStateChange: target=1, targetInternal=1, dualScreenPolicy=0
2021-08-31 21:42:20.141 1107-1787/? D/DisplayPowerController: animateScreenStateChange: target=3, targetInternal=3, dualScreenPolicy=0
2021-08-31 21:42:21.062 1107-1787/? D/DisplayPowerController: animateScreenStateChange: target=4, targetInternal=4, dualScreenPolicy=0

CLOSE! (Main screen off, cover screen on)
2021-08-31 21:43:55.490 1107-2429/? D/PowerManagerService: [api] setDualScreenPolicy: dualScreenPolicy: 1 (uid: xxxx pid: yyyy)
2021-08-31 21:43:56.203 1107-1787/? D/DisplayPowerController: animateScreenStateChange: target=1, targetInternal=1, dualScreenPolicy=1

SCREEN DIM/LOCK? (phone is closed)
2021-08-31 21:43:57.066 1107-1787/? D/DisplayPowerController: animateScreenStateChange: target=3, targetInternal=3, dualScreenPolicy=1
2021-08-31 21:43:58.068 1107-1787/? D/DisplayPowerController: animateScreenStateChange: target=4, targetInternal=4, dualScreenPolicy=1
2021-08-31 21:45:26.367 1107-1787/? D/DisplayPowerController: animateScreenStateChange: target=2, targetInternal=2, dualScreenPolicy=1

OPEN! (Main screen on, cover screen off)
2021-08-31 21:45:26.405 1107-2429/? D/PowerManagerService: [api] setDualScreenPolicy: dualScreenPolicy: 0 (uid: xxxx pid: yyyy)
2021-08-31 21:46:44.788 1107-1787/? D/DisplayPowerController: animateScreenStateChange: target=2, targetInternal=2, dualScreenPolicy=0

Use the camera app, which uses both screens (i.e. Main screen: ON, cover screen: ON)
2021-08-31 21:46:49.598 1107-1680/? D/PowerManagerService: [api] setDualScreenPolicy: dualScreenPolicy: -1 (uid: xxxx pid: yyyy)
2021-08-31 21:46:49.598 1107-1787/? D/DisplayPowerController: animateScreenStateChange: target=2, targetInternal=2, dualScreenPolicy=-1

Quit the camera app (Main screen: ON, cover screen: OFF)
2021-08-31 21:47:08.283 1107-2429/? D/PowerManagerService: [api] setDualScreenPolicy: dualScreenPolicy: 1 (uid: xxxx pid: yyyy)
2021-08-31 21:47:08.283 1107-1787/? D/DisplayPowerController: animateScreenStateChange: target=2, targetInternal=2, dualScreenPolicy=1

I doubt we have a lot users here own such toys, you should provide more information about phone

What kind of information would help more?

Maybe logcat or dumpsys or getevent record from switching on display, idk anything that could help

I have added some logcats, which is quite promising.

So dualScreenPolicy=1 is what you want. comments in source code sometimes give hints, check DisplayPowerController.java

Yes, but DisplayPowerController.java doesn't have this dualScreenPolicy, at least what I have found in Android sources. :(

check automation apps like macrodroid, tasker etc maybe they already added display options for multiscreen devices

In display it only displays the cover screen. In sensors, there is one: com.samsung.sensor.folding_angle. I believe it uses this one to detect if it's actually folded or unfolded. But how can I proceed from this point?

looks like you might able to simulate intent with (am) activity manager


text:
Check for the existence of files without root privileges
How do apps check for the existence of files and folders on /data and /system partitions without having root privileges?
I know some games and apps do this for anticheat and security reasons.

/system is world readable and /data is accessable within it's own uid

Thanks. Explain the /data part, please.

Does this answer your question? Where Android apps store data?

Not really, still not clear on exactly how an app can detect the existence of another apps directory under /data/data for instance. I know apps can access their own data/data/"package name" but I don't know how it can find the presence of another app directory.

existence of apps is not existence of files and directories. there exist (pm) package manager and other APIs for this (java stuff). wait for someone other will explain better

Not the existence of apps, I specifically said app directory but it can be any directory so long as it's under /data

If your question is about apps can read files or directories of other apps (in /data) the answer is NO

Apps can NOT detect the existence of other apps' directories under /data/data/ without root. Discretionary Access Control doesn't allow different UIDs (apps) to access each other's data. See this, this and this how Android's app sandboxing works.

There's on exception though. On old Android releases or with SELinux permissive, an app can detect the existence of other app's root directory i.e. /data/data/com.xyz. But it's not possible to read its contents.

How do they do this?

They (the apps) don't play any magic in this. It's just permitted by the operating system. So any app can do this. Read about Discretionary (file owner, group, mode) and Mandatory (SELinux) Access Controls to know how it works.

@IrfanLatif How is "old" defined for Android releases in the context of your comment?

@RockPaperLz-MaskitorCasket old is when Android didn't use SELinux MLS to enforce individual SELinux sandboxes on a per-app basis. As briefly mentioned in official documatation it started with Pie. You can check AOSP git log to find when exactly the changes were made.


text:
How to execute Android verified boot during first boot after updating OS in Android
I need to execute AVB (Android verified boot) during first boot after updating Android OS. BOARD_AVB_ENABLE = true is already present in the mk file device/hikey/common/BoardConfigCommon.mk in the external/AVB folder.
I want to know how to check if it is detected normally or not.
Execute AVB during first boot after updating OS.
How to detect AVB abnormal / normal detection to AOSP framework?
I am clueless where exactly need to proceed. Kindly guide me.
Reference which I have gone through: https://android.googlesource.com/platform/external/avb/+/master/README.md

Does this answer your question? How to properly ENABLE dm-verity and FEC for /system on Motorola X4 with LineageOS 17.1?

but is this device specific or common for all devices? but how can i trace whether avb is running normally or not? eg: notification to framework? whether avb runs automatically in all devices?

from logcat dmesg probably


text:
Why QR Code wifi sharing is not showing the wifi password?
I have access to some work-only android devices which they have access to the work wifi and I don't know its wifi password so I tried the QR Code sharing but to my surprize, the plain text which is generated from QR scan doesn't show the password. For comparison, I used this same work-only android device to connect to my hotspot generated from my phone and this time, QR scan from a 3rd device showed the password succssfully. Examples below:
a) plain text after scanning my hotspot:
WIFI:T:WPA;S:{my_wifi_name_written_here};P:{wifi_password_written_here};;
b) plain text after scanning work wifi:
WIFI:T:;S:{work_wifi_name_written_here};P:;;
So, what is going on here? Is this an advanced setting from network IT administrator? They use Cisco APs (access points) everywhere on my workplace, if that helps. Thank you in advance!

What is the Wi-Fi security (e.g. WPA) used on both the hotspot and work's Wi-Fi?

Hello,  they are both WPA2-PSK.

As it is a company WiFi I would guess it uses WPA enterprise authentication instead of PSK. You wrote that is uses WPA2-PSK where do you got this information from?

@Robert it is shown on wifi list on the work-only-pda android device, when you select this network to view info.

@bobis That's a bit strange since the QR also doesn't show its encryption type. However, just like Robert, I have a suspicion that it's probably using WPA2-Enterprise, which means it's using a CA certificate instead.


text:
Emulate vanila Android-arm64 on PC
I need to examine how the ELF binary (which is compiled for ARM processor) executes on Android-arm64. Can you please suggest how I can emulate Android-arm64 on the x86 system?
I have checked Android studio, but it seems that it only runs a single application but not the whole Android system.

Test in an Android Emulator or on a physical device.

Android Studio includes SDK manager and and AVD manager which you can use to install and run a virtual Android device.

I have checked Android studio, but it seems that it only runs a single application but not the whole Android system.

You are mistaken. The Android emulator in Android Studio creates and runs an entire virtual Android device. It's set up to make it particularly easy to do this with an app that you're developing in Android Studio, but that is not all of what it can do.


text:
How exactly do apps not running "in the background" receive notifications?
So, Android has this view (I think left to the home button is standard) where you see all the "currently open" apps, whatever that means exactly. What I'm wondering is, how can apps that are not amongst the currently "running" ones receive notifications? For example, Whatsapp, Reddit or Email will still send alerts even on a freshly restarted smartphone where I definitely didn't start the app manually.
How exactly does this work? Are, in a sense, all installed apps running in the background all the time, and in regular intervals asking their home server if there has been a notification? Does the notification somehow get sent to the Android system itself, which in turn activates the requested app on demand? At least on a PC I would expect that a program has to be running in order to send alerts, but maybe Android is completely different?

Question is slightly different but the answer is same: How do certain apps show new notifications when internet access is restricted to them?

When you install an app, you possibly install more than just the "app" you see on screen. These apps can also install services that are running in the background - regardless of whether you see them in the "previous apps". Note also that those "previous apps" are not actually running when you're looking at them in that view - they are suspended, and only come back alive once you bring them to the foreground.

For example, an app like Life 360 you never have to open when you start your phone, yet it still occasionally checks your location and reports it up to the server on the internet. The Life360 app itself isn't running, but the service it installed is.

@Steve what you are saying is that even if an app is not running an Activity (the visible part of an app), it might have a background service running which is receiving and displaying the notifications. Well that's not correct. Since Android 8 apps cannot run background services. They either need to run a foreground service (with persistent notification; see the example of Telegram) or they have to rely on the OS to wake them up when needed (e.g. using BroadcastReceiver, Alarm, WorkManager, JobScheduler etc.).

But on a Google supported device, Google Play services always runs a background service (com.google.android.gms.gcm.GcmService) which maintains a network connection to Firebase server to receive push messages and delivers them to the target apps. Since Play Services is a privileged system app, it's not subjected to background service restrictions. In addition to GcmService, GMS also runs a number of other background services (usually 20+). You can find a process named com.google.android.gms.persistent always running on any GMS supported device.

@IrfanLatif I am working on some years-old knowledge ... thanks for correcting.

Notifications of Whatsapp and Reddit are triggered by push notifications sent from Google servers, received by Google Play Services, a system app which always runs in background. All Google Push notifications (or as they are named today "Firebase Cloud Messaging" notification) are received and initially processed by the Google Play Services.
The next processing step of the received push notification depends on the push notification type. Plain text notifications can be directly displayed without even starting the app it is targeting.
Other push notifications are delivered to the app it belongs to (which is automatically started if it is not already running) and the app can then "translate" the push message into a notification (in case of Whatsapp this require e.g. decryption of the received message or even fetching additional data from Whatsapp servers).

Thanks very much, crystal clear. One question though, that does not mean that ALL data that reaches my phone runs over Google services, does it? (Thinking of, for example, the page data from browsing Wikipedia on the mobile Firefox app.) I think it just refers to the notification type?

@MaxD No only Google push notifications are processed by Google Play Services. Apps usually directly retrieve data from web servers. But even for push notifications apps can bypass this service and implement their own push message system - e.g. Signal has this as optional feature or for devices that don't include Google services (e.g. custom ROM or Huawei devices). But this costs more battery data.

@MaxD Just in case you're interested in googling for more details, the current system handling this is called Firebase and it can handle two kinds of messages: "notification" (something that's handled directly without involving the app, thus Google can see it as well) and "data" messages delivered to an app for further processing. Many apps use encryption for "data" messages, so that all that Google can see is that an app's server just sent you something, not what it was.

@MaxD all notification data is handled by Google, but not other data used by the app. I used to work on an app where data we wanted to notify for was highly sensitive, so we used to just send a generic message with an ID in the notification. The app could then use the ID to get more specific data when the user tapped the notification.

Makes you wonder, @TomBowen, how many apps don't go those extra steps. Even if it's not PHI/HIPPA levels of "sensitive", just letting Google read everything is... annoying... :/

It should be noted that this current system allows for massive battery saving compared to the old one where every app that wanted to provide push notification of anything needed to continuously poll on its own. I wish someone built a system that could get the best of both worlds: avoid pointless polling per-app and still avoid use of a centralized system. If an app ever asks you to disable "battery optimizations", then that's a hint that it's probably doing the polling on its own.

Note that this doesn't work with all the apps or protocols: e.g. an XMPP client called Conversations has to keep its own service running (and visible in the main drop-down menu) to get updates — unless the server supports XEP-0357.

@Ruslan Conversations is not the only example. Open-source projects, not wanting to rely on Play Services due to technical or privacy reasons, do run a service on device to maintain their own persistent connection to their servers. Telegram-FOSS and K-9 Mail are other notable examples.

Robert is very incorrect here. Apps don't usually receive push notifications directly. Every notification goes through Google Firebase. If you implement your own system, the notifications can be easily blocked by any power saving setting. You would have to keep the app "awake" at all times.

@Tarps Google Firebase ist the server side. On client side notifications are processes by Google Play Services which can show notifications "directly" or forward it to the app it belongs to. Then the notification will be processed by the "Google Services plugin", a library you include into your app and afterwards by your app code . This included Google code part is sometimes also called Firebase, but that is just a marketing name as it has nothing to do with the actual Firebase system.

I know there is a good answer to this question already, but I feel that there could also be a detailed technical answer as well.
When you install a new app on your phone that uses push notifications, and give it permission to access the internet, it registers interest in it's push service website with the Google Push Notification service on your phone.
The Google Push Service will then register interest in updates with the push notification server for the app via Web Sockets. This will also occur automatically when you power on your phone when the app has been installed.
When an update occurs, the message is passed from the push notification server to the Google Push Service. Then it is passed to the interested app, which then wakes up if sleeping, or loads it's push monitoring code if it's not loaded to load the notification and notify you of the message.
When you power on your phone, and it registers interest all at once, you may get a flood of push notifications. These are all the notifications since the last time the app last notified the server as you read them. This is done standard in Web Sockets to bring you up to date in what you said you registered interest in.
Some apps may have a server that sends a generic push message to the Google Push App to cause it to wake up the actual app, and then the actual app retrieves the real push message. Not all services do this. This is done for security and privacy.
The reason why the Google Push Notification service is used as a middle man is simply because of the fact that it is always running, unlike almost every other app on your phone. It will always be there to receive a push notification. While you could circumvent it, it could mean that you could miss notifications if your app is not running when they come.

What if one wants to use a Google-free device?

@irfan every smart phone has it's own version of this Google play services. Apple have their own and even Google Firebase is able to target iOS apps https://firebase.google.com/docs/cloud-messaging/ios/client

@DeanMeehan Google Firebase on iOS just uses Apple push in the background. That may be even enforceed by Apple.

@IrfanLatif: If you replace Android with LineageOS, your device will be Google-free.
If you later change your mind and decide you do want Google cloud messaging after all, you can either install Google's closed-source Google Play Services utility, or you can install the open-source third-party MicroG utility.  Despite being open-source, MicroG is still able to connect to Google's push messaging service.