text:
How would the app DiskDigger be able to get past SELinux when adbd/SuperSU/etc. cannot?
Okay, so I was able to recover my deleted files after all. I am the furthest thing from a software developer, and I don't have more time to spend on this, but I wanted to explain how I fixed it and ask a question about why the solution worked in case it's significant.
People should just read my other questions if they want to know the background; basically I deleted an entire folder of photos on my Android by mistake, went through the trouble of learning how to root phones and use adb.exe, etc. to try and recover them, only to be blocked by SELinux.
I got stuck with SELinux because the kernel in Android 5.1.1 apparently disallows permissive mode in SELinux (or changes from enforcing mode to permissive mode). I didn't have time to learn how to decompile/edit the kernel, so I tried a shot in the dark with an app called DiskDigger that some people recommended (no, I am not a secret advertiser, I am being 100% honest). Surprisingly, DiskDigger worked, and recovered way WAY more than I expected, even some photos that may be from a previous user (refurbished phone). I was surprised that much was recovered; I did keep my phone in airplane mode almost the whole time I was working on this to prevent automatic updates, but I also installed several apps along the way and rooted the phone, so I guess I was lucky or something.
Now for the question:
If DiskDigger was able to do this, it must mean that it was able to get into files that required root access; SuperSU verified this because I had to grant DiskDigger permission to do so. What is it about DiskDigger that enabled it to get past SELinux when I could not?
Is it because it was verified by Google Play as a trusted app? Did it have some special identifier from google that allowed it past SELinux? If there's a way to copy whatever allowed DiskDigger access, maybe other people wouldn't end up getting stuck like I did.
Anyway, that's all. I'm probably not going to have to do this again, but thank you to the people who tried to help me out. If I ever have to delve into this stuff again, I'll be back.

Does this answer your question? Why "adb root" does nothing?

SuperSU injects it's own sepolicy rules therefore manages privileged access without setting selinux permissive. i have already linked above answer on your first question, there it is explained well why adb root doesn't work (but adb shell su -c does)

what makes you think you didn't have access to /data from terminal is most likely caused by isolated namespace separation (which you can disable in SuperSU settings)

@alecxs mount namespace separation is only applicable to emulated storage where apps' access to filesystem is subject to Storage permission status. /data is equally visible in all namespaces to all processes. DAC allows apps to only access their private directories in /data.


text:
No OS installed message for specific ROMs
I'm having troubles with installing ROMs. I've been using a custom ROM (crdroid) on my Redmi 5 plus device for quite some time. I have recently decided to give another custom ROMs a try and downloaded Resurrection Remix and Evolution X. But I can't install them as after flashing, TWRP is saying there is no OS to boot from. But when I flash CrDroid back, it is booting perfectly fine. Here's how I am flashing ROMs:
First I'm wiping Dalvik & Cache, cache, system and data. Then I'm just flashing the ROM's zip. The strange thing is that it is working for CrDroid. I even tried wiping internal storage and formatting data but still no luck. Right now I'm posting this from CrDroid as I put it back.

This might be a weird question, but ensure that you're flashing the custom ROM specifically built for Redmi 5, not for other devices? (consider mentioning the DL link to the Resurrection Remix and Evolution X?)

@AndrewT. I added the links

source: Stack Exchange

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

sort: votes


text:
Stuck On firmware update after two days!
I got locked out of an account and I need my phone to verify myself. It was dead so I plugged it in. I tuned it in at about 7% and it said firmware update... this used to happen with my old phone and I’d usually take the battery out but this phone doesn’t have a removable battery so I let it die and decided to try again the next morning.
I plug it in again, this time at 2% just in case and oh wow it does the same thing and I even tried a different charger and plug location. I might be locked out from my phone and account forever because of this, what can I do?

I’m not trying to update it on purpose nor is it even plugged into a laptop, it’s plugged into the wall and doing this, is this normal? I tried to reset it and try again but it keeps doing it. I might be locked out for Awhile

Looks like there was an update waiting to install the last time you shut down the phone. You can try what happens if you hold key combinations like Poer+VolUp or Power+VolDown while starting/powering on. Try to fully charge the phone and then restart and let the update install.

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


text:
Unable to click next on MIUI 8 Welcome Wizard due to dead screen area at bottom
There is one non-rooted, factory-reset phone with MIUI ROM whose bottom 10% is not functional.
Screen replacement is the last resort, but if I can make some sort of software tweak to make it past the welcome screen to later root and use it for some unconventional use, it would be great.
Tried to find around following things but couldn't find the solution

Bypassing the welcome wizard
Force rotate device on the welcome screen

Any other suggestions are welcome!

Use otg connector and a mouse if some part of screen won't work

Thanks Kirandeep for the amazing idea! If the mouse with otg connector works without usb debugging enabled problem will be solved

It works without debugging in normal ui hope that works in wizard too


text:
Uses for an original Le Pan tablet Android 2.2
2011 Le Pan Android tablet running Froyo.
Before I toss it, are there any practical uses?

Bedside clock /alarm?

That's what my old Moto does (bedside alarm), thanks to the nice docking station it got :) Other use cases could be (always provided there are still "froyo apps" available where needed): desk calendar, web cam, security cam, digital photo frame – this article lists 20 uses.


text:
Formatting Play Store review text
I wrote a fairly long review with 4-5 paragraphs, but when posted the Play store seems to strip out all the newlines and just have a giant wall of text instead. I also tried using simple html (just the <p> paragraph tags) which did not work either.
Can the review text be formatted, and if so how? I wish HTML or BBcode was supported, but that's certainly not the case - still, maybe there is some conventions to get basic formatting in?

You need to use  for line break (note space)
Accepted answer here Google Play app description formatting shows how to format app description and it works for reviews too.

Yesterday, when I posted the review, it was working as described .
Surprisingly, the formatting was reverted by Play Store today. Maybe it runs a periodic check and removes formatting.  Hence, deleted the answer


text:
Can someone please help me understand this Linux command?
dmsetup create crypt1 --table "0 `blockdev --getsize /dev/sdb2` crypt aes-cbc-essiv:sha256 <Put the 16-byte hex key here> 0 /dev/sdb2 0"

I got it from step 6 of the first answer here.
I am trying to view the files on an android adopted SD card.
The card suddenly stopped working on my phone and I'm now trying to retrieve my files before I press on "forget" to unmount it from my phone and go back to using my phone normally on it's Internal memory.

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

`blockdev --getsize /dev/sdb2` (in backticks) is a command to get partition size, where /dev/sdb2 is the (encrypted) partition and most likely has a different name on your pc
<Put the 16-byte hex key here> is a placeholder for the real encryption key you have previously extracted from /data/misc/vold
dmsetup create crypt1 is the actually command to decrypt /dev/sdb2
when successfull a new (decrypted) block device /dev/mapper/crypt1 (ext4) will created
Note: root permissions required. open root shell with sudo -i before running this Linux command


text:
How to disable the developer option in Chrome for Android?
I have enabled developer options accidentally by clicking on Settings > About Chrome > Application Version 7 times.
I didn't find any option to disable this developer options. How to disable this?

The flag to show Developer options is stored on Chrome's shared preferences under the developer key, which can only be accessed with root access.
As shown on the source code:

AboutChromeSettings: tapping the Application Version 7 times calls DeveloperSettings.setDeveloperSettingsEnabled()
DeveloperSettings: writes the boolean value true to ChromePreferenceKeys.SETTINGS_DEVELOPER_ENABLED
ChromePreferenceKeys: SETTINGS_DEVELOPER_ENABLED refers to the developer key in the shared preferences

To reset the flag:

With root access
Users can overwrite the value on the shared preferences directly

Browse to /data/data/com.android.chrome/shared_prefs/
Open com.android.chrome_preferences.xml
Search the line <boolean name="developer" value="true" />
Change the value to "false"
Save the change

Without root access
Users can only use Android Settings' "Clear data" to reset the flag. Note that this will also reset all Chrome's settings.


text:
How to recover deleted photos from a specific directory(folder) in non-rooted device?
Some bad cleaner app deletes all my photos stored in a directory(folder) which is created manually by myself (for example, /sdcard/myphoto/).
I tried some photo recovery apps. But none of them recovered those photos and none of them provides a feature to recover photos from a specific directory. All recovery apps just scan the entire memory and restore all deleted photos once. (Actually most recovered photos are not deleted at all. I have no ideas why they are recovered... Anyway)
Are there any ways to recover deleted photos from a specific directory in non-rooted device? I am explicitly sure which directory those photos are, and I just want those photos only.
Thank you very much.
PS: I know there are questions about photo recovery. But mine is different. The main focus of this question is "from a specific directory".

Data recovery tools mostly use the "file carving" method which scans for JPEG headers in the partition. Of course by this method you get all images, deleted or not. A good tool may check if a recovered images is already known in the file-system (hence is not deleted) but otherwise this could mean that images that were saved twice on your partition - one still exists, the other deleted - the deleted image would be always ignored.

@Robert thanks a lot for letting me know the recovery concept in the background.

@alecxs Thanks for your reply. I don't really know how recovery works. So not sure why the question is how to get partition image. I just want the recovery tool to scan a specific directory for instance /sdcard/myphoto/ instead of finding all the deleted images in all directories in the partition. Mine is not a mediatek device, it's a Qualcomm Snapdragon 835 device.

“from a specific directory” is secondary thing. Without root you don't have access to underlying filesystem (block device), so data recovery isn't possible at all.

@IrfanLatif thanks for letting me know this. There are many photo recovery apps which do not require root in play store. So are they just lying? Maybe they just scan all caches and dot files and list photos in cach directories instead of a real recover.

@sgon00 sorry I never tried any of such apps, so can't comment. What I know is that data recovery from filesystem isn't possible without access to block devices, which is restricted in Android. For relevant details see my answer to https://android.stackexchange.com/a/208114/218526


text:
flash tool for Huawei HiSilicon hi6250 Kirin 650 (locked)
Unable to access my phone after a factory reset, because the Gboard doesn't work and I can't type my email and such, I've tried every possible solution I could find to no avail is there a flash tool for Huawei HiSilicon hi6250 Kirin 650 I could use?
some info :
fastboot mode says "Phone Unlocked"                                                 and
"FRP LOCK" and
fastboot boot twrp.img says FAILED (remote: Command not allowed) and
Device model is VNS-L31 (Huawei p9 Lite)
past post with some information
I can't access my phone after a factory reset, because the Gboard doesn't work!

at least, there exist special nocheck fastboot for Kirin 960 and Kirin 620 (have to dig more on this)

join telegram group @hi6250_5 ask for flash tool. i don't have telegram, please keep us up to date

Ok I messaged him, just waiting for a response back

pls anybody bring some light in usage of Huawei-Update-MultiLoader-Tool HiSilicon Kirin 650 chipset? make it answer (for the bounty)

@alecxs please join this room. Will post replies there https://chat.stackexchange.com/rooms/112709/flash-tool-for-huawei-hisilicon-hi6250-kirin-650-locked

not a sufficient answer but based on comments the best option so far is flashing via test point method in VCOM_DOWNLOAD mode.
I leave link only here in good faith that xda-developers never takes it offline
https://www.xda-developers.com/huawei-honor-bootloader-unlock-potatonv


text:
Disable lock screen with root or xposed in android 9
I have an ASUS ZenFone Go (ZC500TG) running phh's Treble GSI Android 9 AOSP. I have both Magisk root and EdXposed (SandHook) Magisk Module installed.
My problem is that my school email requires me to have a lock screen set up to receive emails. This is really annoying. If I don't set up a lock screen, this message below pops up and there is no way to remove the notification. It seems that "Swipe to unlock" doesn't count as a lockscreen.

I also tried an Exposed Module, Lock screen Disabler. Unfortunately, it only supports Android 6 and below. I tried installing the Module on my phone and it doesn't work. The module hasn't been updated in a while from the creator.
I'm currently open to any solution that can disable the lockscreen and receive emails from my school, using a Magisk module, Xposed module or with root.
Extra info:
From my findings, it seems that Google Play Services has a service that detects whether there is a lockscreen present on the phone. The service is "Screen lock service". Unfortunately, I also tried disabling the service but it would reenable itself after a reboot. The service can be found at: Settings --> Security & location --> Device admin apps. It is a pain in the ass to disable the service everytime I did a reboot. (I do a lot of testing on the phone so it is normal for me to reboot frequently in a day).
I am also open to a solution where I can permanently disable this service and I don't need to set up a lockscreen. Root, Magisk module or Xposed module is okay.

Related //Why not use Gravitybox - enable "smart lock" and in "Trusted wifi" select your wifi. You won't need to unlock as long as you are connected to selected wifi while retaining lock screen

I'll try and see how it goes

Make sure GravityBox has location permission. Since 8.1,this is needed for Wifi detection

Alright, thanks


text:
Some file types copied onto phone always disappear
Whenever I try to copy files onto my phone, depending on file type they almost immediately disappear.
I noticed this when trying to copy music files (mp3 and flac) from my PC to the phone via the USB cable, using total commander.

What works: png, doc, pdf, xlsx

What gets deleted: mp3, flac, wav, somefile.someextension

I copy the file(s), and they disappear. Sometimes it happens immediately, sometimes it needs a few seconds, a couple of refreshes, or navigating away from the folder and back in again. Sometimes I can see the file from my PC but not on the phone screen for a while (up to a minute). But the end result is always the same, the files soon disappear.
I don't think the files are being moved anywhere on the phone, as I tried searching the entire phone for the missing files and found nothing (no mp3 files on the entire phone), while I can still find other file types just fine.
The phone only has internal storage, no SD card. I can browse its contents just fine from the PC, and like I said this only affects certain file types.
I've also tried copying from a USB stick (one that has a mini-usb on one end so it plugs into the phone), and I also tried several file managers to do the copying, the results are always the same.
I tried copying to the Music folder, and to another custom folder, no change in behavior.
I tried adding a .nomedia file to the folder I'm copying to, it didn't help.
I tried using MTP or PTP connections.
I don't know if any apps are doing this, but I tried disabling the built-in "Files by Google" app, and stopping all other apps. I really don't have a lot of apps on this phone, and I have no idea which one could be doing something like this and why.
The only somewhat relevant question I found was this one , but that's about bluetooth, and I'm using a USB connection to a PC.
Please someone let me know how to use a modern smartphone to provide the functionality of a fifteen year old mp3 player.
Edit:
I did a factory reset, then tried developer mode and adb. I tried both before and after the system has updated.
ls doesn't show any of the files that I tried to copy.
Here is what I think is the relevant part of adb logcat while copying a file called Gemini.mp3: https://pastebin.com/bmTaLfgk
Basically there are a couple of these:
Access denied finding property "media.stagefright.extractremote"
Access denied finding property "media.metrics.enabled"
Access denied finding property "media.metrics.enabled"

and these:
mediaserver: type=1400 audit(0.0:524): avc: denied { read } for name="u:object_r:media_prop:s0" dev="tmpfs" ino=8498 scontext=u:r:mediaserver:s0 tcontext=u:object_r:media_prop:s0 tclass=file permissive=0
Binder:1257_2: type=1400 audit(0.0:525): avc: denied { read } for name="u:object_r:media_prop:s0" dev="tmpfs" ino=8498 scontext=u:r:mediaextractor:s0 tcontext=u:object_r:media_prop:s0 tclass=file permissive=0
Binder:1257_2: type=1400 audit(0.0:526): avc: denied { read } for name="u:object_r:media_prop:s0" dev="tmpfs" ino=8498 scontext=u:r:mediaextractor:s0 tcontext=u:object_r:media_prop:s0 tclass=file permissive=0

And then something called MediaSorter decides to remove the file.
MediaSorter: Removing /storage/emulated/0/Music/Gemini.mp3

You should activate developer options and ADB. An ls via ADB is the only way to truly see the content of a directory on device. Check if the files you copy are really missing. because based on your description my guess would be that the files you upload can't be added to the media database (because of a content) and therefore are not visible to most apps and MTP/PTP.

@Robert What could cause files not being added to the media database? I tried many different files. What do you mean by "because of a content"? Does Android care what's inside a file? None of the files I've tried are protected in any way AFAIK, and I have the right to use them. I guess I could go down the ADB rabbit hole, but I'm not seeing where it would lead me, how it'd fix anything. I don't need to personally "truly see" what's there, I need android to see it.

Yes Android cares what is inside. The media database stores not only file-name path and size of a file but also meta-data like exif data for pictures or mp3 ID3 tags for mp3 files. Therefore if the media database encounters a known file type with unexpected data it might run into problems and crash. The first step of solving a problem is understanding it. Therefore I suggest to you to use ADB. What I wrote is still a theory unless you prove it via ADB. You can also check adb logcat while copying the files onto the device via e.g. MTP. You may see a crash report  (stack trace) of the media db

@Robert ls doesn't show anything. I've updated the question with my findings, but I'm not getting any closer to a solution. I may reflash the OS as I can't think of anything else. Thanks for your time anyway.

This MediaSorter is not known to me. Also the AOSP sources don't contain this keyword. Therefore it may be added by the manufacturer. As the process-ID seems to be the same as the MtpServer is running on this would be my guess. You never mentioned your device and manufacturer.

It's an Archos Access 50 S. I can't seem to find a custom ROM for this device.. I guess this is what I get for trying a cheap phone.


text:
Is there a way to write/ run custom scripts in the background on my phone?
What I have in mind is pretty simple. I want to write a small script for simple file managing, and I would like for it to be run automatically like once a day. I have some coding experience under my belt so the actual implementation won't really be a problem. What I'm actually confused about is if the Android platform has any features that would make executing the routines viable.
The bulk of the coding I do day-to-day is Python, but I could get used to Java or Kotlin's syntax in a couple days if necessary, and from there its just really simple logic. Considering that Android is really just Linux at the core, I imagine it would be possible to have it run a couple lines of code automatically everyday at a set time, as I have done on my linux machine a couple of times.
I'm pretty much a complete newbie when it comes to fiddling with Android's workings, so if anyone has done anything like what I'm  attempting or knows about relevant documentation, some guidance would be much appreciated.

While Android is built on the Linux kernel, Android != Linux due to additional frameworks & restrictions on non-rooted device. Rooted gives you more options. You should explicitly describe what "simple file management" you are thinking of, what version of Android, hardware model, and if the device is rooted or not.

So, what I would like the script to do is to look through a predetermined folder and check for any files older than like, 3 or so days, and delete said files. Would be nice if it executed once a day. With a regular linux distro, I could get that to work by writing to my bash profile, I don't know if that's possible on Android. As for the device, it's running android version 9, kernel 4.9.117+, unrooted.

Android itself provides neither any cron-like mechanism, nor a terminal login (so no .profile/.bashrc etc. (related details)). You can use AlarmManager API in your app for repeated tasks. Or use some automation app. Or with root: How to run an executable on boot and keep it running?. Also related: https://android.stackexchange.com/a/221420/218526

No
On a non-rooted device, files are generally considered private to apps (think each app as a userid and you don't have sudo). Apps and their data are meant to be isolated from each other in the increasingly privacy focused mobile world.
As you have programming experience, here is the Android Developer documentation on data storage and you will note the different types such as media and "documents" using the Storage Access Framework. Add on Adoptable Storage for SD cards and you get experienced non-Android developers asking questions like What's the current status of Internal vs External vs Removable vs Adoptable Storage on Android?. Regardless, if your "predetermined folder" is a system one, without root you won't have access either.
The above SO question link to blog posts by Commonsware regarding the Android storage situation: internal storage, external storage, and removable storage as viewed from a developer perspective. Writing an app to interact with all of these storage types would be off-topic here in Android Enthusiasts but reading them gives context on how not like command line/shell Linux that Android has been and is becoming.

Thank you, the documentation will be more than helpful. I've been looking around for a way to keep my script running in the background. I imagine Android has some sort of 'bashrc' equivalent or something?


text:
Accessing an app by another app
For example: There is a lot of apps about of theme switch in Play Store. If switch dark or light(any theme switcher app), the related app(whatsapp, instagram, etc.) theme switches dark or light. Actually, what i want ask is how another apps access to related apps. How is possible? I hope I had explain, sorry for bad english.

There are quite a few ways apps can access other apps. But in the example you quote, no interaction between apps occur. Theme is controlled by the Android OS. Theme switch apps change global theme settings. So all apps which support different themes (e.g. light and dark) are affected.

Okay, I get it. If I want to do get(to computer app from app) messages or comment(any info), should I use API of related app?


text:
How can I configure Android so that all Internet traffic goes through a VPN and is blocked if the VPN isn't activated, without rooting Android?
How can I configure Android so that all Internet traffic goes through a VPN and is blocked if the VPN isn't activated, without rooting Android?

This is Always-on VPN, which is a stock feature since Android 7 (root not needed). You will see the "Always-on" & “Block connections without VPN", options in VPN settings.
If you are looking to have this feature on pre-Andoid 7 devices, you need to look for VPN apps that offer this. For example, this app offers this feature by name of "Kill Switch"

On Android 10 with AnyConnect VPN: Settings → Connections  → More connection
settings   → Select the VPN client  → Enable "Always-on VPN" and "Block connections without VPN":


text:
Samsung Galaxy A20, tried root. No OS installed. Sideload doesn't work
I was attempting to root and flash Havoc OS on my phone. I am in TWRP and I don't have the havoc OS image on my device's storage. All of my device has been wiped and there is no OS there anymore (rebooting gives me that warning that I shouldn't reboot cause I don't have an OS). Sideload keeps failing to start when I go to Advanced -> Sideload (in TWRP) and I do have the phone connected to the PC with a USB cable but it doesn't show anything in the File Explorer. adb devices doesn't list anything in list of connected devices and adb push shows the "no device/emulator found" error. Is my phone bricked? Please help me.

Does this answer your question? How to flash custom or stock ROM with Odin mode working? (from a bad flashed Galaxy A20, see image)

most important is disable AVB therefore flash blank vbmeta. also check your bootloader version (last line) make sure to flash only matching ROM (bootloader is not downgradeable, keep lowest possible version you can get)

https://forum.xda-developers.com/showthread.php?t=4095589

https://forum.xda-developers.com/showthread.php?t=3910594

Thanks a lot, I already got help with that a while ago. But still, appreciate that.


text:
google pixel 2 phone rear camera not working suddenly
i am using google-pixel 2 phone since  2017. phone not able to start camera app  and app getting crashed when i tried to open rear camera . front camera is working fine .i contacted google support team they said that try to clear app cache and data. i cleared camera app cache,data but no luck. how do i get my phone rear camera to working condition ? pleas help me out to get it working. thanks

I faced the same problem and I actually used beta versions just to have their latest taste. If you do the same then it's okay because of the bugs and beta versions aren't stable. If nothing helped at all then first try to delete the data from about or secodly you can restore your phone to stable version.

thanks @SurajitDas . i am also using beta versions . how can i restore to stable version?

Before downgrade to the stable version of android you've to keepfew
things in mind.

You've to backup your data (because flashing erase your data permanently)
You've to download the stable image file of your device
You've to download Android SDK Tools (don't have to download Android Studio, Command Line Tools will be enough to get your jobs
done)

Now the process of flashing into stable version will take some time and follow the rules below.
1. Turn your developers mode on (by clicking the phone's build number
multiple tiles).
2. Enable USB debugging, unlock OEM and then connect your phone with you PC.
3. Unzip the SDK Tools and then open command promt inside that folder.
4. Unzip the image's zip file into the SDK Tools' folder.
5. Unlock your phone's bootloader, and accept the unlocking by clicking the volume up button of your phone.
6. Go to the fastboot mode and then flash all the image files using "flash-all" command.
7. After successfully flashing to the stable version don't forget to lock the bootloader (if you don't do experimental stuffs then it'll be better to keep the bootloader locked).
8. Set your phone up.
And now everything will work fine and will be stable after setting up your phone with your credentials.


text:
How can I stop a Galaxy S7 from connecting to multiple Bluetooth sources?
In my front room I've got a Bluetooth sound bar under the TV. I also have a portable Bluetooth speaker that I use around the house a lot, mostly in the kitchen.
However the reception from my sound bar weakly reached the kitchen. So when I'm listening to music while moving round preparing food, my phone regularly picks up the sound bar and connects to that too. When that happens the music stops and neither device plays. I have to turn Bluetooth off and on again and reconnect to the portable speaker.
This is super annoying and I find it hard to believe there's no setting to turn off multiple connections or auto connect to stop it happening. Is there anything I can change so that my phone will stick to one Bluetooth device at a time?

Search Play Store for apps. This one seems to fit your needs, since tapping a widget would connect

@beeshyams thanks for the suggestion but it doesn't seem to stop my phone connecting to multiple other devices?


text:
Restoring notes from .bak file
I had LG G4 which i've backed-up and kept the .bak file on my computer . I sold the phone but I want to restore the notes from the QuickMemo+ app. Tried to find applications for my mac that would help with this but all of them require connecting a phone to restore the data. Any ideas how can I achieve this without using actual phone? (that is, using computer only).
Thanks

Have you tried to open the file(s) with a text or hex editor just to see if you can see and text (fragments)?

Do you mean poening the .bak file with text editor? That does not work.. the file doesn't open

Then you are using the wrong program. As long as the file is not too large a text editor can open any file, independently if it contains text or not. At least a hex editor should be able to open any file.

first thanks, ill try to use another text editor, but how can I find there the notes? the backup file is 3GB and contains all my phone data, and I cannot remember something specific to ctrl+f.

@alecxs I used wondershare mobile trans

according to FAQ that is a zip file. open file with 7-zip and tell us what's inside. look for files and/or folders with name com.lge.qmemoplus or (user)data.img

Hi, @alecxs finally found 7zip for mac that accepts that file, it requires password although i don't think i set one when backing up. tried many passwords i use but that didn't work. Anything to do with that? or the information is lost unless i find the password?

there are bruteforce password crackers for zip, but i cannot recommend one. check the wondershare program folder for config files maybe there is some random password in plain text in one of the files


text:
Video files mysteriously deleted
I get some files deleted when doing this, it happened twice and it doesn't happen anywhere else:

I download some mp4 files with Chrome or Brave, both in incognito mode, and directly to the microSD card, as the internal storage is almost full
for some reason, when choosing microSD as download folder, apps don't let you choose the folder, so they get downloaded to /Android/data/com.android.chrome/files/Download
media players don't seem to find that folder, so I use File Manager move them to /DownloadsSD also on microSD storage
I play them with MX Player, but at some random point they disappear (but other files that were in that folder before stay there, the only ones deleted are the newly downloaded ones)

The card is formatted as internal storage.
Do browsers delete files downloaded in incognito mode? Or maybe it has something to do with using the microSD card as internal storage?

Related - try solution there

@beeshyams How much could it take to rebuild the media index?

It didn't work then


text:
How to download synced application data from Samsung Cloud?
My Android Samsung S7 smartphone is broken, so I wanted to access my memo which I have backed up at Samsung Cloud. I don't have another smartphone. I just need to download the data to the PC and dig the data out of the files. But I don't know how to download those data. THere doesn't seem to be a link for download:

I went to Samsung Cloud, but here also is no link to download:

How do I download this as a file to PC?

This video says you can download Samsung Gallery app (from Microsoft store) on windows 10 laptop and sync to PC

@beeshyams the Samsung Gallery app seems to just "show photos and videos". I was asking about how to download other application data like Memo. Basically, there should be some option like "download everything", e.g. in a zip file.

I don't have any Samsung device ; pointed to that video, just in case it helps. All the best

Based on the screenshots it looks like you are resident of the EU. In this case the GDPR states that you can contact an online/cloud provider and ask to retrieve all the data they have stored about you. This should include your stored data like your memos. May be it is worth a try.

@Robert wow, amazing advice, thanks!! Didn't know this!


text:
How can I auto rotate in Samsung Galaxy?
Coming from a Huawei P9 Lite, I recently moved to a Samsung Galaxy A30s.
While on my other phone it had an Auto rotate icon, I can't find one at the moment.

I've gone to Settings and searched for the term "rotate" but no results were found.
So, when I'm on a webpage

And rotate it, notice that it appears a new icon in the bottom right

And I need to click in it to actually rotate

During the first days, this was kind of ok, but now I'm tired of having to click always in that icon and waiting for it to appear (sometimes even requiring to do the rotation movement multiple times).

Where it says "Portrait", clicking in it changes to "Auto rotate"

and then auto-rotation gets active.
Notice that if the phone is rotated using the method mentioned in the question, then one won't see "Portrait" but "Landscape"


text:
How do you set your Android smartphone not to switch to the web browser app each time you click on a link?
I'm using Firefox in my android smartphone instead of Chrome (Chrome app is not installed), but I think that it applies the same anyways. In the past when I clicked on a link (from emails, or other apps, etc.), I got a message that said that a new tab was opened in Firefox but the system didn't switch automatically to the Firefox app. I continue clicking on links and then when I was done and I opened Firefox and all the tabs were opened for me. Recently Firefox for android was updated and after the update when I click on a link the system automatically switch to Firefox. How can I set back the system so it doesn't switch to the web browser app each time I click on a link?
Regards.

In Firefox settings enable Tab queue.

Irfan, Where can I find that option? I went to settings but could not find it. By the way the app was updated to version 79.0.5.

79 brings major changes. Among other things, tab queue and tab previews are also gone, at least for the moment. You need to downgrade to use the feature.

The tab queue is sadly gone from the new Firefox.
There is a feature request here but it's ignored:
https://github.com/mozilla-mobile/fenix/issues/470#issue-409774110
You can uninstall the new Firefox and then install the old version's apk from here:
https://www.apkmirror.com/apk/mozilla/firefox/firefox-68-11-0-release/


text:
How can I copy specific wifi networks from one Android device to another?
I have a rooted Android 7.1.1 phone with a large number of wireless networks configured; some of these are relatively complicated (EAP-TTLS, custom CA certificate, whatnot; the point is it's more involved than just a shared secret).
I would like to copy some of these networks to another phone, also rooted (running reasonably recent LineageOS, likely Android 9 or 10), without overwriting other wifi configuration that exists on the destination phone.
I know I could use something like Titanium Backup (which I bought) to do a full backup of all wifi networks from the source phone and restore it on the destination phone, but that doesn't meet the following two needs:

don't transfer all, just some saved wifi networks;
don't overwrite existing networks on target device (just add new networks).

I'm also not certain it would correctly transfer the certificate along with the network it pertains to.
I looked at How to copy wireless networks list from one android device to another?, but that also only addresses copying all networks, not cherry-picking.
I suppose I could merge the new networks into wpa_supplicant.conf, but is that safe to edit while Android is running? Won't changes be overwritten? (Update: it would, unless editing while in recovery mode; see How to modify wpa_supplicant.conf) (Also, I'd still need to find a way to transfer the CA certificates.)

Which Android version? On 10,I see  all the details in  /data/misc/wifi/WifiConfigStore.xml, with the password and network name in clear and wpa_supplicant is empty

I updated my question with further details.

this app promises to sync them between devices – if you don't mind the trackers it comes with (those companies could get the data then as well: Google, Yandex, Facebook). Some alternatives can be found in my list here to e.g. copy one-by-one.

On Samsung S20FE (Android 12), passwords are saved in /data/misc/apexdata/com.android.wifi/WifiConfigStore.xml.


text:
Add a built-in app to Fire Kids profile?
I have a bunch of Fire tablets for my kids and we are using the FreeTime locked profiles for them. I can download 3rd-party apps and then share them on my kids profiles. But I can't do this with the built-in apps, like Clock. Do you know how I can do this?
I've chatted with Amazon support and they were no help. Here are the Amazon instructions for more details on how this works for 3rd-party apps: https://www.amazon.com/gp/help/customer/display.html?nodeId=202119930

At least as a substitute for the Clock app, this app seems to be good, allowing multiple alarms. Plus it is Fire compatible and free:
https://www.amazon.com/MacroPinch-Alarm-Clock/dp/B00EPG51Z4


text:
How to install Samsung apps on non-Samsung devices and make them run?
I really need Samsung Voice Recorder to work on my OnePlus 7 Pro, but it doesn't work. Samsung limits it to only Samsung devices.
I tried the APK but it doesn't work.
Anyway to run it on other non-Samsung devices?

Samsung devices have not only just a GUI that is a little bit different but the changes Samsung makes go deeper. This goes down to the available libraries and APIs an app can use. They add proprietary features and libraries and if a Samsung specific app uses those features you simply can't install it on a non-Samsung phone unless you have heavily modified the ROM.
The app "Samsung Voice Recorder" is a Samsung specific app that only works on Samsung devices.
I have checked version v21.1.06.11 as provided by ApkPure. This app defines in it's AndroidManifest.xml that it requires the following Samsung specific features:
<uses-feature android:name="com.samsung.android.feature.resopt" android:required="false"/>
<uses-feature android:name="com.samsung.feature.device_category_phone"/>
<uses-feature android:name="com.samsung.android.api.version.2801"/>
<uses-feature android:name="com.samsung.feature.samsung_experience_mobile"/>

Only one of those features is optionally (require=false) but the other three are mandatory.
Note that features are device/ROM specific features, you can't just pretend that your device has those features.
Therefore to make this app work on non-Samsung phones you would have build a custom ROM that includes these features (usually special Java/DEX libraries plus the native libraries and potential device drivers, ...).


text:
When do apps need storage permission?
I thought that each app can always freely manage its directory in /Android folder. AFAIK code is in app/ and data in obb/ folders.
But many apps (e.g. games) display a message about needing local storage permission to download additional data.
Why do many apps need to ask for the generic storage permission - the one that says Files, folders, photo, video?
Are there some restrictions on the data an app can use without asking permission?
Just to clarify: I am NOT asking about file/photo manager apps, for them it is understandable that they need to see the whole filesystem.
Btw i found 2 possible duplicates, but their answers seem to contradict each other: 1 2
Does the storage permission allow reading the whole Internal storage? Or only the FAT-formatted external SD card?

What for an app needs storage permission depends on the Android version on-device (and the one targeted by the app). READ_EXTERNAL_STORAGE gives access to all data on your external and internal SD cards, but not to device storage, on "lower versions". Things look a bit different with the Storage Access Framework added in 5.1, and will change again with "scoped storage" on Android 11+…

As Izzy said, it's version dependent. See this//@Izzy, I think you made a typo, in 11,it's package visibility

@Izzy - Is there a quick summary on what is the status in Android 11?

@sancho.sReinstateMonicaCellio only roughly. With Android 11, the concept of scoped storage was made mandatory, adding another layer. Full storage access is only permitted to few app categories (such as file explorers) on PlayStore (other sources may permit it generally for distribution; any app can request it, but Google simply might not let it into PlayStore then).

Storage permission is needed by apps that will read/write files onto the storage especially files accessible by the user.


text:
Hard reset for Samsung T550
When I tried to hard restart my Galaxy tablet this is the message I got on the screen
OOIN MODE
PRODUCT NAME: SM-T550
CURRENT BINARY: Samsung Official
SYSTEM STATUS: Official
WARRANTY VOID: 0X0
QUALCOMM SECUREBOOT: ENABLE (CSB)
AP SWREV: S1, T1, H1, R1, A1, P1
SECURE DOWNLOAD: ENABLE
There is an arrow pointing down that says
Downloading
Do Not turn off target

you can safely turn off your device. if you wanted recovery mode try again with other Volume Key. Be aware this device has FRP Factory Reset Protection, that mean even after successful reset it is locked. you need to unlock with bonded google play account afterwards


text:
Can I sync folders in two devices over Bluetooth?
Can I sync folders and files in two Android devices? These devices are physically nearby, but not connected to the same Wi-Fi network. They are connected to the internet using their respective mobile data connection.
Maybe there's a possibility using e.g. Bluetooth and maybe use Wi-Fi Direct when large data transfer is needed?
I dont want  AirDrop or NearbyShare like functionality. It is rather like Resillo or Syncthing over bluetooth.

Welcome to Android Enthusiasts! Please note that recommendations like Is there an app for X are off-topic here (see What topics can I ask about here? for details). For where your question might fit better, you might want to look into Where can I ask questions that aren't Android Enthusiast questions? and Where to ask for app recommendations?. I've rephrased your question slightly so it becomes on-topic; hope it still meets your intentions. Good luck!

Well I can't really say "sync" but the closest tool you can use is : Bluetooth File Transfer.
Its free (with ads) with option of non ad version at a price, but still good enough for the former option.

It allows you to use your smartphone to browse, explore and manage
files of any Bluetooth ready device, using File Transfer Profile (FTP)
and Object Push Profile (OPP): you can also receive files and send
contacts!

It provides its own OBEX layer, additionally you can cut, copy, move, paste, delete multiple items using the integrated explorer of this application.


text:
Restore Images from TWRP nandroid backup
My (rooted) HTC U Ultra died, not repairable - motherboard issue. I have a Galaxy S20, but want to get photos etc that were in internal storage. I have a nandroid backup taken with TWRP a few months ago a well as Titanium Backup taken on the same day. From what I understand Titanium backup does not backup data (images etc) from internal storage, so I have been looking at how I can use the nandroid backup which is a backup the entire system at a partition level.
I consider myself a novice, but I tried to restore the Ultra backup to my old HTC One M9+ (it was worth a try), this did not work because internal storage is too small, got a Error 255 and it went to a boot loop. I read in another question the nandroid backup can be opened up using 7zip.
I searched the backup file but could not find anything that resembled the images or my data, most of the files are human unreadable. Do these files need to be compiled to make them readable? Or once opened in 7zip is there a viewer app/program to read them?
Is it possible to restore the nandroid backup into a virtual space which is not device specific, like virtual box?
Any suggestions or advise would be greatly appreciated. Thanks.

You can mount nandroid backup and extract the contained files. On Linux you can mount the image, on Windows you can try ext4 reading software.

you need to pull backup of Internal Storage or (decrypted) userdata partition from the device. guess you did not do that beforehand. if your device died then that data is lost

Does this answer your question? How do I backup media, game data (internal storage) using TWRP?

Does this answer your question? Restore only part of nandroid image

Thanks for the help. I had a look at these options but could not restore the images or access them. There are 3 files in the Nandroid backup that could contain the data. I tried to use Titanium Backup to restore only these files to my HTC One M9+, the restore completed successfully but no images. Also tried to restore the data partition but this put the M9+ into a boot loop. Without another HTC U Ultra to a full restore not sure if i can get them back.


text:
What type of hardware support is required for getting the widevine L1 level?
It s said that widevine L1 level requires hardware support so that it s impossible even for manufacturer to provide it through a system update.
But what exactly has to be done by the hardware?

You need an ARM cpu with TrustZone/Trusted Execution Engine (TEE). AFAIK this is already a requirement for new Android devices. Additionally the device have to pass the Widevine L1 certification by Google.

@Robert so it excludes other cpu isa?

Widevine digital rights management explained

To meet security Level 1, all content processing, cryptography, and control must be performed within the Trusted Execution Environment (TEE) of the device’s processor, to prevent external tampering and copying of the media file. All ARM Cortex-A processors implement TrustZone technology, creating a hardware separation that allows a trusted OS (such as Android) to create a TEE for DRM, and other secure applications.

 (click to enlarge )
System update is at OS level (including drivers) but not at CPU/ TEE level which are totally independent. Quoting from wiki

The TEE is a standard which creates an isolated environment that runs in parallel with the operating system, providing security for the rich environment. It is intended to be more secure than the User-facing OS. ARM TrustZone TEE is an implementation of the TEE standard

For more , see The Complete Guide to Widevine
Google’s DRM Platform

So does it excludes other cpu isa offerring an equivalent feature for keys like Intel trusted execution?

Yes, that is what one can infer from the diagram that shows ARM. Intel seems to have a different implementation

Hardware restriction wiki has more details Intel Insider, a technology that provides a "protected path" for digital content can be considered a form of DRM but in the context of Android it has to be ARM


text:
Value for "Global auto (prl)" to fill default_preferred_network on build.prop
My Smartfren Andromax A with LineageOS 15.1 can't send & receive SMS unless I set my default preferred network to global auto (prl) and then perform a hot reboot.
I have an idea to edit my build.prop to make global auto (prl) as the default preferred network but I don't know what value I need to fill, not much luck when I check on include/telephony/ril.h.

Add ro.telephony.default_network=10 on build.prop, it will make the device uses global auto (prl) as the default preferred network.


text:
Why Lenovo smartphone fails to support USB OTG?
alike questions:

OTG support in Android Smartphones

Connecting Android smartphone/tablet to PC and another device through USB hub

How Does Android Detect USB Connectivity and More About USB

"Most tablets seem to supply power over USB, but many phones do NOT.
Exactly.
I tried to connect my smartphone to tablet to get ADB to work.
Unfortunately my smartphone (Lenovo) failed to recognize connected tablet as a device.
My friend adviced me basic test if OTG is supported on smartphone.
Connecting usb mouse via OTG cable to smartphone works on tablets but fails on my smartphone ( red laser led is down)
There are apps in Android store and OTG USB Driver For Android
claims after check:
This Device Supports USB On-The-Go (OTG) (my Lenovo)
and other OTG Checker app claims quite the opposite
and one another advices me to edit xml file to enable OTG
I will run another test, powering the device/s with powered USB hub as a middle-man,
since tested today USB Endoscope camera and installed a number of camera apps and none worked for me, especially AN98 advised by a manufacturer of Encoscope 1m usb camera.
At the same time I can connect my Lenovo smartphone to PC via usb cable to get connection established confirmation for files transfer.
follow-up 2
I give up usb hub connection option, as discussed already in
Connecting Android smartphone/tablet to PC and another device through USB hub
Since I have Terminal Emulator installed
I can run
adb usb
to get :
daemon not running, starting it now on port 5038
daemon started successfully
error: device not found
Not sure why port assigned is: 5038
should be : 5555 by default
nice option is
Name of adb server host (default: localhost)
-P  Port of adb server ( default: 5037)

USB OTG is mostly used with USB sticks, mouse and keyboard. Besides those devices no device developer will ever test. ADB was never meant to be run over USB OTG. Therefore I am not sure if Android even includes the necessary drivers. My advaice if you still want a Android device-to-device communication via USB: Use a Raspberry PI as PC (SUB master) in between both devices and develop a script that runs on the Raspberry that receives ADB commands from one device and forwards them to the other.

@Robert I use USB OTG cable as USB female > microUSB adapter only since none microUSB <> microUSB cable offered for sale. Today purchased a number of USB female > type-C adapters for use in a future (since my Lenovo smartphone supports microUSB only). It looks like if a smartphone doesn't support OTG so is not fit for ADB communication.
Ok, I need to run ADB on the same smartphone (null USB port) either daemon or client to limit overheads. Just go back to ADB manual on how to.  I need ADB client for Android

check your phone specifications


text:
How to clear space on your internal storage, other than the trivial measures?
After 3.5 years of use, my Android  device (a Xiaomi RedMi 3S) has its internal storage full almost to capacity. I can run its cleaning routine, I can remove photos I snapped and music files I may have stored on it - but over time, more files beyond just that seem to add up. Using the system settings cleaner - same thing: It helps somewhat, but over time, stuff accumulates that it doesn't clean.
I would like, or rather, I need, to remove more data. To do so, I need to be able to differentiate between apps themselves, their reproducible data, their logs/junk leftovers, and the history of interactions, messages and other artifacts due to use. I also need to know what can be deleted and what requires some app-specific deletion facilities.
Obviously I'm not asking for a long list of all of this information for every app; but I would like your advice on how to gather such information. Alternatively - other courses of action for clearing up space which I might not have thought about (Maybe - migration of data to my SD card?)
Note: In case it matters, my Settings | Storage screen says:

Apps & app data: 13.37 GB
Pictures, Videos: 1.94 GB <- Where are those hiding? :-(
Audio: 4.72 MB
Cached data: 539.65 MB <- After running the cleaner
Other files: 2.86 GB
System Storage: 6.24 GB

How disk space is used on Android device? and Where Android apps store data? and How to free Internal Storage by moving data or using symlink / bind-mount with Adoptable Storage? should answer your question.

continuing: What can I do to manage my phone's internal storage? // How can I deal with “Low on Space” messages on my Android? // our insufficient-memory tag wiki


text:
Unlock codes inactive
Why don't the Android secret codes work for any of my android devices, I have two s7 edge phones and two s9 phones with the straight talk wireless unlimited plan, the phones came from Verizon wireless and were transferred over, any reason why?
s9 just downloaded the latest firmware, It didn't work before or after.
 Testing Menu. *#*#4636#*#*

 Factory Restore. *#*#7780#*#*

 Camera Information. *#*#34971539#*#*

 Display Info about device. *#*#4636#*#*

 Backup all media files. *#*#273283*255*663282*#*#*

 Completely Wipe device, install stock firmware. *2767*3855#

 Wireless LAN Test. ...

Because Samsung disabled them, and they don't use the stock Android phone app which interprets them, so they would have to build support in for the codes. In some cases, Samsung devices use proprietary special codes, but about the only one that I know that works is *#06# which is pretty generic to display your IMEI number.

@acejavelin that one don't even work for me, you say they're disabled but there's various articles and videos on the web of them working on s9/s9+

Perhaps in international or unlocked versions... But there are also several articles out there talking about how the codes do not work. You can always get the app Hidden Menus from the Play Store which can bypass the dialer and talk directly to the framework to open these menus (apps).

This app gives you codes specific to your device ; some may need root to be launched


text:
OTG is not detecting in VIVO Y30
I have SanDisk MicroSD OTG and MiVi MicroSD to C-Type converter. I am trying to mount OTG in my VIVO Y30 but it is not detecting. I checked in Settings > Ram and Storage space, but OTG is disabled. I also installed OTG checker app, but no luck. Please suggest. Thanks.

Open Settings-> Additional Settings-> OTG connection. Here you need to enable the option

Cannot see Additional Settings option in Settings.

For VIVO Y30 mobile, pls go to setting and search for OTG and enable this (by default, it is off) .. Once making this, you have to connect any usb device within 5 mins or the setting will be on off automatically. Please try and let us know

Yes. I had to search first.


text:
App usage history
I'm trying to find out how to check my Application Usage History of this phone. 4636 Does not work, and other applications in play store only start monitoring the app history once installed. I uninstalled an application last 2018 but I want to know how many hours I used on the application, and when I last opened it. Is there an application that can see that?


text:
S10 draining over 10% battery per hour while idling
My phone is less then a year old and I had my Screen replaced by Samsung about 2 months ago.(they also changed the battery and aluminium body).So the battery is almost new. About a week ago something happened to my phone while i was using google maps and and it started daring battery at extremely high rate. it's was using almost 20% battery per hour with no use at all and it was getting hot while idling. Since like 4 days ago phone wouldn't even charge to 100%, it would get stuck at 70-80% because it was discharging faster then it could charge.(maybe it was getting too hot and stop charging). I had to revoke alot of location related permissions to slow the discharge to get battery to 100%.
It's not as bad as before but it's still completely discharging from 100% to 0% is less then 10 hours with no use at all. It used to last almost 2 days with quite high usage before this bug.
here's what I tried so far.

restarted the phone,
put every app to sleep and deep-sleep,
disabled allow location to apps even when location is turned off (same for Bluetooth and wifi)
turned off Bluetooth and wifi scanning even when they are turned off
disable the google app and google play services app.
did a settings reset.
factory(data) reset the phone.

non of this fixed the issue. Even put the phone on medium and maximum power saving and the did nothing, discharge rate is still exact same about 10% per hour while idling.
I took a few bugreports and viewed them in battery historian (online version). I don't know what I should be looking for. Is it safe to post bugreport file here, i don't know what kind of info is in it.

I would suspect a hardware problem causing an electrical short causing a battery drain. Could have happened when the battery /body was charged without proper care, water or fluid causing short, some burnt out diode on any of the boards ; reasons could be many //get it checked out by authorized people //You did ask that is possible including factory reset

it worked completely fine for over 2 months after repair, and repair was done by Samsung under warranty.

sounds like a weak usb connector to me and it's not really charging. how is battery drain while in recovery or odin mode compared to system mode? Why don't you claim under warranty of warranty?

Haven't tested it in odin or safe mode. there's only a few Samsung repair centers in UK, closes to me is 2 hours away. So i have to send the device through mail and whole process usually takes over two weeks but because of COVID-19 it can take even longer.

Sent it to Samsung for repair and they changed the whole motherboard. it took over two weeks for repair because they didn't had the motherboards at the repair center. The issue was mostly due to the bad repair they did when they changed the screen battery and the body.


text:
Use firefox as the in-app browser instead of chrome
When I click a link in another app, say "gmail" for instance, it opens up an in-app browser to view it.
When you clock on the top right menu bar, you can see that at the bottom it says "Powered by Chrome".
On another older phone, it somehow used to be "Powered by Firefox". I don't remember exactly how I enabled it. How should I enable it in other phones?

I assume you are talking about the "WebView implementation" - the embedded webbrowser used by many apps. It can be configured in developer options but Firefox does not show up in the list of available web view implementations (but I only have "Firefox" installed at the moment Mozilla has quite a few different Firefox based browser in PlayStore available, may be one of the other apps can be selected).

It's not webview implementation. I think it used to be called "chrometabs" but I haven't done android dev in a while so I'm not sure.

Setting the default browser as Firefox (it was set to none, because I had disabled chrome) worked.
For firefox, the instructions can be found here
For others, "default apps" menu in the settings is what I had to change for my version (Android P), ymmv.


text:
Is there a straightforward way to lower/increase wifi transmit power on android devices?
As an example I can easily adjust wifi transmit power on Windows 10 in the wifi adapter properties.

Do you know if anything analogous could be done on Android?

Because Wifi is a drain on battery, Android makes efforts to optimize wifi. This is probably why you won't see such possibility


text:
Display full screen screenshot/photo preview?
I am looking for a method that can be used to select screenshots, but when displaying them it does in full screen, so we just slide to see the next one.
By "selector" I mean, other app wants some image chosen, and these 3 options below are shown to me.
Currently I have:

gallery (default android) it shows tiny previews and wont help
quickpick it shows tiny previews too
photos, I cant find the latest screenshots at all (but it is tiny previews too).

I need full screen to be SURE I am selecting the correct screenshot...
No search I do on play store will help.
It is a too specific requirement.
So if you know an app or any way that can be used to select photos or screenshots but shows them ON FULL SCREEN or at least half the screen size, it will be much better than other options we have.

Solution of Mixplorer (my answer) deleted, as this feature appears broken

I found an app "simple gallery"
https://play.google.com/store/apps/details?id=com.simplemobiletools.gallery
it has an option to lower the number of shown columns, and that will make all screenshots bigger!


text:
Cannot access network from non-root users in terminal (Permission denied)
Preamble
My problem is, to run specific commands (i.e., start specific processes, possibly at background) on boot. I've installed Termux, so I want to start some of its commands at boot time, such as sshd and crond. For some reason, I don't want to use Termux:Boot application (mainly because it do things late).
I used a script written some time ago, which ables me to call a Termux command, running as the user which Termux shell itself starts as (so not to have problems with processes being run as root, and be able to access Termux commands, at the same time). It worked, however, there is a problem: The network access is denied.
How I found it is a permission denied problem, not something else?
Initially, let's say how I logined as the non-root Termux user. whoami gave me the Termux user name, which was u0_a73. As my phone was (and is) rooted, I could use su binary. So, I ran this:
$ su - u0_a73

Now, I should be able to run sshd command. No, it failed:
$ sshd
bad addr or host: <NULL> (No address associated with hostname)

Why? Focusing on most important parts, I ran ltrace and strace commands. To find what was going wrong, this command helped me a lot:
# # Find most syscalls exited with errors
# strace sshd 2>&1 | grep "= -1"

And resulted in:
openat(AT_FDCWD, "/data/data/com.termux/files/usr/lib/libc.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/data/data/com.termux/files/usr/lib/libnetd_client.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/data/data/com.termux/files/usr/lib/libc++.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/data/data/com.termux/files/usr/lib/libm.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
getrandom(..., ..., ...)            = -1 ENOSYS (Function not implemented)
socket(PF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = -1 EACCES (Permission denied)
socket(PF_INET, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = -1 EACCES (Permission denied)

Duh! Look at the two last lines: Permission denied.
The Problem
Note: It important to note that the same problem does not exist with Termux shell itself, even with the same environment variables on both shells.
The problem is, I cannot connect to network devices, such as wlan0 (WiFi) and rmnet0 (Data). All commands that requests these accesses fails, like sshd, ifconfig, wget and ping.
So, after a lot of researching:

I've found this thread. It also provides an answer to the problem. However, there are no groupadd or usermod commands (or addgroup or moduser either) on my Android box, anywhere. See this question. It seems these commands may exist or not from device to device.

Due to the note at the beginning of the current section, after running id command on both shells, I realized that, Termux shell's user is added on extra groups than my custom su-initialized shell. The Termux shell u0_a73 user is on extra groups, including inet, everybody and all_a73.
Note: Thanks for the helps, but please avoid saying "So you should add u0_a73 in your custom shell in these groups, particularly the inet one!". Seems impossible in my environment. Read the previous item; I have no command to do this (Why? IDK).

There's another room: Changing permissions (or possibly owners) of device files (or something else). While it should be considered as a temporary fix, as it might have security flaws, but, if you know how, then I'll appreciate you by an upvote (perhaps will not be my own answer).

I don't know if it helps or not, but when I use su provided by Termux and I run ifconfig inside, a bunch of these audit messages will be produced:
09-04 20:08:04.647 24951 24951 I ifconfig: type=1400 audit(0.0:2567): avc: denied { ioctl } for path="socket:[221195]" dev="sockfs" ino=221195 ioctlcmd=8912 scontext=u:r:magisk:s0 tcontext=u:r:magisk:s0 tclass=unix_dgram_socket permissive=1
09-04 20:08:04.647 24951 24951 W ifconfig: type=1300 audit(0.0:2567): arch=40000028 syscall=54 per=800008 success=yes exit=0 a0=3 a1=8912 a2=be83a738 a3=3 items=0 ppid=24888 auid=4294967295 uid=10073 gid=10073 euid=10073 suid=10073 fsuid=10073 egid=10073 sgid=10073 fsgid=10073 ses=4294967295 tty=pts19 exe="/data/data/com.termux/files/usr/bin/ifconfig" subj=u:r:magisk:s0 key=(null)

So, how to fix this permissions problem, that is, the system blocks a non-root user from accessing network devices?
I'm using Android (custom ROM, ViperOS) 7.1.2 (rooted), with Magisk installed, kernel 3.10.
Thanks in advance.

Your process must be in group AID_INET (GID: 3003) (or have the capability NET_RAW) to create network sockets.

@IrfanLatif Please read first two items in "The Problem" section, again. There is a group named inet (3003), and I know if I'm in that group, the problem should be fixed. However, consider I have no way to do that; there's no addgroup or the like in my environment.

Read the linked answer. You don't need addgroup to add your process to a group. You can use e.g. setpriv. If you want to stick with addgroup approach, see my answers to this and this. However it won't work the way you are trying to make it work. To know why, again, read the answer I linked first.

@IrfanLatif OK, thanks for the links, really. As I have not enough time now, I'll check those tomorrow, and report it back.

@IrfanLatif Again, thanks for the links. Great resources. However, I cannot find a solution for my problem there. Maybe that's how complicated Android is implemented, maybe I don't understand things correctly. The only thing I know is that, doing these kind of stuff on Linux distros are much easier than on Android. This is the reason why I personally think Android have a long way to reach the point we could call it a good platform.

Well, Android disappoints those who expect it to be a usual Linux distro. It's not, and most probably never going to be. It uses the powers of Linux kernel, but userspace is entirely a different world. Androids provides no official tools, documentation, APIs or support to achieve what you want to do. We need to figure out some out-of -the-way solution. You can use this command to add sshd process to 3003 group: setpriv --reuid 10173 --regid 10173 --groups 3003 -- sshd. However if you run it from an app which holds INTERNET permission, all forked process are already in the said group.


text:
Moto-Z Play with TWRP 3.4 asking for password
I have an unlocked Moto-Z play.  I able to install 'fastboot flash recovery twrp.img'.  When I boot TWRP, it asks for a password.  I tried "default_password" and I changed my screen lock pin to 1234 and tried that.  both these didn't work.  Please help.

I have exactly the same problem and took the same steps. Also no effect so I did a full wipe from within TWRP -> cancel on PW page to get in TWRP -> Wipe -> format data -> yes (actually type yes) -> enter -> back -> reboot -> power off -> boot to fastboot (volume down + power button)-> start TWRP.
Now I can use TWRP (without a PW) but you can never boot to android because your system will get encrypted again and you cannot access your data anymore via TWRP.
Have not yet flashed a new rom but I bet I can since the system is no longer encrypted.


text:
Why does Android force close apps after update?
I have been using Linux in my PC for a long time. I had noticed that if an app is updated while it is running, the app is not forced to close or restart. But in Android, I noticed that apps are forced to close after updating.
Android being based on Linux kernel, why does it force close an app after updating that app?

I assume this is a simple design decision Google made. An updated app that has still an old version running can have massive side effects if the app process is not aware of such situations. Therefore if the app installation process  starts the old process is ended. BTW: Linux or in detail Ubuntu with apt usually works the same to my experience (or at least for those services I recognize). If you update a service via apt it will be restarted.

In Android it's the operating system (activity manager) which takes care of app's life cycles (start, pause, resume, stop) and manages its resources when it's in background, in foreground, or when home button or back button is pressed, or when screen is locked / unlocked, or when app starts/stops a foreground/background service, and so on. AM keeps track of apps on per UID basis. In Linux distros, human user is the UID. And OS doesn't interfere with program starting or closing unless user asks to do so. So it's the entirely different userspace design, nothing to do with kernel.


text:
Disable web search in Microsoft Launcher
Recently, Microsoft launcher has started to give web search suggestions when I click on my home button and search for an app.
I only want to find apps, but in addition to installed app results the launcher now also gives internet search suggestions.
I want to disable that because I do not use it for that functionality. I guess this is MS's way of pushing Bing, but I still would like to disable it. Is that possible?

It's Microsoft pushing ads for its apps, yet again

Microsoft did this in July last year. See this XDA blog Microsoft is abusing Android’s share sheet by inserting ads for its apps with reddit
and Android Police
links.

Microsoft is back to it's dirty tricks again, this time by inserting  “Bing Search” option in the long-press context menu as reported in XDA in July, this year (annual schedule?) Microsoft Outlook is inserting Bing Search into Android's long-press menu. Also by Android Police

Solutions

Find another launcher and uninstall Microsoft Launcher. Or change search engine in settings, if you want to continue using the launcher.

Uninstall Microsoft Edge. XDA blog says that launcher triggers these ads only when Edge is installed (but some users have reported in comments that they don't have Edge installed but get this Bing search).

Report to Play Store - use Report Inappropriate Apps. Play Store has a very aggressive policy wherein developers are not allowed to even link their own apps.This may cause app to be removed from Play Store

Related (app violations)

Is Android showing app ads in share menu now?

Is it allowed to offer incentives for 5 star ratings on the Google Play app store?

It's a shame. I really like the launcher. Not too many bells and whistles. I do not have Edge installed so that does nor help  I guess I'll have to decide whether it's worth keeping...

The real solution
Just disable app's network access.
Go to settings - > apps - > find Microsoft launcher - > disable network access
It is indeed a really well made launcher.
Cheers


text:
Camera zooming by using Bluetooth buttons that act as volume buttons
I have a Huawei P30 Pro and this Bluetooth camera shutter. The shutter had dedicated buttons for zooming.

Sadly, the volume buttons on the P30 just act as a shutter (the zooming buttons on the shutter just send the volume buttons signals too) and there is no customization option in the built-in mobile app to set them for zooming).
I found Adobe Lightroom  that lets you use the volume buttons for zooming, but it does not utilise the optical zooming of the phone and the shutter button will stop working (it will be similar to the zooming-out button)
Is there any workaround? Alternatively, any apps that can be installed to take photos instead of the factory app?


text:
Cannot restore TWRP Backup because it cannot mount internal storage after reboot
I don't set pin/password for my device.
The first time I use TWRP, it cannot mount internal storage. So I go ahead and wipe the storage. This allows internal storage to mount and I can create NAndroid backup for my phone.
Then I restart the phone and go through the setup process from beginning.
Then I restart into recovery (TWRP) again, it asks for the encryption password again. So I in effect cannot see what's on my internal storage and cannot see how can I ever restore such backup I made earlier.
What did I do wrong? How can I backup and restore using TWRP without setting pin/password for my device?
(For the record, set 0000 as lock screen PIN and use it as decryption password doesn't work for me)

From TWRP Options check if storage is mounted or not, the second tile. You probably did that but it is not clear from the question

either TWRP is able to decrypt or you must format userdata partition each time


text:
How to restore purchase from multiple google play store?
I have multiple account logged in my google play store and I have different app purchased from different account. My all purchase from one account got restored(the one which who logged in first in my play store) and unable to restore the other app purchase . When I try to restore the purchase of app I get purchasing option from another account other than from the account purchased earlier.

How did you restore? Is it  Google restore on a fresh install?

Is the other account from which you purchased synced? Check your account settings

@beeshyams reinstalling after factory reset. I will try the second one will tell you.

Were you able to check? If it worked, please self answer the question


text:
True full backup of android including profiles
Referring to this tread as an example:How to make a full backup and restore (including ROM) using Windows PC via USB?
I would like to make a full backup, This means everything. Apps files profiles settings literally everything.
there are countless "backup options" some will recover partially some come quite close. (Samsung Smart Switch) But always small issues are missing en old skin and app i use uccw. Settings UI layout etc.
countless small irritating things. The bank app is one of them. While i disagree with the policy of reset when downloading it from the store again, I can see why it is done. Things should be different when i make my own backup.
Summarize is there a way to make a "true backup" from a android phone I have root if that helps.
PS. I can absolutely do without the lecture. My Phone/My Money/My Risk. Just like to know what is possible

Titanium Backup is the de facto standard for backup of rooted devices... I have never heard of something it doesn't do in this capacity.

Have you checked with our backup tag wiki already? That mostly sums it up. To my knowledge, the only options are TiBu (as mentioned by @acejavelin), and Nandroid. Everything else is far from being complete.

Migrate


text:
How can you connect to Yahoo! imap in native android email client?
I'm running Android 8.0 on an LG V20
When I attempt to connect my Yahoo! mail to the stock android email app I'm unable to enter my application password for Yahoo! Instead the native android email app decides that if "yahoo.com" is in the email address then they would connect me to an OAuth type 2FFA (2 factor authentication) regardless of the fact I chose MANUAL SETUP. When I attempt to connect using the Oath I get a text message from Yahoo! with my 6 digit pin. After entering it there's a small popup at the bottom of the screen that only says 'Not Authenticated' with no indication of why. I've already tried 6 times both using the Yahoo! option and the manual setup option.
POP3 works allows me to connect using my application password that I made in Yahoo!, but it sucks because if I read the email elsewhere, it still appears as unread on my phone.
How can I access my yahoo email with the native android client using IMAP when OAuth isn't working?
EDIT 9-11-2020:
I have the email app source pulled up, and there's an XML that defines providers. Since it's an XML I figured it's probably read at run time and if I could find it and remove the entries for Yahoo then the OAuth plugin shouldn't get triggered.
Here's a link to the email AOSP repository. https://android.googlesource.com/platform/packages/apps/Email/+/refs/tags/android-8.0.0_r50
This is the app that is getting called. I have android studio and I'd be glad to recompile it if someone has a link to instructions for that.

Yahoo uses proprietary protocols and does not support IMAP idle

My LG G4 running Anroid 7 is using IMAP protocols to my Yahoo! account, and it works even now. This LG V20 running Android 8.0 tries to connect me to an OAuth app regardless of how I try.

Behavior of server won't change depending on Android version. Please re-check configuration on the other device (Android 7)//I linked you to Marcel's app and he is rarely wrong

It's not the behaviour of the server. The problem is that the phone (ie client) tries to plug in some intermediate 2FFA. If the phone didn't do that there wouldn't be a problem.

@beeshyam. Who is Marcel?

Sorry. He is best known for his open source privacy oriented apps like Net guard, Xprivacy, XPrivacyLua etc. He is currently developing /developed FairEmail, another privacy oriented Email client and I trust him fully on his expertise. All his projects are on XDA


text:
Wireless display via Miracast without redirecting audio
I have an AnyCast device attached to my HDMI monitor (which has no audio capability).
This is working fine with Miracast from my Samsung A71, using 'Separate App Sounds' to push the audio out through the 'phone speaker.
I also have a cheap tablet (DragonTouch K10, Android 8.1.0).
If I cast to the AnyCast via the DragonTouch's wireless display support, the display works a treat but the audio disappears (presumably it is being routed to non-existent HDMI audio support).
Is there a generic Android equivalent to the Samsung 'Separate App Sounds', or any other suitable 'audio switch' capability, and, if so, where can I find this? I have tried a few apparently relevant Google Play apps but they just tinker with the volume and/or swap between speaker and headphones.

I am amazed that no-one else sees Android's lack of built in ability to switch audio output as a problem... I clearly need to learn Android programming.

No answer to award the bounty to


text:
TWRP cannot find backup
Motorola G4 Play, formerly with LineageOS/14.1 + TWRP 3.2
Made the mistake of trying /e/OS but before I did, I copied 2-TWRP full backups and a lot of other pics and data to my Mint 20 laptop. I have formatted an SD card to ext4 and created the .TWRP/BACKUP as suggested on another thread here from 6-years back and also tried the suggestion from another one here today. Cannot restore TWRP Backup because it cannot mount internal storage after reboot and the sdcard is mounted as suggested there.
Running TWRP I can see the sdcard and the TWRP folder (no preceeding dot shown), but nothing beyond that and I am unable to navigate.
How can I get to the backup to restore my phone to LineageOS. Should never have left, ahh, hindsight.

MicroSD Card (ext4) probably will not mounted by vold, format MicroSD Card (vfat) or mount yourself via terminal. btw it's /external_sd (/sdcard is /data/media)

Could be DM-Verity blocking the install. The [1]: https://twrp.me/FAQ/ states probably caused by dm-verity one of the possible causes of that.

Android 6.0 or higher, the.
device maker has enabled dm->
verity as a security measure. > > The device will signature >
check. blocks of data on the.
system partition during boot.
at.the block level. The usage.
of dm-verity prevents TWRP.
from.being able to.
successfully. restore a normal.
system backup

Thanks to you both, but it is fixed. I removed the SD card and copied the 2-backup files to the Root of it and put it back in. I was connected via USB to the phone so I copied the 2-backup files to a bunch of different Folders within the Internal Memory to try and see where TWRP was looking by defualt.
Slapping my forehead moment now!
Straight off, Internal memory, Recovery Folder and TWRP found them there without any Navigation. Did not think of that earlier but patently obvious now. Dang hindsight -- again.


text:
How can I clone an adopted SD card?
I adopted an SD card as internal memory and one day it just suddenly stopped working.
With tremendous help from the member @alecxs I was able to make an img copy of it and browse the files in it. Here is some of the basics of how that was done.
I'm not sure why it failed on the phone since if it was a physical problem with the SD card then shouldn't it NOT have been possible to read or decrypt it?
In any case, I have another (new) SD card and I would like to clone the old one on it so that I can effectively start using it as if it was the old one...basically everything to be as it was pre-SD card failure.
Is there a way to do that? How?
I'm able to see my photos which is a HUGE relief but my concern now is the app data that is un-viewable unless it's put back in the phone and opened with it's app.

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

Try the following

first copy sd.img to new MicroSD Card (it will finish unsucessful "error writing, not enough space")

create another sd2.img from new MicroSD Card (the one which ended unsucessful, we just need raw sd2.img with correct size)

run kpartx to map sd.img into /dev/mapper/loop1p1, /dev/mapper/loop1p2 and sd2.img into /dev/mapper/loop2p1, /dev/mapper/loop2p2 (may vary)

create two new block devices for /dev/mapper/loop1p2 and /dev/mapper/loop2p2 (see link in your question)

now lets assume /dev/mapper/loop1p2 is /dev/mapper/crypt1 (= sd.img) and /dev/mapper/loop2p2 is /dev/mapper/crypt2 (= sd2.img)

crypt1 should be mountable as ext4 partition to any mount point (that's your old MicroSD Card)

crypt2 is probably broken because of less size and must be formatted with mke2fs
mke2fs -t ext4 /dev/mapper/crypt2

now crypt2 should be mountable as ext4 too, mount to another mount point

next, copy all files from one mount point to another. make sure you preserve secontext, xattrs, uid and file permissions. this can be done with busybox cp -ac or tar --selinux --xattrs -p

i am on mobile and busy today, will improve that answer later. btw i am not sure that's how it works at all (the dmsetup part)
good luck

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


text:
What is this device administrator called screen lock service?
I was looking at the device administrators of my phone in the settings and saw a device administrator called "screen lock service". It's description is "Activating this administrator will allow the app Google play services to perform the following operations: set password rules". I have looked at my device administrators before and this particular one was never there before. It just appeared out of nowhere. Can anyone tell me what this is and if I should be doing something about it?

Are you using a Motorola device? Some moto device users seems to have come across this new device admin as well. See https://www.google.com/search?q=%22screen+lock+service%22+&oe=utf-8

A bunch of other people have had this administrator pop up and they asked on forums but no one knew why it suddenly popped up. I was hoping someone here would know

Can you setup [tag:adb] in your PC and then provide the output of this command: adb shell dumpsys package  resolvers | sed -n '/android.app.action.DEVICE_ADMIN_ENABLED/,/:/p' // Use a paste code service such as pastebin.com to provide the dump/output.


text:
Bind command on ADB to Android Emulator problem
im sorry.. im new here.. i don't know where to start. i want to run some command in emulator (android). im running certain apps, and i need it to run and not to be detectable in emulator instead as android mobile. The problem is, this command suppose to bind certain file, but its not bind.. maybe the bind command is wrong. see below script/command
@echo off

adb.exe kill-server
adb.exe start-server
adb.exe devices
adb root
adb remount

adb shell sleep 2

adb shell am start com.abc.im /com.abcgames.ab1.SplashActivity filter

adb shell sleep 3
adb shell pidof com.abc.im

adb shell sleep 6
adb shell for i in $(pidof com.abc.im | awk '{print $1}'); do mount --bind /proc/2/maps /proc/$i/maps; done

above if full command that i write on batch file (*.bat)
my question is in this particular command below
for i in $(pidof com.abc.im | awk '{print $1}'); do mount --bind /proc/2/maps /proc/$i/maps; done

its not working. can anybody help me correct it?
p.s - sory for my poor english...  TQ

Are you sure all those commands really finished successfully? adb root and adb remount require a rooted device/emulator with a special adb version installed. Therefore usually on recent device/emulators these commands will fail.

yes. its rooted emulator. is the bind command right? i suspect the command is missing something or syntax wrong or else.. can help me?

is this command right?
for i in $(pidof com.abc.ig) | awk '{print $1}' | do mount --bind /$i /proc/$i/maps; done


text:
Is this "app" malicious or is it a bug?
I was examining my battery usage and noticed this:

I don't know what this "-5" app is supposed to be. Could it be malicious or is it just a bug?
I own an OnePlus 6 with Android 10 (OxygenOS 10.3.5).

It is a bug (don't know if it is reported but a UI bug for sure, because it confuses the hell out of everyone for no good reason). We have had similar questions earlier. You can find them and see if the answers there help you out. https://android.stackexchange.com/search?q=battery+unknown

Neither, it's a placeholder for an app you've uninstalled.


text:
What is causing unknown network traffic on an Android phone?
I have a Xiaomi Redmi Note 8 Pro smartphone with Android 10 installed. Even when all apps are closed using the task manager, I see some realtime network traffic. It's not that much but it goes on all the time. This is also the case when not connected to Wifi (using 3G/4G).
Is there any way to check what specific apps/processes are consuming data?

Android OS itself makes connections e.g. to sync time and to check internet connectivity periodically. Also it's very rare to have all apps closed. Apps run services in background too, which might have network activity. Play Services are almost always online to fetch push notifications and doing other stuff.

Does this answer your question? How to view network traffic requested by a specific app?

@IrfanLatif Yes, I already expected that the network traffic is caused by the OS/Android itself. Will look into the other question your referred to.

Before identifying and potentially vilifying specific apps, it is important to know that any app can schedule deferred background operations with the system.  This sort of background work can and often does include network requests, depending on the app.
My recommendation is to familiarize yourself with your system.  For example, inspect your account for any syncing settings.  A plethora of Google apps like to keep themselves up to date through Google Play Services.  I suspect that Redmi has OEM apps, or the OS itself, contributing to passive network activity as well.
If you would like to inspect which apps are sending packets, I suggest looking into network inspection tools such as those built into your router, or with programs like Charles Proxy.

Xiaomi's OS (called 'MIUI') was full of bloatware, I thought I removed all of that with ADB FastbootTools. Might have missed some bloatware or it's just the Android core that is constantly using internet connection. Going to give Charles Proxy a try.


text:
I Can't change my password
I can not change my password to slide or no password, it says it is due to administrator policies but i have disabled all apps from there, What do I do?

That is because of credential storage. Go to settings--> storage and clear the credential storage. Reboot your device and now you will be able to set lock screen to swipe or no password.


text:
How do I force a hard shutdown of a phone with non removable battery?
My phone is Samsung Galaxy S7 with Android 8, and any phone specific answers are welcome but I am looking for a general solution
A few days ago  my phone screen went crazy and started detecting touch events all over the place when it was just left alone on a table. The home button seemed to be unaffected and brought the phone to the home screen, but it didn't stay there long enough for me to be able to do anything. Long pressing the power button brought up the (power off, restart, emergency mode) interface, but it turns out touching anywhere on the screen other than the three specific buttons causes the buttons to disappear, and since touch events were getting auto generated, the shutdown option kept disappearing. Eventually I managed to stay on the shutdown interface long enough to press the shutdown button.
Is there any way to forcefully cause a hard shutdown on a phone that does not have a removable battery? I am looking for a general solution that works on all phones, if such a thing is possible. I would also like to know if this is possible from adb on an unrooted phone.

If u have USB Debugging enabled, you can use ADB to reboot or shutdown

Pressing the power button until the device reboots is the common way. Depending on the Android device you have to hold the power button for 10-60 seconds before the device reboots (hard reboot, no shutdown just a reboot).

@Robert worked on a samsung galaxy win (Android 4.something), didn't work on a samsung galaxy 6 (android 6)

@Robert also, would it work it there were constant touch events being detected on the screen?

Does this answer your question? What is the fastest way to shutdown unrooted Android phone?

Related: How to perform a hot reboot using the terminal emulator?

Yes this works because it is AFAIK not implemented software but in hardware. No matter in what state the OS is pressing the power button for a long time reboots the device. Even if the OS has totally crashed or is in an invalid state.


text:
How to sideload LineageOS?
I think I updated twrp and adb seems to be working:
thufir@doge:~/android$
thufir@doge:~/android$ adb shell getprop | grep twrp
thufir@doge:~/android$
thufir@doge:~/android$ adb shell
shell@htc_m8:/ $
shell@htc_m8:/ $ exit
thufir@doge:~/android$
thufir@doge:~/android$ adb shell getprop | grep make
thufir@doge:~/android$
thufir@doge:~/android$ adb shell getprop | grep model
[ro.aa.modelid]: [0P6B16000]
[ro.chipset.model]: [MSM8974]
[ro.product.model]: [HTC One_M8]
thufir@doge:~/android$
thufir@doge:~/android$ adb shell getprop | grep manufacturer
[ro.product.manufacturer]: [HTC]
thufir@doge:~/android$

and am, I think, read to proceed with installing lineageOS but want to make sure I have the right files and am following the right sequence:
thufir@doge:~/android$ adb reboot bootloader
thufir@doge:~/android$
thufir@doge:~/android$ fastboot devices
SH4AYWM01306    fastboot
thufir@doge:~/android$
thufir@doge:~/android$ fastboot oem get_identifier_token
...
(bootloader)
(bootloader) < Please cut following message >
(bootloader) <<<< Identifier Token Start >>>>
(bootloader) 8638E3FC990E8996590950FC43B2597A
(bootloader) D3E768DE94AE44F0545422F4F610A2B1
(bootloader) 0D743BEB9D61A214A14203E5DEF9D3A7
(bootloader) 5E519C96B5DA53C4C2C3DA97A3CA584E
(bootloader) B2A07292DD46C6BD13C1F957106DCAF2
(bootloader) 8E9B3C1E660A93B2824622FEB9786109
(bootloader) EAE5E4C7F87D0F2CF41711CC713CAC69
(bootloader) 49ED4E9D2313AB7B8BC7DDF918067039
(bootloader) 448DD51FFD6CA2BEA7F2E03B9E4706F9
(bootloader) 377CE2210B1BCB3E8960B02A970C5430
(bootloader) B404427005C52B6A07A989CC2378C93E
(bootloader) 23D134B3CC30BD33B24B03BBD4C5CE93
(bootloader) 198734886FC83C5DC56044EE0C477786
(bootloader) 037C2393B758EDA5D03B968564561374
(bootloader) 159EA7D89F97C7E8631C5A5E7C1EF967
(bootloader) E64F871FF21B09A0120A302E8B8F6C89
(bootloader) <<<<< Identifier Token End >>>>>
OKAY [  0.069s]
finished. total time: 0.069s
thufir@doge:~/android$
thufir@doge:~/android$ fastboot flash recovery twrp.img
target reported max download size of 1830612992 bytes
sending 'recovery' (21956 KB)...
OKAY [  1.755s]
writing 'recovery'...
OKAY [  0.626s]
finished. total time: 2.382s
thufir@doge:~/android$
thufir@doge:~/android$
thufir@doge:~/android$ fastboot boot twrp.img
downloading 'boot.img'...
OKAY [  1.741s]
booting...
OKAY [  0.524s]
finished. total time: 2.265s
thufir@doge:~/android$

but what does this mean:

Sideload the LineageOS .zip package:
On the device, select “Advanced”, “ADB Sideload”, then swipe to begin sideload.
On the host machine, sideload the package using: adb sideload filename.zip

(Optionally): If you want to install any additional add-ons, repeat
the sideload steps above for those packages in sequence. info_outline

I should copy the zip file to the phone, then reboot the the phone while pressing the above keys?

Effectively Sideloading is the same as uploading the LinegeOS zip file to the device and then flash this ZIP file. Therefore sideloading is is uploading and installing a zip file in one command (but the zip file is never stored on the device). Sideloading is typically only available in a custom recovery such as TWRP after you have explicitly enabled it.

First of all... MAKE SURE YOU HAVE DOWNLOADED THE CORRECT ROM FOR YOUR DEVICE..
Steps:

Backup important files
Connect usb
Go to recovery and select wipe
select advance
select the things you wanna wipe.. except the usb-otg thing
After wiping.. go to advance(from home page of twrp)
select adb sideload
Make sure adb is installed on your pc
in cmd(admin) type adb devices and check that your phone there
Type adb sideload LineageOS.zip replace LineageOS.zip with your rom
Enjoy LineageOS!!

I'd recommend you to download eelo.. a fork of LineageOS.. It has MicroG which is really awesome.. I'm currently using the same..


text:
How do I turn off location permanently on Android
My Samsung note 8 is running Android 9.
GPS location is frequently turned on without my knowledge or permission. There appear to be multiple triggers for this including a change in Wifi network e.g. leaving the house using cellular data and coming back.
This is a nuisance and unwarranted location tracking of the phone. I want to be in control of when I decide to use location based services.
Is there a way of switching off location globally in the settings so I can control this behaviour?

In regular Android devices with Android 9 you can see in system settings location you should be able to see the last apps that have requested your location and it's granularity (GPS or Wifi/Mobile network position). Not sure if this menu has survived Samsung's modifications.


text:
Can we hear media and make call simultaneously using two bluetooth devices?
The picture says both are active.

Device : redmi note 7 pro

No... You select one device or the other as the active device, that's the way Android works.

What about this?

Never made it into a full release... Google has been known to try some crazy things in their betas, and some make it to release, but most of these features do not. There isn't much actual practical application for this feature, and it never made it to a production release. That was a couple versions ago and it never happened and there is no demand, the chances it will happen now are near zero.