text:
Use Google Photos from within Camera app on Samsung Galaxy S7
Is it possible to make the default camera app on the Galaxy S7 use Google Photos instead of Samsung Gallery?
I like the preinstalled camera app, but pressing the thumbnail icon in the interface will always open the Samsung Gallery, even though I have set Google Photos as the default app for photo viewing.
For newer devices, creating an "app shortcut" has been recommended in various articles and discussion forums (e.g. at lifehacker.com). This however doesn't seem to be available on the Galaxy S7.

Opening the gallery is hardcoded in the camera app of your device.
There's no way you can change it. Atleast not for now. Maybe in later updates, they'd make it available.


text:
Accessibility options - "Home answers calls"
I like this option on my old Android 4.2 Samsung Galaxy S3 mini. Especially when I am driving it's much easier to press a button instead of sliding...
But I cannot find such option neither on Android 4.4 phones (different phones, from Motorola to Sona) nor on newer phones with Android 5.1 and 6.0.
Is it 4.2 option that is not part of newer Android version?

Only Samsung offers that feature like home button answers the call. For other phone their might be an option like this, but not necessary to have.

Yeah, As said previously: It is device specific feature. But you may have this by using a custom ROM which provides this feature. Lineage ROMs usually provide this feature.
Google: "[Your device model] custom rom xda"

source: Stack Exchange

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

sort: votes


text:
Can I use different countries version of the Play Store on different accounts?
I recently moved abroad and I need to change the country of my Play Store (for mobile/banking apps), I also need to keep the apps from my home country.
Can I use two different Android accounts (with two different Google account) each with their own countries? Will they interfere with each other?
Thanks.

I think yes. I have different accounts with a different country. It is working fine.

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


text:
Activate location for "Find my Device"
When I go to https://www.google.com/android/find?u=0 (Find my Device), it says "Online" and "Location Turned Off" (under the device name) and the device is not located on the map.
I have checked the following on the device:

Settings->Security & Location->Find My Device: is "On"
Settings->Security & Location->Location->Use Location: is "On"
Wifi and mobile data are on (I have Internet connection)
The device knows its location (in Google Maps)
Find My Device can make my phone ring remotely.

Note: Sometimes the map shows the device (and the message becomes "Last seen ...") but this happens only rarely and under unpredictable circumstances (and a reload of the webpage makes it go back to "Location Turned Off" even if the phone was not moved and no settings were changed).
My device is an Umidigi A5 Pro with Android 9.

are you using same account?

@rajkavadia Yes. Find My Device successfully sees the phone ("Online") and I can make it ring. I just cannot get the location.

In addition to enabling location services, the "battery saver" mode must be off.
In battery saver mode, location services will be automatically deactivated when the screen is off (Android Help). Unfortunately, Find My Device is not clever enough to deactivate batter saver mode for determining the location.
I did not find a way to use Find My Device while at the same time being able to extend battery life.

I am not going to argue about your answer, it is correct, but "Battery Saver" isn't really intended to extend battery life, it is to keep the device minimally usable if the battery level falls below a certain level or is likely (base on previous usage) to run out before the next typical charge and should not be active all the time under normal use. Things like Adaptive Battery are intended to help minimize battery usage during day to day use to extend battery life. If your device isn't meeting your battery life needs, maybe look into why it isn't with a tool like GSAM Battery Monitor?

@acejavelin That doesn't really make sense to me... If the battery saver reduces battery consumption on an almost empty battery, then it stands to reason that it also reduces battery consumption when the batter is still full. Of course, there is a tradeoff (reduction of background features such as synching) but I'm happy with that if it gives a day or two extra battery life.
And even if one does not want the battery saver on the whole time, I think the inability to locate the phone is still a serious problem because one might lose the phone while having low battery.


text:
Auto upload photos directly from SD card to the cloud
I've an SD card reader attached to my android tablet. During traveling I want to backup my camera photos from the camera's SD card directly into the cloud (e.g. OneDrive) without storing them on the tablet (since there is not enough memory on it). Is this possible?

What have you already tried? There are e.g. filemanager apps with integrated cloud access that can upload files.

Haven't tried those ones - or didn't see that my "File Manager" manager have such feature. Worth a search with this new approach


text:
Malware that destroys the color yellow?
I have no idea where to turn with this, but I am worried that malware or other misbehaving software is causing a color distortion.  The story is:

my phone, a Moto G5 Plus, at some point lost the ability to show the color yellow, rendering it instead as a sickly green. The screen overall lost a bit of "spark", becoming washed out and dull.  It was an old phone, and I decided to live with something I was pretty sure was a (rare, since I found no similar stories on the net) hardware issue.
I then upgraded to a Mate 20 Pro, which surprisingly showed the same thing.  Since it was new, I returned it to the shop for repairs, and brought my old phone back to life.  The repairs took long enough that I managed to break my old phone's screen, order a new one, and replace it.  To my surprise, yellow was still missing after I changed the display.
I finally got my new phone back, after a display change and factory reset, and now it's all good.

Thoughts:

it seems very unlikely to me that the same obscure hardware error would occur to me twice.
especially since the display technologies are very different, LCD vs AMOLED.
the Mate was updated with all the magic of Android, so a number of apps and potentially data were automatically installed/transferred.
after I got the Mate the second time, I accidentally logged in with the wrong account, so no automatic installation/recovery was performed.

It sounds unlikely, but is there malware or flawed software that could cause this?  Something that were transferred with in the recovery process the first time?  And if so, where can I report it?  Can anybody find accounts of similar experiences?  If it is a hardware fault, does it have a plausible explanation (it seems all of R,G, and B, are mostly intact, it's only yellow that turns green).

Yellow is the combination of red and green. Therefore if you see green instead of yellow the color red is missing. Have you made sure that this is really a smartphone and not a perception problem? (may be some sort of red-green color blindness).

While we don't want to expect for the worst, behind this link is a color of the rainbow. Next, there's a setting in Developer Options to simulate color space (i.e. color blindness), though we can't guess if you or someone else accidentally turned it on.

I did put my phone side-by-side with the same model in a shop, and checked all possible display settings together with staff to ensure they matched.  As a reference, I used the "Color mode & temperature settings" page, which includes a rainbow.  I found it very strange that only yellow appeared to be affected, the reds looked fine.
Anyway, the problem is solved for me, I mainly want to put the problem description out there, in case somebody else experience the same thing.


text:
Is it possible to get the SHA256 of an APK solely through ADB?
I am currently working on a project which will identify malware that are residing on a device.
My aim is to make a hash-based detection of Android malware on a device by only accessing the ADB port of the device and getting the SHA-256 (MD5, SHA1, etc could also work) of the base.apk which resides in the app's data directory.
Is there any way to get the hash of an .apk file that is installed on a device using ADB, but without installing another app?

On most devices the command-line application sha256sum is present which can be used to generate the SHA-256 digest of one or more files.
It can be used via adb so that you can use it to generate a digest of each APK file without having to transfer it to the PC.


text:
How to run a program in an app context with Magisk?
Let's say I'm currently as root in Bash on a terminal, outside any app like Termux. I'm running Magisk.
Now I want to synchronously invoke Termux's Bash, such that it behaves the same way as it would if I had directly started the Termux app (i.e. with the same permissions and SELinux context and user/group and everything else).
How can I do this?

Android framework takes care of a lot of things when forking an app from zygote. In short, it's nearly impossible to run an app process from commandline so that it behaves “exactly the same way” as if the app was properly launched. Continue reading to have an idea of why it's so.
In order to run bash in Termux app's context so that it behaves exactly the same way as if it was started from the app, it must be run at least:

With UID/GID of the app assigned by the Package Manager at the time of installation
With supplementary group inet (3003), which is required to create network sockets and is assigned to any app at the time of installation which declares android.permission.INTERNET in its AndroidManifest.xml. For details see How Android's permissions mapping with UIDs/GIDs works?.
With supplementary group everybody (9997) which is used to control app's read / write access to /sdcard. For details see What is the “u#_everybody” UID?.
With supplementary groups <uid>_cache (UID+10000) and all_<uid> (UID+40000) so that app can access its cache, native executable code etc. But these aren't required necessarily since we are not running the app itself.
By entering the mount namespace of Termux app (com.termux process) which is required for supgid 9997 to work. If the app isn't running (e.g. if running from adb shell), supgid 1015 can be used to get write access to /sdcard but that's not how the app works.
By dropping all Linux capabilities (granular root privileges in Effective, Permitted, Inheritable, Bounding and Ambient sets) as well as setting securebits and process control attribute NO_NEW_PRIVS which make sure that app isn't able to elevate privileges by making use of setuid or file capabilities.
With blocked syscalls by applying seccomp-bpf filter.
With SELinux context of the app, which is determined at install / runtime based on MMAC (1, 2).
By adding the process to relevant cgroups e.g. cpuset, memcg etc. as the Android's framework does.
By catching, blocking and ignoring the same signals as the app would do.
By setting the environment it relies on. E.g. Termux's bash won't execute without LD_LIBRARY_PATH which it requires for dynamic linking.

There isn't a single commandline tool available which can do all of this sandboxing, it can be achieved fully only programmatically (see Minijail), or might be using multiple tools e.g. nsjail/firejail for setting seccomp filters, runcon to change SELinux context, capsh to alter DAC/capabilities, nsenter to enter mount namespace etc. setpriv from util-linux package can do the maximum:
~# uid=$(stat -c %u /data/data/com.termux)
~# pid=$(pidof -s com.termux)
~# label=$(cat /proc/$pid/attr/current)
~# export LD_LIBRARY_PATH=/data/data/com.termux/files/usr/lib
~# exec nsenter -t $pid -m setpriv --reuid $uid --regid $uid --groups 3003,9997 --bounding-set -all --selinux-label $label -- /system/bin/sh -c 'exec /data/data/com.termux/files/usr/bin/bash'

* nsenter and setpriv are busybox applets but with limited functionality. For aarch64 you may get static binaries here: nsenter, setpriv.
However we need to define shell_exec (label of /system/bin/sh) as entrypoint for execution by untrusted_app context which is not part of stock sepolicy (at least on Pie):
~# supolicy --live 'allow untrusted_app shell_exec file entrypoint'

Executing /system/bin/sh before executing /data/data/com.termux/files/usr/bin/bash is required because /data partition is mounted with nosuid option which prevents SELinux context transition (from magisk to untrusted_app) (3) and you get permission denied. You may consider mounting /data without nosuid to skip this step.
For the same reason --no-new-privs and --selinux-label can't be used in conjunction.
All this happens in native world, nothing in Java stack. So we have no direct control on things like manifest permissions which entirely operate inside Android framework. However manifest permission enforcement is also based on UIDs (4). For instance if Termux was granted android.permission.WRITE_EXTERNAL_STORAGE the bash we are running with Termux's UID will also be able to write to /sdcard.

From your comment:

It doesn't make sense to me how this is possible. Like, consider the output:
u0_a129 ~$ /sbin/su --context=u:object_r:app_data_file:s0:c512,c768 u0_a129 -c /system/bin/id
uid=10129(u0_a129) gid=10129(u0_a129) groups=10129(u0_a129) context=u:r:magisk:s0
u0_a129 ~$ /system/bin/id
uid=10129(u0_a129) gid=10129(u0_a129) groups=10129(u0_a129),3003(inet),9997(everybody),20129(u0_a129_cache),50129(all_a129),99909997(u999_everybody) context=u:r:untrusted_app_27:s0:c512,c768

Well, according to my understanding that's how Unix Discretionary Access Control works. First of all passing --context to Magisk's /sbin/su makes no difference as explained here:

the option still exists for CLI compatibility with apps designed for SuperSU. However the option is silently ignored since it's no longer relevant.

So the context isn't switched as you can see it's still u:r:magisk:s0. Secondly Magisk's su isn't the actual switch user (5), it provides a minimal functionality of standard su binary (the one we have on Linux). For details see How Magisk works?
In your first command it set UID, GID and supplementary groups to the UID you provided. You didn't ask su to set any additional supplementary groups, neither it can.
In second command you see the UID, GID, supplementary groups and SELinxu context which were set by zygote when it forked the app's DVM/ART (com.termux in case of Termux). Supplementary groups are explained above. 99909997 is also explained in the link given above.

It would be nice (hint, hint!) if the termux developers would build some sort of cli-callable utility to perform all of these functions, so that we can write commands that utilize termux capabilities for Magisk, adb, and other utilities. And note that termux-boot does not apparently run with all of these conventions, and programs initiated via termux-boot fail -- even on my rooted device -- because one or more of these necessary capaibilites are not set when the boot scripts run.
IMHO, termux would be much more useful if such a termux helper program was available.

@HippoMan taking care of all of these prerequisites and sandboxing mechanisms (plus those I don't know of or missed) is not the responsibility of app developers, neither they can. It's the Android framework which fulfills all of these requirements when forking an app from zygote. Incorporating these functionalities in an app or a separate utility would be equivalent to including a reasonably large part of AOSP code in them. This answer is just a reference to have an idea of what things are taken care of when launching an app. In actual there are even more complications involved.

For Linux distros, there are --reuid, --regid, --groups, etc. available for setpriv; but I get setpriv: unrecognized option '--groups' in Android. Duh. Maybe there is something missing, or I'm using a wrong BusyBox. Maybe I must compile the tool myself. At last, setpriv does not work with the options mentioned.

@MAChitgarha I mentioned that bb applet is limited. And the static binary link is also given. Just checked it again for you: https://ibb.co/98nQ3g1

@IrfanLatif Thanks for your attention. My phone architecture is arm, not aarch64. Do the files work on my platform, or I should make them myself? If the later, please post the source code of the library I should compile. Thanks.

No. 64bit binary won't run on 32bit arch. setpriv is part of util-linux package: https://github.com/karelzak/util-linux

any other solution without using setpriv ? the latest BusyBox v1.36.1-Magisk (2023-09-02 05:30:11 PDT) setpriv ony support limited option.


text:
Is it possible to transfer the internal memory/storage chip of an S9?
My Samsung Galaxy S9 is physically damaged and the board is dead. The phone will not turn on or show any signs of life. Plenty of important photos and data are on that phone which I need to retrieve.
Is it possible to swap out the internal storage chip from the dead motherboard of a Samsung Galaxy S9 and place it to an identical working board and retrieve the data that way?
If not, is there any other way I can get the data off of my dead phone? :(
Thank you in advance!

Based on the iFixit tear-down of the Samsung Galaxy S9 you can see that the flash chip in this model is a single chip soldered onto the motherboard - it is inside the orange rectangle below, a 64 GB UFS (NAND flash + controller):

Therefore theoretically it may be possible to unsolder this chip and read out the content if you manage to get the chip working in a different environment.
However even if you manage to read out the chip completely it may be of no use as usually Android devices come with enabled encryption by default (not sure about Samsung and especially this device). The encryption method uses hardware based cryptography, which means that the key is not directly stored in the flash chip but requires other system components like the CPU. However I don't know the exact details on the used encryption especially where the keys protected by the "Hardware Security System" are actually stored.
As your device most likely uses File based Encryption (FBE) there may be some files accessible that are unencrypted, however I don't have any experience what files are typically stored without encryption. My assumption is that most of the app/user data is encrypted.

Thank you for your clear and useful reply Robert. Have you by any chance heard of any other method? Maybe there is a NAND flash reader that can do the job?

If I get it correctly the used flash chip uses is a ball grid chip, which means the "pins" are hidden on the bottom of the chip (covered by the mainboard), therefore you have to unsolder the chip. UFS is a standard for accessing flash chips, therefore an UFS 2.0 capable reader should be able to communicate with the chip. See also this topic: https://forum.acelaboratory.com/viewtopic.php?t=8987

Looks like the readers are painfully expensive. I better stick to the idea of transferring the memory chip to a working motherboard. Still waiting for a reply from someone that has done it on a Galaxy S9. Thank you Robert for your helpful comments.


text:
What is a "synthetic password" and how is it used by Android?
On a first-generation Pixel that is running Pie, in locksettings.db there is a field named sp-handle that contains a 64-bit value. sp is an abbreviation for "synthetic password". Under /data/system_de/0/spblob there are three files:

0000000000000000.handle
XXXXXXXXXXXXXXXX.pwd
XXXXXXXXXXXXXXXX.secdis
XXXXXXXXXXXXXXXX.spblob

XXXXXXXXXXXXXXXX is the lowercase hexadecimal representation of the aforementioned 64-bit value. (I actually have several sets of pwd/secdis/spblob (some missing the spblob or the secdis file—I cannot remember which) presumably due to my attempts to get TWRP to decrypt my Pixel.) There are also files under /data/misc/keystore/user_0 named 1000_USRSKEY_synthetic_password_XXXXXXXXXXXXXXXX and .1000_chr_USRSKEY_synthetic_password_XXXXXXXXXXXXXXXX.
These "synthetic passwords" are mentioned and used in TWRP and SyntheticPasswordManager.java. They are used in decryption, but I can't tell how they are used in it or if they are also used in password authentication. Are they used to decrypt /data/misc/vold/user_keys/ce/0/current/encrypted_key (which I'm told is used in file-based encryption)? What are the purpose of the .pwd, .secdis, and .spblob files? Are the files gatekeeper.*.key used in deriving synthetic passwords?
Update
This paper from Qualcomm goes into greater detail on "synthetic passwords" than the source code, but it doesn't answer the more important questions like:

What is the purpose of and what is inside of XXXXXXXXXXXXXXXX.spblob?
What is the purpose of and what is inside of XXXXXXXXXXXXXXXX.pwd?
What is the purpose of and what is inside of XXXXXXXXXXXXXXXX.secdis?
Is the authentication token used in decrypting the CE key?

@Robert It is, but it isn't clear enough on whether auth tokens are used in decrypting anything.

First, you need to understand, two gatekeeper enrollment processes are involved in synthetic passwords.
Here is the process:

Generate a synthetic password, it's just a random number
Use a real password to enroll a fake ID and get SID (secure_id)
Use keystore to generate an AES key, bound it to SID, and use it to encrypt a synthetic password
Use a synthetic password to enroll the real user ID.

So you will see, in order to unlock a real user, you need to know a synthetic password. However it's encrypted by the keystore, so you need the real password to unlock the keystore first.
To understand it, you need to first understand how the gatekeeper works (e.g. What is secure_id? How does it work?). That's another topic.

00000000000.handle: return value of gatekeeper first enroll by synthetic password derived password.
handle.pwd: second gatekeeper enroll by real password with a fake user ID (e.g. user_id + 10000).
handle.secdis: Actually a random number. Used to encrypt the synthetic password.
handle.spblob: encrypted synthetic password
/data/misc/keystore/user_0/XXX: keystore key. Used for encrypting synthetic passwords.

Where can I learn more about this? Android source documentation on FBE lacks lot of technical explanation.

Well, i learned it totally from reading source code and dynamic debug framework process. It did took a long time :)


text:
Permanently delete apps using Titanium Backup (they keep re-installing!)
Phone is rooted, running a custom ROM.
I am using Titanium Backup, it has been given root privileges.
I am trying to uninstall the following:

default Files (I prefer X-Plore, yet, many apps keep using Files, despite setting X-Plore as default app)
Calculator (I have disabled autoupdates, yet THIS app was updated automatically, without my permission. This will not be tolerated.)
All other Google apps (Since one can auto-update regardless of settings, then the others can, too. Everything gets nuked)
Via browser

Titanium Backup shows that the files have been removed (the app names are crossed out), yet the apps are NOT removed from the app drawer, and clicking on them starts them normally.
I switched off all internet access (data and wifi), uninstalled the apps, then restarted, with no success.
How do I PERMANENTLY remove these intrusive and privacy abusing apps?

There are times Titanium Backup does not work, so I use System App Remover (root needed).
However, as indicated here, a workaround for Titanium Backup is to install Termux. Issue the following commands from Termux
su
setenforce 0

Then try to uninstall the apps again with Titanium Backup

This sets SElinux to "permissive". Then you can uninstall all your system apps. Then after you reboot, the phone automatically goes back to "enforcing" for SElinux.

My SELinux is already permissive. I'll try your tip anyway.


text:
What to do if I suspect my device is compromised?
I recently bought a Pixel 2 XL "open box" off eBay. The device appears slightly used, and a couple of days after registering with my Google account, I received security notifications of attempted logins in a far-away country. For this reason I suspect that the phone may have some kind of spyware or other unwanted software in it, that I want to promptly get rid of.
My options as far as a I can tell are:

Hard factory reset: my understanding is that this just deletes user data, apps and configuration, so if the malware is deeply embedded in the system files, this method may not solve the issue.
Custom image flash: this would be the most reliable method but is a little cumbersome and may brick the phone if done improperly. I've never attempted it myself and I'm a little nervous about it.
Over-the-air (OTA) image flash: which is a relatively new method, is supposed to be more reliable that the previous method with the same result. My fear is that  since this is a more high level procedure, the process could be hijacked by whatever malware I have and corrupt the new image.

Is my previous assessment correct? Am I missing something? what is the most reliable way to reset the software in my Pixel device in order to remove malware?

Bricking a Pixel device by flashing a factory ROM by Google is pretty hard. Anyway I would flash an original ROM: https://developers.google.com/android/images#taimen

I have not come across Android malwares embedded outside of system, kernel and data partition, so flashing stock ROM or a custom ROM should get rid of the problem. As Robert mentioned, flashing a factory ROM would unlikely brick the device. You can try the flashing and see if the symptoms again show up. This is firing in the dark though because we have not investigated how the device is getting compromised, so that proper course of action be taken.

Thank you both for the words of encouragement. I will try my luck with flashing the latest stock ROM.


text:
Monitor Network Availability (for phone calls)
Obviously my network carrier has some problems. Though my mobile phone shows two or three bars out of four for my mobile connection, I don't receive any phone calls (not available).
Is there some kind of app or service that notifies me, if I cannot be reached by phone?
WiFi is available, so it wouldn't be sufficient to just ping an internet server. Any other ideas?
I am using a Samsung Galaxy S5 mini (SM-G800F), Android 6.0.1, Voice over LTE is not supported on that device.

You should add some more information: What Android device do you use? If it supports LTE do you have a data plan with LTE, is VoLTE active on the device and is VoLTE supported by your provider? Have you tried to enable/disable VoLTE?

Tasker automation app supports firing an action / task on the basis of signal strength. Alternatively, a time based profile can also be run which would cause the task to check signal strength and take other actions based on your set conditions. You can try it and let us know your results.

@Robert: I edited the question.

@Firelord: Does Tasker use the same signal strength that is reported in top bar in Android? If its the same, that approach would be useless, as the signal strength is always fine and also the name of my carrier is displayed on the lock screen. So that's part of my problem: It is not visible to me that I cannot be reached via phone.

@user1251007 There is only one chance: use a different phone to prove if the phone or the mobile network is the problem.


text:
What does "Device connected - Updated usage information for some apps" mean on Play Store?
I would like to know what this means inside the Google Play Store:

Updated usage information for some apps.

The following screenshot shows on Google - My Activity at different times.

Google Play Store
Device connected
    Updated usage information for some apps
Details
    [September 24, 2019 @6:05am]
    Google Play Store
    [LGE LG-K373 ]

What does this mean?

You probably share usage and diagnostics information of that device with Google. In this particular instance, It means that Google Play Store was connected to its server and as stated "Updated usage information of some apps". The information can be when last you used the apps, how long, etc.

If you are asking for yourself and no one uses your phone, then Reddy's answer has the idea. But if you're asking because you saw this on a partner's activity, which is legal if they give you permission to use the phone, then I've been there, and here is possibility number 2. It is when the individual reads their account to the device. Why would they do that? I'll explain.
If you are trying to communicate with people or sites and you don't want someone to know but have to make it look like you aren't hiding anything and you don't want to leave anything behind by accident. Then you can't pause your activity in Google, that may give it away. You don't want to go through your activity feed and miss something you need to remove. So you remove your account after backing it up, and I add an account you do the activity with. Different email, social accounts, contacts. Everything. Then when you're done, you sync the second account and remove it. Add the first account back and restore the backup to the original form. Or a hybrid of said process. Now I think every time you add an account to your phone, said account would get a "device connected update app usage" log in Google activity feed.
Or if you use a browser like DuckDuckGo, you could anonymously log in to Play Store and use the app in the browser. Then when you uninstall an app with the Play Store or app section of settings, your device message would show.


text:
Multiple calls to bypass vibrate
In iOS there's an option to make the phone ring even if it is set to silent mode when the same number calls consecutively.  Is there an equivalent option in Android?

Android added "Allow Repeat Callers" feature recently, in Pie I think.

do you know where they put the setting?

Settings > Sound > Do Not Disturb > Calls > Allow repeat callers


text:
Dropped cell phone in water.display is working but touch is not responsive
I accidentally dropped my Sony Xperia XA2 in water. I quickly picked the phone switched it off and tried to dry by using hair dryer for few seconds. Then wiped it with a cloth.
After which I accidentally switched on the phone and went to sleep.
When I woke up after 5 hours.only to check that my phone display is Working fine however the touch is not responsive.
Now I kept it in rice.Will my phone work fine or should I have to take it to expertise. As I am from India and this is imported phone.I am not sure if authorised service center will help me.
Thanks in advance,
Zack.

I don't think the hair dryer was a good idea. Usually they use a temperature way too high, which means that you may have damaged something. Also you should read this answer.

Thank you for the answer Robert. After 1+ days I switched it on. Luckily its working. Right now typing this from my phone. However, do I still need to take this to authorised service centre. Or is it fine to use it as it is now?


text:
Remove second shutter button from S10e camera app
The stock camera app on my rooted Sampung S10e is working fine, but since a few days there is a second shutter:

I can move it, but it is useless and troublesome wherever I put it.
How to remove it? I only need the default shutter button.

is the position of the second shutter button fixed or does it move? It it is the latter it may may mark the focus point. Or it is simply a bug.

I'm guessing this has something to do with Accessibility feature, but I can't test my hypothesis since I don't have Samsung devices.

Touch the second shutter and hold it
Move it on top of the original shutter
Release it
The second shutter disappears

You can check that it really disappears by putting it a few pixels besides the original shutter, and see it disappear.
If you ever want this second shutter again, just hold then move the original shutter, it will create the secondary shutter. You can dispose of it again the same way.

If it was not there before, You can try clearing app data of camera.
Long press Camera app -> App Info -> Storage -> Clear Storage

I just tried, it works, thanks!

I'm glad to help, you may mark this answer as accepted. :)

The other answer has the advantage of not resetting all of your camera settings, though :-)

That's Better then.


text:
Netflix over mhl (usbC to hdmi aadapter) what could cause fail?
I am wondering why when I start Netflix's app it fails to playback any video (even downloaded ones).
Youtube works just fine, it's only an app running on Desktop looking environment.
So is it the DRM that could forbid that without an app knowing, I am not trying to ask an app specific thing, but globally for any app if DRM framework is the cause. Like for instance when a banking app blurs out, it's not the app causing it, but the category of the app.
The full setup looks like this:

1 Samsung S10
A smart tv (MHL compatible)
1 cheap usb-C to HDMI adapter
A long HDMI cable
(which doesn't matter at this point, since we have a connection to the tv)
A Samsung Dex running
Target app is in maximized window

(Please don't flag the question if it's poorly written, I really think this is a problem that some people will find it useful if solved, especially if they want to watch videos using some evil DRM based apps)

What happens when you try to stream the Netflix app to the TV without Samsung Dex?

I don''t think that a banking app is comparable with a streaming app. Banking apps usually set the SECURE flag on each activity which prevents the activity from being displayed in the recents list (and may be also via MHL?).

When I use normal HDMI mirror mode it doesn't care, but when in Dex mode, probably sets environment variables that it is streaming on HDMI or second screen, I need to capture the env changes in adb shell somehow to prove the theory. I am open to any advices on how to monitor variables or if possible to use strace (without root) :).


text:
WhatsApp—How to prevent notifications from returning after swiping them away?
When I get a new message in WhatsApp, I get a notification that contains the beginning of the message. After I swipe it away, the old message always returns when I get a new message. How can I prevent those zombie messages from coming back? There is a "mark as read" feature but that is too complicated to use, I have to swipe down and then click, I just want one swipe to completely clear the notification.

The notifications are showed by the Whatsapp (and there is no option in whatsapp to change this). You'll have to request Whatsapp dev for this feature.
Personally, I don't think they will consider your request so easily.
Anyways, Good Luck!


text:
Disable Volume and Power button screenshot
Pressing Volume (-Up or -Down) and Power button takes automatic screenshot.
Can I disable this feature?
(I often grab my phone and press those buttons by mistake).
I use OnePlus with OxygenOS 9.

For the moment, you unfortunately can't unless your phone is rooted. A user submitted a suggestion to have Option to disable screenshot using volume down and power button for OnePlus 6T. On the same thread, there are also owners of other OnePlus models asking for the same.
If your phone is rooted, you can disable the package com.oneplus.screenshot although it will introduce the disadvantage of no longer being able to take screentshots.
You can also try to remap the keys as shown here.


text:
Can I install 512 gb micro sd card in Samsung S9 plus?
Can I install 512 gb micro sd card in Samsung S9 plus ?

The specifications of the phone shows that the phone is able to handle up to 1 TB.

microSD, up to 1 TB (uses shared SIM slot)

That means yeas you can install a 512 GB microSD card on that phone.

@user374252 Even on your link, it shows that you can used a 512 GB SD card

Samsung India website keeps saying its 400 gb max also flipkart and amazon says the same... that's why the confusion came

Anyway I appreciate ur answer thanks you ; )


text:
Connect multiple Phone's hotspot to one PC
I am trying to connect 2 phones to a PC wireless.
The issue is that when I use a router connected to a PC and to the phones using wifi, it will prevent the phones from going to internet with mobile data, and I need 4G connection to internet.
Using only one phone is working properly, since I can do wifi hotspot from the phone, the phone will than go with the 4G and will also be connected with the PC with wifi dongle.
The issue is that any hotspot will have the same ip address - 192.168.43.1, as it is hard coded in code. So connecting 2 phones to same pc will have 2 gateways with same IP.
What is the proper solution ?

There are multiple possibilities if one or both of your phones are rooted. You need 4G on both phones?

@IrfanLatif Hi, I can't root the phone ... I need to go 4G on both phones and connect with PC on ADB with WIFI/BT.

Then create hotspot on PC (if WiFi dongle supports AP mode), connect both phones to that. Since there won't be internet connectivity from PC side, both phones will also keep connected to 4G ( not sure if this behavior has been persistent on previous Android releases).

" ( not sure if this behavior has been persistent on previous Android releases)"
No it will not connect to internet unfortuntly. it will try go from wifi even 4G is working and wifi no.

It works for me on Android 9. Whenever WiFi drop connectivity to internet, 4G automatically starts working. Try setting “Mobile data always active” in Developer options. Otherwise rooting is the only solution.

I use Xiami Go and andorid 8


text:
How can I cancel and delete OS Software update of Andoroid KitKat?

Initially I would like to update my Android OS from KitKat to Lollipop. Unfortunately, it will decrease around 950MB it internal memory/RAM. Then I decided will not continue to update it. But, how can I canceled it and delete all the dawnloaded files (548.71MB of OS software)? Only INSTALL button available.

I think you will have to factory reset your device in order to delete the downloaded OS.
As it was downloaded with intention to install, So I don't think there's any other way to delete it (other than rooting and finding it).

'system' is mounted read-only. Downloaded updates are written to /data or possibly /cache. Factory reset also doesn't touch /system.

Yeah, I forgot that. Edited my answer. Thanks

That very horrifying if I can not cancel it. If I have to continue to install, it will make my phone very slow.

I believe software updates don't consume all of your internal storage space. There must be at least 1GB of it left for user. This should not slow the device anyways.
if you still don't want to install the update, you will have to factory reset it.


text:
Android 10 and no internet wifi
I've been working on developing an android app for some time now that is meant to communicate with an embedded device.
The embedded device acts as its own Wireless Access point, and has no internet connection. Since having updated a couple of android devices (A pixel 2 and a pixel 3a) that we were using for testing to Android 10, we've noticed that the device will switch off of the WIFI without internet to a different profile that has internet. This happens somewhere between 30 seconds and 5 minutes after having connected to the embedded device. (I also tested this on a generic router, with the same outcome.)
Is there anyway to prevent this behavior?

In the general Wifi settings of Android 10 there is a "Network rating provider" setting. Have you tried to change the rating provider to "None"? Assuming that a network without Internet gets a lower rating this could explain the automatic Wifi switching.

Yhea, that was set to None.
I also tried disabling Turn on Wi-Fi automatically, everything under Wi-Fi control, and Wi-Fi scanning. None of that changed the behavior I was seeing.

Have you been able to solve this problem? I am seeing the same on a Pixel 3a device with Android 10.

Not exactly, it turns out it was a bug in Android. I had filed a bug report back in October regarding this. As of May 13, one of marked the issue as fixed and google stated that the fix will be available in a future build.
https://issuetracker.google.com/issues/141903691


text:
How to use SD card formatted as internal storage for arbitrary data?
On an LG V30 with 64GB internal memory I wanted to be able to use a 200GB SD card (which strangely gets reported as 256GB) to store larger amount of data like pictures, music and movies.
I learned that with Lineage OS 16 (Android 9 Pie) you cannot use your SD card as before since apps are no more allowed to write data to SD cards (is there an Apple manage working at Google now?!)
I then formatted my SD card as "internal storage" (believing that it now extends my 64GB to 200GB) but there doesn't seem to be a way to move arbitrary date to this new "internal storage".
So my (still very fuzzy) question is: is there a way to use an SD card to store arbitrary (i.e. not owned by one app) data like a Movies, Pictures etc. folder (which might be synced automatically by Syncthing or similar apps)?
(extra question: can formatting an SD card as internal storage be undone?)

Android rounds-off storage size to nearest power of 2. So 200 would be becoming 256. Apps aren't allowed to write directly to external SD card since KitKat at least; they hired Apple managers long time ago ;) That's why SAF was introduced which is extended in 5, 7 and now in 10. You must already be saving arbitrary data to Adopted SD card. Check with df if it's /mnt/expand/[UUID] mounted on /storage/emulated.

I don't know if I really get it.. Can I relocate Pictures, Downloads or Music to the adoptable storage? And is there a way to comfortably access data @ /mnt/expand/[UUID] (i.e. without having to lookup and re-enter this ugly path again and again)?

Possible duplicate of How to free Internal Storage by moving data or using symlink / bind-mount with Adoptable Storage?


text:
Camera on Lockscreen
I have a Poco F1 running Miui. The Gcam is a much better camera than the stock one. Is there a way for me to change the camera that is opened on the lockscreen?

GravityBox xposed module has the option  to tweak that but I am not sure the module would work on a heavily modified skin such as of MiUi

That would require root wouldn't it. I do agree that Miui is heavily modified so maybe there isn't a way.

Yes, that requires root and Xposed framework. That said, you can try a third-party lock screen app which provides an option to tweak which app shortcut to be shown on the lock screen.


text:
How to install global MIUI/google services on a Redmi Note 8 Pro?
I have recently bought a Redmi 8 Pro in China with the Chinese MIUI 10. Because I live in the UK, I would like to use google services and apps such as Whatsapp and Facebook that are not available on the official Xiaomi app store.
So far there is no global MIUI available on the official website and Redmi 8 Pro is only expected to be released in India in Oct. Does it mean that there will be no global MIUI available until then? Since Redmi 8 Pro uses MTK chips, there is rumour (in Chinese) that no global MIUI is ever going to be available for this phone.
Can I ask if there is any way for me to use this phone conveniently in the UK, please? Thanks in advance!

You an try flashing gapps (provides Google apps and services framework) in your device and see if it works. This would require unlocking bootloader and flashing TWRP recovery which "may" void your warranty.


text:
Whatsapp: Continous loop of messages backup and no text box to type in Samsung S10
Gentlemen,
Two problems I'm facing in WhatsApp in Samsung S10 (fully updated)
1- Whenever I open WhatsApp settings, a message appears "backing up your messages" once it is completed and I try to go back to chats and starts again and again for 3 to 4 times then I can come back. (Backup settings: Never and not able to link it to any google account)
2- In any chat, the text box at the bottom is hidden and I cannot type anything, the only way around is to reply to someone then hold the phone horizontally and then I can type and send.
This is really disappointing especially that I just switched from iOS to barnd new Samsung S10 to find these issues!
(Note: I used a WazzapMigrator to get all my WhatsApp data from my iPhone).

Resetting an application usually solves such random issues.
Long Click on Whatsapp -> App info -> Storage -> Clear Data.
It will reset Whatsapp. Now you will have to use WazzapMigrator again to transfer your data. Hope it helps

The only way for fixing this was uninstalling WhatsApp without touching any backups or databases folder. Just Uninstall, restart the phone and install the app. It will restore everything.
It worked for me and everything is fine now.


text:
Outlook app constantly requiring two-factor authentication (TFA)
I have my Outlook app synced to a number of different accounts, including Gmail, Blacknight, and 3 different Outlook 365 email accounts.
For the last 36 - 48 hours, 2 of the Outlook email accounts have been constantly requesting me to sign back into the account, using TFA. This seems to happen every 2 hours or so.
I've tried going into the settings, and resetting the accounts, but this does not seem to work.
From memory, the settings on the email accounts are set to require TFA every 14 days.
This issue does not happen for the other accounts linked to the Outlook app.

Outlook version is 4.0.16, last updated on the 19th Sept 2019.
Android version is 9, with patch security from 1st August, 2019.
Phone is a Samsung Note 8.

Any suggestions on how to resolve, as it is very annoying?


text:
Is it possible to delete a file through the Google Drive app?
In the Google Drive app, on its home screen, I get a list of files and a "3 dots" menu next to each file. When I open the menu, all of the options given to me are:

Share
Add to Starred
Make available offline
Link sharing off
Copy link
Make a copy
Send a copy
Open with
Download
Rename
Show file location
Details & activity
Print
Add to Home screen
Report abuse

While these are a ton of options, none of them are "Delete" or "Remove" or similar. I tried looking in the "Details & activity" section to see if there was a "Delete" option, but there was not. Is there a way to delete files through the Google Drive app, or do I have to use the website to delete files?

Yes, but not on Google Drive's home screen.
The Google Drive Help mentions the following:

Put a file in trash
To remove a file from your Drive, you can put it in your trash. Your file will stay there until you empty your trash.
If you're the owner of the file, others can view it until you permanently delete the file. If you're not the owner, others can see the file even if you empty your trash.

On your Android phone or tablet, open the Google Drive app.
At the bottom right, tap Files .
Next to the file you want to delete, tap More   Remove.

Alternatively, you can also long-press and select multiple files, then tap "Remove" (trash icon) on the toolbar.
Note that you can also do this on "Starred" and "Shared", but not on "Home".

To actually remove the files, you also need to empty the trash.

Empty your trash
You can permanently delete an individual file or empty your entire trash. After deleting a file, anyone you've shared the file with will lose access to it. If you want others to be able to still view the file, you can give ownership to someone else.

In the upper left, tap Menu   Trash.
Next to the file you'd like to delete, tap More   Delete forever.


text:
Android 9: OpenVPN Per App
First: this question is not a duplicate of:

This question: I don't want to use SOCKS, and I am not asking about Lollipop.
This question: No answer, and different use case
This question: I don't have time to develop my own application.

My goal: to find a way to force all internet traffic (including cellular ie LTE) into my OpenVPN server, except for apps on a whitelist. Whitelisted apps either connect to a second VPN or SOCKS proxy (option preferred), or not be connected to a tunnel at all (a "normal" connection).
For example, try out the ProtonVPN application (which, by the way, I recommend). There is an option to whitelist apps from the VPN. This is what I want, but for my own server.
Root is definitely not preferred, but if it's the only option, then I guess I'll accept it. Multiple profiles are also not preferred, but if it allows some apps to be over VPN and others not, then I will also accept that (but I would like system apps to be blocked in that case).
Thank you.

I have been using https://play.google.com/store/apps/details?id=it.colucciweb.vpnclientpro with my OpenVPN server. With root you can manually filter UIDs in routing table. [Edited by Firelord]

How about "OpenVPN for Android" made by schwabe.
https://play.google.com/store/apps/details?id=de.blinkt.openvpn
https://github.com/schwabe/ics-openvpn
It has per app connection setting by whitelist or blacklist, though it doesn't support second VPN or SOCKS proxy for the excepted apps.


text:
How to force shutdown a android phone? (ZS570KL specifically)
My phone fell several days ago, and the screen didn't display anything now.
The model is ASUS Zenfone 3 Deluxe (ZS570KL), and I didn't root, flash recovery, or turn on debugging mode on it. The Android version is 8.0.
I've talked to customer service of phone manufacturer and was told that there's no more spare screen.
I tried to shut it down, but long pressing power button can only make it reboot. Is there any way that can force shutdown the phone?

Your device supports HDMI over USB-C, so you can connect it to an external display.  You may want to reach out to repair companies that will likely have an inventory of the screen, such as U Break I Fix.

Why don't you let the battery discharge fully? It would do the job.

JW0914: My device doesn't support HDMI over USB-C.
@Firelord: How do I know it is fully discharged?


text:
How to manually root a phone?
I want to learn how to root a android phone manually, I mean without any apps like KingRoot, dr.fone etc.
I did not found any guides or information about it.
(Background Information: I want to root a BlackBerry KeyOne, even if you say it does not work i want to learn and try it anyway)
Can you please help me?

How does Magisk work?

^^that, and our rooting tag wiki are good starting points. Device-specific guides are collected in How do I root my Android device? (if you want device-specific help, it would be good to [edit] the title of your question and replace "a phone" by the one you're talking about, the "Blackberry KeyOne", so it can be found easier). How does rooting work? will also be of interest if you want to know of "generics".

I was looking at the web search results of “how to manually root Android devices” and I noticed that most of those are either just advertising stuff or makes use of dedicated (particularly closed source) rooting solutions. Those which worked some time ago are now obsolete since they depended on some security vulnerability in Android which was fixed over time.
In fact it's not impossible to root phone manually but it's not worth the hassle. However as a reference, let me describe an option. But before diving into the technical details, we need to understand what root is and how Android prevents root access. Details can be found here but a few points in short:

Mostly vendors ship their devices with locked bootloader, and a chain of trust is established during boot process, which won't let any modification be done to kernel (boot.img), recovery or the main OS. So the first step towards rooting is unlocked bootloader. Beware of the risks!
A part of the chain of trust is dm-verity (VB/AVB); a kernel based phenomenon which makes sure that partitions containing core OS (/system, /vendor, /odm) are always mounted read-only and any malicious attempt to modify them must fail. Modifying boot.img or recovery.img is usually accompanied by disabling dm-verity to avoid surprises like bootloops at later stages. TWRP's standard warning:

This device uses dm-verity!
  This means that swiping to allow system modifications will prevent you from being able to boot if you are using the stock kernel.

Similarly some vendors particularly Samsung go beyond normal and build extra security features in their devices like Knox, RKP, Defex, proca, TIMA, FIPS, bla bla bla. So you might also need to circumvent those e.g. by building kernel with SECURITY_SELINUX_DEVELOP=y, patching kernel binary etc.
Android apps don't have capabilities to elevate their privileges by executing binaries which have setuid or file capabilities set (which is the standard way to get root access). So the only option is to run a background persistent process (daemon) with root privileges outside the apps (e.g. during boot process) and request it to do privileged tasks on behalf of unprivileged apps when needed.
Root (i.e. UID 0) is the old Discretionary Access Control (DAC), but Android also makes use of Mandatory Access Control (MAC) i.e. SELinux. A root process running with restricted SELinux context is quite helpless, so we have to break this barrier too. It requires modifying SELinux policy.

I'll address the last two points here, but first two considerations:

Android rooting solutions deploy a special su binary which - when executed by an app - makes a connection to privileged daemon and gets the app a root shell. So this su binary and daemon are specially developed for this purpose. A less sophisticated approach would be to run already available daemons like adbd, sshd or one of the old inetutils flavors (telnetd, rlogind, rshd, rexecd) with root privileges. When running in background, these servers can provide a root shell or execute commands with root privileges when connected by a client. For the sake of simplicity I'm using only a minimal network utility named netcat (nc) which is a busybox applet. But please note that apps can't get root access with this approach, it can only be used from commandline.
We are going to patch monolithic /sepolicy file and /init.rc file which are part of ramdisk in boot.img. But starting with Treble Android uses split policy which is loaded/compiled from /system/etc/selinux/ and /vendor/etc/selinux/. Starting with SAR, there's no ramdisk at all in boot.img and /init.rc is part of system.img. So in both cases you need to necessarily modify system partition. I'm not giving details on that here.

STEPS:

Extract boot.img e.g. using AIK or magiskboot on Android or PC.
Create a new SELinux context, say pseudo_su. Set it permissive so that to allow any possible interactions with other processes / files etc. Use Magisk's supolicy tool or sepolicy-inject (1, 2) on Android or PC:
~# supolicy --load sepolicy --save sepolicy 'create pseudo_su' 'permissive pseudo_su' 'dontaudit pseudo_su * * *' 'allow pseudo_su * * *' 'allow * pseudo_su * *'

Or to build split-policy using Android's compiler:
~# /system/bin/secilc -m -M true -G -N -c $(cat /sys/fs/selinux/policyvers) -o sepolicy /system/etc/selinux/plat_sepolicy.cil /system/etc/selinux/mapping/$(cat /vendor/etc/selinux/plat_sepolicy_vers.txt).cil $([ -f /vendor/etc/selinux/vendor_sepolicy.cil ] && echo /vendor/etc/selinux/vendor_sepolicy.cil /vendor/etc/selinux/plat_pub_versioned.cil || echo /vendor/etc/selinux/nonplat_sepolicy.cil)

* Get the value of POLICYDB_VERSION_MAX from your kernel source.
To use vendor's precompiled_sepolicy or build from split-policy and patch:
~# supolicy --load-split --save sepolicy 'create pseudo_su' 'permissive pseudo_su' 'dontaudit pseudo_su * * *' 'allow pseudo_su * * *' 'allow * pseudo_su * *'

Define an init service which starts a simple TCP server on boot, only listening to on-device connections:
# /init.rc
...
service pseudo_su /sbin/busybox nc -lk -s 127.0.0.1 -p 23 -e /sbin/busybox sh
    seclabel u:r:pseudo_su:s0
    disabled

on property:sys.boot_completed=1
    start pseudo_su

* Make sure you get the right busybox binary, there are multiple implementations of netcat.
* Use port 23 or any other unused port.
Copy updated sepolicy and init.rc to root of extracted ramdisk, busybox binary to [ramdisk/]sbin/ and set permissions.
Repack boot.img and flash or test with fastboot boot boot.img.

HOW TO RUN ROOT COMMANDS?
Once booted, we can pass commands from a netcat client on terminal emulator app (like Termux) or adb shell:
~$ echo id | /sbin/busybox nc localhost 23
uid=0(root) gid=0(root) groups=0(root) context=u:r:pseudo_su:s0

* Default SELinux policy doesn't allow apps traverse /sbin. So either inject allow rules or put busybox in /system/*bin/. Or use some other nc e.g. from Termux's netcat package.
For ease of use, create functions (put them in .bashrc so that you don't have to define every time):
# ~/.bashrc
...
function psu() { echo "$@ 2>&1" | /sbin/busybox nc localhost 23; }
function psush() { /sbin/busybox nc localhost 23; }

~$ ls -ld /data/adb
ls: cannot access '/data/adb': Permission denied
~$ psu ls -ld /data/adb
drwx------ 7 root root 3488 2019-07-19 00:44 /data/adb

To get root shell:
~$ psush
whoami
root
^C

But it's just a dumb shell, not connected to terminal. To have a more feature-rich experience, other tools like socat can be used which support line editing, pseudo-terminals etc.
Also environment variables aren't evaluated unless explicitly passed, because commands are executed remotely:
~$ /data/data/com.termux/files/usr/bin/ps -p $$,1 -o pid=,comm=
23599 bash
~$ psu /data/data/com.termux/files/usr/bin/ps -p $$,1 -o pid=,comm=
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/bin/ps": library "libprocps.so" not found
~$ psu LD_LIBRARY_PATH=/data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/bin/ps -p $$,1 -o pid=,comm=
    1 init
23599 bash

So that's how we can get a minimal root functionality without using any specialized rooting tools.

RELATED:

How does SuperSU provide root privilege?

what you mean by "android's compiler"? Isn't secilc something available for ubuntu in general? Do I have to compile something from AOSP to run /system/bin/secilc -m -M true -G -N -c $(cat /sys/fs/selinux/policyvers) -o sepolicy /system/etc/selinux/plat_sepolicy.cil /system/etc/selinux/mapping/$(cat /vendor/etc/selinux/plat_sepolicy_vers.txt).cil $([ -f /vendor/etc/selinux/vendor_sepolicy.cil ] && echo /vendor/etc/selinux/vendor_sepolicy.cil /vendor/etc/selinux/plat_pub_versioned.cil || echo /vendor/etc/selinux/nonplat_sepolicy.cil)?

Maybe you meant running this inside the Android, right? Can't I run on Ubuntu since it has secilc on apt-get?

@GuerlandoOCs you can run secilc on Linux distros too. But you need to copy the required files to PC and then compiled binary back to the device. Android devices already have the secilc binary. So it's better to run the command on the device.

Would it work on a non-rooted device? Because I want to run this exactly for rooting but I guess it wouldn't run

@GuerlandoOCs theoretically it should. And also the whole process was practically performed on a non-rooted device before I wrote this answer.


text:
Google Photos backup
I've been trying to upload my photos to google photos. It's stuck on uploading x items. I tried restarting, removing cache, clearing storage.
I even tried downgrading the google photos app version.
My backup and sync is on.
Please need help
Thank you

Are you using wifi or mobile data for backup
Check this settings/backup & sync and turn on backup and sync
you can also try backup mode/ and reselect high quality
it will auto upload


text:
How do I get the contents of an HTC .hbk file... without buying an HTC phone?
I broke the USB port of my HTC One phone, so I am unable to charge it any longer.
Before the battery was dead, I made all the needed backups, including SMS, which created an .hbk file. I searched for a solution, but the only one I can find consists of putting this file on another HTC phone and recover the messages this way.
As I have no intention to buy a new HTC phone just to get my messages, how do I extract the contents of the .hbk file on a PC (Linux or Windows)?

Do you still have the ROM containing the HTC SMS app(s)?

@Robert: not sure if I understand your question. The same ROM as the one which was installed on my phone is available from the official website. Do you mean I can use it with an emulator to get back the messages?

If you still have the ROM you could extract the SMS app that created the backup. With the APK of the app that created the backup it is possible to decompile to see how the data is stored and if it is encrypted. May be the backup format is simple and a small script could decrypt/extract the SMS.

I see. It could work, indeed. Could you please promote your comment to an answer?

I would not call this an answer, it is more a rough idea. Anyway you still need someone who decompiles, understands the code and can make use of it in a new program or script. Therefore it is not doable for most users here.


text:
Fastboot: failed flashing (remote: size too large)
I'm flashing a GSI image using fastboot. After entering fastboot flash system system.img I get this:
E:\AndroidSDK\platform-tools>fastboot flash system system.img
target reported max download size of 535822336 bytes
erasing 'system'...
OKAY [  0.016s]
sending sparse 'system' 1/7 (523260 KB)...
OKAY [ 17.280s]
writing 'system' 1/7...
FAILED (remote: size too large)
finished. total time: 17.306s

I also tried to flash it using TWRP, same problem.
What's the problem? Can I make system partition larger? Please help.
Edit: I have the latest adb version.

I installed the latest fastboot from android.com, and i'm getting the same problem.

You cannot make the system partition larger, nor should you have to... It sounds like you are not flashing the correct system image to the device. Can you add details about the device and software image you are trying to install?

Fastboot has an option -S Used to cut large files into small ones. Specific information can be found at man page:
fastboot --help

So, we can set the size of the crop block to 256MB:
fastboot flash -S 256M system system.img

Source

FAILED (remote: 'size too large') Same error if I enter fastboot flash -S 256M recovery recovery.img

I had a similar problem with boot.img

After rebooting to system and again activating Fastboot mode (Volume down+Power) it worked perfectly.

Same mobile phone, same computer, just some reboots and some minutes later.


text:
Preferred Network Type Settings
I am on Miui and the default setting for the Preferred Network Type doesn't want to save. I want to change it but when ever I close it it won't save. Anyone knows how to fix it?

For 4G devices, default will be 4G. If you need 3G, just select it, device will save it, and switches to 3G. I don't know why it's not saving settings. Check whether you've applied right ALN4.

What is ALN4? Also by default it keeps reverting back to LTE/TD-SCDMA/UMTS when I want to have it on LTE/CDMA/UMTS auto (PRL) which gives me much better coverage and will give me 4g more often for some reason.

Sorry it was a typing mistake. I mean APN settings for that service provider.

I have just reset it using a built in feature. I will see if that works.


text:
update Android 6.0 to Android 8.0 on my RCA Galileo Pro 2 in 1

I would like to update from Android 6.0 (Marshmallow) to Android 8.0 (Oreo) on my RCA Galileo Pro 2 in 1, this model is RCT6513W87 it has a 1.3 GHz quad-core processor+, with WiFi and Bluetooth.
I would like to upgrade the WiFi to dual band 2.4/5 GB 802.11ac.

I am told that a way to upgrade is to use a Custom Recovery app like ClockworkMod Recovery (CWM) or Team Win Recovery Project (TWRP) both of these requires you to make a connection with a computer, using a USB cable.  My 2 in 1 only has one USB 2.0 port and one micro USB port for charging only. But I haven’t been successful with work with the root and app’s that give you root access.

If your wifi  chip doesn't already support dual band (2.4/5 Ghz), there is nothing you can do via software or firmware to change this - it's a function of physical hardware that was built in when the tablet was manufactured.
As far as an Android update - that is usually up to the manufacturer.  There is a menu item in settings to check for system updates.  Connect to the Internet and then select this menu item - if an update is available from RCA, then it will tell you and allow you to download and install the update.
The 2020 version of the Galileo Pro comes from the factory with Android 8.1 Go edition.


text:
Automatically turn work profile off on evenings and week-ends
I'd like to block myself from accessing my work apps at certain times and days (typically, evenings and weekends). Ideally, I'd like to use the system-level setting to remove access to all apps on the work profile. Back when all my apps (personal & corporate) were living on the same profile, I used the paid version of Stay Focused to block all work apps individually, and that was a satisfactory solution. Unfortunately, now the "device policy" forces me to put all work apps on the work profile, this Stay Focused app isn't available on the work profile version of the Play Store, and when I install it on the personal profile, it can't block apps on the work profile, so it's basically useless.
I know turning work profile on/off manually is really easy, but

I too easily forget to do so (and then mindlessly check work email late at night), and
the fact that it's so easy to turn it back on is part of the problem (ideally, I need to be 3-4 clicks away from accessing anything work-related, otherwise I do it mindlessly).

I use a Pixel 3A on Android 10. I can't root my phone. Is there a workaround or am I just out of luck?

If you go to settings > digital wellbeing + parental controls > digital wellbeing > ways to disconnect
There's a setting for setting a work profile schedule

Ah thanks… I don't use work profile anymore, so I can't verify your answer. If someone independently confirms that it works for them, I'll accept it.

It does work as Greta says. I just added it to mine. When it asks you to select "Personal" or "Work" select personal and then the work schedule is there under "ways to disconnect".

It's very well documented here https://www.xda-developers.com/pause-work-profile-schedule/


text:
How to Limit Number of Recent Activity Screens
I'm amazed that A) I haven't looked for this sooner, and B) I couldn't find something that does this.
I simply want to limit the number of recent activity screens (cards) that appear when I hit the □ button.

EDIT:
My phone is an non-rooted LG Stylo 3 Plus, Android version 7.0 Software version TP45010m.
(Also, if anyone knows how to root this phone specifically, I'd like to hear it... I haven't been able to find a method that works for LG Stylo 3 Plus and have seen that this phone specifically is unable to be rooted.)
**
TL;DR:
Any time my 80-year-old mother asks me to help her with something on her smartphone (Does the day of the week end with "y"?), I tap the □ button to see her recent screens. She generally has like 47 recent cards listed there, as she never swipes them away or clears the list.
I'm aware of the concept that (generally speaking) these are more or less shortcuts to apps that have run, and that they (generally) use no memory while sleeping in this state, so swiping them away often won't conserve significant resources.
I'm also aware that I can "CLEAR ALL" cards (the button can be seen in my animation), but I don't want to do that, either.
The problem is that this is supposed to be an "easy" way to jump back and forth between apps that you use often, right? Doesn't it defeat that purpose if there are 47 cards to look through? Easier just to find the app in the app drawer and "restart" it.
I looked, first on playstore, then just searched the internet at large for something that would simply limit the number of recent cards on that screen to, say 5. Whenever you have 5 cards (or 10 or whatever) and you open a new app, the oldest would disappear.
I found a bunch of stuff that would "kill" an app or all apps, but this is counterproductive in my case, right? Doing this would reduce battery charge life because I would be using resources to turn it off, then use more resources to create a new instance of it the next time I want to use it—as opposed to just letting it sleep, where it uses very little resources and comes back to life quickly.

Bonus, same thing goes for her Chrome browser. 63 open tabs??!!??!! I found how to close all open tabs, but it would be nice to only have the 5 most recents there and remove the older ones.

While it might (or might not) affect the answer, could you also state the phone model and Android version, and whether it's rooted? While I don't yet know the solution for this issue, changing the behavior of the system usually needs root access (or perhaps Magisk for systemless root modification). On the other hand, my Nexus 5 on LineageOS 14.1 aggressively limits the recent apps list instead, so having more than 7 apps shown on there is already a rare situation.

Without root on Android 7 the possibility to configure something related to the recents menu is next to non-existent. Only on Android 9+ the launcher app can influence the recents menu: https://www.xda-developers.com/android-pie-recent-apps-customization/. Regarding Chrome: If you see real tabs (not just a counter) try to long press the close-x of a tab to get the close-all-tabs menu.


text:
Taking out of silence after x missing calls from specific person?
I'm using silent/vibrate mode most of the time, however, I do want to be notified by a ring if a specific user/s called me more than once
Is there any setting or app to help with this request?

In Android 9: Settings > Sound > Do Not Disturb > Calls > Allow repeat callers

I know this one, but the problem is I have to set DND mode rather than just lowering the volume


text:
Explore files using Android Studio
Is it possible browsing the device filesystem with the current version of AS? I've read that in the menu View > Tool Windows > Device File Explorer there should be the suitable tool, but I cannot see anything.

I've just checked Android Studio 3.5 for Windows, and it's there on View - Tool Windows - Device File Explorer. By "cannot see anything", did you mean there's no menu entry, or it didn't show Device File Explorer on one of the Sidebars, or it didn't show your device, or it didn't show your device content? Also on Android's official documentation: View on-device files with Device File Explorer

@AndrewT. I follow the menu till to the entry Tool Windows in the upper menu View, and here I don't see anything (i.e. Device file explorer is missed). Android Studio for Linux

The menu is also present here (AS 3.5 on Windows). I find it quite interesting that this explorer is capable of listing /data/data/ which is not possible via adb on an unrooted device.

@Robert Is /data/data/ available only for apps in debugging mode on the device, not for all the installed apps? Maybe if I haven't installed any such app the Device Explorer doesn't appear. Do you see it in the menu even without any app in debugging mode?


text:
Does Android Have a BIOS?
Do Android devices contain a BIOS? If not, how does it boot up? What is the software that actually boots it up and can you replace it?

It is probably called firmware.  That would be used to start the machine. My Apple iPhone has firmware and it was updated at the last IOS 13.1 Update. I expect your Android would do something similar.

No.  Android is software, an operating system.  BIOS is also software (or firmware) that is part of the computer hardware.  BIOS is IBM PC terminology that traces back to PC-DOS's roots to CP/M.  Other types of computers and processors (e.g. ARM) do not use that terminology for their integrated firmware.

Android is an Operating System, similar to Windows. Windows does not have a BIOS either, the computer has a BIOS.
Phones don't have a BIOS though, they have firmware.

Phones don't have BIOS. Vendors implement boot process inside their closed source SoCs. PCs have ACPI, phones have Device Trees (mostly). Bootloaders are also different, again closed source on phones. Only Linux kernel is same, that too modified. Userspace is again entirely different. On Android there is no console login, no traditional X server.


text:
How is system-as-root mounted in Android 9?
In Android 9, system.img consist of system and ramdisk. So kernel will mount system.img directly and implement init program. Next, init will parse init.rc file and mount remaining partitions based on fstab file. But, there is some thing in fstab file that I don't understand :
/dev/block/by-name/system      /      ext4    ro,barrier=1

Here, system is mounted as root in fstab file. I thought that system.img is mount before to execute init program but here, system.img is mouted again. Can someone explain this for me?

init will parse init.rc file and mount remaining partitions based on fstab file.

Not all partitions in fstab are mounted by init on boot. Exemptions include partitions managed by vold and those only meant for recovery mode, raw partitions (not mountable) and root partition.

There is some thing in fstab file that I don't understand :
/dev/block/by-name/system      /      ext4    ro,barrier=1

That fstab entry is incomplete because it doesn't include fs_mgr flags as per standard format. Complete entry should be like:
/dev/block/by-name/system    /    ext4    ro,barrier=1    wait,recoveryonly

On Treble devices (Android 8 and 9) “devices can specify fstab entries for early mounted partitions using device tree overlays”. An simple explanation can be found here. However “In Android 10 and higher, devices must specify fstab entries for early mounted partitions using an fstab file” and “must place the fstab file in the ramdisk and in the vendor partition”.
DTB is usually appended as blob to kernel binary and fstab entries are exposed in procfs:
~# cat /proc/device-tree/firmware/android/fstab/*/name
system
vendor

So on devices where fstab entries for partitions system, vendor and odm are in Device Tree Blob, init takes no action for these partitions on mount_all because fs_mgr flags include recoveryonly. You can comment out or remove the entry and the device should boot normally.


text:
Is Multi-Boot Possible in Android?
Can you replace the bootloader of Android to create a UEFI-like environment where you can Multi-boot into another Operating System? I've seen several off-brand phones do this but I'm unsure how they do it. There is a phone on the market
(I think on Amazon) where users report that their phones don't directly boot into android but give them a choice of booting into "Android Core" and "Android OS". If you can actually do this, is there a way of flashing this ROM onto a phone, or are there other steps needed to accomplish this task?

I am pretty sure android devices don't have a UEFI equivalent. That said, there is nothing theoretically preventing a multistage bootloader akin to Grub to allow multiboot (for devices whose bootloader can be unlocked)

Most of the Android devices have ARM CPUs which don't have BIOS/ACPI or UEFI (so far). Intel devices do have. But the problem is that bootloaders are hard-coded in partitions, which don't give an option for multi-boot like Grub does. Since the bootloaders are closed-source, you can't replace them with some other open-source bootloader which supports multi-booting. All multi- boot hacks on Android devices replace boot.img which contains kernel, and its path is hard-coded in bootloader. Also Android's init has deep dependencies on a typical partition table layout, which you can't alter.

Depends ...
If you are talking of having multiboot solutions on the latest Android 9 and Android 10 versions ... that doesn't seem to be possible currently and there isn't much interest among the dev community in developing these systems for these newer android versions as android from these versions onward's has undergone some fundamental changes.
But for older versions you do have solutions like ...

efidroid
multi boot patcher
multirom

but all of the above are pretty much limited to the devices they support. So you need to do some research to identify if your devices are supported on any of these implmentation's.
Cheers

Yes it is possible. As Irfan mentioned there are hacks which allow, essentially, dual booting with a Linux distro, the list of which is rapidly expanding.
Dual booting native Android ROMs is possible as well. Dual Boot Patcher app by xda developer Anik_khan allows just such a scheme. Additionally devices with A/B partitions certainly can dual boot(although /data is shared). It is also possible to configure a ISO within an  Android device that can be bootable via USB, say for a laptop...

i don't think Android 9 and 10 versions have any solutions of multi-boot currently !!! if you come across any new projects that do support Android 9 and 10 versions ... please do post links to the same ... i have been eagerly waiting for such a solutions on Android Pie versions and above..... thanks.


text:
advert web pages opened on phone by bg app
I have some unwelcome behavior on my Samsung S4 AOS 5.0.1 (unrooted) phone. A few days ago I start to get attempts to open my web pages (up to 3 times a day so far) while my phone is idle. All cases have been bit.ly links for example:
http://bit.ly/2KG1tdA+ -- http://www.gohoi.com/jaguar-xj/
http://bit.ly/30muksQ+ -- http://www.gohoi.com/lincoln-mkz/
http://bit.ly/2nVdS4m+ -- https://t.co/leK1JpzypD
http://bit.ly/34WUUeL+ -- https://fb.itfactly.com/?url=https://l.facebook.com/l.php?u....

As I have no default browser I was able to capture URL and add "+" to end so I can get the detination URL on bitl.ly stats page as shown above in 2nd column. The first link went to at least 0.5 Million devices so somebody out there must have run into this phone abuse.
Is there anyway to trace what process is triggering the open web request (eg using logs, trace tools etc), so I can uninstall the app or disable it if it is builtin. Could it be "Peel remote".

@Scott: As you Android device is pretty old and therefore has multiple vulnerabilities keep in mind that the malware may have rooted your device and therefore it can be pretty hard (or even next to impossible) for you to remove it as you don't have root permissions. IMHO the best way to get rid of the malware is to root your device and then install the latest LineageOS release.

@Robert you shouldn't be so quick to say that - I have a Xiaomi Mi A2, with security updates as current as 5 Sept 2019 - Android 9... and yet I'm getting this same behaviour! I too have Peel remote coincidently... I've now uninstalled it just to see if it stops. Scott R, I'll keep you updated if that helps stop them.


text:
Recovery chances for a formatted SD card which was used as Android's internal storage
I used a micro SD card in a Nokia Smartphone for years as internal storage. I ejected it to test if another phone detects this type of SD card. Although we planned to just see if it is detected, certain off-topic factors led to the acceptance of Google's suggestion to 'format it as internal storage'.
As long as my phone still remembers the decryption, is there a way to recover my Photos, GPS-tracks, Text-Notes and other data, despite being encrypted with the known key and formatted by another phone?

My assumptions:

data from a non-encrypted card can often be retrieved mainly because the raw data still 'looks like' photos, mp3 etc;

encrypted data doesn't 'look like' anything, so recovery tools won't find anything;

Even if my phone doesn't care about data parts but about some 'yes I am your encrypted storage do not format me' file, a recovery tool would need the decryption information to look for the original content (i.e. how to extract it from the phone plus tell the tool?)

Side note/non-duplicate: Similar questions that I found always have somebody loosing the decryption key and I agree that recovery should be impossible in those cases.

What Android version do you use? Anyway encryption usually incorporates a hardware security element which allows to use the keys on-device but the keys can't be extracted. Last but not least you did overwrite the sd-card partially by formatting it which complicates the whole thing. My guess is that there is next to no hope. Next time: if you test something with an SD-card make a full backup of it block by block on a PC and shut down the device before ejecting the sd-card.

Thanks. Both phones run Android 9.
If extraction is impossible, my recovery effort would have to be done on my phone. If I let my phone format a new card as internal memory, in principle, I could 1. take note of the involved changes on the new card (compare image before/after), 2. overwrite the old card only with the changes made to a new one and 3. tell my phone that the previous card is back. 4. Afterwards the phone could serve as a card reader doing the decryption (guess it's too smart for that) and 5. the computer does the recovery.  in practice, 2., 3., and 4. are beyond my skill...

Is your original device rooted already and have you inserted the card into any other Android device, reinserted it into the original phone, or written any data to it at all in the other phone, other than the "format"?

The original device is not rooted. I inserted it only in the one which formatted it as internal memory and did not perform subsequent formats. It is now in the original phone, which reports (as expected): 'unsupported sd card -> please format' and 'sd card missing'

Then your data is lost and unrecoverable... Without root you cannot access the original encryption key, and rooting at this time will wipe the encryption key, if it still exists at all. I could go into all the details of how/why the data is now unrecoverable, but it won't make any difference. There was a remote chance it could be recovered if you had root on the original device (by remote I mean your more likely to be hit by lightning than recovery the data, but a chance), but without root the encryption key is inaccessible, if it still exists, and rooting now would wipe the key. Sorry.

@acejavelin Thanks, I would mark your comment as the answer!
The key still exists IMHO, because reinsertions at runtime always worked and my phone doesn't know about the card's recent experience. Thus, it will be hard to press 'forget about this card' but if there are no further answers, I'll do it. I take this as a lesson and use dd more often in the future..

Accessibility of the data on a storage volume that has been adopted by Android Marshmallow or higher as "internal storage" is well documented and has requirements of root at an absolute minimum... So I won't go into that in my answer, the details are here: https://nelenkov.blogspot.com/2015/06/decrypting-android-m-adopted-storage.html
You stated you do not have root on your device so the encryption key is not accessible, and rooting the device at this time will wipe the encryption key. So it is not recoverable.
Unfortunately, when the card was inserted into the other device, it was "formatted" as internal storage on the that device, not only erasing the existing data making it virtually impossible to recover even without taking encryption into account, but also changed it's identity to Android and setup a new encryption key pair between the new device and the storage card. This last step also made the card unrecognizable in the previous device as the other "half" of the key on the device no longer matches the storage volumes key.
Sadly, the end result here is that any data on the card initially is now lost permanently and is not recoverable. It is best at this time just to allow the device to format the card again, and consider that formatting the card as "external" or removable storage may be a more appropriate use of the storage card.


text:
Does "adb backup" also backup /data/misc/vold - the Encryption Key for Adoptable SD card?
I want to make sure that using adb backup -apk -shared -all -f ~/backup.ab will also save /data/misc/vold?
I am trying to backup before rooting, in order to be able to gain access to the encryption key in /data/misc/vold (got corrupted SD card adopted as internal). So I want to make sure ih something bad happens during the rooting, I could still access the backup version of /data/misc/vold?
Thanks!

It doesn't get backed up. For verification you can backup with that command, unpack the backup file and see the contents yourself.

Mmh, does not seem trivial to verify that by unpacking. Would that work anyway if I encrypted the system? More importantly, is there then a way to back up also /data/misc/vold ? Thanks!!

Try this to unpack the backup file. As for vold, it can only be backed up using root access.

thanks! So you are saying that it is not possible to backup vold without being root? This is a conundrum, as I am precisely trying to root to access vold, and the process of rooting is likely to erase that file

Unfortunately, this is just not possible without root. :(

Related: Is the Encryption Key for Adoptable SD card included in manual backup done over MTP?

Related: How to get Adoptable storage encryption key without root access after I "forget it"

My solution to Matifow problem was ...
I cannot extract the token because my device was not rooted.
I bought a new microSD and clone in it the microSD from my device.
https://askubuntu.com/questions/227924/sd-card-cloning-using-the-dd-command
When i put this new card the phone recognize as the old one.
I recover photos, media from whatsapp, apps installed ...
I lost some files ( the corrupted I assume) but can recover the most.

nice idea! in case dd not working use gddrescue for cloning


text:
What is default "fstab" file in Android?
As I known, in Android 9, system and vendor are mounted in the first stage of init by parsing fstab from device tree. But, there is another fstab parsed in init process, it is device default fstab, which is parsed by ReadDefaultFstab function below. I am facing to a error " failed to find device default fstab " in boot log. Can anyone explain for me this default fstab file? What is it and it's role?
// Loads the fstab file and combines with fstab entries passed in from device tree.
bool ReadDefaultFstab(Fstab* fstab) {
    Fstab dt_fstab;
    ReadFstabFromDt(&dt_fstab, false);

    *fstab = std::move(dt_fstab);

    std::string default_fstab_path;
    // Use different fstab paths for normal boot and recovery boot, respectively
    if (access("/system/bin/recovery", F_OK) == 0) {
        default_fstab_path = "/etc/recovery.fstab";
    } else {  // normal boot
        default_fstab_path = GetFstabPath();
    }

    Fstab default_fstab;
    if (!default_fstab_path.empty()) {
        ReadFstabFromFile(default_fstab_path, &default_fstab);
    } else {
        LINFO << __FUNCTION__ << "(): failed to find device default fstab";
    }

    for (auto&& entry : default_fstab) {
        fstab->emplace_back(std::move(entry));
    }

    return !fstab->empty();
}

It can be in / (ramdisk), /odm/etc/ or /vendor/etc/.
Android Storage Configuration:

For Android releases 4.3 and later, the various fstab files used by init, vold and recovery were unified in the /fstab.<device> file

Next change occured with Treble when vendor/SoC specific code was separated from Generic AOSP code. So fstab was moved to /odm or /vendor.
default_fstab_path reads GetFstabPath():
// Identify path to fstab file. Lookup is based on pattern fstab.<hardware>,
// fstab.<hardware.platform> in folders /odm/etc, /vendor/etc, or /.

Commit states:

fstab contains device- and soc- specific content that should reside in
  /odm or /vendor partition. This change searches the fstab.${ro.hardware}
  file from /odm/etc, /vendor/etc and /, then use the first one found.

fstab contains entries for all filesystems to be mounted on boot or in recovery from partitions including system, vendor, userdata, cache, misc, persist, modem, dsp etc. See details in Android Partitions and Filesystems.
Some of the entries of fstab are moved to DTB. See "WHERE FSTAB IS?" in How to disable dm-verity on Android?


text:
Stuck at boot animation on multiple custom ROMs
Just yesterday I thought of having a new ROM installed on my phone and it is not the first time I'm doing it. Though I made a mistake of not taking a backup of the system before flashing the custom ROM.
These are the steps that I followed:

Moving to bootloader and rebooting to TWRP recovery
Wiping the cache, system, data and dalvik cache
Moving to install option and installing the CustomROM1.zip from the Internal Storage
But the screen is stuck at boot animation
Using my laptop I tried to do the following:

5.1. fastboot erase system and fastboot erase recovery
5.2. Flashed TWRP recovery again using fastboot flash recover twrp.img

Moved the CustomROM2.zip file in the Internal Storage and tried to flash it using install option but resulted in boot animation loop

I even tried to ADB sideload and flash the zip but resulted in the same error.
Currently I'm on Moto G Play (Harpia) and the ROMs that I used are
CustomROM1 = Resurrection Remix v. 5.8.3
CustomROM2 = Eelo v. 0.7
Any sort of help to get out of this would be totally appreciable. And thank in advance.

After much try and waiting I couldn't get any satisfactory result out of it. So ultimately I had to flash the stock firmware. The name of the firmware could be deduced from the command fastboot getvar all
https://androidforums.com/threads/bootloader-unlock-back-to-stock-for-motorola-e4-plus-owens.1264881/
This is the link anyone who's facing the same issues can refer to.

Have you confirmed the integrity of the file you're flashing? I have had some that wouldn't flash and after trying every variable, I re-downloaded the file and it flashed no problem. Also consider: after successfully flashing the ROM, boot back into recovery or to the bootloader before booting the system.

Yes, I checked the integrity of the custom ROMs twice for both of them. Since both of them were showing same sort of results I couldn't stop myself from thinking that the problem lies within the system and not the software being flashed.


text:
Is there a way to reset the phone without re-enabling the disabled apps and services?
My phone's system UI has become laggier and slow lately. I want to reset the phone which is running Android Pie/ One UI and even though OneUI is a hell of a good UI experience it has a mega tonne of bull crap that I disabled through adb. These include a lotta Samsung services (like samsung pass, keyboard and stickers) and it took a lotta work. Is there a way I can reset the phone without re-enabling the apps? I don't care about the settings getting reset. If not, so is there a way I can clear all of the phones app data (i am not talking about app cache)? There are hundreds of apps in a phone (including system ones) and I just wanted to know if there was a way I could reset all of them at once through adb or some app that doesn't require root access.

A little shameless self-promotion, as I just wanted to recommend the adb approach as well: my little tool Adebar a.o. creates that script for disabled apps. It also creates scripts for backup and restore, plus a nice little device documentation. While resetting without re-enabling the apps is not possible (like washing without getting wet), this automates re-disabling after a reset (like using a towel).

@izzy thanks. I'll try that

Is there a way I can clear all of the phones app data (I am not talking about app cache)?

From adb shell do:
~$ pm list packages | sed 's/^package://' | xargs -I {} pm clear '{}'

This will clear all apps's data and cache.

Is there a way I can reset the phone without re-enabling the apps?

No. But as @Firelord suggested in comment, create a list of disabled packages with:
~$ pm list packages -d | sed 's/^package://' >disabled_pkgs.txt

Keep backup of .txt file and after factory reset do:
~$ cat disabled_pkgs.txt | xargs -I {} pm disable '{}'

If you are using multiple profiles, you also need to use --user option with package manager.

Thanks a lot man. You're a life saver


text:
How to secure phone for repair shop?
I've been an android user for many years and so far I've been lucky enough not to need to have a phone repaired by a shop, so I'd never considered this problem until recently. I had to give my Galaxy S8 to a shop for repair. Since it's running Android 9.0 I thought I could use guest mode to keep my info private, but it turns out Samsung disables multiple accounts on the Galaxy. (WHY?!)
This is like handing the keys to the castle to a complete stranger. Having my phone with the lock screen unprotected is as good as having full access to my email accounts, my Google Drive repository, my social media accounts, and another dozen other apps with private data. Disabling them all and then reenabling them later would take almost as much time as just doing a factory reset and restore later.
Is there a reasonably simple way to give my phone to a repair person and have my data remain secure?

That's why power users prefer rooting their Android devices which gives flexible options when it comes to backup and restore. There are non-root backup options too, though not that robust. You may start from this: https://android.stackexchange.com/q/28296/218526. When handing over phones for service, a factory reset must be the minimum step. You must make sure even your deleted data isn't recoverable, put their privacy statements aside.

You have to delete the data (take backup as Irfan mentioned, but know that not all the apps can be backed up). If you cannot use multiple user accounts than falling back to primary account is your only option. At some point the technician might want to check MTP and whatnot as well thereby compromising the privacy of your data. Unrooted users really can't do much. Although one thing comes to my mind. You may try a kiosk app (look into Play Store) and see if the apps/functionalities the technician needs can be whitelisted without compromising your privacy.

You may further want to try an applock app too if you cannot afford factory reset. Do know that MTP/PTP might still remain accessible so if it is best to move them out of the phone to your PC since they can be moved back in toto once you receive the device.

Doing a factory reset and full storage clean is the way to go here. Service will not fiddle with kiosk apps or the like. To my experience, they wipe your device anyway – so make a good backup and wipe it yourself. Don't forget (to backup and wipe) your internal SD card – and simply keep the external with you. See: How to make a complete factory reset, without anyone being able to retrieve my data?

@Izzy Can you make that an answer so I can accept it instead of leaving the site with an unanswered question?

@CareyGregory done, with added details. Good luck with the repair!

Doing a factory reset and full storage clean is the way to go here. Service will not fiddle with kiosk apps or the like. To my experience, they wipe your device anyway – so make a good backup and wipe it yourself.
Don't forget (to backup and wipe) your internal SD card – and simply keep the external with you.
For details on how to achieve that, please see: How to make a complete factory reset, without anyone being able to retrieve my data – asks for a different reason (selling a device), but with the same goal (protecting (or rather completely wiping) your personal data which resides on the device). And while the answer there gives detailed background, here come some points for the doing:

backup whatever you need (and can be backed up)
if you've got an external SD card, simply take it out and keep it. What they don't have they cannot look at.
as you want all data on internal storage gone, just wipe that completely. Easiest way for that probably is:

remove any Google Account you might have configured, to avoid tripping FRP
perform a factory reset, then
turn on full device encryption. Let it encrypt the entire device.
optionally, copy some files to it
perform another factory-reset, turning device encryption off

By toggling device encryption on and off again, the entire storage should be overwritten (without you requiring root permissions to do so explicitly). This makes data recovery very hard – actually, nearly impossible; though Forensics might have their ways, that would be far too expensive for someone simply curious unless that someone knows there's something of value to be found.
PS: All that of course assumes you are still able to perform those steps. If e.g. the device no longer turns on at all, chances are rather low to achieve any of those details.