text:
Rate limit notifications from an app
So when family and friends go bananas on a communication app, the phone spews alerts endlessly, one for every single message. Sometimes even every time someone starts typing! Some apps, like signal, provide an option to disable alerts for an hour or some other choice of duration. But not all apps have this, and I certainly don't want to disable all notifications.
Is there some way in android to rate limit notifications per app? I will live very happily the rest of my life if Snapchat can send maximum one audio/vibration notification every 10 minutes. Can I make android fix this for me, or is it up to every single app developer to implement this?
I already block and disable some notifications, and I've already set up "Do not disturb". I've never seen any option to avoid these notification torrents, though.


text:
Clear Data of Package for Single User
I am trying to clear the data for a few apps on a work profile without clearing the data on the main user account for my android phone.
What I'm trying for example is :
pm clear com.Microsoft.teams

Is there a way to clear just on the work profile and not my main account?
From my research, you can't seems to specify a user for this command unlike a few other commands: pm documentation

See the latest documentation. Or pm help | grep clear which shows clear [--user USER_ID] PACKAGE

You can specify the userID for pm: --user <USER_ID> . You just need to find out which userID your work profile has.

Thanks the both of you. I was able to figure out the user id and clear it with that option.

@Kayracer You can write an answer yourself showing the commands you have used to get the user id and then how you deleted the data.

Thanks to the commenters, I was able to figure it out.
I used Termux with root privileges, I typed the following:
To be super user
su

Then list the users
pm list users

The number in front of UserInfo{ is what you want
ie. in my case is 12
UserInfo{0::24} running
UserInfo{12:Work profile:35} running

Last enter the clear command
pm clear --user 12 <package to clear>

source: Stack Exchange

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

sort: votes


text:
adb install: downloaded apkm file from ApkMirror.com doesn't end with .apk
I'm attempting to install, via adb, Chrome Beta 104.0.5112.55 downloaded from APKMirror.
The filename is com.chrome.beta_104.0.5112.55-511205534_5lang_7feat_fdd8ce962abf141ecf575852ba260e4f_apkmirror.com.
However, when I run
adb install -r com.chrome.beta_..._apkmirror.com

it complains,

adb: usage: filename doesn't end .apk: com.chrome.beta_..._apkmirror.com

I tried changing the filename by appending an .apk but got

adb: failed to install com.chrome.beta_..._apkmirror.com.apk: Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION: Failed to parse /data/app/vmdl1212970952.tmp/base.apk: AndroidManifest.xml]

Most Android apps are today no longer shipped as a monolithic APK file that can be installed on every flavor of an Android device.
Instead Android apps are shipped as bunch of APK files the app is split into. The file you have downloaded from apkmirror contains such a bunch of APK file. For your convenience they are ZIPed into one file so you don't have to download half a dozen APK files.
For installing such an APK zip bundle (some times called app-bundle) you first need to unzip the downloaded file and then install the APK files using the adb command install-multiple and then list all the APK files you have extracted.
adb install-multiple base.apk filex.apk filey.apk ....

On Windows you have to manually provide all the file names.
On Linux/MacOS (assuming all extracted APK files are located in one directory) you can just use
adb install-multiple *.apk

and leave the resolving of the wildcard to your shell (e.g. bash).

adb install-multiple (get-item *.apk) for Powershell on Windows, no need to provide all the names by hand

@Soumya Usually in those apkm or apks files you download fro apkmirror there are all languages and all CPU-architectures present. Installing al of them will just waste space on your phone without any advantage fro you.

I was merely pointing out that "On Windows you have to manually provide all the file names." is not necessary, and a mechanism similar to linux/macos "*.apk" exists. Of course if you need to select a subset of the apks, then you need to pass the list by hand on all platforms.

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


text:
The calllog.db file remains the same even after changing
As you know on android call history in /data/data/com.android.providers.contacts/databases/calllog.db
path as sqlite file.
I change this file with adb push command then I will check on Dialer Call history application but it still same with old data.
If I am reboot emulator and reinstall Dialer application I can see new data.
How can I see new records without reboot emulator?
Is android have any cache db for calllog.db

On Linux just replacing a file does not mean it will be used on next write operation. If the process that uses the file you have replaced is still running and keeps the file open it can continue to use the file unless the process ends even if the file not accessible in file-system anymore. If you replace a file you have to kill the process that uses it (or somehow make the process close the file). When the process is restarted then new entries will be written to the new file.

SQLite databases are cached in the framework (system_server and zygote processes). It won't read your changed file until it's not restarted as Robert said.

Did you try force stopping the dialer app or by clearing its data (should likely force it to reload the db).

When we make a sql query with the adb command, the changes are reflected.
I mean when am I try to
sqlite3 calllog.db 'update calls set number='123' where _id=1'
Then I check on dialer application, changes are reflected.
But when am I try to change calllog.db file I see old data on application.


text:
Converting APKM to APK so that I can install it manually by a default installer
As written in the title, I just downloaded an official app from APK Mirror, it has 2 files apk and apkm and since the apk version didn't work, I tried to download the second one i.e. the apkm one. I don't know how to install it.

So I googled and found this. Yes, I'm aware of the article that says converting APKM to APKS, it doesn't matter because I have a tool to convert APKS to APK
I don't know if it's a scam or not  but the app that's called unapkm, after installing it, it doesn't have the "open" option and the app isn't appeared on the screen or perhaps I just don't know how to use it. Anyway, is there any chance to convert the apkm to apk so I can install it normally from my phone?

This is also discussed on reddit

Thank you. The thing is reddit is banned in my country, so your link, (I'm sorry) I couldn't open it. Could you tell me the main discussion plz? Thanks.

Possible duplicate: Creating universal APK form multiple APKs without having *.aab (Android App Bundle) file

@user516076 You can always read Reddit pages via Teddit, try e.g. this one: https://teddit.pussthecat.org/r/AndroidQuestions/comments/fv1haf/what_is_apkm_format/ (there are more Teddit instances if needed). Further, with UnApkm installed, have you tried to "start" the APKM file? Maybe the app has registered for that, like the installer reacts on APKs (and neither has an "open" option).

Does this answer your question? adb install: filename doesn't end .apk

Thanks for the links, I have read them all. The adb thing looks difficult to do, so I probably try it later. And one of your link from the reddit suggest using the exact same app like the link I provide i.e. unapkm, i've tried it but it doesn't work. I even tried to install the apkmirror installer from google play but it failed. It says The bundle requires Android SDK 31 but you have Android 11. What happened?

When I tried SAI installer, it said failed to allocate 68309932 because only 0 allocatable. What does that mean?

I think I have found the problem. I can't install the apk or the apkm because there's something wrong with the Androidmanifest.xml. I tried to analyze the app and compare it with the previous version, and when I replaced the file, it was able to be installed. If that's the case, what's the problem and what should I do to fix the Androidmanifest? Is there any related problem like this? Thanks

To the OP, I'm sorry about that, I saved the reddit as a pdf and uploaded it to a file host - https://easyupload.io/rkvl0t I don't like to regurgitate other people's comments as my own. To the moderator I posted another answer because I cannot comment.


text:
Replace default preinstalled Google apps safely
I have a Redmi 9C with Android 10, it came with several pre-installed apps from Google and Redmi, I used ADB to un-installed some apps that I thought was safe, but for some reason, some of those apps came back without a system upgrade (that I'm aware of), and the developer options that I had set up previously was wiped out. I'm not that familiar with Android, so please bear with me, here are my questions:

can I replace safely "essential apps" (such as phone, SMS, downloader, etc.) with alternative ones? I was a Windows user until Windows 10, then switched to Linux after MS started doing OS upgrade on the background without user's permission, it seems Google is start doing the same, is there a site with updated/reliable info about this topic?
is there a tip/trick to "not allow" Google to re-install those apps that I removed? Why only some of the apps came back and not the others? Maybe because the apps I'm still using needs some libraries from the apps that I removed? For instance I can't remove Google Pay form ADB (it's not listed there), and I've removed Google Wallet, now Wallet is back again and not showing in ADB!

ps: 1) ADB - I'm using Xiaomi ADB/Fastboot Tools 7.0.3, it's a jar file with UI frontend, so I'm not using command line.
2) My bad, did not write down the package name, will do next time/next packages.

Please include the command(s) you have used for "uninstalling". Google Wallet is the new name of Google Pay.

The packageName of an app can be totally different from the app name displayed on the Andrroid UI (because the app packageName can later not be changed). To get a list of packageNames and how to get the app display name is shown here: https://stackoverflow.com/questions/16650765/get-application-name-label-via-adb-shell-or-terminal

thanks for the tips, I've updated my post.

As long as you have the Google Core apps (especially Google Services Framework) on the device, Google has the possibility to do such things. Depending on how far you wish to go, there are things like "unofficial installers" for microG which do the replacements (replacing the GSF by the open-source microG framework (I'm not sure which of those did take care of GSF removal, but vaguely remember there was one; microg-unofficial-installer only describes what it installs so it might not work with GSF present).

Thank you all for the feedback, I'll take a look at microG and tutorial on ADB commands (it seems the UI is outdated and not reporting properly the installed apps.)


text:
Can I create link to a page in the home screen?
I'd like to have several collections of apps but also widgets. Problem is widgets can't be in folders.
But, could I just link to another page of the home screen? Thus each page would be my unit of organization. But I could access all of them from page 0 without scrolling N times.
Is it possible in some way?

There's no standard for home screen apps, so it depends if they support it or not...

Home screen and how the icons are organized there is managed by the selected launcher app. You can install other launcher apps that can have a totally different UI and usage concept see e.g. https://devsjournal.com/top-weird-unusual-launchers-to-transform-your-android-phone-interface.html


text:
Cannot Mount userdata partition on Android 11
I have pulled a block of encrypted userdata partition ".img" and trying to mount it on unecnrypted device (same device with encryption set to off). My device is rooted.
My userdata is mounted as ext4: -
/dev/block/dm-7 on /data type ext4 (rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,resuid=10010,resgid=1065,errors=panic)
I have tried these steps

Pulled the block on local system using adb pull - userdata_block.img

mounted the block on an unencrypted device over CIFS using busybox mount command - userdata_block is virtually present on /sdcard/temp/userdata_block.img

Want to mount this img file on device to check the directory status on Android 11 if all the directories are encrypted or not.

/system/bin/losetup /dev/block/loop2 /sdcard/temp/userdata_block.img
/system/bin/mount -o ro /dev/block/loop2  /sdcard/dummy
Getting below error on Android 11, same command works fine on Android 10.

mount: /dev/block/loop2: need -t

Does anyone has any idea how to fix this?

mount: /dev/block/loop2: need -t. So did you give -t ext4?

yes it says Invalid argument

are you sure you have pulled /dev/block/dm-7?

yes and redirected to an img file

try busybox mount instead. try loop,ro,noexec,noload,noatime. double check userdata_block.img is ext4 with xxd/hexdump. make sure file size (kb) matches dm-7 in /proc/partitions (sdcard must not fat32)


text:
How to change number of QuickPanel rows?
I have Samsung Galaxy A52 with Android 12. When I swipe down at home screen QuickPanel shows up with one row of icons. If I swipe again entire QuickPanel shows up.
I would like to increase the number of rows visible after first swipe. I searched Settings but I didn't find anything relevant.
Is it possible to add more rows? If yes, how?

Old article, but does this not work? https://www.xda-developers.com/customize-size-quick-settings-button-layout-samsung-galaxy/

I only know how to increase the number of columns (which would also let you fit more on one screen). If that's an option, watch out for GravityBox – a module for the Xposed framework that can do that and more.

@Firelord, the overall description looks like it for QuickPanel fully open (after second swipe). However I cannot even connect with adb, I have unauthorized device so far.


text:
Can I turn my Android to Linux desktop?
I want to turn my phone into a Linux Desktop when I connect it to an external display but not using screen mirroring (I.e., the external screen is running while phone screen is turned off).
There is something similar to my needs called "Samsung Dex" but I don't have it on my phone.
I found steps to install Linux Distro & open graphical desktop using VNC but never found a way to open it on the external display.
I also found Drivedroid but I don't want neither to run root (hence erase data and lose phone warranty) nor to use a computer as a device resource (CPU, Ram, GPU...).
All googling lead to "turn android to second screen" no matter how I rephrase it.
The only questions that is almost similar to my case are this & this.
All I am asking for is keywords to search for.
Keywords that I used to search for:

Ubuntu for Android: just gives me links to Ubuntu touch; not my question.
Docking android: gave me some results for devices that I can buy (like nex book that uses phone or RPI to run a semi-laptop).
Android as Linux Desktop: results for "use android as second monitor"

Android uses an Linux based kernel and some of the core components are Linux based but Android is not a Linux system (compared to other Linux distributions for PC). Especially the UI system is totally different from Linux X/Wayland. Samsung DEX is a proprietary extension of Android by Samsung. As apps can not control an externally connected monitor an OS modification is the only way to get something like a desktop.

@Robert so you are saying that there is no such thing as an installation of Ubuntu or Kali or Debian (even as emulation) on Android? is my last resort to install something like Ubuntu touch?

There are emulations but on unrooted devices they don't have a chance to get access to an external display. And on rooted devices I am not sure how much effort is necessary to send the display output through the USB port, assuming the phone hardware has the capability. The main problem is most likely that every phone has a different hardware and you need to directly speak to the hardware.


text:
Turn on screen without using any button on the phone
All buttons on the device are broken, device is on but the screen is off.
Is there any way to turn on the phone using USB or any other  way?
My phone is a moto e20 with no removable battery and no removable case. I need to use my phone once before sending it to repair and since Google's "Find my device" tool lets you play sounds, lock your screen and erase all data, it might be possible to send the power button signal from external sources.
Edit: Fingerprint sensor won't work either since the device doesn't have any finger registered.

What about the fingerprint sensor? Is it working and is at least one finger learned? Besides that may be able to connect a simple USB mouse via USB and use the mouse buttons to wake the screen.

The device doesn't have a lock screen password and the fingerprint sensor has no finger learned.

Warning: This solution only works if your phone is already on. Otherwise, your device will get locked and you'll have more difficulties.
After 2 hours of trial and error I discovered that using the Lock With Password"  otion on this link will activate your screen once. Don't forget to inmediatly unlock your device or it will get locked since it logs out from your Google Account.

Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.


text:
Is Android unit testing on a physical device actually a thing?
Firebase has physical devices for testing: https://firebase.google.com/docs/test-lab/android/available-testing-devices however it's a little expensive.
I was wondering if testing things on a physical Android device is a real thing and if there are frameworks for that. I know that there are unit tests that are mocked and run on the computer, but some things like the Android Media Codec Decoder can only be tested on the device

Not sure if this is a development topic or not. That said, real devices should be used for testing due to differences in chipsets/OS versions/OEM customizations that can't be done via emulator. Since scrcpy exists to drive a device from a PC, other projects like Smartphone Test Farm appear to aim for similar utility to be used at some scale within a business. Also just noticed the same question on SO. Generally physical device test is for things which can be affected by prior listed items.

what is your question? Define "actually a thing".


text:
Location indicator always visible
After a year or two of nothing, my Motorola Moto One (XT1941) with Android 10 again started to show location indicator 24 hours a day, 7 days a week:

Nothing, that I tried so far, worked. Restarting phone brings solution only for a few minutes, killing Google Maps also. The only workaround that I found is to permanently turn of GPS location in my phone. The moment I turn it on, I see that damn indicator again.
This is very frustrating to me. Is there anything else I can do to permanently get rid of it?

Unclear if you checked/tried Google Account Help-Choose which apps use your Android phone’s location You may also wish to check: Google Account Help-Manage your Android device’s location settings

On your device, have you checked under Settings › Location what app(s) last accessed your location? If the indicator is permanently on, maybe some app is permanently requesting the location. To find out if it is "the last one", tap on its name there, which brings you to its details screen. There, tap "force close" to kill the app. Should the indicator promptly disappear, you've found the culprit. There's also the privacy dashboard in settings telling you which app last accessed what, having a more detailed history incl. time of last access.


text:
scrcpy access problem with Linux
I have 2 Android devices: a tablet from Denver and a cell phone from Xiaomi (Redmi 9C), I installed scrcpy on my MX Linux pc, I have no problem to access tablet through scrcpy, but when I tried with Redmi 9C, I can only see it, the mouse does not work, did I miss some settings? The developer option is enabled (is there any other options inside developer options that I need to change/enable? I only enabled developer options).
note:

I've tried enable file transfer when plugin the USB cable, seems to make no difference and adb device command can see this device.
adb version 1.0.41

Looking at the issues page of scrcpy it seems that there are quite a few devices which have problems with scrcpy.

This is the solution given by alecxs.
Add Mi account and enable USB debugging (Security settings) option under Developer options.


text:
Is it possible to whitelist an app from Google Play Store?
It's actually not a big problem, but annoys my eyes when I usually intend to update some apps.

From the screenshot above, you see a name of an app and beside the name there's a warning sign and it said my device is at risk, though I believe that app is perfectly fine and there's nothing wrong with it.
This is when I tap the "See details":

There's also this setting:

I did turn on/off, and this is what happened if I turn it off:

Is it possible to remove that annoying notification by putting the app in a white list or something so that Play Protect wouldn't scan and would skip the app?
To simulate the goal I want, I backed up the app and uninstalled it:

And I want to be like this:

Is it possible to do this without uninstaling the app, but just whitelist the app from Play Protect?
Edit :
I just remembered that this would also happen when I re-signature an app by any tools that resign the original app from where it's originally obtained.
For instance, I downloaded an app from play store, back up the apk file and resign it this would happen and when installing it, there would be this notification:

But the app that I make an example above is the original app (I guess). Also, if I press 1) OK, Play Protect would do the job and the app wouldn't be able to be installed, but if I press 2) Install anyway (unsafe) (though actually there's no something wrong, so I think it's safe), the app would be successfully installed as normal.
This is the requested link from virustotal.com:

Can you upload the APK to https://virustotal.com and post the link to the result page?

@Robert I've edited the question as you have suggested and added the link.

AFAIK, it's not possible to whitelist an app on Play Protect.


text:
How to make an invisible (transparent/blank) app icon in Nova Launcher?
In Nova Launcher Prime 6.x, how does one make an app's icon invisible (completely transparent / blank)?
I can try to find (or create) an icon pack that contains a blank icon (preferably on F-Droid), but I'm hoping there is a faster solution.

Not clear. You want to make the icon of an existing (installed) app transparent? But still occupying space? What about its label? Should tapping it open the app?

@IrfanLatif Answers: Yes. Yes. No label (easy in Nova). Yes. :)

Took me a bit, but I figured it out:

Download and install Pocket Paint from F-Droid: https://f-droid.org/en/packages/org.catrobat.paintroid/

Create a completely empty (and transparent) .png file, which is currently the default image for Pocket Paint.

Save the .png file.

In Nova Launcher Prime, long press the desired app, click Edit, and then click the existing icon.

In Nova Launcher Prime, select Gallery apps.

Select the image saved in step 3.

Voilà!

I followed those instructions. But when I try to apply the picture it just makes the whole folder black. I'm at a loss.


text:
Pixel 6a does not show available Android security updates
On a Pixel 6a device, Android seems to have trouble finding the latest security updates.
On the one hand, it warns me under Settings->Security like this:

(!) Update this device
This device hasn't had a security update in 90 days
(Check for updates)

Fair enough, but when I do check for updates Android tells me:

Your system is up to date
Android version: 12
Android security update: 5 April 2022
Last successful check for update 13:55

(which matches the device's current time)
The expectation is that there is at least one more recent security system update available.
Especially, since a Pixel 3a device I have access to update to the 5th of May 2022 system security update, a few weeks ago.
What gives?
Is there some trick to persuade Android to check - let's say - more thoroughly for system updates?

Is your phone branded by a MNO? Branded devices often get delayed updates. It is known that the button "Check for updates" does not every time checks for updates. Try to repeat the update check multiple times...

Checking the official Factory Images for Nexus and Pixel Devices, looks like there were only 2 images with June 2022 security update: JP carriers and Verizon MVNOs, but no May 2022 images at all.

@Robert no, it isn't. It's a vanilla device from the google store. I repeated the check 20 times or so today already, including before/after a device reboot.

@AndrewT. AFAICS, all currently supported Pixel devices should have received the May and June monthly security updates, at this point. Looks like the OTA/firmware images are released on a different schedule and thus don't always include all the released security updates.

According to the news sources (XDA, Android Police), Pixel 6a got the first OTA a few days ago, bumping the security patch from April 2022 directly to June 2022 but not July 2022, and is still only available for JP carriers and Verizon MVNOs (as mentioned on the official page). Also, AFAIK, Google releases factory images at the same time the OTA is first rolling out, so it's usually published quicker than some users getting the OTA

@AndrewT. ok, then Google's statement on their bulletin page 'These bulletins supplement the Android Security Bulletins with additional security patches and functional improvements on supported Google Pixel and Nexus devices (Google devices). [..] Google devices start receiving OTA updates on the same day the monthly bulletin is released.' promises more than Google delivers. Do you want to post your comments (including the last 2 links) as an answer?

Statements from Google regarding their update procedures such as

These bulletins supplement the Android Security Bulletins with additional security patches and functional improvements on supported Google Pixel and Nexus devices (Google devices). [..] Google devices start receiving OTA updates on the same day the monthly bulletin is released.

(source)
should be taken with a grain of salt.
Clearly, the Pixel 6a is a supported Google Pixel device but didn't receive any OTA updates for May and June updates, even in late July, as reported by tech sites:

https://www.xda-developers.com/google-pixel-6a-first-update/
https://www.androidpolice.com/pixel-6a-gets-its-very-first-update-but-only-to-a-june-patch-level/

According to these reports, such a delay of security updates is common with newly released Google devices, and happened with past models, as well, in a similar fashion.

FWIW, my Pixel 6a device (bought directly from Google, from Germany) received its first monthly security OTA update on 2022-08-05 - and that's the June 1st update.

When I contacted support about not getting updates, their response was "wipe to factory reset and restore".  I declined, given the time required to set up apps that are not part of the backup regime.  Shortly after, the device got updated to Android 13 and August 5 patches.  But the September 6 patches still do not show up after 6 days.  My device was purchased unlocked from the Google Store on the July 28th release date.

It eventually updated.


text:
Is there a fool proof way to change the clock position on my lockscreen? Nothing else. Just drop it down by 50 pixels
Title says it all:
Is it possible to change the position of the clock on the lockscreen.
I need to move it downwards a bit.
I'm on a OnePlus 8 (IN2015_11_C.21)
Latest Android (12)

Since the clock on the native lock screen is baked into the system, I'm not sure if there's a way unless with a root (code injection wizardry) or a 3rd-party lock screen app.

Thanks @AndrewT.


text:
Can't restore (Nandroid backup) data partition (using TWRP) because boot gets stuck on "Phone is starting..."
I embarked on a planned factory reset and hence started the procedure with a Nandroid backup (via TWRP) of all available partitions.
Following the reset, after restoring the data partition from the backup, the boot sequence gets stuck on "Phone is starting...". After five minutes (or so) the phone restarts and then says:

Cannot load Android system. Your data may be corrupt. If you continue to get this message, you may need to perform a factory data reset and erase all user data store on this device.

...providing the option to "Try again" or "Factory data reset".
Restoring any other partition from the Nandroid backup produces no issues, it's only when the data partition (the most important to me) is restored does this issue occur.
The backup is not corrupted, as the digest verification succeeds.
Do I have any other options other than:

Discard the backup and start from a blank slate.
Start from a blank slate and manually extract the most important data from the data partition.

?
Ideally I'd like to be able to diagnose the root cause of the "Phone is starting..." issue, address it and continue to use my phone as it was prior to the first factory reset. I have done this restore process successfully before, but this time it's just not working for me.

Phone: Fairphone 3+
OS: Stock
Bootloader: Unlocked

Restoration procedure I do (following a factory data reset):

Boot phone.
Follow prompts to set same screen lock as prior to reset.
Restart phone into fastboot mode.
Boot into TWRP (using screen lock credentials to decrypt data partition).
Restore from backup.

The following procedure worked for me:

Factory reset data partition. If you can't boot, this can be achieved by running fastboot flashing lock, and then fastboot flashing unlock (because locking/unlocking the bootloader results in a factory reset).
Boot into the operating system and follow the setup prompts, ensuring that no screen lock is set!
Turn off phone.
Boot into TWRP.
Restore just "data" partition.
Reboot.
Re-enable screen lock as desired.

That's unnecessary. You can simply flash the remove lockscreen zip via TWRP. Works perfectly fine on Android 11 and 12.
https://forum.xda-developers.com/t/guide-twrp-zip-remove-all-locksettings-from-lockscreen.3790897/

Sometimes, bypassing screen unlock (as per one of the answers) isn't enough. Need to actually Format Data in TWRP.
Some recoveries can't deal with FBE and so you'd have to Format Data and disable FBE and then take a TWRP backup of that. Your ROM will basically be decrypted at that point. When you then do a restore, it'll work fine.
I've had this issue today, tried all sorts of things, ended up going with the above as a proper working solution.


text:
How to know if an app doesn't work because my phone doesn't support or it's just the app's fault?
When the internal storage (not the SD Card) in my phone is almost full, sometimes it makes some apps failed to be installed, but they will be able to be installed after I free up some space.
I installed three different apps today and they are from different developers, but they have the very similar behaviour when they're crashed. So, I concluded that my phone might have been broken or something. The apps can be normally accessed, but they will crash and force closed, the errors can't also be reported, I'm not sure.  I don't know whether my phone doesn't support the apps or it's just the apps that don't function well. I bought the phone 7 months ago, and I think it's unlikely that it's broken already.
How to know if it has something to do with the storage or some settings I don't understand perhaps? The app version, minimun SDK, minimum or maximum android requirements or whatever.

You would want to look at bugreport (you have to create it first) or in the output of logcat. Both are not meant to be understood by end users though.

"... it makes some apps failed to be installed ..." and "... when they're crashed ..." are two different problems. Do they fail to install or crash after installation? For the former issue do adb install to get the exact error. For the latter do adb logcat when the app crashes.

I'd assume this is about the Stack Exchange app that you mentioned in your next question. Yes, I checked the log using logcat and found that the combination of the library used in the app and the OS version made this crash.

@AndrewT. This question is 2 days ago before updating my phone. The app that I'm talking about is different. I was installing languages learning apps but they're not too important I think. Whilst my next question i.e. today's question is about the app version of Stack Exchange and I'm a bit sentimental, so I wish someone would tell me if there's anything I could do to run the app perfectly.


text:
copy play services from one device to another
I have an Android device (fire tablet) without playstore/playservices. By googling, I found tons of howtos to download and install the 4 necessary apk packages. Since I have several "offcial google" devices, I thought if it isn't possible to just download the apks from one of them, so I don't have to read a lot to find our which download source is trustable.
While I know how to list all installed packages and also how to adb pull them, I only found

com.google.android.gsf
com.google.android.gms
com.android.vending
but not com.google.android.gsf.login in the list retured by pm list packages.

Is this package somehow protected and hidden or where could I find it?

Google play service requires system permissions which means it can not be installed like an app. You need to install it as system app in recovery which requires a device with unlocked bootloader. In that case you can simply use a package from OpenGApps.org to install all Google apps and services you want.

I should have mentioned that the device is a fire tablet. According to the web, it is possible to just install the .apks downloaded from somewhere. I wanted to give it a try using my already existing ones from my trusted phones, but can't find the .login apk. :(

In my opinion it would make more sense to strictly following the tutorial you have and download the APK files (especially as the tutorials I have seen require certain versions of the APKs to be installed, not the latest version) . Before installing them you can verify their authenticity by comparing the signature certificate hash of one Google Playstore APK from your device and the hashes from the downloaded files. How to do so is explained here.

Checking the certificate is a very good idea, I think I will go this way. Thank you for the suggestion. Still wondering that I don't find this one apk on my devices, it seems to be quite special.


text:
How to Block ADs on Spotify (Android) with a local VPN?
Is it possible to block ADs on Android Spotify by using an Ad blocking (local) VPN? I have the feeling that Spotify is streaming ads https encrypted over the same server as music since adguard can't filter them

[comment copied over after migration] I've found myself that the Spotify apps on both iOS & macOS can get adverts past AdGuard. It can't get them past the same AdGuard on Safari on the Mac & fewer on Safari on iPhone. [Same for Farcebork, btw]

VPN based ad blocker can only block ads that are delivered from a domain that is only used for ads. Otherwise functionality provided by the domain would not be available. Additionally VPN based blocker have to maintain a list of those domains that should be blocked. If the service changes the domains frequently then VPN based blockers have problems blocking all of those domains.

Maybe a specified app like SpotMute or Ad-Silence can help with that? The latter is also available at F-Droid.


text:
Which soc is redmi note 3 snapdragon?
I have a redmi note 3 snapdragon 650(which is supposed to be msm8956) variant.CPU-Z is showing my soc as msm8952 which is name for snapdragon 617.

I am also not able to install adreno drivers(using magisk or recovery) for snapdragon 650 it says that this is for msm8956 but your device is msm8952 I installed drivers for snapdragon 617 but then the phone doesn't boot.

https://youtu.be/snJXwL2WVDk I found this video of CPU z on redmi note 3 his phone too shows msm8952 in the system tab

Sorry, in the device tab not the system.

maybe you have other device "Redmi Note 3 Pro" (kenzo)

I have faced something similar with my MTK G85 and this happens when your vendor (in your case xiaomi) does things in a hurry and uses some generic code/config files with SoCs similar to your one. For instance, my MTK G85 was detected as some MTK P series chip.
If you're already on the latest software version, try raising an issue in Xioami/redmi forums
Also, make sure you're not having Redmi Note 3 Pro which actually runs on an msm8952.


text:
JuiceSSH on Android not accepting IPv6 address
Using a current version of JuiceSSH on Android, I'm trying to set up a New Connection to my system at fe80::f9cd::4687::90cd::5da2. I've confirmed that I can ssh to that address from a Windows machine. But when I try to save the connection in JuiceSSH it tells me "Invalid Address". (I tried single colons too, no improvement. I haven't tried no colons yet.)
In case it matters, I'm using an Identity which has the same Private Key that I used from Windows, pasted into JuiceSSH as multiple lines between -----BEGIN OPENSSH PRIVATE KEY----- and -----END OPENSSH PRIVATE KEY----- lines, which seemed to be what JuiceSSH wanted to see (?). It's an ed25519 key, which JuiceSSH claims it supports; I'm not sure whether that's supposed to be indicated explicitly somewhere. But I wouldn't expect wrong key to cause an "Invalid Address" message.
I presume I'm missing something obvious. Any ideas on what would be welcome.
(BTW, I'm perfectly willing to try other Android SSH clients, but Juice seemed to be the most commonly recommended.)

Contact the author and ask why IPv6 addresses are not accepted. https://sonelli.com/contact

Tried that; silence so far. I was hoping that someone else who had used this successfully could describe how they made it work  -- peer support in absence of author support.

fe80::f9cd::4687::90cd::5da2 is technically not a valid IPv6 address.  IPv6 address components are separated by single colons, except that a single run of all zeros can be represented by ::, which is permitted only once.  It's so that something like this:
fe80:0000:0000:0000:0000:0000:0000:0001

can be more easily typed as this:
fe80::1

I understand that the invalid address worked for you in some places.  Software is free to take invalid input and try to figure out what you meant.  That does not mean other all software will interpret it the same way.
Using JuiceSSH 3.2.2 on Android 13 on a Pixel 6, I was able to enter a bare IPv6 address (using single colons), and it worked for me.
Double-check your entry to make sure you really did remove all the double-colons.  All it takes is one stray and it will reject the address.  Also make sure they were all keyed as colons (:) and not semicolons (;) -- on my phone, at least, they are nearly indistinguishable.

Ah. Different software is displaying these differently as well as accepting them differently
I'll give that a spin. Tnx!

@keshlam - Do let us know what you find.  I'm curious if Juice behaves differently on different devices/builds/etc.


text:
How to open a specific page in OneNote app on Android via adb?
I'd like to make use of an Android tablet to write on OneNote pages that I'm actively viewing in a Windows computer. From the Windows computer, I get two links when I right click on a page and select "Copy link to page". These links look like the following:
https://onedrive.live.com/view.aspx?resid=...
onenote:https://d.docs.live.net/...

The second link that starts with onenote:https://d... is useful when I want to jump to the page on another Windows computer - I can feed it to the Run window, and the OneNote app will display the page I need it to go to.

Question: with adb, can I achieve a similar operation by feeding the second link to the Android tablet, through some "intent"? I know very little about Java and have no idea how to make use of these related posts. Mainly, I'm looking for a long adb command with appropriate flags that may take, likely, the second link as input and have the Android tablet open the page by responding to some intent.
Eventually, with the long adb command, I see myself wrapping it in a bash function, and calling it by feeding in the full link that starts with onenote:https://d....

Update1: thanks to user M. A.'s answer, I can send the onenote:https://d.docs.live.net/... link to the Android tablet - However, OneNote APK seems to only comprehend up to the section name in the onenote:... link despite the whole thing consists of page-specific pointers.
Here is a demo where I fed in a full link pointing to a page, which was sent as an intent to only go to the relevant section.

PS: in OneNote, things are organized as Notebook/Section/Page/Subpage. In the screenshot above, the Notebook is "Paperless", and I have masked out the name for the section and page.

Update2: for the full page-specific URL to work, we actually need to escape the & signs in &section-id, &page-id and &end.

Related: Sending intents using ADB with additional action, data, and extra

When you have OneNote APK installed on your mobile phone, try this:
adb shell am start -a "android.intent.action.VIEW" -d " \"onenote:https://d.docs.live.net/....\" "

Note, the &section-id, &page-id and &end bits in the onenote:https://... URL will draw special attention from the interpreter (see Update 1 in the original question).
Spikatrix offered a simpler solution in the comment below: to wrap the whole OneNote link first as a string with quotation marks escaped, and then add another pair of quotes to pass the string to the shell.

Thanks for your help. Is there a special trick to wrap the URL fed through the -d flag? Per my updated screenshots, it seems like either the adb or the "shell on the Android tablet(?)" was trying to make more sense out of &section-id, &page-id and &end.

I tried to escape & as \& in the URL, and it worked!

Oh, I should have asked this before updating your reply - is there an out-of-the-box way to escape those & signs in the URL?

@llinfeng Try wrapping the entire string in quotes like so: "one & two" would be "\"one & two\""

@Spikatrix Perfect! This worked better than escaping &  signs! I ended up passing the OneNote link as " \"onenote:https://...&section-id={xxx}...&end\" ". (I added two spaces to make the inner string stand out.)

I ended up using the method documented in this gist: https://gist.github.com/llinfeng/affd7911645d7e8502b20d6f0a612842. In general, I find it helpful that Github "gists" should have better version control, and decide to leave all the code component there in a public gist.
The method described in the gist works in three steps:

Create a parser script that deal with the bits that contain &, namely, these three: &section-id, &page-id and &end
Create a wrapper function in Zsh that will pass the long OneNote string into the parser script, and
Create an alias in Zsh that can activate the wrapper function in step 2 with one as a shorthand.

With the alias defined there, issuing one "LongLink2Page" in Zsh will get the page loaded on the Android tablet. Future improvement would be to update the parser script to read directly from the clipboard.


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:
Any way to disable the quick settings panel on the lockscreen on Android 12 and 11?
Is there any way to disable the quick settings panel on the lockscreen on Android 12 and 11?
I want to disable it, just like it used to be on the older Android versions.
If I cannot the disable it, can it be abused if my phone is lost or stolen?

What phone model are you using?

Samsung Galaxy A52s 5G, but I might need this for some other phones I might buy in the future.

I downloaded an app called Cerberus Lockscreen and it did the job. Blocks both the shutdown and pull-down menu.
For older Android versions there is Lockscreen protector app, but it does not block pull-down menu but only shutdown menu.

It depends on the device(s). You can't do it on Pixel 6 for example as the setting to disable quick settings panel is not present in Android 12.
For Samsung devices, you can disable  as indicated here:

On Samsung devices, there’s a separate Lock screen menu so you can find the option in Settings > Lock screen > Secure lock settings. Once you enter your screen lock PIN/password/pattern, look for the Lock network and security setting. By enabling it, you’ll lock Quick Settings access from the lock screen.

For  Xiaomi, Redmi and POCO devices, you can disable it by following the steps shown here:

Go to settings”.
Go to “Notifications and control center”.
Tap “Items show on lock screen after swiping down”.
Disable “Control Center”.

I still have access to the quick settings.

It doesn't work for Poco. I cant disable control centre https://i.stack.imgur.com/QstI9.jpg


text:
What specifically does the Android bug report have?
I want to know what specifically does the bug report contain, because I have accidentally submitted a bug report to another app other than Gmail or Drive and I am afraid that my private data will be exposed such as my location data, SMS, call log, banking, etc.
What specifically does the Android bug report have?

First of all the bug report can only contain data from app that have crashed. Which app was it that crashed and thus caused the bug report to be generated?

According to Capture and read bug reports, the bug report conatins:

device logs, stack traces, and other diagnostic information to help you find and fix bugs in your app.

The bug report consists of multiple files that are compressed into a zip file and sent to the app developer(s). From the same above source:

By default the ZIP file is called bugreport-BUILD_ID-DATE.zip and it may contain multiple files, but the most important file is bugreport-BUILD_ID-DATE.txt. This is the bug report and it contains diagnostic output for system services (dumpsys), error logs (dumpstate), and system message logs (logcat). The system messages include stack traces when the device throws an error, and messages written from all apps with the Log class.
The ZIP file contains a version.txt metadata file that contains the Android release letter, and when systrace is enabled, the ZIP file also contains a systrace.txt file. The Systrace tool helps analyze the performance of your application by capturing and displaying execution times of your application processes and other Android system processes.
The dumpstate tool copies files from the device’s filesystem into the ZIP file under the FS folder so you can reference them. For example, a /dirA/dirB/fileC file in the device would generate an FS/dirA/dirB/fileC entry in the ZIP file.

It does contains message logs and other diagnostic outputs. It does not contain your messages (SMS, WhatsApp messages, etc), nor your call logs.
Also read Reading Bug Reports.

So it also doesn't contain my location data right?


text:
Access request to account by com.eg.android.AlipayGphone.perf
The message below keeps popping up.

Access request
The following one or more apps request permission to access your account, now and in the future.

Alipay
com.eg.android.AlipayGphone.perf

Do you want to allow this request?

How do I find out which account Alipay wants access to?
My phone is a Samsung Galaxy A22.

Which Android version is this? is it Oreo 8.0?

@M.A. Android version: 11

Maybe it's related to how Alipay handles account access to sync data.Try contacting AliPay via their support page: https://global.alipay.com/docs/ac/ams_oc/support

As a general rule: do not grant access to any app you do not know what it is doing.


text:
Google Assistant: Search screen is not offered anymore
Until a few days back, whenever I opened Google Assistant as "overlay" while having open another app, the assistant always offered something saying "What's on my screen?".
When clicking, it send the current screenshot directly to Google Lens. Behaviour is the same as if I'd do a screenshot and share it with Google Lens - just without the extra overhead of doing it manually.
Looked like this:

All of a sudden, this behaviour changed / stopped.
Whenever I open the assistant, it only says "How can I help?".
As I was using the screen recognition functionality VERY often because I read stuff in apps in foreign languages and could directly translate them on screen - it's really bad for me.
Do you know how to re-enable that feature?
I did NO change to my account like Web/Browsing-History or similarly, in case that matters!?
I already tried to tell Assistant "What's on my screen", or "Search my screen" in case they just removed the permanent button... But that doesn't call the function.
I already found the option to allow access to "Screen context" within the Assistant options, it's all enabled:


text:
Fix/reset default app / "open with"
I have a Samsung Galaxy S21 android phone, android 12.
There has been an issue with playing music from dropbox for many months now.
I can't get my old preferred default music player back.
If I just play a song from dropbox it opens in this player by default:

When I open a song by longpress and choosing "open with" it opens my beloved and preferred music player overlay:

It doesn't show a list of apps to choose from and there are no other music player apps installed on the phone.
There is no option to choose "always".
If I try installing a third-party music player for test, THEN the "open with" shows a list of players including the old preferred default app (white overlay player).
But no matter what I choose and go "open with, ALWAYS", my choice is being ignored onward and it opens this player again:

I have tried doing a reset of app settings on the phone, no change.
I wish to have my old good default music player back ;)
Any suggestions or help is appreciated.

What do you mean "reset of app settings"? Have you looked through Settings -> Apps -> Default apps -> Opening links to attempt to find the undesirable music player and setting it to always ask/clearing it's defaults?

@l3l_aze I mean I reset/cleared the settings for all apps so it's back to default stock. Don't remember what the exact function was called.
Yes, I have zero music players listed in "default apps"


text:
Why are there Yandex apps' APK files inside of my Samsung Galaxy A20s?
My phone is a Samsung Galaxy A20s (the model is SM-A207F/DS). I was using FX File Explorer (without root) to explore the Android filesystem of my phone. If some file was interesting, I would copy it to my storage and check it out.
While searching, I found some APKs like: Yandex Search, ruMail, and Yandex Zen. These apps were never installed on my phone, and they appear inside the /product/preload directory:

The ruMail and Yandex Zen are in /product/preload/SER/hidden_app
The Yandex Search is in the /product/preload/app/yandex.search directory

Where do these apps come from?

Looks like Yandex and Samsung have been in a partnership since 2011

Some device come with optional pre-installed apps. Those apps can be installed on first start, but they are not always installed (in difference to system apps which come pre-installed). As it is not sure that there is internet connectivity such apps are included into the system firmware.
On first start the apps to-be-installed are selected based on criteria like the country you are living in.
It seems like you have discovered the optional pre-loaded apps that are installed in some countries (e.g. Russia?). But you have never seen them installed you seem to live in a country where those apps are not automatically installed. But the APK files are still present so you were able to find them.


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:
How to connect Xiaomi 12 with Mac?
I just recently bought a new Xiaomi 12 (MIUI 13.0.17 Global) and I cannot connect with USB to my Macbook Pro (OSX 12.1)
The issue starts with the prompt (selecting between MTP, File transfer, charging, etc) not even showing once I connect with USB, the cable should be fine, even an old PC recognizes it perfectly.
USB debugging is enabled. What am I missing?
Thanks!

Found the issue, it was the adapter I was using with my Mac. Tried a different one and no problems after this.


text:
How to get fastboot identifier token to unlock bootloader on HTC One M9 where Android is no accessible?
I want to revive an old HTC One M9 rotting in my grandmothers locker for some years. I would like to flash the phone with a custom ROM but unfortunately it is locked,

so I can't access Android.
However according to the HTC documentation to unlock the boot loader on has to enable developer options in Android settings first:

you will need to first manually enable OEM unlocking in Developer
options in order to allow the bootloader to be unlocked and proceed
with the next steps.

Apparently without doing so it is not possible to get the identifier token which is needed to unlock the bootloader.
fastboot oem get_identifier_token
< waiting for any device >
                                                   (bootloader) [KillSwitch] : /dev/block/bootdevice/by-name/frp
(bootloader) [KillSwitch] Last Byte is 0X00, disable unlock
(bootloader) [KillSwitch] oem unlock Turn Off!
OKAY [  0.063s]
Finished. Total time: 0.063s

Is there any way to unbrick this phone?
UPDATE:
As suggested in the comments I tried to flash

the original RUU ROM to restore a proper state

I got it here: https://htcstockrom.com/htc-one-m9
The following steps are suggested:

Enter: fastboot oem rebootRUU
Now enter: fastboot flash zip update.zip
Once the installationis finished, reboot the device.

However fastboot oem rebootRUU makes the device humming and blinking but does not lead to a status where I could successfully upload the file (same problem described here):
https://www.youtube.com/watch?v=VVG4kT-LiQQ&feature=emb_rel_end
I can upload it in normal download mode but there I get:
FAILED (remote: '9 RU_SECURITY_FAIL zip from usb command in download mode')
fastboot: error: Command failed

The whole process is well documented by HTC for their devices: https://www.htcdev.com/process

@Robert I know, I followed the steps but the device is locked, so I can't make the configurations within Android settings, which are required to get an identifier which is needed to unlock the boot loader.

The problem is not that it is locked but that the installed software has been modified unauthorized. So you first have to flash an original RUU ROM to restore a proper state, then boot the phone and enable OEM unlock.

@Robert Thanks for the good advice! I updated the question...

The MMO TOOL HTC Module has a feature to get token ID.

You may have to search it by yourself to download it.

Please explain a little bit about it.


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 mislead Play Store location other than using VPN
I want to deceive some apps like google play, or other apps in general, to make them think that my location is somewhere else and not in my country.
The reason I'm doing this is because, suppose there's a game launched or an update that is just available in a country X, but it's not launched yet or even not available in my country, I can access the app or feature by using something without really going to the country X. So far, the suggestion I found is using VPN, but that doesn't work. How to do this?

VPN for the purpose of spoofing location is a  poor tool because 1 and billing address is used to determine your Play Store accessibility // If your device is rooted, you can spoof your location more effectively but that is also unlikely to help you (second link)

Related somewhat

This answer to use alternative app stores from the duplicate is very relevant.


text:
Change IP identifier of an Android phone
There's a social media app that I had installed on two Android phones. For a reason I cannot explain, one phone was "banned" from using the app. I contacted customer service but with no reply. No matter what account I use to log in, if I sign up for a new account, or reinstall the app, the app says my account was suspended. On the second phone, everything works ok. They are both connected to the same WiFi, so clearly they are banning some identifiers of the phone.
My question is, is there a way around this? I can already join using one phone, but it's an old and slow one. There must be some hack to change the IP viewed by the app. By the way, I'm not doing anything illegal, I'm just an IT amateur enthusiast.

They probably aren't using your IP address, because that tends to change quite often. There are a lot of different unique and stable IDs that they could be using, including advertising identifiers, serial numbers, MAC addresses, IMEI or ICCID numbers, and more. Without knowing what they're using, it's hard to know how to help you. Do both phones have SIM cards? If you swap SIM cards, does the problem follow the SIM card, or the phone? Have you tried resetting the Advertising ID? Have you tried wiping the phone and setting it up from scratch?

If it is an old phone then most likely they use the ANDROID_ID. This id is persistent and is generated on first boot. On a non-rooted device you ca only do a factory reset to change the ANDROID_ID.

In case this is an XY-problem, mentioning the name of the app may help in determining which identifiers are actually used.

@ Robert, clearing GSF data had a similar effect way back // not sure if that's the case subsequently


text:
How to recover files from a Pixel 3 XL that cannot boot anymore
My Pixel 3 XL is up-to-date regarding the OTA updates i.e. I have the latest firmware installed.
I've never done anything special regarding "tweaking", such as enabling the developer mode i.e. the developer mode is unfortunately not enabled.
I was browsing the Internet and the phone suddenly rebooted unexpectedly. Then it was in a reboot loop. I pressed power and volume down buttons to enter the boot menu.
The boot loop stopped but I was unable to do anything to make my phone boot properly again. In the recovery menu, there is no option to wipe the cache partition.
There should be roughly 400 MB of free space on the phone. I was thinking that maybe this could have been the cause of the issue.
When the phone is off and not plugged to the charger, the percentage of battery decreases. When the charger is plugged, the percentage of battery does not decrease but does not increase either. It seems I cannot charge the phone anymore. Currently remains 13%.
When the phone is off and I press the power button, the Google logo shows up and the progress bar below has just time to appear before the phone vibrates and goes off.
I don't care much saving the phone, but it's extremely important to me to be able to recover the photos it contains (standard DCIM folder).
Most of what I found googleing so far is about wiping the cache partition, but there is no such option on my Pixel 3 XL.
Since the developer mode (USB debugging) was not enabled when the phone was working fine, I cannot use adb to pull files. I can sideload though. As far as I understood, in my situation it is not possible to enable the developer mode.
I've just heard about TeamWin Recovery Project, and still trying to figure out if this can help me.
How can I, at least, backup my photos?
Of course the best would be able to boot the phone normally, but really my first goal is to save my photos.
Is there a way to reflash the firmware with the same version, or another version, without losing data, just like what happens on a regular update e.g. when a new Android version is deployed?
EDIT: I was wrong, the percentage of battery dcreases even when the charger is plugged, meaning that soon I won't be able to even turn the phone on.

flashing OTA zip from recovery menu is possible, not sure it will fix

The berry charging problem may be coincidence but it may also be the actual cause. Assuming the battery (or it's controller) is near death that could explain the sudden reboot and the boot loop (the power drops and the CPU resets). That you can't charge the battery could be also indicate a battery problem. Have you tried to boot while charger is connected? If that does not help replacing the battery may make the phone bootable again.

Thanks Robert for your answer, yes, the phone is now permanently plugged to the charger because that's the only way not to drop to 0%.
I did try to boot with the charger plugged but it did not help. I ordered a brand new battery on Ali Express and will try to replace it as soon as I receive it.

Thanks alecxs for your comment. Since I already have the latest version of the system, will the phone accept to flash OTA again with the same version?

@Robert: is the controller of the battery on the battery itself, meaning if I replace the battery I'll replace the controller too? Otherwise, how do I replace the controller if its death is the root cause of my problem?

The chance that the controller is the problem and not the battery is in my opinion very very low. A bad battery is a very common problem on Smartphones.

disassembly device and charge battery with external charger like this. try from recovery with next OTA

@Robert: you were right! It was the battery. I ordered a new one and replaced the original one, and now my phone works just fine! I managed to backup everything. Thanks a lot for the hint!


text:
Genymotion ARM Translation Tool Image for Android 10.0
I'm currently trying to get Genymotion up and running. I'm installing an app which requires ARM. I'm running Android 10.0 (Samsung Galaxy S10), and for the life of me, I can't find an image for Android 10.0.
I've found images for Android 8.x and below, but I believe that the images aren't compatible with the newest version.
I just need a zip image of an ARM Translation tool for Genymotion Android v10.

Genymotion is the wrong emulator. It bases on VirtualBox and thus can not emulate a different CPU, it can only pass through the CPU, so you are limited to x86/x86_64 if if you have an Intel/AMD CPU.
For older Android versions there seems to exist an extension that allows to run 32bit ARM (ARMv7) apps on Genymotion emulator but that tool was never officially supported and there are no releases for Android 10 and higher.
The only emulator I know that can run ARM on x86 is the one shipped with Android Studio/Android SDK. Use an ARM based image (will be a bit slow) or a Google x86 image (the latter images contains an internal ARM emulation layer).

You can add images to the Genymotion player and get it working. I did it on a previous PC  with an older version of android. I've also used Android Studios emulator and got the same error on the Pixel 5. I just want the version of this image for Android 10.0.

@DawoodSulaimanSyed Yes you can add images but all images are x86 based without the capability to run ARM apps. The mentioned capability to run ARM apps on an x86 images is as far as I know only implemented in the Google x86 images for Android emulator. And to my knowledge it is not possible to run such an image on Genymotion.

https://github.com/m9rco/Genymotion_ARM_Translation
I want this but for Android Version 10

@DawoodSulaimanSyed you can follow issue #18 on the GitHub repo: Android 10 support needed

@Robert I've seen that issue but wanted to further investigate too see if I could find anything. Since there, so far, isn't such a thing, I'll just go back to Android 8

You can try Android 11
https://github.com/niizam/Genymotion_A11_libhoudini
It's worked for me

While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference.  Link-only answers can become invalid if the linked page changes. - From Review


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:
APK files download will not work
In Facebook Messenger, I found this slot machine I wanted to download. I use iPhone 8 Plus for everything along with my Windows 10 computer at home/work computer, plus I'm always on Google as my main email provider. I just switched to iPhone only for tracking my kiddo so I'm still not sure how all this will work. I get the link to download it on my phone. I open it up from my computer, thinking it would be best for more viewing on my monitor. It says:

android.permission.REQUEST_INSTALL_PACKAGES
android.permission.INTERNET
android.permission.ACCESS_WIFI_STATE
android.permission.ACCESS_NETWORK_STATE
android.permission.CHANGE_WIFI_STATE
android.permission.VIBRATE
android.permission.REQUEST_INSTALL_PACKAGES
android.permission.INTERNET
android.permission.ACCESS_WIFI_STATE
android.permission.ACCESS_NETWORK_STATE
android.permission.CHANGE_WIFI_STATE
android.permission.VIBRATE

"Waiting for device...."
From iPhone, I have to open it in Safari. Well, I made Google my browser and do everything with that on an Apple phone. Stupid really, I should go back to Android, just can't afford it right now.
So that is why I'm trying to download this link and it did. It just can't open it after saving it without some type of installer. So APK files are where I'm having issues.
I'm a newbie here.  I really need to be educated with simple step-by-step help. Can anyone please try to help me?

.apk files are meant to run in Android OS only, just as .exe files are meant for Windows. You can't run files meant for one type of OS for another. It may be possible to run this on windows on emulator or sideload ing, which has it's own limitations //I am not familiar with either but do know that there is a learning curve// On Chromebook you can run Android apps without any fuss// tl:dr not possible the way you are trying

First of all, APK (Android apps) can't run on iOS. That's given. Second, when you opened it on the computer, did another app/emulator appear? Otherwise, what Windows version are you using? AFAIK, APK also can't be opened on Windows by default, so there's something else that intercepts the installation.


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:
I cannot root my Android subsystem on Chrome OS
I want to root my Android subsystem (I believe that is what it's called) and I have gone on many sites that tell how to do this. I still cannot do what I want to do. I have an HP Chromebook 14a with Octopus Android 11. I want to root the Android on my Chromebook so I can use apps like GameGuardian.
I have gone onto sites like Github with their more modern tool, CrAnberry. Others are more outdated, and thus, they are practically useless. There were no results from either Github or the rest of the World Wide Web.

Please describe what you want to do, what you already tried and what where the results.

Xda Dev is probably where you'll find the best Android rooting information.

I'm trying to figure that out for days.
Nolirium seems to have stop working 2 years ago.
There was a newer attempt by CerisWhite, the CrAnberry, but it doesn't work on newer updates running Android 10 in the containers.


text:
Media of WhatsApp app disappeared
yesterday I noticed that my all media from WhatsApp application were deleted or disappeared. While I check the usage of the application, I saw that user storage is still big enough to store media (about 20 GB).
The media not deleted only from the gallery. It is also disappear from the media section at the chat (every chat).
What could happen? And if anybody know how to fix it and restore it?
I am using Nokia 8.3 with Android 12 operating system.
Thanks :)

Did you by any chance "clear data" of the WhatsApp app, or use storage cleaner apps to free up the storage?

Nope, there is still the data app storage like it's still there (on the settings I see the app data usage and it's up to 20-25 GB)


text:
Is there a way I can make squircle the permanent icon shape?
Android on my Nokia 6 sets circle as the default app icon shape.  I discovered some time ago how to enable developer mode and switch to squircle, which gives a larger icon surface with more information.
Unfortunately, every time I restart my phone, it defaults back to circle, and I have to manually change it to squircle again.
Is there a way to lock this setting so it won't reset when the phone is reset, so I won't lose my squircles?

That depends o the used launcher app. I use Nova launcher which allows to select the icon shape persistently.

I'm just using the default launcher.

Like Robert said, this depends on the launcher app (though this could also be implemented using icon packs I suppose). Look into your launcher settings. If you don't find what you are looking for then replacing the launcher app is the only way forward.

Just use a launcher.
Nova launcher is a good launcher. But there are more online.

do you have links to Nova or others that you'd suggest?


text:
How do I connect to a MSCHAPv2 VPN?
I can connect to my Office VPN. The config screens look like this (see images).
I am running Android 11 on a Pixel 2XL.
When I try to add the VPN details, I can't get it to work. Is it because I can't use MSCHAPv2? Am I missing something?
(The main config screen only has the login name, that's it)

Could you mention the device model and Android version? AFAIK, MSCHAPv2 support is pretty new; since Android 11.

Done! Thank you....

So... Can't be done?


text:
HttpCanary target app uses a non system certificate
I'm looking for a way to bypass a target app using a non-system certificate. The HttpCanary app itself does give a 'solution' however it's incredibly unclear:
Goto Settings->HttpCanary root CA settings and export HttpCanary.pem, and then reverse the target app to replace the cacert file.

I feel like I've looked all over, but it seems like no one is talking about it.
I've looked into the AndroidManifest.xml of the app to find the certificates the app uses, but that just pointed me to the system and user certificates.
Next I looked into /data/data/<app>/files/ of the app which does contain a Certificates.pem file, which contains a list of different certificates, so maybe if I replace it with HttpCanary's certificate it could work?
Anyway, I'd appreciate any insight on this. If you'd prefer to discuss it in private just let me know.
Thank you for any help.

I think you are facing the common "How to proxy an Android app on Andorid 6+" problem. The problem is the same for all proxies, therefore my answer on SO for Fiddler should be helpful to understand the problem.

@Robert My main device already does have canary's certificate trusted by the system and I've tried SSL unpinning on an android emulator running 7.1. None of which seemed to help. I've tried quite a few versions of android and different methods. Only one I haven't tried is decompiling the apk and editing the network security config, which I will get to later today, though I'm not too sure if that'd help despite the others not helping.
Either way these methods not working is exactly why I'm confused as to where to look next. Thank you for your help <3

If the proxy root CA certificate is correctly installed but certain apps to not accept it those apps may use certificate pinning. You can try to modify the app small code or use Frida to modify it at run-time on rooted devices


text:
Forbid system to change orientation
I recently "upgraded" against my will from Oreo to Pie, and a problem that wasn't there came up:
I have apps that fine control the orientation: Rotation Control, and Tasker (they don't fight).
But every time I turn off the screen for a little while, the system overrides my apps and the phone is back to portrait!
Any way to FORBID Android to do that ?
I also noticed an orientation-related animated icon on the corner, next to the app history button, when the screen orientation is in disaccord to the accelerometer. This clearly indicates that Android added a (stupid) feature.
Rooted
I believe the solution might be to prevent system to see the state of the accelerometer, but without compromising everything else.
.
Hated this Pie ! Not only has this problem, as it also overrides my screen brightness. And they completely misorganized the settings and the volume menu from the previous version.

Rotation Control works fine for me, and I'm on a stock device?  Or do you mean you don't want AOD to change orientation?  I'd suggest checking out your system values via SetEdit, though I'm not sure if it's due to lack of root or not but disabling Accelerometer-Rotation didn't disable system-side rotation, you might have better luck.  Also there's a rotation lock accessibility feature, might be worth taking a look.

Thank you for the tips. The rotation is DISABLED on the accessibility, but the thing (Android) rotates anyway: I set REVERSE on Rotation Control app, I turn off screen, and the thing goes back portrait. It's not a modded system. Default Pie Android. I wouldn't like to disable the accelerometer. It's like crippling the phone to work around a problem that shouldn't be there in the first place...


text:
How "turn on data" works
Instead of letting all the apps connect to internet, is it possible to let selected apps connect to internet?
Hence my question how "turn on data" works?

Have you tried using "NoRoot Firewall" APK from Google Play?

(I did a long ago)Firewall drop/reject app basis requests. means app is constanly sending request which causes performance strain.

Without modifying the app, I don't think there's a way to stop them from trying to send a request anyway.

Thats why trying to know how "turn on data" worKs. Perhaps, can get insight!


text:
how do I prevent the 'open with' dialog from popping up?
I'd like to know if it's possible to disable this dialog:

Two apps I'm trying to use at the moment open this darn dialog window: Tailscale and GitHub. I'd like to open the links inside the respective applications. GitHub works, but I was going to submit an issue and the GitHub app is trying to force me to open it in the browser. As far as Tailscale goes, I can't log in because it redirects me to the external browser instead of opening inside the app, thus not receiving the hash that's required for logging in.

Maybe this helps? https://android.stackexchange.com/a/228986/131553

@beeshyams Thank you. Unfortunately, that didn't work: for the GitHub issue, choosing GitHub as the application, just throws me back to the same page; for Tailscale, it just loops the 'Open with' dialog.


text:
How to Force Dark Mode if "Force Dark Mode" from developer options doesn't work?
Even after activating the dark mode option from developer options in the setting,

some apps still have a white screen.

Although few apps have been successfully forced in the dark mode.

Is there a way to force the app to have black background somehow?

Note that aside from @MorrisonChang 's answer, you can still give these a try:

Many devices have a native accessibility setting called "high contrast" mode; this will usually achieve a similar effect to Dark Mode.  Note that there is generally a similar feature called "invert colors" which, while not as aesthetically pleasing, can at the very least help with the glare when you have an app that doesn't work with Dark Mode.
Note that Chrome itself (or potentially your native browser, YMMV based on make and model) has at least two flags that can be toggled for Dark Mode (actually, these may also vary based on device and architecture), they might help with apps that call the webview class through intent:
chrome://flags#enable-force-dark
chrome://flags#inherit-native-theme-from-parent-widget

The High contrast does work! Thank you so much!

TLDR: Ask the developer of the app to support Dark Mode.
Android 10 added support for Dark Mode/Dark Theme in apps. Prior to Android 10, light/dark mode was supported via theme/style library. As you've discovered there is a 'Force Dark Mode' setting in Developer Options. From the documentation:

Force Dark analyzes each view of your light-themed app, and applies a dark theme automatically before it is drawn to the screen. Some developers use a mix of Force Dark and native implementation to cut down on the amount of time needed to implement Dark theme.
Apps must opt-in to Force Dark by setting android:forceDarkAllowed="true" in the activity's theme.

So it is on the developer of an app to support Dark Mode.
Also realize that the developer may be using a third-party framework similar to a game engine which doesn't check any theme state.

Another option is to try the DarQ application for Android 10 and higher.

DarQ provides a per-app selectable force dark option for Android 10
and above.
It uses a root or Shizuku (ADB) service to apply the theme
seamlessly and quickly, without needing an accessibility service. DarQ
also provides an option to apply the system dark theme (as well as
selectable force dark).

Refer to detailed instructions for setting up shizuku
This works perfectly for apps that have an option to force dark mode see sample screenshots below:

Credits: Quinny899 XDA images


text:
How can I bookmark a local file on Android Chrome browser?
I have a HTML file stored on the memory card of my Android phone. I can open it in my browser (Chrome) but cannot bookmark it -- the URL is content://com.google.android.blah.blah... (I was expecting file://...) and appears to expire after some time.
Howe can I get a permanent bookmark to a local file?

Which version of Android are you using? Have you tried to input the location manually as file:///storage/emulated/0/...?

@l3l_aze file:// protocol only works for certain directories on Android 10+, see Local files revisited: Opening local HTML files (file:///path/to/file) in Chrome on Android 10.x

A bit strange the URL starts with content://. That means it's accessing a content provider. Is that from an app?

I had the same problem after upgrading to Android 10. I used to be able to set a bookmark in FireFox even after upgrade. That stopped working as well.
The only solution I have found is to use a HTML Reader. Here is a link to one I have found to work well. https://play.google.com/store/apps/details?id=in.vineetsirohi.htmlreader


text:
How to transfer Chrome start screen links to a new mobile phone?
On my old mobile phone (Samsung, Android 10) on the desktop, I have many folders with website links (you know, the ones you can create in Chrome when you select the "..." menu and then choose "Add to start screen").
Now I got a new mobile phone (Samsung, Android 12) and recognized that the Samsung Smart Switch tool doesn't copy the links from my old phone.
I know I could open every link separately and then bookmark it, but this is cumbersome and not an option I want to consider since I have collected many links over the years.
Is there a swift way to transfer the links from one phone to the other?
 - or -
Do you know where on the phone the start screen links are stored?
(then maybe a tool like TotalCommander would be able to copy it via a WiFi connection).

Sorry! check this https://android.stackexchange.com/questions/224433/how-do-i-backup-my-website-homescreen-shortcuts

@M.A. - Thank you :-)    I will look into that.

Save all you homescreen links as bookmarks, then follow instructions here to sync them on all your devices: https://support.google.com/chrome/answer/165139?co=GENIE.Platform%3DAndroid&oco=1 foll

The question asks about transferring home screen shortcut links. This answer won't work because they are handled by the home screen app, not Chrome.


text:
Revert volume button behavior
I recently "upgraded" against my will from Oreo to Pie, and two problems that weren't there came up:

The volume button used to change the notification volume. Now it changes the Media
The icon right below the level indicator used to expand two other columns of levels, enabling me to control the media and ringtone level. Now it opens the settings instead.

Is there a way to revert these stupid changes ?
I imagine XPosed must have a module for that...

First point- it's an Android version  planned change 2. Gravity Box module can do what you want 3. Follow this to install Lsposed 4. Depending on your magisk version, you may need to install Zygisk version 5. Links were valid at the time of writing the answer, you would need to install later updated versions

Thank you. Will try those. I write xposed for habit. It's LSPosed I have. In fact, I had to migrate from Oreo only to  be able to use LSPosed

Hey, @beeshyams, GravityBox exceeded the expectations ! Make it an answer and I'll mark it as solution

Thank you but I don't have gravity box being on Android 12 and it would make a poor answer without details. Kindly self answer with details, so that it helps others too and yes ping me for an up vote

One XPosed module, GravityBox, fixed both my problem (credits to beeshyams).
After installing it (if you are lucky), do mark under Media Tweaks, Force ring volume control and Expanded volume panel
Tested only on GravityBox [P], but probably valid for any version


text:
How to use Nearby Share to send files from an Android phone to a Windows PC?
I occasionally need to transfer files from my phone to my PC. Connecting a wire is much hassle and Bluetooth transfer is slow. It seems Nearby Share allows sharing over both Bluetooth/Wi-Fi, whichever is available. Both my PC (Asus Windows 10) and Android device (OnePlus Android 12) are connected on the same Wi-Fi network, so I should be able to take advantage of it for fast file transfer.
Both my PC and phone are running Nearby Share. Yet, when I try to send a file from the phone to the PC, it is stuck on the "scanning" step. The phone does not detect my PC as a possible recipient, even when my PC is set to "I can share or receive content from: Everyone nearby". I am not sure what other setting needs to be changed.
Question: How to transfer a file from an Android phone to Windows PC using the built-in Nearby Share feature over Wi-Fi when both devices are connected over the same Wi-Fi network?

Android just launched the exact feature I needed as a new dedicated application for Windows: The New Nearby Share Beta App for Windows | Android
It requires a Google login which I'm not a big fan of. But at least this is an answer to the original question in case anyone is looking for something similar.

You can't. The Nearby Share in Android (made by Google as a system utility in latest versions of Play Services) and the Nearby Share in Windows are two different software utilities.
An alternate way should be using MixPlorer to set up an FTP server from Android and connecting it to Windows File Explorer (make sure to increase the FTP timeout in MixPlorer since the default is 5 mins afaik)


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:
Measure power usage (wattage, voltage and current) while charging an Android device
I am using Samsung Galaxy S21. While charging my phone with a USB-C 65W Lenovo/Chicony power adapter with outputs supporting DC 5V/2.0A, 9V/2A, 15V/3A, and 20V/3.25A, how can I know exactly what power wattage is my device getting charged with? I tried using the Ampere app and the values range from 1000 mA to 2600 mA while the Voltage revolves around 4.1V?
Is there an app that can help provide power input details? Are there Android APIs to provide such information? Is it fine for me to keep using that charger? I understand Galaxy S21 supports USB C with power delivery, so it should be able to select the optimum voltage to charge my device?
From an article, I was expecting my charger to provide a 15W output but voltage x measured current using the Ampere app doesn't seem consistent with that number (5W?). What am I missing? How does USB Type C power delivery work in this case?

So in your opinion is the optimal voltage the maximum (to get the maximum charge)? You know that fast charging decreases the life time of the battery? The only reliable way to see what voltage and current is used is a hardware dongle that measures it on the cable.

No, I don't expect fast charging. Probably, the use of optimal is not correct. I wanted to know how does the adapter and the device negotiate what voltage and amp rate to use? Wouldn't there be some logic?

@MukulGupta yes their is a logic. But you won't find it because it's proprietary ;Market is flooded with at least 6 competing fast charge technologies. Do you expect them to reveal their secrets? //If your device is rooted, you have ways to control // See the charging algorithm
(Source
) of an Anker power bank to get a sense of how complex it can be.

USB PD is fairly complex //besides, it won't fit into "optimal" as asked in your question because legacy devices may be toasted, if optimal power is supplied

If it's only to know the voltage and amp rate you are currently charging at for personal knowledge and not necessarily dependent on using software for calculation, I agree with Robert's comment about the dongle for I bought 1 about a year ago from an Oriley parts house around 8 bucks. Works flawlessly!

This needs a rooted phone in recent android versions. It works on all samsung phones i have used.
Using terminal emulator use this command:
while true; do cat /sys/class/power_supply/battery/current_now; sleep 9 ; done

Thes commands will print current every 9 seconds. Voltage is usually constant from chargers(not exactly sure) but as per my experience the higher the current the better the charger. This solution may nit work for you but i could work for other rooted users.

Hey, just adding that yes, voltage is constant from the charger. What can change is voltage between chargers. My new tablet eg can get up to 60W from a wall charger if the charger allows, and from the PD spec, you can see that for 60W it would be around 24V i guess, with 2.4A of current.