text:
How to mute Gmail thread on Android?
I muted the message on web browser on my pc. I can see Muted tag is applied to the thread. I no longer receive notification on this thread from browser on pc. But I keep getting notifications on my Android. I am not the only person on the to/cc list of its messages. I searched old questions and answers. They mentioned a Done button. But this button is gone on the Gmail android app I'm using. Please advise.

Long-press or open the conversation.
Click the 3-dot, select Mute.

On the message I keep getting notifications from, there is not a Mute button. On other messages, I see the button. I guess it's a bug in Gmail App or sth.


text:
Apps coming as updated when recently installed
So, I recently downloaded myfitnesspal and when I did, it showed as updated and not installed. It said that the app was recently updated and not installed.
So my question is, is this normal sometimes and is anybody else having this problem? Is there anyway to fix this problem?
Thanks in advance for you reply!

Everything is fine. Google Play Store will mark new installed app as 'Updated', there is none option for 'Newly Installed'.

But for other apps this does not happen. The other apps come in the 'installed' category.

Try to reboot your phone, but if you have that app instaled everything should be fine.

source: Stack Exchange

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

sort: votes


text:
Parallel Space game progress file location
I've been using parallel space on my Android device for a while now but it's been having an issue with logging in to the Google Play services and thus backing up my game progress becomes hectic. I'd like to know where the progress files are stored in my file manager so that I can cut and paste it manually. Thanks in advance.

If you don't have rooted phone, you can not do it. Problem is in PS, in most cases you need to change settings of PS. So tap on three dots in right upper corner, go to Speed Mode and turn it off.
Speed Mode can reduce battery consumption and speed the PS, but it also disaable Google Play services to achive that.

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


text:
Something killing background apps
Just yesterday I bought noname device called Hisense U30 with Android 9 and it works bad. It killing background apps VERY AGGRESSIVELY. Like I start music in Yandex.Music (russian analog Spotify), switch off screen and in 1-2 minutes something kills player. It kills everything.
What I already tried:

Disable every preinstalled battery savers;
Disable battery optimization for certain apps;
Tried everything from Background apps get killed (by something other than battery optimization)

Nothing. Player still get killed. OS looks pretty close to stock Android (at least not much preinstalled apps). So my guess is that OS is somehow incorrectly configured.
I looked into logcat and what I got:

It starts with MemoryDetectService like this

MemoryDetectService: onStartCommand()---> action = screen_off_app_clear
MemoryDetectService: AutoClearState -----> begin

Then this service scan through all (I presume) running apps and find mine player too

MemoryDetectService: getRunningAppPackageName()---> begin
...
MemoryDetectService: RunningAppProcessInfo: cur.processName = ru.yandex.music:Metrica, pkgName = ru.yandex.music, uid = 10123, uid % 10000 = 123
MemoryDetectService: RunningPkgList---> pkgName = ru.yandex.music
...
MemoryDetectService: getCurrentHomePackages(): recentTasks = ru.yandex.music

And then, SOMEHOW, decide to kill my player

MemoryDetectService: mRunningPkgList: pkgName = ru.yandex.music
MemoryDetectService: mNeedForceStopPkgList---> pkgName = ru.yandex.music
...
MemoryDetectService: currentPkgName---> ru.yandex.music
MemoryDetectService: hasPkgNeedClean(): currentPkgName(New Method: mRecent2PkgList.get(0)) = ru.yandex.music
MemoryDetectService: getWhiteListFromFile: String = null
MemoryDetectService: hasPkgNeedClean(): memBefore = 3894, mWhiteListStr =

And then it start to kill processes

MemoryDetectService: clearMemory-----> begin
MemoryDetectService: clearMemory(): sendBroadcast hmct.intent.action.CLEAR_CACHE: null;
MemoryDetectService: screen on cleaning open = true ,  screen off cleaning open = true
MemoryDetectService: killPackage---> begin
...
MemoryDetectService: forceStopPackage---> begin
MemoryDetectService: clearMemory(forceStopPackage): isScreenOn = false
ActivityManager: Force stopping ru.yandex.music appid=10123 user=0: from pid 1972
ANDR-IOP: IOP HAL: Received pkg_name = ru.yandex.music pid = 0
ActivityManager: kill app.info.packageName=ru.yandex.music minOomAdj=-10000 packageName=ru.yandex.music
ActivityManager: kill app.info.packageName=ru.yandex.music minOomAdj=-10000 packageName=ru.yandex.music
ActivityManager: Killing 6673:ru.yandex.music:Metrica/u0a123 (adj 200): stop ru.yandex.music
ANDR-IOP: IOP HAL: Received pkg_name = ru.yandex.music:Metrica pid = 0
ActivityManager: Scheduling restart of crashed service ru.yandex.music/com.yandex.metrica.MetricaService in 20937ms
Zygote  : Process 7489 exited due to signal (9)
...
ActivityManager: Killing 6616:ru.yandex.music/u0a123 (adj 200): stop ru.yandex.music
ANDR-IOP: IOP HAL: Received pkg_name = ru.yandex.music pid = 0
libprocessgroup: kill(-7799, 9) failed: No such process
ActivityManager: Scheduling restart of crashed service ru.yandex.music/.common.service.player.MediaSessionService in 20929ms
ActivityManager: Scheduling restart of crashed service ru.yandex.music/.common.service.player.AppForegrounderService in 20929ms
...
ActivityManager:   Force finishing activity ActivityRecord{ba18734 u0 ru.yandex.music/.main.MainScreenActivity t248}
MemoryDetectService: setPackageAliveState start----packageName = ru.yandex.music
MemoryDetectService: setPackageAliveState end----packageName = ru.yandex.music, aInfo.processName = ru.yandex.music
MemoryDetectService: mClearAppList---> pkgName = ru.yandex.music, mClearApp++--->1

Any idea how to fix this?
P.S. AFAIK there is no other ROM like Linage OS for my phone, and I am not a big fan of root cuz this will break Google Pay, so it would be great to deal with it without rooting device.
Update 1
I looked up for this service in dumpsys, and I have an idea: disable this service via adb shell am stopservice com.android.systemui/com.hmct.systemui.taskmanager.detectmemory.MemoryDetectService. Will be back with results.

I have the same problem. I have 2G of 4G RAM empty yet my browser is killed every time I switch to any other app. I'm using Xiaomi Lite (supposedly, it should be vanilla android)

As I mentioned, I tried to disable MemoryDetectService via adb (adb shell am stopservice com.android.systemui/com.hmct.systemui.taskmanager.detectmemory.MemoryDetectService), and it looks like it worked. One day, none of my apps is killed while I using them, battery drain is the same (~25% from max yesterday, ~25% today).
From the name of the service I assume that this is service, written by Hisense themselves (if they even can modify SystemUI).
However, still few concerns:

Everything looks fine, but disable some system service is dangerous, so need to be prepared for any s**t;
I'm not sure, will this service remain disabled, if I gonna reboot my phone.

Anyway, I will consider this problem solved.
UPDATE
Yes, as I expected, this fix is not persist after reboot, but I managed to write bash script and run it manually after each reboot via Termux:
#!/bin/bash

am stopservice com.android.systemui/com.hmct.systemui.taskmanager.detectmemory.MemoryDetectService


text:
Is there a smart way to find an app with the features I want?
Is there a smarter way to find the app I want? Basically, I'm searching the app store for a note-taking app that will suit my needs, and the number of apps is large. So, my approach is to find the note-taking apps and include "sync" and "import" in the search. My goal is to find an app that will both import my existing notes from the default Memo app, and also support syncing with my Google Drive so that I can look at notes on my PC.
But that results in a large list of apps to sift through, looking for the right one. Further, not all the apps fully describe everything they do, and might have the feature I want without mentioning it in the online description. Is this a problem without an automatic solution, or is there a smart alternative to my approach?

"import the default Memo app" - okay which device/name/package name? Is it possible that the data is encrypted and you won't be able to export/or have to do it manually every time?  Also Google Drive is changing their APIs so do look out for that.

@morrison-chang Samsung Notes imports from Memo just fine, so I think that's not an issue.

Maybe my corresponding app listings could help here?


text:
Nokia ringtones file location
I have a Nokia 6.1 that has some ringtones that aren't in the system/media/audio directory.  Any idea where they'd be?

They are in system/media_cust/audio

On Nokia 5.4
/system/product/media/audio


text:
How to disable bad RAM addresses and fix bad storage blocks?
The symptoms which device presents are:

Restarts randomly with a previous freeze of a few of seconds (this is becouse of /proc/sys/kernel/panic is set to 5).
Sometimes with a blue filled screen.
Even on boot or TWRP.
Can restart several times on boot at different times.
Can avoid the 'restart effect' for a while keeping RAM usage low.
Not using the device and stopping services that run in the background makes the device "reboot proof".
This error appears in the log of TRWP:
E:Invalid block device on /sdcard ext4 [][][]flags=display="Internal SD" ; symlink ', 'flags=display="Internal SD" ; symlink' , 27
When trying to change partition type or repair 'Internal storage' at TRWP it says Invalid partition selection (maybe becouse of 7?)

I have done this to try fixing it:

Using adb to fix badblocks (Found some).
Using different ROM's.
Wiping the whole device.
Set kernel.panic_on_oops to 0.

UPDATE: After analyzing a lot of crash reports, seg faults and memory corruptions I am pretty sure that the unusable ram is from address 0xb6000000 to
0xb6ffffff.
How to leave them out? It is a ARMv7 device.

This might not be a direct solution to your problem, but I'm sharing my thoughts on it.
SHORT ANSWER

It's not very likely for RAM on embedded systems to get defective. And if it does, solutions might not be readily available, except if someone has already done that specifically for your device.
Modern flash storage devices manage bad blocks on their own, users haven't much to do in this regard.

If any of both problems requires user intervention, usually it's time to replace phone.

This error appears in the log of TRWP:
E:Invalid block device on /sdcard ext4 [][][]flags=display="Internal SD" ; symlink ', 'flags=display="Internal SD" ; symlink' , 27
When trying to change partition type or repair 'Internal storage' at TRWP it says Invalid partition selection (maybe becouse of 7?)

To me these symptoms look like those of a dying eMMC.

BAD BLOCKS ON RAM
I suppose you are talking about a phone or similar device.
Phones have SoCs, the module which includes CPU, GPU, RAM, eMMC, modem, WiFi, Bluetooth and GPS along with other critical components. In addition to that, LPDRAM and eMMC are in most cases manufactured together as a single Multi-Chip Package (MCP).
That said, what you are saying is highly unlikely to occur on phones. On PCs RAM is installed as independent modules which are prone to physical damage and wear and tear e.g. due to moisture, rust, dust, jerky movements, vibration, loose connections, pressure (during installation), heat (because of overclocking or improper ventilation) etc. So there are tools like memtest86 to regularly check for memory faults. All of these factors are ignorable for phones because the RAM is tightly integrated with less than a square inch sized SoC chip, keeping in view all above factors.
Another possible reason is electrical failure of the circuits/components e.g. due to electric shock in a sudden blackout which renders it totally useless. This again doesn't seem very probable for phones as the RAM is part of SoC, so the whole SoC should fail along with other, some kind of, surge protection mechanisms (if any).
Since RAM is volatile memory, its cells never get physically changed while reading/writing data unlike eMMCs. eMMC is persistent storage, so the physical properties of silicon cells change during E/P operations. That's why eMMCs have a limited life but RAMs aren't subject to any such limitation.
So if RAM is defective, the most likely is that it was manufactured with faults. RAM failure because of growing bad blocks isn't a common case, at least no sooner than other components of device, but still can't be utterly rejected. So how to fix it?
Since hardware is handled by kernel, the only way to mark some memory addresses bad is by making kernel not allocate those addresses to any userspace program (as can be done on Linux with BadRAM which modifies kernel source). And that too if the bad memory lets the device boot to kernel stage. Otherwise you'll have to handle the matter at SoC/bootloader stage where RAM is being initialized after power on (as can be done on Linux with GRUB and on Windows with BCD). It's definitely impossible on phones since bootloaders are closed source. If your bootloader is configurable like in case of development boards, that's an exception. But in each case you probably have to go through thousands of lines of code.
BadRAM is no more maintained after kernel version 2.6.28, that was 10+ years back (probably because it wasn't accepted into mainstream kernel tree). You can ask the developer if he can assist you to port the patch to ARM (if it's possible at all). Or may be you can exploit kernel parameters mem and/or memmap somehow to achieve what you want. Again the situation might differ a lot when there is no ACPI and no BIOS. Personally I never came across such situation for mobile phones.
BAD BLOCKS ON STORAGE
Coming to the other point, fixing bad blocks makes sense only with hard drives or at maximum with old raw NAND drives (ref). HDDs have a linear LBA to CHS mapping, which means a filesystem knows to which physical location data is being written. Modern flash memory storage devices (including eMMCs, SD cards and SSDs) have a built-in firmware controller called Flash Translation Layer (FTL). FTL handles LBA to PBA mapping, the filesystem and OS are quite unaware of. As a wear-leveling strategy, FTL doesn't map sequentially and the mapping is dynamic. First LBA could correspond to last PBA and last LBA could point to somewhere in the middle, continuously changing with Garbage Collection.
FTL also scans and keeps track of all bad sectors (more specifically silicon cells) and remaps worn bits from overprovisioned (kind of free) space if required. Filesystems will never identify a sector bad, unless the stage comes when E/P cycles limit of flash memory is reached and it starts behaving funny, becomes read-only and ultimately crashes. Even if a purchased software identifies a sector bad, you can't mark it as not allocatable; refer to dynamic nature of LBA to PBA mapping. You mark a sector bad in filesystem and after few minutes that would be moved to some other partition.
HDDs usually don't die at once. Their built-in firmware maintains a list (G-list) of bad sectors from the day of manufacturing (ref). LBAs corresponding to bad sectors get replaced with spare sectors which every HDD has. Once the pool of spare sectors is depleted, any newly appearing (possibly partially) bad sectors are exposed to OS/filesystem. So when a program like chkdsk, e2fsck or badblocks identifies a bad sector, it can handle that at OS level or make it marked bad by HDD firmware. Quoted from here:

If you give permission to overwrite a bad sector SeaTools will attempt to write a pattern of zeros to that sector. Usually, this action will assist the disk drive firmware in managing the problem by retiring the problem LBA and activating a spare in its place.

That's what hdparm --write-sector does.
Mostly filesystems can also maintain a list of bad sectors to be ignored during read/write operations. For instance on ext4, dumpe2fs -b shows a list of bad blocks reserved in bad block inode.
Mostly HDDs (as well as SSDs) are also built with SMART technology to monitor device health, but not eMMCs. In case of eMMC, the only thing e2fsck does is to identify errors within filesystem (and possibly repair using e.g. information from jornal), not in flash memory. All OS's including Android perform filesystem checks on boot before mounting, so that manual checking is not needed.


text:
Can we delete Android system WebView app to free up space?
I am looking to free up some space on my android device.

you cannot delete it without root as it is a system app.
even if you could delete it, it wouldn't free up space for other apps. System apps reside in their own space (/system), which during normal operations is mounted read-only.
even ignoring the other two points: deleting Webview would cause several apps to just stop working as they depend on it for displaying content (even local one).

TL;DR: No, don't.

Regarding bullet #2, deleting a system app actually frees a bit of space in /data, because the system doesn't build a Dalvik/ART cache for it anymore. Disabling it doesn't help, though.

@DeathMaskSalesman just "uninstalling" it for user0 (if there isn't another user) doesn't achieve that? I've never checked. And if you go for that: disabling and deleting its data helps a bit, too :)

@Izzy You have a point: since /data holds both a system app's... data and its updates, deleting everything either before or after disabling it can save up some usable space. Of course, if one is open to rooting, they can trick their phone into thinking a system app has been removed, and still reap the "no Dalvik" benefit. The Debloater module comes to mind - I'm not affiliated, but I do use it.


text:
"No emoji found" in Google Japanese Input
I am using Google Japanese Input keyboard, and I often want to post a rare emoji such as  or .
The search bar looks like the perfect place to search for an emoji, but unfortunately it fails every time:

It fails even on the simplest requests, such as "smile" or "sad".
It does not work in Japanese either:

I have changed phones, and changed OS (Nexus default, CyanogenMod, LineageOS, Samsung default) many times: The problem has always been present. So I guess it is not a bug, but rather a problem of me not using it correctly.
How to use that feature correctly?

Note that Gboard with Japanese keyboard can search emoticon with katakana and kanji, but still not with English (it only interprets emoticon in current keyboard language)

I found the answer 10 minutes after posting the question, that's silly.
The trick is, you must search in hiragana. Even if your locale is English (like in my case).
For instance, search for ねこ instead of cat or 猫:

Most users type the hiragana before getting the kanji anyway, so it kind of makes sense if you think about it afterwards.


text:
What is the equivalent of UEFI/BIOS in Android?
I'm having the hardest time finding the name of Android's equivalent of the Unified Extensible Firmware Interface (UEFI).
Maybe they are specific to each manufacturer? I am specifically looking for the one used with Samsung Galaxy phones. Is there an open source specification for interfacing with Android phone hardware, similar to how UEFI and BIOS work?
The closest thing I have found is Replicant OS. The description says "Replicant is a fully free Android distribution running on several devices". If it can run on many devices, would that mean it's using the same firmware 'interface' across many devices?

The firmware is more related to hardware (and hardware type/architecture) than to software/OS. OSes must support that hardware/firmware but the firmware is not part nor exclusive of the OSes.
ARM is the typical architecture where Android runs and yes, it varies a lot by the manufacturer.
Replicant OS is geared towards ARM-based hardware and, according to their FAQ, is currently supported in few devices and some of them only partially, I imagine because getting support for a specific device depends on how "open" the manufacturer is about it. And there are limitations because there are lots of proprietary stuff that's needed for full support, there are features missing without non-free firmware. Definitely not as easy as your typical PC.

Arm is not as standardized as x86, quite fragmented in fact. On Qualcomm platforms, it tends to be PBL -> XBL (or SBL) -> ABL (or ABOOT) but it's dependent on the board. There is no effective standard yet like UEFI. Arm SystemReady hopes to tackle this problem if the manufacturers try to adopt it.


text:
Asking for the return of experience about using Android AOSP for embedded device
I want to use Android AOSP (without GMS) as OS for an embedded device, is there any return of experience about this. I have some questions about this:

What is the used system for providing OTA updates?
I heard about Google providing updates for only 3 years so we need to adopt next major update during 3 years, is it true?
I heard about project treble that aims on providing forward compatibility on vendor implentation part, any experience on that?
What are the faced difficulties / challenges?
Any other subjects?

You are mixing up a lot of things:
Google Mobile Services (GMS) as well as all the other Google apps and services are not part of Android Open Source Project (ASOP), therefore using AOSP you will never get them.

What is the used system for providing OTA updates?

AOSP is source code. You can clone it using Git/Gerrit to clone the source code repositories - thats it (and then use it to develop an own version for your device). OTA updates are provided by Google for Google Smartphones. The same is true for any other vendors selling Android Smartphones (if they provide updates at all).
Every device gets it's very specific update. Update by Google are useless for any other device.

I heard about Google providing updates for only 3 years so we need to adopt next major update during 3 years, is it true?

That is true for Smartphone Android versions. I can't find the source but AFAIR Google is providing patches for the AOSP source code for more than three years.

What are the faced difficulties / challenges?

For you the largest challenge is to understand that Android is not an OS like Windows. There are no general OS that can be installed on different device types, there are no binary releases, no binary updates, just the source code without device drivers, ...

Any other subjects?

As it turns out that originally you want to develop an own ROM please use https://stackoverflow.com for further questions as developing question are off-topic here.

Thank you for your answer, when I said GMS, I reffered to Google Mobile Services that I won't consider because I dont expect to perform a google certification for the device. Also, for the update, once I build my image, what is the used system to push updated to that device?

Over the Air update (OTA) updates usually delta updates. AFAIK they are usually provided via HTTP(S). Usually they have a cryptographic signature. However I don't know how much of the updater is part of AOSP.


text:
Control another phone via bluetooth
I need to control an android phone by another android phone using bluetooth.
Same as Teamviewer, but via bluetooth.
Suggestions ?
I have root and xposed.
So far I found only apps that use Wifi, or that transmit to a TV. Not what I need.
To make it more difficult: one of the devices is android 4.1
Edit 1: I said mirror before. It was wrong. I meant control. Need to view and control another device.
Edit 2: It may be something different than bluetooth, as long as no internet be required.

Bluetooth is too slow to transmit video data like it is needed for screen mirroring/sharing.

It's fast enough. There's an app called "Bluetooth Remote Camera" that I stumbled while looking for this. If it's that fast, then it's great.

Technically screen mirroring is very close to video streaming. See this related question: https://stackoverflow.com/questions/32414806/video-streaming-over-bluetooth

Thank you, Robert. I have edited the thread to correct my request. Even if the participants of your linked question had achieved a result, it wouldn't yet match my need.

Would a battery powered WiFi access point (i.e. a RaspberryPi) be acceptable to link the two Android phones?

Android has a Wifi mode called "Wi-Fi Direct" which allows to connect two Android devices without any need for a third device like an access point. You can check the screen mirroring apps if they support Wifi direct.

I found the WiFi Direct idea very interesting. But you yourself pointed out the main problem: a mirror (control) app that doesn't demand an external server. So far I found not such an app. I'm open to recommendations.

The WiFi AP is another idea, but I think it falls on the same problem as Robert's solution: no control apps that work over LAN exclusively.

RemoDroid is the answer.
Works through WiFi Direct.
Works on older phones by using older versions  (0.15.4 worked on my 4.4.0, same version installed on both).
Not bluetooth, but works.
Thanks Robert for showing the way


text:
Is it possible to enable native video calling in stock android?
My phone's IMS status shows that video calling is unavailable that I can't do native video calling.
I'm using stock android on Asus  Zenfone Max Pro M2.
Android version 9.0.
So is it possible to activate video calling.

From what I can tell, IMS requires the carrier to support the software & hardware. But that's not say you couldn't do video calling over a separate service/app.

Yes I can't do native video calling.


text:
Apps don't work with IPv6 enabled in router
So I've been having this issue for a while now where apps work fine over mobile data won't work when mobile is connected to otherwise perfectly working WiFi.
Some such apps are-

Discord (keeps on connecting and asks to check server)
Spotify  (keeps on loading)
twitter  (continuously loads)
google keyboard gif search tool while using WhatsApp (No gif preview and unable to send them.)

I'd like to mention that the same apps work great on other devices over the same wifi. I made a thread about it last week -
Here's my post on XDA which temporarily solved this issue
The temporary solution that doesn't work anymore was clearing phones cache and putting it on airplane mode.
Now I found a way with which I was able to replicate this 'bug'. Turning IPv6 off in my wifi settings. It worked, for now at least.
Using this guide's 11th given solution fixed my problem for now.
~So do I keep the IPv6 off without any consequences or is there a workaround cause from what I know IPv6 is important and it should be on.
Is there a better, more concrete solution?
Device-Xiaomi's Redmi Note 3-Kenzo
Root- No
OEM- Unlocked

Do you receive v6 IP address at router from your ISP? And does router assign your phone an IPv6 (through DHCP6 or SLAAC)? If no, then disabling IPv6 on router as well on phone is a wise decision.

@IrfanLatif is there a way to check the above mentioned? Cause I am not sure about either of these.

Use ip a on phone, see router's obtained IP in admin panel. Or visit https://ipv6-test.com/.

@IrfanLatif Upon enabling IPv6 from the router settings and running the test on my mobile, the results state that IPv6 is not supported. So does it mean the problem is on the ISP side?

It's not a "problem" as such, it's expected. Not every ISP is IPv6-ready and even if they are, every consumer might not get IPv6 address immediately. The details must be in your contract with the ISP. Or you may ask them if they provide IPv6 service and if the router is capable of handling IPv6 routing things.

Well if it's not a 'problem' and/ or doesn't hinder any of my abilities on the internet should I just keep on going with IPv6 switched off?

If you don't already know what capabilities you lack due to not having a v6 IP address, then you certainly don't need those capabilities. Keeping IPv6 off won't do any harm to you. With root you can switch that off on Android device too.

I mean, not being able to use important apps over wifi in itself is hindering my internet access isn't it? But if that's all and I will not Miss out on anything else then I guess I'll keep it off and just move on.

May be the router is assigning your phone an IPv6 and some of the apps try to connect to internet over IPv6. But router doesn't have IPv6 from ISP, so you face the hindrance. Will have to troubleshoot in depth to identify the problem.

Solution- Keep IPv6 turned off.
Reason- ISP not providing IPv6 connection so while it's on in the router settings it somehow stops my access to certain apps only on my redmi note 3.
Yeah IDK but it's good enough for me.


text:
How can I install apk that allowing only installing from google play?

I have apk that I want to edit the assets on him and upload that back to the device. The apk downloaded originally from the google play, and I used apk extractor to get the apk of the app.  But when I'm trying to install the new one from apk, and not from the app store, I'm getting an error on start saying app not installed from google play store, reinstall from there.
I put my hand on the code by revers engineering with jadx.
So I know that they check by install package name and I even found the function to edit, but I can't edit because (because I don't know how to recreate the classes.dex file and I think because this is not like the real source code, I get a lot of run time errors).
I tried also adb shell pm install -i com.android.vending -r [package name] didn't worked...
Does anyone know what I can do?
Thanks,
Alon.

One edits a classes.dex by baksmaling it and then smaling it back with ApkTool, which can deconstruct an app into assets and source code. The code is written in a low-level language called Smali, partially resembling Assembly. Editing Java or Kotlin directly is not possible.


text:
Changing timer sound in Oppo devices
I have an Oppo AX5 with Android 8.1.0. The clock app timer sounds like a smoke alarm.
How can I change the timer sound?

Google clock has settings specific sound for timers.

I agree. It's awful! Nearly gave me a heart attack the first time it went off. I have the Oppo A91, same story. Not having much luck on Google unfortunately.


text:
Screen Mirroring error : Green screen with audio
My device is lyf flame 1 {Ls-4503} android 5.1

There is no wireless display or screen mirroring option in it.However when i use playstore app like miracast or ezmira ,i see this option

Clicking on the device, it gets connected but i see only a green screen on my tv .I can hear the audio,but there is no video only green screen.

In the setting menu,i clicked on the devoloper option and turned on the wireless display certificate

In order to find solution, i rooted my phone to instll a custom rom, but my bad luck!, there is no custom rom available for my phone.I installed Xposed Framework,but i found no module to fix this problem.Also there is no twrp recovery available for my phone,so i can not go for magisk module.
Note: The anycast device is working properly.I connected my laptop and it was working perfectly
Help me to find a solution for the green screen problem.Any suggestions will be highly appreciated

Had the same issue, and tried to reinstall/update the display driver = Intel(R) UHD Graphic 620 at https://downloadcenter.intel.com/product/126790/Intel-UHD-Graphics-630.
It's 100% solved. Microsoft issues.


text:
How to find screeshots from PC?
I'm looking for a screenshot, which I can see in Google Photos under Device folders -> Screeshots.
But when I browse it from my PC (Windows 10), in DCIM folder I can only see Camera one (I read it should be Screenshots next to it).
Why is that? Is it possible that I don't have permissions to see it?

In my case screenshots were actually located under Pictures/Screenshots.
Yet for some reason this directory wasn't visible when I was connected in (I believe default) Transfer files mode.
When I switched to Transfer Photos (PTP) , the Screenshots folder became visible from file browser.
To change, I needed to click on notification USB for file transfer, which popped up on my phone.

Most likely if you switch back to "Transfer files / MTP" mode the screenshots will also be visible.

@Robert that is right, why is that?

This question is quite common. See for example my answer here.


text:
Use video for camera emulator in Android Studio for debugging camera / image recognition based App
I need to debug some image recognition app and therefore need a specific camera input to see if the app is working.
Is there a way to use a custom recorded video, for example using the Android Virtual Device manager and it's emulated camera?

AFAIK only "real" webcam streams can be forwarded to the emulator. However there are applications that simulate a webcam (e.g. to Windows) based on a video.


text:
Download transfer question
I downloaded a music album from the Google playstore on my Samsung phone.  How do I transfer that album to my Samsung Music App?

It can be only used in Google Play Music app,unless you make it avaiable offline. Then you will find your music on your phone, and SMA will register it automaticly.


text:
How to remotely control an android phone without using the screen?
Ok Today I got a problem where something looking like a blue ink stain progressively leaked inside the screen in 6 hours until things turned from blue to completely black until nothing can be displayed anymore.
The touch screen still works so I can still do things like doing a phone call, but I don't remember anything else for accessing apps or other menus.
I have usb debgging on and all Samsung/google remote control operations enabled (but as far I'm aware they don't allow full control). I also have teamviewer installed but it's not configured.
Because the point is the phone is connected to Internet. I need to go back home today and I need the gps for it. Local sellers don't have the screen before 3 weeks.
However, I have a second tablet but it's WiFi only. If I could find a way to remotely enable WiFi tethering (or with spoken commands) things could a lot of easier.
Update :
Now it’s not only the phone which has a problem, but the car does no longer run (as the engine is burning it’s own oil).
And has young driver still on bail, I can’t rent anything.
Though I’m still interested on how to solve such kind of problems in the future.

You can setup Tasker or MacroDroid or some other automation app to enable tethering on target device when receiving a certain trigger. The trigger can be a voice command (might need AutoVoice app too) or an SMS with certain keywords is received, or anything that suits you.

@Firelord and does setting that kind of thing requires using the broken screen ? Remember that some permissions need to be manually enabled using the screen in Oreo. Because such apps aren’t installed.

Sorry, totally forgot the main issue of having a broken screen. Does your target device has support for OTG? If yes, you can use a mouse with an OTG cable to setup those automation apps in the target device. This assumes that the broken screen still shows something. If it doesn't, my advise wouldn't work.

@Firelord though I can still start and stop the tablet. And install app with permissions if they are required before install. They are still auto start apps on Android Oreo (I mean apps which start automatically on start‑up even without setting special permissions after installing or having ever started the app manually). I can also use ᴀᴅʙ over ᴜꜱʙ. The touch screen still works perfectly as described in the question, so it’s not about using the known Bluetooth mouse I have in Bluetooth settings but to know where buttons are displayed.


text:
Can developers build applications for unsupported Android versions?
My smartphone still works as a mobile phone. I would like to exploit it at its full potential but many applications don't support its "old" operating system Gingerbread 2.3.6.
I do not want to buy a new phone because it works well. However, I would like to develop apps for my personal use on this phone but Google does not support Gingerbread since 2017.
Can developers build applications for unsupported Android versions?
Note: the question is also about programmed software obsolescence. Currently, we cannot make libre software distributions on all devices. Android is an open source operating system so there may be possibilities to maintain smartphones despite proprietary locks (hardware and software). The question allows you to see what can be done for a working device: why a working Android device is become unusable? From my point of view, the device is still usable if someone maintains a functional development environment which allows to develop new applications.

If it is that old it is an UMTS/GSM only device. Most mobile network operators around the world are converting UMTS cell towers to LTE/G5 cell towers, therefore in the next few years your phone will more and more loose mobile Internet via UMTS. Make sure you don't put too much effort into that device.

Qualified yes, but it becomes more difficult (and depending on the features required impossible)
Devices with Google Play has a set of built in services - Google Play Services - which is provided for free (or nearly so) for apps. These services include Location & Maps, push messaging (was Google Cloud Messaging, now Firebase Cloud Messaging), Google Sign-in, and others. These services provide a lock-in to developers as they are available in any device that comes with Google Play Store.
All of these services are subject to change over their lifetime and Google has already announced that Google Play Services for Ice Cream Sandwich (ICS) API 14 & 15 will no longer be updated
What this means is that for any app developer interested in the current market of Android devices with Google Play Services, they will have to do additional work to support older devices where the Google APIs are frozen.
Another pain point for developers is that the WebView prior to Android 5.0 was tied to OS updates so WebView issues/quirks varied depending on manufacturer and OS version.
You would also need to find older web browsers as both Firefox and Chrome are at or above Android 4.0. So advances in mobile website development may break on older browsers.
As mentioned by @Robert:
The Android Tools Team has evolved the build tools from the time of Gingerbread: Eclipse IDE based to IntelliJ IDE, Java Ant build system to Gradle build system, etc. There may be a situation where either the tools no longer support the older SDK or the developers for old devices need a depreciated API which is no longer supported by the latest SDK or any recent ones. Additionally Android developers depend upon third-party support libraries written by Google or other developers each of which have their own depreciation schedule.
What can I do
Run a Custom ROM with a replacement for Google Services if necessary, see: Fakestore, blankstore, gms, microg, unifiednlp - what's best for Android without Gapps?
What if I don't want to root/Custom ROM
Any developer would need to find matching APIs for the Google Services which would work at the lower API of the device. They will probably need to pay for things which were free with Google Services like in-app map tiles and push notification.
Note that even the open-source app store F-Droid now has a minimum API level of 14, Ice Cream Sandwich
Developers are still free to create apps which users can download and side-load on older devices, if they don't use any deprecated Google Services for that device

Moderators: Answer focused on explaining to a the user audience the issues facing developers for supporting older platforms which I think the question can be turned into. Otherwise delete if too close to development type question.

There one additional problem: You need the old build tools, as modern Android build tools can't build apps for such old devices.

@Robert - I can still see Gingerbread SDK in the Android Studio SDK tool. As I haven't tried to build anything that old, I agree that there is risk that the current tooling really doesn't support it.

You are right. I had something in mind about discontinued support. But that was most likely only about the support libraries.

You are free to build any app for unsupported versions of Android. However, you won't be able to publish on Google Play Store (if you intend to).
From an article published when Google ended support for ICS:

First, Google won’t allow developers to publish apps that support the API level for ICS — that’s API 14 and 15. That means the oldest supported version of Android in the Play Store is Android 4.1 Jelly Bean (API 16).


text:
How to use setprop via adb shell in recovery?
I messed up flashing a beta Android Q build on my phone.
After that, I can't flash my stable ROM without error 7 in TWRP - device mismatch.
Removing the assert works, but not a permanent solution.
So, I digged through google and my own phone for hours and found out why. My device is identified as raphael in recovery, but it is identified as raphaelin in fastboot and while the phone is booted.
In recovery:
# getprop ro.product.device
# raphael

In booted mode (i.e. while the phone is booted):
# getprop ro.product.device
# raphaelin

In fastboot:
> fastboot getvar product
product: raphaelin

I checked my build.prop and the value in that file is raphaelin too. I tried setprop and it showed that it can't set that property.
So, please advise me on how to set the value using setprop in recovery mode. Or, if you know, please let me know from where the recovery is pulling data for getprop and if I can change that file.

Firstly the main Android OS (what you call "boot mode") and recovery are two independent operating systems. When one is running, other is not. Running processes are different, environment is different, loaded properties are different and so on.
Recovery has its own default.prop file in ramdisk from which it reads properties. In order to permanently change the value of ro.product.device you'll have to unpack recovery.img (or boot.img on A/B devices), modify the file, repack and re-flash.
Secondly you can't set read-only (ro.*) properties once they are already set. Magisk's resetprop tool however can do this, going a little out of the way.
Thirdly ro.product.device is usually set in /system/build.prop. So you can edit this file and reboot device to see changes. There are also some other files from which properties are set on boot.
Make sure not to break dm-verity by modifying /system if enabled.
Since the (/system and other) partitions are accessible from recovery mode too, you can mount filesystem read/write in recovery and edit the file.
Fourthly the value you are getting in fastboot is independent of both main OS and recovery. That's hard-coded in bootloader. You'll get that value even if there is no recovery and no Android OS on device.


text:
Pie 9.0 Low Battery Notification Not Working (Moto G7)
New Moto G7 running Android Pie 9.0
Everything else works fine. The issue I'm having is with the Low Battery Warning sounds and notifications. Simply put, I want the most annoying low battery indicator in the world and it's just not doing that. All I get is the little red battery in the corner. And that's if I'm not watching videos or playing games. Otherwise, it just silently lets me use up the battery and then shuts down. I've already tried:

Exhaustively scouring the internet for any answers
Turning up the volume
Plugging and unplugging the charger
Enabling charging sounds
Checking all the boxes and radio buttons in App info/System UI
Turning the phone off and on again
Restarting the phone
Clearing the cache
Looking everywhere for more answers
Posting my issue on the Motorola Community website
Factory resetting the phone (a last resort that did not work)

TLDR; You either get battery saver, or notifications; not both.
There seems to be an issue with the Android Pie release, or a subsequent patch. When the "Battery Saver" function is turned on, it automatically disables the "Low Battery Notification" features. Or, the battery saver fires and prevents the low battery notification from firing by default. "Save the battery" instead of making noise, popping up a message, and vibrating. I turned off the "Battery Saver/Turn on automatically" function and now my phone interrupts whatever I'm doing to let me know I need to plug in soon.

You can setup MacroDroid app to detect battery saver and notify you about it in the way you want it to be.
Add a new Macro with these conditions:
Trigger: Battery/Power > Battery saver state > Enabled
Actions: as you wish. You can setup a notification with a sound, vibrate, or try other actions.
Constraints: none
Save the Macro and try the battery saver manually. MacroDroid should be working for you in that case.
Note: Tasker app can also do the same thing but it doesn't have battery saver state context. Instead, you can define battery range for your context.
Solution tested in OnePlus 6 running Android Pie.


text:
How to report an issue with the entrance when Maps never thinks I have arrived
Google Maps / Directions has this neat feature where after you reach your destination it asks you if it routed you to a convenient or proper entrance.  This is very nice because sometimes when there is a cluster of businesses it doesn't know the proper way to route you to the building you are going to and you can help out by telling Google where it should have had you enter.
However, there is one office building I frequent that it keeps wanting me to head about 500 feet further down the road.  The would put me right in front of the building on a busy street, whereas the correct entrance is to turn right and go into a parking lot behind the building.  Unfortunately I have not figured out how to report this to the mapping program, because even once I go into the entrance it still is telling me to keep going.  If I exit navigation it never asks how it did!  I used to remember an option to tell it you want to walk the rest of the way but I don't see that any more and don't know if it would help.
Short of going for a long walking detour (which I never have time for), how can I tell Google that I have reached my destination so it can get my feedback on how to make directions better?
Update: I tried walking in the building itself to try to get closer to where it wants me to go while I was waiting for an appointment, but I am not actually getting a signal.  I'm not really sure if it's even possible to get to where Maps wants me to go without walking outside around the whole building, which is probably around 1000 feet.

I think this question is about the Android app instead of the web app. If this is right the question is off-topic on this site but could be on-topic on [android.se].

Usually in such cases the parking lot has a different address as it is connected to a different street. I don't think that Google would change the routing behavior in your case as the routing is correct - you want to be routed to the building. If you want to go to the parking lot this is a different destination.


text:
samsung galaxy tab 3 not charging
the 10.1 inch galaxy tab3 wifi version, is unable to charge
when u plug the charger in, the battery logo shows a bit, but it does not show the charging animation, neither it is charging
where the problem might be located
my skill is decent regarding soldering and so on, and I am willing to repair it myself
P.S. the tab does not boot due to dry and un rechargeable battery

https://www.aliexpress.com/item/32816319569.html

are you sure that it is charging port related problem

nope - you tell us

My suggestion before you take the step of using your soldering skills, try using another charger, leave your tab connected with it for 3-4 hours, as sometime its just the charger that takes the toll of current fluctuation if that doesn't work, than Verify that your device port is not damaged. Carefully inspect your device's charging port and remove any debris. If all's well so far than verify that your Samsung Tab is running the most recent software. Just tap the System Updates dashboard -> tap Device Software. If an update is available, follow the prompts to install. Lastly is problem still persist it's time to perform a soft reset. A soft reset restarts your device and does not erase any of your content or data.Just press and hold both the Power and Volume up keys until the device turns off.
I hope this help, let me know the results.

using other charger was not successful


text:
Remove downloaded system update from Huawei
Due to unfortunate circumstances I need to use my old phone again (Huawei P8 Lite 2017 Emui 5.0.1). I did a factory reset a few days ago, and am now trying to install my most important apps.
Unfortunately I keep running into space constraints. It seems there is a 2.4GB file downloaded for a system update, but even before installing any apps my phone did not have enough free space to execute it.
I am willing to accept being stuck on a lower version till I switch my phone, but I need to remove the huge file as the 2.4GB is blocking me from installing critical apps.
I have already blocked new updates from being downloaded automatically, but am now stuck with the one that is already there.
So hence my question:
How can I remove the downloaded system update from my Huawei phone?
What I tried so far:
- Install a file browser and look for an OTA dir, I don't seem to have access to that
- Go to the update and storage cleaning apps, but I did not see any way to clear this download
I imagine I could do a factory reset and block automatic downloads before connecting to wifi, but as I just installed and configured 80% of my apps, I really don't want to do that.

Check if you have dload folder. The update files might be there.

You can try to apply the update using a PC and the Software provided by Samsung. I am not sure how much free space is necessary for install an update via PC. The is a similar question with is a bit old by may still be helpful: https://android.stackexchange.com/questions/32205

It happened the same to me in a Huawei Honor view 20. I managed do delete the file. What happens is that the system creates a ghost file to lock the required space for the update (in my case it was 4.27gb)  before the update is actually downloaded. As a previous comment says, I went to settings > apps and Clear Data for the Software Update app, but the 4.27gb were still being used even after confirming the delete option there. What I did was disabling the auto download for system updates over wifi and actually accepting the download and installation in system > software update. When the download just starts, pause it. In this way the size of the update file will be actual downloaded size, which was interrupted and it's not going to be resumed. In my case I passed from a 4.27gb file to a 71mb file.

Wow, quite an impressive journey. Cannot test anymore but will accept as this sounds likely to help future visitors!

Go to settings > apps and Clear Data for the Software Update app. Seems to work as the app takes up 3GB with an update downloaded.

I found that the update was actually not (fully?) downloaded on my phone yet.
Perhaps this contributes to not finding a way to delete it, though I doubt that.
The way you can validate this is by turning on the airplane mode and going to the upgrade. If you are in my situation,  you should get an error message about downloading.

This still leaves the mystery of why my 16GB phone with 6GB firmware and 1~2GB apps, content, cache etc. Complains about being 90% full, but that may be a separate question.


text:
SELinux always set to permissive, how to set enforcing permanently?
I flash a custom ROM to my HTC B2UL.
The ROM, by default, has the SELinux policy set to Permissive instead of Enforcing.
I can use adb shell setenforce 1 to make SElinux enforcing. But after reboot, SElinux status still return to Permissive.
Is there any way to make SElinux always be Enforcing?

See this answer and this issue for details on how SELinux is enforced on Android. In short it depends on cmdline parameters of kernel and build configuration of init.
Check on your device:
~# cat /proc/cmdline

It must contain androidboot.selinux=permissive. You need to remove this parameter from kernel cmdline permanently in order to enforce SELinux on boot. This can be done by unpacking boot.img, modifying, repacking and re-flashing. Use AIK or magiskboot. Or you can also try Kernel Selinux Patcher.
But make sure you have a working sepolicy on your device or you may get into bootloop. Custom ROMs are usually userdebug builds with incomplete policy.


text:
Data connection is disconnected while talking with phone
I see that my Samsung A5 running Android 8 drops data connection when I am talking with the phone app.
I mean, while data connection is ON and I see 4G icon, by placing a call or answering a phone call, the data connection is lost. After the call ends, I see that it goes back to normal state.
Is that normal?

That is the normal behavior if Voice over LTE (VoLTE) is not active. It has to be supported by the device (and it has to be active) as well as your mobile network provider (and it has to be enabled in your data plan as well).

Yes that's normal. Voice calls and text messages are preferably sent over GSM (3G/2G) while data operates over 4G. The phenomenon is called Circuit Switched FallBack
(CSFB). MNOs usually don't invest much in VoLTE, an all-in-one 4G solution.

I can not find Voice over LTE in the phone settings. Either phone or data settings from provider doesn't support that :( Thanks.


text:
Contacts displayed multiples times with different color codings
Today, I migrated to a new cell phone running Android Pie. The model of the phone is Xiaomi Mi A3. I use to back up all my contacts on Google Contacts and sync it whenever I change my phone. This time, I ran into an issue. Though each contact is saved exactly once in Google Contacts/Contacts App, I find multiple copies of each contact displayed in my Phone App with different "color codings". I assume the colors represent something which I have no idea about.
Kindly suggest a way to get this resolved. Thanks!

In the app's settings, check which contacts are displayed. It is quite possible that all contacts form your sim card, Google account and other are displayed. If you only your Google account if you only want to view those contacts.

@ReddyLutonadio I checked. There are no saved contacts in my SIM card. And the only account where all my contacts are synced is on Google's. Moreover, I don't even see an option to merge duplicate contacts on my phone, if there are duplicates present.

What happened when you view the contacts via the phone app, then via the contacts app? Do both apps show duplicates? Note that I said Phone app and Contacts app.

@ReddyLutonadio Phone app is showing duplicate contacts, each with a different color coding. It seems that they are the contacts automatically created by the system. Contacts app is showing no duplicates.

See if this question helps. If not, click each duplicate and try to see if numbers are different, check if the location (storage) is different, etc.


text:
How do I switch profiles in Chrome for Android?
Is there any way to switch Chrome profiles while using the Chrome mobile phone app?

There is no way to change Chrome profiles on Android/iOS as per Google Chrome Help here.
But, you can use apps like Parallel Space to have multiple chrome profiles.

The only option for the time of writing this answer is to install addtional Chrome app from the above list: Chrome Stable, Beta, Dev, and Canary and login with a different google account

Thanks a lot for the tip, works like a charm

I figured out how to do it.
Go to settings on your android phone,
Then select Chrome and "Clear All Data".
When you switch on Chrome again, you can find an option to select a Primary account. Then you can select the account you want.

I ran into this problem. I was able to solve it by downloading the Chrome Beta app from the Play store.
You can then sign into one account via the beta app, and leave the other signed into the regular Chrome instance.

To supplement Amrita's answer, you do:

Open Android phone settings.

Go to Apps.

Find and select Chrome to open App info.

Click on Storage to view storage details.

Click on Manage Storage to manage the storage.

Click on Clear all data to wipe account details from the browser.

Relaunch Chrome, Accept & Continue.

Select desired account from the drop-down and click Yes, I'm in.

There is supposed to be:
If you open Chrome on Android, Menu, Settings, and select your account.
But this just takes you on an endless loop.
I wish changing your user on the phone settings would also change all your apps to log in as that user.

Ugh. The closest I got was removing the account I didn't currently want to use, but then it took some finagling to get the account I wanted to use working properly. Very frustrating.


text:
Charging problem. Please help
My phone (Note3, CustomOS: Phronesis) got a charging problem last night. It does not charge properly when running or if the screen is off now. Usually the LED went on while charging but it stays off now. Tasker is able to detect a power source (i had my Tasker icon change to a battery when connected) but the phone seems to cut off the charging current - like i assume it does it when it hits 100%, If connected now and i use it then the discharge is exactly comepensated, i. e. if i use it for 30 minutes, it stays at 78% the whole time....in fact my power bank led is flashing parallel to power consumption actions... Hardware problems can be 99,99% ruled out, since it charges normally if i shut it down completely.
Last night i had a SuperSU update (automatically) which was asking for the permission for SuperSU itself (i think, also confusing) and for the zygote process... (Expert info: shell, ps ...grep: just 1 process), which surprised me... i think i didn't grant them... (it's not in the app list- didn't ask again)
I also tested the QI - same thing: the phone detects it (effect:visual "smoke rings" on the screen) and immediately it says "wireless charging stopped" (in german)

Did i accidently lowered the cut-off charging from 100% to a much lower number ? If so , how to revert ?
Beside USB-Mode (MTP/PTP,Charging/etc.) and USB Fast Charging....anything else affecting USB handling ?

Hints (even for for Kernel Auditor Mod settings) are welcome.
I found something similar How do I override charging current on Huawei Honor 6?  and i need the files for my Note3...
EDIT: a faulty version of the app 3c was the culprit...

Write an answer. How were you able to find out that the app was the problem? How did you change it? Etc.

i saw the changelog of their next version "fixed charging...." , where it was mentioned - so i was very lucky


text:
Rooted phone but cannot change hosts file
I rooted on my S8+. I used the app root checker to check that it's rooted.
I was attempting to block ads by hosts files with this tutorial
I attempted to copy the hosts file to my pc, changed it, and pushed it back... got:
adb: error: failed to copy 'hosts' to '/system/etc/hosts': remote couldn't create file: Read-only file system
hosts: 0 files pushed. 62.2 MB/s (456580 bytes in 0.007s)

I then attempted to do it by following this tutorial which uses apps to change the files
I did change the host file permissions to -rw-rw-rw-
Then I tried to use the editor to add some DNS but I was unable to save the hosts files once again. When I tried to save it, I got a Toast saying root permissions were given to the text editor.
Any ideas?

Did you mount /system read/write? Did you disable dm-verity with/after rooting?

Quick question: did you try AdAway?

@DeathMaskSalesman why to put extra burden of app when Android's resolver is already doing that for you. My opinion.

AdAway can overlay (bind mount) /system/etc/hosts no need to modify system

@alecxs valid point. But all that needed is mount -o bind /data/media/0/.hosts /etc/hosts or something similar.

@IrfanLatif I guess that, if one wants to do this manually, then they must find a way to run their command at startup. If their kernel doesn't support init.d out of the box, the hacks are either dirty or require init.d emulators, aka apps. Bottom line: if the kernel doesn't already support init.d, then AdAway appears to be the cleanest solution.

@DeathMaskSalesman injecting init.d requires putting 2 lines in any .rc file. But yeah, it depends on what a user wants. Internet traffic may leak on startup by the time apps are loaded. It's another problem.

@IrfanLatif Putting two lines in any .rc file plus repacking and flashing boot.img. If memory serves, the / directory, aka rootfs, is populated anew at every boot, with the contents of boot.img.

So I finally was able to come back to this issue.
I was unable to mount the adb with write permissions either because i was not su or it would deny me to change the host files...
I tried to write the text on the hosts file but it was a file with hundreds of lines... even seemed that android was not able to store it in the "copy/paste"
So in the end I used Solid explorer 2 from play store.
I wrote a hosts file... then i navigate to the /system/etc/
and I rename hosts to "hosts.old" and my "hosts.txt" to "hosts"
until now it seems to be working fine
I'm not considering this an answer because I was unable to write on hosts and someone can come up with a better solution

i try to find some solution about this. but i found it my self.
i go to recovery mode.at twrp you go setting. and (i forgot) try to find something that will give you checkbox list. and tick check box that called 'system'. niw i can easily replace my hosts file
edit: sorry not setting.go to mount and tick system box


text:
Disable Client Isolation when using hotspot
I just moved to a new place and internet is not setup yet so I'm using my phone's hotspot to get online. While developing a Python client-server program I found out that devices connected to Android hotspot cannot communicate with each other. When I ping one computer from another I get a "Destination host unreachable" message. This must be some sort of client isolation. Does anybody know how to turn it off? Using latest crDroid on Android 9.
[UPDATE]
I run a few more ping tests and they seem pretty inconclusive. I got some hits but the results vary between 'Host unreachable', 'Request timed out' and various TTL times (6ms to 4000ms).

Android uses hostapd as its AP daemon. hostapd.conf file which AOSP creates doesn't contain ap_isolate=1. But may be your OEM has added that to configuration file. You can check that with root: cat /data/vendor/wifi/hostapd/hostapd_*.conf. Do you ping the hosts by IP or hostname?

@IrfanLatif I pinged the hosts by IP that I found from executing ipconfig on cmd. I found the hostpad_wlan1.conf file using a root browser and I can confirm that there is no ap_isolate=1 line in there. Maybe it's 1 by default and I should write ap_isolate=0? As I said I'm using a custom ROM so not sure what you mean by my OEM (wouldn't that be Xiaomi for example?).

Sorry I missed the custom ROM point. ap_isolate is not set by default. There must be some issues with your networking. Use tcpdump or iptables -j LOG for troubleshooting.

Updated the post with new data.

As I mentioned earlier watch traffic on both sides using tcpdump when pinging. Even better do ip n flush all and then use arping and watch. See the state of arp requests on both sides. That would give some clue where the problem is.

I have tried with Android 9 by HTC and the connection between clients works. Although I had to wait for it for about 2 minutes (been waiting on a ping loop).

I can confirm that with enough patience, it starts to work (HTC U11), which is quite confusing. I always assumed AP isolation is enabled until reading @OndraŽižka's comment.


text:
What is taking the storage of my Huawei phone?
Update: The suggested duplicate  question does not indicate how to solve it, nor do I think it explains the situation unless there is a unusual amount in the hidden folders

I recently did a factory reset reset on my Huawei P8 lite 2017, and as soon as I installed a few apps if started to complain about memory.
I looked at it from every angle I could think of and it just doesn't seem to make sense. Here is a screenshot of the memory usage:

My question:
Where did the remaining memory go, can I free it up?
Note that I am not allowed to root the phone

@irfan The accepted answer to that question does not indicate how to solve it, nor do I think it explains the situation unless there is a unusual amount in the hidden folders

Please consider reading my answer too. That explains in very detail Where did the remaining storage go?. Then you'll be able to decide easily Can I free it up?

Have added that I cannot root the phone, does this mean there is basically nothing I can do? Fwiw: I suspect OS update files are responsible for about half of the gap, and cannot believe a phone of 2017 is completely unusable today.

Right. I know mostly users can't and won't root their phones but the fact is you can't do a 100% analysis of space usage without root access. As a solution what you can do is factory reset and at maximum flashing factory firmware through some bootloader mode.

The storage summary is not very helpful without knowing the partitions. Use Disk Info to get the info on your partitions, especially how large the user data partition is.


text:
Pixel 3 stuck in Fastboot mode with "no valid slot to boot" when trying to install factory image
I was trying to install the factory software image from https://developers.google.com/android/images#blueline on my Pixel 3. I downloaded the image as well as the platform-tools with adb and fastboot.
After plugging in my phone, I ran "adb reboot bootloader" which put me into Fastboot mode. After this I tried to run the flash-all.bat file, but it was just stuck on the "waiting for devices" prompt. I'm not sure what I did at this point, but I must have really messed up the phone, because now I can't even boot from Fastboot, where clicking "Start" just puts me back in fastboot with the reason "no valid slot to boot." Any idea how I can get my phone working again?
I tried putting my phone in recovery mode, but I just got "error booting boot.img"

In this state I was just able to run "flash-all.bat" - which let me load. Not sure why it wasn't letting before.


text:
Unpacking and repacking boot.img changes it's file size
So I unpacked boot.img file using unpackbootimg in ubuntu. Then without changing the file I repacked it. But the filesize became smaller. From 36.7 MB to 17 MB. I tried to flash that image to my phone. But it failed. Also ramdisk file was empty after unpacking the boot.img.
Note: This specific rom is a rom from Symphony i97. It has Spreadtrum UNISOC SC9863 chipset. And I unpacked this rom using spd research tool. Also this phone's fastboot and adb commands are tempered so most of the commands don't work. Most of the time it says unknown command or not implemented.

Ubuntu's package is outdated. Use AIK or magiskboot.

Actually I already used AIK. While using AIK I got an error message saying "The system cannot find the batch label specified". So it seems that this boot.img isn't a normal one. So is there any way to manually decompress the file and extract file data?

That error indicates a problem with your .bat file, not the boot.img. The batch file you downloaded with AIK couldn't run. Check that file (unpackimg.bat) for errors or you may also use AIK on Linux and Android.

okay. So after reading magisk notes. I think I know why there was no ramdisk. But the problem is even though I patched my recovery image using magisk it won't flash. And yes file size still became small. From 40 MB to 25 MB

Please explain it won't flash. Size may get smaller, contents should be complete. Which device you are on? Is it A/B, system-as-root, treble? Android version? What's the purpose of unpacking boot.img?

It's symphony i97. It's a new phone with new Speadtrum Unisoc SC9863 chipset, Android version 9.0, reason for unpacking is for rooting the phone and adding a custom recovery. Tried flashing using spd research tool. Because fastboot won't listen to the commands given.

No experience with SPD, so can't say anything for sure. Better add that device related info to question.


text:
How to build LineageOS for a device without official support?
I have a Mi 8 Lite (platina), for which there is no official LineageOS support. But LineageOS custom ROM for the device is available on XDA. On further research, I can see that vendor files, device tree and kernel source code is available for my device:

Kernel Source
Device Tree
Vendor Files

How do I build a LineageOS ROM for my device without official support?

Hello daltonfury42. Sorry, but development related questions are off-topic here. Please visit [help/on-topic] to know the scope of our site. I don't know whether [So] takes up such questions. Since you've already put efforts into helping others, I suggest you consider XDA, Medium, or some other platform to share this category of information. :-)

@Firelord This is not related to development, or writing custom ROMs. These are steps to 'build' a ROM by downloading and compiling it's source code. But if you still think it's a development question, I will move it to stackoverflow.

Questions related to building apps or ROMs are not considered within the scope of this website, so you're free to take it wherever it pleases you.

@Firelord Can you help me move this to stackoverflow?

@daltonfury42 I asked a moderator on [SO] and he responded that it is too broad for their site. May be try their meta or chat room and see if this can be turned to fit into their site's scope?

Firstly you need to setup the build environment. You should be running Ubuntu 18.04. LineageOS build guide for a random device can be used as a reference. Reproducing the steps here:
Install the build packages:
sudo apt install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev adb fastboot

Create the directories:
mkdir -p ~/bin
mkdir -p ~/android/lineage

Install the repo command:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

Put the ~/bin directory in your path of execution by adding the following to your ~/.profile if it's missing:
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

Then, run source ~/.profile to update your environment. After that, initialize the LineageOS source repository and start downloading:
cd ~/android/lineage
repo init -u https://github.com/LineageOS/android.git -b lineage-16.0
repo sync

Downloading LineageOS source will take some time. After that we will deviate from the official build guide. Create a local manifest file telling the repo tool where to pick up the kernel source, device tree and vendor files. The corresponding file for platina can be downloaded from here. If you are building for a different device, use this manifest file as a reference and edit it accordingly. Save the file as
.repo/local_manifests/platina.xml

Rerun repo tool to fetch them:
repo sync

Initialise your build environment:
source build/envsetup.sh

Enable caching to speed up the build:
export USE_CCACHE=1

You should add the above line to your .bashrc file. Then set the max cache size:
ccache -M 50G

Configure jack:
export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"

Edit device/xiaomi/platina/BoardConfig.mk and set the parameter TARGET_KERNEL_CONFIG to platina_user_defconfig:

TARGET_KERNEL_SOURCE points to the kernel code that is to be used during the build. TARGET_KERNEL_CONFIG specifies which configuration is to be used. By looking in arch/arm64/configs/ in the kernel source, I set the value to platina_user_defconfig
Finally start the build:
lunch 16
mka bacon -j8

This should lake a few hours to complete. I usually leave it running overnight. Here is where things get challenging. It’s possible that the build can fail due to errors, in which case you will have to fix it. Once the build has completed, you will find the zip file, ready to flash:

Do you know which signature key will be used when building a LineageOS image this way?


text:
How to check installed TWRP version?
I’d like to know if there is a way to check what version of TWRP is installed using bash (using a file or command in Android).
I could find /persist/.twrps only, which is data file. No command I have found.

Read .twrps with strings but it contains only TWRP settings, not version. I don't think it's possible without booting to recovery.

If you have taken any backup and is still stored inside internal storage, you can look for the string "ro.twrp.version" in the recovery.log for the backup.

@Firelord, thank you. Nice workaround, however, I’d rather don’t want rely on recovery.log as (1) it does not exist all the time TWRP is installed and (2) it might contain older version of TWRP when you create a backup and then upgrade the TWRP.


text:
rooted device: how to run SSH server persistent even on reboot
I (linux user but not an expert) just moved from iOS to android, my device is rooted (Samsung s9) and I want a ssh server running all the time on my android device (I prefer openssh over dropbear) since I have to rsync files. I also prefer linux style commands e.g., systemctl restart service or similar.
I noticed that one can use Termux but it is an emulator, it won't work upon reboot.
MagiskSSH seems to be interesting. Also noticed this thread where pre-built Native OpenSSH and BASH are shared. Also, I am not sure if they run upon reboot). Buildroot has also been suggested to compile the package on my own (but my knowledge is limited on this topic).
On the top of this, I have to install rsync and bash.
So, how do I run ssh server persistent (works on reboot)

Possible duplicate of How to run SSH/SFTP server for multiple user logins with password authentication on Android?

For persistence, run it as an init service. So do I, but only when I'm connected to some network. Also see Termux:Boot if you want to stick with GUI apps.


text:
Can't boot to system after installing TWRP with Odin
After I installed twrp on a S7 Edge, when I reboot to system I get stuck on a loop that only shows the "Samsung Galaxy S7 Edge" black startup screen for about 8 seconds  and then reboots automatically.
I can get to twrp recovery mode if I press the key combo.
I can even flash the original stock ROM with Odin and start the install process all over again. But still getting the same results...
What am I doing wrong?

Where did you download TWRP from?

I think this site is the official one for twrp downloads: https://dl.twrp.me/hero2lte/

dm-verity would be preventing boot if you allowed System Modification. Disable dm-verity


text:
Can I transfer google play data to another gmail account address?
I have been using other people google account for my google play. When I create my own google account, can I transfer every data (example: game account that bind to the google play) from the previous google account to my new google account?

No, you can't. However for games, based on this answer:

the answer is it depends "on how the game data is saved by the developer"  For most games, no, you can't move their progress from one account to another.  But, some games do have that ability.
You'll have to check with the developer of each game directly to see if they have coded that ability for their game.  Google doesn't have an overarching way to move data.


text:
adb install apk successful on device (or emulator), but not found
I am using command line to install apk on devices and emulators. There is only one device at one time, so I don't have to specify the device's name.

adb install file.apk

output:

Performing Streamed Install
Success

I check on the device (or emulator), but can't find the installed app.
Could you please help?

"can't find the installed app" did you mean it's not shown on the launcher (as with any apps having no launcher activity), or in the Settings-Apps list?

my app has the launcher activity. "can't find the installed app on device" literally means I don't see the installed app on the device or emulator.

Check whether the package is listed in the output of adb shell pm list packages. If yes, the problem is with your app per se because the app is still installed. May be try directly launching an activity through adb in that case. If not, you would have to dig into [tag:logcat] to see what goes on when the apk is getting installed.

Thanks @Firelord. Indeed, the package is in the list, but I don't see my app on the screen. Probably it's due to the app itself. I will try to run the app directly from adb.

perform a full uninstall
adb uninstall <your-package-name>

then try reinstall your app
adb install app.apk

I faced this issue on the flutter release installation.
This problem happens because of different app signatures between debug and release

I kid you not. In my case, I was comparing two apps(app1 and app2) and what I was actually doing was install the app2(adb install in app2 directory where the apk path and filename happened to be identical to app1), when I really meant to install app1, and it simply said "Install Success", which was true; the app2 was indeed installed.

I had to run adb uninstall com.myname.myapp from a different machine.
When I did it from my windows PC, it was failing because it did not find the app. When I did it from my ubuntu laptop, uninstalling worked. Subsequently running the installation from the original machine (Windows PC in my case) did work as well.


text:
learning then mastering and using Android for a Linux "guru" using the command line?
I am a 60-year old Linux guru: coding Bismon (documented here) and using and coding on Unix since 1987 (SunOS3.2) and Linux since 1993 (but I never used Windows, and very probably never will). Of course, I do like command line interfaces. My sight is not very good but did improve (I got cataract surgery a few months ago). BTW, I did contribute to GCC plugin system thru  GCC MELT (an obsolete Lisp-like DSL -that I designed and implemented- to extend GCC)
For my 60 years birthday, my grown-up kids gave me a tablet: Huawei MediaPad M5 (Android 8) which I completed with a Logitech bluetooth physical keyboard.
I want to understand much more how Android works. Of course it runs a Linux kernel (so same syscalls(2)), with a strange bionic libc. I knew (and wrote a technical report - some internal survey document) the internals of JVM and JNI in 2001. I do know a bit of Java.
I don't have the time to study all the source code of the open source parts of Android. I probably would have the skills to do that, but not the motivation and time.
It seems that Android is using setuid & chroot techniques quite differently than usual Linux distributions do. Where is that documented? Apparently, each JVM (for every Android app) is running under its own uid.
I would like to be able to code small GPLv3+ applications for Android. What do I need to learn. I just did download the SDK tools for my Linux AMD2970 desktop.
What are the next steps? I know that Qt has been ported to Android and wish to code for it.
What would be the Android equivalent of the ALP book to code Android applications with both Java and C++ (Android NDK). Or where is the equivalent of section 3 of man pages for Android? I am considering cross-compiling musl-libc for my tablet.
I am afraid of rooting my brand new tablet (that could lost the warranty). I might be tempted to install some Debian-like thing on it within a year. Is that reasonable?
I might port SBCL to my tablet (if that is easy, which I don't know).
PS. I am a free software enthusiast.

Dear Basile I am sorry but your question is off topic on all StackExchange sites as every answer would be opinion based. Therefore it is impossible to decide if an answer is correct or not. Anyway I would recommend to just use AndroidStudio and develop a simple Java based app. C/C++ is possible but makes development and debugging way more complex. If you have concrete development question you can post them on https://stackoverflow.com

Hello Basile. The objectives of your question are outside the scope we have established for this site. However, certain forums like Linuxquestions, XDA, and Reddit might be able to help you out in this case though. Good luck. :)

"I am afraid of rooting my brand new tablet" - Huawei disallows bootloader unlocking, so you won't be able to do that anyway, which will limit what you can do in the long run.

I guess that within a year, someone could find a way (for rooting my tablet). People are creative.


text:
How to unlock teclast p80x bootloader?
In the Developer menu, I have enabled "Unlock OEM".
I run the following commands in adb, and get the following errors:
fastboot flashing unlock =

FAILED (remote: 'Not implemet.')

fastboot: error: Command failed

fastboot oem unlook =

FAILED (remote: 'unknown cmd.')

fastboot: error: Command failed

fastboot flash recovery recovery.img =
Sending 'recovery' (14100 KB) OKAY [ 0.599s]
Writing 'recovery' F**AILED (remote: 'Flashing Lock Flag is locked. Please unlock it first!')**
fastboot: error: Command failed

Please help.
Thanks,

I'm assuming you are referring to this device, http://www.teclast.com/en/zt/P80X; Are there any resources from the manufacturer stating they support this functionality?


text:
Can not receive WhatsApp messages unless I open the app
I have a Huawei P20 Lite with Android 9, EMUI 9.1.0 and WhatsApp 2.19.253, which is the latest version.
As I wrote in the title, I can't receive WhatsApp messages, after many hours of researching I didn't find any solution for my problem. This is the first time I face whit this problem, because I managed and configured variues P20 Lite but none of them gave me that headache.
The things which I did:

Turn on every single option for WhatsApp's notifications;
Uninstall the application and install it again;
Remove the app from the battery optimization process;
Clear the cache;
Enabled automatic start, secondary start and running in background, following this steps Settings -> Battery -> app launch -> 3 vertical dots -> manage manually;
No limit for internet traffic and allow background data, following Settings -> networks and wireless -> data usage -> select WhatsApp -> enabled the varius option.

Any idea or solution for this problem?
EDIT
When I send a message from my phone to this P20 Lite, on the message appears only 1 tick, such as the P20 is disconnected from wifi/mobile data, but the wifi is enabled and connected, the same behaviour with mobile data.

Have you disabled background data for Google Play Services? This service is used for notifying Whatsapp of new messages. See this question and it's answers for details: https://android.stackexchange.com/questions/216714

@Robert No, the only things which I did, are wrote in the answer

Does your phone never receives messages when the screen is off or is there just a long delay. Let someone send you a message and leave the phone alone for may be 30 minutes.

@Robert Yes, the phone receives messages when the screen is lock, but after 5-10 minutes WhatsApp stop doing is background work such as the system kill the process. When I open it everything works well, instant messages with screen on and off

The OP in this thread also had the same issue as you and it was solved by going to «Setting--> battery optemization --> select "all apps" on the little arrow and go to Whatsapp and select " Not allowed"». There is another solution also on that thread. I know you wrote about battery optimization but try once more, you never know.

@ReddyLutonadio Already tried this way and already read this post, anyway thnaks for the advice.

I just had this issue here with P10 - WhatsApp would not receive until opened or at least running in the background. Now it receives even if closed. I solved it by:
Settings > Search for setting > Ignore battery optimisation
If by 'Allowed' apps you don't see Whatsapp, click on the corner triangle for 'All apps', search for Whatsapp and 'Allow'

I had similar issues with late or no notifications showing up, eg for Snapchat, Messenger.

It is called PowerGenie and it kills all apps that are not on its whitelist. You cannot add custom apps on their pre-defined whitelist. This means there is no other way to fix proper app functionality on Huawei than uninstalling PowerGenie.

https://dontkillmyapp.com/huawei
Basically you can remove PowerGenie without root using ADB:
adb shell pm uninstall -k --user 0 com.huawei.powergenie
adb shell pm uninstall -k --user 0 com.huawei.android.hwaps

After I removed those packages I receive notifications 100% of the time for all my apps, just how it should be (and with no impact to battery life that I can see).


text:
How do certain apps show new notifications when internet access is restricted to them?
I have disabled WhatsApp's access to Internet by disabling both WLAN-usage and mobile network usage.
I thought this should block WhatsApp from accessing the internet. But miraculously WhatsApp gives me a message with ominous content: "You might have new messages"
When I open WA it does not show any messages. When I then give it back it's access rights wonder what, there are messages I received the same day!
So to me it looks as if this app has found its way to sneak around my network restrictions.
So the following questions arise:

Is my assumption about the effectiveness of restricting the "data usage" for apps wrong?
Does WhatsApp hack around the standard restrictions?

This question about firewalls is related: Receiving App Notifications from apps that are blocked by a network firewall

App developers can tell better but what I perceive is that many modern apps use Firebase Cloud Messaging - a proprietary service from Google, not part of AOSP - for push notifications. In fact developers are forced to use Google's proprietary products unnoticeably. Quoted from here:

The Doze restriction on network access is also likely to affect your app, especially if the app relies on real-time messages such as tickles or notifications. If your app requires a persistent connection to the network to receive messages, you should use Firebase Cloud Messaging (FCM) if possible.
  ...
  FCM is optimized to work with Doze and App Standby idle modes by means of high-priority FCM messages.

FCM is a part of Google Play Services (1):

FCM SDK's only hard dependency is Google Play Services

Play Services is a set of apps which are injected to Android devices with highly privileged permissions, so they aren't subject to data/battery restrictions.
Since you have blocked only the app and not Play Services, app may receive push notifications (though the actual data may not be delivered to the app).
So block GMS in order to block push notifications. Or choose the apps which aren't fond of Google.
RELATED: What is the exact functionality of Google Play Services & Services Framework?

See also: https://github.com/Telegram-FOSS-Team/Telegram-FOSS/blob/master/Notifications.md#notifications

@LucasRamage yeah, gradually taking control.

As you have denied direct network access, WhatsApp can't access the Internet for directly sending/receiving data. However push notifications on Android are mostly not received by the apps. Instead all configured push notifications are received via Google Play Services. The Google Play Service is a different app on your device that still has Internet access.
Those push messages mostly don't contain the actual message and instead are just used as a notification that new data is available. Whenever such a push notification message arrives WhatsApp knows that there are new messages and tries to contact the WhatsApp server to retrieve it.
In your case the connection to the WhatsApp server fails and WhatsApp only displays you the message "You might have new messages".

No, WhatsApp does not hack around the network restrictions.
The app, after a certain amount not being able to connect to its server because you have disabled internet connection, is just guessing. That's why you get the message: "You may have new messages" from its Failure notifications channel.
From How to stop WhatsApp 'You may have new messages' notification:

As such, though WhatsApp is running and mobile data is turned on, it may not be able to access the internet.
  It's only recourse is therefore to throw this notification as a guess since I suspect it can’t tell the difference when a poor network is to blame and when its network rights are being micromanaged by the OS.

WhatsApp uses FCM push notifications to notify the app when there are new messages. FCM is part of Google Play Services and so works even if the app itself has no network access. Normally, the WhatsApp server pings the WhatsApp app via FCM, the app wakes up and checks for new messages, decrypts them, and shows a notification. But in this case, it's unable to check for new messages, so it just reacts to the ping by saying "you may have new messages".


text:
How do I make my phone stop starting in charge only mode when I plug it in?
I did something with developer mode and now whenever I plug my phone in it wont let me access the files until I pull down the task bar and tap on "Charging via USB" which brings up a window where i can change it to "Transfer files". But I have to do this every time and it's so annoying that I basically don't transfer files to/from my phone any more.
In settings > system > developer options I disabled USB debugging, but it didn't seem to change anything.

In Settings -> Developer options-> Select USB Configuration, try to selecting MTP (Media Transfer Protocol).

I re-enabled the "developer options" switch at the top so I could edit it, but the "Select usb configuration" option was already set to MTP. It still seems to default to charging only though.

Did you recently update the device? Which Android are you running?

@stackers that developer options setting works only in screen unlocked. This is the default behavior since Android-6, as a security measure: https://android.googlesource.com/platform/frameworks/base/+/fcf10f7c12cb3107bdfedce6f76a8c866d154f3c. There are third party root solutions though which may set MTP as default.

i have android version 8. i think i tried to set up something for development, but don't need it anymore

At least on my device, it is a default behavior and cannot be altered. It was brought in with Android 8 and is same on 9 and 10.
The default USB connection mode is always charging. You need to manually enable the file transfer mode when needed.

Although I can find no technical reference for this information, this is my experience as well. The general explanation in other groups is it's a security issue in case you connect to an unknown device (say to charge it) and it attempts to load malicious software, possible of MTP or PTP is the default connection type.

@acejavelin technical reference. It makes sense even if we don't consider the malicious software thing. We are not always with phone when it's locked (feel more secure). We leave it for a few minutes and one could simply access our data by connecting it to a PC. That's like ridiculing the locked screen.


text:
Disable external GPS
I use Android Auto a lot.
My car's entertainment unit, which I connect my phone to via USB in order to use Android Auto, has it's own GPS antenna.
But it's slow to obtain my location, and often downright wrong, like several kilometers/miles off.
My phone's GPS is a lot faster and gets much better results.
But it seems the external GPS in my car always takes over when I connect to it.
Is there a way to disable it completely, and only rely on the phone's own GPS?
Hardware information:
Phone: OnePlus 7 Pro, Android 9, Oxygen OS 9.5.11.GM2BA
Car entertainment unit: Alpine iLX-702D

I would double check the granted permissions and if battery savings mode is enabled (disable any battery savings and test). You may also want to identify which country or region you are using the device if there is some location related issue.

@MorrisonChang All permissions granted to Android Auto, including location. No indication of battery saving being enabled, couldn't find an app-specific setting for that, just the general one that's disabled. As for the region thing, I don't see what it could be. I mean... either GPS is enabled or it's not, I doubt there's a middle ground. And it does work most of the time, it's just slow (1-2 minutes) at getting a fix on my location at first, and once in a while it's inaccurate. But only in the car, never when the phone is used standalone.


text:
Whatsapp limiting network usage?
Someone I know has recently registered with Whatsapp and has been a heavy user of Video chats and other bandwidth heavy features. Today they've had an issue with sending and receiving messages, and got some kind of warning about network usage (I've not actually seen the warning).
I checked in the Network usage settings / statistics and the user has managed to send and receive a whopping 1GB (respectively) within one week :P. Does Whatsapp impose some kind of restriction on the usage of its network with regard to data usage? I'd just like to be able to work out whats causing the error, and how the user can best handle it :).
Thanks for any clues and your time, regards!
P.S. I have sent an email to Whatsapp's support, but I reckoned I might get a quicker response here :P !

Please state clearly what warning you get and also make sure that's from WhatsApp.

There was and possibly still is a restriction on message forwarding but there is none on data usage.

WhatsApp has announced it will restrict the number of times an individual message can be forwarded.

The only restriction on video is about the size. When it is larger than 16MB then you need to reduce it.

If you choose to send an existing video, it is limited to 16 Megabytes. On most phones, this will equal about 90 seconds to three minutes of video. If you choose an existing video that is larger than 16 MB, then you will have the option to trim the length of the video before sending it.

You should check if data limit is set or not on the phone. Go to Settings -> Data usage -> Cellular data usage. Clicking the gear, should show you the data limit and if it was set or not.

That 16MB limit is also enforced at device level which can be changed with root. All you have to do is sed -i 's/"media_limit_mb" value="16"/"media_limit_mb" value="1000"/' /data/data/com.whatsapp/shared_prefs/com.whatsapp_preferences.xml.

@IrfanLatif You are correct. Unfortunately I don't think the OP nor his friend have rooted devices. I might be wrong though.

Right. But the point is that 16MB limit too doesn't give some kind of warning about network usage.

@IrfanLatif True. That's why I wrote restriction and not warning on the video part.