text:
What can I do to upgrade an old Android 4.0.3 tablet?
I have an Asus Transformer TF101 that is running Android 4.0.3.
The tablet can connect websites in HTTP without issue but not in HTTPS.
Most HTTPS websites are totally unreachable. Some websites (from large institutions)  are reachable after accepting several certificat issues warnings, but display badly.
The clock of the tablet was set correctly.
I assume the issue has to see with how the tablet is able to deal with certificates, and also with its aging native Internet browser (which is not apparently not Chrome).
I unsuccessfully attempted upgrading the tablet firmware, but got an error message "Internet connection error or server busy. Please wait and try again".
I assume this issue could be caused by disabled upgrade server and/or SSL certificate issues.
Is there still a way to upgrade such a tablet, preferably without jailbreaking it?

For surfing the web try different browsers.
For example: Via Browser and etc.
Also if you can root/jailbreak it, you could give some a bit newer Android versions a try.
Like Android 4.4.2 works fine for surfing the web(a lot of browsers stopped supporting it, but Via Browser works fine.)

Yes, it is possible. Jailbreak to get root rights needed. Enthusiasts do wonders.
A minute of searching DevicseName ROM/image/firmware and we have a range of many variants.
The maximum Android 6 for Asus TF101 was found.
Visit XDA forum for install manuals and image download.
https://forum.xda-developers.com/t/rom-mm-6-0-1-katkiss-katshmallow-034-multiwindow.3318496/
Source Code: https://github.com/timduru/android_device_asus_tf701t

No there is no way to upgrade such an old tablet. For your tablet Android 4.0.3 is already the latest update. It was released with Android 3.0 (Honeycomb) and got upgrades to 3.2 and later 4.0. Therefore there is no other update possible, especially if you exclude jailbreaking/rooting and thus custom ROMs.
Android 4.0 only supports TLS1.0 but more and more servers now require pure TLS 1.1 or even TLS 1.2 that is the reason your network connections no longer work.
Additionally Android 4 comes with outdated CA certificate list. The CA list may be updateable by manually installing all the missing root CA certificates (as far as I remember on Android 4 this require to set a device password).
The only alternative would be a web browser that has a built-in trusted root CA list like Firefox, but Firefox requires at least Android 5+.
Upgrading to a newer Android version also doesn't make much sense as the hardware is pretty weak (1GB RAM for a tablet is very low).
So there is only one really working answer: Your tablet is more than 11 years old, replace it with one that is newer.

Thank you Robert the clear and detailed answer. The tablet was almost not used and could still be used for offline tasks (e.g. teaching apps). I always prefer not jailbreaking when there are regular updates, but I don't exclude jailbreaking if the only way to upgrade.


text:
pixel 3a how to fix washed out purple screen
I have a pixel 3a that has a purple washed out screen.  Poor contrast I can hardly see icons.  This is worse than just "red hue" it's weird.  I've tried rebooting, resetting phone.  What can I do?

I think it's a hardware issue.
With android 11 I was able to "mostly see" icons using an app called "screen filter".
Now with 12, that doesn't work, but by turning night light on (intensity full), extra dim on, and dark theme on, I can see OK.

source: Stack Exchange

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

sort: votes


text:
How to disable the automatic saving of *any* wireless networks?
With wifi settings in Android:
I know that you can disable "auto-connect" for a specific network.
I know that you can "forget" a specific network once Android has automatically added it to its list of "saved networks."
But is there a way to completely turn off the automatic adding/saving behavior so that it never saves any network?
I find it annoying (because, "Hey, I didn't tell you to do that!" and also a potential privacy problem -- using wifi monitoring tools, people can see what networks your phone is trying to connect to, and thus, what networks you have been connected to in the past.

Android does only actively try to connect to Wifis that are hidden (they don't send out an SSID broadcast). All the other (non-hidden) Wifis are detected by passively scanning thee SSID broadcast messages received by the phone. So for regular non-hidden Wifis there is no privacy issue.

Any Device has to remember wifi credentials because if the signal fluctuates/disconnects, they need to reconnect.
It would be far more annoying to enter credentials every time the signal is lost than to "Forget" once when you don't need it.

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


text:
Grant shell user permissions to apps
Using adb, one has a lot of additional permissions, that apps running locally on the phone have.
Specifically, I am interested in the wm size command.
Is there a good way to allow apps access to those permissions?
The only way I know of, is to use adb tcpip, so that apps can connect to the adb server running on the phone. But afaik, thata wouldn't survive a reboot.

Based on your prior question I don't think it is possible without root (or at least having the user go through the hack) as adb is an obvious security liability. Sadly I think your desired behavior for your hardware project is only available via Custom ROM.

Yeah, those questions are related. I am running into different issues where I have a couple workarounds, but most of them require root or other not-so-cool things, which work for me, when I am using the keyboard attachment, but I am trying to make this a bit more accessible to other users. It's not a showstopper, but its just more comfort and stuff.


text:
Disable auto-rotate does not work in certain apps
In android 11 I disabled auto-rotate of the screen by setting to "off" Settings > Display > Auto Rotate.
however in certain apps that doesn't seem to make any difference and the screen is still rotated when I move the phone orientation
I assume that's because the app developer has decided to override the android auto-rotate setting, or would there be any other reason for this behavior?
Alternatively is there a way to set the gyroscope manually so I can set the orientation of the phone without it being automatically detected

It is not only app, but also view specific inside each app: I had a new app where disabled auto-rotate worked perfectly just the "latest news" view had auto-rotation always active.

Thanks for the reply. I have since located an app called Ultimate Rotation Control that enables locking on the rotation which offers a 7 day trial. I was not able to find any other solution to this words cannot describe how infuriating this can be!

Yes, the developer may override this, mostly for user's convenient (e.g. playing games exclusively for landscape mode will be awful if it's rotated to portrait, and vice versa), or otherwise because the app hasn't supported layout for both mode and the dev thinks it may have buggy behavior.


text:
Is it possible to unlock a phone with usb debugging disabled?
I forgot the password of my old phone and even taking it to experts told me that it turns out impossible to recover data or unlock the phone. The phone is an honor 10 with Android OS 8.1.
Is it really impossible to attempt to recover the data?

No, it's impossible except for social engineering/bruteforcing. how many digits pin/pattern/password?

If the phone is encrypted by default then the only realistic way is to break the password/pattern/PIN.

So the only way out is to break the 4 digit pattern......

possible but requires goood portion of luck. gatekeeper will increase timeout for each wrong attempt (up to 1/1day after 140 attempts)


text:
Galaxy S8 has no option to show CPU usage
My Samsung Galaxy S8 (SM-G950F) is not showing the developer option to "Show CPU usage".
I have turned the "Developer options" on, but scrolling down to "Monitoring" I only get 2 options: "Strict mode enabled" and "Profile GPU rendering".
I don't know why is it not available and how can I get it.
I keep getting a message "Abnormal account. You need to login again." about every 15 minutes on my screen, but I have no idea which app is doing this, so I'm trying to track it.

AFAIK, there has never been "show CPU usage" on the developer option. Have you seen this menu on other devices/some guides? Note though that manufacturers can customize their Android OS, including the developer options.

If the action occurs as often as every 15m then the Battery Usage could probably show some consumption. Look under Device Care > Battery > Usage By Apps for a clue.


text:
How can I move back data from external SD card to internal memory?
Today I added an sd card to my smartphone (Fairphone 3+, Android 10), I selected to use it as internal storage, and moved the photos and some apps (don't know which ones) to it automatically. After the move, I now cannot see any of my photos (except a dozen of them) and some apps (like Dropbox) keep crashing. Stupidly enough, I didn't back it up. Now the camera doesn't show any photo, the files application doesn't show them, if I connect to a PC, I get an error trying to open the DCIM folder, and the SD card cannot be opened by other devices (there's no warning of it when selecting). The space is however marked as occupied in the setttings
How can I move back this data from the external SD card to the internal memory?

Are you sure the SD-card was genuine? A lot of extra large SD-cards for cheap money are fake cards that have may be 16GB real storage but claim they have 256GB or more. So if you write to them data loss is inevitable.

@Robert it was a 256GB SanDisk bought off Amazon, and was definitely not cheap. I would be very surprised if it was not genuine

so what happen behind the scenes when formatting as internal, SD Card is repartitioned and encrypted, ext4 partition is mounted /data/media/0 > /mnt/expand/* and symlinked /sdcard > /storage/emulated/0. former "Internal storage" in /data/media is now unused (disk space might still occupied). you can 'adb pull /storage/emulated/0' to backup files from adopted SD Card once, eject, and 'adb pull /storage/emulated/0' again to backup files from internal storage. in case you have root access you can get encryption key from /data/misc/vold and decrypt SD Card on PC (for direct access)


text:
Can I install an uncertified eSIM profile provisioned by myself on Android?
I would like to set up an SM-DP+ server to provision my own eSIM profiles. These usually get certified by GSMA and are used for large-scale Remote SIM Provisioning, but I would want to use this for home testing only, so getting official certification would be overkill.
I understand that I will need my own mobile network to work with it, which I also want to set up at home. My main concern is that either Android or the device manufacturers impose limitations that would only allow certified eSIM profiles to be installed on a device. I was thinking of using a Google Pixel 3A for testing, so I would be installing the eSIM profiles on this phone.
I also tried to find information on what's inside a SIM profile but there isn't much on the internet. I know it contains ISMI and some shared keys which it uses to connect to the MNOs network.
I would like to know what else is needed to create a functional eSIM profile and set up a server that provisions these to a Google Pixel 3A for a mock cellular network.

In the early 2000s, Chaos Computer Club described how to clone a SIM card (exploiting flaws in the reference implementation for the authentication algorithm, which carriers discontinued soon after, hence SIM cards issued from ca. 2002 on are not vulnerable). According to them, connecting to a GSM network requires the IMSI (subscriber ID) and the Ki (key). That presumably also goes for UMTS networks, but LTE may be different. (Basis for my suspicion: my oldest SIM in my collection, issued in 2000, works with 2G and 3G, but not with 4G.)

In order for your handset to establish secure communications with the SM-DP+ and then download and install a eSIM profile, the SM-DP+ will require 3 certificates signed by the GSMA's certificate issuer (DigiCert): DPtls (for initial contact), DPauth (for mutual authentication), and DPpb (for eSIM profile package binding).  Without these, the handset (actually the LPAd application and the eUICC) will refused to trust the SM-DP+.
The cost for the set of certificates is around $15k per year, and they can only be issued after a successful audit by the GSMA (which costs around a $20k).


text:
Assigning a static IP address to a phones hotspot
How can I assign a static IP address to my phone's hotspot?
I use the hotspot on my Samsung M31 to connect my laptop running Windows 10 to the internet.
I also have Oracle's Virtual Box VM running a few test websites on the laptop on Ubuntu Server 22.04, which need a static IP address to access.
A few days back when I ran ipconfig at the Windows command prompt, it showed my wireless IP address as 192.168.166.135. Today, it show as 192.168.35.125. Meaning, all my sites are now broken. Is there a way to stop the hotspot from changing IP addresses?
Can someone please help?

In my opinion this is simply a matter of configuration in VirtualBox. If you want to access the host from within a VM add a host-only network (the VM has then two network adapters). This network is then configured and maintained by VirtualBox on the host and will work even without any hotspot connected.

@Robert Thanks for pointing me to the host-only network. I checked a few articles online and have got things going, but now my VM cannot connect to the internet for updates etc. I've added NAT as a second adapter, but that too does not solve the problem.

What guest OS do you use? From my experience some Linux distribution s(e.g. Ubuntu 22.04) do not automatically configure the new interface so I had to manually configure the interface to make it work.

I'm using Ubuntu Server 22.04.

See https://android.stackexchange.com/a/213774/96277

You can run your webserver (that hosts websites) via docker images. Each container would be assigned a different IP (you can make it static to remember) within same or different subnets (configurable). This way, it won't really matter what public facing IP address you have. BTW, are you trying to access your websites from devices other than your laptop?

You could ask at [su] in the form of "IP address keep varying on each connection. How do I consistently access my websites in the VM without having to keep looking for new IP address assigned to my laptop?" or something like that.


text:
is there a log in my android of GPS & speed? Asking after car accident 2 weeks ago
I was in an auto accident two weeks ago, and the onboard dashcam had failed to record anything.  But, I had two Android phones on (both with GPS / location enabled, one on Android 9 (LG V35 Thinq), one on Android 11 (Pixel 4)).
Is there a log in the phone for the past n days of location and speed (and perhaps direction)?
(I was not running any particular GPS tracking/logging app, probably had phone, messaging, Pokemon Go, and Facebook in the "background".)
The information might help avoid my insurance rates going sky high :)
thanks!

check google maps timeline


text:
What to do if malware not gone after complete factory reset?
I have a virus in my Samsung galaxy s21a, and even after a complete factory reset phone doesn't recover. What would be other solutions to fix it?

For Samsung there are PC based tools available which can download an original ROM: https://www.xda-developers.com/download-samsung-software-updates-samsung-firmware-downloader/ Such a downloaded ROM should be installable via Odin/Heimdall to reset the system partition.

What virus/malware survives a factory reset on a device without root access? (Legitimate question, not being snark)


text:
Why are Android ELF files different?
When I try to run a x64 ELF file which was build for Android on my desktop PC I get a "file not found" error.
I think that's normal because Android ELF files aren't compatible to normal ELF files.
What is the reason behind this?

The standard libraries on Android are a bit different. Have you checked the linked libraries of the executable via ldd?

Build a statically linked program and it'll work on both sides. For dynamically linked binaries/libraries a linker is required which links and loads the libraries required by the executed program. Linker path is hard-coded in the program. It is /system/bin/linker in case of Android (when built with NDK), while something like /lib/ld.so in case of common Linux distros (when built with GCC etc.). So execution won't start at all.

The ELF file format is the same. The difference is the file paths embedded in the ELF file.
ELF is a very general format, which can encode many things about the contents of a file. Linux, Android, and many other operating systems use ELF format for executables and libraries but that does not make them compatible. It's like having directions for different journeys by road. They're all written in the same language (corresponding to ELF) but trying to follow directions for getting to Koln from Stuttgart when you're starting in Frankfurt won't work.
As per the comments, if you build a completely statically linked executable for x86-64 it may well work both in the Android emulator and on your Linux desktop. However, most programs need to use system libraries, and the linker embeds the names of those libraries, and the path to the run-time linker in your ELF executables.
Although Android uses a Linux kernel, the system libraries and run-time linker are completely different from Linux. Android uses the Bionic library, and most Linuxes use glibc. This was deliberate: Android was originally designed for fairly slow devices without much RAM, and needed a library that didn't take up much space and ran quickly. Glibc could assume more powerful hardware.
The Android run-time linker is /system/bin/linker (or /system/bin/linker64 for 64-bit code). The Linux run-time linker is usually /lib/ld.so (or /lib64/ld-linux-x86-64.so.2 for 64-bit code). Obviously, these are different paths, and each only exists on the relevant operating system. The "file not found" error you get when running an Android ELF file on Linux is a complaint that /system/bin/linker64 doesn't exist on your Linux system.


text:
Does anyone know what the flame symbol means?

I can’t figure out what the flame logo means. Can some please help?

That's the Tinder app, apparently

I love the ambiguous use of the word "apparently" at the end of this answer. LOL. :)

@RockPaperLz-MaskitorCasket xD


text:
emulator: ERROR: Can't get kernel version from the kernel image file
I want to start the emulator for the custom AOSP 12L build for arm64 using emulatorcommand. The AOSP source was downloaded from Sony's open device project for Xperia devices.
The command that I ran is :

$ emulator64-x86 -sysdir
/home/anerudh/android/out/target/product/generic_arm64/ -system
/home/anerudh/android/out/target/product/generic_arm64/system.img
-ramdisk /home/anerudh/android/out/target/product/generic_arm64/ramdisk.img
-data /home/anerudh/android/out/target/product/generic_arm64/userdata-qemu.img
-kernel /home/anerudh/android/out/target/product/generic_arm64/kernel-5.4
-sdcard /home/anerudh/android/out/target/product/generic_arm64/sdcard.img

I get the following error and do not know where to change the 'Linux version' in the kernel image
emulator : ERROR: Can't find 'Linux version ' string in kernel image <file_path>

How do I solve this issue and start the emulator?

I hope this link may help you.


text:
Is there a way to schedule the sending of messages on whatsapp?
Is there a way to schedule the sending of messages on whatsapp using some particular program or script (obviously having the root of the device)?
I tried many applications to schedule sending messages, but none of them was automatic, they all needed user interaction.
I also tried to create some sort of scripts but with no results because they were in conflict with the operation of the application. My phone has Android 11 and I noticed that going on with the versions is getting more and more complex to work at the programming and automation level.
In particular, I would need something automatic that requires no interaction to send these messages

Does the solution need to be mobile-only?  I ask because you're more likely to be able to write some sort of batch script that can be scheduled to run an ADB command; however, I think that would be more appropriate to post up in SU for rather than here.

Yes the solution does not have to be mobile-only

I was searching for the solution for a long long time, the best what I found is to use Takser task. It's described in this Reddit thread: https://www.reddit.com/r/tasker/comments/bnnkvg/send_whatsapp_with_sql_with_locked_screen/f2xi0zx/?context=3
However, with latest Whatsapp versions it doesn't work with sending to groups, couldn't find out why.
Alternatively, you can use custom Whatsapp client, as I do now

I couldn't comment so I had to write this as an answer? There is a TaskerNet task to send WhatsApp messages here: WhatsApp Message. I have not personally used it, so I don't know if it works. Also, if your phone is rooted there are a couple of guides using autovoice and tasker, and one using SQLite.

Thanks for the answer, but I have already tried these methods and they do not meet my needs


text:
Can I run .odex file on dalvikvm?
As I can run a Dex file on dalvikvm through a terminal emulator (I'm using termux or adb shell
/system/bin/dalvikvm -cp /path/to/classes.dex classname
Which runs successfully and I noticed it generated a directory oat which contains oat/arm64/classes.odex and classes.vdex file.  odex is faster than Dex so can I run it directly every time without recompiling dex to odex?


text:
Set alarm for every other day?
In the default Android clock app, you can set an alarm for specific days of the week, but not a more flexible schedule such as repeating every other day or only the third Thursday of the month.
Is there a better alarm app that offers that flexibility? Using the calendar allows more sophisticated repetition but only notification, not alarm functionality.

Just a heads-up that we have a sister site, Software Recommendations Stack Exchange for this specific purpose, in case you're interested.

thanks, wasn't sure if this was a dev focussed or s/w (seemed to be a bit of both) so might be better to ask over there

Cross-posted to SoftRecs.SE: https://softwarerecs.stackexchange.com/q/82900/520


text:
Lower the minimum brightness without third party apps
My default lowest brightness value is around 33. I can't go lower than that from the brightness slider. 33 is too bright for me. I want to take it even lower near 15. Although I can lower it to 15 by modifying the brightness file located in sys/class/backlight/ it is temporary. So I want an permanent solution like changing some values here and there. I don't want to use an third party app as they're inconvenient and create issues oftentimes.
I'm using Pocophone with a custom ROM Android 11. And I have Root access with Magisk 24. So I can do pretty much anything.

A Magisk module BrightHack OP7T would help you.

A simple Magisk module for lowering the minimum brightness

I'm assuming you know the basics.

Is it only for OnePlus device? Or the other devices are supported as well?

Should work on other devices as well, judging from the code.


text:
Should I migrate my data on my moto G7 power
I have a Motorola Moto G7 power. I just recently formatted my SD card to internal bc I needed the space but now my phone seems to be lagging bad and I see this migrate data thing but idk if I should do it or not. Can anyone help me please?

Does this answer your question? Can I control where apps are installed?


text:
GPT weird partitions, ROM dump problem, MTK phone
I used WWR MTK Tool and SP Flash Tool v5 to dump and analyze preloader and GPT from a new Oukitel K15 Pro phone with Android 11. Oukitel haven't posted the ROM for this model for some reason. Managed to read back the ROM with SP Flash tool, but resulting partitions have weird sizes, Boot.img being only 4 MB in size, Super partition only above 512 MB in size, UserData was almost 15 GB in size. Magisk doesn't recognize extracted/dumped boot.img as a legit file, throws error. This is one weirdo ROM if those values are correct. Super partition should contain system, product, and vendor, no? How could it be so small, and not 3-4 GB? Any help appreciated. Would want to root that sucker,maybe install a GSI, but it baffles me.]2]2

The small boot partition is most likely not boot.img but the bootloader. Have you checked where the different partitions are mounted at run-time (if the are mounted)?

probably your DA is not authorized so readback failed. use mtkclient

Must have been readback failure in SP Flash Tool. Thanks Alecxs for advice on using mtkclient. Worked perfectly. All partitions normal. Super is 4 GB, as expected, boot also normal. Rooting worked. Thanks for help, both of you.


text:
WhatsApp vanished from phone, what has happened?
Works well and handy to have BUT..... I don't know what has happened, I used WhatsApp late evening on 30 June 2020. I don't turn off the phone over night.
When I awoke the following morning (1 July) WhatsApp had vanished from the home screen on my Android Blackview BV5500pro. Not only that but it had also vanished from my apps!
I've asked someone if I'm still in their WA contacts and I am but they haven't sent me a message as requested to see what, if anything, happens.
Just to clarify, the icon has not been moved to any folder on the home screen and it does not appear in my installed apps.
What am I to do?

Without further troubleshooting, it's quite difficult to answer "what has happened", but if it doesn't appear in the installed apps, have you tried downloading/reinstalling it?

Was the installed WhatsApp version the original version from Google Play Store?

Have you tried installing it?

It was the original version. I thought it might be "hidden" somewhere. I've done as much searching as I know how to. If I reinstall WA, am I right in saying all my messages will no longer be visible and contacts will have to be loaded again?

try pm enable/ install-existing from adb. there exist LegacyWhatsApp v2.11.431 you can install from adb without data loss (if any data still exist) https://forum.xda-developers.com/t/tool-whatsapp-key-db-extractor-crypt6-12-non-root-updated-october-2016.2770982/post-81902381

But first, try mtk-su if it works you can copy /data/data/com.whatsapp directly (if exist). it's very easy to execute mtk-su and it does not root or harm your device, it just gives you temporary root shell on adb

WhatsApp vanished from your phone.  What has happened?  Your life has just dramatically improved.

Hello everyone who has offered advice. I tried the procedures suggested but got lost along the way. I did a reinstall from Play Store and got a total reinstall with all previous messages and contacts. Looks like I had backed up all previous activity so it was installed as before. Fortunately I don't live for social media and still prefer to talk directly.


text:
No audio in screen recordings on Android 10
I have several phones, all of them on various versions of Android 10 and 11. I am using an app to make conference calls and I need to record those conference calls. My main device is Huawei P20, but the same problem occurs on all the Android phones I have. When I try to screen record the calls, there is no audio at all. I have tried a bunch of screen recording apps, including the one that came with the system and all the major screen recording apps available. Same problem.
I have also checked and tweaked the sound settings and did everything I could, (internal, mic, mic + internal/system have all been tried) but the problem persists. A lot of screen recording apps say if the Android version is lower than 9, there might be issues with the audio, but 10 and above shouldn't have any issues.
One error message comes up sometimes: app ABC (that app's name) is recording audio (or using the mic) so the audio can't be recorded. I don't know what that means, because all I need the screen recorder to do is to faithfully grab the audio from the system.
I tried screen recording the same app on iPhones and there was no problem at all. The audio was clearly kept.

I think your problem is very similar to the problem people have with call recorder apps. Theoretically call recorder apps should no longer work on Android 9+ but on some devices call recorder app developers have found workarounds to record audio, but these solutions only work on a few devices.

@Robert Well but the recording apps claim the opposite. They seem to suggest they could only work on higher versions.


text:
Use tasker to pass biometric authentication dialog (root)
Main idea
I want to use a tasker action to authenticate a biometric prompt on a rooted device.
Background
My use case is that I have a Dangerous Things Apex implant that I can securely scan to activate a tasker profile, meaning no security concerns compared to a regular NFC triggered task, and I have a rooted pixel 4a running LineageOS.
I got pretty far down the rabbit hole before I had to go to bed and got here: the onAuthenticationSucceeded method of a BiometricPrompt object.
Ideas

My inspiration was lapwat's NfcScreenOffPie who patched the nfc binary
Or maybe we can emulate a second biometric sensor?

If the authentication prompt was requested because access to a key in AndroidKeyStore was requested then bypassing it will not be that simple because I don't think tasker has access to the Gatekeeper system which controls access and authentication (AFAIK Gatekeeper should run protected in TEE).


text:
How does Android creates block devices and mounts it?
How does Android create block devices in /dev? Android does not support devtmpfs and Android /init does not use udev or (busybox) mdev. ueventd.rc doesn't contain strings for /dev/block/....
But, there is one difficult thing. There is many different Android devices and they have got different partitions - by size, type, number of partitions. But /init is the same for any device...
Also, I have tried to "trace" ramdisk: I replaced magiskinit with my custom init:
 ~ # mkdir ramdisk
 ~ # unmkbootimg boot.img
 ~ # gzip -dc ramdisk.cpio.gz | cpio -i -D ramdisk
 ~ # cd ramdisk
 ~/ramdisk # mv init magiskinit
 ~/ramdisk # mv ../init .
 ~/ramdisk # cat ../src/init.cpp
#include <unistd.h>
#include <stdio.h>
#include <filesystem>
#include <string>
#include <vector>
#include <fstream>
#include <sys/mount.h>
using std::string, std::vector, std::ifstream, std::ofstream, std::ios, std::endl;

int main() {
    string devd;
    mount("proc", "/proc", "proc", 0, NULL);
    vector<string> devblks;
    vector<string> mounts;
    for (auto a : std::filesystem::directory_iterator("/dev")) {
        string pth = (a.path()).c_str();
        devblks.push_back(pth);
    }
    const bool mountext = std::filesystem::exists("/proc/mounts");
    if (mountext) {
        ifstream opn;
        opn.open("/proc/mounts", ios::in);
        while(getline(opn, devd)) {
            mounts.push_back(devd);
        }
        opn.close();
    }
    pid_t parent = fork();
    if (parent) {
        rename("/magiskinit", "/init");
        execlp("/init", "/init", NULL);
    } else {
        while (true) {
            bool ifext = std::filesystem::exists("/data/media/0");
            if (ifext) {
                ofstream output;
                output.open("/data/media/0/sys.log", ios::out);
                for (unsigned int k=0; k < devblks.size(); k++) {
                    output << "Block: " << devblks[k] << endl;
                }
                for (unsigned int j=0; j < mounts.size(); j++) {
                    output << "Mount: " << mounts[j] << endl;
                }
                output.close();
                break;
            }
        }
    }
    return 0;
}
// My /init is statically linked binary

But my init does not work, it bootloop my device. My device - Android 10 (system-as-root). Maybe it could be work into Android < 10 (ramdisk-as-root devices).
I can't use UART, my device does not support LLCON and FBCON, I can't replace /init with bash shell for checking initramfs))
Also, I can't run it into chroot, it fails:
 ~ # chroot android /init

And I don't know way to run it on QEMU...
Sorry, but there is too difficult to read source code for me...
I just want to know how Android create blocks, mounts and switch_root to /system without devtmpfs and even without ueventd...

What's the problem you are trying to solve? It's more development oriented question. Android's init/ueventd manages to receive uevents from kernel. Block devices are handled within code like many other device nodes without relying on ueventd.rc.

Do you want to say that Android init uses /sys/block/mmcblk0/.../uevents for creating block files?

Android's init, ueventd, vold etc. all listen to kernel's uevent notifications over netlink socket very much like udev.


text:
How to get lyrics for currently playing song on spotify app?
I would like to learn lyrics of songs playing on spotify but not every author gives them permission to publish it I guess.
I'd like to read the currently playing song and get the lyrics from some service.
Do I need some library from their documentation or is there just some available intent?
If there is already some nice app, you can point me in comments ;D

While the overall question seems on-topic, please note that app development is off-topic since Android Enthusiasts focuses on end-users or power-users (but not necessarily developers) solving their issues, so we can't help with SDK library or code-related issues.

Thank you, I wasn't sure what is the scope of this exchange. I found that on spotify app there is option for allowing others app to see currently playing song. I found SimpleLyrics finally. If somebody knows better apps feel free to add.


text:
How can I reduce lag/crashes when mirroring a screen with scrcpy?
Scrcpy lags or crashes when mirroring a screen. How can I reduce this?
https://github.com/Genymobile/scrcpy

The docs say "It may be useful to decrease the bit-rate and the resolution:"
scrcpy --bit-rate 2M  --max-fps 15 --max-size 960
--bit-rate 2M - reduce the bit rate being sent (amount of data per second, affecting the image quality of the mirrored screen) (default 8M)
--max-fps 15 - reduce the number of frames per second (reducing the data per second) (default 60+?)

This [fps adjust] is officially supported since Android 10, but may work on earlier versions.

--max-size 960 - make the maximum width or height 960 (the other dimension is scaled down, preserving aspect ratio). This reduces the number of pixels sent (if your display is >960p). (Default native res?)
These factors seem to reduce the load on the host CPU and the amount of data needing to be reliably sent between the guest and host over USB/wifi. It seems to reduce lag and crashes.
https://github.com/Genymobile/scrcpy


text:
Is there a way to read CPU temps on Android 9+ under root?
Given the fact I have rooted device, is there a way to get that data? Raw or w/ tools.
P.S. I was looking around for a build of htop with cpu thermals but I dont think there is any compatible for Android.

Have you checked the answers of https://stackoverflow.com/questions/20771070/how-do-i-get-the-cpu-temperature?

Try this: https://android.stackexchange.com/q/246774/96277

@Firelord Sadly, no, literally 0 output even though dumpsys -l shows it in the service list

Try: grep . /sys/class/hwmon/*/{name,temp*_input} and for zone in /sys/class/thermal/thermal_zone*; do echo "$(cat $zone/type) $(cat $zone/temp)"; done | sort -rnk2 | awk '{printf "%-30s%.1f\n",$1,$2/1000}'. These should work on all Linux systems.

https://github.com/SmartPack/SmartPack-Kernel-Manager/releases/download/v17.2/com.smartpack.kernelmanager-v17.2-fdroid-release.apk

@IrfanLatif Which one is the CPU (cores) though? There are like 30-40 zones

Unfortunately exact names of thermal sensors depend on hardware vendors. But most of the thermal zones are around CPUs, like inside / outside, below / above, right / left etc. And most of them have a word like "cpu" or "core" in their name. Some others include GPU, power adapter, battery etc. Usually it's evident from their names. A simple approach is to put a load on all CPU cores and watch which zones show quick arise in temperature. Keep watching them in future and ignore the others in your shell command.

Fair enough, thanks.


text:
Improving DNS resolution success rate on Android
We have an Android app that is periodically sending data to our backend server via url panel-lb-ext.unolo.com.
Sometimes, we have Android devices that are unable to connect to our backend because of a dns lookup failure:

20220701_091732:AppDataRepository:Root cause while running upload task:Unable to resolve host "apollo-lb-ext.unolo.com": No address associated with hostname

This url is configured in AWS Route 53 to point to an application load balancer. The TTL is configured as 60 seconds and I don't have the ability to change that value. Route 53 will want to keep it short so that in case of a failure in any one of the targets, the time duration to pick up a new server is short.
Here is the dig output for reference:

dig a apollo-lb-ext.unolo.com
; <<>> DiG 9.16.1-Ubuntu <<>> a apollo-lb-ext.unolo.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20375
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;apollo-lb-ext.unolo.com.  IN  A
;; ANSWER SECTION:
apollo-lb-ext.unolo.com. 60    IN  A   13.235.199.252
apollo-lb-ext.unolo.com. 60    IN  A   3.108.34.182
apollo-lb-ext.unolo.com. 60    IN  A   15.206.49.163
;; Query time: 100 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Sat Jul 02 12:58:09 IST 2022
;; MSG SIZE  rcvd: 100

What can I do to reduce the changes of temporary DNS lookup resolution failure on these Android devices? I have listed some thoughts below but I need outside counsel to help me go on the right path:

I could try looking to increase the TTL on the DNS record but this would mean that in case of failover then I run the risk of increased failover time.
EC2 Load balancers come with something called "Global accelerators" which "Create an accelerator to get static IP addresses that act as a global fixed entry point to your load balancers in a single or multiple AWS Regions". The only reason I would consider using this is that it comes with a static ip address. As inflexible as a static ip address is, I would consider it if it helps stop these DNS errors.

Any other thoughts would be much appreciated.dns

Welcome to Android Enthusiasts Stack Exchange. Just to clarify, are you looking for a solution with the Android setting, or for the server configuration? If it's the former, then it's on-topic and the community here may be possible to help. Otherwise, server configuration may be more suitable on [su] for a home server, or [sf] if it's an enterprise server.

@AndrewT. I am asking for anything that can help. If configuring something on the Android device will help, then I would love to know what that is. I can ask this question on Server Fault as well, clarifying there that I am asking for anything on the server configuration side.

Fair, that was just for clarification on what kind of answers to expect on this community, since the question mentioned about increasing TTL on DNS record and configuring EC2 Load Balancers, which is out of scope and unrelated to Android system.


text:
Why have all Android TV remote apps stopped working?
As on date, nothing on play store can detect my Kogan TV running stock Android TV 9. The Google TV app is supposed to have a remote now, but it isn't shown for me. The system Android TV remote service on my TV is version 5.1+ (supposedly you need it to be > version 5).
None of the other remote apps can detect the TV over WiFi or Bluetooth - I see review ratings of 2 and 3 all over the place with the same complaint. Is there a fix or a working app or has Google intercoursed everybody as usual with one of their updates, given they apparently retired their standalone remote app for bundling it with the stupid Google TV app, which is bloatware if all you want is a remote (assuming the feature is available, which is isn't for me)?
If at all relevant, I'm using an ASUS ROG phone 5 with Android 12.

This problem comes from an update of Android TV Remote Service. In this update they modified the whole communication protocol.
Here is my app, that works even with this update: https://play.google.com/store/apps/details?id=dev.niamor.androidtvremote
If you need, you can contact me by email directly from the app.
Thank you.

This was one of the apps I tried - fails to detect the TV over the same network and doesn't seem to let you manually specify the TV's address. The TV is connected to the router via LAN cable and successfully pings from my phone.

I have found that the reason the remote tv apps are not working is an update to the android remote tv service on the android tv device. Users are finding that uninstalling the update on the TV device and turning off auto updates seems to solve the problem.


text:
Is it possible to allow Private Number or Hidden Number calls past DND?
Background: My wife and I are foster parents, and our sponsoring agency uses its on-call phone system to call foster parents for emergency placements. The system has a single inbound number that forwards calls to the cell phone of the case worker who's on call that week, but for whatever reason* outbound calls placed from that case worker's cell come across with CID hidden. (I've seen both Private Number and Hidden Number, which I assume are carrier-specific variants.)
*I'm aware of the personal privacy and work/life balance reasoning behind the decision. I just don't know why, instead of hiding the CID, they don't set the CID to the inbound number.
Context: I've got a OnePlus 9 Pro 5G that was recently updated to Android 12. During the workday (8A-5P) I have Do Not Disturb enabled, with calls from Starred Contacts allowed. I also have the "2 calls within 15 minutes" rule enabled, but I don't know how that works with non-CID calls.
Question: Is there any way to allow non-CID calls past the DND feature?


text:
Why can't I move anything to my adopted storage SD card?
I have a Samsung Galaxy Tab S6 Lite WiFi (gta4xlwifi) running Lineage OS 19, rooted with Magisk. I have just inserted a brand new 256GB SD Card and formatted it as adoptable storage. The SD card is nearly empty (i.e. lack of free space is not an issue). When I set it up, it showed me the following screen that was supposed to allow me to copy all my files to the SD card, which is exactly what I wanted to do:

So, I tapped the "Move content" button, and... nothing happened. The button flashed a bit, indicating that my tap was registered, but the device just remained at this screen and as far as I can tell, no files were moved. Similarly, I went into the app list in Settings and tried to change the storage location  of one of my apps, which took me to a screen similar to the one above with a "Move" button. Again, tapping this button registered the tap but did nothing and simply remained on the screen.
Notably, I actually can forcibly move apps to the adopted storage using Titanium Backup's "Move to Adopted storage" option under special features. However, Titanium Backup doesn't have any way for me to move my non-app-associated files (i.e. the 39.44 GB in the above screenshot), so this doesn't get me what I want.
So, it seems like my tablet has allowed me to set up adopted storage and then staunchly refused to move anything onto it (except via Titanium Backup). Am I missing something? Is there something I have to do to make the "Move content" button actually work? How can I convince Android to let me actually use my SD card to store files?

Samsung usually won't provide adoptable-storage at all, might be LineageOS developers haven't properly enabled that feature? 'adb shell pm set-install-location 2' and install new app. check which disk space has changed with df

@alecxs Interesting, so maybe there's some hardware limitation or quirk that Lineage OS doesn't know about? As for installing apps, like I said, I can force move them with Titanium Backup, so I don't care as much about a solution for that as I do about moving everything else.

you can figure it out by installing new app


text:
Is it possible to dump an Android partition with file-based encryption (FBE)?
Consider an unrooted Android 9.0 device with file-based encrypted (FBE), a locked bootloader and only recovery and download modes available. Is there any way to dump the internal storage either to the SD card or via USB, especially the user data partition /data?
Note: The objective is not to decrypt the data, but merely to gain read access to the bit patterns residing in /data.

@free_coupons_for_sale_1023 "FBE encrypts the file system with a Device Encryption (DE) key" - What does this imply? Are you suggesting that on top of a file-by-file encryption there is an additional layer that encrypts the entire disk again (meaning an additional encryption of the already individually encrypted files)? Please clarify

@free_coupons_for_sale_1023 This if off-topic

@free_coupons_for_sale_1023 No, that was actually helpful. The reason behind this question is not decryption of data (as stated explicitly), but targeting individual files for deletion (e.g. setting all bits to zero). In order to do this, I need the information of how files are distributed over the memory, i.e. where the bits that make up a file are located. This information would be inaccessible if the entire disk had an additional encryption layer. If, however, only individual files are encrypted, then their individual memory locations should be stored somewhere in clear text...

...i.e. beginning of file, end of file, and maybe offsets if the file is fragmented. And this location map of files is what I need access to, so I can pick out a specific memory region that is occupied by a single file (and by that file only) and flip the bits so as to delete it.


text:
Is there a way to transfer many files at once to my SD card through an USB port?
I've been having some trouble transferring files to my SD card on my phone through my USB cable because they start getting corrupted after some point.
After some research, it seems like USB doesn't deal well with many files transferring at once. Since I have way too many files (about 7000) to transfer, it is unviable for me to copy them in small batches.
So I am looking for a way to transfer them all through my cable in one go without corrupting them.
Is there any way to do this? Maybe a program that transfers the files one by one automatically for me?

why through usb? copy folders with total commander

hmmm... how does total commander work?
I am trying through usb since it is the only appendage i have to connect my pc to my phone for file transferring purposes

You don't tell use what OS or tool you use on PC side. If you just copy files via USB you are using MTP protocol which is a very primitive and unreliable protocol. For large file transfers I would recommend to enable Android Debug bridge on the phone and use adb from Android SDK.

I've tried adb push to transfer my files, but it ended on lots of corrupted files even still... I thought that adb could be having the same problems as the simple windows copy paste, can that even be the case? There is a high possibility my SD card is simply corrupted, although after the point my files get corrupted if I try pasting a few files they work just fine.

I misunderstood. I thought you want transfer files to SD card on phone (to prevent getting corrupted). There was no mention about we're dealing with files on PC. you may try winadb-sync

I see. I'll try that, but I am thinking now my sd card really is corrupted. In any case, I think that could be helpful, so I'll try it out another time. Thanks!


text:
Cannot keep slack app disabled
I have a galaxy 20 ultra and I have repeatedly force-stopped the slack app, but it keep restarting on its own.  I believe this is happening to some other apps, but I can't recall the others at the moment.  Is there something I'm missing here to keep a force-stopped app stopped??

Apps can start automatically on certain times or events. Android is not like other OS used on desktops. If you want to keep an app quiet you should check it's options if there is for example a setting for defining work and non-work hours. Alternatively you could try to enable battery optimization for slack app, that should keep it closed while in background.

Slack either uses play services APIs or wakelocks to restart itself. If you're rooted, you've got solutions such as the 'super freeze' app, otherwise practically nothing (There exists apps that doesn't require root and does force stop apps automatically after every wakeup but practically since the app  restarts itself after a while, you would end up getting even more battery drain)


text:
Help me, I bricked my phone, and now it won't boot!
Samsung Galaxy Note 3, T-Mobile version. Managed to back up all my data, and wiped it. It still won't boot or start, it just remains on the T-Mobile screen. I need help with my phone, I think I triggered a security function on my phone. I rooted with Magisk and it has worked up until now.
My phone just bootloops and it stays on the T-Mobile screen infinitely, as the blue led function indicates something is being written to the memory but I can't figure out what the issue is. I have tried everything, Odin fails to flash a samsung rom, This started when I removed Magisk.zip because it kept crashing and the app became useless so I uninstalled it (Magisk.zip/manager as well). I can't find a stock rom anywhere for the android because it is taken down by Samsung. Someone please point me in a direction to where I can download the rom, maybe samsung will let me flash the rom but since I couldn't find one or the one I have used failed, because ODIN is trash. I decided to render this useless along with my phone. If this doesn't work I will find a way to flash any random rom I can find on to my phone because I don't want it to fail on me.

You will have to provide us with more details about your situation, what happened before your phone was bricked, what did you do to it? What method you used to root your phone?

This phone acts crappy, it had crappy performances, apps would crash, couldn't even install apps from the play store because the google play store would crash, I had to keep the old version of the play store but it was difficult because the play store would always update it self to the latest version, so everytime I kept the Play Store on the oldest version it came with, it always would reupdate to the latest version. So then my phone was acting sluggish and slow, mainly because I had a bunch of pusd.us and school accounts of my friends. I rooted my phone in 2020 and it erased all my apps.

Please, I need help with my phone it is not booting, I have had an even older phone since middle school that was not even as trash as this phone, my sister gave it to me in 2017.

which partitions exactly you have wiped?

The main ones, cache and data.

so you did not wipe any other partition than cache + userdata? do you know the difference between wipe and format data? have you also tried formatting instead of wipe?

If I didn't, how do I format data, I have TWRP Recovery on my phone?

bootloops can have several reasons. most common 1) verified boot - any modifications (like modified recovery) will break boot chain of trust - avb/dm-verity should be disabled for TWRP 2) encryption - verified boot state is used to derive encryption keys. if encryption is broken, formatting userdata is necessary. TWRP does not support samsung encryption, encryption should therefore disabled 1) + 2) = no-verity-opt-encrypt.zip

TWRP > Wipe > Format Data > type yes

you can install custom ROM https://forum.xda-developers.com/t/4398351

Now I know what caused my phone to mess up in the first place, I encrypted my phone a long time ago, but I think I rooted too soon after fully decrypting the device. Not a problem for me because all my important files were backed up, but apps got removed as if they were offloaded in the rooting process. So I lost all my google accounts I saved on the phone and other app data. I just need help because my phone seems like it's having problems formatting. Did it mark a partition as read only permanently or is the device becoming faulty? This phone is nine years old.

I need help because I have zero knowledge with adb, adb fails on my Note 3, ODIN fails also. I managed to flash TWRP using ODIN and then use Magisk Root.

help with what? stock ROM or custom ROM or Magisk?

consider after nine years usage the eMMC might weared-out

No, I figured the problem, the crappy twrp system has been compromised, it won't let me  wipe partiton/cache/or data. I tried looking up why but I got no answer, twrp never gave me issues and now it does. I can't flash or wipe because twrp throws an insane error.

That sounds like it's going to be a hardware issue, I'm done commenting where else can I go to provide information or get information? Ouch, emmc must be a hardware issue, and that means.... The phone is no good unless you replace the card?

It is possible to replace but it's not worth it https://www.aliexpress.com/item/1005004064792620.html


text:
Maintain adb port forwarding after reconnect
I've noticed that, when I do
adb reverse tcp:12345 tcp:12345

and then later disconnect/reconnect the phone, adb reverse --list will come up empty.
Is there a way to persist this port forwarding?  That is, I'd like it so that, whenever I connect to a device (either through USB or OpenSTF), the port forwarding is automatically established.

Write yourself a batch file that connects and establishes the port forwarding.

How do I make that script run whenever I plug the phone into the USB port?

ADB has no such feature. You can only use such a functionality if it is provided by your OS.


text:
How to enable both "diag" and "rndis" port of Android?
I have One Plus Nord device which is rooted using Magisk. I am able to enable the usb tethering(rndis) and capturing modem logs(diag) separately using the libusb program. But the requirement is to capture the diag logs when the phone is connected with laptop and usb tethering is enabled. Following are the commands used to enable the ports:

To enable "Usb Tethering"

adb shell su -c "setprop sys.usb.config rndis,none,adb"

To enable the "Diag"

 adb shell su -c "setprop sys.usb.config diag,adb"
I have tried to enable both using different set of commands like

 adb shell su -c "setprop sys.usb.config rndis,diag,adb"
 adb shell su -c "setprop sys.usb.config rndis,none,diag,adb"
 adb shell su -c "setprop sys.usb.config diag,rndis,adb"

etc.. bot none is working.
Does anyone have knowledge of how to use both together or any hint which can help in achieving the goal?

have you tried magisk resetprop to set properties on boot (not runtime)?


text:
Do I need both Xiaomi's official unlock app and vbmeta.img for installing an AOSP GSI?
I have a Xiaomi Redmi Note 11 phone, and I am planning to install an AOSP GSI from treble_experimentations.
The documentation for this device in treble_experimentations states that these are the steps required to install the GSI ROM:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
fastboot reboot fastboot
fastboot flash system your_gsi_rom_of_choice.img
fastboot -w

I am guessing, for the vbmeta.img, I am supposed to generate an empty vbmeta.img file. And I understand that is required for the system to boot the GSI ROM that I will be installing (otherwise verification will fail).
Looking up on the internet, though, I can see many posts/references about Xiaomi's official unlock tool (which unfortunately only runs on Windows).
My question is: do I need both steps? (i.e.: first unlock with Xiaomi's tool, then flash the empty vbmeta.img) or are they exclusive? (i.e.: I could flash the empty vbmeta.img without unlocking with Xiaomi's tool and I should be able to flash the GSI).
Also, if they are not exclusive, what does Xiaomi's tool do or why is it required? If flashing an empty vbmeta.img is enough, why do people seem to recommend Xiaomi's app in many forums?

That you need a special procedure or even tool for a bootloader is most likely because of device warranty. By using the unlock tool Xiaomi is able to record which phones have been unlocked. So if you later brick your device and try to get a new because it is still under warranty they can prove you have unlocked your device and deny device change/repair for free.

@Robert Thanks for your comment! ^^ Is that usually something you need to do independently of flashing the vbmeta.img? I think I still don't understand what the Xiaomi tool is doing and why is it required to either flash the vbmeta.img or the GSI image.

That should be totally independent. vbmeta.img disables verified boot.

@Robert If you'd like to add a brief summary as an answer, I'd gladly accept it! ^^ (i.e.: explaining the differences between the effect of unlocking with the manufacturer tool and the effect of flashing the empty vbmeta.img).

XiaoMiToolv2 is available for linux. bootloader unlocking is required for fastboot flash. no need to generate vbmeta, the fastboot command will set disable flag at offset 0x78. system is only flashable from fastbootd, consider sideloading GSI from DSU Loader instead overwriting stock ROM

@alecxs Thanks for your tips! Would you mind elaborating a bit more in an answer so that I can accept it? ^^

Sorry I don't own Xiaomi Redmi Note 11 and therefore cannot post valid instructions (I only will post tested confirmed working solution as answer) but I will link some related questions

Does this answer your question? Device says bootloader unlocked but OEM unlock option can enabled and disabled?

Does this answer your question? Why is suggested to OEM unlock when LinageOS can be installed without it

Does this answer your question? What is 02 in the magisk patched vbmeta.img?

Does this answer your question? How to install GSI on Samsung Galaxy Tab Active3

@alecxs Thanks again for the pointers. I need to wait a couple of days (until next Friday) before Xiaomi's tool will let me unlock the bootloader. I will then try the necessary steps to see how it goes. ^^


text:
How to sign in with google on an app under a restricted user on a tablet
We have a tablet for our four year old. We created a restricted user for him to limit his access but are running into an issue. We downloaded Duolingo ABC and I granted access to the restricted user. When we open the app it asks us to sign in with our Google account. This works fine for a non-restricted user, but when we try on his restricted account it errors out. Is there anyway to log into an app via Google from a restricted account on a tablet?


text:
Limit the phone to small list of whitelisted apps only (parental control)
Is there a built-in way on Android 9 phones to limit the access to only a list of specific apps (for my child)?
Example:

Phone app
Camera app
One or two games
No access to Chrome
No access to Facebook

Is it possible with Android 9's built-in tools, and no third party apps? (or in case an app is needed, I'm looking for a free app without ads)

There is no built-in way. You could try creating a secondary account and then disable for that account the apps you don't want your child to see. This is tedious and user-unfriendly way. Otherwise, look for a solution involving kiosk mode, app lock, and whatnot.

@Firelord are you speaking about a secondary account on the same device, or linking to another device which becomes "master" of a slave device? An answer about where (probably hidden in menus, submenus) to create a new account and how to switch to this 2nd account, and how to prevent the child to switch back to the main account (with a key/password?) would be super interesting! Thanks if you know how to do this!

See this: https://support.google.com/pixelphone/answer/2865483?hl=en#zippy=%2Cadd-user

You can try Google Family Link App which gives a reasonable informed control over multiple devices.


text:
Dropbox camera upload wrong file name
I often take pictures with a mobile phone A and send them via Bluetooth to mobile phone B. On mobile phone B, I move the pictures to the album gallery, such that these pictures are uploaded to my dropbox automatically with dropbox camera upload.
Sometimes, when I do this, the file names of the pictures in my dropbox are incorrect. For example, if I take a picture on 08.05.2022, 11.01.08, then the file name on both devices is IMG_20220508_110108. I sent the file via Bluetooth on 09.05.2022, 10.49.33 and the filename of the picture in my dropbox is 2022-05-09 10.49.33, i.e., the date when the file was sent via Bluetooth. Also, on mobile B in the photo app, the respective picture does appear at 08.05., but at the end, i.e., not sorted correctly. How does this happen and how can I avoid this?

As far as I know changing the modified file date on Android is not that simply. You should better change settings of your gallery app that uses the exif date like "picture taken on" as sort criteria. Or if it does not support sort by exif date use a different gallery app.

I created a dummy file named both junk.junk and temp.temp. I ran sha256sum on both files and they had the same checksum. I recommend you take all the files from both phones, run sha256sum or equialent on all files while capturing all the data and save it in a spreadsheet. Use the spredsheet to sort the files by checksum. this will line up all the equivalent filenames. Then create a script to change each filename to the other. In this fashion you will be able to restore all the names correctly.


text:
Interaction Audioserver and application
There is a way in order to understand who is interacting with audioserver?For instance if there is an application that uses microphone, is there a way to understand if an interaction between audioserver and application is occurred? And in particular what kind of interaction should be (socket , pipe , shared memory, etc….)?

As written I can't even tell what part of the OS stack it is directed at. It may help to read: https://source.android.com/devices/audio and https://developer.android.com/guide/topics/media-apps/audio-focus

audioserver native process hosts one or more framework services. The operating system itself and the apps interact with the services through Binder IPC. AFAIK there's no straightforward way to trace Binder IPC at kernel level. But there's a system service named binder_calls_stats. You can dump it and see if it contains your required info. I haven't checked though.


text:
Is there a way to make the share menu suggestions more useful?
For instance: wanted to share a reddit link. So I hit the share button in Relay (reddit client). The first four suggestions:

Signal, a friend that I just texted a few minutes ago

Telegram, my kid

Telegram, a person I've texted exactly once and it was 2 months ago

Telegram, a person who I've texted 4 or 5 times but haven't used Telegram to message them in 5 months

Meanwhile there's a person I message on Telegram about 20 times a day and they are not in the suggestion list.
Same results sharing from Spotify so I think it's a system menu, not an app-specific menu.
Is there some way to reset these suggestions? They seem worthless/broken. It was the same way in Android 11. Surely there's some system process that's updating these values.


text:
cyclic bluetooth issues using a Samsung Galaxy Tab Active 3
Anybody any idea what is the reason for cyclic bluetooth issues using a Samsung Galaxy Tab Active 3? The connection shortly breaks/drops/becomes very slow after 3 seconds before recovering after 1 second. So I get:

exactly 3 seconds of flawless Bluetooth
exactly 1 second of broken Bluetooth
exactly 3 seconds of flawless Bluetooth
exactly 1 second of broken Bluetooth
...

Background:  We developed an Android App for the Samsung Galaxy Tab Active. It connects to a self-made Bluetooth sensor and communicates with that sensor non-stop at maximum bandwith. Now we are migrating to newer hardware and everything is looking good except for this one major issue. Some component interferes with bluetooth every 3 seconds. It probably does not matter too much for most users, but when streaming data at maximum bandwith it is a dealbreaker.
We tried many things:
Does not help:

disable Wi-Fi
disable "improve location accuracy" using Wi-Fi and Bluetooth
disable Covid scanning
disable nearby device scanning
no bluetooth "app" to reset

Helps:

Fully disable location

Do you have any idea what is going on here and how to work around this issue?

Have you tried to perform your tests in a different environment? May be the problems are caused by other devices near-by.

@Robert good idea, but we tried different devices, different editions (T570 Wifi, T575 LTE), at diffferent locations, using different bluetooth sensors that work flawless with other Android devices. It quite certainly is an issue with the Samsung Galaxy Tab Active 3.


text:
Start/Stop Music playing when power is supplied via the USB cable
I'd like to use an old(er) Android phone as a Music Player left always connected in my car. I have an ignition controlled USB socket in the car, and would also connect the 3.5mm jack to the Aux In of the car. Is there a way to set a Music Player (e.g. MediaMonkey) to 'continue' playing when power is supplied to the USB charging cable, and then stop when power is disconnected?
The reason I'd like to do this is because the Infotainment system in my car (Mazda CX-5) is horribly slow to start up, and music on USB memory stick or played over Bluetooth from my phone takes 2-3 minutes to start up (whereas music connected via the Aux-In starts up almost immediately). I have Android Auto and that's even worse!
I've searched this (and other) forums without finding anything that does this simply.
Thanks!

I don't think that there is a music player that directly can start playing when USB is connected. But USB charging starts/stops is a global event which can be received by any app, therefore apps like tasker could be used to listen for this event and then send an command/intent to MediaMonkey to continue playing. Unfortunately MediaMonkey knowledgebase on that topic seems to be non-public. You could also create a post on for this topic https://www.mediamonkey.com/forum/

Thanks Robert. I'm a member over on media monkey, so I'll have alook around/ask on there.

Bixby Routines
If you have a newish Samsung device with bixby routines (found in advanced settings) then you can create a routine that triggers when the device begins charging that can send the OS's "play music" command, open specific apps, and call actions that those app registered with android. You might need to open the app, and then send the OS's "play music" command.
Automation apps
If you don't have a Samsung device, then there are apps that can likely solve your problem. An app called ITTT is a well known automation app that may solve your problem. It can detect when your device begins charging, and it can do one of three things: open an app, send the OS's "play music" command, or integrate with specific services, like Spotify, and use reliable platform specific commands such as playing a shuffled playlist.
If ITTT doesn't work, other automation apps may.

Thanks Grant, will have a play with Bixby as well. I'm making some progress now with Tasker, but it's great to have alternatives!


text:
How to Flash Patched_Boot.img via termux?
Is there a way to get termux to process Fastboot cmds or flash a patched_boot.img with out a PC?

fastboot cmd is usually Fastboot flash boot --slot=all magisk_patched-24314_GyPru.img so what would i type in termux

you realize fastboot is reading file from PC though? type in termux 'su; ls -d /dev/block/*/*/*/by-name/boot*'

https://forum.xda-developers.com/t/4356231

Community bump prevention: this question was closed because the question seems to have been abandoned (OP hasn't visited the site after posting the question, and no answers have score above 0). If anyone can evaluate the existing answers, feel free to vote accordingly and reopen the question (or mod-flag the question requesting for reopening). For anyone else having the same issue, please post a new question and refer to this question as additional context.

no, there is no way to unlock bootloader nor root your device from termux (except for nexus devices). you can however run fastboot commands from another rooted device with Magisk module, or flash partitions with dd if termux is running on already rooted device
$ su
# ls -d /dev/block/*/*/*/by-name/boot*
# dd if=/storage/0815-4711/patched_boot.img of=/dev/block/platform/11120000.ufs/by-name/boot_a
# dd if=/storage/0815-4711/patched_boot.img of=/dev/block/platform/11120000.ufs/by-name/boot_b

Bootloader is Unlocked, PC crashed and must flashed patched boot.img


text:
How to quickly go back to Google Maps start screen
When I first open Maps, I see a Search bar at the top where I can type in a place to go, I can click on the default quick-searches (Coffee, Restaurants, etc.), or I can just scroll on the map to look around. But if I start going deeper, e.g., looking at photos from restaurants, at one point I have to close a bunch of screens using a combination of back arrows, X's, and down-arrows to get back to the start screen.
I know they added a magnifying glass search icon  on some screens to quickly search for another place, but then I miss out on scrolling around with access to the default quick-searches.
Besides killing the app and reopening, is their another way to quickly (with one tap) get back to the start screen?  I've started to use Google Maps Go so I can open that and get to its start screen once, but after that it's the same problem.

(Mini rant: I find this particularly frustrating because a Go Home feature would be immensely useful in many Android apps, yet it basically doesn't exist as far as I can tell. But on websites, where it is almost completely useless, there's usually a pointless "Home" button.)

Welcome to modern (stupid) UX

I create a shortcut to the route on my home screen and tap that to get back instead of navigating through multiple backs etc//Good example of bad design by Google

This shortcut trick is handy when it's a new place I am going to and want to learn about it

Go back home (press the launcher's home button). Long press on Google Maps icon (on the drawer or shortcut), select Home.


text:
Lenovo Tab P11 erased recovery mode, need to hard reset with computer
I erased recovery_a and recovery_b, Unnofficial TWRP doesn't work. need a recovery that works. Won't boot into twrp and need a hard reset. Can't access OS but fastboot works.
HELP!

I would use the internal name of the tablet (for Lenovo usually something like TB?????) and check if you can find a download of the original recovery.

I found an unofficial TWRP Recovery image, but I have already tried to flash it.

stock recovery is restored automatically. depending on what you mean with "can't access OS" it may required to flash stock ROM

Recovery has been erased and userdata has been erased. can't access OS

I can access fastboot and test modes. Recovery mode has been erased via computer command and The actual Android system cannot boot.

fastboot: error: Cannot generate image for userdata

How do I flash stock ROM of Lenovo J606F? What commands and what image file?

booted to fastboot and ran fastboot format:ext4 userdata in cmd. But then I powered it on and it rebooted into FFBM Mode.

I don't know what FFBM mode is but guess you can leave it by vol + pwr combination for fastboot mode. stock ROM can downloaded here

from what I have read I think FFBM mode is Qualcomm DIAG 901D mode used for NV_items_reader_writer (yet another flash method) but LMSA is afaik official flash tool

If you find yourself in a situation where you follow the guide at https://unofficialtwrp.com/twrp-3-4-2-root-lenovo-tb-j606f/
only to find your Lenovo Android Device in a fastboot-only state, please use Lenovo rescue and smart assistant to flash stock recovery and the stock Android image to factory reset the tablet.
You can download it at
https://pcsupport.lenovo.com/us/en/downloads/ds101291


text:
VLC for Android: No connection to local network
All of a sudden, my VLC for Android app just up and stopped showing the local LAN network shares which are Samba running on a Xubuntu 20.04 host.  I have no clue to what caused this. I have verified that the share is indeed shared via this on that Linux host that has the samba service activated:
$ smbclient -L wilddog
Enter WORKGROUP\XXXX's password:

    Sharename       Type      Comment
    ---------       ----      -------
    samba_share     Disk      Shared Folder
    print$          Disk      Printer Drivers
    IPC$            IPC       IPC Service (XXXXX server (Samba, Ubuntu))
    testprinter     Printer
SMB1 disabled -- no workgroup available
$

From the VLC For Android app, all I see now is this:

EDIT: I have rebooted both the phone, and the Linux server, to no avail.  I've also restarted the samba server on the Linux server, also to no avail.
What do I need to do to diagnose this?

Have you checked the Samba log files on the server?

Ah. Yes. That.  I checked it, and no such connection from the IP address of my phone. So that leads me back to figuring out why the phone itself is not able to see that local network. Thank you very much. I'll self-answer this question with the details.

Robert's comment clued me into the fact that  the phone itself had somehow gotten into a mode whereby the main WiFI icon that is displayed on the phone did not reflect the connection status as it should have IMO. No indication about which WiFI it was connected to was available, until which time that I long-pressed onto that icon, and saw that it listed WiFI networks, but was not connected. Once I connected to my WiFI network, I was able to then see the SMB shares in the VLC app. See annotated screenshot below:


text:
Recover deleted file on phone using FBE
Suppose we have a phone that:

Runs Android 10.
Uses file-based encryption.

Suppose one of the files is deleted, but the phone is immediately turned off so as to prevent the deleted file from being overwritten. Can the file be recovered and decrypted? What if the phone runs on Android 9?

Each file in FBE is encrypted by a different random crypto key that is stored encrypted by a different key into flash memory. I don't know how many data traces are left in file-system after deleting a file but even if we assume you would be able to fully recover the encrypted file data and th encrypted file key you would still need to decrypt the key which itself is derived multiple times from keys of a higher rank. And everything depends on a key stored protected in the CPU protected Trusted Execution Environment of your system. To my knowledge this should be next to impossible.

And to my knowledge there is no difference between FBE in Android 9 and 10.

There's this answer about "recovering" the key for FBE, but I don't know if it may work as described.


text:
Failing to flash custom (Magisk-patched) boot.img to Samsung S20 FE (4G) with Heimdall
I am attempting to flash a Magisk-patched boot.img from Linux onto my unlocked SM-G780G. I have so far tried doing that using fastboot flash ... to which the device responded that it doesn't know the command.
The device is a Samsung Galaxy S20 FE (SM-G780G).
I then tried Heimdall v1.4.2 (on Ubuntu 20.4) and got this:
$ sudo heimdall download-pit --output bla.pit --verbose --stdout-errors
Heimdall v1.4.2

Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
      Manufacturer: "Samsung"
           Product: "SM8250"

            length: 18
      device class: 2
               S/N: 0
           VID:PID: 04E8:685D
         bcdDevice: 0100
   iMan:iProd:iSer: 1:2:0
          nb confs: 1

interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 02.02.01
       endpoint[0].address: 82
           max packet size: 0010
          polling interval: 09

interface[1].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 0A.00.00
       endpoint[0].address: 01
           max packet size: 0400
          polling interval: 00
       endpoint[1].address: 81
           max packet size: 0400
          polling interval: 00
Claiming interface...
Setting up interface...

Initialising protocol...
ERROR: libusb error -7 whilst sending bulk transfer.ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
 Retrying...
ERROR: libusb error -7 whilst sending bulk transfer.ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
 Retrying...
ERROR: libusb error -7 whilst sending bulk transfer.ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
 Retrying...
ERROR: libusb error -7 whilst sending bulk transfer.ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
 Retrying...
ERROR: libusb error -7 whilst sending bulk transfer.ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
 Retrying...
ERROR: libusb error -7 whilst sending bulk transfer.ERROR: libusb error -7 whilst sending bulk transfer.

ERROR: Failed to send handshake!ERROR: Failed to send handshake!ERROR: Failed to receive handshake response. Result: -7
ERROR: Failed to receive handshake response. Result: -7
ERROR: Protocol initialisation failed!

ERROR: Protocol initialisation failed!

Releasing device interface...

I've tried both with and without superuser context (sudo) and the result is always the same. I am also unable to retrieve the PIT file from the phone.
However, the boot loader is successfully unlocked as I can see in the freshly initialized (due to the data wipe) Android, while running, and also during boot (shows a warning regarding the unlocked state, which has to be dismissed before the boot continues).
I am successful in entering ODIN/download mode (holding both Volume keys while the phone restarts, followed by Volume+), but still nothing seems to work when attempting to communicate with the phone.
I also tried using JOdin3, which detects the device and all, but already fails to retrieve the PIT file as well. I suppose it must be using Heimdall under the hood (?) ...
What part am I missing? Has the procedure somehow changed for newer Samsung phone models?

NB: in order to get fastboot mode to work (which I had tried before), I had to disconnect a Yubikey that I was using on the system. After that fastboot devices properly showed the phone, but using fastboot flash ... was equally unsuccessful (I tried fastboot flash boot <file> and fastboot flash boot_a <file> to no avail). Prior to unplugging it (although connected to a different root hub), it failed to detect the phone in fastboot mode.

how about Magisk Installation Instructions

@alecxs could you point me to the part you specifically mean? I read it, yes, but as I tried to point out in my question any attempts with fastboot failed. Which was when I found out Samsung uses a proprietary mode and proprietary tool called ODIN of which Heimdall is an open-source counterpart.

patch the whole AP_*.tar.md5 file, flash from Odin together with BL, CP, and CSC

@alecxs Right, you realize that ODIN runs on Windows, though? Which is why I was using Heimdall in the first place. I'm on Ubuntu (also noted in the question).

if heimdall issue is with reading pit only, you can get pit from stock firmware too. you can get partition+file names from pit with hex editor manually or with PIT Magic, PIT Viewer. if flashing succeed but you get "Only official released binaries are allowed to be flashed" check KG/ RMM state

Thanks for the pointers, @alecxs! Much appreciated. Yep, it seems like I have to set up a Windows in a VM or on a laptop and try ODIN instead.

https://forum.xda-developers.com/t/4188991

from github issue #414: 1) make sure it's not usage problem with --no-reboot --resume flags 2) add 50-android.rules to /etc/udev/rules.d 3) compile libusb from source + recompile heimdall

from github issue #482: try this prebuilt heimdall

@alecxs it's not the --no-reboot --resume issue, but I'll try the other advice. Failing that I may have to install a Windows and use ODIN. I don't quite dare running ODIN inside Wine


text:
Certain videos pause on phone when headphones are attached
I have an Android 9 smartphone and headphones with separate jacks for audio and for mic. I only use the audio jack on my phone. The trouble is the following: when I play some videos with headphones attached they pause every second or so. When I click play they go on for another second and pause again. As this happens, the headphone icon on the top panel is flickering. This happened in media players, youtube app and youtube in browser meaning its not app specific. Even weirder is that it happens only to some videos. E.g I was watching a comedy show on youtube and it was fine. Right after that I tried playing a music video it did what I described above and repeated for any music videos I tried but not for any clips of that show, no matter the lenght. I have some downloaded music and on headphones I could only play things I listened to without headphones earlier. Anything else pauses.
Now, i've seen suggestions that say screen time settings and night time settings sometimes cause this but I double-checked and have none set. Turning battery saver off did nothing.
Any ideas?

Clean the headphone jack. It seems like it does not detect the headphone plug reliable. If that does not help it could also be a defect headphone jack (broken soldering point).


text:
How can I configure the clipboard of the Google keyboard so that it doesn't delete all items upon phone restart?
The clipboard of the Google keyboard remove its history upon phone restart. How can I prevent that?

I use a Google Pixel 6.

You can pin items to the clipboard by pressing and holding them and tapping "Pin" in the pop-up menu.
Restarting will empty the clipboard. Clearing app cache will NOT empty it. Clearing app data should clear the clipboard including any pinned items.
It may not be the same on every device. It could be another thing manufacturers can decide. I still have unpinned content in my Gboard clipboard from 10+ hours ago; Moto G Fast on Android 10. There are results online where people say it's removing items after "1-2 hours", but they're over a variety of years on a variety of devices with varying OS and Gboard app versions.
There are alternative Android keyboard apps that have extended clipboard functionality, but of course may lack other features or have even more.


text:
NexiPay app and Magisk
I'm trying to run a banking app called NexiPay (I guess it's available only in italy), but it doesn't start because it recognizes my system as rooted. I'm running LineageOS 15 (Android 8.1) and GApps.
So I've installed Magisk. Current version (24.3) seems to be different from what Magisk used to be some months ago. For example, there's no Magisk Hide and Magisk website has not been updated yet.
How can I hide the root to this app?
When I launch NexiPay, Magisk tells me that it's asking for root access.

After following the other solution, it still wouldn't work for me.
I managed to make it work by going into the Magisk settings and selecting the option to hide the Magisk app.

Magisk 24.3 uses a new feature called DenyList instead of Magisk Hide.
From one of John Wu's (the creator of magisk) tweets,

The new "DenyList" feature of upcoming Magisk versions is me preserving portions of the of hiding codebase and transform it into something I felt is valuable
DenyList, however, is only meant to "revert all Magisk changes". It will not attempt to manipulate any other signals on the device

Along with Denylist, in Magisk 24.3 there is also something called Zygisk. Basically, Zygisk will run parts of Magisk in the zygote process.
(Note: if you want to enable DenyList, you will need to enable Zygisk first.)
To hide root from Nexi pay, just enable DenyList to target NexiPay app. You can find it in the settings from Magisk Manager app.

Tap settings icon at top right corner of screen
Enable zygisk (this will require a reboot)
After the reboot, go back to the settings menu and check that "Enforce DenyList is selected"
Choose "Configure DenyList" and select NexiPay app

Actually I did already try this and it didn't work. I've just tried it again and it's not enough. I guess NexiPay is checking other stuff. I've read I should disable USB Debugging and remove the TWRP directory in the main root; I did both but didn't help. @Manchineel perhaps you can help? You're the only one who wrote about NexiPay in this forum.

@fedelibre was NexiPay already recognising your device as rooted before you installed magisk? If so DenyList probably won't help to hide, you might want to explore in this direction.

Yes, NexiPay recognized my device as rooted before I installed magisk. Then I uninstalled NexiPay, installed magisk, reinstalled NexiPay. But it doesn't help. So I should look for alternatives to Magisk... I will investigate and report here any success or failure with other modules.

I'm also interested in the solution to this problem. I have a suspicion that the app is somehow detecting that the bootloader has been unblocked, or that a custom ROM has been installed, independently from the actual rooted status. But I have no actual competence to try and solve this.


text:
How to Create a Virtual Machine on Android that Acts Identical to a New Phone?
I'm trying to create a vm/second OS on my phone because I need to install a program that can only be installed when booting up a phone after a factory reset. However, all of the vms I've tried open with an already functioning phone. Are there any that act identically to a new phone, even requiring you to sign in with a google account when you first open it?

What app are you talking about? I am not aware of a functionality that could restrict app installation to an installation directly after factory reset.

@Robert It's a phone lockdown software, maas360 to be specific, with two ways of installation, either by just installing the app from the app store and giving it admin privileges, or by installing it from the beginning stages of booting up after a wipe. I'd like to be able to test it the second way, without the need to wipe my phone or get a different phone to test it on if possible

A wipe deletes everything all data and all apps, so the an installation of an an app directly after boot is to my knowledge not possible on common devices. So you need the app to be installed as system app, included into the firmware which only works on a custom ROM or if you are the manufacturer of the phone.

@Robert I've messed around with it some and, while I'm not sure how it works, this is how it's installed. https://www.securitylearningacademy.com/mod/book/view.php?id=13794&chapterid=659 Somehow in entering the code afw#maas360 instead of an email it can configure in Device Owner mode. I need to test that mode, but can only install that mode if, upon virtual phone creation is takes me to connect a google account.


text:
How to force PD rather than proprietary USB-C charging?
My brand new S21 5G and my S10e don't work properly with Anker chargers.
This is partially Anker's fault and partially Samsung's.
Firstly Anker chargers such as the Nano II range use PowerIQ3 use banned proprietary charging modes that are unsupported by USB-C. This is instead of supporting USB-PD as they should be according to the spec. Their PowerIQ3 technology cycles between PD, QC 3.0/2.0, Samsung, and Apple modes in an attempt to fool older phones to work with it. This doesn't actually work.
Samsung also does something similar. My two phones negotiate PD first, but the phone decides to check the D+ and D- lines for a proprietary charging method, and that causes the Anker charger's cycling method to drop out of USB PD mode.
When the power brick and the phone implement multiple proprietary charging modes in addition to USB-PD everything goes wrong. Using a USB tester, you can see the charger negotiates USB-PD first and charges at full speed. However, after a few seconds, the phone decides to check the D+ and D- lines for a proprietary charging method, and that causes the Anker charger's cycling method to mess up.
Proprietary methods were disallowed in the USB-C spec for this very reason. If the Anker charger simply stuck with the spec and implement USB Type-C current, USB PD, and USB BC 1.2, you'd get consistent and correct behaviour all of the time and not have to wait hours for your phone to charge.
USB PD should always win but the way the complicated proprietary charging mode switching Anker have built into these chargers you end up losing out.
This combination stops USB-PD and drops down to a much slower mode which it can't get out of. The fast charging possible with Samsung's software changes is about 5x slower than it would be if USB-PD were implemented properly.
Is there any way to prevent Samsung phones from falling back to slower protocols?
Is there any way to force Samsung phones to stay in USB-PD mode with USB-PD capable chargers?


text:
How can I increase the maximum stack size of notifications in the notification tray?
So my current phone is a Samsung Galaxy S21. I receive a LOT of push notifications, by choice. The problem is, when I receive those push notifications for, say, Twitter, the number of notifications that are displayed in a single "stack" in the notification tray CANNOT exceed 24; once the stack reaches 24 notifications, I do not receive any further push notifications for that app. This is a HUGE issue when I'm trying to keep track of a big Twitter thread or watch for an important email. My previous phone, a Galaxy S8, had a maximum notification stack size of 40, after which the same issue occurred; this leads me to believe that there is some variable SOMEWHERE that can be changed to increase or decrease the stack size.
Just to clarify, since Google brought up similar questions but no relevant answers:

I am not referring to the notification badge displayed on the app icon on my home screen; I am referring to the notifications in the notification tray viewable by swiping down from the top of the screen. Image attached to show what I am talking about.

This issue is not app-specific; all apps seem to have a stack size of 24, whether it's Twitter, Gmail, YouTube, a game, or whatever. Each app DOES have its own stack, but each of those stacks can only go up to 24 notifications.

I have checked every setting I could access on my phone; none of them changed anything relevant. If there is ANY way to change the stack size, even if I have to manually dump my phone's kernel to my PC and use a hex editor to change the relevant bytes, I will do it.
Thanks in advance.

You can't unfortunately

There is no option is on any phone that allows you to do that, sorry.


text:
Flash custom ROM via EDL
I trying to find any way to flash custom ROM or some images on locked bootloader via EDL (device is Xiaomi Redmi Note 3 Pro, kenzo). I downloaded stock developer fastboot-EDL ROM and modified recovery.img to custom recovery, but when I boot phone, it's reboots again, and I see stock recovery (system partition was bricked). I saw KEYMASTER, CMNLIB and SEC partitions stores some secure-boot hashes. Any way to skip boot verifying? (locked bootloader, EDL, XiaoMiFlash 2017)

OP's previous question (for additional context): Unlock bootloader or flash TWRP with EDL on Xiaomi Redmi Note 3 Pro (kenzo)

I recommend you to unlock your phone first.
Then use Fastboot to install TWRP and then install your own ROM.
To unlock your phone, go to mi.com and sign up a new account then enter it into your phone and unlock it by mi unlock app:
https://en.miui.com/unlock/
or
https://mega.nz/file/xeQ3GRgQ#DpaEfaUSZZFBCQ6HOitWgQu9EMIl4q_XM8-eChUusbY

The OP has posted a question before this saying that the bootloader cannot be unlocked.

You have no other choice.


text:
Phone is not working and in fastboot device is showing as "???????????? fastboot"
I have a realme 2 pro and I wanted to revert it back to stock rom. I had orangefox recovery installed at the time. I tried flashing an ozip file for the device and just call it my stupidity but I the flashed that file as system image and because of that not device is not booting anymore. Both the system and recovery are inaccessible and the device when is fastboot mode shows as "????????????    fastboot". I tried to flash an recover image from fastboot but it game the folling error.
FAILED (Write to device failed (no link))
Can anyone suggest what I can do to fix it?

try twrp+magisk+patch if it had bootloader unlocked
take it to service centre - they can restore stock rom for free


text:
Detect the Incoming TCP Packets
I am developing a feature in my application for screen mirroring for which I need to open a wide range of ports (approx. 10000 number of ports) in my android system. It is a risk to open all these ports all the time.
I need to know if there is any mechanism to anticipate exactly which port will be used by the Screen Mirroring Server to send these TCP packets, is there any API or listener in AOSP which will be able to listen to the requests from the Server to open a particular port

Typically some sort of handshake protocol on a fixed port is used to agree on the used prot. I would assume that opening 10000 will fail as there is a limit on maximum open [file] handles that is much lower (and every open port consumes at least one handle). So my recommendation is to get and read the protocol specification of the used screen mirroring protocol.

I am not sure if in this handshake, the server will send the data regarding the port it will try to connect. Basically I want to avoid opening all the ports and want my server to intimate what port it want to use, so I can open only that port in my firewall


text:
How to prevent network connectivity after a phone restart before the NetGuard firewall starts blocking apps' traffic?
There seems to be a major vulnerability in Android: even when using firewalls these aren't active immediately after a restart.
The seconds before the firewall (NetGuard) starts can be used by apps that auto-start to send (exfiltrate) all kinds of data.
For example:

There apps that are installed by-default that can't be deinstalled even though I'd like to deinstall them and they are running by default and autostart which also can't be prevented (and I can see that these apps try to send data in the NetGuard protocols)
the keyboard "Gboard" could for example send everything one has ever typed on the phone including passwords within seconds, it also tries to "update your typing experience" from time to time even though it shouldn't and is blocked by NetGuard

How can this be prevented?
One way could be to always deactivate Internet before turning the phone off but that may not always work (for example when updating) and sometimes the phone could get turned off accidentally or because the battery goes empty.

Do you know the "Always-on VPN" functionality? I would assume that this was developer exactly for preventing situations when the VPN is not (yet) active. https://developer.android.com/guide/topics/connectivity/vpn#always-on

Have people tested whether this is reliable and sufficient? Why don't you post this as an answer? There is no hint or option for this in NetGuard so I need to create a new issue. Because the developer failed to enable Issues on GitHub I need to ask on the XDA forums.

I don't post it as an answer as I don't have any detailed knowledge on the "Always-on VPN" feature how it works internally. To my understanding it was developed e.g. for companies that want to make sure their devices only get network access through their VPN, so I would expect it to work properly but often features you read about don't work the way you imagine, therefore without personal experience or detailed knowledge on that specific feature it is IMHO not worth of an an answer.

I asked about it on the xda-forums thread because the GitHub issues are disabled here. However, the developer doesn't seem to care. You can comment if you think this is an important vulnerability to close. Also: don't check "Block connections without VPN" in these options or else Internet may not work, this may depend on your DNS settings.