text:
Why would the TRWP Nandroid backups of system and vendor partitions be different between backups?
For background info, I just picked up a Xiaomi Mi 9 Global version and am running the latest weekly Xiaomi.eu Pure MIUI ROM on it (if it matters, the latest Xiaomi.eu weeklies for the Mi 9 are Android 10 based).
I've started taking full backups using TWRP and I noticed something strange. For reference these backups have compression disabled and no encryption to try and rule out any variables.
When I check the sha2 hashes of the various partitions, I've noticed that all of the various partitions (boot, recovery, modem, efs, etc) have the same sha2 hash between backups (meaning the images are exactly the same). However even just from one night to the next morning, or even from one boot to the next as I tested today, the hashes of the vendor and system partition backups are different. I don't have any custom system modules or kernels installed that could be modifying those partitions, though I am rooted with Magisk.
I used adb shell to browse around the system and vendor partitions and all of the date stamps of the folders and files are either "1969-12-31" (basically meaning the date is 0 since that's the beginning of "unix time if you take into account my time zone) or "2019-09-06" which is the probably the date that the ROM or it's base ROM was created (the original Xiaomi ROM they made the Xiaomi.eu version from). I even used the find command from an adb shell to search both the system and vendor partitions for any updated files (any file with a date newer than "2019-09-06") and there are none.
So my question is this: if I haven't flashed a new ROM or installed anything in the system partition, why would two backups be different?
I would think that only the data partition would change as I use the phone. I thought that since the system and vendor images are the ROM itself, they should never change unless I change ROMs. I was under the impression that even system settings are stored on the data partition because performing a factory reset essentially just wipes that partition...so I don't see why the system and especially vendor partitions should ever change unless I specifically flash a different ROM or update the ROM which would obviously write to those partitions (or at minimum the system partition)
Are there some kind of auto-generated files or folders in the system and vendor partitions that change slightly on ever boot or something?
I would just like to understand this better so I know whether for example it's ok to just do regular backups of the data partition and only back up system and vendor when I do a new ROM update.
Hopefully someone with more Android ROM experience can shed some light on this.

Answer to your question is dm-verity:

The dm-verity feature lets you look at a block device, the underlying storage layer of the file system, and determine if it matches its expected configuration. It does this using a cryptographic hash tree. For every block (typically 4k), there is a SHA256 hash.

So /system and /vendor partitions are always mounted read-only because mounting R/W causes changed hash values of the partition/filesystem (at least some inodes belonging to filesystem structure may change even if you don't touch a file), thus breaking the security feature. To make any changes to them, we need to disable dm-verity which must be your case.
TWRP creates backups in two ways. boot, recovery etc. are just dumped (dd) as a whole, so their hashes don't change because those aren't mountable filesystems. /system and /vendor are either dumped as images to retain dm-verity as discussed above. Or otherwise a tar archive is created to keep the backup size minimum. In second case even the filesystem is unchanged, a new archive file is created every time you do the backup. If the files aren't changed and are read/written by the archiving utility in the same order, using same options/parameters every time, then created archives should be identical. But even a minor factor e.g. compression may cause a different hash value every time.
So you must have dm-verity disabled, and therefore you will keep on getting changed hashes. But the contents don't change (if you don't change yourself or Magisk/GApps don't put some addon.d script), so a regular backup of both partitions isn't required. In fact only /data backup is enough, boot, /system, /vendor are already part of flashable zips.

Just to add a slight addition, I believe what's happening is that TWRP on my device still uses image backups even though my rom has dm-verity disabled, however, since the partitions are presumably mounted r/w due to dm-verity being off, they get slight changes each time they're mounted (tiny filesystem or journaling changes) which then still causes their hashes to be different even though they are not tar files.

In any case, as you said in your other comment, there are no actual file changes and so new backups don't need to be made unless you manually modify those partitions like by installing something to /system in TWRP or a Magisk module, etc, or updating the rom.

Actually even weirder, I tried moving something to /system and I had to remount it r/w which would indicate that it is being mounted read-only, but I guess the system itself my mount it first r/w then later lock it to read-only and that's why it's getting modified between backups. I can't think of any other explanation.

@BenBaron Android by-default mounts /system read-only as R/W is no way an option b/c of VB. But when we flash Magisk and TWRP, Android is no more the single entity on the device to play with /system. SAR requires /system to be mounted by Magisk first before Android's init does so. Also note TWRP's warning: This device uses dm-verity!.

Ahh that's a good point, I forgot about Magisk, it does indeed write to /system. However, regarding dm-verity that link is for the Note 4, I have the Mi 9, though from what I can tell the stock rom does indeed also have dm-verity enabled, however the custom Xiaomi.eu rom I'm running does not. TWRP doesn't seem to know though and just assumes it's enabled and takes system images instead of regular system backups.

@BenBaron the link is just for reference, I couldn't find Mi9 on official page of TWRP. You will find the same warning on hundreds of other devices too, and is in fact applicable to every device shipped with dm-verity enabled (devices "MUST support Verified Boot for device integrity"). Custom ROMs almost always have to disable security features like dm-verity because those are usually userdebug builds. Some disable SELinux too in beta phases.


text:
How do I cast screen from Pixel 3 to something that is not Chromecast?
Booting Chromecast requires working Internet with unhindered connection to a Google server with a non-fake TLS certificate. So using Chromecast seems to be not an option in my use case.
What else can be used to cast screen / audio from Pixel 3 to some HDMI-outputting device? Are there alternative hardware devices that are compatible with Pixel 3? Can [rooted] Pixel 3 running Android 9 use Miracast instead with some third-party software?
Or maybe there are some other methods to make a "virtual Google" to allow Chromecast 3 to activate?

Wired or wireless? If wired can there be a PC-like object between the screen and phone or does it have to be seamless/user friendly?

Maybe wired, maybe wireless, but with lag comparable to using Chromecast/Miracast.
Maybe with some compact, cheap-ish and fanless device in between.

I was thinking of using scrcpy on a Raspberry PI might work for you. Not sure if audio forwarding works on RPi if you need it. You would have to see if the lag is acceptable.

@MorrisonChang, Is it substantially different from using adb exec-out screenrecord --output-format=h264 --derived hacks?

scrcpy has its own server APK and uses bi-directional stream over adb. See: https://blog.rom1v.com/2018/03/introducing-scrcpy/ as the author addresses that exact case.

source: Stack Exchange

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

sort: votes


text:
How to create a backup image (*.ab) of Android Device that is not booting up?
I am just a usual android user, owning  9-10 android devices. My Mom's Android device automatically turned off yesterday and while booting up again, it was stuck in the company Logo
and was not turning on. The device is "10.or E" exactly this  model.
My Mom had some very important files in her phone storage that she cannot compromise with. So, she came to me and asked me if I could turn it on without losing her files. I tried turning the phone on using the combination of the three buttons together (Power Button + Volume Up + Volume Down Buttons). This didn't do any good but yeah, it was able to turn off the mobile. Then I tried to go to Recovery Mode (in this device it is done by the combination of Power Button and Volume Up button) and check if there is an option available for making full device backup like my another device. Unfortunately, there was no option to create a "Full system backup" on SD-Card. It had some other options. See these images:
  .
Now, as there was no option to create a full backup using only the concerned device, I opted for my PC to do the same. I have SDK(s) installed  of all the Android Versions form Lollipop to Android 10 (don't know it's name). I switched off the phone and connected it with my PC using USB-Cable (not sure if USB-Debugging was on or not). After connecting I tried to give the adb command for backup  but it could not establish the connection with the device. Whereas, in the list of my devices I see a device named as Qualcomm HS-USB QDLoader 9008 (COM5)
which means that the device is detected by the computer. Although the device is detected by the computer, I am not able to create a backup using adb commands.
I don't know any PC Backup method other than the sdk-cmd-adb method.
So, as this is a very big problem because my Mom's Data is extremely important to her and she cannot afford to lose that data, I really need a working method to get her Android Device's Backup before flashing new firmware or Factory/Hard/Soft Reseting it. There are so many Android Enthusiasts over here that may also have faced this problem before or may face this problem in future so, if any of us could help me in this issue will not only be helpful to me but to all of the faithful Android Stack Exchange Members.
Please help me, I am left with no other option.
Thank You So Much in Advance ❤❤❤

The approach you are taking is not worth it for you simply because:

USB debugging needs to be enabled beforehand for using any adb command on a device. Since your mother probably would have never felt (and why would she anyway?) the need to enable it, assume it to be disabled.
Since debugging can only be enabled either manually by the user under Settings app, or by using a custom kernel, or by using a custom recovery to make changes in data partition, your chances of enabling it are zero.
Even if debugging is enabled the two most important processes are either not started or not fully functioning for enabling and approving backup via adb. One is the activity manager which is required to seek approval for backup via UI, and the other is the backend backup service which nobody can tell (without logs) whether it is started or not because of the boot issue.

In short, dump this approach because it is futile and a waste of time in your case. All I can suggest is to find out a way to either load a custom recovery somehow without deleting userdata. I've never tried that, so that's all I can offer.
You can try looking for Qualcomm chipset flashing type tools. They may be able to help you load a custom recovery/kernel so that userdata partition can be accessed.   Beware with such tools though. They sometimes don't list partitions for selective partition flashing and flash every partition in wholesale, including data partition which is of prime importance here. Good luck!

Thank You So Much for your answer.  Although it wasn't solution to my problem, but you gave so much effort to write this much long answer and cleared my misconception that I could make a back-up without USB-Debugging turned On. As you told me that there might be some other options too but they will be completely experimental so I did not opt for them and I have factory reseted my Mom's phone. Unfortunately  this proble and reset has made an irreversible loss.

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


text:
Are RAM and storage physically located on smartphone's SoC or not?
I started to learn about Android-based devices' hardware and already have learned about SoC, which includes CPU, GPU, connectivity modules, etc in one chip. I have found an example of SoC structure (Snapdragon 600):

Some sources say that SoC also includes RAM and storage, while others say that RAM and storage are placed on other chips which are separately soldered to the motherboard.
Which answer is correct? I'm sorry if this is a stupid question, I'm a newbie. Also, maybe you have some helpful articles to read. Thank you!

Both answers are correct.
A SoC can contain RAM and flash but it does not have to. What variant is used is chosen by it's manufacturer and therefore every device type can have a different SoC and motherboard layout. And as there are dozens of manufacturers and hundred of different Android devices sold you will find any combination of on SoC with or without integrated RAM and flash.
If you are interested in a specific device check the device tear down section from iFixit for example. They usually mark the different chips on the motherboard so that you can identify which chips are separate chips (e.g. flash memory and/or RAM).
Some times even devices that share the same name like Samsung Galaxy S10 contain different SoC and motherboards. In this case the devices for the markets USA, Canada, China and Japan have contain a Qualcomm Snapdragon instead of a Samsung Exynos SoC.

Some kind of Package on Package (PoP) arrangement is a common choice, particularly to keep cost low. Multi-Chip Package (MCP) which contains eMMC (or now possibly UFS) and LPDDR is built over SoC which includes application processor, GPU, baseband processor etc.


text:
Android Auto stopped working with Pixel 3 on Hyundai Elantra
I have a 2018 Hyundai Elantra with Android Auto and a Pixel 3, and I use Android Auto often.  I recently upgraded my phone to Andriod 10 and after a few days Android Auto stopped working.  I have rebooted my phone and tried a new cable to no avail.  I had a friend connect an iPhone to my car and CarPlay worked normally, so I know it isn't a problem with the car's USB port.
Does anyone have another suggestion?

I would recommend trying to "restart" Android Auto in your car by disabling Android Auto, waiting a minute or two, then enabling Android Auto.  I believe you can turn off Android Auto from the touch screen under Setup, Phone Projection.
Give this a try and let me know if it works.

That worked.  Thanks, Jim!


text:
Do fast charge technologies wear down the batteries quicker?
There are plenty of fast charge technologies out there, now seemingly going up to 120W, which can supposedly:

... capable of fully charging a 4,000mAh phone battery in just 13 minutes ...

Now I am no expert in physics or material technologies, but intuitively thinking increasing the effect (without changing the input current) could result in wearing down the batteries on the long run, assuming that the batteries burst into flames first.
I was wondering if there is any information out there available, with respect to how well the batteries hold in the long run, with these newer, high powered charging solutions.

In theory, yes. Charging quickly means there will be more heat produced which is bad for the battery cells.
However, most batteries are equiped with controllers that make sure that the charging process runs smoothly to avoid reaching temperatures that would be detrimental to batteries.

In theory you are right, but I don't trust the manufacturers that they really keep charging in a range where it has no detrimental effect on the battery. A manufacturer is only interested minimizing the negative effects so that the battery has ~70% capacity left after 2 years. If you are planning to use your phone for more than that time I would recommend to only use fast charging when it is really necessary.

@Robert Also if the battery deteriorates quickly and is no longer if great use, the user must change it which is good for business.

Battery University is a very good site for explaining battery technologies and how batteries behave. Fast Charging does damage the battery life, but this can be mitigated somewhat - generally by not allowing deep discharge or fast charging above 80% and efficiently discipating heat.
IMHO you are absolutely right that manufacturers of cellphones design systems so batteries wear out faster. (In fact, by never charging my battery above 75% my battery is wearing at about 1/3rd the expected rate ). Of-course I needed to root my phone and find software tools to limit (and monitor) charging - The point is if manufacturers cared this could be done by a profile setting - and removable batteries -  rather then require almost unknown and hacks and expensive replacements -- but I think people would keep there phones longer so they would not upgrade as frequently.

The software I use to limit charging is "Battery Charge Limit" and I use "Accubattery" for my battery stats.

thanks for the link, interesting information...


text:
Samsung Galaxy S10 automatically deleting emails using email app
I'm using Samsung Galaxy S10, and it is automatically deleting emails using the email app.
What do I have to do to keep emails from being deleted?

Are you sure the emails are deleted and not just not displayed? Usually mail programs only show the mails received in the last ~14 days. Older mails are not displayed but they are not deleted.

They are in the inbox but after something they are are not there

Then the mails are not deleted, just not displayed. Open the settings of the app, select your account and change the value how many days are synchronized. As I don't have a Samsung device I can't tell you the exact names and the way to this setting.

the menus must be different . your suggestions don't seem to match the S10 , TKS ANYWAY,


text:
Is there a way to move apps to sd card if your phone doesnt support it?
In Huawei Phones moving apps to sd card isn't supported,there isn't an option to use sd card as internal storage too,is there anyway to bypass that and move apps to sd card without rooting android phone?

Possible duplicate of Can't move apps from internal to external storage

@Irfan Latif I forgot to mention that in Huawei we don't have an option to use sd card as internal storage.

The simple answer on non-rooted devices is no. If the OS doesn't allow it, you will not be able to. If the device is rooted, then there are many (apps, scripts, etc) ways that will help you achieve it.

so the only possible way to do this is exploit in non-rooted devices right?

It means you will need to root your device.


text:
Samsung Galaxy S7 stuck at boot - power button not working in recovery mode
my Samsung Galaxy S7 is stuck in boot with the "no command" error screen. I found out I can possibly fix the problem by wiping the cache partition, and have found the recovery menu to do this.
However, my power button does not seem to work in the recovery menu (it does work for powering the S7 on, however. Thus, I can not select the menu item to wipe the cache partition.
How can I get rid of the no command error? If wiping the cache partition is the right way, what am I doing wrong? I don't want to factory reset my device.
I am not usnig a modified version - I use the android version shipped by Samsung

My power button will work after scrolling to the option using the volume keys but I've always wondered about what it says below the options for the hashtree lineup..


text:
Android 10 Swipe Forward
I am using the new gesture navigation with Android 10 and was wondering if there is a way to have the swipe from the right side to the left trigger a "go forward" action. When I swipe from either the right to left or left to right, it always does a "go back" action. Is this a bug or does Android only support going back with these swipe gestures?

It is not a bug. Swiping to move forward as not yet been implemented natively only swiping to move back

with the new system navigation mode - users can navigate back (left/right edge swipe), to the home screen (swipe up from the bottom), and trigger the device assistant (swipe in from the bottom corners) with gestures rather than buttons.

To use the swipe forward gesture, the app should implement it (ie Chrome).
Gesture Navigation: A Backstory


text:
How to enter recovery mode with an OTG keyboard?
I would like to know how to boot my Mediatek tablet into recovery mode by using a physical keyboard (OTG) because my volume key doesn't work.
And I can't boot to the OS to enable the USB debugging.

Is your bootloader unlocked? Can you boot to bootloader mode?

I think that my bootloader is unlocked. How can I check that and boot to bootloader mode?

Make a search with your model number.

Does the unlocked boot.img mean that the bootloader is unlocked?

The boot.img from my firmware is unlocked.

Unlocked boot.img doesn't make sense. It's the bootloader which is locked or unlocked. You can get your stock recovery.img (or custom one like TWRP if bootloader is unlocked) and boot that from bootloader mode using fastboot boot recovery.img. But first you must be able to boot into bootloader mode. That has a different key combination than recovery mode. Key combinations are specific to devices and manufacturers.


text:
How to wipe and reinstall an encrypted device with 7.1.2 if TWRP won't boot anymore?
I installed an unofficial build of Resurrection Remix 7.1.2 on Meizu Pro 5 (M86) with TWRP 3.0.2. Out of curiosity I then enabled encryption with the thought that even if I don't like it and cannot reverse, I should be able to rollback the previous system backup via TWRP. There is no data to care about, but still I want to be able to install on the phone whatever I want.
I was wrong. TWRP won't boot anymore. Its boot screen appears but just flashes every 5 seconds or so.
I then tried a few things:

Factory reset from the Settings. I can reach the "Erase Everything" button but it does nothing;
Factory reset from ADB:

recovery --wipe_data says /system/bin/sh: recovery: not found
wipe data says /system/bin/sh: wipe: not found
After adb reboot bootloader I have no luck running fastboot devices: it outputs nothing

Attempting to flash a newer version of TWRP from TWRP App (image for Meizu Note 6; there is none for my device) but it complains that the device is not rooted (the developer settings only allow root via ADB).

So is there a way to just wipe the device and re-install something on it?

recovery --wipe_data is supposed to be run when you are in recovery mode. wipe data is not a valid command at all. You can write --wipe_data to /cache/recovery/command file and then reboot to recovery mode using adb reboot recovery command. If recovery mode isn't booting, boot into bootloader mode and boot recovery from there.


text:
Mobile data offline or timeout whereas hotspot just works
How can I troubleshoot the following situation:

during mobile data my phone often is experiencing 100% time outs (ERR_TIMED_OUT) or Chrome states it is offline
whereas my connected laptop through hotspot is not experiencing any issues

My phone states full connectivity and 4g being present.
This leads to my hypothesis that some configuration or malicious app is flooding the local network stack on my phone.
Is there a way to diagnose this further? I really want to get my mobile data connectivity back!
Phone: Lenovo P2.
OS: Android 7.
Edit 15-09-2019
I have reset my phone to factory settings but to no avail. The issue still remains. I also swapped SIM cards with another phone. No effect. The second SIM in my phone does not solve the issue. And my SIM in another phone just works correctly over there.
Edit 16-09-2019
Interestingly, apps that have lots of patience (long time-out policy), such as my mobile park app, and apparently WhatsApp as well, are still able to send and receive data.

Is your phone rooted? Using any firewall app? Using any VPN app? Can you ping some IP address on internet e.g. 1.1.1.1?

No my phone isn't rooted. How to confirm? Maybe there is a firewall app installed. How do I know? Pinging 1.1.1.1 also results into timeout / offline.


text:
Bootloop after flashing TWRP (Also lost recovery)
So I was going to root this (previsouly healthy) BQ A4.5. Unlocked the bootloader and flashed TWRP from here:
$ fastboot oem unlock
(bootloader) Start unlock flow

OKAY [ 32.954s]
Finished. Total time: 32.960s
$ fastboot flash recovery downloads/twrp-3.3.1-0-dendeone.img
target reported max download size of 134217728 bytes
Sending 'recovery' (11342 KB)...
OKAY [  0.378s]
Writing 'recovery'...
OKAY [  0.335s]
Finished. Total time: 0.727s
$ fastboot reboot bootloader
rebooting into bootloader
OKAY [  0.003s]
Finished. Total time: 0.058s
$ fastboot reboot
Rebooting...

Finished. Total time: 0.058s

The first reboot to bootloader didn't do anything.
Now it's on a bootloop which states:
Orange State
Your device has been unlocked and can't be trusted
Your device will boot in 5 seconds

Pressing Volume Up + PowerOn used to work for recovery (that's how I got into fastboot mode).
Now, pressing Volume Up/Down/Up+Down + PowerOn doesn't do anything, fastboot stands indefinitely < waiting for any device >, and adb always responds with error: no devices/emulators found regardless of when it's run.
If I press Volume Up+Down it turns off. Plugging in USB it turns on. Nothing else seems to respond.
dmesg states:
[32774.364937] usb 2-7: new high-speed USB device number 59 using xhci_hcd
[32774.514434] cdc_acm 2-7:1.0: Zero length descriptor references
[32774.514450] cdc_acm: probe of 2-7:1.0 failed with error -22
[32774.554519] cdc_acm 2-7:1.1: ttyACM0: USB ACM device
[32777.142205] usb 2-7: USB disconnect, device number 59

The disconnect happens before the bq logo appears.
Trash bin time?

Orange state is just a warning shown by bootloader on unlocked devices which implement Android Verified Boot. All that you need to do is find the proper key combination to boot into bootloader mode, which is definitely running.

Same problem with my BQ M8. Here is how I solved it:

With the phone connected via USB, launch CMD to run ADB and test as many times as needed that the PC and terminal can talk to each other with the command adb devices. Eventually, after several attempts, it will return the device and number. Possibly stating the work "recovery".
Go into bootloader with the command adb reboot bootloader. As before, try it as many times as needed until it works (that means you will have to re-run the ADB, and un-plug, plug the phone).
Once on bootloader (you can verify because the phone screen is in "Fastboot..." state), you have to launch in your PC the FLASH TOOLS (hope you know how to use it)
In FlashTools, select only BOOT and RECOVERY tickmarks, and leave the rest unmarked. Then Press on the DOWNLOAD green arrow
Now back in ADB window, use the command fastboot reboot. This will restart the phone, and FlashTools will immediately kick in, flashing the BOOT and RECOVERY files back in your phone (it takes milliseconds)
The phone will restart and this time you will have it all in STOCK (you'll also have the bootloader locked again).


text:
"Clear data" does not clear login details
I was under the impression that "clear data" clears everything, but apparently it does not. Tested with a few apps, including Facebook.
I stopped the app, cleared cache, cleared data, opened it - and by some miracle it still remembers my login details! How does it do it? How can I disable this?

You probably also need to remove the program account details from Settings -> Accounts and Backup -> Accounts
It is probably there that the account details are being saved. Mainly to allow you to safely clear data (to reset the program) without the hassle of having to log back in.


text:
Where are saved Instagram videos stored on my device?
To be clear, these are videos I have taken on the device using Instagram, not other peoples videos. Its videos I have taken then pressed the "save" button before sharing/posting. I have several videos over time I  want to download to my PC.
Seems to be the only way to even find them on the device is in the Instagram app where you go to post on story and it browses all the media on your device, if I scroll down a while I can see the videos, but it is not filtered or organized.
I have browsed the device storage IE
This PC\Pixel 3\Internal shared storage\Android\data\com.instagram.android
To only find a few files there. They have to be on the device because I can search them when posting to timeline/story, but cant seem to find them.

I have a Samsung.
I found my saved instagram stories under [phone name]\Movies\Instagram

Go into your gallery and find an album called Instagram. It should pop up. If not, what did you save, posts or stories?


text:
Sync both ways "camera picture folder" for android and pc
I am helping an older person who is not tech savvy enough to play with Android and USB cables and I'm tired of doing it for them.
They need open pictures taken with android smartphone (built in camera, saved to its local DCIM folder) onto their computer, edit them  (Windows) rotate, crop and so on, then transfer back to smartphone and then send via MMS. (yes, it's odd to use MMS i know, but as i said -we are talking about non tech savvy persons and they know how to operate mms so there is not possibility to switch them to using email).
Right now, i have use send anywhere to transfer picture to computer, wait for them to edit, and transfer back via send anywhere... or use usb cable.
I got idea to use dropbox, and dropbox let me send saved pictures directly to pc (via dropbox camera photo upload)  so this part is done, but it won't work other way (after editing file on dropbox photo folder -  it's not syncing back to phone) It's synced on dropbox folder via browser, but android app won't sync it back - i haven't seen that function < so it's useless.
Do You have any other idea of how can i sync pictures both way and make them after edit appear on built in android gallery so they just can select edited picture and send via mms?

If both PC and phone are connected to same (WiFi) network and it's possible to assign the phone a static IP, a FTP server would be the simplest approach in my opinion. Install some free app like MiXplorer which does have minimal FTP server built-in. It also provide a Quick Settings tile to turn the server on and off. On PC it would be just to copy and paste in a file explorer. A dynamic IP would take a little more hassle.

I like idea, thank You . I will explore it and share results.

rotation, cropping and filters can be applied using photos.googe.com. you can sync folder via photos app and access it via website and download it to local windows system. otherwise if you have dropbox synced then you can directly upload to images to photos.google.com and they will automatically show in your android photos app

google drive and google photos come to mind.  But dropbox should work, maybe it's a setting? :|

You could use SyncMe Wireless application.
With SyncMe,you can copy, move, sync and backup your mp3, pictures and documents over WiFi (including Portable WiFi hotspot), (or cellular VPN)  to your computer. Nothing to be installed on your computer.
The application itself provides a step by step guide in setting up the folder to be synced (note: sharing must be enabled on your computer).

Setup device folder to DCIM folder
Setup computer folder to be the "shared folder" where photos are copied on the computer.
Configure sync options and filters (and schedule-if needed.
Tap the job to sync.

Basically the setup could be anything like this:

NB: No affiliation with the appplication but just use it as my daily driver for similar needs
Note: You may need to enable SMB1 on Windows


text:
Connecting an account fails because of alleged Family Link and Google Play Services version mismatch
I'm migrating from a Samsung Galaxy S4 Mini to a Redmi Note 3 whos bootloader I unlocked and then updated to Android Pie.
Whenever I try to use the account that is already used by the Samsung device I get an error because (allegedly) the installed Google Play Services or the Android version are less than the supported ones (please see screenshot below). The error displayed is "update required ... This device needs newer software". Before this screen is shown I shortly see a screen with "Parental permission" on it, which is the screen that I would expect in order to connect this (second) device with the Family Link app for parents.
This error should not be shown because Android Pie (=9.0) is way more current than the demanded Android 5 and my play services are version 19.x
These are my attempts so far:

tried different custom Android Pie ROMs (Pixel Experience, liquid, aex, ...). All of them show the same effect.
flashed pico, micro and stock opengapps, makes no different
checked date and time to make sure they are current (they are)
went to Settings / Apps and deleted cache and more (didn't help)
checked for working Google Play Servics with a diagnostic program (they are recognized and have a real up to date version)
updated Play Services with an APK from apkmirror (same effect)
instead of linking the account in the setup agent I skipped this part and linked the account (or tried to) via Settings/Accounts

None of them helped. Others have the same problem but no solution either: https://forum.xda-developers.com/redmi-note-3/help/google-family-link-kenzo-t3850734

Is your android version is 5 or 5.1?

It is Android 9 (Pie)

I'm having the same issue with android v6


text:
"maps is offline check your network connection" on Mobile Data
Google maps is not able to connect when not on wifi, how to fix the problem?

I found out the problem.
It happened after I put a secondary SIM card for a while and used it.
Then when I switched back to the original Sim card while keeping the second one in, I didn't have a connection anymore.
Seems it gets stuck trying to use the secondary sim card even if it's off.
Solution: Remove the secondary card.


text:
Trackpad in landscape
Did anyone by any chance figure out how to make a hardware bluetooth trackpad work properly in landscape mode?
It seems that the system does not change the axis logic for trackpad coordinates when the android device is put in landscape. As a result, the trackpad cannot reach the far right side of the screen.
We have been struggling with this for a while, now, so any feedback would be greatly appreciated.
Thx,
Jan


text:
Is there way to track the location only during a small predefined time window?
I'm looking for an way for an Android phone to record (preferably locally on the device) its GPS position (10-20m accuracy) with a pretty high frequency (e.g. every minute or every 30secs) but ONLY during pre-set time windows, e.g. weekdays between 7:30-8:00 and 13:15-13:45. The rest of the time I want it to do nothing and use no resources.

Is your phone rooted? To stop it an app from using resources will require the phone being rooted if I am not mistaken.

Not rooted and I don't want to. But by "no resources" I didn't mean "absolutely zero". If it hardly uses any battery or mobile data while inactive, I'm happy.

You can try a combination of automation and this app

You can use a combination of Macrodroid and GPS logger for Android to automate the logging process.
Step 1: install apps and configure GPS logger

Install GPS logger for Android and Macrodroid.
Open GPS logger. Give the necessary permissions. Tap the menu, then General options. Select Start app on launch.

Step 2: macro to launch the app

Start Macrodroid, click on Add macro.
In the Triggers tab, select Date/time trigger. Set the day(s) and time when it should run. Click ok.
In the Actions tab, in the Applications section, select Launch application, select GPS logger. Select Exclude from recent apps.
In the Actions tab, in the Device actions section, select Press back, give the appropriate permission, go back select Press back.
Save the macro and give it a name. It will look like the image below.

Step 3: macro to stop the app

Still using Macrodroid, click on Add macro.
In the Triggers tab, select Date/time trigger. Set the day(s) and time when the macro should run and stop the app. Click ok.
In the Actions tab, in the Applications section, select Launch application, select GPS logger. Select Exclude from recent apps.
In the Actions tab, in the Macrodroid specific section, select Wait before next action, set it to 2-3 seconds.
In the Actions tab, in the Applications section, select UI interaction. Give the appropriate permission Go back select UI interaction, select Identify in app. Open GPS logger, click the Macrodroid UI notifications on the status bar, then click the Stop logging button of GPS logger.
In the Actions tab, in the Device actions section, select Press back.
In the Actions tab, Applications section, select Kill background process, select GPS logger.
In the Constraints tab, in Device state section, select Application running, give the appropriate permission. Go back to the macro, select Application running, select Alive in background
Save the macro and give it a name. It will look like the image below.

The first macro starts the app  at the selected days and time while the second stops it by pressing the Stop logging button, then kill it from running in the background at the selected days and time. Make sure that in step 5 of the second macro, Stop logging is selected and not Start logging. If when selecting Stop logging, Start logging is instead selected, then select Start logging instead of Start logging.

@esQmo_ Ton assomption est correcte.


text:
OnePlus 6t bootloop
My OnePlus starts with its normal android animation of the two dots revolving around the red dot but however the two dots freeze and after some time restarts again.
I downloaded the stock rom version 9.0.16 and tried to flash it using fastboot update /path/to/mystockfile.zip but it says
--------------------------------------------
Bootloader Version...:
Baseband Version.....:
Serial Number........: 1f1887f2
--------------------------------------------
archive does not contain 'android-info.txt'
fastboot: error: could not read android-info.txt

That must be a recovery flashable zip, not meant to be flashed through fastboot.


text:
Google Play Services Keeps Stopping, I've tried everything
I can't get any of my apps to work. I've tried
clearing the data & restarting - works for 10 min then back to square one
force stopping - won't let me
uninstalling updates - it tells me it's unsuccessful
Disabling google play, reenabling, then restarting - still nothing
What else can I do? This is so frustrating.

try factory reset

I had the same problem today (just after updating my phone) and eventually found a way to uninstall Google Play Services updates, thanks to the thread in Google Play Help Forum:

I was able to fix the issue today, by uninstalling the Google Play Services updates. Could only do that after making sure 'Find My Phone' was no longer a device administrator. Steps I followed:

Go to Settings -> Lock screen and security -> Other security settings -> Device Administrators
Uncheck 'Find My Device'
Go to Settings -> Apps -> Google Play Services
Tap the vertical ellipsis (3 vertical dots) at the top right -> Uninstall updates
Go to Settings -> Apps -> Google Play
Tap the vertical ellipsis (3 vertical dots) at the top right -> Uninstall updates
Restart phone. At this point the message  "Google Play services keeps stopping" was gone.
Open one of the Google apps (in my case Google Maps)
It complains that "Google Play services" is outdated, click the popup to update it again. Problem solved. Really happy to have my phone back ;)

It worked for me (no more error messages, and now I can use again apps such as Google Play Store, Google Maps, etc)

Thank you!  I, too, had tried all the other fixes, and I couldn't get this one to work either for a while, until I found the right place to disable "Find my Phone."  For me, it was here:  Settings --> Biometrics and Security --> Other Security Settings --> Device Admin Apps


text:
How can I restart my Samsung S9 phone without the power button or any other physical button?
How can I restart my Samsung S9 phone without the power button or any other physical button, and without rooting my phone? I only want to use the tactile screen.

On unrooted phones there seems to be a possibility for a device manager app to initiate a reboot (on Android 7+). However in PlayStore there seem to be only apps that reboot using root permissions.

@Robert thanks interesting

If your power menu shows reboot option too, this can work: restart Android phone when power button stopped working


text:
How to set individual sensitive content hide in android 9
Before using Android 9 I was able to set individual sensitive hide content on lock screen rule app by app. Something like, globally I selected Show All notification on the lock screen and then go to the specific app and set hide sensitive content on the lock screen.
In android 9 stock android, I can do this, but the individual settings do not work, it still keeps showing sensitive contents on the lock screen. More specifically, when I am using WhatsApp or Messenger, It displays the message content on the lock screen even though I have set hide sensitive content on the lock screen. Is that a bug?

AFAIK, since Android 8.0 Oreo, each app can have multiple notification channels for different types of notification. Have you checked the setting for each channel?

How can I check this?


text:
duplicate files in categories>documents
I have a Huawei GR5 2017 BLL-L22 cell phone running Android 7. There are duplicate files under Categories>Documents. For example, There are two "birthday 9-10.txt", both having the exact same date, time and file size. Another example: "18614_20190915 financial.xlsx". Again, same date, time, and file size. There are more.
The strange thing is if I delete the duplicate, leaving only one copy of them. Not before long, the duplicate comes back. I'm not using Cloud. I don't synchronize anything. Who or what is making the duplicate and how do I stop it?

Your media database (maintained by the Android Media Service app) seems to be corrupt. You can clear the app data of the Android Media Service to enforce the database to be built completely new.

I can't find that app on my cell phone.

This is a system app that is not visible in the launcher app menu. You have to open the Android settings and there the app list. On some devices you additionally have to select in the menu to show all applications including system apps.If you still don't find use AppInspector and search for the app com.android.providers.media.

I opened: Settings>Apps. Couldn't find it. I then downloaded AppInspector and ran it. Still, did not see it. The closest thing I found is com.android.providers.partnerbookmarks. There is nothing else under com.android.providers.


text:
Philips Android TV 43PUT7791/v1 boot loop issue
I have Philips Android TV 43PUT7791/V7 which stuck at logo and rebooting continuously. I want to enter into recovery mode . I have tried with pressing and hold  down key and plugged the power and waited for 1 minute and also tried combination present in joystick keys.
Kindly, someone help me to enter into recovery mode.


text:
Red-and-White Megaphone App coming up unsolicited
For about a month, an unknown app has been occasionally coming up on my cell phone's screen, interrupting whatever I'm doing, displaying a black screen and that rolling circle in the middle that means I should wait.
It lasts a couple seconds or more, then leaves without a trace, returning focus to whatever I was doing before.
When it lasts a little longer, I'm able to press that lower-left button that "zooms out" to all open apps, each with its logo on the top. I'm then able to close it, or take a screenshot.
The logo of our mystery app is a red-and-white megaphone, which I do not recognize. See attached screenshot.

That logo does not appear in the list of all installed apps.
The timing seems to be random.
What is this app, what is it doing, and how do I get rid of it?
The phone is a Samsung Galaxy S9+
I'm running Android version 9
The phone has served me flawlessly for over a year before getting this issue.
I do have many apps installed, some of which are ad-supported games. They all either came preinstalled, or came from the Google App Store.

Do you happen to be near your PC when this happens, because troubleshooting requires it? Setup [tag:adb] in your PC, and whenever this issue occurs again, run these three commands:adb shell dumpsys window windows > windows.txt, adb shell dumpsys activity activities > activities.txt, adb shell dumpsys activity recents > recents.txt. Upload these three files somewhere on pastebin or add their content into your question.


text:
Android 9 app pinning not working
My LG V35 was recently upgraded to Android 9 and after the upgrade app pinning stopped working. I can pin an app but it gets unpinned by the OS and removed from the list of my recent apps. This was never a problem with Android 8 before the update. Any app I pinned before the upgrade stayed permanently pinned even after restarting.
I tried adding apps I want to stay pinned to the list of power saving exclusions but that did not help.
Any ideas how to fix this or is this "normal" OS behavior with Pie?
Edit: This question is not about screen pinning, it is about app pinning (the little pin shown on the app title bar when app list is open).

I am also running android 9 on my moto x4. Tested this, set screen pin from settings. Tapping navigation buttons remains to same screen. Locked phone, and while unlock device shows pinned screen as lock screen. But, on reboot, you'll lose pinned screen.

@RahulGopi Thanks for the comment but the question was not about screen pinning, it was about app pinning (the little pin shown on the app itself when app list is open).


text:
Cast screen on Samsung Television from Moto G7
I have a Samsung smart TV. I want to cast the screen of my Moto G7 Power running Android 9 onto the TV. I have made sure that the TV and the cell phone are on the same Wi-Fi system. When I go to Connected Devices -> Connection preferences -> Cast, then I can't find my TV there. However, when I try the same thing with my Nokia 6.1 Plus then I can find my TV there and can easily cast my screen. Also, when I cast from within the Youtube app on Moto G7, then I can find my TV and can successfully cast just the video being played on the app (but this doesn't cast the entire screen). Has anyone experienced something similar? is there some settings that I need to change to be able to cast the entire screen of my Moto G7?
Also, I don't own a Chromecast and don't want to purchase one either. I want to make my Moto work the same way the Nokia does.

May be this a problem of the display resolution? The Moto G7 Power has 1570 x 720 and the Nokia 6.1 has 1920 x 1080. The latter therefore exactly matches a Full-HD TV resolution.

Thanks! But that still sounds less plausible explanation because (1) it works from within Youtube app (2) the TV doesn't even appear when I search for devices from within the Cast feature of the phone. I would guess that in case of such an incompatibility (as you suggest) I should have received an error message after I try to pair the devices.

Youtube provides different streams with different resolutions, independently of your phone screen size. All those streams are compatible to a common resolution like FullHD. Therefore the Youtube cast stream will be totally different to the one generated by casting your screen.

Edit your post to include the model number of Samsung Smart TV (even firmware version if possible). I've had issues with my Samsung Smart TV not being found/not behaving correctly and my "fix" is to unplug the TV, wait 30 sec, plug it back in. You may want to try that with each phone (i.e. pair & cast after TV reboot) and see if it does anything.

In order to mirror your Motorola smartphone's screen onto a Samsung smart TV (assuming both devices are equipped with the necessary features, some are not) you must connect the devices together using WiFi Direct.
I have no idea why this is the only way it works. I wish that the manufacturers (product & feature designers) of our (smart) devices would understand that in order for features to be useful for their customers, they MUST actually work. A fundamental & crucial aspect of functionality (working) is compatibility across devices, brands & OSes/OS versions. If proprietary features exist only compatible with the same brand and they functionally replace some feature or capability native in the OS, that is asinine & unhelpful.
The solution/workaround to this discrepancy is very inconvenient. This is also completely unnecessary. The designers could have simply used the features incorporated in the OS. Or they could have tested their devices and come up with patches to resolve the issue.


text:
Rocket.Chat GCM notifications not showing in LineageOS 16
I am running a Rocket.Chat server of my own and everything works fine with almost all mobile device clients (official 3.5.0) using it. So GCM and gateway (gateway.rocket.chat) work as should and notifications are showing correctly.
Except one phone that has LineageOS 16 flashed is not showing Rocket.Chat notifications although every other aspect do work with the app.
is this a known issue with LineageOS 16? If not how could I find out what is going wrong? So howto fix it or is it even possible?
I did try to search but did not find any relevant information about this issue yet.

Have you installed only LineageOS or also the Open GApps (pico package or more) ? Without the Google Services installed no Firebase Cloud Messaging (FCM/GCM) is possible. See also https://rocket.chat/docs/administrator-guides/notifications/push-notifications/

@Robert, you got it right. I did some research and understood that there is a need for some impl. for Google services that is not incl. in LineageOS. I ended up to flash LineageOS for microG and with some additional not-so-straightforward configuration it seems to work now. I'll check Open GApps also and try to prepare an answer hoping it helps others.

Typical messaging apps like Rocket.Chat use Firebase Cloud Messaging (FCM formerly known as GCM) for retrieving notifications of new messages from the server.
An Android side FCM required the Google Play Services app.
However LineageOS does not include any Google apps by default. Therefore all apps that use push notifications via Google/FCM will not work correctly.
If you want to use an app that uses push notification via Google you have to install the Google apps, for example by flashing one of the Open GApps packages - at least the "pico package".
Afterwards you will be able to retrieve push notifications.

Flashed latest plain LineageOS 16 and installed GApps pico with TRWP recovery. Could not get GApps App working (maybe needs rooting). It works now. Thanks.

@pirho: Google blocks usage of user visible GApps on custom ROMs by default. You have to white-list your device to make it work: https://www.phonearena.com/news/Register-custom-ROM-Google-apps-and-services-Android-certified-support_id104243


text:
How to downgrade from Android 10?
Android 10 is extremely unstable on my Pixel XL. Most apps crashed within a few seconds after open, even including Google Play Store. That means, I could not do any new app install, because Google Play Store crashes within 3 seconds; I could not do any app update, because it crashes within 3 seconds.
And the chat/phone call of Support function in Settings disappear. That means I have no more support.
I could not take screenshot, because it crashes.
Any idea how to downgrade from Android 10 without any data loss without any app reinstallation, just like the way we do the upgrade install (we do not need to do any backup)?

Your firmware might be downgrade protected because of security risks, and even if it doesn't, downgrading with dirty flashing (not deleting user data) would most likely cause boot issue or the crash issues you are having (because of the downgraded Android unable to make sense of existing data from a futuristic Android). For example, say if contacts database structure was updated in Android 10 than Android 9's contacts manager would not understand it and simply crash on the screen. Btw, you can't downgrade without an unlocked bootloader either.

Point is, you can only do a factory reset at this stage to fix your problems or dig deeper using [tag:logcat] to find the problems  but with the hope that you won't be able to fix the problem without reset either


text:
My wife can cast videos from her phone to our Chromecast, but I can't. What gives?
She has a Samsung Galaxy Note 8, while I have a Google Pixel 3. I can cast if the app in question (e.g. YouTube or Hulu) supports casting with a built-in cast button, but if I used the system screen mirroring cast feature from the pull-down menu (say, for an app that doesn't support casting internally, such as Spectrum), I can't cast videos - the part of the screen where the video is appears black on the TV. This sounds like some sort of DRM issue, but why would it only affect my phone and not hers? Is there any way to cast videos from my phone?

Is your device rooted or at least its bootloader, unlocked?

It's not rooted, and I don't think I unlocked the bootloader (I don't even know what that means); do Pixels come with pre-unlocked bootloaders, perhaps? Does installing a custom launcher such as Nova count as unlocking the bootloader?

Videos are usually decoded in hardware and directly written to the frame buffer (special graphics memory). The screen cast is generated by different memory region and therefore does not include the video. This effect is common to all hardware accelerated video players, even on a PC/Windows this is the case.

Hmm, I wonder why my wife's phone would be able to cast videos, then? Does the Note 8 render videos in software, perhaps? Is there a flag i can set to make my phone do the same thing?

@ekolis May be the graphics driver on the Note 8 works different and provides a deeper access for the screen cast component that includes the decoded video?


text:
What are the possible locations that a game can store coins/gold count?
I've a rooted phone along with FX File Explorer and Root add-on. I also have the following apps installed on the phone:

SB Game Hacker
Game Killer

When trying to modify the values of gold/coins in game, I've come across 3 use cases so far.
Case 1:

I open the game and note down the current value of coins I have.
Then I open the SB/GameKiller app and search for that value.
Then I go back into the game and decrease/increase the coins.
Back to the SB/GameKiller app and re-scan for the modified value.
I repeat the process until I'm down to about 5-10 results after which I modify the value in SB/GameKiller app to a value of my liking.
After this, when I go back into the game, the new value gets reflected
SUCCESS

Case 2:

Case 1 fails (where the final modified value doesn't get reflected in the game).
So I go to /data/data/<game package folder>/ folder.
I usually find a .json file which contains the value of coins/gold.
I change the value and save the .json file and go back into the game.
SUCCESS

Case 3:

Case 1 fails and I do not find any .json file
I try to look for a database folder/file inside the same /data/data/<game package folder>/ path but do not find one

In this case, where can a game be possibly storing this value and fetching it from? It can't be a server because I play the game without being connected to the internet. So my best assumption is that the value is stored locally.
Any suggestions?

I'd recommend decompiling the apk using apktool or any other tool.
Then search in .java files for strings containing "\" or "/" .
It's time taking but worth a try.

In media,simcard,sdcard,data,dcim,plyprfs,appl.data,android,.profig.os,
com.facebook.orca-katana,it's a virtual file there's a bunch of places it could be hiding ✌

I doubt that. It was standard installation (not on the sd card but internal memory) so I don't think it would be anywhere except the /data/data/ folder.


text:
Samsung Pay not working with an Indian Card on a Galaxy Note 8 purchased in Hong Kong
Don't know where to ask so asking it here.
I have an Galaxy Note 8 which was purchased from Hong Kong long back.
I want to use Samsung Pay on it but no Indian Cards are working.
I am pretty sure this is because of purchase location, because my dad has S10+ bought in India and S Pay works flawlessly with Indian Cards.
So is there any by which i can use S Pay

Which version of Android is the Galaxy Note 8 running?

@MorrisonChang Android version 9.


text:
Android emulator can't find the wayland QT plugin
Trying to run the Android emulator on Wayland (Fedora 30) gives me the following error:
statvfs('/home/user/.android/avd/Pixel_3a_29.avd/snapshots/default_boot/ram.img') failed: No such file or directory
Warning: Could not find the Qt platform plugin "wayland" in "/home/user/android/sdk/emulator/lib64/qt/plugins" ((null):0, (null))
emulator: INFO: QtLogger.cpp:66: Warning: Could not find the Qt platform plugin "wayland" in "/home/user/android/sdk/emulator/lib64/qt/plugins" ((null):0, (null))

Any suggestions on how to resolve the issue?

Even if the AndroidEmulator is involved this is more a Linux/Wayland, problem. You should better ask this question on a Linux related StackExchange site or forum.

To debug this issue, start the emulator on the command line. For example:
~/Android/Sdk/emulator/emulator -avd Pixel_3a_API_30

(To list all available AVDs, use emulator -list-avds.)
In your case, you have probably set the QT_QPA_PLATFORM=wayland env variable, but Android Studio seems to bundle their own platform plugins,
which don't include wayland, only xcb. This results in the following error message:
...
INFO    | Warning: Could not find the Qt platform plugin "wayland" in "/home/username/Android/Sdk/emulator/lib64/qt/plugins" ((null):0, (null))
...

This works for me:
QT_QPA_PLATFORM=xcb ~/Android/Sdk/emulator/emulator -avd Pixel_3a_API_30


text:
Access Apps without unlocking
I have many different apps that require security, so I obviously do not want to leave my phone unlocked.  However, when using Map My Run or other apps, it is incredibly difficult to unlock the phone when I have to access the app (especially after running 5 miles and winded).
Is there a way to make some apps accessible without having to unlock the phone?

An app only can mark itself to be shown on top of the lock screen. In detail there is the flag FLAG_SHOW_WHEN_LOCKED respectively the method setShowWhenLocked that allows to mark a certain activity/screen to be shown on top of the lock screen.
This allows to use the screen without having to unlock the device. However this has to be done by the app itself. External apps can't enable this.
If your favorite apps does not support this feature you can ans the app developers if they add this feature.
And also the Android system does not allow to mark apps to shown above the lock screen. May be because this would cause a serious problem: With the app shown on top you can't unlock the device and therefore can't change back the "app on top" setting so that your device reverts to the regular state.
Alternatively there are ways to temporarily disable the automatic device lock (Google calls it "automatic unlock"). This can be achieved e.g by defining a trusted Bluetooth device that acts as a "key". If the key is next to the phone it does not lock.
See more details here: https://support.google.com/android/answer/9075927?hl=en

You can certainly unlock the phone while an app is running (like Google Maps works while the phone is locked). Using the fingerprint reader to unlock the phone will show a small popup when trying to unlock on my S9+ and will unlock the app switcher for example.


text:
How to check if custom ROM supports encryption?
First solution which is coming to my mind is install custom ROM and encrypt /data partition. But it always take time. I'm wondering if there's quicker method like download custom ROM, extract system image, then extract files from system image file and looking for encryption support in system files like *.rc which are in root file system. Is there any other way to checking?

FDE/FBE is almost a ready-made solution from AOSP. OEMs and ROM developers usually don't disable it. You can look into logs why the encryption fails. E.g. one reason could be if the filesystem created on userdata partition doesn't leave space for crypto footer.

@IrfanLatif maybe it's TWRP fault when formats userdata before install custom ROM...

Yeah you can check manually size of filesystem and partition to confirm. Or check logcat soon after encryption failure to see what exactly happened.

@IrfanLatif checking logcat on some custom ROMs can be difficult because not all have adb enabled during boot.

Activate logcatd service which saves persistent logs to /data/misc/logd/.

I you would install a custom rom you can ask the maintainer of your rom, usually all custom roms from Android 5 and above Support it, nur maybe your device doesnt Support it in a custom rom. Normally the maintainer of your rom wrote a bug list in the XDA Thread, if that's too uncertain ask the maintainer.

Yeah, it would be nice but maintainer often doesn't respond for a question from users. Custom ROMs that I tried they have option to encrypt storage but it doesn't work. So that's why I'm looking for a more technical solution to check it.


text:
Samsung A20 SM-A205W stuck on download mode
I have a Samsung Galaxy A20 and I was attempting to unlock the bootloader and also install TWRP. While the bootloader was unlocked successfully, while doing the TWRP part I had to use Odin and used an online tutorial to see how to do it. I ended up putting it in Odin's AP section and flashing it....
and that was the last time I saw my A20 working normally...
Now I can't switch it off (unless discharged) and it stays on all the time.
What if I try to switch it off? When switching off is attempted, it shows me the standard Samsung boot-up screen but with a yellow triangular warning sign and red text at the bottom saying "This phone is not running Samsung's official software. You may have problems with features or security, and you won't be able to install security updates." And then I'm back to the download mode screen.
I cannot go to the recovery/bootloader. I have tried pressing the buttons on the phone all at once (i.e. power; volume buttons) with no results.
In the Download Mode screen it shows:
In the middle of the screen: A big download logo with the text "Downloading..." below it and below that, "Do not turn of target". After some blank space below it there is the text "Volume Down Key + Power Key for more than 7 secs : Cancel (restart phone)".
On the top left: There is text in three lines and has a really small size.
Note: A ? indicates incomprehensible letters due to screen layout and a @ indicates unknown number of letters that cannot be viewed there

?ecovery: Error validating footer. (@)
CUSTOM RECOVERY
VBMETA A205WLS2ASG1, 25128537R

By the way the device region is either VMC, VTR or XAC.
Thank you

It sounds like a soft-brick.
To unbrick your device, download stock firmware for your device from sammobile.com and flash it using Odin. Make sure you download the right one for your region.
For more details: See this


text:
What does vga=844 means and what other values are there?
I installed Android-x86 on VirtualBox and find the resolution to be too big, because it causes lags on the virtual device. I wanted to try a smaller resolution and came to the menu.lst file with the vga=844 kernel option.
I tried to look around for a list of valid values, but can't find much information.
So, what other VGA values are there?

https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/svga.rst

The table below lists some Linux vide mode numbers.

As stated here:

The mode you wish to use is derived from the
  VESA mode number. Here are those VESA mode numbers:

  | 640x480  800x600  1024x768 1280x1024

----+-------------------------------------
256 |  0x101    0x103    0x105    0x107
32k |  0x110    0x113    0x116    0x119
64k |  0x111    0x114    0x117    0x11A
16M |  0x112    0x115    0x118    0x11B

The video mode number of the Linux kernel is the VESA mode number plus
  0x200.
Linux_kernel_mode_number = VESA_mode_number + 0x200
So the table for the Kernel mode numbers are:

    | 640x480  800x600  1024x768 1280x1024
----+-------------------------------------
256 |  0x301    0x303    0x305    0x307
32k |  0x310    0x313    0x316    0x319
64k |  0x311    0x314    0x317    0x31A
16M |  0x312    0x315    0x318    0x31B

Very informative, thanks!


text:
is it possible to activate usb debugging using adb command line?
i have xiaomi phone and forget mi account. so i try to restore it using factory reset. i try to enabling USB debuging then. but it says "developer option is not avaiable for this user". adb is active. my question is "is it possibe to activate usb debugging using adb command, and how?" thanks

Can you see your device listed after running adb devices command?

Please add some screenshots.

yes. my devices is listed on adb devices command. but now i cant get in to my phone. it is locked and ask for activating mi account. maybe i will try to flash it.

It's chicken or the egg situation. USB Debugging enables you to use Android Debugging Bridge (adb). And you want to activate USB Debugging using adb.

If the usb debugging is off. Your device won't appear in adb devices list.
So you cannot turn it on any other way than opening the developer options and manually enabling it.

YES you can switch on USB debugging through ADB provided you bootlaoder is unlocked.
Just have to pull few files ---> edit them ---> Push them back.
It is explained on Github:
https://gist.github.com/pantasio/3d0eb4bb03a1e696aae8696f60730859#file-enable-usb-debug-adb

Since Android 9 /data/property/persist.sys.usb.config no more exists. Now there's only one file: /data/property/persistent_properties. And that too isn't plain text but includes arbitrary characters. Even after editing that, adb authentication won't work without extra steps.


text:
Error after error in booting and in recovery mood
My tablet brand is ASUS and its android's version is 5.0.1. It shows many error  likes Unfortunately com.android.setings has stopped, Unfortunately UI has stopped, Unfortunately Launcher has stopped frequently. Sometimes when I restart it, it doesn't show my desktop. Also its reset to factory doesn't works properly (it just reset the time of tablet).
I have cleared the cache and data of setting but errors persists.
So I decided to recover my android. After holding power button and + volume, I chose recover option and it got to the recovery page. after 5-7 seconds the error appeared with death android icon and just the word "error" as its caption.

How to recover my android? what files I need? What is the adb?

Please note that my (android of) tablet is not longer supported by ASUS Inc. Also I have reset my android to factory setting 1 month ago successfully.

Can you share the exact model of your tablet and some more details about it. If it's rooter or not?

No it is not rooter. My tablet model number: K019 (2014).

In my opinion an update of Google Play Services cause an error on your tablet and since everything is tied to that it's keep crashing.

I have downloaded My tablet driver from ASUS website and then the following ADB command in boot menu resolved the problem completely. (notice that it removes user data I think!)
adb sideload <filename>


text:
Which process is responsible for capturing (mobile/WiFi) data usage?
The problem is that it is broken for me. I customized quite a bit, specifically installing a firewall that uses root and disabling broadcast receivers and services in many Huawei and Google apps that came preinstalled. I guess one of these must be responsible for capturing how much data flows over each interface and from which app it originates, since the feature broke.
Which process (on any Android phone, I can probably find the equivalent once I know where to look) is responsible for doing this?

So your "settings -> data" isn't tracking right?

@rogerdpack Yes

DataUsageController (a component of Settings app) collects data from NetworkStatsService (1) which is part of Android framework i.e. system_server and depends on (2) TrafficController (a component of netd native service) which in turn uses libqtaguid to tag network sockets on per app/UID basis. Previously qtaguid kernel module was used to track tagged sockets (by reading “/proc/net/xt_qtaguid/stats” (3)) which is being replaced with eBPF framework. Now data usage will be available in a virtual filesystem (“/sys/fs/bpf/traffic_uid_stats_map” (4)).
Network policy restrictions (Data/Battery Saver and Background Data (5)) and Data Limit/Warning are implemented mainly by NetworkPolicyManager and NetworkManagementService. At back end netd inserts/deletes iptables rules (6) to enforce restrictions in kernel space.
Both qtaguid (7) and quota2 modules are part of only Android kernel (8) while owner is part of mainline Linux kernel.
RELATED: How to view network traffic requested by a specific app?

REFERENCES:
1. The one we can access with dumpsys netstats
2. Through NetworkStatsManager / TrafficStats / SocketTagger, JNI NetworkManagementSocketTagger, libcutils (qtaguid), NetdClient, Netd's FwmarkServer and possibly others
5. Can be read / set by dumpsys netpolicy and cmd netpolicy
6. Using modules owner and quota2
7. Based on owner module and depends on socket module

Woa, I had never expected such a detailed answer since it's very niche. Very glad I decided to ask the question anyway. Thanks a lot! I'm going to dive into this, but just catting /proc/net/xt_qtaguid/stats it looks like this is the usage data I'm looking for and it's just the settings data usage screen that is broken (I can parse csvs manually, no problem). Just gotta figure out over which period this tracking is and what all the columns mean (like cnt_set). I'll dive into this when I have some time in a few hours :)


text:
How to easily switch keyboards on Android 9 (MIUI)
My old phone (Android 8 I believe) showed a little icon on bottom right side to allow switching keyboards, from Gboard to Hackers' keyboard or else.

My new phone on Android 9 (also a new brand, Xiaomi, MIUI) after installing several keyboards, does not show the switch.
Does someone know how to switch keyboards easily on Xiaomi's Android 9 (as I could do previously on older Android) without having to go everytime into Configuration menus.

Welcome to Android Enthustiasts! Are the other keyboard enabled?

Thanks! Yes, I am able to switch keyboards from the configuration menu unless I misunderstood what enabled is.

To switch between different languages in Gboard (keyboard visible in the screenshot in the question) —

Long press on the spacebar
(In much older versions of Gboard, you could also switch between different installed keyboards this way, but that feature disappeared long back.)
Use the language switch key (the globe-like icon on the left of the spacebar)

To switch to another installed keyboard —

Go to Settings → Additional Settings → Languages & Input → Current Keyboard → Choose Keyboards
Make sure that the keyboard that you want to use is enabled.

Now, navigate to any text input and start typing with your current keyboard
You should see a notification from Android System, that says Choose keyboard
(Note: This notification lasts only until your current keyboard is open, so you have to open the notification panel, without closing the keyboard, to see this notification.)

Tap on this notification and you should be able to choose your other keyboard in the menu

I think the second part of your answer is what the OP asked.

I thought the same, but I mentioned both, just to be clear.

Thanks! That was it! I did not know about the notification to change keyboard, that worked here. A thousand thanks!

Did you mean this?

First, you go to Settings > Apps > Manage Apps > Select 3 dots on the top right corner > Show All Apps.
Then find the Android System, search notification name "Virtual Keyboard."

I did not see the option to switch keyboards because I forgot that I blocked the notification for keyboard input. I fixed it by following these steps:

Go to Settings > Apps > Manage Apps
Tap on the three dots on the top right corner and select Show All Apps
Find and tap on Android System
Tap on Notifications and scroll down to Virtual Keyboard
Enable the notifications for Virtual Keyboard

Long press space. All keyboard options will display. Choose the one you want.


text:
Uninstall MirrorGo Keyboard
I installed the MirrorGo (Stream & Recorder) app from the Play Store to try but uninstalled it over privacy concerns in my Android 10. Everything looks fine, but recently I discovered it still left some traces in the device. When I checked the virtual keyboards in Language & input settings, I found the MirrorGo keyboard is still available.

I tried checking the list of all apps on the mobile and couldn't find anything related to that. How do I remove that from my device?
Device: Pixel 3;
Android Version: 10 / Android Q;
Device status: Unrooted;

Can you setup [tag:adb], then run the command adb shell dumpsys input_method > input_method.txt and upload the content of the file input_method.txt in the question (by [edit]ing it)?

I reset the mobile now which resolved the issue in the hardway. BTW thank you Firelord.

Long click on the keyboard, and it shall show an option to remove the keyboard. In your Apps section in settings, there should be apps like MirrorGo Connector, which you can simply uninstall. However, for a full clean you shall require root.

I tried long click option but it not giving any options and also I checked list of all apps in the device but none related to MirrorGo app.

Any app starting with Wondershare or ending with the name Connector? Those could be possible culprits. Also Wondershare has the upper edge if it used USB debugging. Just in case, you should turn off USB debugging and revoke authorization if it is turned on.

Yeah I gone through every app. Nothing related to Wondershare. I did give USB debugging permissions at the time I tried the app. I just reset the mobile now. BTW Thank you.

There is an app called "connector". It has the same icon that mirrorgo keyboard has. You can find it in the apps settings and uninstall it. It makes mirrorgo keyboard disappear.


text:
No images from SD card are shown in PTP mode
I have ASUS ZenFone Max Pro M2 with latest updates installed (Android 9, 070 firmware version)
I try to connect my phone to PC (Arch Linux 64 bit, Cinnamon DE, Nemo file manager, latest updates installed, gvfs-gphoto2 and gvfs-mtp packages are installed too).
When I connect my phone via USB it suggests different modes for connection: charging, MIDI, modem, file transfer and PTP (strange thing: where is MTP?). When I choose file transfer I can see the whole directory structure for SD card and for internal storage, that just works fine.
However, when I select PTP mode I can see only directtories from internal storage (e. g. DCIM, Instagram etc) and no dirs from SD card. I already have DCIM/Camera directory tree on SD card and camera app saves photos and videos to it properly.
I tried to clear cache & data for External storage and Media storage apps and reboot but nothing changed - still no directories from SD card are shown when I select my device in Nemo file manager.
How can I enable access to SD card in PTP mode? Additionally, where is MTP mode and how I can enable it?
EDIT 1: seems like "File Transfer" is synonym for MTP

File Transfer must be the MTP mode. I don't think Android provides any other method for file transfer. Not sure about PTP how it's implemented.

Yes, seems like "File Transfer" is MTP actually - in Nemo I see mtp:// prefix in address bar while connecting in File Transfer mode


text:
How can I run chroot on Android?
I have my chroot environment setup (Alpine Linux) in /sdcard/alpine. I try running my chroot with the following commands:
su
chroot alpine /bin/busybox

(busybox is the cli of Alpine)
I get the following error:
chroot: exec /bin/busybox: Permission denied.

How can I fix this?
My device specs:
Google Pixel XL (marlin)
Android 9.0
Rooted (obviously) with Magisk

Binaries can't be executed on /sdcard because it's an emulated filesystem with fixed file permissions, mounted with noexec mount option. Create alpine directory on some other filesystem e.g. /data:
~# mkdir -p /data/local/tmp/alpine/bin

Place your executable in newly created directory and do chroot:
~# cd /data/local/tmp
~# chmod 0755 alpine/bin/busybox
~# chroot alpine /bin/busybox sh

This will drop you to a root shell (UID 0) with changed root (/).

Since e.g. Termux is an app, and apps' data live under /data, the OP might be able to perform the whole procedure there.

@DeathMaskSalesman right


text:
Hiding WhatsApp display picture of a certain user
I have Android 9 in my phone and have WhatsApp version 2.19.258 installed on it.
Now, I wish to hide/change the display picture of a certain contact, say Mr. Alex on my phone. How do I go about doing it?
Thanks!

You can't change someone else's profile picture on WhatsApp. You can only change your own. There was a bug in WhatsApp that used to show whatever photo you add to the contact in your phone's contacts app instead of their actual profile picture on WhatsApp but now it's fixed I guess.


text:
Chrome Uses Background Data Despite Its Background Data Has Been DISALLOWED in Android Setups
Android Chrome eats LOTS of background mobile data on my phone. This is despite the fact that in Android setups I DISALLOWED Chrome to use background data (i.e., Settings -> Connections -> Data usage -> Mobile data usage -> Chrome -> the toggle "Allow background data usage" is "off").
UPDATE: My mobile data usage comes from a single web site where I listen to audio books.  I keep only that single tab open in Chrome.  Normal data usage from that site is around 0.5 ... 1 MB foreground data per minute and zero background data.  However, on some random days (every 2-5 days) I find that Chrome used up LOTS of background data, at a rate around 10 ... 30 MB background data per minute.
Just happened another time today Sept 25, 2019, see the following two screenshots.  The time difference between them is 8 minutes.  In those 8 minutes, Chrome (with a single tab open), used 10 MB foreground data and 130 MB (!) of background data.  This, despite the fact that "Allow background data usage" toggle was "off".

See the attached image: a Sept. 18 2019 screenshot of data usage by Chrome. Note that between September 8th and 18th, Chrome used 1.8 GB background mobile data in addition to using 0.2 GB foreground mobile data. The toggle "Allow background data usage" has been "off" since before Sept. 8th.
My phone: Samsung S7 SM-G930T T-Mobile with latest T-Mobile stock Android 8.0 load.
Any help would be appreciated!

Looks like you have a rogue script on a page... It can happen. That background data usage restriction is a little fuzzy, as even when tasks are not the active task you see, that doesn't necessarily mean they are in the background until the kernel decides they are. Sometimes an app can get stuck doing something and it never get's "in the background" from the kernel's perspective, even though it isn't right in front of you. Is this a consistent thing, or have you only seen it once? Honestly, I would clear data on Chrome, actively close tabs you don't need, and see if it continues.

@acejavelin, it is a somewhat consistent thing that started around 3 months ago. My monthly Chrome foreground mobile data usage was somewhat level in the last 4 months (0.5GB...1GB); background Chrome mobile data usage jumped from 0.9GB 4 months ago to 2.3GB...2.5GB in the last 3 months. My main Chrome mobile data usage over this whole period is listening to audiobooks from the same web site, roughly 20...30 hrs per month.

@acejavelin , I did have multiple Chrome tabs open. From now on I'll have only 1 tab open when listening audiobooks; I'll monitor data usage and will report my findings. Still I can't comprehend how Android (as shown in the screenshot in the OP) shows non-zero background data usage for Chrome while the slider "Allow background data usage" is in the "off" position.

Another spur of background data usage today: within 8 minutes, Chrome (with a single tab open where I listened to an audiobook), used 10 MB foreground data and 130 MB of background data.  This, despite the fact that "Allow background data usage" toggle was "off".

I would double check all 'Settings' in Chrome (three dots menu). There is for example a 'Preload pages for faster browsing and searching' in 'Privacy' which may be downloading closed tab content. Also in 'Sync and Google Services' are you syncing account data and/or sending usage statistics back to Google. individually each one may be a 'small' amount of data but collectively it may add up. Otherwise you'll have to setup a WiFi HTTP Proxy (like wireshark) to capture your data to see where it is going.

@Morrison I would use an app like NetMonitor to get an impression of the traffic coming in and out in a certain time. May be you installed accidentally an malicious add-on that now loads hundred of ads in the background (ad fraud).

@MorrisonChang thanks, I've unchecked 'Preload pages for faster browsing and searching'. Under 'Sync and Google Services' I have the following checked on: 'Sync your Chrome data', 'Autocomplete searches and URLs', 'Safe browsing', and 'Make searches and browsing safer'; I'm going to leave them as is because I just don't believe any of them could cause 500 MB traffic per 1 hr. Setting a WiFi HTTP Proxy (like wireshark) is probably above my level...

@Robert thanks, I've added NetMonitor and will try to learn how to use it. It does show IPs to which an app is connected but unfortunately it's not showing traffic data at all. I have a My Data Manager - Data Usage, it shows traffic per app per time period but unfortunately not by IP to which an app is connected -- that would be the thing that I need!


text:
Samsung J5 stuck on Downloading Mode
The big problem it's that the phone doesn't have the power button at all, so I can't use the usual combination (VOLUME DOWN + POWER).
Any idea what can i do?

how do you power it on if it doesn't have a power button?

I have had this problem and I tried the volume buttons option and I don't think there's any other way that's not exclusive to your phone. You might just have to take it the manufacturer


text:
Missing "Manage root accesses" under developer options in LineageOS 16
My phone is Xiaomi Mi 5s Plus 6GB/128GB. After a clean installation (flashed MIUI 9.6.27 first) of official LineageOS 16.0 Sep 19, 2019, I can't find "Manage root accesses" under developer options.
After the format and advanced wipe, I installed LineageOS, Open GApps Pico ARM64 for Android 9.0, and Magisk 19.4. Now all three seem to be working ok, and I was able to grant root access to AdAway and Titanium backup through Magisk. But I couldn't find manage root accesses under developers options.
So I installed addonsu-16.0-arm64-signed.zip from this LineageOS page, through TWRP. Though after a reboot, the manage root accesses option is still missing. It's not even displayed as a greyed-out option, it's just not there. On the "Trust" screen, it says, Root access: Disabled right below SELinux: Enforcing.
I would like to grant root access to ADB. Is it possible through a terminal emulator (on the phone)? Is there any command for it... 'coz I can become root "by su" in the terminal emulator through Magisk.

Official LineageOS 16 ROM doesn't come with "Addon-SU" pre-built. Their installation instructions say to install Addon-SU (separately) from the "extras" page I have linked.
With Magisk, I know I can grant root access to any regular app but how could I grant "Root access to ADB"?

The reason I'd like root access to ADB is, 2 days ago I tried updating LineageOS ROM through TWRP but it failed, and then I couldn't flash new or old Lineage ROM through ADB, as I kept getting this error:
adb: sideload connection failed: insufficient permissions for device: user in plugdev group; are your udev rules wrong?
Even though I was running this adb sideload lineage-16.0-20190719-nightly-natrium-signed.zip command as ROOT user from Ubuntu 19.04. I also tried the same from Windows 10 admin command prompt.
So after a failed LineageOS update:

I couldn't flash new/old Lineage ROM through TWRP,
I couldn't flash any Lineage ROM through ADB.

I had to install MIUI 10 ROM, then format and advanced wipe to install LineageOS back again. So now I'm trying to grant root access to ADB to prevent this from happening again.

As I have mentioned earlier, I tried the same through Windows 10 administrator command prompt too, and the result was the same.
As per my understanding, Window 10 does not have "udev rules".

This is how I was running adb sideload command from Ubuntu MATE 19.04 Terminal:
admn@um:~$ sudo su
[sudo] password for admn:
root@um:/home/admn# adb sideload lineage-16.0-20190719-nightly-natrium-signed.zip

Was getting an "insufficient permissions" error.

Here is the "insufficient permissions" error in full detail, where you can see it refers to Android developer website:
root@um:/home/admn/Downloads# adb sideload lineage-16.0-20190919-nightly-natrium-signed.zip
adb: sideload connection failed: insufficient permissions for device: user in plugdev group; are your udev rules wrong?
See [http://developer.android.com/tools/device.html] for more information
adb: trying pre-KitKat sideload method...
adb: pre-KitKat sideload connection failed: insufficient permissions for device: user in plugdev group; are your udev rules wrong?
See [http://developer.android.com/tools/device.html] for more information
root@um:/home/admn/Downloads#

Right on the phone, through TWRP: Now I have updated the same phone for the past two+ years in exact same manner. Almost once a week for two+ years.
Note: Every single time, I always verify sha256sum before transferring the ROM to the phone.
First I transfer the LineageOS ROM into the Download folder of the phone through a USB cable, boot into TWRP > install > find the LineageOS zip.
But this time, first time in two+ years, the update failed with "Error 7".

I tried this route many times, after quite a few reboots, but the installation was not going through.

Now the phone was not booting up normally. It was getting stuck at the LineageOS logo screen for 30+ minutes.

I'm trying to get to this "Manage root accesses" screen:

Of course, this image is not mine but it's from LineageOS.

LineageOS's "AddonSU" is NOT just meant only for userdebug builds. Here's a link to LineageOS installation instructions pages for Natrium (Mi 5s Plus) and Beryllium (Poco F1). Where at the end of a page it says: "(Optional): Root your device by installing LineageOS’ AddonSU, (use the arm64 package) or by using any other method you prefer."
I'm attaching a screenshot:

addonsu is an open source rooting solution from LineageOS. Magisk is another rooting solution. So are/were SuperSU, PHH's SuperUser, CF-Auto-Root and so on. You cannot / don't need to / should not use multiple rooting solutions simultaneously. Magisk - during flashing process - deletes any files related to other rooting solutions, including /system/xbin/su put by addonsu. That must be the reason for Missing “Manage root accesses” under developer options.
If your ROM is pre-built with addonsu (check in Developer Options), you don't need to flash Magisk. If it's not, flash either addonsu or Magisk.

I would like to grant root access to ADB. Is it possible through terminal emulator (on the phone)?
  ...
  With Magisk, I know I can grant root access to any regular app but how could I grant "Root access to ADB"?

ADB daemon (adbd) can be run as root only on userdebug builds* as explained in Why “adb root” does nothing? And that doesn't require rooting your phone.
Magisk can grant root access to shell i.e. when you execute adb shell su, Magisk treats shell (UID: 2000) as a normal app. So “grant root access to ADB” is different from “grant root access to ADB shell”.

I tried updating LineageOS ROM through TWRP but it failed
  ...
  as I kept getting this error:
adb: sideload connection failed: insufficient permissions for device: user in plugdev group; are your udev rules wrong?

The error you have mentioned isn't related to Android but to your Linux OS. When you insert Android device to PC, the device node created in /dev/bus/usb/... must be readable / writable to non-root user, which is usually not. So you either need to run adb server as root:
~$ sudo adb kill-server
~$ sudo adb start-server

Or configure udev to set ownership/permissions of device node as explained here and add yourself to plugdev group (if not already) as explained here.

Even though I was running this adb sideload lineage-16.0-20190719-nightly-natrium-signed.zip command as ROOT user from Ubuntu 19.04.

You executed adb first time without root, so ADB server was running as non-root user. Later running adb with root makes no difference. See documentation here.

So now I'm trying to grant root access to ADB

ADB Sideload is supposed to be run in recovery mode i.e. TWRP in your case. In TWRP, adbd is always running as root. Root is required only when device is running main Android OS. Recovery and Android are two independent OS's. Also don't confuse ADB Daemon with ADB Server.

* As evident from here, LineageOS's addonsu also seems to be working only on userdebug builds (which custom ROMs are mostly).

Thanks for the reply. I have just added "Edit-2" with screenshots, and installation instructions page of LineageOS for Natrium (my phone) and Beryllium (one more as a proof).

@Jags childish questions; did you put device in ADB Sideload mode before doing adb sideload from PC? Are you sure you killed ADB server before running as root? Do adb push and adb shell work? If adb push and flashing on device is also failing, then may be a problem with your filesystems e.g. due to a dying eMMC. Can you mount filesystems (/data, /system, /vendor, /cache) manually in R/W mode without errors? What reason the recovery.log shows for Error 7?

(1) Yes. After formatting and advanced wipe, in TWRP, advanced and sideload, put it into sideload mode. Then from PC side adb sideload. (2) Yes whenever I'm running any critical process, first I login as root by "sudo su", then proceed. (3) As I've mentioned earlier, that was 2 days ago. So now I can't run any test. Since nothing worked from Windows 10 and Ubuntu 19.04, I "clean install" MIUI 10, then Lineageos Sep 19. Typing from the same phone at the moment.

Most importantly, I'm here to find out, how to get that, "Manage Root Accesses" options. That is the purpose of my post. I'm not here to find why Lineageos installation failed first time in 2+ years. Because I formatted, Installed MIUI 10, format again, and LineageOS 16 is working perfectly fine... except root access. Thanks for your help.

Here's a screenshot of what I'm trying to achieve: https://i.imgur.com/l3owFfY.jpg

@Jags all I know about that is already in my answer. Clean flash LineageOS. Don't flash Magisk. Flash addonsu. You should get that option in Dev Options.

Alright thanks, I'm gonna try it in next few days.


text:
Coming back Google Play Services
I have Samsung Galaxy A50 which is my professional smartphone, I use it for work and it is funded by my company. It has some professional software installed in Knox like encrypted e-mail etc.
I am observing problem with Google Play services app/service. I have message coming from time to time saying (translated):
Device Health Services
Enable Google Play Services
Device Health Services app won't work if you do not enable Google Play Services

I've tried to turn off this message by disabling notifications from three apps:

Google Play Service
Device Health Services
FAMOC

This didn't helped. Still I get the same message between few minutes to few hours.
When I click this message I get possibility to enable or stop Google Play Services but the enable button does not work - it does nothing or sometimes is disabled. From this screen it is obvious that the app is stopped. However when going to Settings menu and below I get info that the app is enabled and working.
Stopping the app also does nearly nothing. Clearing data and/or cache does not help. Downgrade of this app is not possible. Deactivation also is not possible.
The app version is 19.2.75 (100400-269183835). It is the newest as I have other phone and the version on it is the same.
The app does not make any problems, there are no errors.
How can I get rid off this message coming from time to time?

Ok, so I found a solution.
When you block notifications for all 3 apps it is not enough.
You need to hold this specific notification longer and use options there.
Problem solved!


text:
Where is Google's internal account authentication token located?
I'm trying to write a Tasker script for my (rooted) phone that uses the same Google credentials that are being used on my device (for Gmail, Drive, etc.).
Where can I find Google's OAuth (or other) authentication tokens on my device?
I checked inside /data/data/com.google.android.gms/databases but couldn't find anything I could recognize as an authentication token.

The authentication token for Google accounts and of other accounts which uses AccountManager class are stored inside:
/data/system/users/0/accounts.db   # for Android Marshmallow and earlier
/data/system_ce/0/accounts_ce.db   # for Android Nougat and above.

0 implies primary user of the device. If you have secondary user accounts, replace 0 with the user id of that account. To find out the user id follow my answer here.
Note that access to that database requires root access.

For anyone else interested: Here's a command that will get you a token that has access to both Gmail and Google Drive (you need sqlite3): su -c 'uid="$(/system/bin/readlink -f /storage/self/primary | /system/bin/grep -E -o "[0-9]+")"; "${PREFIX}/bin/sqlite3" -readonly "/data/system_ce/${uid-0}/accounts_ce.db" '"\"SELECT authtoken FROM authtokens WHERE type LIKE 'com.google.android.gm:%:oauth2:%https://mail.google.com/ %https://www.googleapis.com/auth/drive %' ORDER BY _id DESC LIMIT 1;\""

@Mehrdad $uid will always be 0 if su switches to root mount namesapce, depends on configuration in root manager app. Also debug builds (most custom ROMs) already have /system/bin/sqlite3.

@IrfanLatif: Oh I see. I actually realized /system/bin/readlink -f /storage/self/primary | /system/bin/grep -E -o \"[0-9]+\" is faster so that's what I'm doing now. Sadly my ROM doesn't have sqlite3 so that one's not an option for me, but thanks!

@Mehrdad if you are using Magisk you can download the sqlite module to get access to sqlite3 binary.


text:
Uber Driver app using too much resources
So, I'm working a bit as a bicycle courier for Uber Eats. For this, I have to use their app Uber Driver.
Problem is, my phone battery (which still holds charge well) is draining very, very fast when using that application. It can run only a handful of hours. Furthermore, discharging/recharging the battery that much would quickly impact its lifespan...
So I have to carry several powerbanks and always have one connected...
It would be so better if the app could just use less resources. Probably some things are badly coded in the app and could be improved, but I'm not a web developer at Uber...
So I'm asking out of desperation, is there anything I could do to make this app use less resources?
(Xiaomi Redmi 5A - LineageOS 15.1)

So, after some use of this Uber app, some elements for answering:

The app keeps the screen on, so I can improve the situation by turning off the screen when I don't need it.
I'm considering upgrading to a phone with a more energy-efficient CPU (from 28 nm to 12 nm), it should help a bit.
I'm having a "lipstick powerbank" plugged in the more possible, to wear it off instead of the phone battery.

I guess that's the best I will be able to achieve…


text:
What reasons would an Android Phone's Network Radio turn off Sporadically
I have an android phone that is experiencing an issue that I suspect is hardware related. Randomly, service will no longer work on the phone and the only way I have found to temporarily resolve the issue is to dial *#*#4636#*#* and manually turn the radio back on. This will restore functionality, but only temporarily. It seems to be indeterminate when it stop working again.
I can't think of a good methodology to pinpoint the issue, so any insight would be helpful

If you are able to turn on immediately by your manual method, then it seems to be a software issue.
Did you try a factory reset? It resolves most of software issues.

I did perform a factory reset and that solved the issue. But in the same way an amputation fixes a hangnail.
I'm still curious what exactly was happening.

Software issues are random and may come up anytime, Especially when there are loopholes (which are many in case of Android, Reference: https://www.scmp.com/tech/social-gadgets/article/1835424/security-loopholes-android-os-social-media-putting-550m-users)
So, These loopholes are main reason of such random problems and these are usually fixed by a factory reset.


text:
call/alert me when I receive an SMS from a VIP
I'm an Australian, and I've signed up to receive SMS alerts at different (unscheduled) times during the USA's day time, which is Australia's night time.
I want to ensure I am alerted when I receive an SMS from them.
Is there a way I can change the sound when I receive an SMS from that VIP?
Ideally, I'd like an alarm that wouldn't stop until I attend to it.
Help appreciated.

Found a partial answer, which will allow you to select a Sound.
But not sure if I can set this sound to repeat until I turn it off.

Tap the Conversation you wish to set a custom notification for.
Tap the three-dot menu icon in the top right corner of the screen.
Tap Details.
Tap Notifications.
Tap Sound.
Tap your desired tone.
Tap the back arrow, or OK or Save if those options appear with your ringtone picking menu.

Source.