text:
How to create a guest account on Android phones?
I want to create a "phantom account" or "guest account" on my smartphone Android to let other people accessing and using my phone without needing to enter the fingerprint pattern, on the one hand, and avoiding at the same time the risk that others can access my personal info, as far as I'm logged into my accounts (WhatsApp, messenger and so on).
Whoever accesses my system through a "guest account" would be able to connect to the internet, modifying settings and switching gps on, etc., but wouldn't be able to access my personal data and apps.
I'm focusing on something similar to what happens on Windows when you configure some anti-theft softwares (see ->  https://help.eset.com/antitheft/en-US/issue_no_fakeuseraccount.html).
I wonder: given that it's possible to create a phantom account on Windows, may I obtain something similar on Android too, to protect my privacy while I want to let others to use my phone?

U P D A T E - - - - - -

I read right now that Asus had removed Guest Mode on all Android Marshmallow firmwares. Can you suggest any way to bring on the above mentioned feature?

Guest is a built-in feature starting from Android L (5.0). It's in Settings -> Users -> Guest Mode.

Please see https://support.google.com/nexus/answer/2865483?hl=en. @iBug that alone suffices as an answer.

What phone and ROM are you using? Custom ROMs are likely to strip this feature.

I hold an Asus Zenfone 3 max with Android 7.0. Where can I find info abut my rom, are they maybe under "Build number"?

Guest is a built-in feature as of from Android L (5.0).
It's in Settings -> Users -> Guest Mode
Pros:

Guest data is isolated and gets wiped every time G Mode is disabled (device returned to owner)
Guest has limited access to existing apps, and the access is configurable

Cons: Unknown
And here's Google Support link provided by Firelord.

I have 7.0 but I cannot find how to configure it

@beeshyams Tested with my OnePlus 5 (FP scanner + Android N)


text:
"anazon.ca" download pending
My phone frequently shows a Chrome notification for "anazon.ca" with "Download pending ...". This appears frequently with a current time-stamp, even when WiFi and data is turned off.
I tried rebooting my phone, to no avail; pressing and holding on the notification just takes me to generic Chrome settings; clicking on it takes me to the download list, which doesn't show anything from anazon.ca.
I spent some time querying for "anazon.ca" and didn't find anything.
I have never browsed to Amazon on that phone.
What exactly is this (virus? trojan? harmless?) and how can I get rid of it?

Welcome to community
I would suggest to clear data of download manager or chrome or both
I have faced such situation few times in past
But make sure you first backup Chrome settings and also try clearing first download managers data and if it doesn't work then clear chrome so that if only after clearing download manager's data your problem is solved you will have chrome settings as it is

source: Stack Exchange

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

sort: votes


text:
How to use different keyboards in different apps without paid software?
Is there a way to use different keyboards in different apps? I want to use GBoard for every app except for my Terminal, in which I want to use Hacker's Keyboard. I want to do this because GBoard is a great keyboard, but I can't use arrow keys, ctrl+c, etc.
How could I use different virtual keyboards for different apps without using paid software?
This is different from Use fixed keyboard for a given app because the answer includes paid software.

I am using the OnePlus 5 with OxygenOS 4.5.10 (Stock ROM) (Based on Nougat 7.1.1)
Using this kernel: https://build.nethunter.com/nightly/3.20-20170903-2143/kernel-nethunter-oneplus5-oos-nougat-3.20-20170903-2143.zip
Rooted with Magisk tiny.cc/latestmagisk
Using the Kali Nethunter terminal: https://github.com/offensive-security/kali-nethunter/blob/master/nethunter-installer/update/data/app/Term-nh.apk
Kali Nethunter installed with this Magisk module: https://forum.xda-developers.com/android/software-hacking/kali-nethunter-magisk-t3676681/page1

See: Use fixed keyboard for a given app (even the request for Hacker's Keyboard matches ;) Unfortunately, it seems that cannot be fully automated though (at least not without root).

@Izzy That looks like it would work, but I don't want to pay $2.99...

There's a 7 day trial available for Tasker to check first if it fits your needs, see our [tag:tasker] tag wiki. Apart from that, not much I can help you saving that "cup-of-coffee" tip. Of course, you could check with other [tag:automation] apps whether they can do that for free.

You can try Macrodroid
Steps :-

Download, install and launch
Go to Marcos
Add new Marco
In trigger select the app launched and select the terminal app
In actions select Keyboard switch(i guess this would cause the keyboard list popup so you will need to tap once on hakers keyboard)
Repeat same for App closed trigger (add both trigger in same macro)

Hope it gets the job done
Do report back
Update:
Try putting constraints of app running or app in foreground on app closed action
And app not running or not in foregroung on app launched action
I would also suggest to try to keeping 2 different macros for launching and closing and also it should work without legacy support

I thought this would work, but the switch keyboard prompt keeps popping up the whole time the app is open.

Please add following info. To your question:-

device name, android version
rooted or not
link to terminal app

I got it working by enabling Force Legacy mode or something like that...

However, it appears to consume A LOT of RAM.

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


text:
How do I get the "Change keyboard" notification to go away for more than an hour?
I have Swiftkey installed.
I get a notification all the time about choosing my keyboard. I can get it to go away for a short time by selecting
Settings -> Language & Keyboard -> Current keyboard

Then selecting Swiftkey. But the notification comes back 30-60 mins later (I haven't timed it).
How do I get this to stop showing up? There are instructions on the Swiftkey site that are either outdated or don't apply to my phone: the settings don't look like that.
The relevant AE answer is 5 years old.
LG G5

As of now all i can see is there are only 2 possible solutions
1) keep only one keyboard as suggested in 5 year old question
2) or keep all keyboards but disable all except for the one that you use by going to setting->language & input->virtual keyboard->manage keyboards, here disable all except one that you use regularly
Tried and tested on stock nougat 7.0 on moto g5+

"virtual keyboard": my phone does not have this. I have "Keyboard & Input methods" and there is no "Manage keyboards" option in that group.

Try finding somewhere in language and input setting it should be there else you have only 1st above stated solution left


text:
Hotspot connecting and disconnecting pc
Am trying to connect my pc to Android hotspot but it connects and disconnects immediately. My pc os is arch Linux. I have been connecting it before until recently.

The problem was with my PC running Archlinux. I just ran nmtui command and was able to connect to hotspot.


text:
Fix Broken Launcher on Soft-Bricked Device
I recently tried to remove the Google search bar on my homescreen using this tutorial by disabling the Google Search app in settings. It turns out I was using the Google Now launcher, and so when I rebooted the launcher broke and sent me into some kind of recovery mode (not the proper android recovery mode.) It went through the booting animation, but then just came up with an alert saying 'Optimising Apps: 1/150', which cycled through each app and 'optimised' it. Upon completion, a black screen came up and the phone rebooted itself.
I'm using an unrooted Moto G2 which had Marshmallow running on it. I'm wondering how to reinstall my OS or otherwise restore my device; I don't care about data as it is backed up.
Any ideas how to fix/reinstall my Android installation?

If all you did was disabling the Google App then it shouldn't have caused such havoc - try initiating a factory reset from fastboot first.

Would that be the 'Factory' option in the fastboot menu that I get when pressing Power+VolDown? If so, that just does a 'normal' powerup which gets stuck in a bootloop like turning the device on normally.

Yeah I meant that. If that doesn't work out for you, you'd have to flash a factory image, also via fastboot. For that you'll need to know your exact model number (should be on the fastboot screen as "XT10xx".

@AndyYan Maybe OP removed the launcher? Does their model come with Google Now?

@DeathMaskSalesman He did explicitly say it was a bootloop, whereas a removed launcher should at least present a black screen after the boot animation...

@AndyYan Correct. I was just "checking if you were paying attention", is all. cough

@AndyYan After the boot animation and after a modal appears saying 'Optimising Apps', which runs for a few minutes, it briefly comes up with a black screen before rebooting.

@DeathMaskSalesman My phone does use the default launcher which I believe is Google Now. I thought I turned it off in settings, but I must've only disabled the Google Now feed.

@AndyYan I just visited the link OP posted, and they indeed suggest to disable Google Now. Given the additional info Tobsta mentioned, it does quite seem a missing launcher's symptom.

@Tobsta Could you update your question with these findings, please? Also, did you not install another launcher as suggested in your link?

@DeathMaskSalesman Silly me, I wasn't thinking clearly when I first asked the question. I was in a hurry at the time and I misread the article, assuming that installing a different launcher was a separate solution. I'll update the question now.

Ok, I've worked out how to factory reset my device. It seems there are two recovery menus - one when you press Power+VolDown and other when you select the 'Recovery' option in the aforementioned menu (which shows a dead android saying "No Command"), hold the power button and then tap the volume down button. Both menus have a factory reset option, but only the latter (as far as I know) works.
Now that I know my device is recoverable, is there any way for me to avoid having to factory reset for convenience?

Solved my own question, thanks for the help.
To get into recovery mode on my Moto G2, I first went into the bootloader by force shutting down the bootlooping device (hold power until it turns off) and then pressing Power and Volume Down at the same time for 2-5 seconds. I then selected 'Recovery', which came up with the boot animation and then a dead android with the words 'No Command' written above. I then pressed Power for 5-6 seconds and tapped the Volume Down button, which took me to the recovery mode menu.
I then selected the option 'Wipe data/factory reset' and selected 'Userdata only'. Once it wiped that, I rebooted and waited ~10mins at the booting animation before it took me through the Android setup wizard. All of my data was restored through Google Drive and Google Photos, even stuff like the order in which apps were displayed on my homescreen.


text:
USB debugging permission alerts stopped although USB Debugging is enabled on android 4.4.2
I was able to connect my android mobile to my computer as I enabled USB debugging from the developer options. I used to receive the USB debugging permission alert and from there I switch from charging to file transfer.
All of a sudden and while my device is having a low space problem, the USB debugging permission alert stopped appear when I connect it to my PC. That means I can not connect him to my PC as I can not give the permission as the default is charging. I tried two different PCs (Ubuntu based, and Windows 10 based) with no luck as well as two different cables. I used another android phone with the same cable and to the same PC and it connects OK.
My mobile has an Android version of 4.4.2 and updates stopped a while ago.
My other mobile (Android 7.0) is connecting with no problem. I connected several times before from this mobile with no issue.
I tried to restart the mobile and switch off and on the USB debugging option with no luck. I am trying to connect it to my computer to take some backup and free some space.
Here is the information of my mobile:

Huawei Honor 4C CHM-U1
Memory at the current time: 391 MB Free 8 GB total
Android version of 4.4.2

Can any body help me how to fix this?

Just for clarification: Are you only worried that the alert no longer appears – or can you no longer connect that device to a computer at all? In the latter case: have you tried a different cable as well? And does charging still work via the same port?

I added more clarification to answer your question. I can not connect the mobile unless the notification appeared, and yes I used two different cables, I even used another android mobile with the same cable and it worked fine.

Ah! You mean the notification about USB connection – which you'd then tap and select the connection mode? If it's that, please try the following: With the cable connected, go to Settings › Storage and see if there's an option to switch connection mode. Some devices have this setting in Settings › Development ("chose USB configuration" or similar item). Let us know if you found something and which action helped (if any).

It was a hardware problem. When I pushed the cable hard into the port, it connected. I will need to fix the port. Thanks for the support.


text:
Touch screen acting weird (P9)
I recently got a new touchscreen, which seems to work (since you can see the touches in debug mode), but sometimes it just won't swipe from one page to another! This also happens in an app. What is wrong, I don't get it?
Video: https://puu.sh/xtaow/ed633e8833.mp4
PS: When swiping slower it sometimes works better, but not always.
PPS: When having the phone in my left hand, I can only swipe right and vice versa. When having the phone on my table everything works perfectly.
Phone: Huawei P9 (EVA-L09)
Android: Nougat 7

Maybe you should increase your touch sensitivity. Try apps like this.


text:
Scheduled turn off & on on android 8.1
Scheduled turning the device off and on has apparently been discontinued in Android 8.
Edit: At least for my device thats the case.
Given that it was one of my favorite functionalities in android 7, I would like to retain it through the update to 8.1.
Is there a similar function on 8.1 or an app i can use to emulate it?
Taskr and Automateit require root access to be able to shut down the device.

Search for "scheduled power on/off" in the settings. It should be there

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


text:
Can't adopt micro-sd card on Moto Z2 Force
I have a new Moto Z2 Force, bought for the Qualcom Snapdragon 835 and the 6GB RAM, running Nougat 7.1.1. I also have a new Samsung 224GB U3 micro-SD card for it. That operates nicely as an exchangeable card.
I can't find a way to format the card as internal storage, or otherwise adopt it into the device's own storage. Searching for information about this, I'm finding a lot of postings on various forums that advise against adopting a card, because it often gives trouble.
Is adopting a large card as internal storage considered bad practice nowadays?

It's always been considered "bad practice"... It is just a crutch for phones with low storage space. SD cards fail, it happens, and when it does it's catastrophic when used as adopted storage. The write cycles done when it is adopted storage cause it fail, usually sooner than expected and without warning. If you don't absolutely need the "internal" storage space, don't do it.

Agree with @acejavelin. You can read more on the wiki and questions on it to understand why

I mean on the tag added to your question

Moto removed the adoptable storage feature from their devices. It's not bad practice; I definitely like it. As for bad practice, I think it's a good thing, but it definitely requires more mindful usage of your device, which a lot of folks aren't used to.

Use a high endurance microSD card! Make routine backups, because everything has a risk of breaking. Statistically, there is a higher risk of gravitational accident [drop], aqueous accident [get wet], or velocity accident [vehicle crash] damaging your phone and causing loss of data, than the risk of a high endurance microSD card losing data.
Samsung has 2x higher endurance than SanDisk, circa 2019.
For ultra high reliability, use industrial grade SLC microSD card. It will outlast the consumer grade MLC/TLC/QLC flash circuits in your phone.

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


text:
Is Android becoming a 64-bit only operating system?
The newest ARM processors only support 64-bit code. The Play Store has stopped showing 32-bit only apps to 64-bit capable devices. 32-bit support has not been a requirement for devices since Android 9.
Will Android become a 64-bit only operating system as time passes?

Yes, although this matters less than on other operating systems
On Android, most apps are written in Kotlin or Java, and are not specifically 32-bit or 64-bit. Developers build them from Kotlin or Java code, which are compiled into Dalvik bytecode for the Android Runtime. They upload their apps to app stores in that form, and devices download them in the same form.
Once downloaded, apps are compiled again, into machine code for the device. This machine code is either 32-bit or 64-bit, as suits the individual device. See "Glossary" below for the technical terms I've used.
This is quite different from Apple's iOS, iPadOS, and related operating systems. Apps for those devices are compiled into machine code by the developer, who uploads them in that form. This meant that Apple's transition from 32-bit to 64-bit was done earlier than Android's, and had less flexibility.
Native code in apps
Some Android apps, for various reasons, include machine code built by the developer, called "native code," rather like iOS apps. This gets uploaded to the app stores, downloaded again to devices, and run directly, without any compilation or translation steps along the way. An app that uses native code must provide separate versions for 32-bit and 64-bit devices if it is to be usable on both 32-bit and 64-bit devices. The APK app file format caters for providing multiple versions of machine code files; this isn't necessary for Dalvik bytecode files.
Changes in Play Store rules
Since August 2019, apps that include native code have been required to provide 64-bit native code when they are released or updated. Since August 2021 any remaining apps that use native code, but only have a 32-bit version of that code, have not been offered to 64-bit capable devices. This is presumably intended to push app developers who use native code to either (a) provide 64-bit native code or (b) stop using native code at all.
Those rules don't apply to apps that are for Wear OS or Android TV, which supported 64-bit rather later than baseline Android. Wear OS 4 onwards run 64-bit apps, and are starting to transition to 64-bit only. Android TV is mostly 32-bit, although there have been some 64-bit devices.
Changes in ARM processors
When 64-bit capable ARM processors first appeared, they could also run 32-bit code. However, that part is optional, and is gradually being dropped. Since 32-bit and 64-bit ARM native code are fairly different from each other (much more so than 32-bit and 64-bit x86), leaving out 32-bit makes processors simpler and thus cheaper to manufacture.
In the early days of 64-bit, there were some odd devices. There were ones that had 64-bit capable processors, but a 32-bit Android OS, and ones that had 64-bit processors and operating systems, but a 32-bit Android Runtime. However, those are now all in the past.
Nowadays, many of the newer ARM processors can't run 32-bit code. This is easiest to explain in terms of ARM Holdings' core designs, since those form the basis of many manufacturers' SoCs.
The early 64-bit cores could run 32-bit code happily, although the ability to run a 32-bit operating system was dropped at Cortex-A76. The ARMv9 cores that were introduced from 2021 mostly can't run 32-bit code at all; the only exceptions are the Cortex-A710 and Cortex-A510.

The Qualcomm Snapdragon 8 Gen 2 can only run 32-bit code on five of its eight cores, not including the fastest ones, and the Snapdragon 8 Gen 3 and later won't run 32-bit code at all.
The MediaTek Dimensity 9200 can only run 32-bit code on its slowest cores, and the Dimensity 9300 and later can't run 32-bit code at all.
The Samsung Exynos 2200 won't run 32-bit code on its fastest core, but will on all of the others, while the Exynos 2400 and later can't run 32-bit code at all.
In the Google Tensor family, the G1 and G2 can run 32-bit code on all their cores, while the G3 can only do that on its slowest cores. The G4 and later can't run 32-bit code at all.

The first cores in each series from ARM that don't run 32-bit code are:

Cortex-X2.
Cortex-A715
Cortex-A520.

Emulators, translators, etc.
Xiaomi ships a 32-bit to 64-bit binary translator on some devices called "Tango." This allows 64-bit only hardware, such as the Snapdragon 8 Gen 3 in the Xiaomi 14 and Xiaomi 14 Pro, to run 32-bit apps. It does this by translating their 32-bit native code libraries into 64-bit native code. News story here. More details under tango in the tag wiki.
Changes in installed Android
It is possible to build Android as:

A 32-bit-only operating system, appropriate for devices with 32-bit processors.
A 64-bit-only operating system, appropriate for devices with processors that can't run 32-bit code, and usable on devices with processors that can run 32-bit code if the manufacturer doesn't want to support that.
A 64-bit operating system that can also run 32-bit native code. This is only appropriate for devices with 64-bit processors that can also run 32-bit code. It is larger than a 64-bit-only operating system, so some manufacturers may prefer the 64-bit-only option.

Recent Pixel devices from at least the 7a onwards, have 64-bit-only Android. 64-bit-only Android 13 and 14 images for Pixel 4a to Pixel 6 Pro are available for testing.
Android compatibility definitions
As of the Android 15 compatibility rules, devices with 2GB RAM or less physical RAM are required to only run 32-bit applications, and devices with 2GB to 4GB are strongly recommended to only run 32-bit applications. Of course, running 32-bit applications requires having processor cores that can run 32-bit code, and that capability is missing from newer cores. This will confine 32-bit devices to using older and slower processor cores, causing them to gradually fade away.
More precisely, devices with less than 2GB of RAM available to the operating system (some is always used for other purposes) must only support one ABI, and 32-bit is the sane choice. Supporting both the 32- and 64-bit APIs takes up more RAM, because many libraries would have to be provided in both 32- and 64-bit forms. Supporting only 64-bit is technically allowed, but would be foolish, because 64-bit code uses more memory for data.
Glossary
Machine code
Computer programs consist of instructions telling the computer to do specific, simple things. The complicated and flexible behaviour of programs (which includes apps) is built out of many individual instructions. The instructions are encoded as numbers - because, to computers, everything is expressed as numbers - and the set of instructions that a computer can execute is its "machine code." The part of the computer which reads the machine code instructions and acts on them is the "processor" or "Central Processor Unit", abbreviated "CPU".
Different kinds of computer use different machine codes. Some manufacturers produce several different kinds of computers, with different machine codes. People have been designing machine codes for about 80 years (as of 2023) and new ideas are still being invented and put into use.

Most desktop computers use the "x86" or "x86-64" machine codes, developed by Intel Corporation and its competitor, Advanced Micro Devices, since the 1970s. Both those companies manufacture and sell CPUs. That's fine for desktop and laptop computers, which have space for lots of separate components.

Almost all mobile devices use the ARM family of machine codes, developed since the 1980s by ARM Holdings. ARM do not manufacture CPUs. Instead they license their designs to other companies, who manufacture "Systems-on-Chip" or "SoC"s that include the CPU and all the other electronics needed in a mobile device. Mobiles don't have space for lots of separate components: most of their small volume is taken up by the screen and the battery.

"Dalvik bytecode"?
"Bytecode" is a way of storing computer programs that isn't specific to a particular kind of computer. Many bytecodes exist, using different ways of representing programs. Dalvik bytecode was used in the Dalvik system for running Android apps that was used in Android versions before 5.0 "Lollipop". That runtime used just-in-time compiling.
Nowadays, Dalvik bytecode is used as a distribution format. When it is downloaded to a device, it is compiled by the Android Runtime ("ART") to the appropriate native code to be called by ART: 32-bit on a device with 32-bit ART, 64-bit on a device with 64-bit ART.

"As of the Android 14 compatibility rules, devices with less than 2GB RAM are required to only run 32-bit applications" Is that why my Stratus C5 """"Elite"""" is on a 32bit build of Android despite the SOC supporting 64bit?

@qwertykeyboard: Yes. It's generally safe to assume anything low-cost and labelled "Elite" is suffering from excessive marketing. This version of the SoC's ability to run 64-bit code is thus not useful for Android, but it may well be the easy and cheap way to get 32-bit performance.

But the strange thing is that I had a "Wiko Ride", another ultra low end mediatek phone, that ran the ARM64 version of Android 9. Similar specs too.

@qwertykeyboard: Possible causes for that include a rules change (Android needs more and more RAM as it is developed), or lack of enforcement back in Android 9 days.


text:
ADB stopped working after installing Windows 11 23H2
I've been using ADB from the command prompt on this Microsoft Surface Book 3 laptop with success for about a year. It upgraded to Windows 11 23H2 from 22H2 a couple of weeks ago, and since then, ADB can't see any devices. I've rebooted laptop and devices, tried two different cables, and updated ADB. I now have:
> adb --version
Android Debug Bridge version 1.0.41
Version 35.0.1-11580240
Installed as C:\android\platform-tools\adb.exe
Running on Windows 10.0.22631

> adb devices
List of devices attached

It does not sound a tone when an Android device is connected, which it used to do.
I'd never needed to install special USB drivers on Windows 10 or 11, so I have not tried that. The devices do not show up in Windows Explorer. What am I missing?

As soon as I post the question, I think of something else to try, and start finding the solution.
The laptop had lost the ability to access ADB devices on its USB-A ports. It could do that via its sole USB-C port, and sounds a tone when an Android device is connected there. That's specific enough to report as a bug.
I don't usually use the USB-C port because it is too close to the power connector, making it awkward to have power and USB-C connected at the same time.
Then the laptop started ignoring its keyboard. This model is actually a 2-in-1, a large Windows tablet with an attachable keyboard, which bears the USB ports, power connector and so on. Detaching and re-attaching the keyboard got it working, and now the USB-A ports can see Android devices. Computers!


text:
What is the numeric version number of Android 12L?
Wikipedia has:

Android 12.1/12L
In October 2021, Google announced Android 12L, an interim release of Android 12 including improvements specific for foldable phones, tablets, desktop-sized screens and Chromebooks, and modifications to the user interface to tailor it to larger screens. It was planned to launch in early 2022. Developer Preview 1 of Android 12L was released in October 2021, followed by Beta 1 in December 2021, Beta 2 in January 2022, and Beta 3 in February 2022. The stable version of Android 12L was released for devices with large screens on March 7, 2022, and was released as "Android 12.1" for Pixel smartphones on the same date, besides the Pixel 6 & Pixel 6 Pro.

I've been gathering some statistics on the decline in use of older Android versions over time, using Statcounter Global Stats. You can get a lot more information than the line charts without a Premium account, by downloading the .csv files and doing a bit of spreadsheet processing on them.
The surprising thing is that none of the stats show me any presence of Android 12.1, which is supposed to be the version number of 12L. I can see small numbers of Android 12.2, and plenty of 12.0, but no 12.1, 12.3 or higher. Statcounter gets its information from the browser user-agent strings. From their FAQ:

Statcounter is a web analytics service. Our tracking code is installed on more than 1.5 million sites globally. These sites cover various activities and geographic locations. Every month, we record billions of page views to these sites. For each page view, we analyse the browser/operating system/screen resolution used and we establish if the page view is from a mobile device.

The least-used versions from the July 2024 stats are:
4.4 KitKat              0.17%
24.6                    0.06%
4.1 Jelly Bean          0.06%
4.3 Jelly Bean          0.03%
2.2 Froyo               0.02%
12.2                    0.02%
15                      0.01%
4.2 Jelly Bean          0.01%
4.0 Ice Cream Sandwich  0.01%
Other                   0.05%

Possible explanations include:

12L gets reported as 12.2.
12L is so little used that it's lost in rounding to the nearest 0.1% and "12.2" is something else. There doesn't seem to have been a CynogenMod 12.1.

I'd also be interested to know what "24.6" might be, but that's not the point of this question.

Looking at my user agent string of Chrome on Android 14 I don't see any Android version related component. And on my Android 13 device the user agent contains 10 as Android version. Therefore I wouldn't rely too much on those numbers.

Android 12L is Android 12.1.0. However, in general, it's branded as Android 12.
The official Android Developers site for "Get 12L" links to Android Flash Tool with 12.1.0 prefilled.
Also, browsing the list of Factory Images for Nexus and Pixel Devices, version 12.1.0 is included on supported devices (Pixel 3a to Pixel 6a).
While there's an "API diffs - API 31 → API 32" on the left menu, apparently Android 12L is still considered API 31. From the official distributions of Android versions (JSON, download only),
  {
    "name": "S",
    "version": "12",
    "apiLevel": 31,
    ...
    "url": "https://developer.android.com/about/versions/12",
    "descriptionBlocks": [
      ...
      {
        "title": "Large screen support (12L)",
        "body": "System UI optimizations App taskbar Drag and drop an app into split-screen mode fast app-switching Visual and stability improvements to compatibility mode Activity embedding with Jetpack WindowManager"
      },
      ...
    ]
  },
  {
    "name": "T",
    "version": "13",
    "apiLevel": 33,
    ...
    "url": "https://developer.android.com/about/versions/13",
    "descriptionBlocks": [
        ...
    ]
  },

As for the user-agent, it might not be the most reliable info to indicate the precise Android version due to privacy and spoofing. On Pixel 3a running Android 12L:

Firefox 128 shows "Android 12" with an empty model.
Chrome 110, Edge 126, Opera 83, Brave 1.68 fixed the Android version to Android 10 on model K.


text:
Is there a way to receive security updates after vendor stops them, without compromising SafetyNet attestation?
Imagine the following situation:

The vendor of my phone has stopped providing security patches for the stock OS.
The HW is perfectly fine and powerful enough for years to come, so I'm definitely not willing to replace it just to get access to security patches.
Running a phone OS with unfixed security vulnerabilities makes me uneasy. (It feels insane enough to run a computer at home with an OS that's a year behind on security patches. It's twice as insane to do the same with a device that I routinely take to all kinds of hostile environments and untrusted networks.)
Authors of all kinds of random apps have grown a habit of requiring SafetyNet attestation.
I don't need root access to my phone, and I can live with losing some of the proprietary vendor-provided features. I also don't care too much about running the latest Android version, as long as it's receiving security fixes and is compatible with most apps.

I know I have the following two options:

Stick to the stock vendor OS, which is gradually going to become full of security holes. However, SafetyNet passes and I can run all kinds of apps because they feel safe on my device.
Install a custom OS. This will fail SafetyNet, unless I use a tool to hack around it and try to pretend the phone is not rooted. This approach is likely to stop working at some point, leaving me with a device that fails SafetyNet. Thus although my device may have up-to-date security patches, apps will refuse to run because they deem the device insecure.

Is there a third way, which would let me stay up-to-date on security patches while not breaking SafetyNet? I can imagine something like a pure AOSP system, perhaps built and signed by Google or another vendor, that I could run unrooted and unmodified (relying on vendor drivers through the Treble thing).

Is it important to you what Android version the device will run – or could you e.g. live with the device staying on Oreo (Android 8) provided it still gets the security fixes? I'm not certain how long this holds true, but AFAIK eg LineageOS with Magisk can still pass SafetyNet up to a point. I'm not sure about what that point was, as I never cared about "fake safety" (SafetyNet saying "all safe" even if your last security patch arrived 3 years ago). Might be worth investigating that path.

@Izzy I don't care too much, within reasonable bounds. I just need it to be compatible with most apps in the store (thus Oreo is likely fine, Jellybean isn't).

Sure, that's what I meant (and btw I doubt Magisk would be available for JB ;) As I wrote, I've not followed up things. I just remember having seen Magisk passing SafetyNet in the past – and you need an unlocked bootloader to get Magisk running, so counting 1+1 made me leaving that comment…

A passed SafetyNet attestation does not say anything if your device is secure or safe. It just checks if it is in the original state. At the moment it is really a shame that Android device only get update for a few months, especially comparing it to iOS :(

@Robert Yes, I also fail to see why app authors insist on SafetyNet given that there are much worse vulnerabilities not accounted for by SafetyNet validation, but that's still what they do, so my question is how best to live with it.

As Izzy wrote you can try Magisk and MagiskHide but that can break SafetyNet at any time. Google already tried a SafetyNet version that can no longer be bypassed using Magisk. At the moment it in unclear why Google now again uses the old test that can be bypassed.

Give a try to custom ROMs with Magisk. SafetyNet is still passing by magisk. If hardware backed attestation is enforced for your device, switch to stock ROM again.

Using Google's Generic System Images (GSIs) is described here. They provide up-to-date generic Android, but you can't always use them. There are some quite specific requirements:

Bootloader is unlocked.
Fully Treble-compliant.
Launched with Android 9 (API level 28) or higher. Devices upgraded to Android 9 from an earlier version might or might not support GSIs.

Trying to flash a GSI to a device that doesn't support them can irrecoverably brick it.
To check if your device is treble-compliant, run this adb command:
adb shell getprop ro.treble.enabled

If the response is "false", stop here. GSIs can't do you any good.
If the response is "true", you may be able to use a GSI. Try this command:
adb shell ls /system/etc/ld.config.*.txt

If that file doesn't exist, stop: the manufacturer didn't provide enough information to let you know if you can use a GSI.
If the file does exist, proceed as instructed on the web page. I don't have a device that has it, so I have no practical experience of the process.


text:
What does "Enable OEM Unlock" do, and how can I do it through a root shell?
Looking at this Samsung Galaxy A8 question, I was looking to do something on my Nexus 6p.  I would like to enable OEM unlocking, the developer setting.  Due to the problems my device is experiencing, I would like to do this through the android root shell.  What does "Enable OEM Unlock" do on the device, and how can I replicate that change using a terminal.  It's on pure nexus, if that helps.
For anyone who wants to know, this is the current state of my device, if there are other possibility:
My recovery partition appears to be corrupted enough to be unusable, my main os (pure nexus) appears to be fine, but considers my phone to be corrupt and tries to reboot into recovery after I give it a password to decrypt my device (which I never set, and any password it calls correct and corrupted data).  So, I have root access in adb, including shell access which as far as it looks from me is the full device.  Using adb, I have tried opening the settings menu, which tells me that the current user(none) cannot change the "enable OEM unlocking" status.  But, that setting must be doing something simple to allow the device to be unlocked, right?
So, this is probably my fault, and will NEVER be done again, but I got to this state from trying to lock the boot loader after I got most of pure nexus working, as I just wanted to wipe it from any excess, figured I could kill 2 birds with one stone.  Since then, I have tried every factory reset I could find out there, all either need a working recovery(for the side loading a google signed recovery) or need an unlocked bootloader.

I believe you can flash a stock ROM without unlocking bootloader, and it will reset the recovery partition as well. Use Odin.


text:
What can cause "listing a directory" on Android to be 50-250 times slower than expected?
I ended up with my Android device (Google Pixel 7a, on AOSP 15) having accumulated about ~14k videos/photos files in /sdcard/DCIM/Camera. As a consequence I have noticed some very unexpected delay when listing this directory in this particular folder, but also in general.
I do run the following tests
[user@archlinux-box ~] $ ## having the Pixle 7a connected via USB-3 port USB-debugging
[user@archlinux-box ~] $ adb shell
lynx:/ $ ## time the listing of /sdcard/DCIM/Camera
lynx:/ $ (cd /sdcard/DCIM/Camera; time ls | wc)
  13980   13980  398700
    0m04.55s real     0m00.07s user     0m00.31s system
lynx:/ $ ## exclude that it is a fault ot `ls` binary I check via `find` too
lynx:/ $ (cd /sdcard/DCIM/Camera; time find | wc)
  13981   13981  426662
    0m05.25s real     0m00.07s user     0m00.41s system

Being suspicious that listing ~14k files may very well take some time, yet not ~5seconds (and less so upon 2nd time directory listing reads, given I would assume some caching to occur) I tested if this is related to the specific folder /sdcard/DCIM/Camera doing this
lynx:/ $ ## create and enter a test directory to hold 14k files
lynx:/ $ mkdir /sdcard/14k-files-dir
lynx:/ $ cd  /sdcard/14k-files-dir
lynx:/sdcard/14k-files-dir $ ## create 14k files somewhat efficiently
lynx:/sdcard/14k-files-dir $ ## have filenams be comparable length as photo files
lynx:/sdcard/14k-files-dir $ PREFIX='filename-similar-to-photo-files-file-no-'
lynx:/sdcard/14k-files-dir $ seq 1 14000 | sed 's/^/'"$PREFIX"'/' | xargs sh -c 'touch "$@"' _
lynx:/sdcard/14k-files-dir $ ## rerun tests
130|lynx:/sdcard/14k-files-dir $ time ls | wc
  14000   14000  618894
    0m01.92s real     0m00.10s user     0m00.28s system
lynx:/sdcard/14k-files-dir $ time find | wc
  14001   14001  646896
    0m00.72s real     0m00.03s user     0m00.13s system
lynx:/sdcard/14k-files-dir $ time ls | wc
  14000   14000  618894
    0m00.80s real     0m00.10s user     0m00.13s system

as can be seen this time, the directory listing is far faster (particularly once it appears to be in cache).
Lastly I wanted to test - given Android being based on linux kernel - how well my 10+ year laptop would compare.
[user@archlinux-box ~] $ ## running test on a 10 year old laptop
[user@archlinux-box ~] $ mkdir 14k-files-dir
[user@archlinux-box ~] $ cd 14k-files-dir
[user@archlinux-box 14k-files-dir ] $ ## create 14k files somewhat efficiently
[user@archlinux-box 14k-files-dir ] $ ## have filenams be comparable length as photo files
[user@archlinux-box 14k-files-dir ] $ PREFIX='filename-similar-to-photo-files-file-no-'
[user@archlinux-box 14k-files-dir ] $ seq 1 14000 | sed 's/^/'"$PREFIX"'/' | xargs sh -c 'touch "$@"' _
[user@archlinux-box 14k-files-dir ] $ ## run tests on laptop
[user@archlinux-box 14k-files-dir]$ time ls | wc
  14000   14000  632894

real    0m0.025s
user    0m0.015s
sys     0m0.014s
[user@archlinux-box 14k-files-dir]$ time find | wc
  14001   14001  660896

real    0m0.030s
user    0m0.019s
sys     0m0.020s
[user@archlinux-box 14k-files-dir]$ time ls | wc
  14000   14000  632894

real    0m0.021s
user    0m0.009s
sys     0m0.015s

As can be seen the speed listing directories differ vastly. I am puzzled to determine the reasons.

It is mostly unclear why the direct "on Android device" comparison of directories listing times is so huge (1-0.7seconds vs 4-5seconds for /sdcard/DCIM/Camera)
It is puzzling as I would expect both folders residing on the same block-device and filesystem being both below /sdcard ?
In a bigger picture however I cannot wrap my haed around (and seek with this question the causes that a 10 year old linux laptop can list 14k files at 0.02seconds while a rather recent Google Pixel 7a needs 0.7 to 5+ seconds, so plainly 250 times as long?

#Update#
I have found this info on redit which mentions

As mentioned below, it seems on Android 11 ALL file access to external storage goes through SAF, even when targeting API 29 and using standard file access functions. This is a change from Android 10. This explains the difference in speed.

I hence wonder (with regarding to the causes I seek in this question here) if this this still the reason?
Also with this new information I cannot still see why the two folders still have 5-10 times different directory lookup speeds.

This seems to be a known problem of sdcardfs, caused by the case insensitivity of the /sdcard section (to simulate the old sdcards with FAT file-system that were used before Android 4). Google speaks about large folder slowdown from SDCardFS https://source.android.com/docs/core/storage/sdcardfs-deprecate

@Robert no computer/software perfomance pain cannot be made worse knowing that the mad idea of Micorsoft to have file.txt and FiLe.TxT be the same file. yeah I will look into it. I yet almost asume more it at play, because the test files created are still much faster listed as the /sdcard/DCIM/Camera files and I assume it is a sort of overengineered "privacy"/tagging (maybe selinux...) feature there...

@Robert Can you maybe confirm if the path /sdcard on a Google Pixel 7a on a sdcardfs filesystem, how would I dertermine that via adb shell? so I can add the info to the question ?

I don't have a Pixel 7a at hand, on a Pixel4a running Android 13 sdcardfs is used. On a rooted Pixel 8a I only see fuse (don't know if Magsik has an effect on this). I think you have to check it yourself. I use adb and execute mount | grep -i sdcard (no root necessary).

Partial answer
I can't explain all of this, but I can explain parts of it.
Laptop vs /sdcard
That Linux laptop is presumably using ext3 or ext4 filesystems? Those are far more efficient than the simple-minded FAT32 filesystem that Android uses (actually, emulates via sdcardfs) on /sdcard, and operate vastly more quickly.
Why does Android use FAT32?
Android needs to be able to handle storage on exchangeable memory cards (usually micro-SD cards), and those cards need to be readable, writable and formattable on Windows, Linux and macOS. All of those desktop/laptop operating systems can handle FAT32, but getting them to handle each other's main filesystems is much harder.
Android also has the capability to "adopt" a memory card as part of the device's storage, and that's far simpler if the device's storage uses the same kind of filesystem as a memory card.
For extra complexity, Android's native internal filesystem is ext4 but it uses a FUSE ("Filesystem in Userspace") driver to let the internal storage be accessed as FAT32.
Why is listing 14,000 zero-byte files faster than 14,000 photos?
That's the part I don't know, but the obvious experiment is to create 14,000 files, each about the same size as your typical photos, and see if that's as slow as the photos. I expect it will be.

Android (since 4?) does not use but simulate a FAT32 case insensitive file-system using sdcardfs.

@Robert: Thanks, added.

the pixel 7a (as mentioned) does not support mmc/sdcards. I guess the naming of the directory /sdcard (which often is /storage/emulated/0) appears to be some naming form the past, when it was usual that sd-cards played a role. I guess we can rule out FAT32 playing a role in modern android devices like Google Pixel 7a :)


text:
How to connect external volume via micro USB to an Android phone?
I am trying to connect an external SSD storage to my Android phone (Redmi 12C running LineageOS 21 based on Android 14), and view its contents.
How can I connect the disk?

An external SSD disk has an USB interface. That needs to be connected to the USB port if your Android phone. Not sure why you try to connect it to the headphone jack, but that port is for analog audio only.

@Robert Well, that's because I have a to-USB adapter for the headphone jack, and not a micro USB to USB adapter. So if connected via micro USB charging port, then the disk should be displayed in a regular file manager?

No, a headphone jack to USB adapter is for audio devices only.

"So if connected via micro USB charging port, then the disk should be displayed in a regular file manager?" it should be, [tag:usb-on-the-go] is the term you want.

Also be aware that the amount of power provided by your phone is limited so you may need a usb hub which can connect to mains/wall power. How much current can an Android phone's USB port supply?

@AndrewT. My use case is as simple wanting the ability to attach a portable SSD to my phone and read its files. From Morrison's comment for example this is not what I imagine is meant... the phone is a host for the disk. The phone may or may not have sufficient power for the disk? The phone's hub has to give power to the disk in order to read it? Is this how it works? Sorry, this introduced a lot of new information to me hence I'm confused.

@Kamil The micro USB-OTG port is very limited regarding the maximum power it can/is allowed to provide. That is one of the reasons this port is now outdated.

@Kamil You should edit your post to include the make/model and OS version of your phone. Having a phone power a SSD is around the limits of the USB 2.0 spec so 'should work' if your phone supports USB 2.0 but you'll need a USB On-the-Go adapter to find out.

@Kamil Based on GSM Arena - Redmi 12C you do have micro-USB 2.0 and as it is a relatively recent device should just need a USB On-the-Go adapter to connect to a portable SSD using a supporting Android file manager app. If you are still having difficulty I would test with a USB thumb/flash drive with the USB On-the-Go setup to isolate if its a phone or SSD issue.

@MorrisonChang The reason why it did not work was because I used the audio input. I have to order USB-OTG in order to test if it works, but as you say, it should work. Thanks!

@MorrisonChang I got the micro-USB to USB-A adapter and the SSD seems to be recognised, but cannot be displayed as an external device in the menu of two different file manager apps. What I mean is, I can choose to view either "internal" or "SSD", but then it prompts me to select it on a menu panel, but it's not there. It should be a software thing?

@Kamil Does it work with a regular usb flash drive? Does the SSD have lots of files? Too many files may delay response but just a guess.

@MorrisonChang It works with a regular USB flash drive with no files instantly. SSD stores +250 GB and has the overall capacity of 1 TB. I'm checking now if the response guess might work out.
Edit: It shows up in storage settings and says it's corrupted (it's not exFAT I guess) - it then prompts me to set up disk as external SD card storage device. I guess formatting it to exFAT would make it readable!


text:
When will RISC-V Android devices be available?
Google announced in December 2022 that Android would support RISC-V devices. More recently, Qualcomm have announced that they're working on a RISC-V chipset for Wear OS with Google.
When will we be able to buy RISC-V Android devices?

What is RISC-V?
It's a new species of CPU, which is meant to compete with ARM and x86 for general-purpose computing, including smartphones and tablets. The design work started at the University of California at Berkley, and is their fifth RISC design family, hence the name. The design seems reasonably sound, although it hasn't been built in forms that compete with the fastest ARM cores yet.
The unusual thing about it is that the specification is open source, and can be used  by anyone without license fees or royalties. Many people and organisations have contributed to the design, just as happens with open source software. However, the design doesn't include designs of processor cores as actual electronics. Organisations that want to build RISC-V processors have to design cores themselves, or license them from someone else.
What are the advantages?
The simplest advantage over ARM is cost. There are no architecture license fees, although most organisations will have to pay royalties on the core design(s) they use.
The other advantage is that it is open source, and nobody can forbid you from using it. A few years ago, when it looked as if ARM Holdings were going to be bought by Nvidia, and thus become an American-controlled company, this was important. Huawei is one of China's largest smartphone manufacturers and a major target of US trade restrictions. They started work on porting Android to RISC-V, so as to have a fallback if their ARM license was withdrawn. At present, ARM Holdings has had an IPO as an independent company, and there's no immediate prospect of the US government requiring ARM to cut off Huawei, but that could change in the future.
Even if you're a US or European company with no fear of loosing your ARM license, having a competitor to ARM ready to go is a useful bargaining chip.
Progress with SoCs for Android
Lots of companies have designed basic RISC-V implementations, but being basic, they aren't all that fast. Designing something as fast as an ARM Cortex-A78, to pick a no-longer-leading-edge core that's still widely used, requires designing an out-of-order execution core, which is a lot harder than an in-order core.
The leading company in designing fast cores was SiFive, until they made 20% job cuts in October 2023 and apparently abandoned designing general-purpose cores in favour of customer-specific ones. They had a partnership with Intel in 2021-22, but that appears to have ended and their latest development board is based on a Chinese SoC rather than the Intel "Horse Creek" chip, which did not happen.
A start-up company, Ahead Computing  was started recently by various former senior Intel people, but is presumably years from delivering high-performance cores.
RISC-V is not dead yet, but its progress towards being performance-competitive with ARM chips looks to be having a slowdown.
Google's work on Android
Since RISC-V is a very modular architecture with many optional parts and extensions, Google needed to define a minimum standard so that software could be portable between devices. The first pass of that has been done and was presented at the June 2023 RISC-V summit in Europe. The was an announcement about it in October 2023. Here's a talk from SiFive about their work with Android on RISC-V.
Because RISC-V is extremely modular, it is necessary to define standards (called "profiles") for Android devices to support, so that software can be compatible with hardware. The initial profile adopted for Android porting was RVA22. The RVA23 profile was ratified in October 2024.
However, the Android kernel team feel that RISC-V needs better "atomic" instructions, which will require a new extension to the RISC-V instruction set. That appears to have materialised as the "Zabha" extension, which was ratified in April 2024, but has not been merged into the main specification as of October 2024, let alone been implemented in any hardware. It is mentioned in the RVA23 profile as not included there, but intended for a future profile.
Google's Android team need to complete the port of AOSP to reference RISC-V hardware and get it working properly, at the same level of quality as ARM Android. That is underway, and as of 2Q2024, ASOP could be built for RISC-V and run on Cuttlefish virtual devices, including ART with JIT.
You can track their progress on Github here. As of 2Q2024, the NDK ABI is not yet fully defined, but the working state is a proper subset of what's intended. There is RISC-V support in NDK 27, to help OS vendors get their systems running.
Google backed out some work
On April 29th 2024, Google removed RISC-V support from the Android Common Kernel ("ACK"). The ACK is Google's version of the Linux development kernel, which has some Android-relevant changes that have not been adopted into the mainstream kernel.
Kernels to go into specific Android versions are called Generic Kernel Image ("GKI") kernels, which means "generic Android kernels," not generic Linux ones. They are forked from ACK.
This means that anyone developing a RISC-V Android kernel has to do more work themselves, and that nobody can ship a certified Android, using the trademark, on RISC-V. It doesn't mean RISC-V Android will never happen. Changes like this can be reversed fairly easily. Google have said they "are not ready to provide a single supported image for all vendors."
At a guess, this means they want to make sure the necessary instruction set extensions are available before they let anyone produce Android(tm) on RISC-V. There might well be additional reasons, or my guess may be wrong.
Device builders' work
SoC designers who compete with Qualcomm, like Huawei and other Chinese companies, who want to sell RISC-V based SoCs for Android will need to design or license cores. When they have those, they will need to design and prototype their SoCs and get them ready to offer to device manufacturers. With that, Android devices can be built and sold. Google expects wearables to be the first Android devices available, presumably because they don't need as much compute power as high-end smartphones or tablets.
App suppliers' work
RISC-V Android should run pure Kotlin or Java apps just fine, but it won't run NDK libraries built for ARM or x86. Rebuilding NDK libraries needs an NDK that can compile for RISC-V, plus upgrades to the Android SDK so that it knows of RISC-V and can manage the builds, and those aren't available yet. A way to tell if they are forthcoming is to check the web page that lists Android NDK ABIs. The RISC-V ABI was originally expected by the end of 2023, but is delayed by the need for atomic instructions.
Device availability?
This can't be predicted at present, because of the need for atomic instructions. Those need to be designed into new cores, and those cores need to make it into hardware, before Android can be released.


text:
Can I enable USB debugging on Fig Flip II (Kosher OS)?
I have Fig Flip II running on Kosher OS (Android 11) on which Developer Options is blocked, so when I press the build number 7 times, nothing happens.
I can't install apps on the phone. When I try opening an APK file it says 'APK not allowed', but it does have a package installer - so I can't install a USB debugging app.
Is there a way for me to enable USB Debugging on this phone?

There are apps that can directly open developer options settings page. T his should work no matter if you have activated developer options or not.

@Robert Is it an app that I would have to install? Because my phone only comes with basic apps, and I can't install any more.

@Robert I added in why I can't install apps. The phone is the Fig Flip II, but nobody has heard of it - its a really small company.

Does your phone have Settings -> Security / Privacy ->Install from Unknown Sources?

Found this thread discussing about this phone and how it's heavily customized. This looks like a very locked OS like [tag:gabb] phones all over again...

@RohitGupta No, it doesn't.

If you are willing to tinker a bit, you may try to enter some sort of flash mode via holding either or both volume keys and the power button while the device is shut down. From there, you may try creating a custom recovery (not for typical end users) or use tools to extract out the userdata partition for adding apps and editing settings.

If there is a way to enable USB debugging, the manufacturer will see that as a bug. It seems that some Hasidic Jews see the Internet as a major danger to their culture, but feel that mobile telephony and GPS navigation are OK and useful.
There is thus a market for Kosher phones, which provide the acceptable features without the problematic ones. Other companies distributing those include Kosher Cell, Planet Cell, Safe Cell, Safe Telecom, and Kosher Mobile.
Many of these phones are normal Android or iOS devices with filtering software installed. Fig Kosher appears to do the job more thoroughly, with their own customised version of Android, "Kosher OS", which leaves out problematic features.
It appears that users of Kosher smartphones have problems with temptation, or fear that their teenage children will be tempted, so these phones are tightly locked down. Allowing USB debugging would run the risk of phone users being able to install apps, such as a web browser, via adb install, and preventing that is the whole point of Kosher OS.
To make things more confusing, there are two different customised Android versions targeting the Kosher market.
Fig's version is quite minimalist, and runs on their own phones, which are quite low-end. Their operating system is based on Android 11, which left support in February 2024, so they may not be getting security updates.
KosherOS by Safe Telecom runs on Google Pixel devices. The currently distributed version is based on Android 14. It also offers e-mail, What's App and an app store providing a selection of Kosher apps.
The two versions of Android have similar objectives, but have taken rather different approaches to solving them.

The phone does have developer option although they're hidden. You can find them by going to settings, typing in the word autofill in the search bar and selecting the setting in developer options. However, USB debugging is greyed out and cannot be turned on. Although Wireless debugging can be turned on, when I try to connect to adb, I get an error message that the device refused the connection


text:
How to tell an Android device that only has ADB connectivity about an NTP server?
In a comment on this question Robert asked:

Have you tried to provide an NTP server in your local network and announce it via DHCP?

How can I do that, please? I have several development devices whose only connectivity is ADB over USB to a Linux development host. That's part of a corporate network with an NTP server. The devices' date and time drifts, and has to be reset occasionally. Being able to tell them about an NTP server would be splendid, if they can access it through the ADB/USB connection.
I have root on the devices, and can this change their date & time from the ADB shell. If I couldn't do that, I'd use the GUI. They're running a pretty vanilla Android 12.

The DHCP server of a network can be configured to not only provide a client IP address and DNS/WINS server IPs, but also the IP of a NTP server. Some (home) routers that provide NTP for the network already announce their own IP via DHCP as NTP server. However I am not sure how common it is for Android devices processing this DHCP field and using it's announced NTP server.
I think most Google Android devices by default will still use ntp://time.android.com (or the manufacturer specific NTP server).
Alternatively you can manually specify the NTP server via ADB:
adb shell settings put global ntp_server <new-ntp-server>

See How can I set a server address to automatically sync my device time?

I may have misunderstood you. The development devices I'm using don't have any form of Internet connectivity, so they can't see ntp://time.android.com, and don't have any communication with a DHCP server at present. I thought you were commenting about a way to tell a device about the IP address of a DHCP server.

@JohnDallman DHCP servers are found by all devices automatically as DHCP traffic uses broadcast communication. Do you mean "any form of Internet" or "any form of network"? There is a big difference... Anyway all Linux system have network - at least localhost. So if there is no other networking you could still try to run an ntp server on localhost (with a different port as everything below 1024 requires root). I just don't know if Android allows to use a time server on port different to 123.

No network at all, except anything that comes through the default settings of ADB over USB, which is nothing AFAIK. The Linux host is part of the corporate network, on a company site.

@JohnDallman adb allows TCP and UDP port forwarding, unfortunately as you don't have root only for ports larger than 1024 (for the local port on Android side).

I have root, but a very limited understanding of TCP and UDP.

@JohnDallman sorry I was mixing up your question with the one you have linked to. If you have root port forwarding of UDP port 123 from the device to the host PC and a NTP  server running on it should be feasible. Alternatively you could check if the board support USB OTG and may be a simple USB Ethernet adapter allows you to make the device network ready.

Thanks, I'll try that and edit results into question and answer.


text:
Is this "Boost" / File Manager app a true system app or malware?
I installed this app after I received a notification on my lock screen informing me that a new system app was available for download. Seeing that the app was listed as an update to the "File Manager" app, I assumed it was safe and downloaded it. Now it's filling my lock screen with spammy looking notifications, prompting me to "boost" my phone to free disk space and memory.
The original File Manager app that shipped with my Android was very unobtrusive and was located in the Settings app on the phone. It never interfered with anything I was doing. It never sent me twice-daily notifications to 'clean my system', 'boost my phone' or 'free up RAM'. That is what makes me think this app is really malware posing as a true system app and tricking Android into installing it.
There is no way to uninstall it or disable it. The  original File Manager app appeared alongside this app for a while, but the original app was recently removed and no longer shows up. My phone is lagging and other apps are crashing or not performing well since I installed this app. Additionally, this "Boost" app that has installed itself on my home screen is full of ads. No true Android system app has ever contained ads that I have seen, so this is very fishy. Also, the fact that it cannot be disabled is also very suspect.
I am suspicious that it is affecting my phone in a negative way and I want it gone! I cannot imagine that Android would release a "system app" that was full of ads. PLEASE HELP!
The device affected is an Alcatel Fierce 4 5056N running Android 6.0.1.
Images available on Google Drive: https://drive.google.com/file/d/0B0Tg7BtjmCMqWXZZVXgwQy0xOXc/view?usp=sharing
https://drive.google.com/file/d/0B0Tg7BtjmCMqX2dKbTBTaDMyblk/view?usp=sharing

I was able to easily uninstall it from my android phone.

This is a system app update from Alcatel. Recently they started updating some of their apps. I'm assuming you have an Idol 4 or 4S.
Although you can't uninstall or even fully disable this app, you can uninstall updates and stop automatic updates. Go to Settings - Apps - File manager. In the upper right-hand corner, push the three dots and click "Uninstall updates". Then go to Google Play - Your apps, click the file manager. Then in the right corner, click the three dots. Uncheck "Automatic updates". This will keep it from updating. You can do this with all of Alcatel apps.
I don't know why they thought having a purple octopus on the main screen a good idea but I and others have sent several emails regarding it and have been ignored.


text:
Why does Chrome drain more battery compared to Edge beta?
I'm currently using Google Chrome and Microsoft Edge together on the same smartphone. They share the same data, book marks etc. But even with data saver chrome kills the battery.
Not related: Even on the PC it's the same, chrome eats more resources.

On going investigation points out to the sync feature, and play services hurting the battery pack and using up RAM.

Chrome is draining the battery at 5% per 20 minutes.
Edge is at 2% per 20 minute drain interval.

Same forums, same accounts.


text:
Can't access Gmail Inbox trough Sqlite3, mailstore.email@gmail.db doesn't exist Android nougat
I used this to get all emails on inbox (on android shell or through tasker running a shell command):
 sqlite3 /data/data/com.google.android.gm/databases/mailstore.YOUREMAIL@gmail.com.db "SELECT fromAddress || '@|@' || dateSentMs || '@|@' || Subject || '@|@' || snippet FROM messages m LEFT JOIN message_labels ml ON m.messageId = ml.message_messageId JOIN labels l ON l._id = ml.labels_id WHERE l.name = '^i' ORDER BY m.dateReceivedMs DESC;"

However, since I changed to a new device with android 7 (first emui 5.1 and then LineageOS 14.1), it doesn't work. Analyzing Gmail database with Sq lite dB reader, I found out that mailstore.YOUREMAIL@gmail.com.db file doesn't exist anymore. I checked the available db files but non of them seem to contain inbox info...
Does anybody now how to get inbox now?
Regards,


text:
Apps like Viber, Messenger, WhatsApp, etc. whitelisted from Doze mode on Samsung without asking
I noticed that some applications are whitelisted from doze-mode on samsung devices without having ever asked the user. I tested this on a galaxy s8, galaxy A5 2016, 2017 all running android 7.0 or 7.1. These apps are for instance Viber, WhatsApp, Messenger - they're what I have seen.
When I first noticed this on a samsung I was not 100% sure that I have not by chance given them that permission myself... So I have done a fresh test by hard resetting a Samsung A5 2016 and installing only Viber onto the fresh phone. After the install, I have not even logged into Viber (and it had not had a chance to ask me of any permissions at all), I immediately checked the Battery Optimisation whitelist and Viber was there.
So the first question is how - according to Android specs an app must ask the user to explicitly allow whitelisting (Am I wrong here)?
The second question - is this maybe possible on Samsung despite the spec.
The third question - maybe Samsung just knows some well known apps and whitelists them by default itself?
--EDIT
The initial research on this was hindered by the fact that if you google "samsung doze-mode whitelist" maybe with "not asking the user" it still serves you many links to the official doze mode specs and media articles, but not Samsung related. But then I searched with "samsung smart manager whitelist" and found the following

Question on SO (second answer gives a list of apps which are whitelisted)
https://stackoverflow.com/questions/37205106/how-do-i-avoid-that-my-app-enters-optimization-on-samsung-devices

the list of apps in the second answer was of undisclosed source but I can confirm that I checked nearly 10 of them and they are whitelisted by default
2.https://seap.samsung.com/forum-topic/whitelist-app-batteryoptimization-smart-manager-application
Funny thing - the user asks a question and a part of the question is the same as mine - why Viber etc are whitelisted.
The answer is carefully avoiding that part and only answers the other part - that he should ask the users consent or use Knox (also asking the user for permission)
So answers to my own questions

According to the spec the app must ask users consent to be whitelisted - yes.
not possible on Samsung for a simple app, either
Yes, Samsung has a whitelist of well-known apps in its Smartmanager

2 more pieces of info
A. Samsung is reluctant to talk about it(see above SEAP link) or maybe not everybody there is aware of the fact.
B. If you have an issue with Samsung doze-mode, do not google for "Samsung doze-mode", google for smth. like "Samsung smart manager doze-mode" (add "smart manager"), because it will yield more Samsung specific results (And Samsung part of battery optimizations is pretty specific).

Samsung Galaxy A5 (2017) devices have a so-called "Game Enhancer" or similar mode, which pops up anytime WhatsApp, Telegram or well-known IM apps are installed. Given this, it is entirely possible that the odd behavior you see, be some kind of Samsung idea to avoid any delay in message delivery. Note that I have no proof of this.

thanks for your comment! Tell me, do you mean this "Game Enhancer" literally pops up like displaying some window? because I have seen nothing popping up when installing Viber on A5 2017. (neither did I see anything odd when installing the same on A5 2016).

It pops up in the same fashion as when you receive a notification of a new message. It may be dependent on specific versions of TouchWiz, though.

Thanks for the info, I never seen this and I do not know what a TouchWiz is, need to read about it. But anyways I do not seem to have it and the question is how Samsung really works with this whitelist and why it allows those certain apps to be there without users consent

@ketzal You can always accept helpful answers by clicking the grey tick beside the answer.

May I answer your question in a reverse order:

maybe Samsung just knows some well known apps and whitelists them by default itself?

Definitely. It's a common practice in China to have a built-in battery optimization whitelist to contain famous Chinese apps like QQ and WeChat (and Weibo and such) for convenience issues. So I suppose it's not restricted to China, but also that Samsung could make the same approach.

is this maybe possible on Samsung despite the spec?

Yes. Not only Samsung, but also OnePlus, Xiaomi, Huawei, etc. IMHO Samsung is very considerate when designing their ROMs.

according to Android specs an app must ask the user to explicitly allow whitelisting (Am I wrong here)?

Partially wrong here. An app cannot whitelist itself without user intervention. But it's not required that the ROM does the job instead.

thank you very much for your answer! I did some research as well and added what I found to the original question. There was in fact a similar question on SO (not Android SE) but I did not find it until I changed my searches. But this topic is not discussed widely - not at all. Strange, I think that this is an important topic. if Samsung has a way to whitelist the app, I guess it should give a way to apply for this to other developer companies as well. And they should inform users about this because there are lots of apps on that list and users did not contend to whitelist all of them

@keztal Do note that such "advanced" users like us is only a minority. Most people will only complain if their favorite apps keep getting killed in the background. That's the primary reason for doing so.


text:
New Device: Support Duration from Switch-on
Having purchased a new Galaxy Tab s8 just recently, the question of would the 2027 software update curfew still hold, or will the clock for support start ticking once it is turned on, connected to the internet (and optionally registered)?
Experience with the older Galaxy Tab A S10.1 (2016) purchased in 2017 was positive, a generous 5 years, with the last update in early 2022. Because it had only occasional usage, functionality is not impaired in any way, and looks as if it could see out a couple more years at the very least.
Given that four years is the current figure for lifetime support, would switching on the new device then take it on to September 2027?

When you switched it on is immaterial, the clock started when the device appeared in the market. If you purchase a device towards the end of it's support period, updates stop when the support period is over. Samsung Security Updates clearly says

And select devices launched in 2019 or later will be supported with firmware security updates for a minimum of four (4) years following their global launch...

(Emphasis added)
From a quick search your device was released in February 22. Your support period started from that date. In other words you have about two & half years of support left.

General Information that may be of use
See Check this new tracker to see if your phone will get the next Android update and the Android Update Tracker.

Thanks, not easy to locate this info from the product page - serviceable lifetime of product is important.

@LaurieStearn Perhaps worth noting that the updates that the manufacturers provide are common to everyone (usually based on device model), not personalized (e.g. based on switched-on date). Thus there will be no updates to everyone since the manufacturers also stop creating new updates after that device model reaches the end of life.


text:
How to get Google to appear when swipe left on home screen?
I accidently turned off the setting that allows google to appear when you swipe left instead of cycling through the screens of apps. I unfortunately cannot now find that setting to turn it back on, even though I have done several searches on the settings app, and opened every setting, have not been able to find it again.
I have no idea what I did to make it turn on, it just came up and I wanted to see what it has done.
I have completed several google searches such as this one prior to my request. However I have not been able to find anything.
Where can I go to find this setting?
I have Android 7.1 on a Nokia 6.

Long press on an empty space on your home screen. Then select the
  settings at the bottom right. Then make sure the Show Google App is
  toggled on.

Credits: Swipe left for Google Now not working?

I had completely forget the settings there, thanks for the help, problem solved.

Check if Google search (with OK Google) is available on the home screen, if yes,
Click on the G icon, which will open the personalised updates (cards), in the bottom right corner click on more (...), which will open a new tab
Here, (top of the screen) if you have multiple email addresses, check if the selected email address is correct. (this was the corrective action taken by me to get back the required feature)


text:
How to turn off Nokia theme tune on startup?
My Nokia 6 always made the Nokia theme tune when it was turned on from being completely off. However, for a short period, I had another user account on my phone and it didn't make the noise every time, but there were still a few instances where it did.
I've Tried

Putting my phone in Do Not Disturb
Using the Complete Silence DND option
Having my phone on silent
Aeroplane Mode
Having my phone on charge and off charge makes no difference
Looking for a setting that turns it off(suggested in a previous anwser)

All of these were done before I turned the phone completely off.
I've done some research on Nokia forums and other sites and most answers suggest one of the following above but none of the above have worked.
Now I have removed the other user and I am running the single user account with no guest user. It is making the noise more, but not every time as before I would say that it's roughly 40% of the time it makes the noise now.
Is the fact that I created the other user account linked to the noise stops, its the only thing I changed on my phone which is why I'm making that assumption.
Is there any way to stop the noise compleat as it can be annoying(and embarrassing) when turning my phone on in public?
I'm running Android 8.1.0

Have you tried plugging in headphones while restarting?

@DarkHippo Yes I have and the noise is still played through the speakers even with them plugged in.

Some Android phones allow going into Settings > Sound and finding a option called something along the lines of 'Startup Ringtone'.

Unfortunately, my phone doesn't have such a  setting, I'll edit that in my question for future answers

Just place your finger over the speaker on the bottom of the phone on the right, it completely blocks the sound and only takes a second. I use this method every time and it works 100%.


text:
Changing Screenshot format from PNG to JPEG?
I want to change the screenshot function to take screenshots using JPEG rather than PNG. The JPEG should also have time & date info. Are there any apps/magisk modules that do this?
Root methods prefered so as to still have the system screenshot functions

I don't know about Magisk module that can do this but here is an app alternative
Touchshot is an app I use

Hover button (overlay)
JPEG / PNG - JPEG quality 80 /90 /100 and resolution can be varied from 640 x 360 , 1280 x 720, 1920 x 1080
Date and time stamped screenshots for instance 20171229_140953.jpg for a screenshot just captured

It's good but it's a bit bloated. Problem is that it doesn't do the system screenshot stuff (scroll capture, take screenshots on snapchat since it probably uses a different api) and would be nice if it had a button mapper shortcut.


text:
Stuck in boot loop after doing a factory reset, uploading custom firmware (via Odin), rebooting and doing another factory reset
I have the same issue as descibed here. I got the firmware file from here.
My phone isn't recognized by my computer when I connect it to USB ports that other devices work with while connected to the same ports. (The error popup notification from Windows Explorer is "This device malfunctioned and Windows can't connect to it".) The phone shows charging icon when connected by cable to a power socket. So while I tried to follow the following steps, I got stuck. Since there does not seem to be a connection between the phone and the computer, the flash won't complete.

Extract (unzip) the firmware file
Download Odin v3.12.3
Extract Odin ZIP file
Open Odin v3.12.3
Reboot Phone in Download Mode (press and hold Home + Power + Volume Down buttons)
Connect phone and wait until you get a blue sign in Odin
Add the firmware file to AP / PDA
Make sure re-partition is NOT ticked
Click the start button, sit back and wait few minutes

This is a screen shot of my interaction with Odin.

Other than getting a new phone, do you have any tips on how to fix this?
I tested a cable with another device, and it worked with that device.
I then tried again with that cable and the same port.

OK I got Odin to pass. I just had to make sure that it was connected properly and the MD5 file was added by clicking in the AP box and opening the file rather than dragging and dropping it into the box. Once I did that it started to download.

However, the phone is still stuck in a boot loop.
I am now able to connect to PC (Odin) but not able to make it boot.
I did a factory reset and rebooted, but I still get the same thing—it won't get past the boot screen.

Go to recovery mode manually by using Home + Power + Volume Up, then try a factory reset from there.

I'm pretty sure that I already tried that.

I tried again. Holding those buttons down, it would keep rebooting. If I held them down until the boot screen appeared, the screen would stay stuck there after I released it.

OK after a few minutes it went to recovery mode.

I did a factory reset and rebooted, but I still get the same thing.

Not what I expected. Considering that you're now able to connect to PC (Odin) but not able to make it boot instead, I suggest making some (drastic) edits to the question so it reflects your current situation better.

OK I've updated the question.


text:
What file system for Asus Zenfone 2 on CentOS 6.9?
I'm trying to mount my Android Asus Zenfone 2 on CentOS 6.9. I created a folder in /mnt/android as the mounting point. I edited the /etc/fstab file in the following way because somewhere in some forums I read that jmtp  file system correctly handles the Android phones' file system. But now the OS doesn't automatically read the file-system of my phone when I connect it via USB to my PC. Can you help me figure out what file system I could use in the /etc/fstab in order for me to access files correctly?
Thank you.
[dolly@centos mnt]$ sudo cp android/"Internal storage"/WhatsApp/* ~/Pictures/
[sudo] password for dolly:
cp: cannot stat `android/Internal storage/WhatsApp/*': No such file or directory
[dolly@centos mnt]$ sudo cp android/'Internal storage'/WhatsApp/* ~/Pictures/
cp: cannot stat `android/Internal storage/WhatsApp/*': No such file or directory
[dolly@centos mnt]$

/etc/fstab/ file
#
# /etc/fstab
# Created by anaconda on Fri Oct 27 00:03:17 2017
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_hpdv6000-lv_root /                       ext4    defaults        1 1
UUID=8b4c9d1b-6bcb-4bfc-b48f-146a415fb8f3 /boot                   ext4    defaults        1 2
/dev/mapper/vg_hpdv6000-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/sda1           /mnt/win ntfs-3g rw,umask=0000,defaults 0 0
jmtpfs                  /mnt/android fuse nodev,allow_other,rw,user,noauto,noatime,uid=1000,gid=1000 0 0

===
EDIT 1
I've got Andoroid 5.0 Lollipop. I had chosen it among the tags for this question but I can understand if someone missed it.
The filesystem I'm looking for is one that allows me to copy some old classical music, from the PC into the phone. I have Fuse package installed and it allows me to read/write files from my Windows 7 partition.

Isn't that rather a question for Linux&Unix.SE? On Android we usually don't edit fstab files – and I just wonder why your corresponding fstab entry starts with a file system instead of the device. So I wonder how the device should be identified there at all. But as said, that's rather not an Android question but a CentOS/Linux one.

@Izzy We have many other questions about accessing the phone via MTP from a Linux desktop, e.g. this one about mtpfs on Ubuntu. I think this one is perfectly reasonable.

@DanHulme which is why I didn't VTC. Though, as I've pointed out, it IMHO weights more on Linux specifics. OP didn't mention the Android version used; I e.g. use adbfs to access my Android devices, which works fine at least up to Android 6.


text:
What is this square chat bubble / balloon icon on the top left of a screen. It has a call out arrow on bottom left

There is a square chat balloon icon or chat bubble appearing on the notification panel on the top left of screen. What does that indicate ? It has a call out arrow on the bottom left.

Pull down the notification panel and see for yourself

It is not on my phone. Saw it on someone else's. I have never seen it before

Taking into account that it is a chat bubble icon, it means that you have got a new message from a person while the chat/message app was closed or in the background. I think that it is almost the same as the chat notification indicator of 'Facebook lite' app

Through help in another forum I was able to find out what the square chat bubble icon with the left callout was on my phone... an indicator that my Walgreens app was running in the background. I was able to set up a widget on my screen (hold, select widgets, select Settings 1x1 and drag to screen, select Notification Log as type) which shows my notification log and Walgreens has been running and/or using battery all-day every day for a few months. This is a problem as I do not often actively use that app. Guess I'll be uninstalling Walgreens.


text:
Decrypt SD Card Files Encrypted by Samsung Note 8
Few months ago I encrypted my Micro SD card on my Samsung Note 8 for security purposes, and 2 days back the phone overheated and asked me to turn off. After awhile I was trying to turn it on but got no luck. I brought the phone in the Samsung Service Centre and they fixed it by replacing the motherboard. And now the problem is, of course, I didn't get any chance to decrypt the SD card and now I cannot decrypt it because the phone kept telling to me that I have to use the same phone I used for encryption. I have tried a solution from this (https://security.stackexchange.com/questions/116750/how-to-decrypt-a-microsd-card-after-a-factory-reset-of-the-device-used-to-encryp) but no luck. Where I copied the encrypted files on my PC then format-encrypt-copyfiles... etc... Or maybe because the guys uses S5 here and I have Note 8. Whew! I really don't know what to do. I need some important documents in that SD card and even Samsung cannot give any solution about my problem. Hope you guys can give me some solutions. Apologies to all because I know that this issue has been asked here many times but I cannot comment in that so I've decided to make a new one. Thanks in advance.

Did Samsung copy your user data from the old mainboard to the new mainboard? If not the encryption keys are AFAIK lost and your data can not be decrypted.

They did not. Is it possible?

The purpose of cryptography like AES is to make it impossible to decrypt data without having the key. The key was in your user data therefore the encrypted data can no longer be decrypted. Breaking an encryption like AES (if AES and key derivation was implemented correctly) takes several thousand years. Therefore consider your data lost - start using backup and synchronization Apps in case you have important data on the sd-card.

Yes. Data got lost.. OMG.. This is life... What to do...


text:
How to use -net-tap with android sdk emulator?
I am trying to create a bridge between android emulator (from android sdk) and host system using -net-tap. Is there any working manual for that case? I have tried to launch emulator with -net-tap tap0 - tap0 appeared in host system, but no one interfaces appeared in guest android. I also tried
-qemu -net tap,iface=tap1,script=no, but it also doesn't work. I checked /proc/kmsg, there are no anything connected with new interface.
Full cmdline looks like /opt/android-sdk/emulator -avd test-x86 -accel off -no-audio -net-tap tap0 -qemu -net tap,ifname=tap1,script=no
Does anyone have an idea?

-net-tap tap0


text:
Adb command(s) to get screen state and locked state
Background:
I'm using automated tests on many different variants of devices (Samsung tablets and smartphones such as Galaxy A5, S8, S7 etc.) where the devices have different versions of Android (6.0, 6.0.1, 7.0 and 7.1.1) - all in varying combinations.
Some of my tests require locking the screen (turning it off) and then turning it on and PIN-ing in. I have not been able to find a (universal) adb-command to get the phones' state. Ideally, I would like one command to tell me in which of the following states the phone is in:

Screen turned off (Assumed locked as well)
Screen turned on, locked
Screen turned on, unlocked

My best solution so far is to use the following 2 (bash terminal) commands:
#1:
adb shell dumpsys display | grep "mScreenState"

#2:
adb shell service call trust 7

Command #1 tells me whether the screen is on, off or "dozed".
Command #2 tells me whether the phone is locked or unlocked.
Questions:
Is there a single adb command which can give me the information I need? Is this command compatible with the Android versions listed above?
On Android version 6.* command #2 always indicates that the phone is locked. What is the "Android 6.* compatible" alternative of command #2?  ----> By pure chance I found that "service call trust 6" works as expected on Android 6. devices!*
Note:
The resource I've found that most closely resembles my issue is the following SO question/response. However, not all of the devices have/use NFC so the following command (although compatible with most devices/versions) is not acceptable in my tests:
adb shell dumpsys nfc | grep 'mScreenState='

Since timing is an issue, the proposed solution (best answer in the link) is not acceptable either.

I am a Windows fanboy, so the solution contains find instead of using grep, just replace find with grep.
adb shell dumpsys power | find "mWakefulness="
adb shell dumpsys power | find "mHoldingWakeLockSuspendBlocker="

Screen OFF and Locked = mWakefulness=Asleep &
  mHoldingWakeLockSuspendBlocker=false
Screen ON and Locked = mWakefulness=Awake &
  mHoldingWakeLockSuspendBlocker=false
Screen ON and Unlocked = mWakefulness=Awake &
  mHoldingWakeLockSuspendBlocker=true

P.S: I've tested it on Android 7.0, don't know if it'll work with other versions.

As I've run into this recently and since using the Daydream lockscreen is not an requirement on Android, here's some newer variables that are (probably) universal.
They should be available starting at Android M (6.0 / API 23) since they come with Doze mode; I've confirmed them with Android 10 on a Samsung Galaxy Tab S4 and Android 12 on a Pixel 4 XL.
$ adb shell dumpsys deviceidle | grep '\bm[A-Z]'
mLightEnabled=true  mDeepEnabled=true
mForceIdle=false
mUseMotionSensor=true mMotionSensor={Sensor name="Significant Motion", vendor="Google", version=1, type=17, maxRange=1.0, resolution=1.0, power=0.25, minDelay=-1}
mScreenOn=false
mScreenLocked=true
mNetworkConnected=true
mCharging=false
mMotionActive=true
mNotMoving=false
mMotionListener.activatedTimeElapsed=36192
mLastMotionEventElapsed=0
mLocating=false mHasGps=false mHasNetwork=false mLocated=false
mState=INACTIVE mLightState=IDLE
mInactiveTimeout=+30m0s0ms
mNextAlarmTime=+22m36s283ms
mNextIdleDelay=+10m0s0ms (flex=+2m0s0ms)
mNextLightAlarmTime=-23s699ms
mCurLightIdleBudget=+1m0s0ms

Of course, the prize jewels here are mScreenOn and mScreenLocked, which are booleans doing exactly what you went them to.

You could use awk to spit out the answer you want.  Here is a quick and dirty awk script I whipped up just now:
adb shell dumpsys power | awk -F"[ =]" '/mWakefulness=/ { mw=$NF; }
/mHoldingWakeLockSuspendBlocker=/ {mh=$NF;}
END {
  print mw
  print mh
}'

has answered in Is there a way to check if Android device screen is locked via adb? - Stack Overflow and copy to here:

My Phone: XiaoMi 9

Android: 10

use adb to check status of screen locked
method 1: (universal) use mDreamingLockscreen

Command: adb shell dumpsys window | grep mDreamingLockscreen
Output:

mShowingDream=false mDreamingLockscreen=true mDreamingSleepToken=null -> Screen Locked

no matter Screen is ON or OFF

mShowingDream=false mDreamingLockscreen=false mDreamingSleepToken=null -> Scrren Unlocked

method 2: use nfc (if android has NFC module)

Command: adb shell dumpsys nfc | grep 'mScreenState='
Output:

mScreenState=OFF_LOCKED -> Screen OFF and Locked
mScreenState=ON_LOCKED -> Screen ON and Locked
mScreenState=ON_UNLOCKED -> Screen ON and Unlocked

I would say that it does matter whether the screen is on or off. If the screen is off, then I would first need to turn it on before I can input pin (by simulating menu press/swipe) and then PIN in. How would i input PIN if the screen is off?

Not quite, only universal if they're implementing the Daydream lock… Samsung, for example, isn't.


text:
Disable harmful app notification
A notification with a heading "Disable harmful app" from something that looks like Google Play (because of the logo). No amount of settings is making it go away

This can be removed in Google Settings.

Open Settings.
Select "Google" (if there is no "Google", open Google Settings from your launcher).
Select "Security".
Select "Google Play Protect".
Turn off "Scan device for security threats".

If you don't trust the app you could also uninstall it. Some root apps are flagged as malware (when they are not), but there are also real viruses for Android.


text:
which version of blustacks have instance?
i want to run 5 number of bluestacks on VPS
which version of bluestacks have instance feature and run in VPS and no   graphics required to run?

BlueStacks 3 supports multiple instances, you can follow the below link to see steps:
https://support.bluestacks.com/hc/en-us/articles/115003172406-Introducing-BlueStacks-3-multiple-instances


text:
Force RTL layout not working

Even though I checked the box of Force RTL layout it seems it don't work properly and due to this many other problems are occurring in my HTC Desire 826 dual SIM, like , my screen is 1080 but YouTube is not showing option for 1080p quality

These are some screenshots of Instagram and my bank's app.

The "force RTL" setting in the developer options only makes the locale a right-to-left locale if it wasn't already. That is, if your native language isn't right-to-left, this option makes it draw right-to-left anyway. It allows developers who can't read any right-to-left languages to test that their apps work in a right-to-left language.
The option can't make apps that don't support RTL support it. The app author needs to update their app to support RTL, and obviously they're only going to do this if they're going to offer translations to RTL languages. An app that only supports English probably won't be written to support RTL.
As a rule, it's a bad idea to start changing developer settings without understanding what they do. They're hidden behind this screen precisely because they can cause unexpected or undesirable behaviour.

I m worry about that my app support RTL or not , my phone's text , option drop down menus , app logos , etc get abnormally bigger and they are not going back to their normal size even though i turn off developer option

That's not what you asked about. Maybe you need to edit your question and describe what the actual problem is.

"The option can't make apps that don't support RTL support it." for reference, individual apps can even disable RtL layout.

Your screen is RTL enabled. The settings app is still LTR but check the status bar and the navigation bar it is RTL and that shouldn't affect the video quality please check any other videos in YouTube.

Yes i checked all videos, even those videos which i saw in 1080p are showing only 720p as highest quality option. I dont know but many apps' text and logo become so huge that they are going outside of screen.

Please check anyother developer settings like display size. Can you provide some screenshots about apps which has huge text and logo .

I posted 2 screenshot below as an answer , u can see... As u can see the 3 dots of top right corner if i touch them the drop down which opens is out of screen and i m unable to select any option from there

Please edit the question and add it. You shouldn't post it in answer. The phone has been reverted to LTR again.  Check whether have you increased the font size or dispaly size. Because it is LTR and the RTL setting shouldn't affect this.

I chcked it i havent increase the font size

My possible solutions will be restart the phone, check for changing dpi settings, restart system UI by force stopping it. Toggle again between LTR and RTL to check whether it restore back to current size. Otherwise take a backup and do a factory reset(If nothing happens). I am sure RTL doesn't have any link to it.

Thanks a lot for your assist and time but i tried all methods you had suggested


text:
Problem in opening applications
When i restart my mobile Samsung j5 2016  Or  shutdown so when i switch on my mobile. It start like from begning like when we by new phone . All that app doesnt work before restarting or before switching off i have. Please help me

Install the Android SDK on your computer, connect your phone to the computer, enable ADB and execute adb logcat while opening the app that crashes. Usually you will see the internal error message on the logcat output. With that error message there is at least a chance to understand what is going wrong.

Such an error can occur because of several different reasons and all these reasons come into existence due to one reason:
System or CPU failed to handle that app properly.
Messenger is a heavy application that will use a huge portion of your RAM and CPU while running and sometimes, to run system apps, the phone has to abandon these processes. That is why your apps keeps stopping (also, you are using a Samsung phone, so the UI uses more memory then the standard Android UI).
For a better experience, you have to keep your device clean by installing a cleaner app. You then have to remove cache and data of such apps regularly to have a smooth experience.


text:
Android-x86 8.1: graphical glitches
I can install android-x86-8.1-rc1.iso, but when I boot it looks like this:

What can i do to fix this?
PS: I installed it directly to my Root-Server.
Virtualization is activated and already works with VirtualBox and similar programs.

I've had similar (less severe) issues in cm-x86 14.1 and this is how I solved it:

Wait for the glitches to start.
Press ALT+right arrow to go to the terminal.
Press ALT+right arrow again to go back the the Android GUI.

After that, Android should look normal.

Tried that too.
Also Tried to change screen resolution with Gear lock but no effect