text:
PDF always open in Drive from Files
When opening PDFs in "Files by Google" it always opens in Drive PDF Viewer. I want them to open in Adobe.
I've looked online and got a lot similar issue, but none of the fixes work for me.
Here is what I found in other posts and tried:

Clearing cache and storage in Drive and Files.
Selecting "Don't allow app to open links" in "Open by Default" for both Drive and Files.
There is no PDF option in "Setting"->"Apps"->"Default apps" for me to change.
Denying Files the "Modify system settings" permission.
Temporarily installing another PDF viewer to force a default app prompt when opening PDFs from Files (which it doesn't).
Temporarily installing another file manager and selecting Adobe as my default PDF viewer. It doesn't carry to Files.
Disabling Drive, opening the PDF from Files while Adobe is my only viewer. It opens in Adobe automatically but goes back to Drive as soon as I enable it again.
Disabling Drive, opening the PDF in Files while I have multiple viewers available, selecting Adobe and clicking "Always". It goes back to opening in Drive as soon as I enable it again.

I am using a Google Pixel 8 Pro with Android 14. I had the same problem with my Pixel 6 for the past two+ years and possibly my older pixel 3, but I don't quite remember.

Perhaps that is how Files has been written.  There are other free file manager apps you can try.

@RohitGupta That would be a shame. Guess I'm stuck having to click on the three dots and selecting "Open with"  -> "Adobe Acrobat" every single time then :(

Same problem with Android 14 Pixel 7 for me. Every time pdf opens OneDrive is top of list and no other app can be choosen as "always open"

It sounds like you already found one solution -- disable Drive, and nothing will open in that app.
On my Samsung Galaxy S23, if I open the app settings, the app info for Drive has a "set as default" option, and when I click on it, there's an option to clear defaults.  If you look inside the app's settings instead of going for a general "default app" menu, that might accomplish what you want.  I used to have a Pixel 3, but I don't remember if it would have the same thing.  It's still worth trying, though.  Good luck!

That is not a solution. I want to use Drive for other purpose and I do use it a lot. I don't want PDFs to open in it because I dislike the interface, but that doesn't mean I never want to use Drive whatsoever.
There is also no "Set as Default" nor "Clear Default" option in the Drive app settings, at least on Pixel 8 Pro.
Thanks for trying to help.

It still might work for you.  With no default app for PDFs, every time you open a PDF, it will ask what app to use and if you want to use it just once or always.  It doesn't delete the app, so you will still be able to use Drive; you'll just have to tell your phone which app to use each time.  You don't have to delete the app.  I looked up where the Default Apps settings are for your phone and found this web site:  https://www.bestusefultips.com/how-to-change-default-apps-on-pixel-8-pixel-8-pro-pixel-7-pro/ (no affiliations with site).  This should work for you.

Sorry for the delay.
As mentionned in my original post, under default apps, there is no PDF settings.
I juste tried the reset app preferences in System -> Reset Options, but beside having to establish all permissions and other defaults again, PDFs still open in Drive.


text:
Termux PostgreSQL initdb: wrong directory ownership
Recently, I installed PostgreSQL pkg on Termux. But when I wanted to use the initdb postgre command to initialize postgre directory, I had the wrong ownership:
$ initdb postgres
The files belonging to this database system will be owned by user "u0_a691".
This user must also own the server process.

The database cluster will be initialized with locale "C.UTF-8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory postgres ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... mmap
selecting default max_connections ... 20
selecting default shared_buffers ... 400kB
selecting default time zone ... Iran
creating configuration files ... ok
running bootstrap script ...
2024-01-05 03:41:58.200 +0330 [21102] FATAL:  data directory "/storage/emulated/0/dev/python/projects/l/L10/db/postgres" has wrong ownership
2024-01-05 03:41:58.200 +0330 [21102] HINT:  The server must be started by the user that owns the data directory.
child process exited with exit code 1
initdb: removing contents of data directory "postgres"

But when I used
chown u0_a691 postgres

ChatGPT said that I should use the group of directory, but I could not use sudo addgroup mygroup command because my phone is not rooted, and the second thing I could not do was change file /etc/group manually. And that didn't work too. BTW, I can use this command on Termux storage, but I don't really want to use that there. I want to use that on my internal storage and it doesn't work now.
Is there any way to fix that?

/storage/emulated/0 (aka /sdcard) is a bad choice as installation target as this folder uses special mount options, e.g. preventing execution and other things like no direct access in Android 11+. If you want to execute software change target to the Termux app private folder /data/data/com.termux/files/home.

source: Stack Exchange

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

sort: votes


text:
How to let Emacs display with which command line arguments it was invoked?
I am using Samsung Galaxy S10+ on Android 12. I'm using the Emacs app from F-Droid. However, the top-left corner of my phone is covered, and the top line is too small to hit the icons, even with the help of a pen. Thus, I have to make some settings in Emacs.
Normally, this is to be done by command line options when Emacs is invoked. But in Android, I can only hit the icon of Emacs, I have no opportunity to influence the invocation of Emacs.
When Emacs is beginning to run, I would be able to give Emacs commands to alter its invocation settings. For this, I must get with what parameters Emacs was invoked.
Can you tell me the command to let Emacs report how Emacs was invoked? As Vim does with the Ex-command
":echo v:argv"

When talking about third party apps please always provide a link to the app in the app store.

This question is better suited for Emacs Stack Exchange

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


text:
How can I set accessibility options on an Android ROM without them?
After buying an Android '13'† Head unit with a screen higher resolution than my previous stereo, I found that it didn't offer any options to change the font or icon size in it's accessibility options, so text is too small at arms length, where the screen is.
Since there are no after market ROMs for this device yet, I wonder if there is any other way to change these settings via an app, or by editing a configuration file somewhere?
I have enabled Developer options on this device and can enable adb if needed.
† About may say "Android 13", but it's probably a lie, it looks more like Android 10, but I would like to know the most reliable way to work it out.

Do you have adb access?

Some of those settings for me have been in "Display" under "Display size and text" rather than Accessibility, have you looked there?
Also, would you mind providing the Android version? A lot probably depends on at least that.

Nothing like that in Display either. What's the most accurate way to tell what version it it, as it's one of those versions hacked to say that it's Android 13, when it definitely isn't. I believe that it's based on Android 10, but I don't know which values in About that I can trust, and which I cant.

# for font size
adb shell settings put system font_scale 1.10
# 1.30 is apparently the largest font size possible
# for dpi
adb shell wm density <dpi> # higher the value, larger the icons

Sometimes a reboot might be needed for changes to take place


text:
How to format an external hard drive on Android?
How can I format or wipe an external hard drive with no partition on it without third party apps? I tried the MixApplications app but it's paid, in fact all apps that I tried to wipe this HDD are paid.
So is there another way?

Isn't it detected in settings > storage?

Nope.It's an IDE HDD which i connect it via IDE/SATA Converter.It's only showing up in notification panel but from there i cannot format it.Also i don't have a PC.

So... You have that + a USB-SATA adapter? Or the Android device has SATA ports? Either way there's lot of "moving parts" here and you really need to test the hardware under a more "normal" desktop computer environment. Firstly, the HDD itself can be toast; any PATA HDD is now so old that failure should be the first thing coming to anyone's mind. Then there's the adapter that can be faulty as well and/or being used with an incorrect jumper selection on the HDD (depending on the adapter it may require "master" or "cable select") . Then, if connecting by USB that adapter as well can be faulty

I have a USB SATA/IDE Adapter.I know but right now i do not have access to a Computer.I wanna sell it but i think it faulty as you said.The Adapter it's not faulty,because i've installed the Paragon app and mount it and i could read files from it,i think maybe ths HDD it's faulty because my Android phone restarts when it try to format it from notification panel(where it says "Tap to fix this USB")


text:
Revoke permission of system apps without root
I was wondering if there is any way I could revoke permission of a system app without having root. And if the is a way and I managed to do it are there any side effects that might result in the app crashing or not opening at all. The permission I want to revoke is HIDE_NON_SYSTEM_OVERLAY_WINDOWS.
And the apps are Package Installer and Permission Controller.
Thank you


text:
Is my SM-819 (Galaxy Tab s2) salvageable?
I have a Galaxy Tab s2 that constantly boot loops.
It is a similar situation to this question which has no answers.
Power: The device enters a boot loop when turned on.
Power + Vol up + Home: says "booting recovery" in top left, samsung logo appears. After a couple min the screen goes blank and it enters the boot loop again.
Power + Vol down + Home: enters download mode which looks like this:

First thing I did was download and attempt to flash TWRP recovery, but it said FRP lock, so I can only flash stock firmwares.
I downloaded the stock version for this device (guessing the region code because I don't see it in download mode).
I used odin4 for this, and it completed successfully. The system update page came up, and at 32% said 'erasing' and restarted the device. See Here.
The suggestions said to
Reboot into recovery volume up+home+power
Wipe cache/factory reset
Reboot
However, when I attempt to reboot into recovery, it just shows the samsung logo and then goes back to a boot loop. So there's no way to do the factory reset.
I've looked at the odin options, and it has -e which is erase, which I have tried to no effect.
I have also tried heimdall but that runs into this issue so I would need to build heimdall from source so I'm not sure it's worth it.
I don't want to continue debugging this if it's a hardware issue (the ROM is damaged/corrupted or something). Is there any other option I can try?
Also, it's possible the region code is incorrect, but I have no way to know since it's not showing up in the download mode. South Africa only has 2 codes, XFA and XFV. I tried both, XFA doesn't even get to the install screen, XFV gets much further so I figured that was the right one. If this is an internationally sourced device then I'm screwed.


text:
I have added many photos from Camera to Album X for sorting. Is there any way to automatically add all remaining photos in Camera to Album Y?
Album X is supposed to be a "best of" album. However, I keep on noticing very good photos that I previously missed, and am adding them to Album X in an ad-hoc manor. It would be better to add all photos not already in Album X to Album Y so that I can go through them again as a group and promote more to Album X as necessary. Is there a way to automate the process of adding the thousands of photos in Camera which are not already in Album X to Album Y?
NB, as an alternative to automatically adding all photos to Album Y which are not already in Album X: Is there a way to view all the photos in Camera alongside some kind of identifier of whether they are also in Album X? Even that would make the sorting process much easier.

I have a solution if you are happy to use windows tools, which doesnt involve copying all files down, just the ones you move, one at a time

@Rohit Gupta I may be happy to use Windows tools


text:
WizTree: Difference in values of "Total size" and "Size" of disk
Here is the screen shot of the file tree of my phone's internal storage:

Why the total space available (shown at the top) is 48.8 GB but size on disk is just 20.5 GB, isn't it supposed to be 48.8 GB? How can i see the hidden 28.3 GB of files?
Thank you!

Maybe others partitions / folders on the drive ? What do you have inside the select field of your screenshot ? - You are currently inside 2027 folder.

If you connect an Android device to a PC the PC does not get access to the storage system of Android. Instead Android exposes some folders to the PC using the Media Transfer Protocol (MTP).
Furthermore Android uses multiple partitions, usually one or more system partition(s), and one partition for user data. The entries "Total Space" and and "Space Used" refer to this user data partition. The system partitions (depending on the device and Android version) usually have a size of about 8-25GB, thus the user data partition can only be as large as the remaining space. In your case I assume your phone has 64GB flash storage. The user data partition has 48.8GB which means the system partitions consume the other space of 15.2GB.
The user data partition there are again several sections:

Shared storage (/sdcard or /storage/emulated/0)
App private data (/data/data)

MTP only allows you to see shared storage, so the shown storage tree only covers this part of the user data partition. Therefore you only see 20.5Gb of 48.2GB via MTP.


text:
How to prevent child from calling friends?
Even when the phone is locked to the maximum extent (bedtime on Google Family Link / Huawei parental controls), children are able to call friends. This is not what I want, especially during nights.
I have spent a lot of time on looking for a solution. This seems like something easy to implement (even locking the whole dialer app), however it looks like one would have to root the device to achieve this.
I found one trail, MMGuardian, that claims to allow contacts white list, but this is paid software and I'm looking for a free solution.
There is a Google topic about this, on which a lot of people voted.
How come such a seemingly obvious functionality is not available?

I haven't been able to test this (due to a lack of that setting on my daughter's card), but it seems one can achieve it by setting FDN (fixed dialing number) - a SIM setting, though changing it doesn't seem very easy comparing to other parental controls.

Fixed Dialing Number (FDN) is a service mode of a GSM mobile phone's SIM card. Numbers are added to the FDN list, and when activated, FDN restricts outgoing calls to only those numbers listed, or to numbers with certain prefixes. A notable exception is that emergency calls to 000, 112, 911, 999 and the like are exempt. Incoming calls are not blocked by FDN.
One practical application of FDN is for parents to restrict the phone numbers their children can dial. The SIM card's PIN2 must be entered beforehand or when applying such settings.


text:
Count time difference between some date time in the future and the current time in Automate
I am struggling to count the time difference between the next new year, 0 o'clock at January 1 and the current time and to obtain the number of days, hours, minutes and seconds.
According to the LlamaLabs help, Now gives a unix timestamp for the current time and date() a timestamp of for the specified time date.
However, computing the number of days, hours etc. in the obvious way from the timestamps doesn't yield the expected result.
I also don't find appropriate blocks for the flow.
How would you solve that in Automate?

"I am struggling to compte the time difference between the next new year, 0 at January 1 and the current time and to obtain the number of days, hours, minutes and seconds." I am struggling to understand this sentence especially the "0 at January 1". Can you explain it better with a more understandable example?

Changed to "0 o'clock at January 1". The beginning of the new year, but it should not really matter.

You can try the steps described below.
Explanation
We add a variable called nextyear whose initial value is derived from extracting the year from the current date and time, then adding 1 to get next year (Step 1). We then parse it to a date (Step 2). We calculate the difference between the two date using durationFormat function (Step 3). Then, optionally display the result (Step 4).

Add Variable set block

Variable: nextyear
Value: dateFormat(Now, "yyyy") + 1

Add Variable set block

Variable: nextyear
Value: dateParse(nextyear ++ "/01/01 00:00:00", "yyy/MM/dd hh:mm:ss")

Add Variable set block

Variable: diff
Value: durationFormat(nextyear - Now, "dd H'h'm'm's's")

(optional) Add Toast show block

Message: diff


text:
How to let Emacs open and display a file in directory /storage/emulated/0/?
I am using Samsung Galaxy S10+ on Android 12. From F-Droid, I have downloaded and installed Emacs. It can run directly on Android, not via Termux. In the internal storage of my phone, I have created a file /storage/emulated/0/WE_test01.txt. By using the X-plore text editor, I have written 2 lines:
asd
123

Then, this file is to be opened by Emacs. I hit on the Emacs icon and typed C-x C-f, and in the bottom line /storage/emulated/0/WE_test01.txt.
The response of Emacs is

File is not readable

What have I done wrong?

When talking about third party apps please always include the link to the app in the store you got it from.

Looks like the screenshot images are not posted or linked.

I had the same issue. There are, according to the SourceForge repo's FAQ, 3 ways. Since I wanted to use the full disk, I utilized Special app access:
Settings -> Apps -> ... menu -> Special access -> All files access -> Emacs (toggle)
If you want to allow only specific locations, use this interactive func: M-x android-request-directory-access
Also, if you feel comfortable installing it / have means to verify its integrity, install the APK from SourceForge because it has GnuTLS unlike the one from F-Droid (which has none, zero, plain HTTP, iirc but feel free to correct me).


text:
What Google services does WhatsApp depends on?
WhatsApp is the only Google-dependent app on my phone. I was removing various Google services from it with adb and as a result, WhatsApp is the only app that doesn't work - it crashes instantly on any interaction.
My fault is that I don't remember all the services I uninstalled, but here are some:
gsf, gms, gmsconfig.asi, gmsconfig.gsa, gmsconfig.comms, and more.
Which Google services does WhatsApp depend on? Maybe I would just sideload them for the time I plan to use WhatsApp.

At the very least, I believe the "Google Play Services" app is used for push notifications using FCM.

See logcat when the app crashes.


text:
Why would enabling or disabling AdGuard for Android change my public IP?
Since I just set up a VPN to my home server, I performed various tests and I found that, when I'm on cellular data, enabling or disabling AdGuard for Android (paid version) changes the IP detected by whatismyip.com or ipleak.net.
Since I'm on mobile, neither one obviously matches my home IP.
Today with AdGuard, for example, I could get 77.63.3.x which belongs to KPN, my provider, and an IPv6 address as well. Without AdGuard my IP is 77.63.6.x, again from KPN, but located in Utrecht.
Another day the difference was "bigger", not even the first byte of the IPv4 matched.
AdGuard is set to use a local VPN, since my Android is not rooted.

Does either of those addresses at least match what your mobile carrier would use? What do online WHOIS lookups report about both addresses?

A VPN works by routing all your traffic through the VPN service before it connects to the rest of the internet. As an example, one might live in Denmark, connect to a VPN, and to the outside world, your IP could be from a server in Japan.

@user1686 Added the info. All addresses belong to the mobile carrier I use.

Hmm, especially when it comes to mobile carriers, I really don't trust the third-party geolocation DBs – the same address might be used in Utrecht one week, Rotterdam the other week, if KPN so decides… (and similarly regarding 'first byte', address allocation in IPv4 is so fragmented that a single carrier might have dozens of seemingly-unrelated prefixes.) So if both addresses belong to your carrier, I'm tempted to say that's just how AdGuard works, specifically the "pseudo VPN" mechanism that it has to use on non-rooted devices.

(That is, it has to intercept the TCP connections without any help from the OS, and make new connections and proxy the data through...) Without knowing how KPN works, I can't rule out the possibility that it doesn't assign addresses to individual customers at all, but only has a large NAT pool where each connection can potentially get a different address. Do you get the same IP address if you check through different mobile browsers (e.g. Firefox vs not-Firefox)?

Same IP with different browsers, but I understand it may not matter after all.


text:
Why is there a blank space between app icons on App screen (launcher)?
There's a blank spot between my apps on the App screen of the Samsung Galaxy S23. I'm confused about it.

There are two possibilities.

You accidentally shifted the icon or accidentally removed it from the home screen.
The app that was there has updated and moved elsewhere.  Sometimes, when an app updates, it has a different signature and parts of the OS/firmware can't match it with the original.

FYI, the original title was about the App screen (launcher), but mistakenly edited to the Home screen.


text:
Is it safe to use a phone while charging it with a powerbank?
Is it safe to use a phone while charging it using a power bank or is it as dangerous while using it with a charging cable?

It is perfectly safe to use the phone while it is being charged.  If the battery is very depleted, the phone may get a bit warm to hot.  This is normal, but do not cover it with any material.
It is definitely not a good idea to put in under the pillow while it is charging.


text:
Managed profile apps not appearing in recents
On a device running Android 13 (LineageOS 20), I created a managed user profile to separate work apps from the primary user's personal apps:
pm create-user --profileOf 0 --managed Work

Also applied a few restrictions to limit privileges in the work profile:
pm set-user-restriction --user 10 no_sms 1
pm set-user-restriction --user 10 no_outgoing_calls 1
pm set-user-restriction --user 10 no_config_location 1
pm set-user-restriction --user 10 no_config_wifi 1
pm set-user-restriction --user 10 no_config_bluetooth 1
pm set-user-restriction --user 10 no_config_mobile_networks 1

(Reference: android.os.UserManager)
The work profile got successfully created and appeared in settings, and its apps as a second tab in the launcher. I kept the bare minimum set of system apps (pm uninstall --user 10) and moved work-related apps to the work profile (pm install-existing --user 10) and everything seems to work fine.
But there is a problem - If I minimise any app from the work profile and go to recent apps, I only see apps from my main profile (user ID 0) but the apps from my managed profile (with the  icon) do not appear at all. But if I tap on the app in the launcher, it does resume exactly where I minimised it, which indicates that the app is running.
I am able to see entries appearing in /data/system_ce/10/recent_tasks for minimised apps however the snapshots folder stays empty for some reason.
Another observation is that when I create a managed profile using an app like Island, all its apps do appear in the recents. I am unable to figure out what to do to make it work with the manually created managed profile. I have already tried setting allow_parent_profile_app_linking to true but it didn't fix it.


text:
Recover WhatsApp chat history using crypt14 file
I tried to restore WhatsApp chat history using the crypt14 file following the steps on the WhatsApp page (https://faq.whatsapp.com/6181521285295518/?helpref=hc_fnav&cms_platform=android&cms_id=6181521285295518&draft=true), the backup file is detected by WhatsApp, the restoration process ends, but at the end a message appears stating that it was not possible to restore the conversation history. Can someone help me please? I even tried to put other folders from the WhatsApp folder that I had saved in the WhatsApp folder (Media, Backups, etc.), but it still didn't work. I don't have a backup on Google Drive, so there is no such restore option. Thanks in advance.


text:
Earbud as a microphone and phone/tablet as a speaker
Basically, I want my earbud to serve as a bluetooth microphone then connect it to my tablet to serve as a speaker. Is it possible to do this?

speakers can't work as microphones https://www.ac3filter.net/can-speakers-be-used-as-microphones

Speakers in the old telephone (POTS) could have been used this way (because they were constructed differently). Modern earbuds, microphones and speakers are of a different construction.  Even if you could get them to work in a reverse fashion, they wont be very good.  They havent been designed for that.  The dynamic range and sound quality would be terrible.
Just buy headphones with microphones.  You can get over the ear, around the ear versions.  Cheap ones are not that expensive and will still give you better quality sound than your current thinking..


text:
How to get Vertical navigation in recent apps on my Pixel 6
This question has already been asked several times in 2018 and 2020, but all the answers are outdated.
I want my vertically scrolling recent apps switcher back. It is so much better than the native horizontal switching: you can see 5 apps at the time and it scrolls smoothly; if the app is a bit further away switching can be literally 10x as fast.
I can't get it to work with Nova Launcher, and the Good Lock solution is only for Galaxy phones.
Who can help me?


text:
How to force Motorola's Ready For to show up on the phone screen?
TL;DR
Is there any way to force a Motorola phone to launch the desktop mode on the phone itself instead of relying on the Windows app?
What Ready For is
Ready For is Motorola's desktop mode (Like Samsung's Dex). It's not a separate launcher and there are three ways of connecting to it normally:

Directly connecting to a monitor through HDMI
Connecting to a Windows PC through an App from Microsoft's app store
Connecting through WiFi to a compatible monitor or TV.

Why I need this

My specific phone model (Edge 40) can't connect through HDMI (and I'm still mad about it).
My personal computer is Linux and they don't offer a Linux app.
My job computer is Windows, but Microsoft's app store is blocked in it.

What I want to do instead
If I could somehow force desktop mode on the phone itself, I could then use scrcpy to share the screen both on Windows and Linux to work with it.
Thanks
Edit
I was able to install Ready For on my job computer through winget. Unfortunately, it seems Motorola's screen casting solution is not well ironed out yet and it's extremely slow.
Good news though is that I was able to capture Ready For's desktop on scrcpy as it is detected as a hidden second display.
This sort of resolves my ultimate objective (on Windows at least), but does not answer my question, so I'll keep it here instead of in a dedicate answer.

You could try to manually download the .appx/ .AppxBundle file and install it manually on the Windows computer. Usually companies only block the store, not the appx installation.

Thanks, @Robert. I'll try that out later on. How do I download the .appx? If I try the store on a browser, it redirects to the desktop store (the "install" button uses ms-windows-store protocol that directly opens the store and not an HTTP URL)

There are third party programs available which can download appx programs from MS store. See e.g. here: https://woshub.com/how-to-download-appx-installation-file-for-any-windows-store-app/

Alright, thanks! I'll check it out

That worked. It will work great for Windows, thanks! It's slower than scrcpy, but it's an almost complete desktop environment feeling. Now, for Linux I guess only way to do it would be a proper answer to the question...


text:
AOSP: What makes LineageOS Setup Wizard run in LockTask mode?
I have noticed that when you flash a device and run it for the first time you get into the setup wizard. I assume that application is being run in so called LockTask mode (Kiosk mode for dedicated devices) because it has only one navbar button (usually "back" button is the only displayed button, "home" and "recents" buttons are hidden).
Here are my questions:

Does setup wizard actually run in Kiosk mode? If yes, how to implement this? (I didn't find anything in LineageOS sources)

If no, what is the way of partially disabling navbar buttons?

This question has been cross-posted to Stackoverflow. Have you tried to extract the setup wizard apk file from the device and decompile it to see if you can find how it works?

Please note that app development is off-topic since Android Enthusiasts focuses on end-users and power users (who are not necessarily developers) solving their issues. Thus, while this community might explain the technicality of Android OS to your queries, coding solutions are out of the scope of this community. For programming questions, [so] should be a more suitable site.


text:
Cannot change OEM unlocking
I recently installed a Pixel Experience Custom ROM on my phone. After that, for some reason, I decided to block flashing on my phone and this caused message to appear every time I boot my phone: Your Device Is Corrupt,It cant be trusted and will not BOOT visit this link on another device motorola.com/unlockbootloader.
I followed the instructions on this page and it resulted in this: fastboot oem unlock (bootloader) Check 'OEM unlocking' in Android Settings > Developer (bootloader) Options OKAY [ 0.013s] Finished. Total time: 0.013s. but I can't change this setting because I'm not able to enter the system. What can i do in this situation ?

You never EVER enable OEM unlocking or try to lock the bootloader with a custom firmware... Without being able to boot the system, you can't OEM unlock however I believe you using the wrong command, it is usually "fastboot flashing unlock" in Pixel devices. If it is truly back in a locked and OEM locked state, you can try to flash the stock ROM with the Motorola recovery tool, but I suspect it is now bricked... It would probably be helpful you mentioned the specific device though.

I think you forgot to link the page?


text:
Phone only boots into twrp
I Have samsung note 20, after flashing twrp and vbmeta file  my phone only boots into twrp. have tried the key combinations but with no help. how do i restore it to stock firmware when it only boots to twrp?
Please help


text:
Do I need to use a physical security key if already use Passkeys?
If I use Passkeys, do I need to enable 2fa and mfa or a physical security key?

Short answer: you don't need to.
Passkeys are FIDO credentials, the way you unlock your Passkey is up to the platform managing your Passkeys, eg. if your passkeys are managed by Google Password Manager on your Android phone, it will prompt for the method you would like to authenticate: it can be a hardware key like a Yubikey, or it can be your fingerprint, or any biometrics. On Apple phones it usually is the Face ID (and probably only that).
2FA (2-Factor Authentication) and MFA (Multi-Factor Authentication) are both ways that service providers use to enforce multiple authentication steps, they can also be completely unrelated to FIDO2 and Passkeys (eg. first step username & password, second step QR Code or magic link). A service provider could also enforce a security key / biometrics authentication (it can be a passkey authentication) as the only step to login (but I haven't seen many so far).
Hope I have clarified your question a little bit.


text:
Samsung Galaxy S10e restarts when turning on hotspot
My Samsung Galaxy S10e restarts when I turn on the hotspot.
I have checked for updates but they are not available.
How can I fix it?

If your S10e has internet access why do you start Hotspot to check for updates?

Sounds like a hardware issue to me. I have the same phone, but I've never experienced that, neither on stock or modified roms. Try factory resetting the phone and let it update to the latest available version. If it still happens, bad news.


text:
Unfortunately, the process android.process.media has stopped
There are frequent messages like this on a Samsung Galaxy Note 3 with Android 5.0. Factory reset didn't help. Can anybody suggest a solution? I have studied this post by the way.

Unfortunately, the process android.process.media has stopped.

Does the error directly occur after factory reset or did you already install other apps? Because this error can be caused by corrupt media files (images, audio, video,...).

@Robert I have done factory reset multiple times and as far as I remember, it starts after a while. So I guess it is observed after installing some app.

Note that there are several security vulnerabilities known that attack the media store scanner (which should be the process that is affected in your case) using modified files. The attacker can get root access by this, so be careful what you do with such an old phone...

@Robert Thanks. That was a great warning.

As @Robert commented:

Note that there are several security vulnerabilities known that attack the media store scanner (which should be the process that is affected in your case) using modified files. The attacker can get root access by this, so be careful what you do with such an old phone...

Following the above comment, I did a factory reset and installed a few trusted apps only. The error was resolved and didn't happen again.


text:
YABLS? (Yet Another Boot Loop Snafu?)
So I have read through quite a few bootloop posts but still haven't managed to resolve my issue (am very close to trying oden 2 linux...).
Device: samsung galaxy tab a (sm-t350)
what I did: Using heimdall I sucessfully flashed twrp to my tablet. Noticed I had forgotten to dl the rom (lineage retiredtab) so booted into stock android, downloaded the rom, then booted back into twrp and flashed the lineage retiredtab rom, then rebooted.
What happened: when i rebooted I am stuck in a bootloop i guess? and no matter what I do i can't seem to do anything other than reboot and boot into "odin mode". I can't boot into recovery and I can't power down.
the many of the button combinations seems to require the device be off, but as i can't power off I can't seem to use them.
What I can do: I can get to the odin mode "downloading" screen - and I can flash twrp (I just can't boot into twrp) and I can reboot - which just takes me to the lineage booting animation.

One common problem is that volume buttons break and are detected as permanently pressed by the device. Could this be the problem?

Thank you SO MUCH for the response (I'm getting desperate here). I dont think the buttons are broken, I am able to use the down vol/home/power buttons to successfully get to the ODIN MODE/Downloading screen and then use the up volume to continue (to odin mode).

no one else? Please let me know if there is any more info that I need to add?


text:
Configure ZArchiver app to continue operation on error & write log file
I use Samsung Galaxy S10+ on Android 12. In the phone, a 256 GB SD card is plugged in. A USB hub is connected to the USB-C OTG of the phone. In a USB-A, the USB stick is plugged in. For the target, I use Transcend 512 GB with blue status LED formatted FAT32. Now, due to the worsening in Android, most apps are no longer able to write to USB.
After many days of googling and trying, I have found ZArchiver. It can write to USB. The problem is: when ZArchiver on the source device finds an object it cannot read, ZArchiver finishes and displays the error message

... .nomedia ... open failed.

I need to set up ZArchiver to continue copying and to write the error message into a log file.
Some more details.

I have repeated all, again I have chosen "copy" (but not compress).
In one window, the SD card source device /storage/3530-3234/ is marked all (which are the displayed directories directly below /storage/3530-3234).
In the other window, the target /mnt/media_rw/1D!A-1692/. This is empty.
ZArchiver is working and displays the directory it is working on, always the directory directly below of /storage/3530-3234/, no subdirectories. And it displays the progress: e.g. 25% in 5 minutes. That seems to be too fast. On the SD card source device, 81 GB of 238 GB is used. Other apps take many hours. After 7 minutes, ZArchiver aborted with an error message:

Action completed with errors

This is not followed by a long list, but by only one event:
.nomedia

1 storage/3530/-3234/Android/data/.nomedia: open failed: ENDENT (No such file or directory)

In the target, 18 directories (direct below /storage/3530-3234/) were created. These are correct copies, including subdirs and files.

I have repeated all, and now I have chosen "compress 7z" (but not copy).
ZArchiver is working and displays the directory it is working on, always the directory directly below of /storage/3530-3234/, no subdirectories. And it displays the progress. After some time, ZArchiver aborted with an error message:

Action completed with errors

This is followed by a long list:
3530-3234.7z

1 errno=2: No such file or dir:
Android/data!com.google.androud.apps.maps/
...
101 errno=2: No such file ...

In this list, it doesn't include .nomedia.
In the target, only one directory was created: .HhT... (encrypted). This directory contains one file:
.nomedia
512 B  08.01.24 22:00


text:
Video speed control for all apps, is it possible?
I have a password manager that can input data no matter the app. It is phone level. I'd like there to be a way to speed up videos on apps that don't enable it.
To watch videos more quickly, I have to use this random Kiwi Browser because that's the only one I've found that allows Chrome browser extensions. For some reason, Chrome on Android doesn't allow them. Then I have to watch in Desktop mode. I do this for HBO and Hulu, but it's inconvenient, and also tonight the Hulu videos are refusing to play except on the app.
Is it possible to have a system-wide video speed override app, or like an accessibility feature? That would be great. I have the accessibility widget guy enabled in my corner because you never know when you'll want to zoom in on an app that doesn't allow it.
Anyway, does anybody know any more hacks to get more video speed?


text:
Re-encoding with ffmpeg fails on Android
I have the following command that fails when running on an Android device. I don't think it's related to the overlaying part but to the re-encoding of the video. This same command works perfectly on iOS.
ffmpeg -y -i "video-file.mp4" -framerate 60.0 -i "%05d.png" -filter_complex "[0:v][1:v]overlay" "output-video-file.mp4"

The error that I am getting is the following.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video-file.mp4':
Metadata:
  compatible_brands: isommp41mp42
  major_brand     : mp42
  minor_version   : 1
  creation_time   : 2024-01-03T20:44:54.729000Z
  encoder         : Lavf60.3.100
Duration: 00:00:25.30, start: 0.000000, bitrate: 8586 kb/s
Stream #0:0[0x1](und): Video: hevc (hvc1 / 0x31637668), yuv420p(tv, bt709), 1280x720, 8509 kb/s, 59.91 fps, 60 tbr, 19200 tbn (default)
  Metadata:
    creation_time   : 2024-01-03T20:44:54.000000Z
    handler_name    : Core Media Video
    vendor_id       : [0][0][0][0]
Stream #0:1[0x2](und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 62 kb/s (default)
  Metadata:
    creation_time   : 2024-01-03T20:44:54.000000Z
    handler_name    : Core Media Audio
    vendor_id       : [0][0][0][0]
Input #1, image2, from '%05d.png':
Duration: 00:00:01.00, start: 0.000000, bitrate: N/A
Stream #1:0: Video: png, rgba(pc), 1280x720, 5 fps, 5 tbr, 5 tbn
Stream mapping:
Stream #0:0 (hevc) -> overlay (graph 0)
Stream #1:0 (png) -> overlay (graph 0)
overlay:default (graph 0) -> Stream #0:0 (h264_mediacodec)
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264_mediacodec @ 0xb400007a3e6347e0] Use 1 as the default MediaFormat i-frame-interval, please set gop_size properly (>= fps)
[amediacodec @ 0xb400007a1c9427f0] android.media.MediaCodec$CodecException: Error 0xffffffc3
[h264_mediacodec @ 0xb400007a3e6347e0] MediaCodec configure failed, Generic error in an external library
[vost#0:0/h264_mediacodec @ 0xb400007a2c8a4490] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[aac @ 0xb400007a3e85b6a0] Qavg: 169.544
[aac @ 0xb400007a3e85b6a0] 2 frames left in the queue on closing

For some reason, the default encoder is h264_mediacodec. According to the comment to the following question, it looks like h264_mediacodec only works if ffmpeg is called from some JVM context. Try selecting other encoder using -c:v argument. I don't know which video encoders are enabled by FFmpeg for Android, and I can't see it in your post (you didn't post FFmpeg banner).

@Rotem Thank you. I've used -vcodec libx265 and it's working now. One follow-up question: Is there a command to get the video encoders available on a particular Android device? I see the -encoders option but I am hoping maybe there is a comamnd that outputs just the video encoders without any other characters so it is easier to parse. And what other popular encoders should I look for to use if x265 is not available?

As far as I know, there is no option to get a list of encoders in simple format. We may also take a look at the build flags, as --enable-libx264 --enable-libx265... The fact that an encoder is in the list doesn't mean that it is going to work (as in the case of h264_mediacodec). I don't have experience with FFmpeg on Android, and I don't know the popular encoders that are enabled in Android.


text:
Why does screen of my phone stay on when listening to Spotify in my car?
Lately I have noticed that when I listen to Spotify while my phone is connected via Bluetooth to the car's speakers, the phone's screen is kept turned on indefinitely. Some specifics:

The phone is Samsung Galaxy S23 Ultra
The car is Skoda with Columbus infotainment system
Phone is charging via USB-C cable
Car supports wireless charging when phone is in the locker, but I keep it on the locker's lid and it looks like it never charges wirelessly
I'm unsure if the problem is only with Spotify or will it happen with other apps as well (need to check)

Where should I search for the settings to turn this "feature" off? Screen is configured to switch off in 2 minutes. I found no settings in Spotify nor in my car's setup to control the phone's screen.

Some phones tend to override the power saving settings while charging. Not really a problem because you can simply press the power button to turn the screen off. It has nothing to do with whatever device it is connected to and makes no sense whatsoever to try to find any related setting in the car.


text:
Access denied on external storage: application not found
I purchased an Android car head unit (K4811) and I cannot access a USB storage device that I plug in (32 GB, FAT32 or exFAT).
I think that this comes from the absence of a program allowing elevation of rights, because by downloading FileManager+, when I select the USB key, I obtain this message:

But if I click "OK", I get the error "Application not found":

I tried from the Google "Files" application, it shows me that I have to "Tap to give File access":

If I do, I get an "Access denied":

If I click on the notification that appears when plugging in the USB key:

This opens the basic file explorer in which the USB key does not even appear.
Do you have any idea where this could come from? If an application allowing rights elevation is missing, is it possible to download it? I will be able to pass it by another means than a USB key.
My goal is to access the files on an external USB storage key.
EDIT
The application has storage access rights according to Android settings:

Go to settings > apps > permissions and set it per app. https://support.google.com/googleplay/answer/9431959?hl=en

@ChanganAuto Sorry, I forgot to specify that the application does have storage access rights according to the Android settings.
The app works fine on internal storage, but not on USB.

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.

@Community Thanks for your feedback, I edited the question to add precisely the goal that I want to achieve.


text:
How to turn Google Keep Check List into Google Task List
Before the advent of the updated Google Task feature I kept some to do lists in Google Keep, which supports a list of tasks and their check boxes.
Google Task lists have the advantage of allowing subtasks under a main task, something that Keep doesnt (to my knowledge).
Is there a quick way to covert those Keep Task lists into a new Google Task list?


text:
Refresh web page with Google assistant
Is there a command to make it refresh the web page currently shown in the browser on my phone? I tried multiple variations of "Hey Google ... Refresh the web page" but it instead shows me search results or opens Wikipedia. Argh. Want this to refresh it when I have dirty hands, so no touching, must be just voice.

I don't know if Google Assistant can refresh the web page or not since it must interact with the app directly, but Voice Access accessibility can do this by saying e.g. "(Tap) More - (Tap) Refresh" on Chrome, if this is an acceptable workaround.

@AndrewT. Yes, that's acceptable. Didn't know that exists and had to turn it on first, and it keeps misunderstanding me most of the time, but it works.

@AndrewT. Should I broaden the question to more than Google assistant solutions (if I understand correctly, Voice Access isn't part of assistant).

I think so, since if I understand the situation correctly, what you actually want is to use voice command, not necessarily Google Assistant?

This article from ComputerWorld seems to indicate that you can say "Reload" on the new Google Assistant on Pixel 4 and up. Fair warning, I tried this on my Pixel 8 Pro though, and I was unable to get it to work for me.

All right, fair warning: The rest of these commands are connected specifically to that "new" Assistant we were just talking about. Google had originally said that would be making its way to more Android devices sometime in 2020, but as far as I'm aware, it's still for some reason available only on those aforementioned Pixel phones. So unless you've got one of those devices (or your non-Pixel phone is a lucky exception to the rule), these remaining options probably won't work for you.
For those of us in the Pixel-4-and-up camp, though, some especially powerful browser-manipulating possibilities are out there and just waiting to be used. And I don't know about you, but I had completely forgotten about all of them up until just now.
So refresh your noggin with me, you silly, silly sea fish. To start, while viewing any site within Chrome on your phone, make yourself a mental note that you can hop around the browser by bringing up Assistant and saying any of the following phrases:

Go back
Go forward
Reload
Bookmark this page

As a (bad) workaround, you could ask the Assistant to open the same URL of the page you're on, although this admittedly works best for simply-accessed pages (such as facebook.com or reddit.com, where the content you're after is at an easily requestable URL).


text:
How can apps hide their content on recent apps screen?
Does anybody know what exactly a functionality is in recent apps, means I have seen in Android 13 that when any of the payment apps is in the recent apps screen, then one blank screen is there along with a closed eye icon and a text showing "App content hidden", irrespective of the app lock, means it is locked or not.

If anybody knows what exactly it is in Android, then please let me know.

Welcome to the Q&A site Android Enthusiasts Stack Exchange. Please note that app development is off-topic since Android Enthusiasts focuses on end-users and power users (who are not necessarily developers) solving their issues. Thus, while this community might explain the technicality of Android OS to your queries, coding solutions are out of the scope of this community. For programming questions, you might want to try our sister site [so].

That said, I'd assume it's the FLAG_SECURE, similar to How can I take on-device screenshots of "secure" apps?

Or possibly using FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS.


text:
Can't open Google Takeout backup files on Android
I am running Android 12 on a Realme 8 phone. Recently, I've downloaded some Google Takeout backup files I created at the Google Takeout site, to my Android device. Here are some screenshots.

However, as the attached images demonstrate, I was unable to open the files on my Android device.
How can I open them on Android directly?

I think you're supposed to that in a desktop computer (Windows, maybe others). But depending on the file type you selected when exporting there are apps that can unpack it, especially if it was .zip. Most mainstream phones' File Managers support it natively. What you can or can't do with the extract content in an Android phone I'm not sure. For the other format just google "tgz file extractor android".

The screenshots unfortunately don't show the file type. But if it is a ZIP file then the ZIP file will be most likely in ZIP64 format as it is larger than 2GB. Not every ZIP capable program is ZIP64 capable. When searching for a program how open the ZIP file with then make sure it has ZIP64 support.

These are .zip files by default, so you'll need an app that can handle this type of file. There are plenty available on the Play Store, most of which can handle the .zip and .tgz files that can be output by Takeout. I've preferred X-plore File manager for a long time, because it allows you to browse inside them without un-zipping, but I'm sure there are plenty of others with this functionality too.


text:
What happens when you fail to pay your Google One subscription?
I do all of the following from my Android phone. I use access to 100GB of storage with my Google One subscription, of which I have used, roughly, 75GB. The default amount of Google storage is 15GB. By paying, a minimal amount, I have my cloud storage quota increased to 100GB. However, it may happen that when the automatic payment is processed, the funds are not available on my card.
Someone suggested that in this case some of your files may not be available, and they may appear deleted.
Is this the case? What happens to your files, and how does file access/inaccessibility present itself when payment fails?

There was an interesting question asked on WebApps StackExchange about this.
I'll just quote the important part:

if you exceed your storage quota for 2 years, your content across Gmail, Drive, and
Photos may be deleted. Gmail You can’t send or receive messages.
Messages sent to you are returned to the sender. Google Drive You
can’t sync or upload new files. You can’t create new files in Google
Docs, Sheets, Slides, Drawings, Forms, and Jamboard. Until you reduce
the amount of storage you use, neither you nor anyone else can edit or
copy your affected files. Syncs stop between your computer's Google
Drive folder and My Drive. Google Photos
You can’t back up any photos or videos. If you want to add any more
photos and videos,

Current google support Link of the same


text:
How can I mount an SD card as internal storage on Motorola Moto G Play 2023?
I have a Motorola Moto G Play 2023 (maui), Android 12, rooted through Magisk. It only comes with 32GB of storage, so I bought an SD card to hold more apps. Unfortunately, Motorola has decided that the Android version that ships with my phone shouldn't be able to merge an SD card as internal storage. Is there any way to either

get around this, or
just mount the SD card as internal storage?

https://www.lifewire.com/set-sd-card-as-default-android-6743109

@ChanganAuto, why not flesh it out and make it an answer?

@ChanganAuto That does not solve my problem. As I stated in the post, Motorola has disabled the option to format an SD card as internal storage. Thank you for trying though!

How to bind mount a folder inside /sdcard with correct permissions?


text:
Where's Lamedh in Gboard's Hebrew Keyboard?
I'm trying to type Hebrew into Duolingo on the Android app, and I'm mostly able to use the Gboard keyboard.
However, it appears to be missing the letter Lamedh.
Here's a sample screencap of the keyboard in use:

Now, I don't speak Hebrew, and I'm new to Gboard, but am I correct in that this letter isn't present?
It's preventing me from typing many common Hebrew words, so I'm guessing I'm missing something. Is it there but in a font or style I'm just not seeing?

I don't speak Hebrew. However, the character you are looking for is not missing from Gboard Hebrew keyboard.
It's located on the 2nd row, 3rd character from the right. This is the result after pressing it: ל.


text:
'sideways' Android app crashing on rooted Samsung Galaxy S5 on Android 6.0.1
I have a rooted Samsung Galaxy S5 on Android 6.0.1 and am trying to open the sideways app (package name: com.bolito2.rallygo). When opening the app, the message "Unfortunately, sideways has stopped."
I have tried restarting my phone and reinstalling the app, both which do not work. I also tried opening the app before rooting the phone in order to get the log.
Using Matlog, I have recorded the log of the app crashing which is available here:
https://drive.google.com/drive/folders/1xsT-7wXJfv9jbPtcE7a5JRjye9gV6cnh?usp=sharing
Can anyone please advise why the app is crashing?


text:
Set up an Android device to only access Google Docs
I would like to create a dedicated word processing device that can only access Google Docs (and possibly Google Drive) and nothing more. The idea is to configure it to be completely free of any other distraction. Is it possible to set up an Android device this way?


text:
DAC/AMP & 'Audio Accessory Mode' in Samsung NOTE 8
I have a Samsung NOTE 8 (SM-N9500 Android 9).
I have recently tried the Cyrus Soundkey USB DAC/AMP with it and it is excellent for music.
However, with phone calls, the Note 8 sends the audio to its built-in speaker/earpiece instead of sending it to the Soundkey. I even tried to force output to USB DAC with 'lesser audioswitch' with no success (see video).
In contrast, the Samsung Note 8 comes with USB-C earphones which can handle both music and calls.
I am guessing that these earphones work in 'Audio Accessory Mode' ie. analogue audio straight through USB.
If my assumption is correct :

Why does the Note 8 need to even use analogue output for phone calls when it can output digital audio via USB? Can't the phone call just be routed via a digital path?
Is there a way to disable 'Audio Accessory Mode' and force the Note 8 to use pure digital output for everything including phone calls?
Is there a device that can handle concurrently 'Audio Accessory Mode' and also be a DAC/AMP?

UPDATE #1
I also tried a phone call with the Cyrus Soundkey and a Galaxy A53 (Android 12) phone and it works perfectly! The audio is routed to the DAC and the mic used is the built-in mic inside the phone.
So Soundkey is NOT the problem... it must be the android device.

Perhaps its because you are not supposed to record phone calls, which you could do with high fidelity, if it did what you want.

The Note 8 already has a 3.5mm audio socket, which can be used to record. The 'Audio Accessory Mode' via USB outputs the exact same analogue signal as 3.5mm. If your hypothesis had any truth in it, the phone would also stop me from using my 3.5mm socket.

Devices sold with Google Play Services only need to comply with the version of the Android Compatibility Definition Document (CDD) at the point of initial release rather than any subsequent OS version updates.
So based on GSM Arena's entry on Samsung Note 8 the device was originally sold in 2017 with Android 7.1.1 Nougat. Checking the CDD for Android 7.1 audio output section shows a limited number of requirements.
Now compared with Samsung Galaxy A53 which was released in 2022 with Android 12. Checking the CDD for Android 12 there is a specific section for Digital Audio Ports which may explain the higher compatibility with third party USB digital audio devices.
TLDR: While USB-C audio support started to appear on Android devices before 2017 manufacturers were not obligated until Android 10 CDD, Section 7.8.2.2. Digital Audio Ports regarding compatibility with USB headset interfaces. Sadly older devices probably will not gain compatibility as effort and expense would need to be made by the manufacturer for appropriate audio channel routing.

I read you. However, my main question revolves around comparing and contrasting the behavior of the Note 8 phone calls with a DAC vs USB-C headphones supplied with the Note 8.

'Audio Adapter Accessory Mode' appears in A8 section 7.7.2. USB host mode "STRONGLY RECOMMENDED to NOT support Audio Adapter Accessory Mode as described in the Appendix A of the USB Type-C Cable and Connector Specification Revision 1.2." This suggests that Note 8 does support AAAM. So my questions still stand... 1. Why phone calls use AAAM but music uses DAC, 2. Can we force calls to use DAC, 3. Is there a DAC that handles AAAM?

The 1.2 USBC spec https://www.mikrocontroller.net/attachment/322860/USB_Type-C_Specification_Release_1.2.pdf, says "Analog audio headsets are supported by multiplexing four analog audio signals onto pins on the USB Type-C™ connector when in the Audio Adapter Accessory Mode.". Further "The analog audio adapter shall identify itself..." and the device's DFP port should detect it.
So again, 1. Why phone calls can only use AAAM but music can also use DAC? 2 Can we force calls to use DAC? 3. Is there a DAC that can also handle AAAM?

@conanDrum Sadly there have been reports about USB-C headphone incompatibility in the early years,: https://www.reddit.com/r/GalaxyNote8/comments/9y5b81/note_8_doesnt_support_usbc_headphones/ and in one of the comments a link to a YouTube video describing the issue: https://youtu.be/Ly-bSBHOSIo with different devices. Presenter did mention the need to enable USB power, I don't know if that is an option or not.

Thanks for spending the time Morrison. However, please remember that I have an analogue USBC headset that works (music & calls) and a USBC DAC with earphones that also work (but not with calls).
Having said that, it looks to be the case that only the manufacturer knows how they executed their implementation. What I would really like to know is why calls do not go to the DAC? Is it because the DAC does not provide a mic? Is it because the phone call encoding is not compatible? what is it? That's what I wanna know. :)

@conanDrum Realize that unless there is specific marketing/documentation stating that the Note 9 supported USB-C DAC headphones it could just be as simple as 'device has 3.5mm  headphone jack for calls, not a requirement' so no work was done to connect call audio to USB audio. Which is why I'm quoting the Android CDD. Also realize the Cyrus Soundkey came out the same year as the Note 9, so if Samsung needed a popular USB DACs for testing, Cyrus wouldn't have been available, but would have for the Galaxy A53 which came out long after the disappearance of the 3.5mm jack / reqs in Android 10 CDD.

Understood. I also have an Android 13 device (car head unit), which exhibits the same behavior. All audio except phone calls go out the Soundkey. 'Disable USB Autorouting' is off (ie. autorouting is allowed). What do you think I should do in this case? (access to manufacturer is not available)


text:
./flash-all.sh not working for bricked pixel 3a (fastboot devices detected)
I had installed Ubuntu touch on my Pixel 3a, but during an OTA update the phone got soft bricked.
I am able to detect the phone through fastboot devices (using Ubuntu computer to access phone).
Tried installing sargo stock image 3 times, but without success. Still get the "no valid slot to boot" error.
Sharing the ./flash-all.sh run code below. Look forward to guidance. Thanks !

Sending 'bootloader_b' (8369 KB)                   OKAY [  0.460s]
Writing 'bootloader_b'                             (bootloader) Flashing Pack version b4s4-0.3-6622442
(bootloader) Flashing partition table for Lun = 0
(bootloader) Flashing partition xbl_b
(bootloader) Flashing partition xbl_config_b
(bootloader) Flashing partition tz_b
(bootloader) Flashing partition aop_b
(bootloader) Flashing partition hyp_b
(bootloader) Flashing partition keymaster_b
(bootloader) Flashing partition cmnlib_b
(bootloader) Flashing partition cmnlib64_b
(bootloader) Flashing partition abl_b
(bootloader) Flashing partition devcfg_b
(bootloader) Flashing partition qupfw_b
(bootloader) Flashing partition storsec_b
OKAY [  0.329s]
Finished. Total time: 1.052s
Rebooting into bootloader                          OKAY [  0.032s]
Finished. Total time: 0.133s
Sending 'radio_b' (73340 KB)                       OKAY [  3.129s]
Writing 'radio_b'                                  (bootloader) Flashing Pack version SSD:g670-00067-200702-B-6648702
(bootloader) Flashing partition modem_b
OKAY [  0.492s]
Finished. Total time: 5.906s
Rebooting into bootloader                          OKAY [  0.041s]
Finished. Total time: 0.292s
--------------------------------------------
Bootloader Version...: b4s4-0.3-6622442
Baseband Version.....: g670-00067-200702-B-6648702
Serial Number........: 9APAY1EN2K
--------------------------------------------
extracting android-info.txt (0 MB) to RAM...
Checking 'product'                                 OKAY [  0.057s]
Checking 'version-bootloader'                      OKAY [  0.058s]
Checking 'version-baseband'                        OKAY [  0.057s]
Setting current slot to 'b'                        OKAY [  0.598s]
extracting boot.img (64 MB) to disk... took 1.493s
archive does not contain 'boot.sig'
Sending 'boot_b' (65536 KB)                        OKAY [  2.800s]
Writing 'boot_b'                                   OKAY [  0.343s]
extracting dtbo.img (8 MB) to disk... took 0.135s
archive does not contain 'dtbo.sig'
Sending 'dtbo_b' (8192 KB)                         OKAY [  0.440s]
Writing 'dtbo_b'                                   OKAY [  0.122s]
archive does not contain 'dt.img'
archive does not contain 'recovery.img'
extracting vbmeta.img (0 MB) to disk... took 0.000s
archive does not contain 'vbmeta.sig'
Sending 'vbmeta_b' (4 KB)                          OKAY [  0.120s]
Writing 'vbmeta_b'                                 OKAY [  0.073s]
archive does not contain 'vbmeta_system.img'
extracting super_empty.img (0 MB) to disk... took 0.000s
Rebooting into fastboot                            OKAY [  0.060s]
< waiting for any device >
Sending 'system_b' (4 KB)                          OKAY [  0.001s]
Updating super partition                           OKAY [  0.009s]
Resizing 'product_b'                               OKAY [  0.006s]
Resizing 'system_b'                                OKAY [  0.005s]
Resizing 'vendor_b'                                OKAY [  0.006s]
archive does not contain 'boot_other.img'
archive does not contain 'odm.img'
extracting product.img (1691 MB) to disk... took 76.264s
archive does not contain 'product.sig'
Resizing 'product_b'                               OKAY [  0.006s]
Sending sparse 'product_b' 1/7 (262140 KB)         OKAY [ 11.117s]
Writing 'product_b'                                OKAY [  2.426s]
Sending sparse 'product_b' 2/7 (262140 KB)         OKAY [ 11.277s]
Writing 'product_b'                                OKAY [  1.429s]
Sending sparse 'product_b' 3/7 (262140 KB)         OKAY [ 15.422s]
Writing 'product_b'                                OKAY [  1.433s]
Sending sparse 'product_b' 4/7 (262140 KB)         OKAY [ 11.898s]
Writing 'product_b'                                OKAY [  1.408s]
Sending sparse 'product_b' 5/7 (262140 KB)         OKAY [ 12.144s]
Writing 'product_b'                                OKAY [  1.425s]
Sending sparse 'product_b' 6/7 (262140 KB)         OKAY [ 12.674s]
Writing 'product_b'                                OKAY [  1.432s]
Sending sparse 'product_b' 7/7 (158888 KB)         OKAY [  8.753s]
Writing 'product_b'                                OKAY [  0.836s]
archive does not contain 'product_services.img'
extracting system.img (786 MB) to disk... took 43.961s
archive does not contain 'system.sig'
Resizing 'system_b'                                OKAY [  0.005s]
Sending sparse 'system_b' 1/4 (262140 KB)          OKAY [ 13.143s]
Writing 'system_b'                                 OKAY [  2.450s]
Sending sparse 'system_b' 2/4 (262140 KB)          OKAY [ 13.939s]
Writing 'system_b'                                 OKAY [  1.420s]
Sending sparse 'system_b' 3/4 (262140 KB)          OKAY [ 13.836s]
Writing 'system_b'                                 OKAY [  1.440s]
Sending sparse 'system_b' 4/4 (18616 KB)           OKAY [  1.159s]
Writing 'system_b'                                 OKAY [  0.148s]
extracting system_other.img (72 MB) to disk... took 2.324s
archive does not contain 'system.sig'
Sending 'system_a' (74668 KB)                      OKAY [  3.188s]
Writing 'system_a'                                 OKAY [  0.426s]
extracting vendor.img (452 MB) to disk... took 23.394s
archive does not contain 'vendor.sig'
Resizing 'vendor_b'                                OKAY [  0.007s]
Sending sparse 'vendor_b' 1/2 (262140 KB)          OKAY [ 11.845s]
Writing 'vendor_b'                                 OKAY [  2.434s]
Sending sparse 'vendor_b' 2/2 (201044 KB)          OKAY [  9.075s]
Writing 'vendor_b'                                 OKAY [  1.161s]
archive does not contain 'vendor_other.img'
Erasing 'userdata'                                 OKAY [  0.618s]
Erase successful, but not automatically formatting.
File system type raw not supported.
Erasing 'metadata'                                 OKAY [  0.043s]
Erase successful, but not automatically formatting.
File system type raw not supported.
Rebooting                                          OKAY [  0.000s]
Finished. Total time: 340.607s

Have you tried to set manually the active boot partition like fastboot --set-active=b? (b because based on your log the stock firmware seem to be installed into slot b, you can also try to set it to a)

I did the first 3 tries without specifying the slot (the installation itself happened in slot B). Then tried Slot=all, but that too did not work. Will try --set-active= b and try again.


text:
Primary Zygote (64-bit) only starts the System Services? And all Android apps are 32-bit?
As far as I know Zygote is started by app_process64 and app_process32 where 64 is for primary zygote that starts system services because of start-system-server flag.
As we can see below in static void main method of frameworks/base/core/java/com/android/internal/os/ZygoteInit.java, it checks for start-system-server flag, run the forked System Server and exits due to return; statement below it, and never running the runSelectLoop that actually goes into infinite loop listening to connections that request to launch new applications. Only app_process32 without start-system-server flag will not enter the control statement to run the forked System Server, and instead, runs the runSelectLoop. Does it mean that all system services are inherently 64-bit while all Android apps are inherently 32-bit?
This code is from AOSP branch: Android-14.0.0_r21:
// redacted above code

zygoteServer = new ZygoteServer(isPrimaryZygote);

if (startSystemServer) {
    Runnable r = forkSystemServer(abiList, zygoteSocketName, zygoteServer);

    // {@code r == null} in the parent (zygote) process, and {@code r != null} in the
    // child (system_server) process.
    if (r != null) {
        r.run();
        return;
    }
}

Log.i(TAG, "Accepting command socket connections");

// The select loop returns early in the child process after a fork and
// loops forever in the zygote.
caller = zygoteServer.runSelectLoop(abiList);

// redacted code below

Are you sure this is not a misinterpretation? May be 64 and 32 means can execute only 64 but and can execute 32 (and 64) bit software. This would make sense as system services are defined by the manufacturer so on a 64 bit device I would assume all system services are 64 bit. But user apps can be 32 or 64 bit so the run in app_process32 (assuming the used CPU and the platform still has the 32 but capability which is not true for Google's recent Pixel phones).

The runSelectLoop will actually be run by app_process64 as well and not simply exit.
Let's take a look at this excerpt of the forkSystemServer method, called in your code snippet when startSystemServer is true, to see why:
private static Runnable forkSystemServer(String abiList, String socketName,
        ZygoteServer zygoteServer) {
    // ...

    int pid;

    try {
        // ...

        pid = Zygote.forkSystemServer(
                parsedArgs.mUid, parsedArgs.mGid,
                parsedArgs.mGids,
                parsedArgs.mRuntimeFlags,
                null,
                parsedArgs.mPermittedCapabilities,
                parsedArgs.mEffectiveCapabilities);
    } catch (IllegalArgumentException ex) {
        throw new RuntimeException(ex);
    }

    /* For child process */
    if (pid == 0) {
        // ...

        return handleSystemServerProcess(parsedArgs);
    }

    /* For parent process */
    return null;
}

I removed most of the code and kept only the relevant part for clarity.
As you can see, the method will fork the current process and return some data in the child process, while it will return null in the parent process.
This means that both the child process (system_server) and the main process (zygote64) process will continue execution in the code snippet you included in the question:
Runnable r = forkSystemServer(abiList, zygoteSocketName, zygoteServer);

// {@code r == null} in the parent (zygote) process, and {@code r != null} in the
// child (system_server) process.
if (r != null) {
    r.run();
    return;
}

Now, in the forked system_server process, the call to forkSystemServer returned some object. The process will therefore enter the if and execute r.run() before returning. zygoteServer.runSelectLoop(abiList) will therefore never be executed in the child process (system_server).
However, in the parent process, the call to forkSystemServer returned null. The process will therefore not enter the if and continue, executing zygoteServer.runSelectLoop(abiList).
This is also what is mentioned in comment in your code snippet.
In case you are not yet convinced, listing the running processes on your device will clearly show you that both zygote64 and system_server are running alongside the 32-bit version of zygote:
# ps -e | grep -E "zygote|system_server"
root           979     1 6102692  65188 do_sys_poll         0 S zygote64
root           980     1 1754948  18020 do_sys_poll         0 S zygote
system        2164   979 14310660 308548 do_epoll_wait      0 S system_server

So to finally answer the question:
No, Android applications are not inherently 32-bit.
zygote64 will be used to run 64-bit applications.

You are correct. In modern Android versions, starting with Android 8.0 (Oreo), the system_server process is started by the zygote64 process. This change was introduced to support 64-bit architectures while maintaining backward compatibility with 32-bit architectures.

As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.


text:
termux-sms-send hangs
I installed Termux using F-Droid, and the termux-api package.
When I run $termux-sms-send -n (number) text,
the command never returns, nor does it produce errors.
I press Ctrl+C to exit.
Per the advice of the internet, I ran strace termux-sms-send
which led to a long bunch of output, which eventually stopped.
Unfortunately, the output isn't something I know how to interpret.
I ran logcat, starting the first line where I saw any reference to termux-sms-send:
execute } for name="termux-sms-send" dev="dm-69" ino=29166 scontext=u:r:untrusted_app_27:s0:c53,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c53,c257,c512,c768 tclass=file app=com.termux
01-21 11:10:32.827 14275 14275 W bash    : type=1400 audit(0.0:6030): avc: granted { execute } for name="termux-sms-send" dev="dm-69" ino=29166 scontext=u:r:untrusted_app_27:s0:c53,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c53,c257,c512,c768 tclass=file app=com.termux
01-21 11:10:32.827 14275 14275 W bash    : type=1400 audit(0.0:6031): avc: granted { execute_no_trans } for path="/data/data/com.termux/files/usr/bin/termux-sms-send" dev="dm-69" ino=29166 scontext=u:r:untrusted_app_27:s0:c53,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c53,c257,c512,c768 tclass=file app=com.termux
01-21 11:10:32.827 14275 14275 W bash    : type=1400 audit(0.0:6032): avc: granted { execute } for name="dash" dev="dm-69" ino=28367 scontext=u:r:untrusted_app_27:s0:c53,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c53,c257,c512,c768 tclass=file app=com.termux
01-21 11:10:32.831 14275 14275 W termux-sms-send: type=1400 audit(0.0:6033): avc: granted { execute } for path="/data/data/com.termux/files/usr/bin/dash" dev="dm-69" ino=28367 scontext=u:r:untrusted_app_27:s0:c53,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c53,c257,c512,c768 tclass=file app=com.termux
01-21 11:10:33.253 14278 14278 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 10309 <<<<<<
01-21 11:10:33.265 14278 14278 I AndroidRuntime: Using default boot image
01-21 11:10:33.265 14278 14278 I AndroidRuntime: Leaving lock profiling enabled
01-21 11:10:33.266 14278 14278 W libc    : Access denied finding property "odsign.verification.success"
01-21 11:10:33.271 14278 14278 W app_process: ART APEX data files are untrusted.
01-21 11:10:33.271 14278 14278 I app_process: Using CollectorTypeCC GC.
01-21 11:10:33.555 14278 14278 D app_process: Time zone APEX ICU file found: /apex/com.android.tzdata/etc/icu/icu_tzdata.dat
01-21 11:10:33.555 14278 14278 D app_process: I18n APEX ICU file found: /apex/com.android.i18n/etc/icu/icudt70l.dat
01-21 11:10:33.594 14278 14278 W ziparchive: Unable to open '/data/data/com.termux/files/usr/libexec/termux-am/am.dm': No such file or directory
01-21 11:10:33.693 14278 14278 D AndroidRuntime: Calling main entry com.termux.termuxam.Am
01-21 11:10:33.715 14278 14278 I app_process: System.exit called, status: 0
01-21 11:10:33.715 14278 14278 I AndroidRuntime: VM exiting with result code 0.
01-21 11:11:00.619 14299 14299 W bash    : type=1400 audit(0.0:6080): avc: granted { execute } for name="logcat" dev="dm-69" ino=12571 scontext=u:r:untrusted_app_27:s0:c53,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c53,c257,c512,c768 tclass=file app=com.termux
01-21 11:11:00.623 14299 14299 W bash    : type=1400 audit(0.0:6081): avc: granted { execute } for name="logcat" dev="dm-69" ino=12571 scontext=u:r:untrusted_app_27:s0:c53,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c53,c257,c512,c768 tclass=file app=com.termux
01-21 11:11:00.623 14299 14299 W bash    : type=1400 audit(0.0:6082): avc: granted { execute_no_trans } for path="/data/data/com.termux/files/usr/bin/logcat" dev="dm-69" ino=12571 scontext=u:r:untrusted_app_27:s0:c53,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c53,c257,c512,c768 tclass=file app=com.termux
01-21 11:11:00.623 14299 14299 W bash    : type=1400 audit(0.0:6083): avc: granted { execute } for name="dash" dev="dm-69" ino=28367 scontext=u:r:untrusted_app_27:s0:c53,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c53,c257,c512,c768 tclass=file app=com.termux
01-21 11:11:00.623 14299 14299 W logcat  : type=1400 audit(0.0:6084): avc: granted { execute } for path="/data/data/com.termux/files/usr/bin/dash" dev="dm-69" ino=28367 scontext=u:r:untrusted_app_27:s0:c53,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c53,c257,c512,c768 tclass=file app=com.termux

I see some listings for "access denied", and untrusted_app_27,
but I don't know what to do about this.
Here is some info about my device from termux-info:
$ termux-info
Termux Variables:
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=9970
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirror.nevacloud.com/applications/termux/termux-main stable main
# x11-repo (sources.list.d/x11.list)
deb https://mirror.nevacloud.com/applications/termux/termux-x11 x11 main
# root-repo (sources.list.d/root.list)
deb https://mirror.nevacloud.com/applications/termux/termux-root root stable
Updatable packages:
All packages up to date
termux-tools version:
1.40.5
Android version:
13

How, and what, do I need to do to make termux-sms-send a trusted application?


text:
Phone only charges on fastboot mode
I bought an used Xiaomi Poco f2. I didn't charge it until I unlocked the bootloader.
In my very first charge, it made the sounds and animations that it does when normally charging, everything normal. The problem comes after a few minutes of being plugged. The phone wasn't charging in fact it was discharging faster than when staying idle.
I tried different USB cables, different bricks, fast chargers, slow chargers, plug it in a computer but the problem remains the same: when "charging" it appears as charging but actually it discharges faster than when it stays idle or even at use.

I never let the phone discharge to 0% battery.
One day I put the phone on fastboot and tried to charge it.
I leave it there until it automatically shut down (fastboot mode turned off the phone) and it charged to 60% (I used the turbo charger)

Then I thought that maybe it was a software issue so I flash it to LineageOS but the problem remains the same.

Should I replace some hardware?
Isn't odd that it only charges in fastboot?
What are your thoughts?

If its brand new, then return it.  Some phones allow you to charge devices from it.  Look at the setup to see if there is a setting for it.

The battery is probably already unhealthy, thus providing an unreliable value to the sensor, and the Android apps and processes take more battery than charging speed. You might want to try replacing the battery.

@RohitGupta used Xiaomi Poco f2 is the opposite of "brand new" ;)


text:
How do I get google assistant to work with bluetooth headsets?
I got google assistant to work on my Galaxy A12 but it only responds when I'm not not using bluetooth. How can I control my assistant via a bluetooth headset?

Did you find/follow: https://support.google.com/assistant/answer/9027902?hl=en#zippy=%2Cwireless-headphones


text:
Jitsi: How to hide right side bar (participants) in the app and mobile browser?
In Jitsi (add tag for me please), on desktop (browser, both Firefox and Chrome), I can hide the right panel (that shows all the participants) by clicking on the ">" arrow:

But I can't seem to find any such option in either the (mobile) app or mobile browser. (Or am I missing something?)
Mobile browser (Firefox, Android):

(Mobile) app (Android):

Isnt this something that you should ask Jitsi support, because it looks like thats how they have designed it?


text:
Throttle all notifications’ sound every 2 minutes
I have a lot of notifications on my phone even after I limited it only to the essential ones. I wish I could throttle their sounds every 2 minutes or so. I want notifications to appear on screen in real time but the sound would be played only if there was no other notification sound for these two minutes. Otherwise, just make one sound for all the notifications that arrived during that time. Is there any way to achieve that? I was looking into different apps but no one I could find offers this functionality.
The two minutes used here are just an example.
Kind regards and thank you for your help.


text:
What is CameraX and JetPack?
In this answer I determined that OnePlus was shipping functionality in CameraX and JetPack extensions to com.qti.chi.override.so, but what are these things and how do they compare to the Camera1 and Camera2 API that all the open source apps seem to use.

JetPack is only relevant for developers.

@Robert I don't think you can defend that statement if you can't otherwise explain to users why some Camera apps work (and can see a specific camera) and others can not. This question is here because of this comment, "How do GCam apps access this infrared camera then?" The answer is they see the camera that other applications can't because they're made with JetPack and use CameraX. And for that statement to be useful, I wanted a very little bit of that here.

To my knowledge the JetPack libraries are just wrappers that internally use the regular Android API. The focus of those libraries are ease of use and compatibility fixes for different devices and Android platforms (see e.g. the introduction of CameraX). But it doesn't get you really new functionality. Special functionality of manufacturer apps is often implemented as private API but JetPack libraries won't give you access to those APIs.

@Robert not true, the linked question has more information but OnePlus deploys the functionality for the IR camera in com.qti.chi.override.so rather than native Camera1 or Camera2. This is new functionality. And that file seems to be a part of CameraX/JetPack

A Medium article by Steven "Camera2 vs CameraX: A Comparison of Android Camera APIs" says,

One of the key differences between Camera2 and CameraX is their abstraction level. Camera2 is a low-level API that provides fine-grained control over the camera’s functionality. This makes it a good choice for developers who need to create custom camera features or fine-tune the camera settings. However, this level of control can also make Camera2 more complex and difficult to work with.
On the other hand, CameraX is a high-level API that provides a more simplified and intuitive interface for accessing the camera. It abstracts away many of the low-level details of camera functionality and provides a set of pre-defined use cases that developers can choose from. This makes CameraX a good choice for developers who want to quickly and easily integrate camera functionality into their app, without needing to worry about the low-level details of camera functionality.

According to developer.android.com,

CameraX is an addition to Jetpack that makes it easier to add camera capabilities to your app. The library provides a number of compatibility fixes and workarounds to help make the developer experience consistent across many devices.

And JetPack is described as,

a suite of libraries to help developers follow best practices, reduce boilerplate code, and write code that works consistently across Android versions and devices so that developers can focus on the code they care about.


text:
How to resize partition using TWRP, and is it safe?
I tried to flash an Android 12 GSI on my Samsung Galaxy Tab 4 8.0 (SM-T330NU) from here (system-squeak-arm32 binder 64-ab-vndklite-gogapps.img.xz), so I extracted the img file which was 1.8GB and tried to flash it not knowing there is a limit for ROM size, so it told me that the file is too large for the target device, then I found out a way to resize the system partition by going to wipe -> choose/check "System" -> resize file system, but is that safe and will it work?


text:
How to (brute-)force-kill selected background apps?
I need an automatic brute-force method for unrooted Android devices to kill selected apps that keep restarting in the background, i.e. an appropriate "automatic task killer". Ideally, such method entails a kill command running inside an indefinite loop. Two illustrative examples:

In Windows, you can run the following batch script from the command prompt:

:start
taskkill /f /im "process_name"
goto start

In Linux, you can run the following bash script from the terminal:

while true
do
    pkill -f process_name
done

What I need is an equivalent for Android, but unfortunately, I do not have any experience with programming Android applications yet.
I have tested several "task killer" apps such as SuperFreezZ, but you can only terminate processes manually with those. If Android decides to restart a terminated or frozen process against your will, the new instance is not automatically terminated, rendering all these apps useless.
Are there any apps out there that can get the job done? If not, is there a simple way to implement a background script for Android and have it run permanently?
IMPORTANT NOTE: I do not - I repeat - I do not care about CPU/memory/battery usage or any overhead caused by the task-killing app. The sole purpose is to kill selected background apps as soon as they get (re)started, be it by Android or user action. A small app or script that just keeps sending appropriate kill commands every few milliseconds would do the job (hence "brute force"). The assumption here is that one cannot prevent Android from restarting apps in the background without rooting the device, but one can keep force-closing them the moment they are launched.
For better motivation, one (out of several) use cases for me is terminating Samsung's infamous Game Optimizing Service (GOS), which cannot be uninstalled even via adb as it gets immediately reinstalled (reminiscent to malware). When terminated by the user, it gets restarted after several minutes. An appropriate task killing app would automate the termination process for the user and ensure that GOS is running only for a miniscule fraction of system run time. There are several more reasons for me to desire such solution, which I do not want to get into here as it is irrelevant to the question.

Let us continue this discussion in chat.

You can do it using an automation app, plus using adb over wireless as stated by @Andrew T. and @Morrison Chang respectively.
A. Enable Wireless debugging

Make sure that Developer options is enabled.
In the Developer options, enable Wireless debugging.

B. Using Automate
You can use Automate or other apps such Macrodroid, Tasker, etc.

Open Automate, go to Settings.
Under "Privileged & Superuser" section, select "Privileged service start method", then select "Android Debug Bridge (ADB)".
A notification will appear. Press Show. The Developer options will open. Go to Wireless debugging and select Pair device with pairing code.
Another notification will appear. Enter the code shown. Automate will be wirelessly paired using adb.
Go back to Automate and create the flow shown on the picture below.
Press +, go to Date & Time, select Delay.
Press the Delay block, press Duration and enter the duration the block must wait. Press Save.
Press +, go to Apps, select Apps in foreground?.
Set it Proceed to Immediately. Seclect the package (this is the app you want to stop). Press Save.
Link the Delay and Apps in foreground? blocks.
Press +, go to Apps, select App kill. Select the package you want to stop. Press Save
Link Apps in foreground?'s No path to the In path of the App kill block.
Link Apps in foreground?'s OK path to the In path of the Delay block.
Optional, to select all blocks, press on Copy icon, then Paste icon. Change the package to stop on the new blocks.
Press Back button/gesture. Press Start
Give the necessary permissions if requested.
Press Start, select the starting points, then Start. Or press Start All.

Hi, thank you very much for your suggestion. I've installed the latest version of Automate, but I don't quite understand your solution yet. See also my questions in the comments below he question: Why do you need an adb connection? Is it just to set up the this flow chart/code or do you need a permanent debugging connection for your solution to work (= would render it impractical for mobile devices)? Also: Why not use the privileged service start method Manually (Execute "sh /sdcard/Android/data/com.llamalab.automate/cache/start.sh") instead?

Okay, first problem with your solution: I've followed all your steps, set up one Automate flow and tried to start it. But when trying to grant the permission "access screen content and observe your actions" and confirming the subsequent popup prompts, nothing happens (i.e. the permission is not granted). What is the issue here?

...to be more precise: I keep cycling/bouncing back and forth between the two confirmation prompts "Automate requires the following privilege..." (confirm by tapping "Grant") and "Automate uses the Accessibility API to..." (confirm by tapping "Ok").

Update: Okay, the problem with granting "access screen content and observe your actions" permissions is solved, I had the package com.samsung.accessibility uninstalled, which is required by Automate. But upon running the suggested flow, the following errors are displayed in the log:

Flow beginning >> Delay >> App in foreground? >> App kill >> Failed to start privileged service >> java.util.concurrent.CancellationException: Please execute: sh /sdcard/Android/data/com.llamalab.automate/cache/start.sh >> java.util.concurrent.TimeoutException: Service startup timeout >> Stopped by failure

Automate has full access to external storage. In addition, I granted permission to execute shell commands. What is the problem?

It usually happens when Wireless ADB is switched off by the phone by the phone when not in use after certain amount of time. I don't know how long. Check if Wireless Adb is still on?

Hi, I'm not using wireless adb. Why is this required? There is also an option that uses a local bash script "/sdcard/Android/data/com.llamalab.automate/cache/start.sh", what about that? Furthermore, is it really necessary to use adb from a remote device or does Android come with something like a built-in/local version of it (anything that can automatically execute shell commands locally)? Having to hook up a mobile device to a PC every time seems incredibly impractical and contradicts the use of Android to begin with.

So, you didn't follow the method mentioned on the answer and yet complaining about it.

Nope! The question explicitly says "What I need is an equivalent for Android, but unfortunately, I do not have any experience with programming Android applications yet." adb is not a locally running Android app, but a debugging tool intended to be used from a Windows or Linux PC, which one usually doesn't carry around (or do you?). Importantly: I did install Automate, grant all necessary permissions, create a flow, and try to run it, i.e. follow through with all instructed steps faithfully, up until the point where I'm requested to have a PC on me at all times - a non-solution.

...by the way, all this was already brought up in my very first comment right below your suggested answer. Which you completely ignored! You should at least be able to explain your solution after making the inquirer invest hours of lifetime into testing it out. I am happy to throw out another bounty for you, but I need a working solution first: I.e. a 100% local solution (maybe one initial connection to an external device) for unrooted Android 9+ devices.


text:
How to stop disabled Google Assistant popping up on home button long presses?
I don't use Google Assistant, so I disabled it, by (1) opening the Google app, then (2) going to settings from the profile icon, then (3) choosing "Google Assistant" settings, then (4) scrolling a long way down to "General" settings, then (5) toggling off the top toggle that simply says "Google Assistant".
However, sometimes the device thinks I long-pressed the home button (e.g. if I swipe up too slowly) and pops up a Google Assistant nag screen asking me to re-enable it.

How do I stop the Home button from doing this? There don't seem to be any related settings in the Google app settings.
I've found dozens and dozens of articles explaining how to disable Google Assistant - which I've already done - but not how to stop this home button behaviour.
Device is a Samsung S22 Ultra running Android 14 and OneUI 6.0 if that's relevant.

Eventually I found something, at the end of this article. This home button behaviour is apparently a system behaviour in general Android settings outside of Google Assistant, set to summon whatever is your current "Digital Assistant App" - and by default, Google Assistant remains the default Assistant App, even if disabled.
So, you need to find your default Assistant App setting,  and set it to "none":

Pull down from the top, open system settings (cog icon)

Go to "Choose Defaults Apps" (under "Apps" in the main settings list, or,  search for it)

Go to "Digital Assistant Apps"

Tap on the text that says "Device Assistant App" with "Google" under it (not the cog icon next to it)

Choose "None" from the list

After this, long presses on the home button should do nothing and pop nothing up.

Disclaimer: as always with Android,  labels,  menu positions, behaviour and side effects may vary between devices and versions, this is only tested on a Samsung S22 Ultra running Android 14 and OneUI 6.0


text:
Who signs the system apps?
Who signs the system apps? Google, or is it the OEM when they build the ROM? Also, has this changed over the years?

System apps are signed with the same key the ROM has been signed, so on stock devices it is usually the manufacturer. As far as I remember this has not changed in the history of Android.

Dang, there goes that writing idea I totally didn't have. Thank you though!


text:
How to delete a partition using fdisk?
I am trying to install a GSI that is 1.8GB and i need to re-partition the system partition to allow the img to be installed, i tried using fdisk /dev/block/mmcblk0 then i tried using the command "d", but all it says is Selected partition 1 and it doesn't allow me to choose the partition number, which is partition 26 in my case (userdata), please help!!

Can you list the partitions in fdisk? If not may be you have a very old fdisk version that does not GPT partition scheme.

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 have twrp 3.5.2 on my SM-T330NU does it support GPT partitioning? Tell me how can i delete partition if my twrp recovery supports GPT.

I just updated twrp from 3.5.2 to 3.7.0, but i still can't use fdisk to delete ther userdata partition, it tells me"No partition is defined yet!" what can i do know?!?!


text:
What is the difference between "Lock screen", "Badge" and "Pop-up" notifications
I just got a new Samsung A54 and I'm trying to set it's notifications to "preserve my sanity" mode.
In Settings > Notifications > App notifications, I can select individual app. On the App notification screen, I can then:

Allow/disallow notifications
Set allowed ones to "Allow sound and vibration" or "Silent"
Under "Notification types" I can select "Lock screen", "Badge" and/or "Pop-up" (latter only if sound and vibrations are allowed.

I have some idea what each of the notification types means, but would like some clarification. Screenshots with examples would be greatly appreciated.

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


text:
Is it possible to take an Android firmware snapshot?
I am currently working for a company that operates screens in some kind of 'kiosk mode' to provide information in malls etc.
The devices are basically big monitors connected to a development board (as far as I can see similar to a Raspberry Pi) which runs Android and starts a display app when boot up.
Now the problem is that we currently have to set up all the boards manually. Meaning removing certain pre-installed vendor apps, installing our own apps, setting the right configuration, etc.
Since this process is quite time-consuming and prone to errors, we thought if there is a solution to configure one device, save the "firmware" (.img) on a computer or USB stick and then use this image as a base for all other devices.
Is there an easy way to achieve this? How can we create a snapshot of the Android device?
All devices are the same from a hardware point.

You have like in other systems the choice to perform an offline backup (e.g. using a recovery ROM that support it) or an online backup using root permission while the OS is booted you can create an image accessing the block device of the flash memory.