text:
How can I increase the maximum number of background apps on Android 10+?
The way Android works, there are two cases in which an app is killed.

The device is low on RAM. This is kind of self-explanatory, there is generally no page file on Android, and RAM is finite.
The maximum number of cached processes is reached. To quote a comment in the AOSP source code:

The maximum number of cached processes we will keep around before killing them. NOTE: this constant is only a control to not let us go too crazy with keeping around processes on devices with large amounts of RAM.  For devices that are tighter on RAM, the out of memory killer is responsible for killing background processes as RAM is needed, and we should never be relying on this limit to kill them.  Also note that this limit only applies to cached background processes; we have no limit on the number of service, visible, foreground, or other such processes and the number of those processes does not count against the cached process limit.

I've noticed that it's not quite that simple, though. Time especially seems to be a factor. I can open 10, 20 apps and it's not a problem. Let the phone sit overnight, and it will only be 4 apps in my case.
In the first case, the solution is fairly obvious: somehow increase the amount of usable RAM, whether that's by reducing the number of services running, using zRAM, using a device with a lot of RAM, etc. My device (SHIFT6mq) has 8GB of RAM, and usually only about half of that is being used, so that's obviously not the restriction in my case. Which leads us to 2.
The solution here is less obvious. The most promising bit I found is this: https://github.com/crok/crokrammgmtfix, and the accompanying blog post here: https://telegra.ph/Fine-tuning-an-Android-system-04-20. I've tried the magisk module, and tried what's listed on the blog post. Doesn't matter, when I execute su -c dumpsys activity settings the results stay the same, and when I wake up, there are still only 4 apps running, whereas there were many more before I went to bed. I also found this thread on XDA: https://forum.xda-developers.com/t/how-to-disable-adjust-the-background-task-limit.3886743/, which has very similar measures. Problem is, this all seems to apply to Android versions under 10 - and I definitely couldn't get it to work on Android 10.
Now, some would say, that's the way it should work. You know what? If I wanted the app closed, I wouldn't have left it open. Now leave it open. I have 8GB of RAM, which has shown to be more than enough for that. And it closes the apps overnight... which is specifically when I have the phone plugged in.
So, how do I tweak the settings of the activity manager (or anything else for that matter) so that  it stops killing apps I explicitly left open, when there's more than enough RAM available?
Note: I realize there are some devices (e.g. Samsung, Huawei) with overly aggressive battery saving measures on top of that in AOSP. This is not what I'm referring to. The stock ROM on the SHIFT6mq is very close to AOSP.

"My device (SHIFT6mq) has 8GB of RAM, and usually only about half of that is being used..". How did you get the exact RAM usage? 2. Did you set "Background process limit" in Developer Options?

I checked in the developer settings. And no, I've checked over and over again, "Background process limit" is set to the standard setting, "Standard limit". Which makes me wonder... maybe there's some setting that can be unofficially changed to increase the number of apps that can run?

Why would you want to force apps to stay running if they aren't doing anything? The only result is draining your battery quicker.

Not necessarily. Most apps won't actually use battery while running in the background and doing nothing.
Also, the first part of the solution doesn't necessarily increase the number of apps running in the background. If you look into the details of how Android works, it increases the number of activities for which it has a saved state. For me that is extremely useful. For instance, I would start watching a longer youtube video and when I wanted to continue the next day, it would have lost where I was in the video. Or look something up on a map, keep it open for later, and lose what I found.

Keeping more apps actively running makes them restart less. Especially, for instance, web pages. If I have a large number of browser tabs open that I'm actively using, plus a larger number of apps that I'm also actively using, pages will constantly be reloading, losing where I was and possibly my input - even though my device has more than enough RAM to handle them.

Well, this sure enough confirmed my hypothesis of "if no one on stackexchange knows the answer, you're going to have to figure it out yourself".
So I did.
The answer to this question is twofold. There's the window manager and the activity manager, and both play a certain role in this.
While it was tempting to write a TL;DR at the top here, I didn't, because especially with the second part, you have to be very careful with what you're doing, at least for now.
Window Manager/Recent Tasks
Let's start with the window manager, as this will also be interesting for people without large amounts of RAM. Also, it's quite a bit simpler.
It works with a number of variables: config_activeTaskDurationHours as well as a number of NumVisibleRecentTasks variables. config_activeTaskDurationHours determines, as the name suggests, how long a task is considered active, that is, relevant to the user. On my device, this was set to 6. After those 6 hours, the "task" no longer appears in the recent apps list, with one exception: the number of open apps would be lower than, in my case, config_minNumVisibleRecentTasks, launcher included. In that case, the app is not discarded. If the number of open apps is the same as config_minNumVisibleRecentTasks, though, then as soon as you open an app that isn't opened yet, the oldest open app that hasn't been used for more than 6 hours is discarded.
There are also a couple of other related settings that weren't relevant in my case:

config_minNumVisibleRecentTasks_grid: This is for when apps are displayed in a grid. This view is not available on many builds of Android, though.
config_minNumVisibleRecentTasks_lowRam: The same setting for low RAM devices.
config_maxNumVisibleRecentTasks, config_maxNumVisibleRecentTasks_grid, and config_maxNumVisibleRecentTasks_lowRam: these are upper limits for the numbers of recent tasks. In my case config_maxNumVisibleRecentTasks was set to -1, which means there is no maximum limit.

These are all grabbed from resources, and can be modified with GravityBox (root and XPosed/EdExposed/LSPosed required), under the Advanced tuning section, in the Framework section. They require a restart to activate the changes.
In my case, I set both config_activeTaskDurationHours and config_minNumVisibleRecentTasks to a ridiculous level: 5000. That way, it takes over a half a year for a task to have a chance to be removed, and that only if there are more than 5000 apps open, which I suspect will never happen.
Activity Manager/OomAdjuster
This was a bit of a tougher nut to crack for me, and took a good amount of searching through the source code to find the answer - although the answer may not have really required it. Oh, well.
I first tried writing an XPosed module to override com.android.server.am.ActivityManagerConstants, specifically updateMaxCachedProcesses. Unfortunately, I couldn't get it to hook the method properly, I don't know why. Mind you, I've never tried writing an XPosed module before, and I did this with AIDE - maybe sometime I'll unpack Android Studio again and try it in there. But if anyone wants finer control, this should offer an avenue to do that.
At the end, my original suspicion that you might be able to use the background process limit unoficially to increase the limit ended up being true. Sure enough, if you go into developer settings and change the background process limit to, say, 4, the output of su -c dumpsys activity settings looks like this at the end:
mOverrideMaxCachedProcesses=4
CUR_MAX_CACHED_PROCESSES=4
CUR_MAX_EMPTY_PROCESSES=2
CUR_TRIM_EMPTY_PROCESSES=15
CUR_TRIM_CACHED_PROCESSES=10

Note that the trim levels aren't changed, and IMO it doesn't make sense to change those levels even if the device has a high amount of RAM. Essentially, if the process numbers are below the trim levels, the system doesn't even bother trimming memory.
So, how can we assign a higher value? This is where things get complicated. I tried to call ActivityManager.setProcessLimit() with the permission android.permission.SET_PROCESS_LIMIT (which is only available to system apps but can also be granted via ADB) as defined in the IActivityManager Interface, but I couldn't get it to work (again, I was working with AIDE, so that may be the problem, I may try it again on Android Studio later).
However, there is a little known android shell command, service call, which essentially lets you call a whole bunch of methods from different service interfaces, see Where to find info on Android's "service call" shell command?. What you're looking for is the activity service, which is defined in android.app.IActivityManager.aidl, and you're looking for the method setProcessLimit(int max). Using the terminal, we can do service list to get a list of the services that can be called here. In my case, the service name I'm looking for was activity. Then, we look up the setProcessLimit(int max) command in the source code. Since I'm reasonably close to AOSP, I can look it up in there. In my case, it's the 40th command.
WARNING: Before I show what I needed for my device, don't just blindly follow this. This is different for just about every version of Android, and if you mess it up, it could cause problems. Read the link from the paragraph beforehand to be sure, at the very least be sure to understand my explanation in the previous paragraph.
In my case, I decided to set it to something ridiculous, so I took the tenfold of the original value, 600. That turned it into: service call activity 40 i32 600 (be sure to run su before that as this needs root privileges). Now, when I call su -c dumpsys activity settings, the section looks like this:
mOverrideMaxCachedProcesses=600
CUR_MAX_CACHED_PROCESSES=600
CUR_MAX_EMPTY_PROCESSES=300
CUR_TRIM_EMPTY_PROCESSES=15
CUR_TRIM_CACHED_PROCESSES=10

Halleluja! We did it! Mind you, AFAIK, you'll have to repeat the service call command on every restart, and if you mess around with the background process limit setting in developer settings, you'll also lose what you just set.
Maybe someday I'll try the approach with a root/adb app or an XPosed module again, and If I do, I'll update this answer. But for now, I'm happy with the results. RAM usage is now more between 5.5 and 6GB, as opposed to 4GB. Apps seem to be restarting less. Life is better.

I updated my module that's been mentioned in the original question and actually there's a way to set max_cached_processes to a value that survives restarts - even without root, with simple adb commands. Check the module's documentation and all the links lead me to the solution. Cheers!
Android 9 and below:
settings put global activity_manager_constants max_cached_processes=256

Android 10 and above:
/system/bin/device_config put activity_manager max_phantom_processes 2147483647
/system/bin/device_config put activity_manager max_cached_processes 256

Or something like this:
[ $(getprop ro.build.version.release) -gt 9 ] && cmd device_config set_sync_disabled_for_tests persistent
[ $(getprop ro.build.version.release) -gt 9 ] && cmd device_config put activity_manager max_cached_processes 256 || settings put global activity_manager_constants max_cached_processes=256
[ $(getprop ro.build.version.release) -gt 9 ] && cmd device_config put activity_manager max_phantom_processes 2147483647
[ $(getprop ro.build.version.release) -gt 9 ] && cmd settings put global settings_enable_monitor_phantom_procs false
[ $(getprop ro.build.version.release) -gt 9 ] && cmd device_config put activity_manager max_empty_time_millis 43200000
[ $(getprop ro.build.version.release) -gt 9 ] && cmd settings put global settings_enable_monitor_phantom_procs false


text:
Steps to investigate what is happening to system files
So, I recently got a notification that space was running out on my 128GB phone. Looking at the segmentation then, the system files was taking about 45 GB data while my other stuff was taking around 75GB. Pretty normal so far, and I thought, okay, why don't I move my photos over to my desktop, which I did. Freed up around 15 GB and I went on my day.
However, soon enough, I get notified I am running out of space again. This time, I looked and the system files section was taking around maybe, 60 something GB? I thought, that's strange, I just cleared all my photos. What's going on! So I went on deleting apps. I ended up almost deleting everything, just to find that system will grow to consume it within hours. Feeling defeated, I decided to wipe my phone using the option within settings.
So, all was well with backing up and wiping, and I set up the phone again and all that. All went well until I woke up next morning, just to find that I am running out of space again... I was quite shocked. So I wondered, maybe it's something with the apps I installed. So after the phone was almost non responsive complete because of space issues, I did a second wipe. I restored the back up this time, while leaving out some of my other large games that was initially taking up around 35 GB total. I was suspecting games are usually culprit if something's wrong, but wrong. Storage kept increasing after the second wipe and half a day later, got my storage running out again. Which forces me to do a third wipe.
Before my third wipe, I read online that persistent viruses can sometimes nest within the back up. So this time around, I reinstalled my phone without restoring anything. I also only installed malwarebytes and arrow file manager to explore what's going on. I took the precaution too not to add any google accounts except one and completely avoided wifi at initial set up until malwarebytes is up. And unfortunately, the system file size growing issue still persisted. Within half a day, I got this:

Running out of options here... Any suggestions how I can bust open what's in system files to see what's going on? Or if anyone feels compelled to help me look more into this, I can help provide logs using methods you peeps proposes. For now, I already ordered a temporary cheap phone, so this phone will be available for multiple wipes until I figure out how to reflash a factory image I am trying to get from the manufacturer. Thanks!

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

No, I am interested specifically in system, not apps. Also, the side question here actually is, why does system increases like that without doing anything. Plus, the link sent doesn't really help tell you how to secure root access to get the directory of the system portions, which will be helpful for me to figure out what might be the culprits doing things within system files. I have not rooted my phone and it is not unlocked.

The second last sentence: This system usage is shown as "System".... It's not possible to understand a part of it without looking at the whole picture, which mostly users are not interested in though :)

First, I don't know enough to run the commands you did. Can you explain that? Second, you simply said system is data/system* and data/misc*, but what's in them you didn't explain. It wasn't people are not interested, it's that most people will read it but don't even understand what you wrote. Plus, if the whole point is to understand everything behind it, what's the point of asking for help? I can spend a month on research and learn about it, but that defeats the purpose of asking questions about an issue to resolve it sooner than I can myself, instead of learning all concepts behind it.

because your "system" storage increased from 45 gb to 60 gb after you deleted 15 gb pictures - I believe your gallery app has trash can (which is probably synced to https://photos.google.com)

@Isa "System" is not /data/system* and /data/misc* alone, it's the whole /data filesystem used except the shared storage (/data/media). The pace at which the space is being occupied indicates that it could be some sort of logs growing up. But without root it can't be investigated with certainty. Though ADB might be able able to access some of the directories inside /data, or possibly some system APIs can be used.

@alecxs The transfer was not made over the air, and my google photos trash can is empty as a result. Either way, that wouldn't explain at all why system files still continue to grow after each complete wipe. But thanks for telling me about the emulator, I never knew much about android at all and it's all new to me. I was trying to type the commands that Irfan has so let me see what happens with it. Ty!

Try DiskUsage and post a screenshot of the file distribution. Though, without root access, unfortunately it cannot access the internal storage which might be more relevant for this issue.

my suspected was something is syncing huge data from cloud, as I understand it started growing after adding one google account and enabling wifi. Of course if that also happen without any internet connection at all, it is some serious issue. complete reinstall of ROM/firmware will stop it. Very interesting case, maybe let logcat run (although it's a hassle to analyze logs)

Just an update, the manufacturer actually allowed me to use codes to get to the OEM logs. And apparently, it's not an OEM log problem since none of them were on. We will be flashing the device sometime this week.

@AndrewT. I actually used that DiskUsage thing and it the system still appears as a block since the phone was not rooted.

@alecxs I can probably run logcat and post it if you are interested. But I am flashing it regardless with the manufacturer's help over the next few days if all goes well.

source: Stack Exchange

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

sort: votes


text:
how to positively locate focus in quick settings using external keyboard to enable screen mirroring (screen black recovery)
I want to use an external keyboard to navigate the quick settings menu blind to turn on Screen mirroring (aka Smart View). I can enter this menu using Win-Q but getting a known focus or selecting Smart View is the next step.
A Samsung Galaxy S6 is fully operational except it has a black screen (dropped by the kids). External mouse and keyboard are working fine and if I can just press the smart view icon on the Quick Settings the screen will mirror and I'll have full control.
I am testing using the keyboard on my own identical phone so I can do it blind on the affected phone.
Most usefully, Win-Q directly opens Quick Settings. Also of interest is Win-N which gives a visually identical result but with a different focus (somewhere in the notifications obvs).
But, after pressing Win-Q focus seems to be a bit random. Sometimes it's under the screen brightness, sometimes it's the Settings icon itself. Direction arrows work fine to navigate, as does tab. Typing alpha (W for Wi-Fi) unfortunately seems to not move focus (wouldn't that be perfect). For the purposes of working blind I'd like to know where focus is absolutely, even if it's just a starting point.
Is there a keyboard input I can use after Win-Q to either:

ideally, select the Smart View icon, or the Smart View text. Is there way to type "S" to do this? or
less ideally but still useful, set focus to, say, the top left icon (wireless on this phone)?

Or is there some previous action such that pressing Win-Q gives a known focus (such as power cycling the phone)?
Unavailable alternatives:

debugging is not enabled
MHL is in theory not supported by the phone; I don't have a cable to try it

I was searching for quick settings images of Galaxy S6 and at the time it only displays 10 quick settings. So to make it work, I believe you must had previously added "Screen Cast" in the list of 10 items.
I guess your best shot is to find the correct combination of arrows and enter.
I tested here and typing "S" don't do anything on quick settings.
I have a galaxy A70 (which is much newer, I know) but the starting point is a search button. To go to start a screencast I did the steps:

Win-Q
Down (3 times) - to get to quick settings
Right (2 times) -> Enter - to go the second column of the second page of quick settings and selecting it
Down -> Enter -> Enter - to select the first device found and confirm you want to cast

I also remember that holding home key was a shortcut to call google assistant. Have you tried that?

Thanks. On the working phone, Win-Q "usually" dumps me on Samsung smart things and Up x 2 gets me to wifi. But sometimes focus is on the settings icon, and moving from there is weird, but easy enough with vision. I was hoping there was a way to explicitly select Smart View, or explicitly select the top left setting icon (wifi for me). In our environment there will be only one device to cast to, so simply enabling smart view will auto-select that and done. If I activate google assistant and say "enable smart view" google dutifully reads me Samsung's instructions instead of doing it.

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


text:
Will my old device reconnect with my account if I change my account password back?
Background:
The device in question is an LG Stylo 3 (LS777) which I think is running Nougat. USB debugging is on and it shows up "unauthorized.: I dropped it and broke the screen a couple years ago, and recently fixed it. Either I forgot the pattern screen lock, or (as I've been reading) this phone has whatever bug that causes the device to forget it. I know I can factory reset it, it's just a last option.
How I got from there to here:
I had four accounts on this device. Using the hotspot on my current phone, I changed the hotspot wifi name to an open wifi network I know this phone connected to. And voila! Account Action Required notifications pop up!
Question(s):
I've been using one account as a guinea pig. I change my passwords regularly, and I don't remember which password I was using when it was on this phone, but I do remember every one I've used with this account.

When I get to the right password, will the device authenticate my account and show up again in Find My Device? I'm changing it once every 24 hours and rebooting the phone at random intervals, forcing it to reconnect.
Was the option to override the screen lock by remotely locking your device available with Nougat in 2018? (will that plan work)

I'm just curious if I'm wasting my time. Or is there an easier way to bypass or wipe the lock screen that I haven't found yet. The phone is registered to my LG account, but that f'ing site is so convoluted, I haven't seen a way to do that.
Thanks in advance.

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

I'm on the third pw now. I did it on my laptop, turned on my wifi hotspot, then waited for the prompt to hit my main phone before powering my Stylo 3 on. It connected to the wifi, and all of the notifications started coming. It's still showing up as needing updated.


text:
How to choose which gallery app is opened by OpenCamera?
I am using lineage_a3y17lte-userdebug 10 QQ3A, which is LineageOS 17.1 (Android 10), and I've had a problem with taking photos that are automatically saved to external SD-card. That ended up being solved by installing OpenCamera, but then the stock gallery would not list nor open photos in SD card; and that got solved by installing Simple Gallery Pro.
This is apparently due to the introduction of "scoped storage" in Android 10, and some more details about this I've noted in my comment here: Pictures stored on sd card not shown in gallery (#2211) · Issues · LineageOS / issues / android · GitLab.
However, I still remained with one more problem: I take a photo in OpenCamera which gets saved to external SD card, then I click on the thumbnail to see it in a gallery - and then still the stock gallery opens, which cannot read the external SD card, and so cannot show the last picture taken.
So the question here is - how to have OpenCamera open a different gallery, other than the stock gallery, when I click on the thumbnail of the latest taken/snapped picture?

EDIT: false alarm, it turns out - the solution below worked only the first time after reboot; once OpenCamera was backgrounded, and then opened again to take a new picture - upon the tap on the last photo taken thumbnail, I got the old stock gallery (with all its problems) again :(

Ok, here first I found:
https://community.e.foundation/t/how-to-choose-which-gallery-app-opencamera-opens/25775
There, there is a suggestion to

Open the settings app.
Go to “apps and notifications”.
There in the app listing tap the app in question, in this case the standard Gallery app.
Tap the “Open as standard” section.
Tap the “Flush standard setting” button.
Next time you do a preview from within the Camera app (or any other app calling for a picture viewer) you will be given the opportunity to select a standard app of your desire.

... however with the caveat "Dunno if I made the translation from my Swedish user interface correctly".
In any case, I tried to mess around with the above, and I experienced the same as in the response to that post:

On my phone (FP3), there is no standard settings linked to Gallery.

Then I found Open Camera / Discussion / General Discussion: Unable to set default gallery app:

One thing that finally worked: Settings -> Apps -> ... (The Three Dots) -> Reset app preferences.
After that, you will have exactly ONE CHANCE to choose the preferred photo application (as no app will be pre-chosen this time, all three should be equally available) in OpenCamera.
Also please note that "Reset app preferences" is a nuke - it destroys ALL your default app associations, all your blocked notifications, all background data restrictions etc. It's a pain in the ***, but nothing else ever worked for me :(

So, actually, I did that - and still, OpenCamera opened the last-taken-photo thumbnail in the stock gallery!
However, then I remembered this from the /e/ post, which I otherwise found cryptic:

Edit: after a reboot, everything is fine!

So, I decided to reboot the phone; opened up OpenCamera again, tapped the thumbnail of the last taken photo - and finally, I was asked to choose a Gallery app, and when I chose Simple Gallery Pro, I also got the option to choose it "Always", which I did... And finally, problem solved!
Just two weeks of fussing about for this. I can hardly wait for the next update to Android, where SD cards will be completely disabled :)


text:
Bluetooth does not auto-connect to vehicle after update to android 11
After updating a OnePlus 6 device to Android 11, I noticed that the bluetooth, when turned on, does not automatically connect to the car, but I have to select it manually.
I don't find any option to enable this feature, before the update everything was working fine.
The update in question is OxygenOS 11 (stable).


text:
How user apps installed from Play Store get update from Get Apps in Xiaomi MIUI 12
I am using Redmi Note 10 Pro with MIUI 12.5.8 Android 11 running on it. The device has two official application providers, one is Google's Play Store and other is Xiaomi Get Apps. My issue is that, I installed whatsapp from Play Store. Now, it shows that whastapp has an update under Settings-System apps updater-Otherapps, on clicking which will load Get Apps.
I checked play store, and there's no update showing. Similarly, for Zoom app, update available both from Play Store and Get Apps.
How Play Store installed app got an update from Get Apps?

Android as an OS does not care from where an app comes it installs. And each app store can check if there is a app of the same packageName available that has a higher versionCode in it's AndroidManifest.xml.  Hopefully the app store has also checked that the app signatures are the same/compatible, otherwise the app will fail if you try to install it. See also my answer on a very similar question about Samsung Galaxy Store: https://android.stackexchange.com/q/234390/2241

In addition to Robert's comment, compared to alternative markets, updates on the Play Store can take a few days to reach users due to its roll-out policy and magnitude.


text:
Does the Android SDK Emulator mount the filesystems on the host or emulate the mounting?
Does the Android Studio Emulator mount filesystems (like system.img and userdata-qemu.img) or emulate the mounting by making an illusion because I can't find them (the mounted filesystems) on the host at all.

Those images are part of the Android SDK packages. Check the android SDK directory android-sdk/system-images/android-<Android-API-level> and below.

@Robert Yeah, I know that but this doesn't answer the question. Where are they mounted on the host if they are should be mounted on running the emulator? or are they used by the emulator without mounting?

You wrote that you can't find them (the files) on the host, therefore I wrote that comment. May be your question was not well formulated?

Ok. I'm sorry. Never mind. plz, if the question should be more clear, feel free to edit it.

The *.imgs of the AVD are located in the directory ~/.android/avd/<AVD_NAME> on the host system. In the configuration file ~/.android/avd/<AVD_NAME>/hardware-qemu.ini  you can find which images are mounted. May be this link can help: https://developer.android.com/studio/run/emulator-commandline

@St0rm I want to know where is it mounted on the host not which image is mounted.

If I'm not mistaken, the emulator uses virtual disk image files as storage. I'd assume it mounts that file instead.

No, the emulator does not mount the filesystems of the emulated device on the host.
If it did that, it would be impractical to emulate more than one device at a time.
The emulator is intended for application development and testing. If the filesystems of an emulated device were easy to modify, that would make it hard to be sure applications that worked on the emulator would work on a normal device.


text:
Why Fastboot boot Twrprecovery.img hangs loads after 3-4 tries
Question :- Why Fastboot boot Twrprecovery.img hangs loads after 3-4 tries?
I for original backup of Nandroid from twrp  recovery from PC computers I load twrp recovery image in bootloader fastboot mode through command fastboot boot twrprexovery.img but as I run command  the mobile white screen goes to blank black and in pc continuously prompts multiple drives   a dialogue box  to format multiple drives loaded created on twrp mtp (e,f,g,h,j,k) mounted after fastboot boot twrprecovery command. What I think happened twrp crating multiple mtp drives and closing I am have cancel multiple dialogue boxes in computer windows 10.
Other commands used in sequence
Adb devices
Adb reboot bootloader
Fastboot devices
Fastboot boot twrprecovery.img

But after rebooting reconnecting to different usb sockets mobile and trying 2-3 times this  fastboot boot twrprecovery.img it finally display and load twrp image and display twrp menu.. and I took backup and recovery  all went succesful....it means twrp  image is right  and not corrupted and working fine...and for same device
The problem is why it's loading after 2-3 attempt on same usb port same drivers same cable  it happened many time not one time.
Now I am asking as I want to install flash twrprexovery.img  to  recovery partition and wooried that is it problem to image or any thing with  it don't create problem after installing flashing .. how should I install twrp recovery  which command is safe (fastboot flash recovery twrp.img)
Should I install as twrp recovery can be loaded and used with pc without installing but will not run through mobile.

yes it's safe just flash it. But consider dm-verity should be disabled (newer android versions only)


text:
Connection to DoT server is not retried
I'm running my own DNS-over-TLS server under my domain (dns.example.com). On my Motorola G100, which is running Stock Android 11, I can set the private DNS to this domain and it works.
This works on my Linux machines, two other Androids (some Motorola on Android 10 and a Samsung with Android 10), and also on two different routers (AVM FritzBox can use DoT as upstream).
The server is not at fault, the certificate is valid and all devices work the way they should, that is, until the server is rebooted or otherwise blocked. Then, of course, I receive the notification that it "can't access the private DNS server".
The Linux machines recover and just retry to connect, as well as the routers. But the Android phones don't want to retry even when I know for sure that the connection is working.
Upon disabling private DNS and reenabling with my domain, the following log is shown (IPs removed)
09-30 19:32:46.091  1144 20197 W resolv  : Validating DnsTlsServer <MY_IPV4> with mark 0xf006b
09-30 19:32:46.091  1144 20198 W resolv  : Validating DnsTlsServer <MY_IPV6> with mark 0xf006b
09-30 19:32:46.138  1144 20197 W resolv  : SSL_connect ssl error =1, mark 0xf006b: No such file or directory
09-30 19:32:46.138  1144 20198 W resolv  : SSL_connect ssl error =1, mark 0xf006b: No such file or directory
09-30 19:32:46.138  1144 20197 W resolv  : TLS Handshake failed
09-30 19:32:46.138  1144 20198 W resolv  : TLS Handshake failed
09-30 19:32:46.138  1144 20197 W resolv  : query failed
09-30 19:32:46.138  1144 20197 W resolv  : validateDnsTlsServer returned 0 for <MY_IPV4>
09-30 19:32:46.138  1144 20198 W resolv  : query failed
09-30 19:32:46.138  1144 20198 W resolv  : validateDnsTlsServer returned 0 for <MY_IPV6>
09-30 19:32:46.138  1144 20197 W resolv  : Validation failed
09-30 19:32:46.138  1144 20198 W resolv  : Validation failed

I don't know why it tells my that the handshake fails, all other devices (or kdig +tls) can connect just fine. From the server's reboot to now, no config, certificate or software version was changed.
My guess is that Android caches the connection and "remembers" that it failed at some point in the past and doesn't even try to connect again. I tried rebooting, shutdown, airplane mode, another DoT (dns.google works), disabling DoT but nothing fixes this behavior.

Hard to guess the root cause of failure at this point without doing some network troubleshooting on device. Could be due to negative DNS caching of your server's domain.

No, it's really the badly implemented certificate verification on Android.

Apparently, Android (even the newest versions) can't deal with the type of certificate that Let's Encrypt generates by default.
The solution is a combination from the Let's Encrypt forum and the setting --preferred-chain="ISRG Root X1" for certbot.
If you use caddy as your server, you can set it in the Caddyfile global options:
{
...
  preferred_chains {
    root_common_name "ISRG Root X1"
  }
...
}

You have to force the renewal of the affected certificates/subdomains by deleting the corresponding files in caddy's data directory. (Beware of rate limiting if you generate many certificates at once.)

Perhaps this is related to the expiration of the root certificate that Let's Encrypt previously used (DST Root CA X3) that affects many sites, including Stack Exchange.

Yes, but the certifcate I'm using is still valid. All browsers or clients can support the dual (?) chain but the library for the DoT-validation doesn't support this kind of certificate. It has nothing (well only tangentially) to do with the invalidation of a certificate.

This Android bug might have been fixed: https://issuetracker.google.com/issues/201661947


text:
Android update removed "change account" button on login screen
After a Android Update on my Samsung Galaxy Tab S5e, the button allowing to choose the user-login (or Android account, I mean here "multi-user feature of Android") does not show anymore.
The button nevers shows up. (neither after reboot nor after changing user through user parameters, see under)
So to change user, you have to log on the last logged user, and then go in the parameter >user and choose the user you want.
My other Samsung tablet does not have this problem.
Android Version : 11;
One UI Version : 3.1 (that's the Samsung UI, I guess) ;
Google Play last update 1 aug 2021

You should give more details, e.g. on the used Android version and how the users were created, using the multiple user feature of Android or using some special app? Does the "change user" button never show up or only after a reboot?

I added the precisions you asked into the question. I really speak about the multiple user feature of android. and added the Android version

I re-searched for an update. There was one availlable, installed it.
The "change user" button did not appear directly. But by changing the user once again throught the parameters, then it appear finaly on top right corner.
It's now working as expected.


text:
how to install OTA updates on TWRP rooted stock image
I have a stock ROM Android 10 on which I installed TWRP recovery and magisk root

now my stock ROM after quite some time offered an OTA update
,
and it will not install ,obviously ,via TWRP.  my device is type A only ( unlike  A / B type) for which there is this detailed guide which I cannot use.

I then I read about this module
DM verify no encrypt

Questions
-will flashing this module help resolve this issue &  I should be able to install OTA updates seamlessly through my current recovery
-if the former isn't relevant what would be the approach for a Type A phone to install OTA updates other than just restore original stock boot and recovery and once again re install custom recovery and re-root, which is painstaking.
-to install the above-mentioned module should I decrypt my phone which I think is encrypted I have a fingerprint pattern and password lock

additional observations
I could manage to get hold of the update zip and changing permissions  permitted me to open the zip file.
I see two files that attract - in terms of of giving hope that I can tinker this update.zip so that it can install without a verification

updater
found here at this path
/storage/emulated/0/update.zip/META-INF/com/google/android/updater-script
entire script is uploaded here
and otacert found here
/storage/emulated/0/update.zip/META-INF/com/android/otacert
and it looks like
-----BEGIN CERTIFICATE----- MIID2zCCA etc  -----END CERTIFICATE-----
approaches  is it possible to tweak the Updater script and tell it not to do verification so it can be installed via simple TWRP

the other approach - certificate file that particular certificate can it be changed so that the content matches with the current phone hash. I don't know how to generate one that matches the current  phone
update #2

modified the Updater script and after deleting relevant portions I get this error . this is after two modifications to skip through verification errors which I overcame
original Updater script
modified Updater script used
recovery log

error that I get
Verified system image...Verified vendor image...Verified vendor image...
Verified product image...
Patching system image after verification.
performing update
Verified product image...Patching system image after verification.blockimg version is 4
maximum stash entries 0
creating stash /cache/recovery/cc46ebfd04058569d0c6c1431c6af6c1328458e4
405680128 bytes free on /cache (29192192 needed)
/cache/recovery/last_command doesn't exist.
stashing 468 overlapping blocks to f93e6436fba55bbb8e1990df38044cff68a4bf8f
405680128 bytes free on /cache (1916928 needed)
 writing 468 blocks to /cache/recovery/cc46ebfd04058569d0c6c1431c6af6c1328458e4/f93e6436fba55bbb8e1990df38044cff68a4bf8f
patching 468 blocks to 467
Failed to write 409256 bytes of data: Operation not permitted
ERROR 10-08 01:39:43 external/bsdiff/bspatch.cc:324: Error writing to new file.: Operation not permitted
bspatch failed, result: 1
Failed to apply bsdiff patch.
Failed to apply image patch.
failed to execute command [imgdiff 0 9878 f93e6436fba55bbb8e1990df38044cff68a4bf8f 3c32c4f15abb00cab0e4103c3bf09ac67b7ceff8 2,218312,218779 468 2,218312,218780]
new data receiver is still available after executing all commands.
script aborted: E1001: Failed to update system image.
E1001: Failed to update system image.error: 1001
cause: 115
Patch application failed, retry update.
E:unknown command [retry_update]
Updater process ended with ERROR: 7
I:Install took 16 second(s).
Error installing zip file '/sdcard/update.zip'
Updating partition details...`

Does this answer your question? Is it possible to flash a custom ROM without a custom recovery image?

Does this answer your question? How to install a firmware without losing your data and restore the previous one in case it goes wrong?

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


text:
how to use Wi-Fi Coverage Extend Feature in Android 6.0
I have Android 6.0 phone and i don't have Wi-Fi Coverage Extend Feature on developer options ,So i want to know if i can use this feature in my Android 6.0 phone.
Thank you

Where did you see that feature?

@IrfanLatif looks like a feature of OnePlus/OxygenOS. // OP: could you mention your device model?

Since this question is not really about using the existing Wi-Fi Coverage Extend feature (which is only available on a few manufacturers) but how to enable it on devices that don't have this setting, it's closed as a dupe of using the hotspot as a Wi-Fi repeater since that's what the feature actually does (ref: XDA Forums)


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

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

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

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


text:
How to install APK on Gabb Z2?
I would like to install Spotify on my Gabb Z2 phone. The Gabb phone runs a modified version of Android that is programmed to have only default apps and no store. They somehow managed to get their own app on there, which leads me to believe that there is a way to install apps on this phone.
I try to go to Privacy > Permission Manager > Search > Autofill where the developer options are so I can turn on USB Debugging, it does nothing, the bug was found and patched so that there is no way to access the options. As a side note, I also tried going to About Phone and clicking on the build number 7 times.
I have scoured the internet looking for the solution to my problem, I came close but I was blocked. How to install APK on Gabb Z2?

The Gabb Z2 is a locked down phone for a child's use. The manufacturer is free to put their own apps in their own Custom ROM and disable features. Based on this XDA thread a recent ROM update locked down adb access. Any public reveal of a workaround may result it being patched again.

You need to downgrade the ROM to an older one with ADB access, disconnect it from Wi-Fi, and remove the SIM card. Then remove com.zte.zdm over ADB. After that, you can reconnect it and put the SIM card back.
To downgrade the ROM, disconnect the Wi-Fi and remove the SIM card, then turn it off. You then take it apart and remove the battery. You can downgrade the ROM using SP Flash Tool and a USB cable.

By this time, I'm afraid it's already too late because they can't enable ADB access due to its Developer options being disabled.

@Andrew T. You disconnect the Wi-Fi and remove the SIM card, then turn it off You then take it apart and remove the battery. You can downgrade the ROM using SP Flash Tool and a USB cable.

You cannot flash another ROM, this will brick your phone unless it is an older one.
There are no fixes for the newer phone right now.


text:
How to fix an incorrect resolution setting without ADB
I'm running Android TV on Lineage OS, on a Raspberry Pi 4. After changing the resolution setting, the connected display (a TV) no longer displays anything but the message "Video Format not supported".
How can I change the resolution setting back/reset it?
I have SSH enabled, but I don't know the default user/password for Lineage. USB debugging is disabled - otherwise I would have done this in ADB.
I've already done numerous searches on the Internet but can't find anything relevant. Will I just have to reflash and start again?
Any help would be greatly appreciated!

Connect to another display and set it back? Sounds like it's just your TV doesn't like it.

@AndyYan yea tried that... Problem is, the resolution is now set to 1080p@30, and I think it's the 30fps part that's breaking it.


text:
How to make rsync save a huge file entirely?
I have tried to sync from a Linux device to Android device using Rsync Wrapper. The source file size is about 6 GB. But the problem is that the file manager shows the destination file is much smaller. There is enough space. I use --append-verify for rsync, and sometimes the resulting file just gets smaller after retry. Logs seem to show that it loaded what was expected anyway.
Rsync Wrapper version is 1.9.8 rev.27. Android version is 9.
I also tried using rsync (version 3.1.2, protocol version 31) directly over USB with MTP protocol.
I had to delete the destination first, because AFAIK --append-verify does not work with MTP. Still the resulting file is too small, 1727886774 bytes reported by ls -l. I got that size before, too. Again, the log shows that the whole file was sent:
2021/10/03 09:23:23 [28652] sent 6,024,324,598 bytes  received 588 bytes  5,591,021.05 bytes/sec
2021/10/03 09:23:23 [28652] total size is 6,022,854,070  speedup is 1.00

I renamed the old destination file and tried copying in file manager. Again, copying stops at 1.7GB. File manager reports libmtp error.

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


text:
Is adoptable storage in any new android version (9,10,11) original?
Question Is adoptable storage in any  new android version (9,10,11) original ?
I am planning to purchase new smart phone mobile for video editing graphic editing game apps. I want to install aprrox 200-400 apps as file in video editing are huge so I want to use app from external micro sd card and save output and files.on high speed v30 u30 160mbps/90mbps micro sd external card
As new mobile within warranty  so don't  want to root and use link2sd or app2sd apps to.lapse void  warranty
In android 5.1.1 lolipop there was option to move partly files to sd card by  android llolipop native app2sd option settings>apps>app info "Move to sd card"
In android 6.0 marshemellow the option of adoptable storage to   which formats the external micro sd card as internal memory
In android 7.1 there is option in settings developer option  "Force app to SD"
In android 8,9,10,11 or 9 pie I don't what alternative option given  there in below  findings it say it have  the option hidden and activated by SM (storage manager) command . Is there any way to get adoptable storage
( Formatting  external micro sd as internal)  or move app to sd (android native app2sd) or  developer option (force app to sd)
But as samsung galaxy have removed all adoptable storage option form its galaxy smart phone but planning to start with android pie 9.0
Can any one suggest me which android OS 9 11.0 or android 10.0 or android 12.0 can support  adoptable storage without rooting
Some.findings
https://source.android.com/devices/storage/adoptable
https://www.quora.com/Which-Smartphones-use-adoptable-storage
https://www.sammobile.com/2018/11/13/samsung-android-pie-adoptable-storage-feature

Sorry, but device recommendation is off-topic here. You might be interested in our sister site, Hardware Recommendations Stack Exchange, but please ensure to follow their guidelines to get the best device for your need.

@Andrew T. Bro thanx for reminding anad managing soory I didn't knew ...any other  stack exchange forums for find recommendation mobile hardware...as in have once did in computer hardware and mobile is off topic there to...a personal  suggestion  feedback as a administrator u  should recommend to move the topic to other sub site then closing or deleting topic thread..as closing long type question some users may get upset

@Andrew T. Bro as my question is for android's adoptable storage  technical  feature on OS based opinion solution not only Ram  ROM or device ..I think it's miisnderstood

Sorry, the community has decided that device/brand recommendation is off-topic here. Also, Android device recommendations are generally on-topic on HardwareRecs.SE, but we generally don't migrate questions if we are not sure if the question as-is written will be on-topic or not. Though, probably they don't accept broad questions like brand, instead of specific devices. If that's the case, then there's no Stack Exchange sites that may be appropriate. You can try other sites like XDA Forums, Reddit, or Quora though.

@Andrew T. Bro i have edited see if satisfy and matches to the rules protocols of stack exchange .. if u think u can help to edit urself if one or two words alterations matches protocols ..but my suggestion that the more we discuss in a community with problems the more Reasearch and development increases..the protocols rules is good to manage mob but it to ties bind the more  people interacts in forums there  and chance of more intakes opinions and some.opinions suggestion hits to more discoveries.. that's why R&D..standards few protocols are good to controlbut all should be open minded ..

Your edit was appropriate, so I decided to reopen it. Note that Stack Exchange is a strict objective/factual Q&A, thus opinions are generally discouraged. No hard feeling, but that's just what the Stack Exchange Q&A model is. If you want more open-ended discussions/opinions, then SE is really not the best site for this, and there are other sites out there that are more appropriate for this, like XDA Forums and Reddits.

I came across this while searching for a problem dealing with adoptable storage. While not a direct answer about adoptable storage, I know it's typically used to gain space on internal storage and wanted to note the alternative: "Force allow apps on external" still exists under developer options (close to the bottom). At least it exists in Android 11 on a Samsung A01. Once I got adoptable storage cleaned up/removed, I enabled it and was then able to move a few GB of apps/data to the SD card making the phone more usable again.

you got adoptable-storage working on Samsung device? sure it is One UI?

I'm not sure. I followed instructions here. Seemed to work in Android 10 (one screen in settings showed 80GB of storage and I could move some apps to the card). It freed enough space to update the OS to 11 and afterwards it basically crashed until I removed the SD-card. I then had to figure out how to undo adoptable storage and then tried again and it didn't work - always just showed 16GB in storage and while it gave me the option to move apps, it failed. Finally found the setting to force apps to SD which works OK-ish.


text:
Is Google deleting critical reviews from the Play Store?
I've had numerous factual critical reviews disappear from the Play Store. On more than one occasion, I received a notification that a developer had responded to my review. When I went to look at their response, my review was gone, i.e., it appeared that I had never rated or reviewed the app. This led me to look at my other reviews and discovered many of them missing.
My reviews were entirely factual and did not violate Google's comment policy. Examples of reviews that were silently deleted:

This app blocks the back button and has no apparent way to exit. You have to kill it by swiping from recents.

And

Sign-in required to try it out.

I've also noticed that you can no longer identify bad apps by the telltale U-shaped ratings curve, i.e., many 1-stars and many 5-stars.
Is Google engaging in mass deletion of critical reviews?

May be the app developer has removed the app from Play Store and later republished it again?

@Robert No. This happens within a few hours of posting any 1- or 2-star review.

Thanks for A2A, before answering i must add that though this question is rather off-topic for this community, i would still try to answer it.
Google isn't generally engaging in mass deletion of critical reviews.
However, incase the app developer reports of recieving spam negative reviews and if Google's regex algorithms and human intervention proves them to be true, multiple negative reviews might be removed by Google.
Another instance where something similar might be done from Google's end is when the algorithms detect people installing apps, reviewing it and uninstalling within minutes - such reviews are considered illegit so removed automatically.
And regarding that U-shaped histogram type review curve, Google ditched it aroud an year ago and i do agree that it was really 10 times useful compared to the  new implementation

Uninstalling might explain part of it, but that's still a sleazy way to purge negative reviews. If someone installs an app and immediately encounters a major problem with it, of course they're not going to keep it around. And I've had this happen with reviews on apps I did not uninstall.


text:
How to lock home screen icons folders dragging deleting settings
Question How to lock home screen icons folders dragging deleting settings
I have rooted my mobiles and installed Nova launcher now on home screen i have categroized apps icons in circle folders. As the phone is also used by kids and family members   whole opening touching the mistakenly drag or delte the icon on home screen folders  mistakenly
How can in rooted phone I can lock the home screen or drawer or  folder icons or new notifications from deleting or dragging or changing...or from settings changes without pin or administrative  permissions . Is it possible through app or adb shell commands kindly suggest.

https://www.reddit.com/r/NovaLauncher/comments/icdk06/is_there_a_way_to_lock_home_screen_apps_in_place

Settings - home screen - scroll down to the bottom.... advanced - lock desktop

bro  the Nova liancher many time automatically disappears and overdrawn by original android native launcher 3 ......how can we lock on laincher 3....some one suggested me multisuer or guest option in android's setting.>andvanced>multi user but on android 5.1.1 or android 6 ther is no settings>advanced menu..kindly suggest if any app available for the same

Link2SD not only is app for symlinks it's also great app manager where you can search/share/freeze apks or make user apps system apps. freeze the stock launcher3


text:
Hiding root from banking app in 2021
Can't use my banking app nor pass safetynet
Completely Hid the banking app, and google store, and google services on Magisk hide.
Also tried a few relevant Magisk modules:

Magisk Hide props config (default)
Systemless host (default)
Universal SafetyNet fix 2.1.1
Riru framework
Riru Unshare
Riru MomoHider

Relevant Xposed modules:

RootCloak
SudoHide
XprivacyLua
Bancontact RootBypasser

Also tried Island, and applying those modules above to the isolated app. No deal
Can't disable OEM unlock, or else TWRP is blocked by some FRP
What else can be done ?
Samsung G935F
Lineage OS 15.1 (Oreo 8.1)

Same use to happen before, with S7's original ROM
Important: I have other Xposed/LSPosed modules that I need:

ExSDCard Access Enabler (Magisk)
App Locale 2
Lucky+Patcher
Jasi Patcher
Disable-FLAG_SECURE
Greenify
Secure Settings
AFWall+

And apps:

Titanium backup

Second part of the question:
How can I tell HOW the app detects root ?
So I can possibly patch the leak... Block services... Make XprivacyLua more effective
Maybe this second part is the most relevant here

Third (optional) question:
Are there any updated news regarding this cat and mouse fight ? Is someone working against this hardware verification ? Having breakthroughs ?

Does this answer your question? Can "Magisk" hide bootloader status?

Yes. Answers a part of the question. Thank you for the suggestion. I was hoping that the community had a breakthrough since 2020, year of the article. No change, apparently

Some related news from today https://forum.xda-developers.com/t/tools-zips-scripts-osm0sis-odds-and-ends-multiple-devices-platforms.2239421/post-85725237

You don't need all of those modules and apps (though XprivacyLua is needed)
I can totally understand your situation so I'll explain what i did for myself. Just follow step by step and it'll work.
First things first, remove every magisk module (incuding systemless hosts,Unshare and Momohider - yes we dont need that) except Riru CORE framework.
Also remove whatever xposed module you've installed except XprivacyLua (also you should be using riru lsposed, not xposed)
Now install Riru - LSPosed, Universal safety net fix 1.2.0 (not 2.1.0)
Now follow relevant parts of this guide.
DO reset  data of Play services, Play store and Google Services Framework.
Reboot and safetynet should pass.
Feel free to comment any doubts

Didnt work for me, even after carefully selecting only the necessary plus recommended on LSPosed/Xprivacy. Maybe the cause are my other modules (updated the thread to include them). Followed the script. Wiped every possible data from google apps AND the banking. Magisk was already rebaptized... The only thing I didn't do was to spoof the fingerprint of my device, since it's a different ROM.

I assume your Custom ROM is using redfin or Pixel 5 props by default. I recommend changing it to your stock ROM props and following the guide again .

Pixel 5 based. Will do that. Thank you !

You should try uninstall titanium backup. Once one of my banking app detected TB and stopped working. After uninstalling TB I was able to hide root from that app


text:
rooted lineageos: mount /sdcard as ext4 with support for ownership/permissions bits
It seems the partition corresponding to /sdcard is formatted as a FAT variant in android. As a result, it does not support ownership/permissions:
/sdcard/Signal $ ls -lrth
total 116M
-rw-rw---- 1 root everybody 116M Oct  2 20:23 signal-2021-10-02-20-23-20.backup
/sdcard/Signal $ whoami
u0_a248
/sdcard/Signal $ chown u0_a248 .
/sdcard/Signal $ ls -lrth
total 116M
-rw-rw---- 1 root everybody 116M Oct  2 20:23 signal-2021-10-02-20-23-20.backup

I would like to ensure that some directory, e.g. /sdcard/Signal is only readable by a few apps, e.g. just Signal and Termux by putting the user ids of the two apps in a group and assigning the directory to that group. In a rooted lineageos, is it possible to have /sdcard be a ext4-formatted partition with support for ownership and permissions?


text:
Permissions denied but still the app can use it
As you can see in the attachment, i have denied access to microphone. But when I go to "All Permissions", it shows that the app can still use microphone. What does that mean? And how can I stop it from using my microphone?

I guess that is info about what permissions that app could have (once you grant it) not actually what permissions granted. Why don't you test the microphone in chrome yourself (voice-to-text)?

You can take permission denial to a next level using PMX. Deny manifest permission as well as the related AppOp. Disclosure: I'm the author of the app.

"All Permissions" just give an insight into what all permissions the app can have once allowed, i.e. it just shows that chrome has the ability to "record audio using the microphone at any time".


text:
How to fix samsung galaxy note 9 stuck on set warranty bit recovery screen
Please i need help, i tried to flash a firmware update to my note 9 using odin but it failed. Then the phone showed a blue screen asing to use smart switch. but i went and downloaded another firmware thinking that perhaps it was the firmware that was wrong and tried again and it still failed, this time the phone is stuck on samsung logo with the image of an open lock and a message saying "set warranty bit: recovery" i tried to get into download mode but no way. Please help

flash stock ROM from official download server https://www.xda-developers.com/samloader-download-updates-samsung-galaxy

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

My current issue is , it is currently stuck in "set warranty bit:recovery/kernel" when i try to boot into download mode it doesnt work it just stays on the set warranty screen.

so i wish to know how to remove it or bypass it or fix it such that i can set it to download mode and take it from there with odin

To enter Download mode, let battery drain completely until device is powered off for sure. Press and keep holding Volume Down (+ Home button if exist) while simultaneously connecting charger/usb cable

thanks @alecxs i will try that and get to you

I think it's called Bixby button


text:
Using different port for IKE2 VPN on Android
My question is fairly simple: I would like to create an IKE2 VPN commection on stock Android11 but I don't want to use the default 500 or 4500 ports.
How can I do that?
I tried applying a colon then the port but it didn't work:

Is there a way with stock android11 to change the default port for a VPN connection?

I think the main problem is that VPN requires two ports, so specifying a port with server server address won't work as it is unclear which port you specify there. You may have to use  a VPN app that allows to create such a VPN profile.


text:
Fdroid apps seem to lack permission for SD or sim card (outside of phone storage)?
I have a rooted Razer Phone 2, and I'm attempting to slowly degoogle. I'm finding some of the apps I've downloaded from fdroid seem to have access (permission?) issues for the SD and/or sim cards, where I have things like my contacts and pictures stored. If I use the google-based apps, there seems to be no issues. I was able to import my contacts .vcf in my contact app (simple mobile tools), but I can only save them to the phone. It states that other programs will be unable to then read the contacts -- attempting to save on the sim pops up with a very quick error message that is replaced by "import failed". I tried to get a video of it via my roommate's new Pixel (as of June), but because the phone sort of "flashes" and lightens the screen, the video attempts to adjust the exposure and it's lost.
I'm not really great at android, but it seems like it's a permissions thing for me. I attempted looking into the /system/etc/permissions/platform.xml file like this site states, but I suspected (and was correct) that my Termux wasn't going to be able to save for permission reasons. Additionally, my File Manager (gitlab.com/axet/android-file-manager) doesn't allow me to alter file permissions.
Any suggestions on how to proceed? Am I even on the right track here?

android apps use (proprietary) APIs (google play services) for access. F-Droid apps might not use it, therefore it's not only a permission issue but apps might not be able to ask for permissions in a proper/intended way. Ask the app developer for troubleshooting

What apps are you talking about? When were the apps last updated? Which Android version do you use? Do the app explicitly support your Android version? For write access to "external SD-card" (real SD-card, not the emulated internal SD-card) apps need to use the Android Java API, direct file write access is no longer possible since about Android 6. Most apps are not prepared for writing to external SD-cards.

@alecxs and @ robert I think you've both clarified my problems, which isn't going to be solved easily. As I said, I am unfamiliar with how androids work, but this makes me better understand that it is a permissions thing, and it's not one I can just chmod away. I'll look in to the apps' owner's options. Your input was much appreciated.

to clarify - when we talking about android permissions this is unrelated to linux file permissions (chown/chmod)

Yes, I meant I was thinking there was more of a correlation to linux, as I'm way more familiar with that, but still very new there as well. Which is also why both previous comments clarified that misunderstanding.


text:
Root an Allwinner 100 based tablet with UNlocked bootloader but limited recovery (no TWRP)
I have an Allwinner 100 based Android tablet with an unlocked bootloader but limited recovery (no TWRP). Now, I want to root it.
I've tried:

adb shell or adb root from recovery: returns "closed"
adb shell from started Android: it enters, but of course, no way to get root from here as I don't have su
Trying to extract the partitions, from shell, using
dd if=/dev/block/mmcblk0 of=/sdcard/blk0.img bs=4096 conv=notrunc,noerror,sync says permission denied
that Chinese tablet does not have "install from zip" option in the recovery
that tablet does not have any firmware updates from where I could extract boot.img to patch it with Magisk

Is there any way to do that?

https://android.stackexchange.com/questions/224047/i-need-help-with-my-bricked-tablet#comment290801_224047

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

@Robert readback boot.img off device was also my first thought, but it's Allwinner Chipset not MTK do you think it's possible anyway (flash tools linked)?

@alecxs I missed that little detail hidden in the title. I never have seen an Alwinner base device in reality, but I know that there are some Alwinner based Raspberry-alike boards with integrated flash, may be the tools available for these boards also can be used with Android Alwinner devices?


text:
Error OR-PMSA-03 when trying to make in-app purchase
My mother has been playing a game on her tablet (its called Hidden City), in which she sometimes buy in-game elements to help her progress. But since about 2 months, each time she tries to buy something, Google Play reject the payment by sending the error OR-PMSA-03
Does someone know what this error means and what might cause it ?
We already tried to check with the bank, and according to them, there is no problem with the credit cart she is using, so the error might come either from the game (we already tried to uninstall/reinstall it) or the tablet itself
Thanks,
Méta

Likely corrupted cache???

@beeshyams We already tried to uninstall/reinstall the game, shouldn't it have already cleaned the cache?

Cache of Play Store

There is still an error, but it is different this time. It's OR-PMSA-35 now


text:
ADB Process kill error. Android 11
My camera doesn't work on a custom ROM (Android 11), I searched for a fix online, and it says that I have to restart the camera service, they said to run this command on ADB:
kill -HUP ps -A | grep camera | awk '{print $2}'

but when I hit enter it gave me an error of:
/system/bin/sh: kill: ps: arguments must be jobs or process IDs
/system/bin/sh: kill: -A: arguments must be jobs or process IDs

I ran
ps -A | grep camera

It outputs
cameraserver    375    1   25432   2584 binder_thread_read a9825cec S android.hardware.camera.provider@2.4-service
camera          426    1   73104   2432 poll_schedule_timeout aea69eac S mm-qcamera-daemon

Can anyone help me to solve this problem?

Execute the command-parts separately, e.g. ps -A | grep camera if you can find the camera process at all. Edit your question and add the output of this command.

@Robert ,  i've added the output of he command

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

I can only guess of syntax error. Go back where you found that command I am pretty sure you missed something, like kill -HUP \ps -A | grep camera | awk '{print $2}'`(note the difference between`and'`)

Does this answer your question? cmd nested in backticks processed from sudo?


text:
How to determine what is eating up my storage (Samsung)?
I have a Samsung S7 with 32 GB of storage. For a couple of years now, storage space kept getting filled up for no apparent reason, until none was left. How can I find out what is using up the storage?
What have I tried so far?

I installed Google Files, which gives a breakdown of used storage. It says, 7.4 GB apps, 1 GB images, very little for the rest, except: 21.2 GB for "System". That's over 65% of all available storage. What is included in this 21 GB and how can I free it up?
I tried uninstalling apps, but whatever space I free up will eventually disappear, preventing me from re-installing the same apps again.
I tried uninstall Samsung Secure Folder. It freed up minimal space.
I used the Samsung Files app to look at all visible files on the internal storage, and move whatever I could identify (such as images) to the SD card. Whatever space I could re-gain this way would eventually get filled up again.
Tried wiping the cache partition.
I regularly use abd to execute pm trim-caches. This usually lets me get to about 1.0-1.5 GB of free space on the phone, which allows it to work properly for a few days. Eventually, that space gets filled up and I'm down to 0.5 GB of free space again, compromising the functionality of several apps. The amount I can get back with trim-caches has been steadily decreasing over time.

Any tips about (1) how to identify what uses up space (2) how to free up space are very welcome. I am very much hoping to be able to avoid a factory reset.

The size of Android apps is constantly increasing over the years, most likely this is eating up large parts of your storage. First I would try to disable apps you never use. This allows to deinstall updates for this app and also the cache of this app is not recreated.

@Robert If it is apps that use up space (note: I already uninstalled several), is it expected that Google Files would indicate 7 GB used by "apps" but 21 GB used by "system"? What does "system" indicate?

The "system partition" of a S7 should be around 4 GB, but when I check the values of my S7 in settings -> Storage -> 3dots menu -> Storagesettings it shows "Systemstorage" 7.5GB. Not sure what is included in this.

@Robert "system" is not /system partition. It includes almost everything on /data other than apps directories and /data/media. Explained in How disk space is used on Android device?.


text:
Questions about the specifics of Factory Reset
I have a few questions about how exactly Factory Reset works on Android (10+) devices:
Specifically, what is, and what is not, wiped?
I know that app data is wiped, but are there any system databases/caches/logs (basically anything that contains any form of user-specific data) left untouched by the process?
Does Android do the same thing as Apple, where the old data is left completely encrypted?
Thanks

android partitions are mounted read-only except for userdata partition which is formatted on factory reset, and frp partition which survives


text:
The 3D compass is unreliable on many Android phones. What can I do?
I'm writing a Wayfinding app which relies on the compass. But my Samsung Galaxy S9 seems to have an unreliable compass - both my app and the "Compass 3D" app don't reliably track magnetic north...sometimes the compass works as I turn around slowly, but then the compass stops, and then it goes backwards.
I'm constantly recalibrating, rotating the phone in 3 axes, but this doesn't fix the problem. I've tried it both within the case, which has a small magnetic clasp, and outside the case. The compass is maybe slightly better when the phone is held flat (horizontal) but my app needs the compass when the app is held vertical in landscape mode.
I have a very cheap Samsung A31 phone which seems to have a much better compass. Every iPhone I've used also seems to have a good compass, even one attached to a very strong magnetic case. So I figured I just have a bad phone, and I went into a phone shop. The salesman had a brand new Samsung S21, his own personal phone, which he proudly showed to me. We downloaded the "Compass 3D" app and calibrated his phone. But it worked even worse than mine. So I ended up not buying any phone.
But now I'm stuck.
Any ideas, anyone?  I need my phone to work better than the phones of the potential users of the app, because I'm creating content. More specifically, (a) are some manufacturers/models better than others? (b) do others experience this same problem? (c) is it true that some axes work better than others (holding phone flat=better)? (d) is there some trick to calibration, or how frequently do I need to recalibrate?  (e) anything else I'm missing?

Hi, note that app development is off-topic since Android Enthusiasts focuses on end-users or power-users (but not necessarily developers) solving their issues. That said, within the site's scope that development-related solution is out of scope, I'm not sure what kind of ideas you are expecting. Did you mean to improve the compass accuracy on vertical/landscape mode (if it's even possible)?

This question is not about app development, even if I am an app developer. The problem can be seen with any 3D compass app. I'll clarify the question.


text:
How to verify if device is reporting fake technical specs like Android version, RAM, or storage memory?
I've been asked if I can check some faulty behavior of a device, a cheap Chinese android smartphone.
I'm not really an android expert, usually I install a few apps to help me figure out few things about the device. These apps I've reported conflicting results compared to what was displayed in the main android settings area:

With DiskUsage internal memory is reported as 3.9gb vs 16gb in system settings.
Device Info HW (suggested by @alecxs) explicitly mark as fake the reported version 9.0, pointing Android 6 as correct with API level 23. Unfortunately the app reports the same storage size of 16gb as stated in system settings.
Following another intuition of @alecxs, inspecting the partitions tab and looking at the displayed partitions sizes, it's possible to detect yet another forged spec. The total reported partitions size is around 8gb, the userdata partition is around 4gb which is corresponding to DiskUsage report.
In my previous attempt I've CPU Info.

This kinda reminds me of fake USB thumb drives scams with less memory than advertised.
So is there a way (preferably without root) to test/analyze common technical details of a device for possible tampering/spoofing?
Like

Storage
Android version
RAM
CPU
Something else that can be faked?

FLOSS solutions are highly appreciated! :)
UPDATES

Listed used apps and updated after suggestions in comments.
Added considerations and further analysis of partitions memory size.

Does this answer your question? Which Android runs which Linux kernel?

searching for modem (baseband version) sometimes reveal true model and specs. afaik baseband can't be spoofed on chinese factory mode screen (vol up + vol dn + power)

The app is interesting @alecxs thank you. Even if atm I don't consider a resolving answer I'd like to +1 your suggestion. Unfortunately the storage size is reported just like in the system settings.

The android kernel and baseband version are also valid points that should be considered.

That's interesting. I wonder there is a discrepancy between MEMORY and PARTITIONS tab

In partitions tab the very last entry reports as start address 0x01d0f80000 and partition size 0x0001000000, so should be total 0x01d180000 and that is (correct me if I'm wrong) 7,817,658,368 bytes right? so 8gb roughly?

Let us continue this discussion in chat.

In general the more common an hardware info app is the more likely it is that the hardware faker have integrated a patch to let a system info app display wrong values.
Therefore the best way to identify fake hardware is not to use an app at all. Using a Linux command-line program e.g. executed via adb identifying fake values or values that do not match if more likely. To do so I would recommend to  copy a (renamed) busybox binary via adb:

rename it to something different like mybinary
push it to the phone adb push <mybinary> /sdcard
start adb shell
copy the binary it to a path where you can execute it: cp /sdcard/<mybinary> /data/local/tmp/
make it executable chmod u+x /data/local/tmp/<mybinary>

Now you are ready to use it..eg. to check the physical RAM:
/data/local/tmp/<mybinary> free
            total       used       free     shared    buffers     cached
Mem:       5727792    5528296     199496      67020       1712    2170428
-/+ buffers/cache:    3356156    2371636
Swap:      2097148    1737312     359836

In this example the total memory of the phone is 6GB minus the size used by the GPU. So we end up here with 5727792 total memory = 5.4GB max RAM
To print disk size you can use
/data/local/tmp/<mybinary> df -h /sdcard
Filesystem                Size      Used Available Use% Mounted on
/dev/fuse               109.6G     17.9G     91.5G  16% /storage/emulated

It shows the user data partition size and usage. The used phone has 128GB flash memory. The user data partition is smaller as the remaining space is occupied by the system partition(s) and other partitions.

Indeed a more thorough approach, thanks! Would something like Termux be equivalent?

@Gruber Using Termux is possible but I would not recommend it as fake devices are often patched to forge app display data. I don't know how Termux renders the output (and how easy/difficult it is to forge the output of certain commands) but I would stringly recommend to use the commands via adb. Then at least the displaying part on the PC side is known to be not manipulated.

Have you tried using something like AIDA64?
Apparently the newer versions have mitigations against reporting spoofed specs.
Another thing to check against the claimed specs. is pixel/screen resolution, it shouldn't be as easily spoofable, and is often lower than claimed in these cheap unbranded Android devices which have other suspicious specs.
There are also certain device model names which are more liable to report spoofed information.
If you go here, check the device model name/number (and estimated pixel resolution), some device models which frequently have spoofed specs are "FF-5000", "P10", "PX6", "S109", "T906", "TAB910", "TS-M704A", "ZH960" and more.
Other fake devices will have model numbers which appear on the surface to look like a known brand, e.g. "S21+ Ultra", whereas a real Samsung device should report something like "SM-G9960" (most Samsung devices will have model numbers starting with a prefix such as "SM-" or "GT-", although this could also be faked).

AIDA64 and similar apps are too common. People who fake hardware even integrate "fixes" which override the data shown in such apps.

If you're comfortable with the command line here's what I think is a better and simpler way that doesn't require adb and connecting to a computer, doesn't require root access or anything else tricky. Easy for a novice or total noob:

Install F-Droid from Google Play
Install Termux from F-Droid
Run Termux
Type pkg install inxi -y
then Press ENTER
Type inxi
then Press ENTER
Read the info displayed.

Explanation:
F-Droid is an alternative to Google Play. It says it is an "installable catalogue of FOSS (Free and Open Source Software) applications for the Android platform".
Termux is a terminal emulator with a modified version of linux.
"Termux combines powerful terminal emulation with an extensive Linux package collection."
inxi is a command line system information script, built for console and IRC. It is also used for forum technical support, as a debugging tool, to quickly ascertain user system configuration and hardware.
*Note:
You might be able to skip installing F-Droid and just install Termux from Google Play... try it.
I had the same issue and wanted to check my hardware because I suspected the hardware and software was spoofing the information shown by the built-in Android tools (Settings) and other apps like AIDA, CPU-Z, Device Info HW and other common apps. I was right (grrr )
Termux also has the df and du commands which show the real disk space available (free) and disk space used.

df -h (disk free, human readable output)

du -hs (disk use, human readable output & summary)

The 2nd command example du has a couple of switches:
-h is used to show file sizes in human readable format just like df, i.e. KB, MB, GB
-s is to show a summary only. This is necessary to stop du from displaying the name and size of every file. Instead it displays only a summary, which is the size of all files - the summary of disk use. Try just du and see what you get.
du --help => Summarize device usage of the set of FILEs, recursively for directories.
df --help => The "disk free" command shows total/used/available disk space for each filesystem listed on the command line, or all currently mounted file systems.
Type inxi -h (then press ENTER) for extensive help on how to get the information you want. If the results scroll past one screen just use swipe up to scroll up, if you are in a Termux shell (the 'shell' is what you get when you run Termux). You can copy and paste from within Termux in the usual manner, and paste data into other apps on the device, including browsers. This will allow you to post information to forums, tech support, or customer service agents. You can also try addition information gleaning commands suggested by linux savvy tech support ppl. You can also paste into Termux from other apps - useful if you get a suggestion for a command to run in Termux.
There are a whole lot of other options to determine the 'real' hardware and software details of an Android device from within Termux, and other linux style terminals/terminal emulators. You can even install additional packages within Termux. For more info just search for Termux using your favourite browser and search engine (most ppl use Google as their search engine but there are better & safer options like DuckDuckGo or even Yahoo among others).
If you are at all familiar with linux, Termux has a package manager that is pseudo apt. The command is pkg and it has the usual options one might expect from apt like install, search, show, list-installed and uninstall and more, as well as the -y for 'yes to all' argument.
Here's the results from the inxi command on my Chinese tablet:
.../data/com.termux $ inxi
CPU: single core AArch64 (-UP-) speed/min/max: 871/286/1508 MHz Kernel: 3.18.79 aarch64 Up: 9h 37m Mem: 1.4/2.75 GiB (50.9%) Storage: 39.75 GiB/Total N/A Procs: 2 Shell: Bash inxi: 3.3.31
.../data/com.termux $

The actual output from inxi displays better than it is shown here, much more readable.
My device reports 1TB of storage, 16GB RAM and Android 13 via the built-in Settings / System / About.
Whereas it actually has 3GB RAM 25-30GB storage (depending on measuring methods/standards) and Android 8.1.0. which is mostly evident from the inxi output.
And I'm 100% certain I've been cheated.
*Note:
I also used 'Root Checker' to check the version of Android. Install Root Checker from Google Play, launch it and click VERIFY ROOT. It will display a message telling you if the device is rooted or not, plus some other info including the actual OS and its version.

Be aware that Termux on Google Play Store is no longer supported: https://wiki.termux.com/wiki/Installation F-Droid should be preferred. Please update your answer.

Termux via F-Droid (big fan!) and inxi are definitely a good alternative! Also this can actually develop in a more robust scripted all around solution ...

I'm not concerned about Termux not being supported by Google Play, but according to Morrison Chang it isn't. In this example it isn't an issue as I don't suggest installing Termux from Google Play, I suggest to install it from F-Droid. Sorry if I've done this wrong but I'm new and working from the tablet in question.


text:
How to prevent all Android apps from switching phone orientation (landscape/portrait) based on gyroscope on Android?
I am using Android 11 (LineageOS 18.1), and I'd like to prevent Android from accidentally switching to portrait mode, like when I rotate the direction of gravity field. Camera app seem to be resetting phone orientation against all preferences.
I tried:

setting rotation settings in android settings

worked, but restarting camera overrides this setting, reverting back to portrait

to disable sensors in developer mode

worked, but doesn't preserve state between system reboots

app "Rotation Lock + Landscape" from F-Droid

worked, but restarting camera overrides this app, reverting back to portrait

After all (1.,2.,3.) together, the mode came back to portrait after restart, and I started getting error "open camera error id = 0" upon trying to open camera, which only disappeared after factory reset... :/
So, none of that fully worked.
I want to permanently prevent all apps from switching screen orientation based on gyro, and the phone not resetting orientation during startup: set the orientation "in stone" (permanently, and so that I could only manually switch between it).

This seem to be a general problem of Android that even if rotation lock is active on system level, apps can change the orientation based on rotation sensor and afterwards the orientation stays.


text:
I connected my phone with usb debugging to an infected computer
I have a computer that used to have malware. During the time it had malware, I connected my phone to it with usb debugging (was unaware of the malware). I have no signs of malware but I'm still worried about the virus being able to propogate to my phone and stay hidden. Do I

Leave it
Factory reset my phone
Reflash the phone

Threat model is a regular computer user. I also probably enabled usb tethering or other stuff that could have helped the malware propagate.

even if adb was authorized it is very unlikely something installed without notice

@alecxs Some years ago I read about a Windows banking trojan which also had an Android component (AFAIR for forwarding TAN SMS). But nowadays windows malware concentrates more ransome ware and Android devices aren't that useful for this use case...

Use a third-party app and list those installed apps which were recently installed or updated since the moment you plugged your device in the infected PC. A malware needs a way to carry itself, and another way to execute its payload. In your case, the infected machine could have modified system partition, or boot partition, or installed a rogue app. These are the preferred destinations. By running safetynet tests (use third-party apps) you can rule out tampering with privileged files (system, boot, etc.) in the device. So listing recently installed or updated apps ought to be prioritized than.

What would I do in this situation?
First, I would use Avast or AVG(even though they are the same things) or Malwarebytes to remove malware from my PC. Then, fully format(wipe data, dalvik cache and etc) my phone and then re flash stock ROM and then re flash custom ROM. And for being completely relaxed, I would install Avast's free version to my phone.
I don't think any virus can survive after this.
Excuses for auto correct. It has some lil problems

If you already intend to reflash ROM, then doing a factory reset beforehand is redundant and therefore, skippable. (The term formatting is not used in Android ecosystem BTW.) Equally redundant is using an antimalware app if reflashing is going to be done anyway. Antimalware apps are useless anyway on Android.

@Firelord Ofc format is not in Android ecosystem. I meant wiping all data, dalvik cache and etc. And I wrote world-end scenario for making him sure that there will not be a single virus after that.

to be nitpicky factory reset actually format userdata partition


text:
Samsung a32 5g - Does having an app running in the foreground vs when you tab out of it when the screen is turned off take more battery/data?
In case you are confused on what I'm asking, let's say I open Pokemon go and have it running in the foreground, then turn my screen off. Will this take up more battery and data than if I tabbed out of the app, had it in the background, and then turned my screen off?

To my knowledge if the screen is turned off for Android this is like the app is going into background.

Sounds good, you mean while the app was still running right?

Yes. You can test this on your own. Use an app that records your GPS position and give the app the permission to access GPS only in foreground. To my experience GPS recording will stop if the app is in fore-ground and you switch off display.

I think that's true, when my screen is off the game does not follow location and lags behind until it catches up to me. Thanks! I do believe this will save data in that case correct?


text:
How to install GSI on Samsung Galaxy Tab Active3
I am trying to flash an Android 12 GSI onto my Samsung Galaxy Tab Active3. Goal is to install the GSI without root / voiding the warranty. My company produces an app which is primarily used on Android on Galaxy Tab Active devices. It's expected Galaxy Tab Active3 will get Android 12 update in the next few months and we wanted to do some regression testing in advance of that. Hence the need to get Android 12 GSI onto the Tab Active3.
Device is an arm64 so I downloaded the arm64+gms version of Android 12 GSI (from Google's website). I have successfully unlocked the bootloader, and enabled DSU support. The device supports Project Treble and the VNDK isolated namespace, so in theory should support GSIs.
Everything I tried so far has failed. Any ideas to get it working?
Manual DSU
I have tried to install the GSI by manually starting the DSU via activity manager. Every time it just says "Installation failed" after reaching about 50% progress. I have tried setting different sizes for the USERDATA: 8GB (Google's recommended size), 2GB and 1GB. I get the same error every time. The device has around 40GB free space and the GSI image size is around 2GB, so it shouldn't be anything to do with the space requirements.
Logcat reports an error:
11-11 13:10:09.620  1103  3695 I DynamicSystemService: Failed to install system
11-11 13:10:09.621 16445 23403 E InstallationAsyncTask: java.io.IOException: Failed to start installation with requested size: 1257738436

This doesn't help unfortunately; it is thrown from the following file and this is just thrown if there is any error in the underlying dynamic installation:
https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java
PS: Unfortunately the device does not support DSU Loader even though it's running Android 11 (searching for "dsu" in the settings returns no relevant results). Apparently none of the Samsung devices are supporting DSU Loader.
Fastboot and FastbootD
The device can be rebooted into fastboot mode (adb reboot bootloader) but every command just hangs forever (except for fastboot devices, which does detect the device). I tried fastboot reboot fastboot, but it just reboots into the standard mode of the device and does not enter a fastboot userspace mode (fastbootd mode) as some have suggested it should.
Heimdall
At least one person has said they can patch GSIs using Heimdall: https://forum.xda-developers.com/t/can-i-flash-gsi-roms-with-odin.4029921/
That person was able to flash their GSI to the SYSTEM partition, but my device doesn't have a SYSTEM partition. The partitions are like SUPER, PRISM, etc.
I'm not able to get Heimdall working properly on Windows 10. I have tried with WinUSB, libusb0 and libusbK, but the same is true for all of them. After rebooting the device into ODIN mode, the device can be detected with heimdall detect, but I can't do anything more including heimdall print-pit, as I get a "Failed to access device. libusb error: -12" error.
I managed to set up Heimdall on an Ubuntu instance of WSL and map the USB using USBIPD. Inside WSL, heimdall print-pit does work but I can't get further to flashing anything (I tried to flash the GSI to SUPER, not sure if this was a good idea but anyway it failed) as I get a "Protocol initialisation failed!" error.
Odin
I am not sure if Odin even supports GSIs and I can't find anyone saying it supports them. I have tried flashing the GSI as an AP in Odin 3.12, 3.13, 3.14 and the patched 3.14 which removes signature checks. But every time it just fails.
Custom recovery
Just to also note, it seems none of the custom recoveries (TWRP, SHRP, Orangefox etc) support the Tab Active3, or I could have tried to flash those using Heimdall/Odin and then use them to flash the GSI. But I feel it's likely I would have had the same issues, at least with Heimdall.
EDIT: Heimdall on native Linux
@Robert in the comments below suggested I run Heimdall on native Linux rather than on WSL or the Windows version. This worked better and fixed the issues I was having before with Heimdall.
I then tried to flash VBMETA (the one which is bundled with the GSI) using Heimdall which worked, however my device is now soft-bricked, can only boot into Download Mode, and gives the following error:
ODIN MODE (AVB fail)
vbmeta: Public key used to sign data rejected. (5)
vbmeta: VERIFICATION_DISABLED bit is set.
CUSTOM VBMETA
VBMETA : No sign info
VBMETA ,

@alecxs in the comments had suggested flashing a VBMETA generated from avbtool instead; I tried this also, but got almost the same situation and a very slightly different error output:
ODIN MODE (AVB fail)
vbmeta: Error verifying vbmeta image: OK_NOT_SIGNED (3)
vbmeta: VERIFICATION_DISABLED bit is set.
CUSTOM VBMETA
VBMETA : No sign info
VBMETA ,

EDIT 2: Heimdall on WSL again, VBMETA findings, and how I got DSU working
I found that both Heimdall on native Linux and Heimdall on WSL actually suffer from the same problem. You can only post one command to the device, then subsequent commands fail with "protocol initialisation failed". On WSL I was doing things like heimdall print-pit --no-reboot and that's why I was facing issues when flashing. Basically, if you get protocol initialisation failed, just reboot the device and it should work.
Samsung devices seem to do a signature check on VBMETA and only accept official Samsung-signed ones. I found two different VBMETA images in my stock ROM - vbmeta.img and vbmeta_samsung.img. I happened to notice that vbmeta_samsung.img has the same file size as the vbmeta disable images. By the time I'd got this fixed I'd flashed vbmeta_samsung.img and then done a factory reset. I'm not sure if this was strictly necessary though, as after flashing vbmeta.img it still worked. Not sure if re-flashing original stock vbmeta.img will have re-enabled AVB though. Although I'd say it's unlikely, as even Google themselves say you need to disable AVB in order to use DSU.
How I got DSU fixed eventually (aside from the above) - I had made a really stupid error when running the DSU command. For KEY_SYSTEM_SIZE I was passing the gzipped system size, not original system image size. This is why the installation always failed after 50%, because it was only installing 50% of the system image. Also another really important thing to note is that after running DSU, you have to restart the system from the DSU notification and not from the normal power menu of the device.

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

Just posting this for future reference - I did manage to install Android 12 GSI on the Samsung Galaxy Tab Active3 using DSU (not DSU Loader) eventually, and the problem turned out to be something really stupid. When supplying the value for KEY_SYSTEM_SIZE in the DSU install command, I had supplied the gzipped size rather than original image size. This is why the installation failed after 50% because it was only processing 50% of the uncompressed image (compression ratio was approximately 50%).
There was lots of discussion in the question comments about disabling AVB - I want to note that you do not have to disable AVB in order to follow these instructions. I verified this with a colleague who had a brand new device and we were able to install the GSI with DSU without disabling AVB.
There is little point in me posting detailed steps because they're essentially just the vanilla steps from Google to installing any GSI through DSU. At a high level:

Enable OEM unlock in your developer options (if you can't see it and your device is fairly new, there are a number of guides online you can follow around setting your device clock manually to "trick" the device into thinking it's not such a new device)
Unlock the bootloader (power off device, hold down vol up+down, plug in power cable (connected to a computer USB not to a regular power socket), long press vol up, press vol up again to confirm)
The device will automatically factory reset - go through setup again and make sure you enable WiFi
Enable the DSU feature flag: adb shell setprop persist.sys.fflag.override.settings_dynamic_system true
Launch DSU: see https://developer.android.com/topic/dsu#launch (make sure when you supply the KEY_SYSTEM_SIZE this is the original image size not gzipped image size which is where I went wrong)
Make sure you reboot your device from the DSU notification (you have to expand it to see the restart option) and not from the normal power menu