text:
How to turn off CPU cores on Samsung Galaxy A8?
I need to turn off CPU cores in order to make energy measurements of sets of cpu cores in isolation (meaning that I want to run an application on a set of cpu cores and turn off the cpu cores that are not in the set). I looked at the documentation on the android linux kernel source and it says the following:

Q: How do i logically offline a CPU?
  A: Do the following.
#echo 0 > /sys/devices/system/cpu/cpuX/online
  Once the logical offline is successful, check
#cat /proc/interrupts
  You should now not see the CPU that you removed. Also online file will report
  the state as 0 when a cpu if offline and 1 when its online.
      #To display the current cpu state.
#cat /sys/devices/system/cpu/cpuX/online

But when I write 0 to the online file, it still reports the CPU as being online even with superuser permissions and marking the file as writable (chmod +w).
I imagine that the kernel is enabling the cpu again after I disabled it. Also I did not try to turn off CPU 0 because in the same documentation it says that it's not removable in some architectures, this behavior is happening on other CPUs.
Do I need to rebuild the kernel in order to enable the cpu hotplug or is this an architecture specific problem? Maybe my cpu doesn't support hotplugs.
What I've tried by now

Writing to /sys/devices/system/cpu/cpuN/online with a rooted device. (echo "0" > ./sys/device/...../online)
Changing the kernel to a custom one and trying the step above again. (Kernel installed was Quantum Kernel)
Using kernel adiutor to turn off the CPUs on the CPU tab (this turns off the CPU for a while then it turns back on again)
Using su on adb shell to change file permissions on sysfs (chmod 664 /sys/devices/...../online) and then trying to write to it.

Device Information
Model: Samsung Galaxy A8 (SM-A530F)
Android Version: Android Pie (9)
Kernel: Quantum Kernel V4
Kernel version: 4.4.111-Quantum_pie.V4.0-A530F
Processor: Samsung Exynos Octa 7885
Architecture: aarch64
EDIT: Forgot to mention that my device is rooted.

This helps on Galaxy-S7:
echo 0 > /sys/devices/system/cpu/cpuhotplug/enabled
echo 0 > /sys/devices/system/cpu/cpu0/online


text:
Galaxy Tab S3 suddenly can't support SD cards
After the Sept Update (now shows "Software update to T827VVRU3CSH4), my Verizon Galaxy Tab S3 stopped "supporting" the SD card that I've been using for the past year or so.  It now does 1 of 2 things for all SD cards:

Displays a message "Unsupported SD card".  "This device doesn't
    support this SD card.  Tap to setup in a supported format".  I've tried formatting the same, previously working SD card a few times now, but no luck.
I've also tried 2 other SD cards, but they too cause the same, repetitive formatting prompt.
Doesn't recognized at all

Has anyone else experienced this recently?  I'm wondering if it might be a bug in the recent update, or something specific to my tablet + SD cards.

Have you tried a different SD-card? Or at least remove and re-insert the sd-card to make sure that the cause is not hardware aging of the connectors.

I tried rewording the description to better clarify, but yes, I've tried several SD cards, and they all cause the same, endless prompts for formatting.

source: Stack Exchange

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

sort: votes


text:
Droid Turbo 2 storage doesn't clear
We often get out of storage messages on our Motorola Droid Turbo 2 phone. We delete an App, and, say it's a 100 MB app, we only see about 10 MB free up. Likewise we've transferred and deleted gigabytes of pictures and videos from the phone, but only a tiny amount of space gets freed up. We're deleting and deleting and deleting, but we still have no room.
Right now, looking at "Internal shared storage" - It shows 23.27 GB used of 24.06 GB but only 5.06 GB used for Apps and 7.32 GB used for imaged, 18.73 MB for videos, 0 for Audio, 475 MB for other and only 1.34 MB for cached data (so it's not cached data). Those don't add up to anywhere near 23.27 GB! Apps and Images numbers go down as we delete, but the total GB used barely moves!

What is happening? How can we get our storage back?
Per Robert's comment, we downloaded Disk Info, screen shot below. But, all it did was show that we used most of the "Data". There's no insight as to what is using it, or why as soon as we delete apps, photos, and videos, most of the amount we just freed appears to be instantly taken back up.

Possible duplicate of How disk space is used on Android device?

No, in the question on that thread, if you add up the subcomponents they are very close to the total. It doesn’t explain why mine doesn’t add up to a value even close to the total.

Please see my answer to that question. I don't think there's any space left for confusion related to Android storage.

To total storage size shown in the settings has often nothing to do with reality. Use an app like DiskInfo to see the real values.

Irfan, your answer doesn’t provide a solution to our issue. Our phone is not rooted, so we can’t do anything you suggest.

@Robert We got enough free to download DiskInfo and used it [Fortunately it's a very small App]. All we can find is that "Data" used reported by DiskInfo is equivalent to the total shown in "Internal Shared Storage". We can't find any information on what is actually using up that data and why or how to free it... ultimately we need to be able to delete whatever is taking up this space. We keep deleting apps, photos, videos, etc. but not getting our space back.

Have you tried a reboot? If you have Android 8 or newer it will then perform a file-system check (see https://android.stackexchange.com/a/171936/2241). May be this recovers the lost space.

We have tried rebooting and it didn't help. We have Android 7.0 Nougat

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


text:
Can I open a second Gmail account in a separate app?
I currently have several Gmail accounts, one for work, and the others personal. I'd like to keep these separate so I can forget about work on the weekends, but I'm finding it hard to do right now.
Is there a way to open the work account in a different app (E.G., Outlook) but not have it show up in the regular Gmail client as well?

Try K-9 Mail. .

If your company uses Google Enterprise and your Android supports work profile, then you can have separate them for personal and work purpose.

Google Mail supports the IMAP protocol. Using this protocol you can use any regular mail app you want.

I know I can access the mail via any app, but the problem is that the Gmail app keeps fetching that mail too.

@RodeoClown with the open source email client I mentioned you don't need to add Google account to device.

Thanks @irfan latif. That might be an option. The only issue is that I actually want the account for the calendar, I just want the email left out of Gmail.

@RodeoClown there are 2 Google accounts in same user profile. Calendar app should have access to both accounts. Gmail app should have access to one account. Any other app(s) which should or shouldn't have access to one or both accounts? Please edit your question to add these details.

Unfortunately the answer is that it will depend...
It will depend how your work email is setup and/or the device being used.
Option1 - Android Enterprise
If your organization has an MDM (mobile device management) and they support a configuration called Android Enterprise it is possible they can distribute another instant if Gmail that keeps your work and personal email separate.  You will need to contact your companies help desk for more info.  Note your device must be new enough to support Android Enterprise.
Option2 - Samsung Devices
Some newer Samsung devices allow you to do this with a feature called Secure folder.  Secure folder allows you to add applications like gmail to the secure folder.  This allows you to run another instance of gmail or most other android.
Hope that helps


text:
Get raw app usage data
Android seems to keep a log of the past week of app usage. It seems that there are many applications that are able to get this "App usage" permission and by querying some underlying api get all the app usage data from your phone. It shows launch times and duration of specific applications. Some applications that can read these data are: https://play.google.com/store/apps/details?id=com.a0soft.gphone.uninstaller and https://play.google.com/store/apps/details?id=com.huybn.UsageHistory. While it seems that many of these applications have ways to export this data I was wondering if there was a way to export this data without an app as the above apps each have an export format that really can only be read on the android phone.
TLDR; Is it possible to grab Application Usage Data via ADB or as a file on the internal storage (maybe in /data/system/something?)

From JB to Kitkat, usage stats were stored in /data/system/usagestats/usage-history.xml. After that, it has been split to multiple (daily?) files. I currently cannot find my notes on those separate files, but see e.g. here for more details.

It seems that I need my device to be rooted in order to see those files. I am assuming that the apps listed above can read those files because they have the permission that allows them to have "usage access". Is there a way to give adb usage access? I've noticed dumpsys shows the last day or so but not the entire usage history that the apps above can see.

For direct access to those files you'll need root access, yes. No idea how to widen the window for dumpsys. And as for giving ADB usage access, that would need root again to exec the grant (if it's possible at all – and even then, I guess you'd have to use some API to access those data).

Thats quite frustrating. Good to know though thanks!


text:
How can I share my free internet vpn connection with my laptop?
I am getting the free internet connection through both HTTP Injector and Anonytun, I want to get the same fast connection in my laptop as in the android phone?
Please use simple language since I'm not exactly very convulsant with these things..but I,m also not thaat dumb...hehe :-). Thank you.

Duplicate of How to share VPN connection with devices on hotspot?

The easy Way...
 1. Start your VPN on your phone
 2. Install/Use Clockworkmod's USB Tether.
2b. Use PDANet/Foxfi for wireless sharing.
The Clockworkmod/PDAnet tether app will connect to the internet like any other app;
through the VPN.

Paid apps, depend on Wi-Fi Direct.


text:
Make an Android app keep its spot on the home screen on uninstall/reinstall
When developing Android apps, I will often end up reinstalling the app I'm working on (deliberately after uninstalling it, or when the build signatures are different).
It's bothersome to always put this app back on the home screen where I want it. And if I don't, I either have to type its name in the app directory (which can take a few letters depending on how similar its name is to other apps) or scroll to find it.
Has anyone found a way to have an app find it's previous spot on a reinstall, or something that would make finding it easier ?
I'm familiar with Tasker and Llama, but couldn't find such options.

Why are you using different signatures? Anyway if you are installing new apps e.g. via adb I would also use adb to start the app. In the end you could have different shortcuts on your PCs desktop to start your app. No need to do that on Android side.

I have two build types: debug and release. The release type is signed while the debug isn't. So when I change build variant, it requires me to uninstall the previous version to install the new one.
I didn't think of using the command line or shortcuts, I will try that, good idea !

You can change the package name of the debug build, then there will be no signature conflict anymore: https://developer.android.com/studio/build/application-id#change_the_application_id_for_build_variants

Not quite what you asked for, but you could put a Tasker shortcut on the home screen, and have that task just open the app. You could also have that task try different package names in order to support both your debug and release versions.

That indeed did the trick ! Had to buy Tasker AutoLaunch (~1€) but well worth it, thanks !

I've done similar, wrote a small helper app that just serves to send various intents to open other apps.


text:
App whitelist in stock android
Is there a way to create a whitelist for apps in stock android?
Ie. I would like to limit what apps are possible to launch, for example by password protecting them.
Anything resembling kiosk modes or family locking is of interest.
If possible I would like to accomplish this without third party apps.

"Stock Android" is not really specific since each manufacturer can customize its Android and called it "stock ROM" and might add this feature to their stock ROM, unless you mean AOSP/vanilla Android. Android itself provides dedicated devices, though I'm not sure if the use case is suitable for you.

However, some possibly related questions that might be of interest: How to disable third-party apps?, Enable and disable system apps via ADB

Why don't you setup a Guest or secondary user account and configure it? Given your requirement I suppose you want to share your device with an another person.


text:
the EZ file explorer ftp on huawei pro 20 android 9
So i am trying to transfer some files from my pc to my android and both filezilla and the standrad windows explorer ftp wont connect i tried the 'wifi ftp' app on android store too but it wont connect to that either? using windows 10.

How your PC and Android are connected to each other? What address did you put in FileZilla?

its the standard ftp server that ez file explorer come with


text:
Any way to disable notifications' sound when screen is on? On Stock Android
Is there any reasonable way to disable all android notification sounds (only) when your screen is on, but keeping them working when screen is off?
By 'stock' I mean a Pixel (3) device.

Rationale: If my screen is on, it means I'm actually actively looking at it. I turned it on, and if I'm not looking at it anymore, I'd lock (turn off) it again, or the auto turn-off timer will do that for me, preferably in the shortest amount of time possible, saving battery.
The nature of notifications, as the name imply is to notify. If I'm looking at the screen, I don't need an annoying audio cue as well to notify me of anything: I will see the visual cue.
I've already been notified.
The default behaviour seems rather dumb and unthoughtful to me, and it's beyond me why they wouldn't give such an alternative option.
I've encountered this option on a custom ROM I've used on my OnePlus 3T before, and it was a blessing.
As such, is there a way to fix this (IMHO, terrible design flaw)?

I'm currently testing to see if the app Dingless will work. I should mention however that unfortunately for some reason it's not compatible with my OnePlus 3T running stock OnePlus Pie.

Would this suffice if the default notification sound is changed to none when the screen is on, then back to your default when the screen is off? Automation apps such as MacroDroid and Tasker can do this easily.

@Firelord Yes, off the top of my head I believe the practical results of that method would fulfill all the requirements I was aiming for, and I couldn't think of any meaningful side effects. I'll take a look into that.

Can't upvote this more and weird that so few people are annoyed by this terrible flaw. I'm  going to give a shot to Automateit app.

For what it's worth: After reading the comments here, I've installed MacroDroid, and created the following auto routine: "On screen unlocked -> silence the notifications and disable vibrations -> only if I've not enabled Do Not Disturb". "On screen off -> do the reverse with the same 'only if' condition". 1. I didn't use "On screen on", because that also silences the phone alarm. 2. I added the 'only if' condition, so that I have a way to silence the phone and keep it silenced after I turn the screen off. I.e. I can do it by enabling the Do Not Disturb mode.

So I've tried the app dingless, and it totally works, even on my Galaxy A52s (Android 12). You can even customize it to not vibrate at all, driving mode and a lot more.


text:
How to remove an app from recent apps list?
We have had the recent uninspired idea to let a SmartPhone upgrade itself to the "Pie" Version of the "Google" "Android" Operating System.

Now, although everything went smoothly, we have discovered to our utter amazement that we are no longer able to close a Mobile Software Application at once. We are able only to close all of the running Mobile Software Applications at once.

No matter how much we have been searching so far, there is no obvious individual "Close" Button for each Mobile Software Application in this Latest Version.
Does anybody know how to close them individually, in a gentle way? We are not referring to any Forced Closures by means of terminating them.

Here: https://support.google.com/android/answer/9079646?hl=en from https://www.google.com/search?hl=en&ei=kNidXa-LJaG-vASJ4LuIBQ&q=google+support+android+close+apps+recents&oq=google+support+android+close+apps+recents

As mentioned in the comments the way to close individual apps in the Samsung One UI is to simply "swipe" that app away.
The two gestures I have here are swiping up on the app to close it or swiping down to maximise it.

Swiping doesn't actually close the app.


text:
Local equivalent to adb install
With a PC connection and adb, I can install packages by running
adb install foobar.apk

There is also an option to downgrade a package to an earlier version and keep data (as long the app itself did not introduce any incompatibilities in the later version):
adb install -r -d foobar.apk

Is there an equivalent local command which I could run from a terminal session (or any other way to downgrade without a PC connection)?

The local pm command can do this. You need the following things:

A terminal app. (adb shell will also work, but then you might just as well use adb install).
A way to get root permission on the command line (usually su)
A copy of the APK on the device, e.g. by downloading it using a web browser.

Open the terminal app, then run:
su
pm install -r -d /sdcard/download/foobar.apk

Command line options are the same as for adb install: -r will replace existing packages, -d will downgrade if necessary.

adb shell doesn't need root access which is a big step for majority of the users. So you can't say them equivalent, but both are commandline solutions. Btw there are workarounds to run adb shell on device.

pm install is equivalent in that it installs APKs and is capable of downgrading, just like adb install. It is true, though, that pm requires root while adb install doesn’t. adb shell just gets you a command line, which is the same thing that the terminal app does; neither requires root per se. Or did you mean adb install? If you have a way to run adb install on  the device itself, without requiring a PC connection, feel free to post this as an answer.

adb install executes adb shell pm install at back end, so they are essentially the same thing. Point is to connect adb server to adbd, then you may execute any command adb XYZ. See this: https://android.stackexchange.com/a/216474/218526

@IrfanLatif why not make this another answer? Both pm and local adb do the trick, each coming with their own prerequisites. Which of these two is easier depends mostly on your local device configuration.

It's already answered many times in different questions. You may consider updating your answer.


text:
Methods to modify Ambient Display
I am trying to modify Ambient Display as the one in my ROM is missing on some features, such as Pick up and Hand Wave gestures.
I have researched a bit and found that Ambient display feature(s) reside in SystemUI.apk and framework-res.apk and I have successfully pulled them.
Is there any way to integrate/enable the features?

Pulling the APK files is easy, but writing them back is not that easy. Without root or unlocked bootloader it is impossible.

I have been able to enable the features, albeit in the xml files only. I have root access and unlocked bootloader. I have successfully recompiled the apk and installed it but the system is crashing now. Any ideas on what could possibly be wrong with the recompiled and signed apk?

use adb logcat to see what is going wrong. It works already while the boot process has not yet finished.


text:
How to switch on Samsung Galaxy when Power Button jams?
Since my smartphone's casing is so tight, I had to press the buttons harder, until the power button got permanently stuck. Now I dont't know how to switch on my Samsung Galaxy without using its power button.
I already tried booting into the "download mode" but it does not work.

Even if you would manage to power up your device you won't get far because long pressing the power button for ~10 seconds usually initiates a hard reboot. Remove the casing and get your device to a repair shop that is IMHO the only thing you can do.

that's sad to hear. but, thank you.


text:
Can't connect to Walmart in-store WiFi with LTE ZTE Maven Z812
The problem started about 10 days ago (10/01/2019) after some changes were made to the Walmart in-store WiFi configuration. Since then I can't connect to the in-store WiFi from my LTE ZTE Maven Z812 smartphone.
The phone seems fine, connects to all other networks. Other phones also connect just fine to the Walmart in-store WiFi network. But when I try to connect to Walmart WiFi with Z812 I get an error WiFi connection failed and no IP address.
Resetting the adapter, forgetting the network, and rebooting the phone did not help.
I noticed that the store recently split 2.4 GHz and 5 GHz access points, there are different ESSIDs for them ("Walmartwifi 2.4" and "Walmartwifi"). The Z812 does not see the 5 GHz AP but sees 2.4 GHz just fine. I tried connecting to 2.4 GHz AP from another smartphone and it works just fine.
Any ideas what might be wrong? Is Walmart blocking certain models/manufacturers from using in-store WiFi?
Additional info: I don't think it is MAC filtering. It feels like something is broken in the IP negotiation process, but I don't understand why this specific phone and this specific network.

Blocking on Wifi level can only wok on base of the MAC address of the Wifi chip. Before Android 8 the MAC address was static for each device, therefore blocking would be possible, however since Android 8 for privacy reasons Android should use  MAC Randomization (depends on manufacturer if enabled or not).

Please use this link to regain access to your account by merging them.

This appears to be an interesting but known issue with 2.4Ghz only capable phones. Here is an article that explains the issue and why it is happening. If that doesn't work or you don't trust the url, just do a quick search on Android Central Forums for "why does my phone disable wi-fi connections" and it should be the top result there.
https://forums.androidcentral.com/ask-question/865480-why-does-my-phone-disable-wi-fi-connections.html
I recommend going to your Wi-Fi settings, possibly advanced settings, and disable smart network switching. It might be "Switch to mobile data" or something else like that. Once you have that disabled forget the SSID and then try to connect again and see if it works for you. Hope that helps!


text:
How to grant an app a permission that isn't in its manifest for audio recording?
Non rooted Moto G6 Play running Android 9.
I'm using Termux and would like to use Sox's rec command to record audio from the terminal.  Unfortunately, since Termux doesn't request the mic permission, it just records silence.  I can't grant Termux the permission in Settings because...well, it doesn't request it.  It's not in the app manifest, therefore Android (understandably) assumes it wouldn't know what to do with the permission if it had it and doesn't list "record audio" as an option.
Is there a way I can force Android to grant an app a permission it never asked for?

Just in case this is an XY problem (X: how to record audio using sox from terminal, Y: how to grant a new permission on Termux), you might be interested in ZShaolin that claims having in-built sox (there's also the free ZShaolin Light XDA-Dev, though I'm not sure if it includes sox)

Not possible without root but even with root SoX recording might not work.

Android Manifest Permissions
Android permission system has different Protection Levels (1, 2); Normal permissions are granted to any app without user interaction while Signature|Privileged (SignatureOrSystem) permissions (whitelisted in /etc/permissions/privapp-permissions-*.xml) are granted only to system apps. Both are granted when app is installed or on first startup (if system app) and configuration is saved in /data/system/packages.xml file. Some signature permissions can be granted to non-system apps after user's approval using appops.
Dangerous permissions are those which require user's approval to be granted or denied. User's choice is saved in /data/system/users/<User_ID>/runtime-permissions.xml where device owner's User_ID is 0 (don't confuse it with UNIX DAC's UID).
Most of the manifest permissions are enforced by Android framework (system_server) but some are mapped to GIDs; hence enforced by kernel. Permission to GID mapping is stored in /data/system/packages.list.
How to Grant an App Unrequested Permission
You can modify above mentioned files to grant a permission which isn't requested by an app in its Manifest. I haven't tested with all permissions but this trick works (at least up to Pie) because Android framework doesn't verify the saved permission configuration vs. apps manifest files on every reboot (may be the changes are reverted back to actual during a scheduled maintenance task or when some app is installed or updated; I'm not sure).
In our case we want to grant android.permission.RECORD_AUDIO to Termux which is a dangerous permission, so this is how you should edit your runtime-permissions.xml followed by an immediate reboot:
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<runtime-permissions fingerprint="...">
  ...
  <shared-user name="com.termux">
    <item name="android.permission.READ_EXTERNAL_STORAGE" granted="true" flags="0" />
    <item name="android.permission.WRITE_EXTERNAL_STORAGE" granted="true" flags="0" />
    <item name="android.permission.RECORD_AUDIO" granted="true" flags="0" />
  </shared-user>
  ...
</runtime-permissions>

To confirm:
~$ pm dump com.termux | grep -A3 'runtime permissions:'
      runtime permissions:
        android.permission.READ_EXTERNAL_STORAGE: granted=true
        android.permission.WRITE_EXTERNAL_STORAGE: granted=true
        android.permission.RECORD_AUDIO: granted=true

Why SoX won't work?
That said, still SoX won't be able to record audio because (AFAIK) it's not using Android's Java APIs (android.media) or native APIs (aaudio/opensles). It uses ALSA/OSS driver directly or through PulseAudio which needs direct access to device interfaces in /dev/snd/ or /dev/{audio,dsp*} and proc tree in /proc/asound/. For details see Android Audio Architecture.
However direct kernel level access isn't a norm on Android, so you need root access. Apps with android.permission.MANAGE_VOICE_KEYPHRASES are allowed to read /dev/snd/* devices. It's a privileged signature level permission which is mapped to GID audio (1005). You can edit packages.xml to get this permission granted:
    <package name="com.termux" ... >
        <perms>
            <item name="android.permission.MANAGE_VOICE_KEYPHRASES" granted="true" flags="0" />
        </perms>
    </package>

    <shared-user name="com.termux" ...>
        <perms>
            <item name="android.permission.MANAGE_VOICE_KEYPHRASES" granted="true" flags="0" />
        </perms>
    </shared-user>

And packages.list:
com.termux ... 0 /data/user/0/com.termux default:targetSdkVersion=28... 1005,3003

But SELinux allows only privileged apps (having context priv_app) to read files in /dev/snd while /proc/asound/ isn't readable by apps at all, so you need to patch sepolicy as well.
And even after that, configuring SoX to use ALSA/OSS/PA is up to you.

Non-Root Solutions
Instead of using ALSA directly, PulseAudio can also be configured to stream audio over TCP or UDP or UNIX sockets. That's how media playback works on Termux. See this issue. However capturing audio only work through Android APIs. You can install termux-api package to use termux-microphone-record command for audio recording. It uses MediaRecorder class of Java API, or you may consider modifying SoX source to use Android's native APIs.

RELATED

How to Play Sound from Termux when using Linux?
How Android's permissions mapping with UIDs/GIDs works?

There are two ways:

Termux is an open-source app on Github. Therefore you just need the Android development tools and git for cloning and building a custom version (may be with a different package name so you can have both your version and the official installed).
As your device is rooted you can try to add the permission to the list of registered permissions of an installed Termux. As far as I know the relevant data should /data/system/packages.list or /data/system/packages.xml.
After modifying those files you should reboot the device to activate the changes.
For more details see also this answer.
Note: I am not sure what happens to these modifications in case an update of Termux is installed. I assume that the update will revert your changes.


text:
how to store all mobile data in computer without touch mobile screen?? H
How to get my all data(Like contacts,messages,files,etc) when my mobile screen was broken.
I am used Galaxy j7.And I loss my mobile display by some reason.
My phone still working,but i see all things on screen but dont touch on scrren
call was incoming.
But when I connect my phone with my pc via samsung component .then
Please help me
How can I get all my data.

Please suggest me....it's needful

There are numerous ways for you to fetch the data.
A very easy way for you to control the screen is to use a mouse.
If you are familiar with Android Debug Bridge (ADB), you can use it as well.

i dont know about ADB, so can you please tell me something about it?

But sir, for what you say, I have to touch the screen ... And, my mobile touch is damaged.so how to do this.

@priyapatil If you are not familiar with ADB, I suggest you to buy an OTG adapter and a mouse. Connect the mouse to your phone using the adapter and you are good to go.


text:
How to login to Oneplus OxygenOS after motherboard change with 2-step verification?
Last time, I had a similar issue with Oneplus 2, I troubleshooted the problem with OnePlus 2-level tech support (nicely organized by Amazon) and they decided after 3rd try that nothing to be done possible. Google said last time that the problem is OnePlus, because not pure Android. I have now troubleshooted the problem with 1-level Oneplus tech support, but they cannot diagnose the problem enough, but they note that it is not possible to setup the phone with 2-step verification at all.
I cannot disable the 2-step verification because of security reasons. The phone does not accept my password to my Gmail account, neither accept app specific passwords. I repeated the steps now at least 50 times now. I can login into pure Android phone with my login details at the moment: Samsung Galaxy S8.
I suspect that there is something corrupted in the hardware. Initially, the problem in the phone was that the sound  was broken: crumbless, regardless if you use loudspeaker or headsets. So oneplus tech support decided to change the motherboard. Now, the motherboard is new but I cannot anymore login to the phone.
I think to get the warranty is the only way to go or have 2-level tech support troubleshoot the phone.
Waiting 15 minutes, I get the screen

Something went wrong
  Sorry, something went wrong there. Try again.

Then, pressing "next", it gives the login screen again where you have to put your email address again. I do it and give the password. It goes back to the loop where it says the password is wrong, although is not wrong.
The 1-level tech support decides to do the second motherboard switch. I am waiting for it and then troubleshooting.
Phone: OnePlus 6T
OS: the newest 10.10.2019 version

Have you tried to create a second Google account that does not use 2FA and try to login using that account (just to see if it works at all)?

Other tech senior proposed to change the motherboard 2nd time OR to have a new phone. I accepted the latter.


text:
How to get shared files from Windows on Android through the Internet?
I have a Wi-Fi router in the home. My PC constantly connected to the router, and it's IPv4 is 192.168.0.100 (static). Also I always know a global IPv4 of the router (NAT is disabled). On the PC I have a shared folder through the SMB protocol.
I have an android device. I want to get access to the shared folder on my android device, when it is NOT connected to the my Wi-Fi (for example in the office or university). I also can connect to my VPN server from my Laptop (it is not a PC) in such places.
Now, what I decided to do? I decided to up the OpenVPN server on my PC, and connect to it from my android device through the Internet (Of course when I'm not at home) to emulate the connection to my Wi-Fi local network.
If the VPN server is setup to the TAP mode, I can get access to the folder on my Laptop, when I connected to the VPN. If TUN - no. But access to the folder on the Laptop isn't interesting me, I want to get access on my android device, but it doesn't support TAP mode. In TUN mode I can connect to the VPN, but cannot get access to the folder (on a Laptop and on Android). So the question is - how to activate the support of TAP mode on the android OR may be you know another solutions instead of using VPN?


text:
Zenfone 5 a501cg soft bricked - can't mount /system /cache
I have a zenfone 5 which used to run on custom rom so i decided to revert it back to stock rom but when i wiped system cache and dalvik, it didn't go well and now i cannot start phone unless going into recovery. Twrp tells me those errors :
unable to mount cache
unable to mount system
Tried flashing custom rom again but it didn't work too. Any helps please :/
ps: my phone's usb is not working as a connector to pc i.e. pc cannot recognise the phone. please keep this in mind.

It appears like when you first wiped your partitions, the process was possibly interrupted and you now have corrupt partitions which are not being recognised in TWRP.

Please go to your TWRP settings and make sure that the use rm -rf instead of formatting option is not checked.
Now go Wipe → Advanced Wipe section and try wiping all those partitions again which are currently giving unable to mount errors. Then reboot into TWRP and try again.
It is recommended that you use a charger during the wipe process so that a battery failure will not interrupt the process.

Tried flashing custom rom again but it didn't work too.

Please post the error that you get while flashing or at least a part of the error that appears, so that your problem can be understood properly.

This is another similar answer which might be of help. Follow the steps if you're sure that your partitions were formatted as EXT4 before.

Thanks for your answer but i tried going into recovery now in order to show you errors but the touch screen doesn't work now. I will try again and post screen photos showing errors later.

here is the error screen i get when i try wipe link
confirming the option rm -rf is unchecked
tried what you said and rebooted but nothing changed
will post flashing rom screen soon

tried ext4 option that you've linked but it didn't help too

Sorry about the late reply. I have also seen in some scenarios that this works - Change file system option → format the corrupted partition(s) to some other filesystem like exFAT or FAT32 → again reformat them to ext4. Also try using the Repair file system option to correct the corrupted file system.


text:
How to remove a large sim card from a Samsung Galaxy S8
Someone put a large size SIM card into the card slot of my Samsung Galaxy S8 without using the tray. How do I get it out?

I would start with a spiky tweezers if there is a little space to grab the card. If nothing works you could try to could try to adhere something (e.g. a paper-clip) to the SIM card with a very very small drop of superglue.

I tried with tweezers, but that didn't work. And I didn't feel like putting superglue into the phone's slot - knowing my track record, that wouldn't have ended well. So I ended up bringing it into a phone repair shop, where they were able to open it and remove the card intact. Oh well, lesson learned.


text:
After formatting SD card "as internal", can the partitions be downsized?
I've a 16 GB MicroSD card that's apparently faking its size. Using H2testw I found that only the first 7.8 GB are usable. Before buying a new one, I want to see if I can "fix" it. The idea is to have Android format the card "as internal", unmount it, and then either through a rooted Android or a Linux/Windows desktop downsize the three resulting partitions to fit inside the first 7.8 GB of the card.
Is there any reason why this wouldn't work? My only concern is that the Android phone might have its own record of the sector ranges of each partition, which I would be changing.
I'm not just trying it out, because I don't have a card reader on hand, and want to find out if it's likely to work, before I invest time into it.

So you are asking this only theoretical? because I would not make experiments with a card that has  a manipulated firmware. In the end you earlier or later loose your data. Anyway a new 16GB card costs nearly the same as sd-card reader.

@Robert no, I intend to try it out, if it makes sense. I guess you could consider this an exercise. I think I can presume that if I try to use this card, with properly resized partitions, and the firmware is defective enough to cause problems, I'll notice it quickly. Unless its treatment of bad sectors is bad or something. I don't keep important information on my phone, so I don't feel like I'm risking much.

If you bought a 16GB card and only ~8GB are usable, you likely got a defective or counterfeit card (a more common occurrence than people think). Just replace it.

@acejavelin I realise that. The idea is to make it work anyway; knowing that it might malfunction in some other way.

@Dominykas The problem is that you can't determine where each sector is located in the flash. Additionally because of wear-leveling algorithm the sd-card reallocate the sectors at any time (and of course it can reallocate it into the non-existent flash part). Therefore the problems can arise at any time!

@Robert hm, didn't realise that. Bummer. Thanks for making that clear!

I'm abandoning the project, since the card I was going to do this with is counterfeit and apparently unsalvageable (or at least not in the way I envisioned). To quote Robert: "because of wear-leveling algorithm the sd-card [can] reallocate the sectors at any time (and of course it can reallocate it into the non-existent flash part)".
Anyway, for people trying to find out how to work with these Android SD partitions, here's a few links from my research:
http://blog.sam.liddicott.com/2016/02/android-6-semi-adopted-storage.html
I want to split one MicroSD card into two parts: part adoptable storage, and part normal storage. How can I do this?
One of the tools used in the above posts is adb shell sm (or just sm). It can manipulate the partitions on the SD card. I didn't look into it further, but if I wanted to go through with this, the sm command is what I'd investigate next.
Of course, one of the things to know about working with Android's adoptable storage partitions is that one of them is encrypted, so unless you decrypt it, you can only manage it with the phone that encrypted it.


text:
How to restore backup taken using stock recovery?
I have an unrooted Coolpad Note 3 lite. I backed up user data using recovery. However, I'm not able to restore from .backup file.
I only have Windows in my PC.
Is there any way i can restore from .backup file using ADB COMMANDS???
Is there anyway I can restore from that backup file, preferably without rooting?

Related: How to extract .backup files created by android stock recovery?

I dont have an ubuntu pc. Pls tell me some other way

@Sarathy You can use a Linux via "Windows Subsystem for Linux" (Win10) or via VirtualBox install an Ubuntu VM. Alternatively all relevant Linux tools are also available on Windows e.g. via Scoop or Chocolatey package managers.

Sorry for my absence.. somehow i got a copy of ubuntu OS. I am new to linux. So..can Robert or anyone, pls explain/ help with the steps explained at, https://android.stackexchange.com/q/141805.. sorry if am bothering or insisting you guys.. its my fathers mobile. He had passed away.. I am having sentimental things with that backedup .backup files.. thanks in advance


text:
How can /proc/sys values be changed at boot (sysctl.conf does this on normal Linuxes)?
How can /proc/sys values be changed at boot?
sysctl.conf doesn't exist on Android and echoing values to the proc files isn't persistent.

Use init's write command in /init.rc or any other .rc file. You may also create your own:
# /system/etc/init/custom.rc

on property:sys.boot_completed=1
    write /proc/sys/kernel/hostname MyDroid

Set permissions and reboot device.
~# chown 0.0 /system/etc/init/custom.rc
~# chmod 0644 /system/etc/init/custom.rc
~# chcon u:object_r:system_file:s0 /system/etc/init/custom.rc

You may also use some early trigger like on init or on boot but your value may get overwritten by some later trigger.
Also some values aren't allowed by SELinux to be written by init. E.g. /proc/sys/vm/drop_caches and /proc/sys/vm/dirty_ratio are writable only by vold. In this case you can use  exec command which allows changing SELinux label before command execution.
# /data/sysctl.conf

kernel.hostname=MyDroid
vm.dirty_ratio=20

# /system/etc/init/custom.rc

on property:sys.boot_completed=1
    exec u:r:magisk:s0 -- /system/bin/sysctl -p /data/sysctl.conf

* sysctl is toybox applet. Or you may use busybox.
For other options see this answer. Some apps may also provide similar functionality but I never used one.


text:
Recover deleted video in Google Photos app
In Google Photos I deleted permanently a video (before it was backed-up). Is there any way that I can recover it? It's very important to me.

You can only recover videos and photos which aren't permanently deleted.
But if you have mistakenly permanently deleted the video you can contact Google Drive Support regarding this issue. They might help you with this.
But I believe it will be more difficult to recover since Google has removed the Google Drive Support for Google Photos.
Link to Google Drive Support


text:
WIFI disappears until reboot
Ok so I've encountered this on multiple devices across multiple networks so I'm 90% sure it's an issue with the core OS but it's been happening for over a year and hasn't been fixed at all.
About once a day my device will drop its wifi connection and when I open the wifi settings page it cannot scan/locate any nearby networks for me to join. It just kinda hangs saying that it's searching for nearby networks but it never shows me anything (even though I know there should be about a dozen nearby since I live in an apartment style building). Toggling wifi on/off does not help, nor does toggling airplane mode. The wifi settings page remains empty no matter what. The only solution I have been able to find is to do a full device reboot then everything works fine for another day or two.
I've encountered this on both the google pixel slate (worst purchase ever, returned it) and a OnePlus 7pro. The behaviour has been identical across both devices.
I've read some old articles saying to disable ipv6 support but I don't even have that option on the OnePlus phone (and honestly I wouldn't be happy if that was the solution).
I'm a senior software engineer at a major tech company and I can't figure this out and I can't get any legitimate help from the companies behind these devices. What can I even do?
I am open to troubleshooting suggestions or if someone can help me gather debug information to submit a more official report that would be great. Right now I have no way to get official support, the people at oneplus are just giving me the usual runaround of doing a factory reset etc without even examining the issue... and google has worse customer support than comcast.

If it happens with two devices from different manufacturer you may encounter a bug in the used Wifi subsystem which is AFAIK at large parts identical to whyt current Linux distributions use. Therefore it would be interesting if you also encounter this problem on a regular Linux-System (if it also happens there debugging will be easier and the [community] support of Linux distros is usually very good). May be someone has set-up a Wifi next to you that causes this error.

I use Linux on all my home laptops and they don't have an issue. Also annoyingly I have other android devices that don't have an issue. My guess is it could be a hardware choice in the devices that are having issues where the hardware is not playing nice with the OS


text:
How to mount 100% ext4 sd in Android Pie?
My phone (Redmi 6A) is running Android Pie(MIUI). How do I mount a 100% ext4 formatted sd card, such that it would be seen by vold? My phone is rooted. I am not experienced with the android shell commands though, and my terminal emulator cannot run adb commands.

Use vold-posix.

I do not have Magisk, and vold-posix does not work on >Android 8, in which I am using Android 9

I never used that personally, just know it exists. What's the purpose of being seen by vold? Why not mounting manually?

How do I mount it manually then?

Using mount command.

Ok, thanks. I will try that.

The mount command returns Invalid Argument

What command did you execute? Follow proper syntax: http://man7.org/linux/man-pages/man8/mount.8.html

Thanks. I was able to mount the ext4 sd card successfully.


text:
Phone not recognized by computers at all. No adb, usb, lsusb, fastboot
For over a year my phone had no issue connecting to my computer via usb cable. I could transfer files back and forth via adb no problem. It stopped being recognized about a month or two ago, So I've been using adb over network.
It doesn't even show up in lsusb.

I thought maybe it was the cable, so I tried a different cable.
I thought it was the usb port on the computer, so I tried other usb devices. Phone charges when plugged into computer though.
I thought it might be the connections of the cable to the phone and computer, So I cleaned them with alcohol.
I thought maybe the connections on the mainboard of the phone, So I pulled the phone apart and cleaned the connections with alcohol.
I thought maybe adb needed to be updated/reinstalled, so I did that.

So here's my predicament. I was updating LineageOS and there was a problem with the firmware so I reset my phone without thinking. That deleted all my files on the sdcard as well as the system. So I'm only able to use twrp (recovery, no OS). But the phone should be able to mount still since twrp allows MTP.
Any ideas what I can do to get the phone to be recognized by the computer.
Stats:
phone: OnePlus 3T - up to date TWRP only, formerly LineageOS
computer: Ubuntu 18.04, up to date adb and fastboot

Replace the USB port, it's a common issue in the 3 & 3T... in time it will stop charging as well. It isn't a software/firmware issue, and we can't give you a solution via Android or Linux, the port is physically failing.

thanks @acejavelin I bought a new port and will report back in a couple days. I asked this same question on xda and two people said the same thing as you


text:
"Priority only" notifications not turning off
My OnePlus One with Cyanogen OS 13.1.2 has for some reason refused to shut off its "priority only" notification status, pressing on the notification icon in the dashboard doesn't do anything, nor does restarting the phone.
However, the phone doesn't seem to act like it's only priority only mode, but it's preventing me from switching to do not disturb mode or the actual priority only mode.
Does anyone have any idea how to deal with this?

Create an automatic rule (Settings > Notifications > Do not disturb > Automatic rules), regardless of the name or type. "Priority only" mode should stop and you should be able to regain control over the "Do not disturb" tile in the notification bar.


text:
Is it possible to fix hard bricked device?
I'm working in electronic repair store as technician and I started 4-5 years ago but something really bothers me .
Why we can't fix hard bricked devices ? Like device's hardware completely fine . Is there some kind of device for that problem ?
I have 5-10 devices just laying dead because of hard brick because some amateur tried flash a ROM without any experience
Also I don't know if here is correct place to ask this question , I'm basically trying to flash a android ROM but if it isn't right place for it I can delete my question and please if you're not %100 sure don't write "you can't fix hard bricked devices" , I heard&said that for a long time

A bricked device is usually an example of the chicken-egg-problem. Unless you have direct hardware access to the flash memory chips you need at least a minimal software stack for accessing the flash chips. If your on-device software stack is completely flashed to hell how do you get write access to the flash? Additionally security measures like closed bootloader makes it even more harder as you can't just flash/run any software you want.

If the software is available for your device, you can use a JTAG programmer, although later devices tend to support this less and less.

In a softbricked device, critical partitions like a recovery partition is usually preserved which helps to easily recover from the condition, but in a hardbricked device all the software interfaces that provide access to the hardware are unavailable, that means there is no method for you to communicate with the hardware. As Robert has rightly said, you need to physically access the hardware in order to flash a software, which in case of integrated hardware is very difficult. To circumvent a hardbrick situation, Snapdragons have an Emergency Download Mode (EDL).

So basically not possible ? Unless you have specific hardware for every device ? I don't think they made universal device for it but if they did I can buy it

It is next to impossible to recover from a hardbrick if you do not have a dedicated recovery method (like EDL). Sometimes, even the manufacturers are not able to recover from a hardbrick. Acejavelin has suggested a valid method called JTAG debugging but Qualcomm/MTK mobile chips rarely support it.  Now, as MTK and Qualcomm chips are most commonly found ones, it is possible to recover from a hardbrick, even though the chances are slim. You may make use of QPST, QXDM tools by Qualcomm, and MTK Vcom tools by Mediatek.


text:
Google chrome won't connect to the internet on mobile data
This site can’t be reached
m.facebook.com refused to connect

No issues browsing the net on Chrome using WiFi
No issues browsing the net on Firefox using mobile/WiFi
No issues installing app for the play store (I installed Firefox to test) using mobile/WiFi
Can receive non-SMS messages (example: WhatsApp) using mobile/WiFi
Can make phone calls
Clearing chrome data did not do anything
No VPN active right now

Consider reinstalling chrome. Because something it happens error while downloading . May be the script in there somewhere is corrupted. Sometimes reinstall help

The reasoning provided for reinstalling Chrome is pretty vague. Can you link where this error or script is discussed or reported and that reinstallation is the answer? Also, how does reinstallation would help over clearing data files?


text:
Is ROM of both P60 & P70 variant of Realme 3 same?
The Realme 3 smartphone, developed by Oppo, comes in two variants: one with the Mediatek P60 chipset and another with the Mediatek P70 chipset. The global variant has the P60 chipset, while the Indian variant has the P70 chipset. The model numbers for these variants are RMX1821 for P60 and RMX1825 for P70.
The question revolves around the compatibility of the ROM (Read-Only Memory) for two different chipsets. According to Realme's official website, the ROM version 'RMX1821EX_11.A.22' seems to be intended exclusively for the RMX1821 device with the P60 chipset. The concern is whether it is feasible to install this ROM on the RMX1825 device, which has the P70 chipset, and whether it will function correctly. Alternatively, it would be helpful to know if there is a separate ROM available specifically designed for the P70 chipset.

Both are different. Consider the example of Xiaomi devices. Xiaomi devices have two types of OS(rom) one global and other is chinese. Global contains Google apps, and chinese is without Gapps. Likewise, i think realme also have changes in rom.

@RahulGopi If Gapps are not available or something like that there is no problem . But my main concern is that If I flash the P70 device with P60's ROM; will it brick the device

both will be different. I am using moto x4 indian version(XT1900-2) which is retail, and in US(XT1900-1) is android one, both rom is different.

Hi, are you using an AI assistant when rewriting this question? Just curious because some of the wording is peculiar, though it's not really a problem if the original question was written manually, but still be careful with possible hallucinations if not fact-checked manually. Some considerations: Is attribution required when using LLMs to improve the grammar/formatting of a post?

@AndrewT. yes, and fact checked manually.


text:
Why does my android use so much ram?
I recently bought a realme xt phone 8gb ram varient. I usually get only 4 gb ram free and rest of the ram used by system. So i want to know that it's usual for 8gb ram system to take up to 4 gb ram for system process.
I attached two screenshot taken from the 'developer options -> running services'

Because of this: https://developer.android.com/topic/performance/memory-overview#SwitchingApps

When i restart my phone i got around 4.5 gb ram free from 8gb when no app is running in background.

Many system/user apps start after reboot automatically: https://android.stackexchange.com/a/209345/218526 The Home/Launcher screen you see is also an app. Lock screen is also an app (System UI). The screenshot you attached is also Settings app.

I wonder why take upto 4gb ram. 4gb is lot of ram

Android tries to make use of available resources in best way, to keep a good balance between energy consumption and performance for better user experience. Keeping RAM free isn't always a good thing: https://www.howtogeek.com/128130/htg-explains-why-its-good-that-your-computers-ram-is-full/. But if you hold a different opinion, find out apps using large RAM with ps --ppid $(pgrep zygote64) -o %mem,cmd --sort %mem and use methods described in given link to make sure they don't run in background. Then set Background process limit to zero and check Don't keep activities in Developer Options

Thanks for clarifying

@IrfanLatif where to run these commands in Android?

Use Termux or adb shell. But Android's built-in ps command is minimal, you need full binary.


text:
Backup Android to PC over P2P WiFi connection
I want to automatically backup my Android (at least the media files) to my PC over a WiFi connection when both the Android & PC is connected to the same WiFi home network. It should probably be possible to transfer the files directly P2P without needing to store them on some unknown server somewhere. Preferably, I want it to happen fully automatically when it connects to my home WiFi & I have my PC running, so I don't even have to think about doing backups anymore.
I have been searching for the solution, but the closest solution I have found so far is some apps that create a local FTP Server on the phone, where I potentially can manually pull the media files out of the phone from my PC, but I haven't managed to establish a working connection with any of the apps so far.
Is it possible to backup Android to PC over P2P WiFi connection automatically?
Edit_1:
Android 8.0.0 (not rooted)
Windows 7

There are some peer2peer solutions like SyncThing where you can keep data in sync across devices. And there's also FolderSync which understands many protocols including e.g. SSH and CIFS so it can talk directly to your PC (you didn't tell us what OS it runs there). With FolderSync you can even define automatic sync whenever a given WiFi is connected, so that might be your solution. Not sure if you'll need the paid version for that.

I woudl try to minimize the on-device software, e.g. by using adb-sync in reverse mode (device -> PC). As it works via adb it should also work via adb over IP/Wifi. Therefore your PC could regularly try to synchronize the data from your smartphone to the PC. If the smartohone is present in your Wifi it works.

Progress report: I tried SyncThing, and I managed to make it TECHNICALLY work, but it stops syncing after some seconds & you have to fiddle around for +10 minutes, and when it "works" it can be syncing with the amazing speed of some BYTES per second.... So it's not the kind of "fire & forget" solution I was hoping for. (yes, I also disabled the firewall & the whole security program just to be sure)

Progress report 2: I tried an app called: PC to Mobile transfer. It connected, BUT it defaulted to the android folder: / that is forbidden. And I found no way to move to an allowed folder.

Progress report 3: I tried FolderSync, but it seams to sync trough external servers, like DropBox or Google Drive & such. I would prefer a p2p connection if possible. (Also, it's wierd, it "claims" that it can sync files, even before I have set up a sync-destination...)

@Izzy I tested some of your recommendations as you can see in the "Progress report" comments. I really appreciate your suggestions, I wouldn't have found them myself. (also, I updated the question to include my OS's)

Though FolderSync can use Cloud, you haven't to do that. I use it via SSH/SFTP directly with my Linux machine just fine, same should apply to CIFS for Windows. All depends on how you set it up. So first set up your connection (to your Windows PC via CIFS – I have no Windows, so I cannot give details on that), then configure "folder pairs" to match a directory on your Android device to its counter-part on your PC. In that pair, you can also configure sync conditions (only on WiFi, only with the given SSID etc).

Just out of interest, you tried this : How to auto-backup my phone internal storage to my PC (not cloud), using WiFi? this method uses SMB protocol

I was looking for the answer to this and found this question. I went with a simpler method compared to most of the above and it seems to work well. I already use Syncback FREE for my home computers to back up everyone's machines to a central media computer I use as a semi-NAS.
By installing SyncbackSE on the media computer and putting "Syncback Touch" on my phone, I'm able to choose my phone as a source device in the Synckback profile and use it as a backup system just like with my computers. The only differences are that SyncbackSE isn't free (but it's cheap) and all the configuration and management is done on the computer, not the phone (bonus for me, but maybe not for someone using a NAS without an OS and GUI.


text:
where does the official, "non-custom firmware" Android os look for version updates?
When the "new update is available" popup appears on the screen, does the os go to the manufacturer's server or the google's servers to download the update? in other words who is the main version update publisher that the os looks for updates from?

Always the manufacturer provides the updates.

You can actually figure this out by yourself by intercepting the network request from your OS updater software/app. We have related posts if you need help with that.

If the phone is not out of date and still receives updates, there is an old popular network monitor tool named "Fiddler" for windows , and there is a similar android app called fiddler too. For SSL it can produce a user defined certificate and takes the middle of connection through a vpn. And it is usually on one of the google servers.

The OS looks for updates from the manufacturer's site for a newer version. When you click download on your phone it download the latest update usually as "update.zip".


text:
Are Android updates signed with Google's private key or other signing techniques?
I noticed that Android pops automatically for new updates and patches.
Are these updates signed so that the device knows it's from the official publisher and not from some server spoofer?

In keeping with most phones, my phone doesn't go to Google for updates.  it goes to the phone's manufacturer.  Your question is based on a misunderstanding..

Android releases/updates are certified (not signed) by Google before they are published. The certification includes a compliance test regarding the Android Compatibility Suite. The certification is more a legal than a technical process.

WHO SIGNS ANDROID PLATFORM COMPONENTS?
As explained very well in @MechMK1's answer, Google is the main contributor to AOSP development. But AOSP isn't the only software on Android devices, there are a number of hardware specific pieces of code. Above all there is kernel (based on AOSP's common kernel source), but that must be open-source due to GPL, so OEMs/SoC vendors are bound to release source code. However other parts, particularly userspace HALs which include a large part of hardware drivers, and the bootloader firmware which is loaded prior to kernel in boot chain are completely closed-source in most cases (intellectual property of OEM/SoC vendor). So the software on Android devices we know of is at least AOSP + kernel + HALs + bootloaders (and other SoC firmware).
OEMs get a copy of AOSP release from Google free of cost (theoretically; in actual they are bound in contracts), add their proprietary code which may also unnecessarily replace AOSP code (e.g. to change visuals) and add new apps/features, build the ROM and release that with device (or as OTA update package later on). The keys - which are used to sign system/framework apps and update package afterwards - are built/defined during ROM compiling process which is carried out by OEM, so OEM owns private keys. This ensures that core components of OS don't get any future updates from untrusted source. Mostly OEMs also add Google's proprietary Play Services and other apps (GMS) already signed with Google's private keys so that those get updates directly from Google.
ANDROID ONE:
Android One program was slightly different in the beginning. A quote from For the next five billion: Android One:

"To help ensure a consistent experience, Android One devices will receive the latest versions of Android directly from Google."

But their vision of pure Android on devices with strict hardware requirements wasn't appealing to OEMs, so within a year they had to tweak Android One strategy and the plan switched to:

"Android One phones receive the latest version of Android from Google’s hardware partners. Google’s partners send updates based on their schedule - trying to get them to you as soon as possible."

* Quoted from Google's update support page, now removed.
The long story short, OTA updates - whether related to hardware or to Android framework - come from OEMs. They build it and sign it with their keys. Google signs either OTA updates only for their own devices (e.g. Pixel), or the proprietary apps (e.g. Play Store) just like any app developer.
Also for A/B updates:

"For devices using Google's OTA infrastructure, the system changes are all in AOSP, and the client code is provided by Google Play services. OEMs not using Google's OTA infrastructure will be able to reuse the AOSP system code but will need to supply their own client."

AOSP's System Update APIs (update_engine) by-default use Google's root CA (/system/etc/security/cacerts_google) to establish https connection with (Omaha?) update server. But OEMs are free to modify the code. In each case OTA client app, system daemon and update server are managed by OEM.
VERIFIED BOOT:
On production devices release key is used to sign the update .zip file and possibly some apps as well. Its public key pair is saved on device in /system/etc/security/otacerts.zip, used to verify the cryptographic signature of update package. But additionally there is another signing mechanism available on many devices since Android 5, that is Verified Boot (dm-verity). OEMs use RSA key pair as a part of (A)VB mechanism. Private key is used to cryptographically sign the hash tree of whole /system partition, while public key (/verity_key) is stored in ramdisk (inside boot.img on non-SAR devices) or kernel's system keyring, which verifies the integrity of dm-verity mapping table (metablock) appended after last filesystem block at the end of /system partition. dm-verity table (hash tree) in turn verifies whole /system partition by matching hashes. This is to protect /system from any unintended modification by malware or user e.g. by mounting R/W.
During block-based OTA update a binary patch is applied to whole system partition block device file. This patch is generated by taking a binary difference between old and updated system.img. Updated table must be signed by the same private key owned by original ROM developer, otherwise dm-verity would fail. In the same way dm-verity protects /vendor and /odm partitions. boot and recovery are signed by another key, either manually provided or built with application bootloader or saved to some other secure location. So it's only the OEM who ensures this chain of trust during boot process, creates all of the keys initially and later on signs and sends OTA updates.

thank you sir; this is a very thorough answer.

Are updates digitally signed before being shipped?

Yes, updates are cryptographically signed by the publisher. This is to ensure the integrity of the update, both from unintentional corruption during the transmission, and willful manipulation from an attacker.

Who signs the updates? Is it Google?

That depends on who publishes updates for your phone. If you own a Nexus or Pixel phone, then the update is likely published and signed by Google.
Other manufacturers, such as Samsung for instance, modify Android before shipping it. This may include their own system applications, their own launchers, etc.. In such cases, the manufacturer is the publisher of the update and thus responsible for signing it.

But isn't Google the one who develops Android?

It's not Google alone, it's the OHA - Google just happens to be their most prominent member. Furthermore, Android is Open Source, meaning that contributions come from many different companies and individuals, not just Google.


text:
Is the maximum size of the SD card for the S9+ really limited to 400 GB?
Note: while this is not an exact duplicate, this question is a duplicate in that it asks where the limitation is located (software/hardware ...). So I think marking this as a duplicate is warranted, even though my question was model-specific.
I have an S9+ from Samsung and I am considering to upgrade to 512 GB or even 1 TB as it would make space for Kiwix ZIM files.
However, Samsung marketing material suggests a limit of 400 GB (i.e. 400x1000x1000x1000 Byte). This sounds arbitrary (not the usual power of two and the discrepancy between GiB and GB which may be accounted for by reserved space - in case of corruption - doesn't change that). Now, perhaps there is a technical reason that I am unaware of, but from the OS side (Linux/Android) I can't understand why there would be a limitation to 400 GB. SDXC seems to be the supported standard and should support up to 2 TiB (i.e. 2x1024x1024x1024x1024 Byte).
Is this limit simply owed to what was available around the release of the S9+ or is it an artificial limitation imposed by Samsung customizations to Android, or is there perhaps no limitation?

There was a question very similar to this, were the conclusion was, that the advertised maximum capacity is the capacity that is guaranteed to work and was the largest they had at the time. There are numerous phones, that advertise 16 or 32GB of maximum SD card capacity and work fine with 64 oder even 128GB.

@GiantTree thanks, do you happen to remember which previous question that was? I noticed plenty of other questions similar to mine, but not for the same phone model. And since these others all referred to specific phone models I didn't think anything of asking for my specific phone model. Although it wouldn't strictly be a duplicate, it might be worthwhile to mark mine and other questions as dupes of that one question you mention, because if that is the case it answers it enough to make a call as to whether one wants to buy such SD card or not.

I don't think it's about model or manufacturer, it should be a general question about the capability of SD Host Controller. If you need information about a specific device, ask the manufacturer directly that where at hardware or software level they put the limitation on SD card size, which they would never reveal. So mostly answers to such questions would be guesses, ideas or opinions.

@IrfanLatif I disagree. It stands to reason that there have been users encountering the same marketing material but they had a 512 GB microSD card around and simply tried it out. As you can tell from my question I already reasoned about the fact that the stated limitation doesn't make much sense to me. But there's always the chance I - as an individual - am missing something, which is why I turned to "the hive mind". True, no one who hasn't tried firsthand would be able to give an authoritative answer, but contacting the vendor is equally pointless (as you note yourself).

@0xC0000022L this question IIRC: https://android.stackexchange.com/a/129539/86358

Possible duplicate of Is the external storage size limit hardware or software?

I can now confirm that the S9+ supports a 1 TB μSD card just fine.
After a colleague had outfitted his phone with a 512 GB card, I decided to give it a try, because it was already above the limit Samsung claimed was supported but well below the limit one should expect for SDXC (see my question).

Edit (February 2021): Due to the other answer which appeared here, I wanted to update the screenshot and also wanted to state which model I use: Sandisk Extreme (not Extreme Pro, though).
Also note: I have meanwhile read in several places that phone manufacturers indeed specify the "supported card size" based on the SD cards available at time of the release of a phone model.

I have an S9+ and wanted to upgrade my micro sd card to a larger size. I bought a 1TB and the pictures worked fine but after a month suddenly the more recent pictures started to corrupt. Literally before my eyes my pictures in my photo gallery suddenly became grey squares and could no longer be viewed. So Samsung advertises the limit of 400GB for the S9 sd card and my experience seems to prove that it can work maybe but becomes very unstable and can stop working at any moment. I am having to get a smaller sd card. :(

Well, my question would be then, how comes it has worked for me will for over one year, all the while the card was/is filled "to the brim" with well over 800 GiB of data? And yes, I can access it still, oldest and new data. From experience with flash storage it seems a lot more likely you went for a "sweet deal" and the controller reported the size you expected, but the factual size is smaller. So over a certain amount new data starts overwriting old data. Of course it could also be that your card simply died on you.

I have updated the screenshot and I am stating the model of the SD card I am using. It's the same since I initially answered my own question. And as I mentioned before, it works quite fine. Even the older screenshot proved that 400 GB isn't a hard limit. The new one should prove that neither is 512 GB. So you have a colleague of mine with the same phone who proved 512 GB worked, you have me having a 1 TB card, proving it works. Don't you think you'd at least want to adjust your answer with some more information? Can a PC read and write the stated volume of the card, for example?

How about testing your card on another device, preferably a PC with an SD card reader, using a tool like h2testw? Caution: it's a destructive process, but since you're already losing data, perhaps we could establish whether your card is genuinely 1 TB (like mine) or not. Leave it running over night, it'll take ages.


text:
How To Enable Debug Mode From ADB Shell or ADB Via Terminal In Linux
so far I have put my android device in ftm mode
i have tried from adb sideload
now i am trying with busybox ash
I'm able to run  ls
but anything else says permission denied or error:closed.
/ $ ls
acct
cache
charger
config
d
data
default.prop
dev
etc
file_contexts
firmware
fstab.qcom
icon_ftm.png
init
init.class_main.sh
init.environ.rc
init.ftm.rc
init.mdm.sh
init.offcharge.rc
init.qcom.bms.sh
init.qcom.class_core.sh
init.qcom.early_boot.sh
init.qcom.factory.rc
init.qcom.ftm.rc
init.qcom.rc
init.qcom.sh
init.qcom.syspart_fixup.sh
init.qcom.usb.rc
init.qcom.usb.sh
init.rc
init.target.ftm.rc
init.target.rc
init.trace.rc
init.usb.rc
init.vendor.rc
init.zygote32.rc
mnt
persist
proc
property_contexts
res
root
sbin
sdcard
seapp_contexts
selinux_version
sepolicy
service_contexts
storage
sys
system
tombstones
ueventd.qcom.rc
ueventd.rc
vendor
verity_key

I want to chmod on root folder

and also unlock the bootloader and root the phone

Insufficient information. Not clear what you are asking. By Debug Mode do you mean USB Debugging? What is anything else which gives permission denied?

Further: of course you get a permission denied. Line 1 of your quote shows the reason. Hint: $ is not #. And indeed the question sounds like chicken-and-egg: "enable debugging from ADB" is like "switching on the lights of a burning lamp". So you need to be clearer on what you're asking.

@antoinepl514 never chmod or chown anything, android is not like linux it will crash if something unexpected. for unlocking/rooting you don't need adb or (root) shell running on device. for unlocking use fastboot (not adb). rooting usually can be done offline, patch your boot/recovery and flash it back

https://topjohnwu.github.io/Magisk/install.html#boot-image-patching

alright,  I will try that , thank you!

You can't make use of ADB without turning on the Debugging mode. There is one way to access partitions via ADB even if you don't have ADB turned on. If you want to run ls on restricted partitions, like cd data, you need to boot (not flash) into a custom recovery. Asssuming that you have an unlocked device, run fastboot boot <recovery.img>.
Now that you have successfully booted into a custom recovery, mount relevant partitions and run adb commands.

OP says: “I want to chmod on root folder and also unlock the bootloader and root the phone”.

We don't usually perform chmod on Android. As @alecxs has mentioned, chmod may have unexpected behaviour on an Android. Try running adb remount followed by adb root.

OP says: “I want to chmod on root folder and also unlock the bootloader and root the phone”. And you suggest: “Asssuming that you have an unlocked device...”. And I do chmod scores of times on my device in a day, the point is you should know what you are doing.

Yes, because you can't perform these operations on a production build. You need to have root permissions for which you need to run adb root. And for that you need to have a custom recovery or root privileges, and for that you need an unlocked bootloader.

it seems that I cannot find the custom recovery or custom rom files nowhere for the ZTE Avid Plus Z828

Yes, I was looking for resources for ZTE Avid Plus Z828 and I barely found anything at all.  Only if you can manage rooting your phone manually, you should be able to workaround other problems.


text:
Which file has the saved contact data in android? How to get this file in an unrooted phone?
My android phone's screen is damaged and only shows a white pixelated background and does not recognise any touch input (although it does recognise when I swipe on the initial lock screen after I restart the phone, I know this because I can hear the audio feedback). However everything seems intact internally, as I can charge it normally, pull out the battery and put it back in and restart it, the audio feedback when I put in the charger and pull it out work, and I can browse the internal memory by connecting it to the computer.
However, a big problem is that the phone is unrooted. I cannot connect the phone using adb either, since I cannot see the adb authorization dialog box, and just guessing where the OK button should be and pressing there is not working either. Since I can still the internal memory from computer, I have taken most of the basic data backup (pictures, audio recordings, etc) but I am not sure what to do about the contacts.
Is there any way to recover the contacts file from this phone, given that it is not rooted? The contacts are not backed up in google. The phone is Samsung Galaxy S4 with Android 4.4
Edit:
Create backup using
adb exec-out dd if=/dev/block/(bootdevice/)mmcblk0 > emmc-backup.img
How to take full image backup of partitions or eMMC?
From the image file extract userdata.image. This contains data/data. This will take a while. During this time command prompt will not give any indication something is happening.

Did you sync the contacts with a Google account? You may be able to recover them from there.

no the contacts were completely on the phone only, except for may be viber contacts which also used to show up on the phone contact list somehow (not sure how exactly that works)

Related: any way to read DATA/ directory's CONTACTS.DB?. The phone's contact data is usually saved in "Contacts Provider", a system app. Normally, you need to be rooted to access it though.

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

@AndrewT. Does this chatroom get deleted after sometime or can it be accessed at anytime?

@user17915 the chatroom has enough participants and messages not to be deleted (refer to Chat FAQ).

There is a possibility that the contacts would have been saved on your sim.
Try putting the sim on another phone and importing.


text:
How to clear android cached .apk data
I'm developing a mobile application for android and testing with a physical device. I have two versions quite different but same name etc. When I deinstall one apk to test the other, the old one is reinstalled. So my question is, how do I clear this cached data ? and why android keeps in memory an application when a user asks for it to be removed ...

How do you install the APK files? from within Android Studio or via ADB?

I install them from file system, I have the apks in a folder on my device

By "same name", I assume "same package name"? Since app's name doesn't really affect other apps. Otherwise, do both apps sharing the same external data location? Anyway, check if the global backup settings is active on Android's Settings, because some phones automatically restore app's data on reinstall. (I've experienced it while developing an app, reference: Back up or restore data on your Android device

Yes by name I mean package name, and they usually share the same location, but even if i delete the old .apk file, some data must be stored somewhere.
and the back up is disabled


text:
How to bypass system dialog asking to allow access to tablet data on Android tablets, specially those by Samsung?

I am developing an Android application, which connects with a Raspberry Pi hardware via the USB port. The issue is that this system dialog (as shown in the picture above) pops up every time I connect it. Requiring to tap on 'Allow' every time is resulting in bad user experience. If the user taps to 'Deny' or dismisses the dialog, the Raspberry Pi is unable to detect the connected Android device.
Is there a way to bypass this? Note that I'm using a non-root Samsung tablet powered by Android.
(Reposted the question here as suggested by someone in the comments. OP here: https://stackoverflow.com/questions/58371723/how-to-bypass-system-dialog-asking-to-allow-access-to-tablet-data-on-android-tab)

What version of OS, and have you tried all of the different states in  'Settings'->'Developer Options'->'Default USB configurations'

Android 8. As soon as I connect the Android device with the Raspberry Pi, the Default USB configurations automatically change to MTP.

The dialog "Allow access to tablet data" is a security dialog, therefore from within an app it is not possible to "bypass" this dialog. As it is currently not yet possible to identify a PC via USB and MTP protocol (may be this is possible in future by authenticated USB) there is also no option available like "always allow this computer to access my files".
Otherwise anybody with access to an unlocked Android device could simply copy e.g. all photos and videos fro the device using USB.
The only known way is to enable the "Developer Options dialog and permanently set the option "USB configuration" to "MTP / file sharing"
Alternatively you could use Android Debug Bridge (adb) ADB instead. On adb level there is a computer authentication which allows to allow a computer permanent access to the device via USB. Of course ADB is disable by default, therefore the user first has to enable the Development menu and the enable adb.

thank you for the answer. Let me verify the same as suggested by you. Once I verify, I will accept your answer

Unfortunately, there is no MTB/File sharing option on the Tab A. Only "Transferring files", "MIDI", "Transferring images" and "Charging phone only".


text:
Can application see all WIFI SSID?
I read the Wi-Fi scanning overview, but I am not sure if an application has the ability to read the Wifi access points around me.
I don't give location permissions.
I turn location service OFF.
The application manifest:

This app has access to:
  Storage
  modify or delete the contents of your USB storage
  read the contents of your USB storage
  microphone
  record audio
  Location
  precise location (GPS and network-based)
  Device history and apps
  Retrieve running apps
  SMS
  receive text messages (SMS)
  Phone
  directly call phone numbers
  read phone status and identity
  Identity
  find accounts on the device
  read your own contact card
  Call and device ID information
  read phone status and identity
  Private Wi-Fi
  view Wi-Fi connections
  Camera
  take pictures and videos
  Images / Media / Files
  modify or delete the contents of your USB storage
  read the contents of your USB storage
  Contacts
  the find accounts on the device
  read your contacts
  Other
  receive data from Internet
  read frame buffer
  change screen orientation
  change your audio settings
  view network connections
  prevent device from sleeping
  pair with Bluetooth devices
  install shortcuts
  uninstall shortcuts
  connect and disconnect from Wi-Fi
  full network access
  control vibration
  run at startup
  read battery statistics
  access Bluetooth settings
  use accounts on the device

So it can:

view network connections
view Wi-Fi connections
connect and disconnect from Wi-Fi
full network access

Will it be able to read the WIFI SSIDs around?
I see Android 8 needs at least 1 of the permissions: CHANGE_WIFI_STATE So will this be good enough?
On Android 10 will it also need location permissions?
So I understand correct ?
In Android 8:

getScanResults() only by asking CHANGE_WIFI_STATE (which is not needed from user to approve ?)

I would strongly recommend not to use the manifest permission text. Instead download the APK file and directly look into the AndroidManifest.xml to see the actual permissions (like android.permission.ACCESS_COARSE_LOCATION), or use an app that is able to analyze/extract the app permissions.

@Robert I do have it:

I used app ops to disable this. but was it enogth to read the wifi arounds?

Yes, an app can see all surrounding WiFi SSIDs with correct permissions.
This is the main use case for WiFi analyzer apps (not affiliated, just to show as an example, have been using one of the listed apps).
As for the permissions required, the already mentioned Wi-Fi scanning overview states:

Android 8.0 & Android 8.1: any one of

ACCESS_FINE_LOCATION
ACCESS_COARSE_LOCATION
CHANGE_WIFI_STATE

Android 9: all of

ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION
CHANGE_WIFI_STATE
Enabled location services (under Settings > Location)

Android 10: all of

ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION
CHANGE_WIFI_STATE
ACCESS_WIFI_STATE
Enabled location services (under Settings > Location)


text:
My S7 phone keypad
When I get a phone call and have to enter numbers for automated service, then when I mistype a number, I am not able to back space or see a delete icon.
But if I were to make a call, I have a delete button.
Very weird

Typing a phone number in your dialpad and typing a number in an ongoing-call/automated service is quite different. When you talk about automated service, it means that the 'automated service' is being hosted on some other computer that takes your input as final and processes it. You can't alter the input in any way. Unlike this, when you are dialling a number in your dial pad, the call is yet to be 'hosted' on a network so you are free to do whatever you want to.


text:
Unbrick pixel device
I accidentally flashed a Qualcomm rom to a Pixel device.
After which, neither does my device not boot and nor does power button work. It is most likely hard brick.
Running lsusb shows: "Qualcomm, Inc. Gobi Wireless Modem (QDL mode)"
Is there any solution to fix this issue?
Someone please help me out.
This is the script I ran to flash the rom.
Output printed during flash is available at here.
After some research on internet, I found this tutorial.
Now I am able to put device in EDL mode.
On a Windows machine, I could see device under COMMS as Qualcomm HS-USB QDLoader 9008 (COM11).
What should I do next?

Yes. Qualcomm devices come with an Emergency Downloader EDL mode which helps to recover from a hardbrick. You need a Flashtool and Qualcomm EDL drivers. In order to access EDL mode, you need to use an EDL cable or short JTAG pins inside the phone.

Hello Danish. Please go through [answer]. Answers on this site are not only written for OP but also for future visitors who might end up with the same or a similar problem. If you help out a user via email than those future visitors would not have a useful answer for them. Consider adding all the necessary information in your post by [edit]ing it. Do not worry about it getting long. That's fine.

Sure, thanks. Have noted it down.


text:
Lower ROM minimum brightness
On my rooted stock ROM LG G2 D802 KK 4.4.2 minimum brightness is actually 50 (not 0) on a scale from 0 to 255.
Here is my dumpsys power
POWER MANAGER (dumpsys power)

Settings and Configuration:
...
  mScreenBrightnessSettingMinimum=50
  mScreenBrightnessSettingMaximum=255
  mScreenBrightnessSettingDefault=102
...

Display Controller Configuration:
  mScreenBrightnessDimConfig=50
  mScreenBrightnessRangeMinimum=50
  mScreenBrightnessRangeMaximum=255

I tried editing build.prop, adding ro.lcd_min_brightness=20 but no luck, if I edit /sys/class/backlight/brightness to a value lower than 50 brightness stays at default minimum even if brightness slider is over minimum.
Where should I look for this hardcoded 50 minimum value? Framework.apk, kernel, SystemUI.apk...?

If I edit my brightness value manually, it won't go below the minimum, and I have never figured out why. If I use the app brightness tweak however, I can lower it all the way to one. You can find the app on xda labs, I hope it's compatable with jellybean. I also hope this helps you.


text:
How to recover stored wifi password?
My Android device (A Samsung Galaxy S7 SM-G930F, version 6.0.1) has different wi-fi networks saved. I would like to recover some of the password it has stored.
Browsing through the web I searched possible solutions but none of it has worked for me.

Stored password in wpa_supplicant.conf are encrypted, and even if I change the build properties "ro.securestorage.support" to false, old password remain encrypted or get deleted, and I would like to recover those.
I know that wi-fi password usually get backed-up on google drive, but I have no idea how to recover them from the backup online.
I heard about an Xposed module "Wifi password" which supposedly should show the wifi password instead of the normal dots, but I have a TouchWiz device and if I install the Xposed Framework i'm afraid it would wipe my data, included my wifi password.

I understand that encryption is meant to keep safe your password, but as far as I know, every time I try to connect to a wifi network it uses the real password, so they have to be stored somewhere or decrypted on the go.
Can anyone help me?
EDIT: As I said, if I change ro.securestorage.support property on build.prop file, my stored password either get deleted or they remain hashed.
If i delete .system.wpa_supplicant

all saved WiFi hotspots will be lost for the first time.

Also as said in the comments, the password isn't encrypted so there's no "way" to decrypt it, but it's hashed and there should be a way to recover it

Possible duplicate of Decrypting wpa_supplicant.conf on Samsung Galaxy mobiles

I specified on the possible solutions every answer in that question, saying that changing build properties or deleting files would result in removing my stored passwords.

I appreciate the effort you put in researching and asking a question which can be helpful for future visitors. Usually it's better to mention in your question any previous questions - if you find - which can be considered duplicates. But duplicates are usually discouraged. As your question too doesn't have a solution to the problem, so one may justify repeating the question. The previous question doesn't have an answer up to your expectations because Android Enthusiasts isn't the right place to answer questions explicitly about cryptography.

Thanks for the guide, I'll consider in the future asking on a more specific StackExchange subsection. I tried here, since my problem was directly how to "recover" from an android device and not "decrypt" from the hex key. Any answer could belong in different subsections, since it's at the crossing limit. Anyway I got my answers, and I selected the one that could be more useful for anyone that could have the same issue.

The hex value you found in the wpa_supplicant.conf is the PMK (not the PSK directly but some intermediate value computing the PSK or something like this). This value is not encrypted, it is hashed as defined by WPA2 using PBKDF2 SHA-1 with 4096 iterations see Wikipedia.
SHA-1 is a one-way function, which means that it can not be reversed.
Wifi still works, because the PSK is the actual key Wifi requires to work. The passphrase is just for the "dumb humans who can't remember a simple 64 hex chars value" (aka user convenience).
Hence there is no "decrypt" function. The only way to retrieve the password back is to perform a brute force search on that password (trying all possible passwords). Depending on the length of the password and your hardware (CPU, GPU) this can take some days, weeks, months or years.
There is an issue on Github with indicates that the tool "hashcat" is able to break this value using mode 12000 (-m 12000):
See also Encryption algorithm used in WPA/WPA2

But I (as a dumb human) cannot use that psk in any way to access the wifi with another device?
Forgive my ignorance about encryption and hashing, I understand the difference but I misused the term "encrypted".

@Iztooi Some systems still allow to use the PSK directly instead of the password. If the password field is limited to 63 characters it only accepts a password. If it accepts 64 characters usually everything less than 64 characters is considered to be a password and if you enter the 64 digit hex code it is taken directly as PSK. Or on Linux in the wpa_supplicant.conf you specify the password in quotes, and the PSK without.

So I checked my wpa_supplicant.conf and every psk listed is 32 characters long, and it has no quotes (so according to what I read, it should be the hex string).
Is it possible that the entirety of the psk is not shown but the remaining 32 characters are processed and added every time I try to connect?

@Iztooi It seems like the 32 hex char value is not the final PSK value (therefore you can't directly use it, you have to crack it). See my updated answer, especially the hashcat part.

I read about hashcat in your edited comment and I'm sure it will work, I'll mark the question as resolved but i'll add another answer that I found on stackexchange

Reading on StackExchange this question
Retrieve WiFi password
the user "life-on-mars" answered that if you do a backup of the provider settings (com.android.provider.settings) with adb and extract that backup with Android Backup Extractor in the end you will obtain a file called flattened-data which has all the network saved in the same way as the wpa_supplicant.conf but with the actual passwords not hashed/encrypted.

Didn't work on OnePlus 6 running Android 9. On which device and Android version did you test this answer?

I tested this in a Samsung Galaxy S7 (SM-G930F) on a 6.0.1 version


text:
How to find/identify the app that creates a sound?
My Android 8.0 phone generates a sound at 8:00 AM every day. It doesn't display anything on the screen while and after the sound being played. I guess this sound is created by one of my 100+ apps on the phone. I really have no idea where the sound comes from.
Is there any log on the phone that can help me identify which app creates the sound at 8:00 AM every day? Or is there any app that can help me find the app?

Answer tested on a OnePlus 6 running Android 9.0.

You can setup adb in your PC and try this command:
adb shell 'dumpsys audio  | toybox  grep -i "CallingPack" | toybox sed -e "s/$/\n/g"'

audio is dump/log that  is shown to the user using dumpsys utility. The rest of the command is just to filter out relevant information.
Example output:

10-15 18:14:19:273 requestAudioFocus() from uid/pid 10096/6373 clientId=android.media.AudioManager@a9ae24fqijaz221.github.io.musicplayer.audio_playback.AudioPlayerService@d009ddc callingPack=qijaz221.github.io.musicplayer req=1 flags=0x0 sdk=28

10-15 18:19:51:868 requestAudioFocus() from uid/pid 10133/3213 clientId=android.media.AudioManager@c20d259 callingPack=com.arlosoft.macrodroid req=3 flags=0x0 sdk=28

10-15 18:24:47:697 requestAudioFocus() from uid/pid 10019/1914 clientId=android.media.AudioManager@8f116ae callingPack=com.android.systemui req=3 flags=0x0 sdk=28

In the output, the bold highlighted text is the package name of the apps which had caused certain sound to be played in my device at the time noted at the beginning of each line. Here's what those apps did for me:

qijaz221.github.io.musicplayer is the media player I used to play a song.
com.arlosoft.macrodroid is an automation app I used to play a brief sound in the background without showing a notification.
com.android.systemui is for a notification with a sound.

To find out which apps correspond to those package names, follow my answer here.
Note: if the package name corresponding to your time turns out to be com.android.systemui, you may have to dig deep into the dump service media.metrics. I couldn't make much sense of its output but your case may vary.

I was puzzled by my Samsung Android 12 phone which has started playing random screeching sounds with some regularity. There was no app in foreground, it continued even after phone reboot. The phone is unmodified and not rooted. I've enabled USB debugging in Developer options, connected USB cable, ran adb shell and then logcat | grep requestAudio. After some time log records started popping out pointing to touchvpn software - look for callingPack parameter:
11-24 20:24:47.700  1114  6172 I MediaFocusControl: requestAudioFocus() from uid/pid 10256/23100 AA=USAGE_MEDIA/CONTENT_TYPE_MUSIC
clientId=android.media.AudioManager@7eea05corg.chromium.content.browser.AudioFocusDelegate@89e7f65
callingPack=com.northghost.touchvpn req=1 flags=0x0 sdk=30 11-24