text:
Bundled Microsoft apps keep getting updated even though they are disabled
My phone came with several non-uninstallable "factory apps". Three of these are Word, Excel, PowerPoint. Even though I have disabled these, and uninstalled any updates to save space, the updates keep getting re-installed.
How can I find out why this happens and how can I prevent this? The updates take more than 500 MB of space, which I don't want to waste on something I don't use.

More details:

This is a Samsung S7 running Android 8.0.
I disabled updates for these specific apps in Google Play (I had to temporarily re-enable them to be able to do this). I disabled all auto-updates in the Samsung Galaxy Store. There are no other app stores on this phone.
The apps stay disabled, yet updates are still installed for them, taking up storage.
These are the only factory apps that get forcibly updated. Other factory apps that I disabled don't get updated.

Not sure if it helps, but you could try to uninstall them via ADB using adb shell "pm uninstall --user 0 <packageName> (yes, that works for pre-installed apps without root – it basically removes them for the specified user only). As the package manager would no longer list them for your user then, play store should not see them either and thus no longer update them.

@Izzy Do I understand that in order to try this, I must install Android developer tools, which should contain ADB, connect the phone to the computer, then do this? I'm getting really desperate about this ...

Not necessarily the entire developer tools, see: Is there a minimal installation of ADB? Basically, depending on your OS, you'd need just 3-10 files of the bundle, which you can eg find here.


text:
Can libraries share memory as in linux?
Is it possible for libraries to share memory like the shared memory in linux?
(The shared memory feature adopted in System V and later adopted to linux)
Eg: When two apps are working simultaneously and both uses the OkHttp library, is the library loaded into memory twice?

The same shared memory feature is still present in Android, and it works on built-in shared libraries such as OpenGL ES, but it's not used for third-party libraries like you're asking about. Each app that uses a third-party library has to include the library in its APK file. These then aren't shared libraries (in the .so sense): they're just duplicate files which might happen to contain the same code. (Usually they won't contain the same code because different apps will have been built against different versions of the library.)
This avoids possible incompatibilities or security problems caused by updating libraries from different apps. Shared library incompatibilities are a huge problem in GNU/Linux systems. Distributions put a lot of effort into preventing them by testing different combinations of applications and libraries, but they still go wrong sometimes. In Android, where nobody is responsible for making sure that different apps work together, that kind of shared library system would result in apps often breaking when a shared library is updated. Security problems might come about in a system that used shared libraries in this way, because an app might update a shared library to a "newer version" that's actually hacked to leak information or control the app. The libraries would have to be treated as separate packages, signed by the author, just like apps are, and then there would have to be a complex process for handling version updates.

With pre-installed "core libraries" being the exception, I assume?

I don't think that core libraries have an exception in this case.

This is incorrect. Just like Linux, Android creates a copy-on-write mmap of the libraries, the kernel will automatically share the memory for mmap when possible. All core system libraries are also loaded by zygote and shared when a new process is forked. Reference.

@LieRyan The page you're referring to is only talking about the built-in "Android framework" libraries, not third-party libraries like the OP asks about. It's even better than just sharing the binaries: the COW process applies to the whole heap before the zygote fork. The same technique could be used for third-party libraries but in practice doesn't work out well on Android because the (third-party) libraries aren't actually built as shared libraries - they're distinct copies, statically linked. It would have to read the whole binary to know whether the library can be shared or not.

Java doesn't really have statically linked libraries, all classes are dynamically linked. In any case, the reason libraries included in an application don't actually share memory isn't because they're statically linked, but rather because applications ships their own copy of the libraries which then exists as different files in the filesystem. Shared libraries need to be loaded from the same file if they want to share memory. The AOT compiler may also inline library calls, but that's a separate issue.

@LieRyan Yes, that was my original point. If you can think of a better way to describe this that end users will understand, I'd be happy to accept an edit.

@DanHulme you have highlighted a security error in the answer but the shared memory is present in linux without any such errors. Any clarification would be awesome.

source: Stack Exchange

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

sort: votes


text:
What is "Common data service" app in the preinstalled app list?
when I searched for installed app from setting>App then under ALL heading I found the "Commmon data service" app with unknown/suspicious icon.
is it a android pre-installed system app?
or something from unknown sources?
Device is: HTC Desire 620g, dual sim with Android version=kitkat 4.4.2, & Kernel version=3.4.67
pls help..

Since different phones come with different apps pre-installed, you'll need to [edit] your question to say what phone you have and whether you got it from a carrier.

Thank u Dan for the reply, I should have added the device details earlier, however let me know if this particular app is from Android system installation or from HTC. Thanks,

It seems to be a program that enables the device to access data from one app while using another. Like an internal search engine as it were... I'd leave well alone....

Yes I also think so but the main concern is whether this app is a part of Android system or OEM or installed separately from any unknown third party..., thanks,

You say "seems to be". What information is this based on?

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


text:
'Ok Google' auto launch "randomly"
My phone is a Motorola Moto G3. Sometimes, when I'm not using it, 'Ok Google' feature auto launchs and records my voice. I think it could be a bug. Is any workaround to prevent that and not disable the 'Ok Google' voice detection?
Or it's the NSA?

Try disabling the "OK Google detection" feature in the app settings > voice

@esQmo I didn't want to disable the "OK Google" detection. There should be another way to prevent that.

I was experiencing the same issue on Samsung J5, disabling the feature solved the problem.

@esQmo No, because if I do that I will disable that feature, and I want to use it.

This happens only when the headphones are plugged in? or even when they are not.

@esQmo This never happens when the headphones are plugged in. Just sometimes, when the phone is locked.

Seems definitely  like a bug.

it happens for me sometime even in between calls.

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


text:
Will this "SIM Free" Android phone for sale near Osaka (Japan) work in Europe and North America?
Will this "SIM Free" Android phone for sale near Osaka (Japan) work in Europe and North America?
Hello,
So my phone recently went temporarily out of order and then I saw this Asus ZenFone 3 for sale in a second hand shop near Osaka (Japan).
It says "Sim Free" I think but do you guys think it would work in Europe and North America as well?
Vesa

This is the JP/TW variant of ZenFone 3 Max - detailed specs here.
From the listed LTE bands, it's missing the crucial Band 20 (wide coverage) for European countries and main bands for major carriers in the US. You will likely get less-than-stellar LTE coverage out of the device as a result. 3G will still work and likely suffice for most use cases.

So if I am somewhere like in Saigon (Vietnam) where the ISP provides 4G LTE (I think), will it automatically switch to 3G if the phone cannot handle 4G LTE? Or will it not work at all?

By "cannot handle" I mean it will receive weak or no LTE signal - it will then fall back to 3G.

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


text:
Resuming multiple downloads in Chrome
Many sites give all their files the same name. When downloading multiple files like this, Chrome helpfully adds a (1), (2), etc. to the filename. However, if something interrupts the download, such as a full memory or a connection reset, I find that Chrome often refuses to resume the download, on the grounds that "file already exists." Typically these are incomplete files and are useless if the download can not be resumed.
The problem here is not that Chrome is unable to resume the download per se. If you go to downloads you get the option of resuming. The problem is that Chrome refuses to resume a download if a file of that name exists, where 8f it were a new file it would just be renumbered.
Is there any way to get Chrome to finish the downloads in these circumstances?

May be a download manager app that takes over the download from Chrome would better suite your needs?

Downloading abilities of mainstream browsers are not flexible (Chrome, Firefox, Edge, etc). Your best bet is to rely on a download manager app to manage your downloads including mass resuming. Download resume also depend upon whether the server allows that or not.


text:
Is there a reasonably straightforward way to download videos from proprietary web browser players?
I have a Samsung SM-P900 tablet that I bought specifically to watch professional education videos during a long commute. Unfortunately almost immediately after that the videos I want to watch the most, generally relating to statistics and R programming and hosted on the RStudio website, switched from an easily downloadable format to hosting via the Wikia media player. I have been able to download a handful since then by looking at the page code, but it is a lot of work and the rules keep changing, and I have not been able to download the more recent videos to either my tablet or Windows machine with any amount of effort. I've faced similar problems with the JW Player and a few others. All of these videos are free and I want to download them solely for my own use.
My question: Is there a reasonably straightforward way, perhaps involving an app, of capturing such videos that works consistently over time and across  players? It seems like there's got to be a way to interpose a (software) recording device between the player and the screen, but I have not found it. It might need to reassemble streaming video from the pieces that arrive.
My OS is the Resurrection Remix versin of Android 7.1.2.

'Easier' solution: have you tried Firefox on Android and the myriad of video downloader add-ons you can get there? One of them might work. I don't have the time to test them all now but let us know if one works.
'Harder' solution: I tried digging around on that site you gave, on a desktop you just need to fire up dev tools and look for the first .bin file in the network tab (once you start playing the video) then throw it into youtube-dl [url]. Tip: use the search filter to find it. I feel there might be some way to automate this with a Python script or similar.
https://rg3.github.io/youtube-dl/


text:
My huawei phone is not receiving text messages?
My huawei Y3II was working fine and receiving messages without any problem. But, one day I realized that one or two weeks have been passed and I did not got any text message. Then I checked by sending message from another phone but, I did not received. I have not done anything with my phone then, what could be the problem.

Don't know why but this may help 1. Restart the device 2 Clear  cache and data of the Messaging app. If this doesn't help try a different messaging app

How can I clear cache of my messaging app. With what name would I find my messaging app in all apps.

Huawei options are different but from Settings > Apps> Manage or show system apps > messaging> storage you should find clear cache and clear data .  clear cache and if it doesn't help clear data (you would lose existing SMS so back them up by using any app from Play store that does this) If you can't locate try an app like this but you should be able to find it with some search

Factory Reset has solved my problem. This also solved my second problem which was automatically turning off sometimes and then showing 'Starting apps' and taking too much time on it.
->  First of all I saved all my data to sd card and then switched off the phone and took out my sd card.
-> Then I reached to options by pressing power button and volume up button and releasing power button when logo is shown while continuing pressing volume up button.
-> Then I selected wipe data/factory reset option. It took just a few seconds to complete factory reset and then I rebooted the phone.
Reference : https://drfone.wondershare.com/reset-android/wipe-data-factory-reset.html


text:
How can I keep my clock widget work in background?
I use clock widgets. The problem is that when I lock the phone, all applications are killed (except some system applications) including clock widgets. When I unlock my phone then I see that clock widget is stuck on time when I locked phone. I have to restart widget. Please tell me that how can I keep my clock widgets work in background without being killed when the phone is locked.

That shouldn't be the case. Apps shouldn't get killed when you're locking your phone.

My problem is solved. Following link helped me.
http://support.meetviva.com/knowledge_base/topics/huawei-how-to-disable-battery-optimisation-for-the-viva-app#
I opened Phone Manager, then Power saving, then Protected apps and then I turned on the apps which I do not want to close after turning off my screen.


text:
Android 5.1 full phone encryption stuck 12+ hours in
Similar thread to this one.
None of the answers were helpful.

It's an unrooted Android 5.1.
The device has been factory reset.
Once I begin the encryption process, screen is stuck with displaying bare android logo:

Seen pictures on the internet with some progress indication, which is missing in my case, so something must be up:

The phone does not overheat, so the encryption clearly hasn't begun.
I'm able to cancel the process by holding power button for 10s.
Once rebooted, the system is untouched, just as it was before the encryption attempt.
Retried the process with $ adb logcat active on USB.
Nothing suspicious in the logs, although I don't know what to look for too.
Meta: Will delete the link with logs and paste only relevant lines once there's a working solution.


text:
WhatsApp delayed notifications - Force application to run with foreground priority
Is it possible to force an application (e.g. WhatsApp) to run with foreground priority so Android shows notifications (e.g. new messages) of that app as fast as possible?
There are apps that use a persistent notifications to achieve this goal. Is there any way to do the same with apps of your choosing? Maybe through Tasker?
CM13 - GApps (pico) - Xposed - Root

There are some workarounds to use. Is your device tooted by the way?

I had to delete the solution probably its not working as hoped, but I am pretty sure it does on my device, maybe something going on on your device. Goodluck!


text:
Tasker: If variable - not connected to Wifi
I want my display brightness only to rise if not connected to any Wifi network (doesn't mean Wifi has to be turned off) but I can't figure out how exactly the Wifi variables work. The official documentation is very general and technical.
Edit: The problem is that my Wifi is instable which means Android doesn't have Wifi for about 2-3 seconds and then catches it back. So I added a 5 seconds Wait Action so that my display brightness doesn't change every 15 minutes but it happens anyway, only now 5 seconds later.
I think to finally make it work a "If variable" is necessary.

You're going about this the wrong way.
Go to Profiles → (New profile) → State →  Net →  Wifi Connected. Leave SSID blank and tick "Invert". Link this profile to a task which changes brightness.
Edit - Okay, I think I've found the solution. In the task which changes brightness, do this:

Wait for 5 seconds
if %WIFII (matches regex) \bSCAN\b

(Increase brightness)

Explanation: The %WIFII (WiFi info) variable not only gives the name of the WiFi that you are connected to, but also miscellanous information such as Mac and IP address and contains the phrase ">>> CONNECTED <<<". If you are not connected to any particular WiFi, it lists all of the WiFis available along with the phrase ">>> SCAN <<<".
The above task basically

Waits for 5 seconds (adjust accordingly!)
Checks if the %WIFII variable contains the word "SCAN" by means of a regular expression

If it contains "SCAN" it means that the device is NOT connected to a specific WiFi (if was connected, it would have the word "CONNECTED" in it).

Increases brightness accordingly

Note: Might cause problems if there are WiFis with the word "SCAN" in them! You can always change the if condition to something else such as if %WIFII (doesn't match regex) \bCONNECTION\b, or make it more specific for the phrase ">>> SCAN <<<" (I'm still new to regular expressions so I've no idea how to do it).

I already did that. I updated the question.

@Yethat So basically you want the brightness to increase if you are outside, however not when you're inside but disconnected to the unstable WiFi? I think I have a solution, I'll update the answer soon.

@SSS Precisely!

Thank you very much! It works like a charm! And thanks for the good explanation!


text:
Full backup of Moto X
I have a non rooted Moto X (2014), which does not have a SD slot. I am looking for a full backup method which either is over the net or preferably uses an OTG cable to a flash drive.
Helium apparently does not work with Moto X phones.  In this instance I cannot use adb.
A full backup is desired.
Are there any other options?

Mistyped? There's no Moto C in 2014.

You are correct, and I have corrected the typo.

Is the bootloader still locked?

The bootloader says locked, but I believe that the phone should be an unlocked phone.

I've heard of this tool. It doesn't seem to be complicated to use.
Also, I've heard of this one that requires rooting the phone.
Just to let you know, I didn't test them, so I can't say if they meet the expectations. I would choose the first one, because it apparently does not require root (and, the second one is not available in my country). However, since you have already rooted your phone, you can try either one (or maybe any other different app).

To be clear the phone has not been rooted.

I believe I misread it on the question. I believe the answer is still helpful though.

I agree, and I am studying the first tool, to see if it will work for me.


text:
Android Storage Grab
I am having internal memory grab, typically eating about 3gb.  Similar to this problem on a tablet Something is secretly eating up my Acer Iconia A500 internal memory and I need help finding it
However my device is a Moto X second gen.  I though it might be device specific, because after a factory reset and then a reload, I find the memory grabbed sometime later, usually 3 to 5 gb.
Then I saw the same thing happen for 1gb on a Samsung tablet with some of the apps I have on the Moto X.  So I am currently thinking that this is application specific.  However, without a rooted device I find few tools or methods which appear to be able to help me.  Hence my appeal here.
Any suggestions as to how to get to the bottom and resolve this?  Loading apps one at a time could take months, until they are all loaded and the problem pops up again.
I may have to root the device, and then I will look in /data for growing subdirectories.
Addendum 1.  I used another utility, DiskUsage, and saw that there was 5gb in system storage allocated.  It appears that this could be something such as logs or some other cumulative data managed by the system.  So it appears that I will likely have to root the device to dig deeper.

Force the reset and Grab to happen again... After it has grabbed the storage, use this command in Terminal emulator to find what has been added recently... go through them 1 by 1 ...
Also you can use Sort to Sort By Size, and locate the larger files on your Internal Storage...
find /storage/sdcard0/ -mmin -1 (mins)
find /storage/sdcard0/ -mtime -1 (days)


text:
Locating a bluetooth device in a room
There is a bluetooth device out of sight in a room that is paired to my Android smartphone, and I can connect to it when I am close by. (It is a muted audio device.) Are there any methods to locate that device within the room with the use of the smartphone? Say, by dynamically measuring signal strength so that I can move the device around to see where it gets stronger.
Both App downloads, Android Studio( with Java), and other sorts of answers are welcome. (But AS is more appreciated.)

Not really, with a standard Bluetooth device and antenna, there's a lot of really big technical problems, and even physics is against you
You may or may not be aware of BLE and Bluetooth Beacons - there is a BLE Specification called Proximity that allows small bits of data to be sent as Bluetooth Advertisements. Devices can be calibrated and made to interpret these and the RSSIs etc and give a fairly reliable (depends) proximity
There are lots of libraries out there for working with them- and apps. I suggest taking a look at Radius Networks' Altbeacon library, it does all the maths and device specific calibrations that you would otherwise have to do yourself. All the big Beacon Manufacturers have their own though (Kontakt.io, Estimote etc)
Be aware, unless you have a directional mic, BLE should not be considered directional without using some kind of triangulation technique (otherwise you can just say "I am X meters from the device" without knowing if that was up, or behind or whatever)
Also be aware, it's incredibly open to being confounded by other sources of EMF and materials that absorb your waves.
Even more be aware, Smartphone BT Adapters vary wildly, they all log differently, have different nuances and react differently in different situations, but typically it's really good. Some devices like the Nexus 4 should not be used for BT, some hardware kink means the WiFi and BT don't effectively share the Antenna well enough and conflict (also I think the form factor just interferes too)
The best way to position a person or object in a room is by using a mixture of processed and aggregated readings from the device sensors and perhaps even some other hardware in the room. If you look at Google Maps, it doesn't wholly rely on GPS, just like indoor navigation using BLE Beacons shouldn't wholly rely on Bluetooth. Beacons just apply context,
Source: Microlocation developer


text:
How can I export Samsung memos?
Using the built-in Memo app on a Samsung Galaxy Avant, I've created several memo files, and they are saved on the device and synced with my Samsung account.  How can I export the memos as text files, or some other readable file format that lets me get the text into another program (e.g. Google Keep)?

I tried looking in /Android/data/com.samsung.android.app.memo using Android File Transfer, but the only thing there is an empty Cache folder.

i installed 'samsung notes' app. Then i imported all notes from memo(from settings menu of that app). Then synced it to samsung cloud. This way I didnt have to export them one by one. But the problem is I still cant export the memos as text so that I can import to other apps.https://forums.androidcentral.com/samsung-galaxy-s6/587633-export-stock-memo-app-data.html

on a newer version of the samsung notes app, you can export the notes as 'sdoc' files also.

Here, in my opinion, is the best solution for this delemma. I looked everywhere for an answer to no avail. Tried several 3rd party apps for notes, including Evernote, which I didn't like. Get a free Google Drive account if you don't already have one. Then you can go into each Memo, and one by one share your notes (click on three dots) to Google Drive. This goes pretty fast actually. Some Memos you will just want to delete. Google Drive will preserve Memo's formatting (sentence returns) at least, instead of running every line together into one big glob of text (as Evernote will do). And after I did a few of them, it even started saving the Title too, as the name of the note. Now at least you will have access to your notes after you shut your Android down and switch to the iPhone. Then you can copy and paste the most important ones back into your iPhone later — I haven't got to that point yet. I had 95 Memos and was pretty pissed that after all these years, no one at Samsung has figured out how to transfer Memos to an iPhone??? Hope this helps someone.

At the time of this comment, you can actually just share it straight to google-keep.

The following applies to Memo app version 1.0.4517634 on Android 4.4.2.
The memo files are located in /mnt/shell/emulated/0/BeamMemo and have a .memo extension.
Each .memo file is a zip archive that contains a media folder and a memo_content.xml file.  The text of the memo is in the /contents/content node of the xml document.
I was able to find the files using adb, with the command:
adb shell 'ls -Ra 2>/dev/null | grep -i memo'

I was looking for an option to open .memo files transferred from my android based samsung mobile. Transferring was easy since I had only around 25 notes and did that one by one using the bluetooth facility of mobile and laptop.
After getting the files into pc, opening was an issue. Researched a bit and found that each .memo is basically a .zip file, which contains an .xml file as well as a folder for media. Hence, renamed the extension of these .memo to .zip and then unzipped to obtain these resultant files. Out of this, opened the .xml file to read in readable format the contents of my .memo file. Thanks for sharing the info which helped me solve this.

this is the best answer thankyou.  copy the files to your desktop, for me there were in phones root in ShareMemo  just rename the extension, they are a zip file.  then unzip them.  then open the xml files in notepad++.
The date is in Unix Epoch time, search online for an epoch date converter, paste the string in there, grab the real date, overwrite the xml tags with the date, and keep your original text, then resave the file.  delete the zips after...

Depending on your model, Samsung memos usually exist with the following file extensions: .smm, .spd
They exist in the the following folder: /storage/emulated/0/.ActionMemo or SNote Data folder
A suitable workaround will be  to convert Samsung memos to a text file or anything similar then extract data as plain text files either from a PC or  do it from the smart phone itself.
The following workarounds can extract the plain text from the memo:
1. Method 1 Extracting text from memo

open the memo that you need to convert and tap it so that you see the cursor.
click-and-hold the cursor (or somewhere where there is text) and choose Select All.
click-and-hold on the selected text and choose Copy
open your word processor (in my case Kingsoft Word) and paste the text.
Save and then export to Google keep as plain text.

2. Method 2  Saving by exporting

open up your Memos, click on more (top right hand corner on my phone) and then select share.
You then select (one at a time) the memo you want to save/read/open, etc., and a screen will pop up asking you where you want to send the memo.
You can share to your email, or other sharing options e.g (google drive)
You can then extract them from mail e.g outlook

Thank you for your answer.  Neither of the folders mentioned exist on the Samsung phones I've checked.  Are there other locations you can recommend checking?


text:
How can I see the pointer location, and simulate it?
I want to see the X and Y axis of my touch location in Android, and want to use the x and y axis by typing it into a shell extension, to simulate an actual touch on the screen. Can anyone help?

Go to

Settings
Developers Options
In Input section check Show Pointer Location option.

If developer option is not enabled go to :

Settings
About Phone
Click Build Number multiple times.

To see the pointer: Settings > Developers Options > Show pointer location.


text:
How does one remove a single song from a downloaded album?
I have purchased an album on the play store and downloaded the entire album to my Android device, through the Play Music app. I want all of the songs from that album on my device, except for one.

If I click on the breadcrumbs icon next to the song, I can delete the song from my library, which will also remove it from my device, but I don't want it removed from my library. See the first image.
I can click on the downloaded icon below the album name, but that removes the entire album from the device. Refer to the second image.

How can I remove this one song? I have either missed something or this is quite awful software.

Can you locate the songs on your storage with your explorer? If so, then you could be the way to go

@Beveloper Apparently you need root privilege to access it, https://android.stackexchange.com/questions/51665/where-does-google-play-music-v5-store-music-locally.


text:
Download apps that are listed as being incompatible with my device in the Play Store
After installing Cyanogenmod on my Samsung S3 mini, I have found that the Play Store does not offer any additional apps. For some of the apps, I assume the only requirement I am missing is a newer version of Android, as I have been able to use them successfully when installed from a third party source (which is potentially dangerous).
I want to get apps that I know work with my device from the Play Store. Is there a way to do this?

And which are these additional apps the playstore should offer?

@xangua The only thing I could think about are CMTE themes, but they're visible anyway.

Market Helper works perfectly, if your device is rooted. It can spoof another device on a different carrier.


text:
Unlock OnePlus2 after reset and now in FRP
I have reset my Android Phone (OnePlus2) after it froze. Now it wants me to log in to my previously used Google account.
I know the PIN Code and the Code to Unlock the Screen and the fingerprint is also set to me.
Is there a way to bypass this protection ?
IMHO this does not make any sense if there is no way. Any reasonable thief, who knows all this information can simply unlock the phone and disable OEM lock.
My only problem is that i forgot the Googlemail.

FRP, or Factory Reset Protection, is a Google security protocol built into  modern Android devices, and it is incredibly tough to bypass... Most "reasonable thieves" just ignore these devices because it is so difficult to bypass, it is hardly simple although some devices have specific exploits to bypass it, but those are becoming less and less common as security updates are rolled out on a more consistent basis. To have any chance at assistance, you will need to edit your post and include your specific device and Android version. TBH, the chances are slim you can bypass this.

If you read my answer, you will realise, that it is in fact incredibly easy. Although i also am surprised by this fact.

I searched a few videos on youtube and found a comment, that i tried out of pure desperation:
"Use this code to unlock in emergency call *#812# "
... and it worked !!
After this code unlocks your phone, just go to settings and add a new google account.
Thanks a lot to Chris Rosario for the comment.

Just an FYI... this is NOT a universal way to bypass FRP, it just worked on your device (which you never told us what it is). Glad you got it working, but this method likely won't help others without knowing what device it is.
BTW, I tried this on a few devices on our test bench... Nexus 5, Moto G 2015, Moto X Pure 2015, and Axon 7 Mini. Didn't work on any of them, I could get to dialing an emergency call on all devices but could not get to settings at all from there.

Sorry for not mentioning ... i edited my question. I was sure i had already put it there. Thanks for the infos. You are probably right, the video i took this advice from was about a OnePlus3. Maybe its just a OnePlus thing. But the customer support there didnt know this trick.

TBH, I find it "unfortunate" that OnePlus made it this simple to bypass FRP... Kind defeats the whole purpose of it and lets you know that information and device is not safe at all.

I somehow agree. But the good news is, that google sure will find a way to fix this.

There are bypasses but it varies by phone. The best bet is to flash stock firmware. That's the only way I know to do it, because I've done it on my wife's Galaxy S5.

FYI... That doesn't work on most devices that released with Android 5.x or higher, the SGS5 released with KitKat. Android specifies that that FRP settings are stored in an encrypted, protected partition in all devices that shipped with Android 5 and above, flashing a factory image does not touch those partitions, similar to serial number, IMEI, and other device specific information.

I have seen online  where people  say you can't and you can I tried it and it did in fact remove the frp and was able to use the phone untill recently when the digitizer cracked when dropped

Then FRP on that device is flawed and useless, if it is so simple to bypass it is worthless.

Acejavelin please address the question that is the purpose of this site not discussing anwser to said qustion

And yes that wood make it useless I was extremely suprised it worked my self especially on a Samsung flagship

The point was your answer is not universal, it's actually an exception to the norm, and most likely does not apply to the OP unless they have the same model device. I didn't down vote it because of your low reputation, but it isn't a very good answer to the question as it was asked.

I appreciate you not down voting me and this was my  experience with frp at the time  the only real universial method is to know the info  but the op isn't as specific as it needs to be

@seanburk what is missing, to be as specific as you need it ? I contacted Google and they told me that i should send in the phone to OnePlus and they would put the OS back on and this should do the trick. She also added, that i could be able to do it myself, but only if i had some "computer knowledge" ...

What phone u have wood be a good start then and any and all things you have done to it root mods etc. I see oneplus  I am not familiar with those  at all never even seen one in person so  from here I'd say get the newwest EXACT FIRMWARE for your model of phone I've read that you can't downgrade stock firmware idk if it's true iv never tried but get the firmware and Google how to flash stock firmware for your phone and try it I wood stick to trusted site for info and all downloads I'm bias to this site and xda for this matter xda mite be a better place to look for what u need

@seanburk i called OnePlus and now have an appointment for a remote session for tomorrow evening. If it solves the problem i will report, and if it doesnt,  i will try it myself.

See my own answer for the solution.


text:
Can't get android 7 on galaxy s6
I have tried manually updating my galaxy s6 but it says I have the latest (6.0.1) but I know this isn't true! My friend has practically the same phone but with android 7. How do I update mine?
This is a screenshot of the manual update:

Is it unlocked?  That is the first step if you are doing this manually

Its unlocked yes

Updates are always rolled out in batches to different regions (even the same exact  model could be sold around the world). For your region (G920FBTU5DQA2 - BTU - United Kingdom), as SamMobile states, 6.0.1 is indeed the latest.
You could always manually flash firmware for the same model but for another region (listed on the same page) via Odin, at the cost of potentially losing your data (back up first) as well as certain region-specific optimizations.

Okay. Is there a way of finding out when the update will come to my model?

None that I know of.


text:
adb shell input text with space not working
adb shell input text 'Hindustan%sTrading%sCompany'

Gives Company in Gboard
adb shell input text 'Hindustan%s'

Just gives a space
adb shell input text '%sHindustan' is working fine.
so word before %s is missing
Android Debug Bridge version 1.0.40
Version 28.0.2-5303910

Try using double quotes ("...") and putting real space instead of %s in the input.

Same on double quote.
Real space never worked

It works for me. Which version of Android are you using?

Which one ? Lollipop , which keyboard u using

I am using the hard keyboard of my PC.

I am using the latest version of Google keyboard (GBoard).

ADB version is 1.0.41. And yours?

Seems fixed
λ adb --version
Android Debug Bridge version 1.0.41
Version 30.0.4-6686687

The following works as expected
adb shell input text 'Hindustan%sTrading%sCompany'

Try separating the input lines like this:
adb shell input text 'Hindustan'
adb shell input text '%s'
adb shell input text 'Trading'
adb shell input text '%s'
adb shell input text 'Company'

Only Hindustan.
Did you get the correct one?

is this the correct way? with many adb shell input text lines?

did you get the correct output? Just a workaround


text:
Is clearing app data the same as uninstalling, reinstalling app?
I know some app developers say that I should uninstall then reinstall their app if experiencing problems or updating,  but I wondered if stopping the app and clearing data via the Manage Applications setting would accomplish the same purpose. I'm running ICS 4.0.3.

The answer is no, you're not uninstalling the app by clearing the App data.
Clearing the application data is more or less resetting the application to an initial state before being customized based on the application settings, such as preferences, databases.
I am aware it sounds contradictory, but the crucial element is that the Dalvik cache has the pre-cached dex class within the Dalvik VM for the said app.
All Android apps have a dex bytecode cached in as a layout file embedded - the word is odex When the app is installed for the first time, the cache of the dex bytecode is loaded into the Dalvik VM's cache, thereby speeding up the initialization and execution of the app. Some ROMs are odexed, others are deodexed, if there's no odex file within, the Dalvik VM has to generate it - i.e. Slower at the start! When clearing the App data, that is in /data/data/pkg_name/ does not imply uninstalling! To uninstall an app, the Dalvik's VM cache has to remove the odex for the said app... –


text:
What is directory under selected numbers in redmi call recording settings?
What is directory button under selected numbers in redmi call recording settings?
Does it mean contacts?
Device : redmi note 7 pro

@Robert could you suggest some title? In github, the body is not necessary. Here it's hard to do that. If we give the title as body, it won't be posted.

Does it show additional options when you enable Directory?

@Firelord nope.


text:
Device Can't Power Down
I have an Android device which had a custom os..It was for educational purposes and I could not even open another app on it. After the end of the subscription period I thought of using the device. I tried opening it's recovery mode but instead opened some factory or diagnostic mode which was in Chinese. By mistake I pressed the power key to select an option ending with "emmc" and now It boots but shows a black screen with navigation buttons and time...Any keys pressed make no effect and I am unable to shut it down. When I press the power key for a few seconds it reboots but shows the same screen. I just want to shut it down somehow. Please Help!!
Edit: I found a way to shut my phone down. I connect it to my pc and then press the power button for 10 seconds then the screen goes off and the charging percentage shows up after a couple of seconds, I pull the usb cable out and the screen disappears and voila ! My phone is switched off.
Thanks for all your response.

Seems like a clone... What phone is that?

It is a tablet : Lenovo tab 2 A7-10

Just pull off and reinsert the battery.

-1: you shouldn't presume that the battery be removable, without knowing the device model.

Correct. The battery is non-removable

Thank you guys for admiring my effort to help - you too kind. And, by the way, suggesting something so probable is a good way to save time. It's not like there's many options - battery is either removable or not so it was wise not to specify that first. Because as result, there are only one my comment posted instead of two or  three.

And, after all, you can always try to reboot your phone continuously for battery to get empty more quickly or, which is more likely option - just leave your phone turned on for night. But I'm not sure if this will help after all. You can try it still since there's not much of options available.


text:
How to get Lenovo Stock Rom
I had asked this question...
My Previous Question
Good News is that somehow I am able to put my tab in recovery mode. I wanted to install the stock lollipop version of Android in it and after doing some research I found this link...Link to Lenovo Website
But I am unable to understand that how can I put this in my device. So my question is can any of you provide me guidance on how to install this on my device or atleast can provide me a link to a flashable stock ROM. Any help would be appreciated
Edit: Okay, So I finally got it up and running, but I have a small problem that I can't enter it's recovery mode through the previously correct key combination. It just shows Lenovo's splash screen. I can however use:

adb reboot recovery

Can Anybody help me with this please?

Which Lenovo tablet model is yours?

The link you found is the source code (for developers), not a ROM.

What button combos you were performing to enter the recovery?

Vol + , Vol-, Power

Reading from your previous question, the model is  Lenovo tab 2 A7-10which has a Mediatek chipset (Mediatek MT8127).
So you need SP Flashtool and the firmware with a scatter file to be able to flash your device.

SP Flashtool (Download and unzip then run it)
Stock firmware or Mirror - password: lenovo-forums.ru (Download and unzip)
MTK VCOM, CDC Drivers or Mirror (Download and install)

Install the drivers for the computer to be able to detect the device.
Power down your device. If you can't, just force shut it down (Keep pressing Power button + volume down button for a couple of seconds).
On SP Flashtool, click on Scatter-Loading: Browse to the folder where you unzipped the firmware, you'll find a text file similar to this: MTXXXX_Android_scatter.txt. select it.
You'll be back in the SP Flashtool interface, uncheck the first field (Preloader) and leave the other checked.
Click on Download (green arrow) and wait the software do its things. You should get a big green checkmark if everything goes fine.
Please comment with any errors occurred. I'll update my answer with new elements.

BTW why do I have do uncheck Preloader? Can't I just install a new Preloader?

It is not recommended to flash the preloader because even if the flash file is correct, the preloader may be different. flashing a wrong preloader simply kills your phone.

Should be simply with Volume up + Power button

Actually, This vol+, Power combination lands me into the same test menu I mentioned in my previous question

Well, holding volume up + volume down + power should take you to recovery menu, weird this doesn't work, or may be on of your volume buttons is broken?... adb reboot recovery should work if you enable USB debugging from the developer menu

No. My volume buttons are alright. Anyways it does not matter anymore because I have rooted my device and installed xposed framework and I use one of its modules to add a recovery option in my power menu which reboots to TWRP (which I installed earlier).

Files you need to download to your computer.
Download Lenovo Tab 2 A7-10F ROM or other Lenovo stock ROM.Download SP Flash Tool.
Download Universal ADB Driver Sedboz.
Download ADB Installer.
How to install stock ROM on Lenovo Tab 2 A7-10F?

Open SP Flash Tools then install on your PC.
Now click on Scatter Loading on SP Flash Tool.  Choose the Scatter file you downloaded earlier on your computer.
SP Flash Tool will load the Scatter file you have selected.  Now click the Download button on SP Flash Tool.
Remove your Lenovo tablet's battery if it's removable or if not just
Power It Off then press UP button.  Connect your Lenovo tablet to PC using the USB data cable then put your Lenovo tablet's battery back to its place while your finger pressing Volume UP (+) and this action    will automatically start the firmware flashing processes on your    Lenovo tablet immediately right now.
Wait the firmware flashing to    get completed.  If you see the round green notification shows up on    the SP Flash Tool that means the firmware flashing processes are    complete.  You may disconnect your Lenovo tablet from USB data cable    now and remove your battery afterward then put it back again right.
Now Turn On your device guys.
Well done.

You can try the following method. This is the convectional way of installing/upgrading firmware on most android devices:

Download official firmware (correct version) preferably on PC. Extract the download you should see a sdfuse folder

Depending on contents of the compressed file you may not find the sdfuse folder, in this case;

create a folder in your external sdcard and rename it as sdfuse
extract firmware zip and copy qsb firmware "the file vit extension .qsb" to sdfuse folder or it may have the .inb extension.

You will need to transfer sdfuse folder preferably using a micro sd card Adapter or card reader from the PC  to the phone.
Make sure phone is off completely. Then press and HOLD the POWER+VOLUME DOWN buttons simultaneously until the service menu appears.
Using your Vol+/Vol- buttons navigate to sd update and the installation should begin. Follow the instructions carefully to successfully re-install the firmware.

(Your phone must have at least 50-80% of battery charged )
Credits:

Lenovo S60-A Flash File (Stock ROM) zip


text:
Are files created in "/storage/emulated/0" supposed to appear in "/storage/sdcard0"?
From what I guess, internal storage is available by every user. If emulated storage is a storage location, made for a specific user, are files created in /storage/emulated/0 supposed to appear in /storage/sdcard0? I assume no, because files that are user created should show up in emulated only, otherwise files created by the user would be available for all other users to see.

What makes you think /storage/emulated/0 is specific to a given user – and not just the "first emulated storage device", as /storage/sdcard0 is the first (internal) SD card?

@Izzy Because the numbering (i.e., in this case '0') indicates a storage space allocated for a specific user. Didn't Android become a multi-user platform as of Android 4.2?

Ah, sorry – mixed that up again (0 vs. /0 is too easy to confuse). Please check with: Why did /sdcard/ turn into /sdcard/0/ with 4.2? and Confused by the many locations of the virtual /sdcard/. I never played with multi-user myself, so I didn't dig deeper here. If you have multiple users on your device, can you check? I'd be curious, but my guess is that /storage/sdcard0 always points to the corresponding user's dir, as /storage/emulated/legacy/ does.

@Izzy I read both of those questions before coming here. I don't think we need to create multiple users as I am just mentioning "0", just the singular owner. I'm asking if user created files are supposed to show up in "/storage/sdcard0". My question could indicate a fundamental lack of understanding about how the Android file structure is designed, so I don't know if what I'm asking even makes sense. From what I gather, I believe that's the whole point of "/storage/emulated" in the first place, to provide a specific space for each user to confine folders and files away from other users.

@Izzy it's just system default these days for the 0 to be included. That, or yet more government conspiracy.

@Narcotixs The directories are linked to the same physical location, which is normal.

@DanBrown If I got this right, the OP is asking: "If /storage/sdcard0 is freely readable and writable, what's the point of having a /storage/emulated/X directory for each user?", which is a good question.

@DeathMaskSalesman If that's the case, then no idea. Never really meddled with multi-user (but who has?)

Exact that's what's puzzling me – and what I, too, only recognized after writing my initial comment. Hence the question if one with multiple users on a device could cross-check, please.

@DanBrown I myself, one hour ago. Didn't like the experience.

@Izzy From what I quickly nabbed, when you create a second user, they claim /storage/sdcard10 rather than, say 1 or 2

OK, @DanBrown – and after that (or even before), check with the mount command. Surprise, I expect: there's a FUSE file system overlayed (that's how the internal SD card is separated from the other internal storage while sitting on the very same partition). What I suspect now is that this FUSE system might take care for separating user data, mapping the "SD card" to the appropriate place.

@Izzy Hmmm, that would make sense. I don't have a rooted device to mess with ATM (I actually don't have a rooted device at all, I've just realised) so I can't really mess with terminal.

@DanBrown no need for root, you can use a terminal without :) And yeah, my guess seems correct: Why does Android use fuse for internal SD card mount? says The FUSE filesystem also manages permissions for the files stored in the /data/media folder. Let's see if I can find some more evidence that justifies an answer :)

Related: What is /storage/emulated/0/?

I've checked on one of my devices, and as the comment chain already suspected, you don't need to worry about everyone having access to everybody elses data. First:
/storage/sdcard0 -> /storage/emulated/legacy

Which means, it's just a symlink which always points to the data of the current user:
/storage/emulated/legacy -> /mnt/shell/emulated/0

(the first user – in my case the only one). Second, where you usually look for it:
/sdcard -> /storage/emulated/legacy

Same game again. So for the emulated SD card (aka the "internal SD card), the Android system takes care to map it accordingly for the current user. Not sure about the external SD card (if that e.g. could be used to share data between multiple users). This is usually found in /storage/sdcard1:
$ mount | grep sdcard
/dev/block/vold/179:65 /mnt/media_rw/sdcard1 vfat […]
/dev/fuse /storage/sdcard1 fuse […]
$ ls /mnt/media_rw/sdcard1
/mnt/media_rw/sdcard1: Permission denied
$ su -c "ls /mnt/media_rw/sdcard1"
[data from external SD card]

So you can see the external SD card can only be accessed directly with root powers, why "ordinary users" have to go via a FUSE mount overlayed on that. So the system again might take care that each user can only access his/her own data in that place. I'm not familiar enough with the internals to say for sure (or even to say what exactly is done there).
Now for your explicit question, whether files created in /storage/emulated/0 supposed to appear in /storage/sdcard0: Assuming you're speaking about /mnt/shell/emulated/0 (I couldn't find /storage/emulated/0 on my device), empirically they of course do, as both are the very same location: /storage/sdcard0 -> /storage/emulated/legacy -> /mnt/shell/emulated/0 – which means that /storage/sdcard0 shows what's contained in /mnt/shell/emulated/0. But your concern is unwarranted: due to the "middle-man" (/storage/emulated/legacy), /storage/sdcard0 always points to the storage of the "logged-in user" – so if e.g. the second user looks there, (s)he will see what's in /mnt/shell/emulated/1 (or which ever his/her emulated storage area is).

So as a PS, let me sum up things from the comments, as a short FAQ:

I wonder what would happen if a different user tries to access and save data in a different user's emulated storage?
He receives an error message that it's either not there or not accessible.
Why are these symlinks needed?
Multiple reasons, many of them historical (one word: "compatibility").
What are those symlinks and how do they work, in laymens terms?
They are basically "signposts", saying "please look there". Other than you initially assumed, they don't contain any data themselves – they are really only signposts or "pointers". The data itself resides at the "targeted location", and only there. For more details, please see the Wikipedia article on symbolic links.

Also see:

Accessing the File System
Let's clear up the confusion regarding storage in Android once and for all, including adoptable storage in Marshmallow.
How does the multi-user feature work in terms of paths on Android?
(contains another little FAQ, not only for developers)
The Storage Situation: Removable Storage
Storage (Android documentation)

This may be off-topic slightly, but why are these symlinks needed? What was the reason why the storage architecture was changed and designed to what it is now?

Why does "/storage/sdcard0" point to "/storage/emulated/legacy"? I thought emulated storage should always point to the original storage location (i.e., internal storage or the real virtual storage location) or is there no pointing at all, that it is just a mutual bidirectional reference towards each other?

Sorry, I cannot answer that. Maybe you ask it as a separate question? Also, if this answers your original question, consider accepting it, @Narcotixs ;) And sorry for having rejected your edit: your change doesn't reflect what I found; /sdcard here is a direct link to /storage/emulated/legacy, not to /storage/sdcard0.

It's hard to say if you actually answered the question, the symlinks are helpful, but it introduced more questions. I now want to know if symlinks bi-directional? If I create a file in /storage/emulated/0, will it show up in /storage/sdcard0? Your arrow points and indicates a transfer of information (i.e., from storage to emulated), but does it go in reverse as well? That was my question. From what you are saying, I assume that is true. Would you agree?

Symlinks are unidirectional, some kind of "redirects" (aka "look there"). But as such, if you'd create a file at /storage/emulated/0, it would of course show up in /storage/sdcard0, as in both are pointing to the very same place. Oh, I see, I should have written that explicitly – that's the problem if you work with a thing every day, it's clear that a symlink does that :) OK, will add that to my answer.

If all the locations point to the same virtual storage, what's the point in having separate storage locations for each different user (if more than one exists of course)? So, /storage/emulated/0,1,2,3,etc. they all point to /storage/sdcard0, which also points to /sdcard? So why do the numbers exist? Why allocate a numerical folder if they all point to the same location and contain the same exact information?

You again turned the horse around, which causes your confusion ("why does it have its head at the wrong end?"). It's not /storage/emulated/* pointing to /storage/sdcard0 but the other way around. So if "user0" is logged in, sdcard0 points to emulated/0 but if "user1" is logged in it points to emulated/1 – i.e. "the sdcard" always points to the emulated storage area dedicated to the logged-in user – which of course holds different content for each user.

The thread continues at: https://android.stackexchange.com/questions/173918/when-files-are-created-in-android-4-2-and-above-are-files-ever-stored-in-one-lo

Mr Expensive Toys said:
Am amazed that this problem is still showing up as it started happening as far back as Honeycomb.
So, the /storage/emulated/0/DCIM/Camera is the same folder as your normal DCIM/Camera folder.  Its just a symlink.   So the files are actually in the right location you just have an app that put bad data into the MediaStore Database.
When accessing files from your PC your are actually enumerating the MediaStorage database for files.   Its not pulling a traditional directory lists.   So what you see is based on what is in that database and the path entries in the database.
Files in the database pointing to emulated directories aren't shown as they are assumed to be duplicates as its the same physical directory as your normal DCIM/Camera.     What is going on is that some poorly written third party apps are inserting entries into the database with the /storage/emulated/0/DCIM/Camera path instead of the proper root path to DCIM/Camera.    Which means that the MTP service can't see them when you are hooked up to your PC.
Usually the easiest way to fix the problem is to just clear the MediaStore databases to get the bad entries out of the MediaStore Database and let the system reindex the files and put into the database with the proper paths.
Settings->apps
Hit 3 dot menu in top right and select Show System
Find Media Storage, Select it, Select Storage, then Clear Data
Find External Storage, Select it , Select Storage, then Clear Data
Turn phone off, turn phone back on, wait for indexer service to rebuild the data.
When you are done the files should show up with proper directory tree and be visible from the PC.   Depending on amount of files on the phone it can take as 10-20 minutes to rebuild the media database as the service walks the phone directories, getting meta data, creating thumbnails, etc.


text:
How to set the time (including seconds) on Android
How do I set the time on Android, including setting the seconds?
I have an android handset that has no SIM, is permanently on airplane mode, and therefore doesn't sync its time from cell towers.
I use TOTP 2FA for many of my accounts, and sometimes the clock on my Android isn't precise enough to produce a valid OTP token. Therefore, I'd like to set the time manually, and TOTP would greatly benefit from being able to set the seconds as well. Unfortunately, it appears that the default "Settings -> System -> Date & Time -> Set time" route only permits me to set the hour & minute.
First, when I set the time with only the hour & minute per above, does the seconds field get set to 0? Or does the seconds field remain unchanged from before setting the updated time?
Second, how can I set the seconds in addition to the hour & minute? Bonus points for an answer that includes a GUI app from f-droid. The CLI works, but it's not exactly accessible to most..
Is there no app in f-droid that supports setting the time with seconds? I used to use NTPSync, but now it appears to not actually change the time after a successful ntp query.
fwiw, I'm using LineageOS and Android 9.

Changing the time requires AFAIR root. May be there is an TOTP 2FA app that allows to use a network time source instead of the local one? Or if you use an open source app you can make a feature request.


text:
Auto IMEI randomization in Android (like WiFi MAC randomization)
How do I set the IMEI number to automatically randomly change every time I connect to a cellular network?
Android 9 introduced a feature that was a huge boon to the privacy of Android users: WiFi MAC Address Randomization.

https://source.android.com/devices/tech/connect/wifi-mac-randomization

Starting in Android 8.0, Android devices use randomized MAC addresses when probing for new networks while not currently associated with a network. In Android 9, you can enable a developer option (it's disabled by default) to cause the device to use a randomized MAC address when connecting to a Wi-Fi network.
In Android 10, MAC randomization is enabled by default for client mode, SoftAp, and Wi-Fi Direct.
MAC randomization prevents listeners from using MAC addresses to build a history of device activity, thus increasing user privacy.

As stated, this feature is enabled by default in >= Android 10. So now when you connect to a WiFi network, the owner of the WiFi networks are less able to track your activity between networks.

MAC addresses are the unique identifier of the hardware device that connects to a WiFi network.

IMEI numbers are are the unique identifier of the hardware device that connects to a cellular network.

While this change in Android 9/10 greatly increases a user's privacy on WiFi networks (ie MAC randomization), I've seen no such improvements to increase a user's privacy on cellular networks (ie IMEI randomization).
IMEI randomization is especially important in-light of recent research discovering that loads of PII (including IMEI numbers) are being uploaded to both Google and Apple on average every 4.5 minutes

https://www.scss.tcd.ie/doug.leith/apple_google.pdf

Abstract — We  investigate  what  data  iOS  on  an  iPhone  shares with  Apple  and  what  data  Google  Android  on  a  Pixel  phone shares with Google. We find that even when minimally configured and  the  handset  is  idle  both  iOS  and  Google  Android  share data  with  Apple/Google  on  average  every  4.5  mins.  The  phone IMEI,  hardware  serial  number,  SIM  serial  number  and  IMSI, handset  phone  number  etc  are  shared  with  Apple  and  Google. Both  iOS  and  Google  Android  transmit  telemetry,  despite  the user  explicitly  opting  out  of  this.  When  a  SIM  is  inserted  both iOS and Google Android send details to Apple/Google. iOS sends the  MAC  addresses  of  nearby  devices,  e.g.  other  handsets  and the  home  gateway,  to  Apple  together  with  their  GPS  location. Users  have  no  opt  out  from  this  and  currently  there  are  few,  if any,  realistic  options  for  preventing  this  data sharing.

Similar to the WiFi MAC randomization feature, how can I setup IMEI randomization? If this is not currently possible, when is it being planned to be added to AOSP?

Read more to understand why apps ask for IMEI info (though answers are dated, they are valid), so if you randomize them apps may misbehave, as in, music app not pausing when you get a phone call // If you still want to do that, root your phone, install Edxposed modules like XPrivacyLua // when is it being planned to be added to AOSP - ask Google, not here-no one here can answer that

IMEI is used for legal purposes e.g. to identify mobile theft and to enforce carrier agreements wit users. I don't think it'll happen ever.

MAC addresses are used for legal purposes e.g. to identify a device on a wifi network. I didn't think WiFi MAC randomization would ever be baked-into AOSP and enabled by default, but here we are. It seems at least some of the architects at Google care about privacy

MAC address is used to identify a device in a local network, just for the purpose of DHCP IP assignment and L2 routing in Ethernet protocol. IMEIs are used to identify devices by MNOs who operate at global level. There are authorities who allocate IMEIs. And IMEI cloning is a crime in many countries. So MAC and IMEI cannot be compared. They are entirely different types of identifiers.

But your concern is valid. Govt. agencies use IMEI to track you. This must be circumvented. But IMEI randomization doesn't seem to be an option. Even if it is, there are other ways to track you. The entirely isolated operating systems of SIM (Java) card and baseband processors of 3G/4G modems. Who known what runs inside them.

It should be noted that oppressive governments aren't the only issue. Of course there's many that have a history of violating human rights, dragnet collection of innocent people's PII, and also having this data stolen in breaches. But there's also countless malicious apps that use IMEI numbers to track & sell user's data without their permission. And malicious multinational corporations that have been found guilty of the same. The point is: the best way to keep your data safe is to make it useless -- either by widespread adoption of randomization (eg MAC) or standardization (eg Tor Browser).

Since Android 10 normal user apps cannot read IMEI: https://developer.android.com/about/versions/10/privacy/changes#non-resettable-device-ids. So it's no more a big issue. But the ROMs provided by OEMs aren't open source. They have privileges to read everything. So is the privileged Google Mobile Suite (Play Services and company). And as I said hardware components aren't open source like BP. So what will you gain by just ensuring that apps are not be able to read the IMEI. The bigger privacy concerns remain unresolved.

https://forum.xda-developers.com/t/imei-change-and-legality-mods-please-read.4155591


text:
Does GrapheneOS's Android 10-based releases use FDE (Full Disk Encryption)?
According to the ASOP documentation, it is no longer possible to use FDE and the user is forced to use File-Based Encryption

Note: Devices running Android 7.0–9 support full-disk encryption. New devices running Android 10 and higher must use file-based encryption.

Though I understand the argument for convenience (morning alarms, updates, etc), there are several strong use-cases where it's better to have a FDE with a very long passphrase -- consider journalists, activists, political prisoners, etc crossing borders with oppressive governments. It's better to just turn the device off and rely on FDE to protect absolutely everything in these situations.
I see that GraphoneOS's FAQ page talks about FDE and also Android 10, but doesn't directly answer this question.
Do the GraphoneOS releases that are based on Android 10 still use FDE? If so, how?

See also https://android.stackexchange.com/questions/239114/how-to-use-fde-in-android-10-full-disk-encryption

lot Android 10 devices still running FDE, the quoted google statement is irrelevant. which encryption type is used depends on device, not OS

@alecxs can you name one device that runs Android 10 and uses FDE?

Mi5, Poco F1, Galaxy S9+ (and lot more)

They don't run Android 10+

download stock ROM for star2lte and check /vendor/etc/fstab.samsungexynos9810 yourself. i have two Poco F1 and i know it for sure

https://android.stackexchange.com/questions/239114/how-to-use-fde-in-android-10-full-disk-encryption#comment317406_239114 https://android.stackexchange.com/q/233129 https://android.stackexchange.com/q/230892

GrapheneOS clearly mention metadata encryption which is FBE (not FDE) with additional keydirectory= in fstab (previously location for FDE crypto footer) for example default since Android 9 on One Plus 7


text:
How to use FDE in Android 10 (Full Disk Encryption)
How can I setup Full Disk Encryption in Android 10?
According to the ASOP documentation, it is no longer possible to use FDE and the user is forced to use File-Based Encryption

Note: Devices running Android 7.0–9 support full-disk encryption. New devices running Android 10 and higher must use file-based encryption.

Though I understand the argument for convenience (morning alarms, updates, etc), there are several strong use-cases where it's better to have a FDE with a very long passphrase -- consider journalists, activists, political prisoners, etc crossing borders with oppressive governments. It's better to just turn the device off and rely on FDE to protect absolutely everything in these situations.
So the question is: how do at-risk folks use FDE in Android 10?

Note: creative answers that involve root, custom ROMS, apps, etc are welcome. I'm asking how this can be done on an Android 10 device. I'm not asking if Google "permits" it to be done.

Are you aware that the login password is no longer used for generating the encryption key? It now bases on the Trusted Execution Engine in the CPU. https://security.stackexchange.com/questions/196230/connection-between-pin-password-and-encryption-keys-in-android

holy crap they were using the login password to generate the encryption key?? Are you sure? It should be that the encryption key is randomly generated and symmetrically encrypted with the password, as most FDE systems use..

No, my comment was a bit simplified of course on FDE the password was not directly used as key. But the important fact was not on how it was but how it is now on FBE: the user password has no impact on the encryption at all. Therefore the password length is now totally irrelevant as long as you can't guess it as the code in TEE slows down the entering process (brute-force prevention).

screen log credentials still involved in FBE encryption (that's why TWRP ask for password) 5 digit pin is secure enough against bruteforce

on Poco F1 latest MIUI 12 doesn't even support secure startup anymore and uses FDE default_password, even if password is set while in unencrypted state, and encrypted later (which used to be workaround for MIUI 11 secure startup). see build.prop for Poco F1 Android 10 with forceencrypt= flag in /vendor/etc/fstab.qcom this is one of the devices one should keep bootloader locked for security reasons (or downgrade MIUI 11)


text:
How to cryptographically verify the authenticity and integrity of Android Studio releases (with gpg?)
For a given Android Studio release published by Google, how can I cryptographically verify the authenticity and integrity of the .tar.gz file that I downloaded before I copy it onto a USB drive and attempt to install it on my laptop?
Today I wanted to download Android Studio, but the download page said nothing about how to cryptographically verify the integrity and authenticity of their release after download.
https://developer.android.com/studio#downloads

I expected to see a message on the download page telling me:

The fingerprint of their PGP release signing key,
A link to further documentation, and
Links to [a] a manifest file (eg SHA256SUMS) and [b] a detached signature of that manifest file (eg SHA256SUMS.asc, SHA256SUMS.sig, SHA256SUMS.gpg, etc)

Unfortunately, the only information I found on the download page was how to verify the integrity of the tarball using a SHA-256 checksum found in a table on the same page. Obviously, this checks integrity but not authenticity. And it provides no security because it's not out-of-band from the .tar.gz itself.
How can I preform cryptographic integrity and authenticity verification with Google's Android Studio releases?

As an example of why this matters: The SDK for developing apps is a great target for supply chain attacks, and it happened to Apple's XCode in 2015, successfully infecting >4,000 apps in the Apple Store, affecting hundreds of millions of users https://en.wikipedia.org/wiki/XcodeGhost

Your example has developers downloading from non-Apple sites. Honestly, if you aren't trusting the download/sums from android.com along with going through the EULA then you are in a worse situation of MITM or DNS spoof for android.com and quite probably your entire network access.  Frankly I'd be more concerned about: Poisoned Projects

MITM isn't the only route. android.com itself could get hacked. Even if the integrity of the page is manipulated for 30 minutes at just the right time by an APT, it could do significant damage to a target. Consider how this was done to the official monero wallet in 2019 https://github.com/monero-project/monero/issues/6151

But MITM or DNS spoofs are certainly a threat for the APTs that craft supply chain attacks. Consider the target of XCodeGhost was mostly Chinese app developers. See also https://security.stackexchange.com/questions/234052/where-can-i-find-a-list-of-all-government-agencies-with-cas-in-pki-root-stores

I submitted a bug report to Android Studio to address this https://issuetracker.google.com/issues/183625556

I notice that google has closed the issue as "won't fix (infeasible)", showing an appalling lack of concern for the most basic of security practices.   Especially outrageous considering that Android Studio is at the root of the supply chain for a large percentage of all the world's running applications!  @MichaelAltfield


text:
Android phone models with user-writeable BP firmware (open-source Baseband Processor)
Which android phones utilize a Baseband Processor (BP) that's designed for power users/developers whoose firmware is easily accessible and flashable, by design?
While Google introduced WiFi MAC Address Randomization into Android 9, they've been dragging their feet on adding a similar privacy feature: Cell Tower IMEI Randomization.
My understanding is that this is a hardware limitation, because most Android phone manufacturers do not make it easy to modify their BP's firmware.
Unfortunately, because it's possible to spoof your MAC address but not your IMEI number, it's far safer (from a security and privacy perspective) to use WiFi radio networks on Android devices than to use SIM radio networks. However, if we had access to modify the BP firmware, then we could spoof our IMEI numbers on every connection, thereby greatly increasing the privacy of their cell-tower communications to be on-par with the current-state of WiFi communications.
Fortunately, there's a number of manufacturers of Android devices on the market that are built for power users: Purism, Pine Phone, Fair Phone, Shift Phone, etc.
My question is: which Android phones make the BP user-writeable, such that users can trivially spoof their IMEI number?

See also Where is the baseband firmware stored and how does Android interact with it?

In difference to Wifi where access to the Wifi is usually free or protected by a group password cellular connections are always identified on a per-user basis. Therefore no matter what you try you will always be identifiable as the SIM card contains unique, user-assigned cryptographic keys.

Please re-open. This question is on-topic. I'm not asking for a recommendation of "which do you think is best"? I'm asking if there exists a single device with user-writable BP. Answers to this question would not be opinion-based. They're empirical.

@Robert there are numerous privacy benefits to be gained by spoofing your IMEI because a user doesn't always use the same SIM or provider or tower with the same device. They may change countries or providers or SIMs. Randomizing an IMEI is an important best-practice for privacy and security.

Regarding the closure, the related meta discussion is Why is a canonical reference for Android versions considered appropriate but canonical reference for hardware such as sensors "not a good fit here?" (replace "hardware" with "criteria". OTOH, we stop creating a list of Android updates per model because there's no impetus in maintaining it). [1/...]

[2/2] Honestly, I'm somewhat sympathetic, but I just followed the current policy. Thus, I encourage creating a meta discussion about questions asking for Android models having such criteria, including defining the scope (preferably niche features, otherwise the big-list problem is still there). I'm interested in knowing the community's input on this. Meanwhile, since the existence of [hardwarerecs.se], we tend to suggest the user repost the question there.


text:
Permissions: How to deny an app Intent.ACTION_GET_CONTENT
As the admin of my android device, I'd like to configure the device to return a permission denied error to all apps that request Intent.ACTION_GET_CONTENT by default, unless I explicitly give it permission to make that call.
I had an issue where an app made an Intent.ACTION_GET_CONTENT call recently, which popped-up my picture gallery. I was attempting to do the "go back" gesture, but--by mistake--I tapped on one of the images. The result? A very sensitive photo got uploaded to the public Internet. It was a photo that I really didn't want anyone to see..
Unfortunately, user-errors happens. Until the day I die, I'm sure that I will continue to make input/gesture mis-taps. What I need is better protection from this at a permissions-level.
I checked the app's permissions, but it has none. It can't, for example, access my phone's storage.
What I want to do is further lock-down the apps on my phone such that apps are immediately returned some Permission Denied error when trying to initiate an Intent for which they haven't been added to the allowlist for that intent.
How can I deny an app permission to initiate Intent.ACTION_GET_CONTENT?


text:
Comparison of isolation methods in Android
Where can I find a table that compares what information is and is-not accessible from an Android app with various isolation methods?
I need to install a piece of malware on my Android device. This is definitely a very dangerous app that was designed by someone powerful, malicious, and actively trying to attack me. I don't want them to learn anything about my device, and I definitely don't want their app to see any data on my device or be able to interact with other apps or files on the device (even with an accidental tap caused by me clicking something after the app spawned maliciously-timed INTENT).
On desktop, I use QubesOS. So I have no issue running and playing with malware. I just fire-up a new DispVM, and I'm very confident that it's isolated. Android, however, leaks so much info to apps that I'm not sure how best to go about this.
I've considered a few isolation methods:

Do nothing (default app "sandboxing"),
Install in a Work Profile (eg Insular),
Install in a new User Profile,
Buy (and install it on) a second phone, or
Something even better?

Is there any table that lists all of the data that is made available to apps that are compartimienalized with each of these methods?

Android Emulator

Installing a known malware where you don't exactly understand what malicious actions can be preformed by it is always a risk. Even with a recent Google Pixel device fully patched with the latest update installing a malware is a risk. Therefore I would never install a malware on a device that you use for any other purpose other than installing this malware. Android Emulator is also a possibility but keep in mind that emulators can have security problems that may allow a malware to escape.


text:
Hotspot DHCP issues without mobile data (dhcp4 request timed out)
By default, does the Android "hotspot" functionality provide a DHCP server to its clients? Or does it just pass DHCP info on from the network that it's connected to?
I'm trying to create a hotspot for LAN-only communication between my laptop and my phone. I do not have a SIM card, so "Mobile Data" is disabled." I also don't have access to another WiFI network, so "WiFi" is disabled.
I created a hotspot and try to connect to it from my laptop, but I get this error from NetworkManager's logs (I'm using GNU/Debian 11 Linux):
[user@sys-net ~]$ sudo journalctl -u NetworkManager -f
...
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.7570] device (wls6): Activation: starting connection '<SSID_REDACTED>' (501ce9ff-854f-472a-81cd-5eb447c47379)
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.7585] device (wls6): supplicant interface state: disconnected -> interface_disabled
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.7585] device (p2p-dev-wls6): supplicant management interface state: disconnected -> interface_disabled
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.7654] device (wls6): supplicant interface state: interface_disabled -> disconnected
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.7655] device (p2p-dev-wls6): supplicant management interface state: interface_disabled -> disconnected
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.7667] device (wls6): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.7675] manager: NetworkManager state is now CONNECTING
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.7840] device (wls6): set-hw-addr: set-cloned MAC address to <MAC_ADDRESS_REDACTED> (stable)
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.8065] device (wls6): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.8087] device (wls6): Activation: (wifi) access point '<SSID_REDACTED>' has security, but secrets are required.
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.8087] device (wls6): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.8248] device (wls6): supplicant interface state: disconnected -> interface_disabled
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.8248] device (p2p-dev-wls6): supplicant management interface state: disconnected -> interface_disabled
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.8250] device (wls6): supplicant interface state: interface_disabled -> disconnected
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.8250] device (p2p-dev-wls6): supplicant management interface state: interface_disabled -> disconnected
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.8405] device (wls6): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.8412] device (wls6): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.8461] device (wls6): Activation: (wifi) connection '<SSID_REDACTED>' has security, and secrets exist.  No new secrets needed.
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.8473] Config: added 'ssid' value '<SSID_REDACTED>'
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.8474] Config: added 'scan_ssid' value '1'
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.8474] Config: added 'bgscan' value 'simple:30:-70:86400'
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.8474] Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256 FT-PSK SAE FT-SAE'
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.8474] Config: added 'auth_alg' value 'OPEN'
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.8475] Config: added 'psk' value '<hidden>'
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.9055] device (wls6): supplicant interface state: disconnected -> authenticating
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.9059] device (p2p-dev-wls6): supplicant management interface state: disconnected -> authenticating
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.9109] device (wls6): supplicant interface state: authenticating -> associating
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.9110] device (p2p-dev-wls6): supplicant management interface state: authenticating -> associating
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.9365] device (wls6): supplicant interface state: associating -> 4way_handshake
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.9365] device (p2p-dev-wls6): supplicant management interface state: associating -> 4way_handshake
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.9611] device (wls6): supplicant interface state: 4way_handshake -> completed
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.9611] device (wls6): Activation: (wifi) Stage 2 of 5 (Device Configure) successful. Connected to wireless network "<SSID_REDACTED>"
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.9611] device (p2p-dev-wls6): supplicant management interface state: 4way_handshake -> completed
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.9616] device (wls6): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Apr 07 16:15:24 sys-net NetworkManager[1446]: <info>  [1649340924.9621] dhcp4 (wls6): activation: beginning transaction (timeout in 45 seconds)
...
... <here it got stuck waiting for an IP address before timing out>
...
Apr 07 16:16:10 sys-net NetworkManager[1446]: <warn>  [1649340970.5783] dhcp4 (wls6): request timed out
Apr 07 16:16:10 sys-net NetworkManager[1446]: <info>  [1649340970.5783] dhcp4 (wls6): state changed unknown -> timeout
Apr 07 16:16:10 sys-net NetworkManager[1446]: <info>  [1649340970.5784] device (wls6): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
Apr 07 16:16:10 sys-net NetworkManager[1446]: <info>  [1649340970.5799] manager: NetworkManager state is now DISCONNECTED

Why is my android device failing to provide my laptop with an IP Address? Is it because my android isn't already connected to another network running a DHCP server? How can I make my android hotpsot provide a DHCP IP address to my laptop when I connect to my android's hotspot?

See also How to permit secondary profile to create/manage hotspot

See also Stack Overflow - Android Wi-fi AP hotspot - without internet

This issue was caused by my firewall and due to complexity between multiple user profiles.
I was able to fix all issues by entirely disabling the firewall setup by the afwall app.
However, as a slightly better option, I was able to fix this issue as follows:

As the 'Owner' profile, enable Airplane mode. Make sure WiFi and Mobile Data are off if you want to use the phone's own internal DHCP server. Then enable Hotspot

In the user's account where afwall is configured, check the box to give "wifi" access to the row named (any app) - Same as selecting all apps - !! WARNING !!

Note: I did try to isolate the wifi permissions to a single app, but I found that if every app's "wifi" setting was enabled (except the entry for (any app) of course), then it wouldn't work. But if the "wifi" setting was enabled for the (any app) row, then it worked.
So it appears that there is, in fact, a distinction between selecting all apps or selecting the (any app) entry. My guess is this distinction is most relevant when using multiple user profiles.

On another handset, I was able to resolve this issue and get an IP address when only enabling the "wifi" permission for the (root) - Apps running as root entry (as opposed to the (any app) entry). YMMV device-to-device, version-to-version, ROM-to-ROM.

This question is linked in comments in other similar question with Highly active question rank but excessive reputation points are needed to answer it. So I answer here because those two questions are linked, and answer explains mentioned there problem.
On Samsung phones it is not possible to turn on hotspot without inserted SIM card.
But there are tools to create in newer Android versions offline hotspot - more info here

Except the Op has it working.

This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review


text:
How to kill an app in LineageOS 18 (Android 11) by holding the back button
How can I kill an app by holding the back button in Lineage OS 18?
One of the first things I've always done when installing a new Android was to enable developer options, then scroll down to the very bottom and enable the toggle for `Kill app back button"

Kill the foreground app by long-pressing the back button

I just upgraded to LineageOS 18, and I was very sad to discover that this option is missing!
How can I replace this functionality on LineageOS 18 so that I can force-close misbehaving apps by holding down the back button?

I don't thin that this is an AOSP feature (it seems to be a LineageOS feature). Based on your recent questions I assume that you were using LineageOS on your old phone? Have you also installed LineageOS on your new phone?

Yes, both are LineageOS. I upgraded from Lineage 15 (Android 8) to Lineage 18 (Android 11) and the option disappeared :(

To enable this feature in newer versions of LineageOS, go to

Settings -> System -> Buttons -> Back long press action = Kill foreground app

It appears it was moved from Developer options section to the Buttons section.


text:
Keep WiFi running when screen is off and phone is locked (streaming with black screen, battery saving, newpipe, podcasts)
How do I keep my WiFi running when my phone's screen is off and locked?
Facts:

The biggest battery drain is my screen usage
WiFi uses your battery, but not nearly as badly as the screen
I use my phone to stream audio
I intentionally turn off my phone's screen to save my phone's battery
If I'm playing a local file that I previously downloaded, then I have no issues with the audio stopping when my screen is off.
If I'm streaming audio, then sometime after I turn off my phone's screen, the audio streaming stops (I guess after it locks and the the stream buffer is empty)
Immediately after I wake my screen, the audio stream resumes. Unlocking the phone is not necessary to resume the audio stream.

I assume, therefore, that my phone is disabling my WiFi sometime after my handset's screen is turned off.
I am running LineageOS 18 (Android 11).
How do I prevent my android device from disabling my WiFi when the screen is off?

Have you tried to disable battery optimization for the used streaming app? Is your screen LCD or OLED? For LCD reducing the brightness to a minimum can be a workaround (but restoring brightness can get a little difficult depending on the environment brightness). For OLED try to use an app that shows a black screen only and that keeps the phone awake.

see also https://stackoverflow.com/questions/50115053/is-it-possible-to-completely-disable-the-doze-mode-and-standby-mode

I know of no way to disable doze as the admin of the OS (Android) itself

https://stackoverflow.com/questions/50115053/is-it-possible-to-completely-disable-the-doze-mode-and-standby-mode

(but please comment on this if there's some way to do it with Xposed or similar)
From the app (developer) itself
The Google documentation on MediaPlayer specifically tell developers to use WifiLock to prevent wifi from being disabled if the app streams media

If you are streaming media over the network and you are using Wi-Fi, you probably want to hold a WifiLock as well, which you must acquire and release manually.

source: https://developer.android.com/guide/topics/media/mediaplayer
The Google documentation on WifiLock can be found here:

https://developer.android.com/reference/android/net/wifi/WifiManager.WifiLock

Battery Optimization
You can disalbe "Battery Optimization" on a per-app basis by going to your Android Settings -> Apps & notifications -> Special app access -> Battery optimization.
From the drop-down at the top, choose All apps
Scroll-down to the app that you're having issues with. Click it, and choose Don't optimize
Intermediary (eg network stack) apps
In my case I found that the issue was actually not the app itself, but an intermediary network app that wasn't doing the WifiLock. In my case it was the OpenVPN for Android app.
The solution was to open OpenVPN for Android, go to Settings and uncheck Pause  VPN connection after screen off
Now my audio stream doesn't cut-off shortly after the screen locks.

To accomplish what you want, you can install the app Fake Standby.  It is a free open-source application.
Fake Standby will turn off your screen while keeping apps running.  This will allow you to listen to audio (podcasts, for example) without draining your battery so much.
I've used it many times, and it has worked well for me.

Technically, this app uses black, full-screen overlay, which is what Robert suggested in the comment.

Does this prevent your phone from locking? For security reasons, I do not want to use an app that is going to prevent my screen from locking. And also, I see a lot of unnecessary risk in allowing an app to draw over other apps (though I do appreciate that it's open source).

Head away to the battery section in Lineage OS settings and disable power manager.
If that doesn't work, something is wrong either with your vendor or the kernel.
Also keep in mind that while asking device specific questions, it's highly recommended to include basic information such as your device model, vendor info (ie using stock vendor or not etc), state of boot image etc. If not everything, atleast provide the device model


text:
Why does GrapheneOS use signify instead of PGP to sign their releases (GPG, cryptographic signatures)?
Why is it that the GrapheneOS (Android ROM) project crypographically signs their releases with signify instead of PGP?
The install documentation for GrapheneOS instructs the user to install the signify-openbsd project from apt and use it with the official GrapheneOS release signing public key to verify the authenticity of their releases.

https://releases.grapheneos.org/factory.pub

Most software projects use PGP to sign their releases.
Why does GrapheneOS use signify?

Daniel Micay (Lead developer of GrapheneOS) decided to use signify instead of gpg because of many issues associated with gpg and the OpenPGP standard, including:

PGP Certificate Flooding attacks
gpg is very hard to use
signify is far simpler than the OpenPGP spec; it's less vulnerable to (keychain) exploits, the code is shorter, and has a lower attack surface
The gpg implementation bugs permitting DOS attacks on keyrings are long-standing and not being addressed in a timely manner by its developers

It's overly complex with far too much attack surface and has egregiously bad usability and security. It's only suitable for usage as a case study in how not to design and implement software. Rather than changing the instructions to work around GPG deficiencies, it won't be used.

Source: https://twitter.com/DanielMicay/status/1145264664315604992

It's a systemic issue, not a specific problem. GPG is vulnerable to a severe denial of service (permanently bricking the keyring) when importing public keys through multiple weaknesses. The public keyservers make the situation worse, but the issues with the GPG implementation are still relevant even without keyservers.
GPG also has a lot more wrong with it than this. I've been phasing it out over time for my own usage and had previously talked about my plans to phase it out for GrapheneOS too. OpenPGP is a overly complex and poorly designed legacy standard, and GPG is a low quality implementation of it.
The thing that finally pushed me to prioritize fixing this was the terrible responses of the GPG developers to the issue summarized well by Hanno Böck: https://twitter.com/hanno/status/1145597144373575680.
Look through my recent tweets / replies and retweets about GPG, or my previous threads about it in May.

Source: https://www.reddit.com/r/GrapheneOS/comments/c7gb3f/grapheneos_factory_images_are_now_signed_with/
These are the opinions of Daniel, not my own. Of course I think signing with PGP is better than not signing at all (or where signature verification requires you to use a tool that cannot itself be obtained securely), which is the absurd reality of most Android ROMs.


text:
Performance troubles with Motorola Moto X Force (Android 7.0)
Since quite some time I am having some peculiar performance problems on my Motorola Moto X Force. Sometimes any interaction (like just opening Chrome for example) takes incredibly long until it responds. This also happens after clearing all apps in the task switcher and it can also happen pretty soon after rebooting the phone.
Imho a phone with a 4x 2.00GHz Cortex-A57 + 4x 1.50GHz Cortex-A53 (Qualcomm MSM8994 Snapdragon 810, 64bit) and 3 GiB RAM should not have such problems.
Thinking some app might hog the CPU in the background (though I do not have any battery problems - it can go for over 48 hours without charging) I installed some system monitoring apps in order to get to the bottom of this.
One app, System Monitor Lite has the ability to log in the background, when enabled. I wanted to check if I can correlate CPU or RAM usage with the periods where the phone runs slow.
However once the background logging of that app is active, the phone immediately runs noticeably smoother! And it runs smooth as long as the background logging is active. Once I turn it off, the phone will get slow again after some time.
This makes me think now that this phone (or Android 7.0) has a power management problem. i.e. letting the CPU(s) run in a low performance state, when it should not.
Has anyone else ever experienced something like that or any ideas how to combat this?

Possibly related: CPU-Z shows 8 cores, but 4 of them are stopped

Imho a phone with a 4x 2.00GHz Cortex-A57 + 4x 1.50GHz Cortex-A53 (Qualcomm MSM8994 Snapdragon 810, 64bit) and 3 GiB RAM should not have such problems.

No, it should have such problems. SD810 is known to have bad thermal performance (it is essentially a SD410 when under load because all a57 cores shut down). The only thing you can do is do factory reset and remove all junk from your device or install a custom ROM (or a custom Kernel) which has thermal profile that suites your usage pattern.
(I use a Oneplus 2 with same SD810 btw)

but it does not happen under load. It's the exact opposite. It is slow when there is no load but smooth when there is at least some constant load in the background. I already did a factory reset and removed all "junk". It happens after a fresh reset too. Can you recommend any custom ROMs that would attempt to fix this problem with the thermal profile (if it is that)?

@fritzmg Seems like you're out of luck. There only one LOS 14.1 build and it looks abandoned. You can go the hacky way to root your device and modify your stock OS to get more juice out of it. Install Kernel Adiutor and play with some parameters or try some root app/mod that claims to boost performance.

I see, thanks for the suggestions. It's too bad though. However, I got an OTA update recently (stock ROM) - which was just some security update according to the description. So far the phone does seem to run more smooth again. But may be that is just a placebo.

I'm having the same bug but it's mainly disk I/O which drastically slows down (or even freezes) the phone. I've installed Simple System Monitor and you can check disk I/O (and even test read/write speed), and it's absolutely awful (test file size 200 MB) :

read speed : 44.45 MB/s
write speed : 2,91 MB/s

I'll go for a factory reset as my internal storage is more than 75% full but I fear this might be a material issu with the internal storage...