# Question
Title: How to move installed apk from phone memory to sdcard on android 6.0.1 without root
Move installed apk from phone memory to sdcard on android 6.0.1 without root and install new apk to sdcard. My device is Samsung Galaxy J5 (SM-J500H os updated to 6.0.1). Phone's memory is too small to use install big applications and games. I installed asphalt 8 but cache files are too big for phone memory. What can i do?

# Answer
Basically, unless your OEM did something very nonstandard, you can't.

Marshmallow has no facility to move apps to the SD card as that feature was removed in favor of adopted storage in the core operating system. In adopted or internal storage mode, the SD card is essentially "adopted" or brought into the internal storage as if it is built into the device. This method is not without drawbacks though, your SD card will become encrypted and can only be read by that device (not in another phone or computer) and it will put significantly more wear on the card which is a concern because SD card storage has a finite number of writes before becoming unusable. Adopted storage is also slower than standard internal storage in general.

Even with adopted storage you don't chose what to move, the operating system does that... And some apps cannot reside on the SD card even with adopted storage.
> 1 votes

# Answer
The actual .apk itself is never on the SD card, and there is no need to do that either. The data can be moved (at times only partially) to the SD card. If thats what you intended in asking, then see if your phone supports move to SD in the settings under applications. If not, you can root (at your own risk) and use Apps2SD or similar apps.
> 0 votes

# Answer
You can't move apps at all without root, but you can use apk editor pro to change the storage to prefer external on other device whose storage is free ,it does not require rooting.

And there is no other way without rooting.
> 0 votes

---
Tags: 6.0-marshmallow, sd-card, samsung-galaxy-j5
---


# Question
Title: Why does fingerprint sensor not work when phone is charging?
I often face this issue. The fingeprint sensor does not work and sometimes the touch also misbehaves when phone is charging.

Why does this happen and how to fix this?

I experienced this issue with Mi Note 4, as well as Redmi 4A.

# Answer
As requested by OP posting answer, in response to my comment (now deleted) based on my experience

> Having a clean power supply, using original charger + USB cable, setting up finger prints again are the common things that work...

I am not sure as to why touch sensor works only with original charger but posting as it may help, as it helped OP
> 1 votes

# Answer
Don't know the exact answer but from my experience It seems that touch sensors are finely tuned and calibrated against voltage reference. Using power supply other than provided chargers might be affecting these calibrations and cause fluctuations that results in malfunctioning of touch screen - that is - we click on something and something else is clicked or sometimes touch doesn't work, etc.
> 1 votes

# Answer
Something I have noticed with my fingerprint sensor is that if phone is face down and hasn't been used for a short while, phone will not read finger print until phone is actually picked up. Not sure if because of proximity or orientation sensor, but appears to be that way to keep from accidental unlocks. Is your phone face down when attempting to unlock? Also, what do you mean by "touch misbehaves"? If you mean the entire touchscreen and then combined with fingerprint sensor this could be pointing to your device being defective.
> 0 votes

---
Tags: charging, touchscreen, fingerprint, redmi
---


# Question
Title: I'm on a WhatsApp call and the person can hear my audio from YouTube etc
I'm using earphones and the person can hear my YouTube videos etc playing. Even blocked out the microphone. It seems the audio is being routed through the call. Any suggestions to stop this from happening?

# Answer
> 2 votes
Try blocking "permit drawing over other apps" in YT permissions !

---
Tags: applications, whatsapp-messenger, calls
---


title: Call barring in Android

text:
# Question
Title: Call barring in Android
Is call barring is a native Android feature? I mean blocking of **outgoing** calls.

In some Android articles I see the screenshots where call barring is present in settings but in recent Android versions I don't see it.

In what Android release it appeared and since what it became deprecated (or not)?

# Answer
> 2 votes
Edit: Based on OP's clarification in comments and subsequent search - **Call Barring** refers to both incoming and outgoing calls being blocked whereas **Call blocking/Number blocking** refers to only incoming calls being blocked.

To answer OP's question

* Call barring is not a standard Android OS feature.
* Call barring seems to be ~~Samsung~~ OEM specific. See call barring - Samsung community. It also includes roaming calls

Thanks to Andrew's inputs in comments

> call barring is usually available on most phones (e.g. OPPO R11 , Huawei P10 , and even on older feature phones), but the service is linked directly to the SIM provider. That's why it also asks for the code before changing the settings.

Section below is retained for reference, just in case this confusion arises again

---

Number blocking was introduced in Android 7 and it is not depreciated AFAIK. I have been using close to stock devices(Moto, Android One) and found this feature, usually in the SMS & phone apps. I am currently on Android 10 with Oxygen OS which is considered close to stock and this feature is present

Extracts below

> The default SMS app, the default phone app, and carrier apps can read from and write to the blocked-number list. The list is not accessible to other apps....
>
> Additionally, carrier app integration through Android means that carriers can read the blocked numbers list on the device and perform service-side blocking for the user in order to stop unwanted calls and texts from reaching the user through any medium, such as a VOIP endpoint or forwarding phones

The article you linked pre-dates Android 7 and mentions specifically that it is *not* a standard Android feature and goes on to give examples of OEM implementation. See Implementing Block Phone Numbers which says

> Before N, Android users had to rely on downloaded apps to restrict calls and texts from bothersome phone numbers. Many of those apps either do not work as desired or provide a less-than ideal experience because there are no proper APIs for blocking calls and messages.

---
Tags: android-versions, call-screening
---


# Question
Title: How to move 7GB ext4 partition on external SD card to 30GB partition on another SD card?
I had rooted my Android Lollipop 5.1.1 phone and installed Link2SD and linked installed apps on `ext4` 7GB 2nd partition of external SD card of 16GB size . The apps installed occupied 6.5GB space and I am getting low space now. I got 64GB external SD card and want to dedicate 30GB.

I created image of 7GB 2nd partition of external SD card through following command:

```
dd bs=4k count= if=/dev/block/mmcblk1p2 | gzip -5 -c > /storage/sdcard1/sdcard2root.img.gz

```

Now whats the way to clone this image to a 30GB partition?

# Answer
It's easy to achieve on a Linux PC:

* Attach both SD cards to PC.
* Dump 2nd partition from old SD card to new one. It's also possible directly from Android device. See Creating Partition Dump.
* Resize filesystem size to 30GB (the new partition size) using `resize2fs`.

## COPY WHOLE FILESYSTEM:

The above approach works on Android too if you are able to attach new SD card through USB OTG SD card reader, while the old one is inside phone.

Or you can do it in 2 steps, as you are already trying:

* Create partition dump:

```
~# gzip -9ck /dev/block/mmcblk1p2 >/storage/sdcard1/sdcard2root.img.gz

```

You can use `dd` or `cat` or even `cp`. Make sure you have enough space on primary external (physically internal) storage to save dumped (and optionally compressed) image of SD card's 2nd partition.

Compression is useful only with sparseness. To avoid copying freed filesystem blocks (of deleted files) use `e2image -rap`. Or discard logical to physical block mapping using `fstrim` (on mounted filesystem) or `e2fsck -E discard`, and drop page cache using `sync; echo -n 1 >/proc/sys/vm/drop_caches`.
* Insert new SD card and do partitioning using `parted` or `gdisk` or `fdisk`.
* Write partition image to new SD card:

```
~# gzip -dck /storage/sdcard1/sdcard2root.img.gz >/dev/block/mmcblk1p2

```
* Maximize filesystem size to partition size:

```
~# resize2fs /dev/block/mmcblk1p2

```

---

## COPY FILESYSTEM CONTENTS:

Another method is to only copy/move filesystem contents (files, directories etc.) and not the whole filesystem structure. But files' metadata needs to be preserved, or things may break (since the partition is to be mounted inside `/data`). It includes `timestamps`, permission `mode`, `owner`, `group` and `extended attributes`, particularly SELinux contexts. Some executable binaries (in `/system`) might also have file capabilities set (saved as extended attributes) but that's usually not required for user data. Other metadata like ACLs (also saved as extended attributes) and file attributes (inode flags) are not generally used on Android devices.

On Linux tools like `rsync` (or even `cp`) can preserve the required metadata. For reference see this and this answer. On Android (to move the contents in 2 steps) `tar` is a good choice:

```
~$ cd /path/to/old_sdcard/mountpoint/
~$ tar --create --preserve-permissions --selinux --verbose --gzip --file=/storage/sdcard1/sdcard2root.tar.gz .

```

Insert new SD card, do partitioning (if required), and create filesystem using `mkfs.ext4` (by default it takes whole partition). To restore backup:

```
~$ cd /path/to/new_sdcard/mountpoint/
~$ tar --extract --preserve-permissions --selinux --verbose --gunzip --file=/storage/sdcard1/sdcard2root.tar.gz

```
> 2 votes

---
Tags: external-sd, file-system, partitions, link2sd
---


# Question
Title: How to activate 'Do not disturb' when connected to a specific Bluetooth device
I want to benefit from Androids "Do not disturb"-feature while driving. My idea is to activate the "Do not disturb"-feature, when my phone connects to my cars bluetooth. If enabled no notifications would appear which is a huge advantage for me because this results in less distractions while driving.

"Do not disturb"-feature is already configured properly. If manually activated I do not get any distracting notifications. My question is how to automatically activate the feature when a bluetooth connection is established.

I'm using a Oneplus 6 with Android 10. My car does not support Android Auto.

Bonus points for solutions that don't require to install further apps. Unfortunately I think that is not possible right now.

# Answer
> 3 votes
As you guessed, you need an extra app and in this case app.

MacroDroid is easy to learn and free up to 5 macros. You need one macro

**Trigger**

Bluetooth event → Device connected → your car device

**Action**

Priority mode/Do not disturb → select one of the options - Allow priority notifications or Block all

Name and save the macro

---

You would need to manually disable DND mode once you are out of your car BT range or create another macro where the trigger would be BT event → Device disconnected and in the action whatever you wish, likely allow all

---
Tags: bluetooth, automation, do-not-disturb
---


# Question
Title: Nexus 7 stuck on google's logo after flashed the building of AOSP
This is my first time to flash the AOSP build on the device. I just followed Google's instructions to download and build the Android source code. Since I have a Nexus 7 (2013), so I chose the target to "aosp\_flo-userdebug" before starting to build. Then I ran "make" to build, and the building was successful.

After that I rebooted the device and went into the bootloader, flashed the device by the command:

`$ fastboot -w flashall`

The flash succeeded. Then after the device rebooted, it just got stuck on the Google's logo screen and never continued. If I flash it back to the factory image, it can continue booting. So I think maybe there are some mistakes I made during the building or flashing that causes the problem. But I don't know how to find the problem.

I also tried to flash only system.img by:

`$ fastboot flash system system.img`

But it's still the same result. Hope someone can give me some suggestions. Thanks.

PS: the build version is 5.1

# Answer
> 2 votes
Thanks to @Tamoghna Chowdhury for linking this to a similar question i had posted. I had similar issues and struggled with it for a while. You need to check some things. Did you flash the device specific binaries ?

In my case there was a version mismatch with the device specific binary and the device. FLO should always have FLO binaries. Otherwise it wont start. Check this post

https://code.google.com/p/aosp4nexus5/wiki/AOSPforNexus5#Automatic\_Installatin\_of\_GApps

I did this long ago, so I don't remember exact step i had take, If you post details of what you have done, maybe i'll remember something.

EDIT :Updating answer based on below comment from OP

Use the second link you mentioned https://developers.google.com/android/nexus/drivers#flolrx22g

Your device is flo. That is the first step. Now, your AOSP build should match with the binaries version. So you cant use 5.1.51 along with binaries of version LMY48G since that is for 5.1.1 . SO checkout AOSP with the same version, i.e 5.1.1 in your case and build again with the LMY48G binaries. I remember i had the same issue but with version 5.0.1 i.e LRX22G. It worked when i checkedout an older source code.

I dont know why this happens, ideally any new version should work. Perhaps another quirks of android. I did not update android later on when the tablet booted correctly. Too big a risk to take :)

# Answer
> 0 votes
Download binary can solve this issue for example https://developers.google.com/android/drivers#tilapialmy47d

download all the link, untar \*.tgz, and execute all shell script. Then rebuild code.

---
Tags: rom-flashing, nexus-7, 5.1-lollipop
---


# Question
Title: How to use an external sdcard as internal in Android Lolipop 5.1.1?
I have seen option of making external sd card to internal in android 6 mobile phones but i have android lolipop 5.1.1 how can i make it adoptable or get that option is it feasable to get that option i found some commands but that command is not found in my /system/bin even after rooting to

```
sm has-adoptable

sm set -force- adoptable true

```

> /sbin/sh: sm: not found

can i find some sm binary and use it ..i tried but my phone got problem

# Answer
> 4 votes
sm is actually not a binary, it is a shell script for java program **which does not exist/work on 5.1-lollipop**

```
# Script to start "sm" on the device, which has a very rudimentary
# shell.
#
base=/system
export CLASSPATH=$base/framework/sm.jar
exec app_process $base/bin com.android.commands.sm.Sm "$@"

```

**to answer the headline**

a completely another solution for rooted devices only:

you can mount ext4 disk image (or ext4 partition) with same permissions like `/data`
(mount script example)

`/su/su.d/40sdextimg` start-up script with executable permissions

```
#!/system/bin/sh
until grep -qw /data/sdext2 /proc/mounts
  do
    mount -t ext4 -o loop,rw,nosuid,nodev,noatime /storage/31D1-1308/data.sdext2.img /data/sdext2
    sleep 1
done &

```

then you can move apps and create symbolic links
(that's what Link2SD does)

```
mkdir /data/sdext2/com.textra-1
mv /data/app/com.textra-1/base.apk /data/sdext2/com.textra-1/
ln -s /data/sdext2/com.textra-1/base.apk /data/app/com.textra-1/base.apk

```

or bind mount whole folder
(assuming 2nd partition is mounted /data/sdext2)

```
mkdir /data/sdext2/media
chmod 0770 /data/sdext2/media
chown 1023.1023 /data/sdext2/media
chcon u:object_r:media_rw_data_file:s0 /data/sdext2/media
mv /data/media/. /data/sdext2/media
mount -o bind /data/sdext2/media /data/media

```

---
Tags: adb, external-sd, 5.1-lollipop, internal-sd, adoptable-storage
---


# Question
Title: How would you use your ext4 formatted thumb drive via OTG on Android?
Is there a workaround to use an `ext4` formatted thumb drives on Android phones? Right now when I plug it (thumb drive has micro usb end and phone supports thumb drives) Android says it doesn't recognize the file system.

Android formats the micro SD cards to `exFat` by default so I guess that's all it supports for thumb drives too? But I would prefer to have the same (`ext4`) file system across all my PCs and thumb drives. Any non-painful way to achieve that?

# Answer
External SD cards and USB OTG drives (since Android 6) are handled by `vold` which supports only FAT\[N\] (vfat) and exFAT (since Android 9 provided that OEM adds support to kernel) filesystems on stock Android. `ext4` and `f2fs` are supported only for private volumes (Adoptable Storage). Public volume (secondary external storage) is not directly accessible to apps or readable as emulated filesystem. But it's writable only through Storage Access Framework APIs. For details see How to save files to external SD card?

With root access you can manually mount `ext4` filesystem (on USB stick or SD card) with proper permissions (after `vold` fails) and read/write files there. Use `sdcardfs` or FUSE to emulate the filesystem for fixed permissions. But this way Android framework is unaware of mounted filesystem and Android apps won't be notified of new storage. Neither you can manage the mounted storage from device Settings.

Going Android-ish way, many custom ROMs include a patched `vold` which can handle `NTFS`, `ext4` and `f2fs` filesystems, as well as Linux (`0x83`) partition type. GUID for that type was added in another patch in order to correctly identify `ext4`. This patched `vold` is also available as a Magisk module `vold-posix`, or you can build yourself from source code to manually add it to `/system`. Filesystem type might also needed to be changed in `fstab` if it's not `auto` (particularly on Android 5 and before).

---

Another way to access `ext4` formatted USB stick on non-rooted devices is through USB host mass storage APIs. While it's theoretically possible and there exist solutions like open-source libaums (for FAT32) and closed-source like Paragon's (for exFAT/NTFS), I don't know of any stable working solution for `ext4` at the moment. Related question is: How to read ext4 filesystem without mounting on a non-rooted device?
> 7 votes

---
Tags: usb-on-the-go, ext4
---


# Question
Title: Why isn't my internal storage usage going down after adopting an SD card?
I have an Honor 5X running LineageOS, and I'm trying to use an external SD card as adoptable storage. After migrating my data, my internal shared storage usage does not go down. Specifically, "Music & audio" shows up as 6.9 GB on both the internal shared storage and the SD card. There's also an unusual "-6.1GB" under "Other" when I look at the storage usage for the SD card.

I don't know if it's relevant, but the "Music" directory is being watched by Syncthing. Is there something I did wrong in setting this up?

# Answer
The comment from Irfan Latif pointed me in the right direction. My "Music" directory was still on `/data/media/0` as well as the adopted mount. I deleted it from `/data/media/0`, the directory still shows up in `/storage/emulated/0`, and the usage summary makes sense now. Down to half usage.
> 2 votes

---
Tags: external-sd, lineageos, adoptable-storage
---


# Question
Title: How to get Google Photos to recognize External SD drive
I have connected an external SD card via a USB connector to my phone in order to have more space for recording video. However, Google Photos does not seem to recognize it - it does not show up in Device Folders, and I cannot figure out how to make it show up.

In this support thread from last year it is stated that "if the device is running Android 6.0 and above then the external SD card may be merged into internal memory and in this case it will backup all of your photos including your SD card." I am running Android 9, and 9 \> 6, so this should work.

When I check if the SD card is merged with internal it is marked as "Portable storage," meaning that the SD card is set as external storage. However, it goes on to say that "you should have received a pop-up notification when the external SD card was detected. The notification gives you 2 options: Eject or Setup." The notification does not give me the option to "Setup", instead it only gives me the option to "Explore". That brings up some kind of file explorer from which I cannot find any options to merge storage.

It goes in to say that you can "choose which folders on your phone to back up" by "Select Settings \> Back up & sync. Touch "Choose folders to back up..." and select the folders you want to back up." But in the "Back up & sync" part of Google Photos, there is no "Choose folders to back up..." The closest I can see if "Back up device folders" which takes me to a list of already discovered folders, which does not include the SD card.

How do I get Photos to recognize the external USB drive?

# Answer
> 3 votes
Sorry, you can't do it the way you intend to.

* Google photos can back up to Ext.SD, *only* if the card is treated as internal storage. In your case the SD card is not treated as a part of device memory (portable) .
* Adoptable-storage is applicable *only* if the card is actually mounted on the device and not when connected via USB connector.

+ See wiki for more details.
    + See Google help which explains how the adaptable storage can be used for this purpose (read also the linked blog of Android pit)

What you can do, is to use apps like Folder Sync or Auto Sync for Google drive and set up sync to your Ext.SD in a manner that the selected contents of your Drive are backed up on your SD and deleted from GDrive. This can be set up on schedule or on demand

---
Tags: usb, external-sd, 9.0-pie, google-photos
---


# Question
Title: Should warnings about not charging your phone at airport/public usb ports be taken seriously?
There are many articles on the internet saying that charging at the usb ports available at the airport and public places can cause your phone to get hacked.

Is there any any truth behind this?

If it is dangerous then why? Are those usb ports connected to some computer? But even if they are, isn't a phone unavailable to computers to that which it is connected to and you need to provide authorization for data transfer to take place?

# Answer
Yes an no.

Some years ago this was a very severe security problem, as a lot of devices automatically enabled the MTP mode when connected via USB that allows to access all files in the "sd-card" section. Also some device had ADB enabled by default.

Nowadays MTP and the other file-access protocols provided by Android devices are usually disabled by default and the user is explicitly asked if it should be enabled. And for ADB there is the public key authentication to identify trusted computers.

However this does not mean that there is no risk to use public USB power ports for charging. For example some Samsung devices had an exploit that allowed root access using an exploit in the MTP protocol - and this was possible with disabled MTP and locked screen.

Therefore in my opinion the risk of being attacked by usb ports available at the airport and public places has reduced a but in the last years, however it is still present.

If you want to use those usb ports and be safe you should use an "USB condom" or some equivalent adapter that does makes it physically impossible to transfer data through it (usually those devices don't connect the USB data lines to the device which makes it impossible to transfer data from/to the device).
> 1 votes

---
Tags: security, usb, charging, usb-debugging, malware
---


# Question
Title: Compatibility Feasibility Speed and use of High Capacity MicroSd Card for adaptable swapping and linking apps?
I want purchase a new **high capacity (64GB or 128GB**) high speed **(100Mbps 170Mbps 250 MBps)** MicroSdcard for **Swapping/Adoptable /linking apps** through Link2SD/ portable (adoptable) storage

so i want to confirm compatibility feasibility speed performance my external sdcard **slot/tray/reader/chip/hardware** should have according to my device and **Android lolipop 5.1.1** support.

High capacity MicroSd card comes with pre-formatted extfat file system but my mobile manufacturer technical specification of mobile device says it supports up to 128gb and fat32 file system

There are many available sdcards Micro i want to know that type (SDHC SDXC) UHs speed Class (UHSI UHS II) Video Speed Class (v10 v30 v60 V90) and App performance class (A10) Speed of (90 Mbps 100Mbps 170Mbps 250MBps) its confusing which will be compatible feasible and best for adaptable swap and give optimum performance for the purpose.

secondly there is not use of extra speed or video class card if Device or Android supports works on less speed.

Before purchasing to decide i want to confirm and check my device and understand clarify following questions and queries to decide which card will be compatible for my android lolipop 5.1.1 OS and device:-

1. Can high capacity **exfat be forced** to used **(through mounting it inboot init**) in android or phone through mount commands without damaging phone Android os or SDcards protocols and will all apps/ os file manager support it if yes then

```
                              *-kindly tell me commands for it.*

```
2. if not then can **high capacity card be formatted to Fat32** if yes then how can i format and will the card give the same performance speed performance as in exfat to fat32 without damaging phone android OS and SdCard

```
                                 *-kindly tell me commands for it*

```
3. In android Lolipop 5.1.1 file system (ext4) whats the **block size it use to write or read on external sdcard** is it 512 bytes/ 4096 (4kB) /8096 (8KB) /512Kb /512bytes how to check or it depends on which filesystem the sdcard is formatted with then what block size it writes *individualy in filesystems of fat32, exfat, ntfs and ext4*

* kindly tell me command tools script or apps to check and confirm on my device
4. In android lolipop 5.1.1 file system of ext4 APPS and FILES **how it write means sequentially or randomly**

```
         -kindly tell me command tools script or apps  to check and
          confirm on my device

```
5. is there method or any adb shell android Command or script or apps of hardware info or bench marking apps through which we can check test to know device mobiles external Sdcard \*SLOTS/READER/CHIP/HARDWARE\** optimum hardware compatibility :-

a) for **type** of device compatible microSD cards (SDHC / SDXC)

```
                 *- kindly tell me commands for testing it*

```

b) Type of **file system supported** or mounted OR FORCED TO BE MOUNTED allowed/permitted on externalsd card and can it be modified or changed

```
                          *- kindly tell me commands for testing it*

```

c) maximum **Practical capacity** supported microSD in the device and can it be forcebly be extended ie. 128gb or more we can force by partitioning the card to multiple partitions or increasing the size

```
                          *- kindly tell me commands for testing it*

```

d) **UHS speed Class** (UHSI UHS II) compatible

```
                         *- kindly tell me commands for testing it*

```

e) **Video Speed Class** (v10 v30 v60 V90) compatible

```
                         *- kindly tell me commands for testing it*

```

f) **App performance class** (A1) compatible

```
                         *- kindly tell me commands for testing it*

```

g) Maximum sequential read speed compatible (90 Mbps 100Mbps 170Mbps 250MBps)

```
                         *- kindly tell me commands for testing it*

```

h) **minimum/Maximum sequential write** speed compatible

```
                         *- kindly tell me commands for testing it*

```

i) **minimum/ Maximum random read/write speed** compatible *\- kindly tell me commands for testing it*
6. **for suggestions I have pre-tested through androbench app**

a) internal memory of my device through writing **64Mb** file to /data/ (ext4 partition mounted) (64Mb file used for testing)

```
sequential  read 128 MB/s

sequential write 12 MB/s

random read 10.93 Mb/s  2800.4 IOPS (4KB)

random write 3.9 Mb p/s  996.31 IOPS (4KB)

```

*is there any restriction in device or android should we need to match
externalsd speed performance with internal sd as we have we can use
external sdcard as internal either by swapping/adoptable /linking or it will work in more or less performance to*

b) External memory of HP SHDHC Class 10 16GB (still i want to switch over to high capacity card) of my device through writing 64Mb file /external\_sd/ (fat32 partition mounted)(64 MB File)

```
sequential  read 35.56 MB/s (printed 95MB/s)

sequential write 8.6 MB/s

random read 4.36 Mb/s  1117.58 IOPS (4KB)

random write 0.53 Mb p/s  136.38 IOPS (4KB)

```

Hp printed 95MB/s but result is 35.5MB/s now its device result,fat32 file system result or sdcard performance result don't know how to
differentiate it .

```
                    *- kindly tell me commands for testing it*

```

**how to find device external mircro sdcard slot/chip/hardware/reader speed and other information asked above**

# Answer
Your device is very old, which most likely means that it does not have exfat support.

Compatibility should not be a problem, as every card and reader are usually compatible with each other, as long as SDXC cards are supported by your device.

And for adoptable storage the bulk transfer speed is not that important (as long as you don't record videos or often copy/download large files). I would focus on A1/A2 rating which is designed to measure application usage (randomly reading/writing a number of small files).

I would also focus on reliability because if the sd-card dies all data on your device will be non-accessible/gone.

Anyway in your old device the sd-card will not work very fast. Even in modern devices the sd-card reader is not able to make use of the modern very fast transfer modes.

In general the micro-sd card is way slower (independent what card you use) than the internal flash, because the integrated card reader is slow.
> 3 votes

---
Tags: external-sd, sd-card, performance, adoptable-storage, benchmarks
---


# Question
Title: Can OTG HUB charge with connected charger more than 0.5A?
I saw a video somewhere where man says that OTG HUB charges only 0.5A. Is there any superior OTG HUB which can charge more than 0.5A?

# Answer
> 1 votes
The multifunctional USB OTG Host Hub Adapter Cable is compatible with all tablets and cellphones with OTG function. While it is promoted to OTG mode and charging mode can work simultaneously, in fact this is not possible (except for some listed devices)

---
Tags: usb-on-the-go
---


# Question
Title: How to create and use multiple partitions on external SD card with different filesystems (Ext4, exFAT, NTFS)?
I want to create 4 partitions on external MicroSDcard through ADB shell commands, not on Windows or Linux. Also want to show all partitions in Android GUI (SETTINGS \> STORAGE \> SDCARD) and make them usable for all apps and file explorers.

1. Dedicated first partition exFAT or NTFS or FAT32 (whichever Android permits and gives optimum performance) to store apps, photos and media.
2. Second partition `ext4`, dedicated to applications linked through Link2SD. Or I want some applications or auto scripts or tools or commands to set the apps mainfest to always install on SD card.
3. Third partition `ext4` or NTFS or exFAT, dedicated for auto recording random backups or shadow images of partitions for different time, if possible through commands, scripts or apps like Titanium backup or others.
4. Fourth partition `ext4` or NTFS or exFAT, dedicating for Virtual memory (as we do for `pagefile.sys` in Windows or Linux swap partition).

If I format 1st partition with `ext4`, exFAT or NTFS, Android OS doesn't show it in SETTINGS \> STORAGE\> SDCARD \> PARTITIONS and asks to mount or erase the partitions.

Now to limit and specify the questions:

1. Can SD card have 4 partitions and will Android and SD card support it?
2. Examples of commands to partition in Android; `fdisk` or `parted` or the best one.
3. Is it necessary in Android that 1st partition should be FAT32? Or can we make it exFAT or NTFS to which Android Apps2SD and others apps can download?
4. Can we force mount command in some startup boot `init` file to mount all four partitions?
5. Will this mounting show the partitions in Settings and device file manager?
6. Or can we view these partitions through ES File Manager or Solid Explorer or Root Manager and take their backups too?

Please guide me through the safe, secure, best and feasible method and procedure which does not damage the device hardware or SD card.

# Answer
> 3 votes
A few points on four partitions:

1. > Dedicated first partition exFAT or NTFS or FAT32 (whichever Android permits and gives optimum performance) to store apps, photos and media.

For apps consider Application Class but that's expensive. Others will exert performance penalty more or less. On filesystem selection, the biggest downside with FAT32 is its 4GB maximum file size limit. Also it doesn't have some built-in phenomenon to deal with growing fragmentation which may reduce performance over time. You can find many online resources on pros and cons of FAT32 and exFAT. Also see the MS's official Filesystem Functionality Comparison.

> Is it necessary in Android that 1st partition should be FAT32?

Not necessary if your device supports other filesystems. FAT32 is Android's default for secondary external storage (SD cards and USB drives) since the start days. Since SDXC cards (32GB+) come pre-formatted with `exFAT` (though not a technical limit), many OEMs add exFAT support to their devices. However exFAT was closed-source until recently, so it's not part of stock Android (except some limited addition in Android 9). But now it's very likely to be added to Android's kernel source. See some relevant details in this answer.

So check if your kernel supports exFAT: `grep exfat /proc/filesystems`. NTFS is still closed-source and doesn't have a stable in-kernel open-source driver. However it's possible to mount exFAT and NTFS using FUSE drivers. In each case `vold` must support the filesystem.

> Or can we make it exFAT or NTFS to which Android Apps2SD and others apps can download?

Irrespective of filesystem, all apps don't have write access to external SD card unless you make some changes to ROM. See details in How to save files to external SD card? and Android's Storage Journey.
2. There are apps available to move unsupported apps to SD card. Or you can manually (bind) mount a SD card partition (or directory) inside `/data`. Surely you need `ext4` (or `f2fs` on new devices) for this purpose (to enforce UNIX permissions). But it doesn't necessarily needs to be a partition, you can place a loop file on first partition.

Trying to modify app's manifest (or asking how to do so) can be considered unethical or illegal.
3. You don't need a dedicated partition to store backups. Instead first partition can be used.
4. If you want to use whole partition for `swap`, that doesn't need a filesystem (but `mkswap`). If you want to create `swap` file instead (which isn't a bad idea), again you can use first partition for that. However using external SD card for `swap` is not always a good idea. From `zram` commit to mainstream kernel:

> embedded systems normally are reluctant to use eMMC or SDCard as swap because there is wear-leveling.
> ...
> Although we have real storage as swap, it was a problem, too. Because it sometime ends up making system very unresponsive caused by slow swap storage performance.

Android supports `swap` with `zram` back-end (which creates a compressed block device within RAM) since Android 4.4. Android's OOM killers (old in-kernel lowmemorykiller and new userspace lmkd) do take `swap` into account. If your kernel supports ZRAM, using external SD card for SWAP is not recommended. It can worsen the performance and will kill the SD card very soon due to increased I/O operations.

> If I format 1st partition with `ext4`, exFAT or NTFS, Android OS doesn't show it in SETTINGS \> STORAGE\> SDCARD \> PARTITIONS and asks to mount or erase the partitions.

It can be due to unsupported filesystem (see explanation above) or multiple partitions (see explanation below). However if a partition is manually mounted with proper permissions, apps are able to read/write files there. You may use `sdcardfs` or FUSE to emulate the filesystem for fixed permissions. But this way Android framework is unaware of mounted filesystem and Android apps won't be notified of new storage. Neither you can manage the mounted storage from device Settings.

> Can SD card have 4 partitions and will Android and SD card support it?

Android kernel by-default supports GPT which can have up to 128 partitions. MBR also supports 4 primary (or more logical) partitions (inside extended partition). Generally there is no technical limit but Android's userspace may mount only first partition, or may not recognize multi-partitioned SD card at all e.g. due to unknown partition type including Linux (`0x83`). Though `vold` supports multiple partitions before Android 6 too, you need to define FUSE (`sdcard`) `init` services, add entries to `fstab`, configure storage in `framework-res.apk` etc. If mounting multiple partitions doesn't work without these changes, you need to mount (additional or all) partitions manually (or rebuild your ROM with modified code).

> Will this mounting show the partitions in Settings and device file manager?

No. See explanation above. Not sure what you mean by "device file manager".

> Or can we view these partitions through ES File Manager or Solid Explorer or Root Manager and take their backups too?

Yes and no; depends on how, where and with what filesystem permissions you mounted the filesystem. See explanation above. Not sure what you mean by "take their backups too".

> Examples of commands to partition in Android; `fdisk` or `parted` or the best one.

Partitioning works alike on all OSes. There's a long list of CLI and GUI tools and you'll find hundreds of tutorials online. Assuming that your SD card is enumerated as `mmcblk1` and you want to create first partition of 32GB while leaving the rest for second, a one liner on Android can be:

```
~# sgdisk -Z -n 0:0:+32G -n 0:0:0 -p /dev/block/mmcblk1

```

See `sgdisk` manpage for explanation and more options. If needed use `partx -uv /dev/block/mmcblk1` to update kernel of partition table changes, or simply reinsert SD card.

After partitioning use `mkfs.fat`/`mkfs.exfat`/`mkfs.ntfs`/`mkfs.ext4` to create filesystem. All tools are available for Linux and work on Android as well.

> Can we force mount command in some startup boot `init` file to mount all four partitions?

Yes. Create an `init` service or `init.d` script. See details in How to run an executable on boot?

# Answer
> 1 votes
just partitioning and formatting from adb shell (needs to be `umount`)
(for doing this in recovery, delete all strings `/data/local` and `su -c` from command list)

```
adb push parted /data/local/tmp
adb shell chmod 0755 /data/local/tmp/parted
adb shell su -c "export PATH=$PATH:/data/local/tmp"
adb shell su -c "parted /dev/block/mmcblk1 mktable msdos"
adb shell su -c "parted /dev/block/mmcblk1 mkpart primary 1048576B 31914983423B"
adb shell su -c "mke2fs /dev/block/mmcblk1p1 -t ext4"
adb shell su -c "parted /dev/block/mmcblk1 unit B print"

```

---
Tags: external-sd, file-system, partitions, formatting, ext4
---


# Question
Title: Stop Google Maps from loading location photos/thumbnails
Google Maps automatically shows photos when searching for places, but this uses a lot of data on mobile networks. Is there any way to block the loading of images?

# Answer
> 1 votes
You have to completely disable location features on the Camera else wise it shows the same. There is nothing like separate `Settings` for disabling this thing in Google Maps.

---
Tags: google-maps
---


title: Why do restricted apps still use data?

text:
# Question
Title: Why do restricted apps still use data?
I am on Android 10 and just ditched netguard firewall to rely on the systems build in restriction options. But despite my below setting e.g. the Amazon app is still obviously online.

screenshot of the app's data usage and settings (click to enlarge)

# Answer
> 4 votes
Amazon is using data in two cases:

1. **Foreground :** App is active (foremost on screen), screen is on and user interacting with it. You would have probably done that in response to a notification or ad or launched the app. Even if you didn't interact with app but it is foremost on screen, it consumes data. If the app was updated by Play Store, it accounts data usage to the app (`UPDATE_DEVICE_STATS` permission)
2. **Background:**

* Amazon uses Google Cloud Messaging (GCM) (`com.amazon.mshop.pushnotification. gcm. MshopGCMbroadcast receiver`) to display *push* notifications which you see (ads/offers /delivery tracking etc) and this uses data. GCM (or FCM (Firebase Cloud messaging) is a part of Google Play Services and **can't be restricted** by disabling background data. If you want to stop background data completely, your device needs to be rooted (I use servicely which can also do this and I got the receiver information using this app)
    * In addition apps use analytics (Fabric/Crashlytics, Facebook app events, Firebase Analytics, Google Analytic, Mixpanel, Segment) which are not always bound by background data restriction.

**Bottom line** Depending on how badly you want to restrict app usage data your arsenal would need a rooted device, Firewall, means to disable services /receivers, hibernation tools, doze optimization methods etc, in addition to restricting background data.

---
Tags: settings, data-connection, data-monitoring, background-data
---


# Question
Title: How to change Google Play country without adding payment method
I live in European Union in country where some apps like Cortana and Google assistant are not avaiable. Now I am in Italy, and I will stay for few weeks if that is relevant, so how can I change my country without adding payment method. I really do not whant to share some data with Google.

So, I deleted cache and data of Google Play and Play Services. And now I am unable to install any app in Play store, because Google is forcing me to add payment method.

# Answer
You cannot change your region without adding a payment method from that region.

However, you can simply create a new google account and pick the region you like.

Additionally, if you added a payment method to the same account, you would lose any balance currency you might have in your account. It also takes a few business days to switch completely.

I currently live in the EU on a student visa and I had a similar problem. So I also resorted to making a new account because I frequently need apps from both locales.
> 1 votes

# Answer
**Source:** Change your Google Play country

Unfortunately, you **cannot**. Relevant extracts

> To change your country, you need to set up a new country in Google Play. To set up a new country, you must be in that country and have a **payment method from the new country**.

(Emphasis added)

Now, you have two problems :

1. By clearing cache and data, you have ensured that you change your country (as explained in the source)
2. Your stay in Italy is only for few weeks.

> You can only change your Play country **once per year**. So if you change your country, you won’t be able to change it back for 1 year

To sum it up, you have lost your old country information, you have to set up new country information and if you do that you can revert to your old country after one year

There is no way out from this awkward situation AFAIK... I feel sorry
> 3 votes

---
Tags: google-play-store
---


# Question
Title: Notification icon that looks like 2 arrows inside a circle with leaf on Huawei device
I have a Huawei Mate 9. The notification icon looks like this:

> 2 arrows inside a circle with leaf

Things that I have done:

* Tried to find this on Google but returned no results
* Checked my apps icons, nothing matches

First, I thought it belonged to Snapseed, but it's not theirs.

# Answer
That's a notification originating from the Data Saver feature in Huawei ROMs (EMUI 5.0).

Data saver helps to reduce data usage by preventing background apps from sending or receiving data and limiting the data access frequency of running apps.

> When data saver is active, a data icon with a leaf will appear in the status bar. This may prevent users from receiving updates from emails, chat and other social media apps, and images will only be displayed when you touch them. To enable the data saver mode, go to Settings -\> Mobile data -\> Data saver.

Source: *First view of EMUI 5.0 ROM: Android 7*
> 12 votes

# Answer
I just found out that it means that Smart Data Saver is on. This prevents some apps to run in the background so you don't use a lot of data in case you are roaming in another country, for example. Go to settings, wireless and networks, data usage, and click on smart data saver to turn on/off. When turned on you can still select the apps you want to keep using data and give them permission.
> 0 votes

---
Tags: huawei, notification-icons
---


# Question
Title: How can one get the clipboard menu item in the contextual menu in Gmail's compose email field?
How can one get the clipboard menu item in the contextual menu in Gmail's compose email field?

It's not present on my phone (Samsung Galaxy S9, Android 9):

Content of the `...` menu:

# Answer
> 1 votes
The clipboard is a feature of the keyboard i.e. the `Input Method` in android terminology.

* Assuming you are using gboard which is google's keyboard; you should see the `clipboard` button towards the top right of the keyboard. Depending on your device, it might also be inside the 3-dot menu item that can be clicked on to expand the rest of the list.
* Clicking on this reveals more buttons. One of which is the clipboard. You could use copied items for one hour from this clipboard. In order to save items permanently, you can pin them.

---
Tags: gmail, copy-paste
---


# Question
Title: If I install an aftermarket "Always on Display" app, will it cause excessive battery drain?
I am shopping for a new phone and it seems that my beloved notification LED has fallen out of favor, so I am willing to settle with Always on Display (AoD) as a second best.

I have been reading some and I understand that AoD is linked to AMOLED screens because in those you can "turn on" individual pixels, making it an energy draw small enough for it to be reasonable.

Now, I am browsing through GsmArena and I find that for AMOLED phones, some of them are qualified as having the AoD characteristic yet others do not show it.

Is it just because of some AMOLED phones being shipped without having the software option to use that feature (meaning that it could be added through third party software) or there are some hardware/firmware specs that make AoD unusable (either because it does not work or uses too much energy) if they are not present?

In short, I would like to know if I could add an AoD app to any AMOLED phone without expecting to suffer significant problems.

# Answer
Yes but also no.

Basically, AoD is purely software. It does not require special hardware (you can even use it on an LCD screen, although it will use significantly more power and does not make much sense). This is why there are plenty apps available that let you keep your screen on.

At the same time I would also answer the question with no, because even though it is purely software, it's not just an "app". If you use one of those AoD apps, they will keep your device awake. All the time. This will use a lot more power compared to a device with AoD out of the box, which still allows the device to go to sleep while keeping the screen on, which saves a lot of energy.

However, depending on the device and how aggressive the power management is, you might not notice much of a difference. On my OnePlus 5, with fairly aggressive energy saving options, an aftermarket AoD app does not use a whole lot of power (about 1% to 2% of the daily power draw - comparable to a couple of minutes of surfing with Google Chrome).
> 3 votes

# Answer
# Aftermarket AoD may be even more energy-efficient than built-in AoD

The Samsung Galaxy S7 has an AMOLED screen, and has Always on Display (AoD) functionality built into the firmware.

Wikipedia's "Always on Display" article states that the S7's AoD feature increases power consumption by about 3%. This is because pixels, sensors, and processors all consume energy while the AoD display is visible.

Walter Wolf's answer says that his OnePlus 5's aftermarket AoD app increases power consumption by just 1–2%. Perhaps his app uses fewer CPU or network resources than Samsung's AoD software. This, in turn, may allow Walter's phone to idle more CPU cores or to spend less energy on Internet access.

In conclusion: On an AMOLED phone, aftermarket AoD may be equally energy-efficient, or even more energy-efficient, than manufacturer AoD.

# But ambient display is the most energy-efficient of all

The Wikipedia article adds that an "ambient display" solution is even more energy-efficient than AoD, since an "ambient display" is only visible when there are notifications present.
> 0 votes

---
Tags: battery, battery-life, screen, hardware
---


title: How to debug boot loop?

text:
# Question
Title: How to debug boot loop?
I have a boot looping Samsung Galaxy S4 Mini LTE (also known as GT-i9195 or `serranoltexx` – this is not GT-i9195i or `serranoveltexx`).

**Current behavior:** when the phone is off, pressing power button results to normal boot screen with usual yellow text in the top left corner about custom kernel ("Set Warranty Bit : kernel"). The screen stays in this view for around 20 seconds, turns to black, vibration motor runs for two short periods and the system reboots. I guess the system is failing to boot until hardware watchdog resets the system due timeout exeeding. If I boot with `Volume down` \+ `Home` \+ `Power` held, the phone enters into download mode as usual. And if I boot with `Volume up` \+ `Home` \+ `Power` held, the phone enters recovery mode (TWRP version 3.3.1.0) where everything seems to work as usual, too. I was running LineageOS 16 (Android 9.0) with SELinux enforcement enabled with June 2019 security patches. The system has `XXUCOL3` modem firmware if I remember correctly.

In the end, I can successfully boot into download mode and into TWRP recovery. However, the system started to fail to boot to normal system after normal shutdown-restart cycle and the system was working okay before shutdown. **Is there any way to diagnose and possibly fix the problem without wiping all the data?**

Steps that I've already tried:

* Wiping Art/Dalwik Cache, Cache partition and System partition and re-installing full system image via TWRP.
* Removing battery
* Booting with SIM card and sdcard removed

I really want to understand why this happened to avoid it in the future. I really don't want to have a device that randomly enters this state and the only way to fix it is to wipe the whole device. Being able to bring the current system to usable state without full wipe would be a nice bonus because it avoids reconfiguring all the settings and apps again.

And yes, I know this device is old and I had to previously replace motherboard due emmc chip failing but I really like the form factor and no vendor is nowadays providing similar device. If Sharp Aquos R2 compact didn't have notches on the screen it would be my next phone.

# Answer
In practice, the only way to debug early boot loops is to read the kernel log as follows:

**Minimum steps to get the kernel log if you have a working adb and TWRP:**

1. When the device is boot looping, press and hold VOLUME UP + HOME until the boot loop repeats and you get blue "RECOVERY" text in top left corner (specific key sequence will differ depending on actual harware but above should correct for Samsung devices). The important part is that you have to enter the TWRP recovery directly after failed boot and exact steps to do this depend on the hardware. The above example should be correct for all Samsung devices with hardware home button. The firmware may have some other indication about entering recovery partition than blue "RECOVERY" text which I think is part of Samsung's firmware implementation.
2. Attach the phone to computer using an USB cable and wait for TWRP to finish booting (the order you attach the phone vs starting TWRP booting is not important).
3. Extract the kernel log from failed boot. Run following on the host computer command line:

The required command for linux host:

```
adb shell cat /proc/last_kmsg > ~/Desktop/boot-loop-kernel-log.txt

```

The required command for Windows host:

```
adb shell cat /proc/last_kmsg > %UserProfile%/Desktop/boot-loop-kernel-log.txt

```

You'll end up with a file called `boot-loop-kernel-log.txt` on your desktop which contains the kernel log of failed boot.

This works because `/proc/last_kmsg` contains the memory contents of previous boot kernel log ring (this works because kernel keeps this log in known memory address and next boot saves the contents of that memory area before writing the new log in the same location). Some vendors put the previous boot kernel log ring to file `/sys/fs/pstore/console-ramoops` or `cat /sys/fs/pstore/console-ramoops-0` so you may need to do

```
adb shell cat '/sys/fs/pstore/console-ramoops*' > ~/Desktop/boot-loop-kernel-log.txt

```

instead, but the idea is still the same. Obviously, if the firmware overwrites all memory with zeros on boot, this cannot work.

In my specific boot looping case the problem was caused by "Live Display" color correction failing during boot process if its settings had been changed from the default. With that specific problem, the workaround was to boot to recovery and execute following as root

```
rm /data/vendor/display/.displaymodedefault

```

Long version of instructions to acquire boot log during a boot loop: https://forum.xda-developers.com/showthread.php?t=1520508
> 5 votes

---
Tags: samsung, twrp, boot-loop, lineageos, diagnostics
---


# Question
Title: My phone's power button has gone bad. Can I use my computer to send a USB command to start the phone up?
I got an old phone: an HTC WildFire S. Everything works fine, except that the power button has gone bad. Can I start the phone from my computer over a USB connection somehow?

# Answer
> 1 votes
# Probably not

Many PCs can be woken from sleep mode via a keypress. Some, if configured to allow "wake on LAN", can even be woken via a specially-composed Ethernet packet.

I'm unaware of any way to force an Android device to power on using a special USB command.

# What to try

* You can try removing and reinstalling the battery.
* Or you can try connecting the phone to a charger; there might be a slim chance that this will force it to power on.
* If that doesn't work, you can try a Google search for \[ how to power up Android phone without power button \]. You'll find lots of results, including an article on the AddictiveTips website and many others. These articles have additional suggestions which I haven't mentioned. Maybe one of the articles has a tip which can help you.

# What next

If none of the aforementioned ideas help, you can then either:

* Attempt to repair the phone yourself.
* Pay a technician to repair it.
* Or try to sell it (at a discount) to a local shop, which can then try to fix it.

# Answer
> 1 votes
most of flash tools have a "reboot after flash" option. here is example for Mediatek devices

* install fastboot
* install VCOM preloader drivers
* open scatter file with SP Flash Tool
* add new entry for EMMC\_USER (with start address and size of boot partition) at Read back option
* click readback (start)
* connect phone (readback will start as soon as preloader is detected)
* insert battery
* hold Volume button (down = fastboot, up = recovery)
* disconnect phone (after readback finished)
* connect phone (phone reboots)
* still hold Volume button until phone booted into fastboot or recovery
* boot into bootloader (from recovery)
* while in fastboot mode type in cmd.exe

fastboot oem off-mode-charge 0

this works similar for flashing stock rom (tools without readback option). for samsung devices (no fastboot) a JIG dongle may help

# Answer
> -1 votes
When your phone is not turned on it can't have a adb service running (Disregarding the possible technical difficulties it would also be a security issue.)

Try the following instead:

1. Take out your battery and connect the phone to a charger
2. Your phone should now turn on.
3. Insert your battery.
4. Hold power button (+).

Your device should boot now. I'm not sure if this will work for you but i booted my old ZTE Blade using these steps.

---
Tags: usb, hardware, buttons, power-on
---


title: Download YouTube Videos from Mobile?

text:
# Question
Title: Download YouTube Videos from Mobile?
Is it possible to download YouTube Videos on my New Samsung Galaxy Y android phone and have it stored in my SD card?

# Answer
> 5 votes
Yes. You can take either of the following two approaches:

1. Use tubemate. With this app you can browse YouTube and download the video just like you would download from websites like keepvid.com.
2. *The latest version of YouTube allows the videos that you opened or YouTube thinks you'll watch or have added to watch later queue to be downloaded in background so that you can watch it later. Read here.* -**\> The preload option is no longer available in the official youtube app since version 5.6, see google support note here**

> For the first time, YouTube will start downloading videos it thinks you might want to watch, whenever you’re plugged in and on Wi-fi.
>
> That’s great news for commuters, for example, who can now watch videos when outside their mobile coverage zone (or without paying for costly video downloads over 3G).
>
> YouTube, careful to draw a distinction between this and total downloading of its vids (which breaks its terms of service), is careful to point out that you’ll still need to be online for the first second when you press play.

# Answer
> 2 votes
I used to use Tubemate. It has many options, one of which is the ability to download the audio part alone so that you can also just listen to the video rather than watch it.

I later implemented a YouTube downloader script in my browser app. It has a flaw though - new videos loaded in the same page will not update the download link.

With the desktop browser disguise option and a Greasemonkey script, it might be possible to make it work in a mobile device as well.

# Answer
> 2 votes
It's 2020 and I use NewPipe (it can be downloaded here or here). You can use it to download Youtube videos and to:

> Customize your download:
>
> * Set title
> * Choose between video or audio download
> * Download subtitles
> * Select the most suitable file format
> * Download the resolution you need

**Disclaimer:** I am just a user of the app.

---
Tags: video, downloading, youtube, download-manager
---


# Question
Title: TWRP: No OS flashed after flashing LOS 16.0 on Samsung S5
I want to install LOS 16.0 on my Samsung S5 SM-G901F. According to the LOS installation wiki, I did from an ArchLinux OS:

* installation of TWRP 3.2.3-0 with heimdall
* wipe -\> format data
* wipe -\> advanced wipe (all partitions were wiped)
* advanced ADB sideload: adb sideload lineage-16.0-20200106-nightly-kccat6-signed.zip (I tried the 3 last build)

I checked all the hashes and they are Ok.

I observed a progress-bar difference between the TWRP and the terminal: the TWRP announced a 100% progress, while the adb command stopped at 47%. However, after debugging it, I realized the installation script runs entirely.

Finally, when I wish to reboot on the system partition, I get the error message "No OS flashed are you sure you wish to reboot?".

Have you any idea to truly flash LOS? Thank you!

# Answer
> 1 votes
if you wiped all partitions under TWRP advanced wipe. You need to flash Samsung factory firmware because you wiped the framework that the ROM is built over.

---
Tags: rom-flashing, twrp, lineageos, side-loading
---


title: Unknown download on my android phone

text:
# Question
Title: Unknown download on my android phone
8891h\_01\_enUs\_GridClear.webp

Does anyone know what this is? There were three more like it, 4117h and 130h\_01\_enCA

# Answer
`Webp` is a file format for images. See wiki. Telegram uses these for stickers. It probably was downloaded from Telegram or some other app that uses this image format files.
> 0 votes

---
Tags: downloading, files
---


# Question
Title: Remove notifications "Activate Anti-malware service" and "Battery fully charged" on rooted Samsung S10
On my Samsung S10e device I often get these notifications:

> Device care - Activate Anti-malware service

and

> Battery fully charged

When I try to turn one of them off, I am told:

> These notifications can't be turned off

Which raises the question: On my rooted device, *how* can I turn them off?

Solutions that only work for one of these notifications are OK.

# Answer
> 2 votes
If you want to "flex your root muscle" so to speak, there are options using Xposed modules, but these options do not require it.

Battery full notifications are a bit of a workaround:

* Open Settings and select the Notifications option
* Click See All under the Recently Sent list
* Select All from the dropdown in the top left
* Click the 3 dots in the top right and click Show system apps
* Select System UI
* Click the Battery full item
* Edit the options as desired

As for Device care, that is a little less of a workaround:

* Open Settings and select the Device care option
* Click the 3 dots in the upper right of this screen
* Select Advanced
* Slide the Notifications switch to off

This option may have been part of the Android 10 update. If you do not have this option:

* Open Settings and select the Notifications option
* Click See All under the Recently Sent list
* Select All from the dropdown in the top left
* Click the 3 dots in the top right and click Show system apps
* Select Settings
* Click the Device care (Important) item
* Edit the options as desired
* Return to the previous list
* Click the Device care item
* Edit the options as desired

Keep in mind that this will disable **all** Device care notifications. If you went with the second method, you may want to try disabling one at a time to remove the notification you want without necessarily removing all of them.

# Answer
> 1 votes
Apparently I can't post comments yet, so here's my thoughts in an answer.

Try searching for the package name of the app that's showing the notifications. A quick Google search finds this app which seems to do what you're looking for.

Hope I helped.

---
Tags: root-access, notifications, malware, samsung-galaxy-s-10
---


title: Can "Magisk" hide bootloader status?

text:
# Question
Title: Can "Magisk" hide bootloader status?
I am planning to flash Lineage OS 14.1 on my Lenovo p1ma40 to give it a new life.

But I often have to do various payment and transactions using banking apps. As you might know , these apps check for safetynet status. But if I unlock bootloader to flash custom ROM, then the safety net status will be definitely tripped.

My question is:

I learnt that Magisk can hide root status.But if I unlock bootloader then will it be able to hide bootloader status and ensure that safety net doesn't gets tripped?

# Answer
> 3 votes
**Edit** **NO** It cannot hide. Developer of Magisk says in his tweet, after the latest Google update

> Q6: Is MagiskHide meaningless now?
>
> A6: It depends on your expectation. MagiskHide is still effective to hide anything in userspace, but is no longer capable of spoofing bootloader/verified boot status.

To put it simply, we can still hide "root", but **not the bootloader status.**

(Emphasis added)

For more details see this XDA blog shared by Robert (thanks)

Also see Magisk will fail Safety-Net hereafter. Why?

Answer below is not pertinent, but retained for context

---

Safety-Net Vs Magisk is a typical cat and mouse game. But thankfully, most of the time Magisk is one step ahead. So, to answer your title **yes, most of the time but not always**

Safety Net being tripped is not just because of boot loader being unlocked. There is more to it. From Magisk and MagiskHide Installation and Troubleshooting guide by XDA developer didgeridoohan's excellent guide

> **What triggers SafetyNet?**
>
> There are two parts to the SafetyNet check, CTS Profile and Basic Integrity.
>
> Examples of when ctsProfileMatch will report as false (failed):
>
> * Uncertified device (the manufacturer haven't applied for Google certification)
> * Unlocked bootloader
> * Custom ROM
> * Signs of system integrity compromise (rooting, etc)
> * Signs of other attacks (Xposed, EdXposed, etc)
>
> Examples of when basicIntegrity will report as false (failed):
>
> * Signs of system integrity compromise (rooting, etc)
> * Signs of other attacks (Xposed, EdXposed, etc)@

@ EdXposed does *not* trip safety net. Guide has not been updated

This is where Magisk comes to rescue

> **Magisk can hide**
>
> * Magisk and most modules (it depends on what the module does).
>
> \*MagiskSU
>
> * Unlocked bootloader.
> * Permissive SELinux (most of the time. There have been reports that a permissive SELinux triggers SafetyNet even with MagiskHide enabled).
> * Some prop values (see "Sensitive props").
> * The Magisk Manager (separate option in the Manager settings).

Magisk has an option of Magisk Hide. You need to select your banking and any other apps to prevent them from seeing root. Also from Magisk Manager, hide the manager to prevent apps detecting root.

**Note:** Some banking apps may detect root despite passing safety net. Refer to the guide for help to fix such situations. Ver 20.1 of Magisk has sophisticated techniques to prevent this, so such incidents should be rare

Magisk itself allows you to verify your safety net status as shown

(Click to enlarge)

Also see What Magisk can't hide for more information

**Caution :** It's best to keep Magisk and yourself updated with Magisk Github developments so that you minimize the risk (and your device threads on XDA) . I have been using Magisk and EdXposed on Android 9 and 10 but never faced the issue of safteynet being tripped YMMV

Another useful resource is Magisk Documentation by topjohnwu, developer of Magisk

---
Tags: rooting, bootloader, magisk, safety-net
---


# Question
Title: How can I sync the Google keyboard's clipboard with Android's clipboard?
How can I sync the Google keyboard's clipboard with Android's clipboard?

Google keyboard's clipboard:

Android's clipboard:

I use Samsung Galaxy S9 with Android S9.

# Answer
The actions in these answer are from a Galaxy Note 8 which is nearly identical to your device. Unfortunately I do not know any way to sync them and as far as I know, it is not possible. However, I can explain this behavior.

The clipboard is a feature of the keyboard which is nothing but an application that registers itself as an `Input Method` with the android operating system.

What you are referring to as the android clipboard is actually the clipboard from the Samsung keyboard. This keyboard is better integrated with the Samsung environment. Here's how you can switch to the clipboard from the Samsung keyboard:

1. Long Press on the globe like button:

2. Click on the Samsung keyboard in the list that opens:

3. Find the clipboard icon from the options on the keyboard, possibly in the extended list that is visible upon clicking on the 3 dots:

Particularly in certain text boxes like the email compose section, this clipboard is disabled for some reason:

Which is why you cannot use this clipboard everywhere even when you longpress in the area to bring up the clipboard shortcut.

To switch back to Google's keyboard, you can bring down the notification area and click on the change keyboard button:

However; since these are 2 different applications; there seems to be no way to synchronize them since the clipboard feature is probably not universally standardized.
> 2 votes

---
Tags: 9.0-pie, gboard, samsung-galaxy-s-9, copy-paste
---


# Question
Title: Android large empty storage marked as full (new phone)
So I purchased this brand new X27 Plus with 64Gb storage, the phone shows 63Gb of free space when checking but I keep getting "your storage is full" errors.

When I plug it as MTP on my computer it actually shows the 64Gb disk as used space while it's empty. When I plug it as USB storage, it divides it as a full 1.25Go G: disk and an unreachable H: disk. I tried to access it with "DIR/A h:-s" and get "the device is not ready".

Any ideas of what's going on and how to get this working ?

---

# Answer
Do not unlock the bootloader because you will lose warranty.
Check the following command to proof it's a fake X27 plus or install this app

```
adb shell cat /proc/partitions

```

Claim the phone to the seller and get your money back
> 2 votes

---
Tags: storage
---


# Question
Title: Permission to make and manage phone calls
I just bought a second hand phone (my first device running android). I'm surprised by the fact that three times I've been asked for permission to make and manage phone calls. This is a very scary thing to allow and it's even for things that don't seem to need it. I first noticed it when I wanted to run Diagnostics. It asks to Allow Support to make and manage phone calls. This is already strange but perhaps could be justified in the process of running diagnostics. But I tried some other things to check the permissions that they would ask and also the pre-installed Xperia File Transfer Mobile and even the FM radio ask for it. All of these are pre-installed and system apps.

Is this normal? Would you give these permissions? Or is there something wrong with the phone (malware?)?

(For now there is no sim in the phone so the damage that it can do is very limited.)

---

I already did a factory reset and the issue persists.

# Answer
> 1 votes
Does seem very scary given permission to almost all apps requirements to agree to many requests such as to all questions an apps wants from a person .Fear not it's normal in companies software automatically .The requirement consist of few or many wanting phone ,SMS,contacts ect: Give consent some apps won't let install otherwise why !!we don't know Go to settings click on apps go through as many as wishes turn off what you don't want a company app having to many of your personal details that's it (Done ) no need to reset your devices it's inconvenient and will need to back up your files ,folders ,contacts in the meanwhile in doing so may loose precious photo's and possibly some files .Just go to settings everytime you experience issues once you know how it's easy and less time consuming and save your sanity .

# Answer
> 0 votes
You can trust on system apps(pre installed) by allowing them these changes. I don't explain much.

But in case you are feeling malicious activities you can deny them in settings freely as per you use. You can allow them once to use and deny after use. That simple.

Note: Just make sure your device doesn't giving notification/location/media permission to any third party app which doesn't have to do anything with these permissions.

# Answer
> 0 votes
In samsung FAQ its it asks this because " This is an Android Marshmallow permission which enables access to the default phone app in your device, and helps you to make phone calls to Samsung Customer Service directly from the Help Centre in mySamsung app."

If this is the answer, the message should not say "... allow.. make and manage phone calls" oh brother... an example of what would call super-geek-speak . That is confusing of actual function. I, too have not allowed this feature yet .although I really REALLY want to make use of a simple feature: SAMSUNG NOTES.

---
Tags: permissions
---


# Question
Title: WhatsApp data transfer from expired SIM card to new SIM card
My old SIM card number has expired and is no longer active on my mobile network. How do I recover my WhatsApp account chat history from this inactive SIM card number since it can no longer receive the call or message that sends the WhatsApp confirmation code to my cell phone in order to activate the WhatsApp account to my old mobile number?

I have tried to purchase a new SIM card in order to reactivate the expired mobile number but was told by my network providers that I can no longer use that number as it is no longer registered to the network. My best bet would be to try to recover my contacts from my Google account backups. But there's no guarantee that I can recover my chat history from that expired number.

I would like to migrate my WhatsApp chat history from this old SIM card number to a new SIM card number to which I have already installed WhatsApp.

# Answer
> 1 votes
WhatsApp stores a backup of every day into your internal memory. If you register in WhatsApp with the new SIM, it will still allow you to restore the messages of the previous chat. No matter what number you had.

Try re-registering with your new number and when it asks you for restoring back, allow it to.

# Answer
> 0 votes
Yes, you can. Of course, you must copy the old folder WhatsApp to the new phone so that WhatsApp sees that the folder containing the database is read by WhatsApp.

---
Tags: whatsapp-messenger, sim-card, data-transfer
---


title: Firefox on an Android tablet

text:
# Question
Title: Firefox on an Android tablet
I have just bought an Android 7 TABLET for convenient browsing and reading research (3-4 hours to kill once a week and more, free WiFi available) and for stand-alone navigation (GPS capable). No SIM slot, no Google account. Tablet has WiFi, USB-2 OTG, micro-SD slot and I've got a spare U1 32Gb card. I want to install Firefox so I can quickly synchronise bookmarks with my laptop (Linux Mint 18.3LTS). Can this be done via a conventional download to either tablet or laptop (whichever is simplest)?

# Answer
On Mozilla's official wiki page for the Android platform they have a direct link to download the apk that you can install to your device manually without access to the Play Store through a Google account.
> 1 votes

---
Tags: 7.0-nougat, firefox-for-android
---


# Question
Title: DNS queries are cached permanently, how to reliably clear DNS cache on Android 7+?
Is there a reliable, reproducible way to clear DNS cache on Android Nougat 7.0?

I know there is at least one other question like this but that one was from 8 years ago and I hope I can ask again and see what people are doing these days.

To explain a bit more my setup:

I am testing a simple web page loading in Chrome browser with Wireshark packet capture to see the DNS requests. I am also running `dnsmasq` on my LAN and have mapped my webpages name: `mymovies` to the correct IP address of the machine on my LAN that the web server is on. So `http://mymovies` should work and it does load.

The DNS lookups initially start with the DHCP server appending the DNS suffix (`.home`) so in the packet trace I see a DNS request for `mymovies.home` which fails because I don't have an IP address mapping for that in `dnsmasq.conf`. So a second DNS lookup for just `mymovies` appears and is successful.

Mostly I find that subsequent DNS lookups are always just for `mymovies` and never again for `mymovies.home` no matter what I try to clear the DNS cache:

I am testing over WiFi with a Moto G5 running Android 7.0 and it is rooted so I can run commands from within `adb shell` to the OS.

I have tried lots of things like:

1. Closing down Chrome browser and starting it up again.
2. `chrome://net-internals/#dns` to clear host cache and flushing the sockets too
3. Settings \> Apps \> Chrome \> Storage \> Clear Cache
4. `ndc resolver clearnetdns wlan0`

The only thing that seemed to work for me was turning the phone off and on again. After restart I opened `http://mymovies` in Chrome on the phone. The page loaded and in the Wireshark trace I see the first DNS request for `mymovies.home` which fails as usual followed by a DNS request for `mymovies` that succeeds. I then closed down that tab and opened a new one and loaded the page again.. I did this twice. Each time now I see a dns request for `mymovies` only.. it doesn't even try `mymovies.home`.

I restarted `dnsmasq` server and the first DNS lookup after that was for `mymovies.home` followed by a lookup for `mymovies`. But since then the DNS lookups are now only ever for `mymovies`. This is despite restarting the `dnsmasq` server a few times and trying the four so-called DNS cache clearing steps listed above.

But to confuse the matters, I tried the trick of switching into and back out of Airplane Mode. Now when I load my little test web page a few times it doesn't seem to cache at all anymore? Loading the webpage always initially gives a DNS look up for `mymovies.home` which fails then a lookup for `mymovies` that succeeds. Even after restarting the phone the DNS lookups have now stopped caching completely and it firstly tries `mymovies.home` every time!

I think this caching behavior is normal and expected but I'd just like a way to clear that cache so it goes back to trying `mymovies.home` without me having to restart the phone.

I'm not sure if the IPv6 has anything to do with things? In my router I have specified the IP address of the Raspberry Pi on my LAN that `dnsmasq` is running on so the router directs DNS requests to it.

I don't want the page to stop caching OR to always cache. I just want to be able to clear the DNS cache in a predictable manner so I can make the DNS request for `mymovies.home` appear once followed by the expected DNS caching.

# Answer
> 3 votes
## HOW DNS QUERY AND CACHING WORKS?

> Mostly I find that subsequent DNS lookups are always just for `mymovies` and never again for `mymovies.home`

---

NOTE: Just to make sure, check that `.home` search domain is set:

```
~$ dumpsys netd | grep 'search domains:'
        search domains: home

```

---

This behavior is due to Negative DNS Caching. The question is not explicitly about Android but more about the understanding of how DNS works. In short:

* When you type `mymovies` in a web browser (assuming that the browser doesn't cache DNS), Android's DNS resolver checks domain \<--\> IP mapping in local cache (`netd`) and `/etc/hosts`. Then it makes a query (for `A` record) to the IP address of DNS server it received from DHCP (or you set manually), which is `dnsmasq` in your case. As standard is to append suffix first, so `mymovies.home` is queried first. See details in How does Android OS do DNS name resolution?
* `dnsmasq` checks static mapping in `hosts` and `dnsmasq.conf` file. If no result found, it forwards query to upstream DNS server, whatever configured in `dnsmasq.conf` or `/etc/resolv.conf` (or whatever mechanism the system uses) - say `1.1.1.1`.
* After receiving a successful or failed response, `dnsmasq` answers the client (Android phone) along with Time To Live (TTL) value.
* Neither `dnsmasq` nor `1.1.1.1` is able to resolve `mymovies.home` because `.home` is not a known Top Level Domain Name (TLD) to any authoritative server. So a `NXDOMAIN` response (*"which means that the queried domain name does not exist in the DNS"*) is returned by root server (or some intermediate recursive caching server). Response includes an `SOA` record with high TTL (and `SOA.MINIMUM` field) value - say 5 hours.
* `dnsmasq` caches the `NXDOMAIN` response with 5 hours expiry and forwards the same to Android.
* Android's resolver caches the same for 5 hours, but that time may get doubled in some situations; see some explanation here. Also How long does negative DNS caching typically last?.
* Android's resolver makes another query for (`A` RR of) `mymovies`, which succeeds at `dnsmasq` and is returned with a smaller TTL which must be `0` in your case (see option `--local-ttl` in `dnsmasq` man).

So Android's resolver will make next query for `mymovies.home` after 5 hours, and for `mymovies` after 0 seconds. If you want that `mymovies.home` should be tried again sooner, define a static mapping, which can possibly be `--address=/mymovies.home/` to get `NXDOMAIN` from `dnsmasq` with no TTL. Or to have some fun, setup `NXDOMAIN` Redirection locally.

---

## DNS TROUBLESHOOTING:

I'll suggest you to simplify your setup. You don't necessarily need Wireshark, just use `--log-queries` option to see how `dnsmasq` responds to queries. Also once get rid of cache COMPLETELY on Android and DNS server. But note that you may still end up getting a cached response from some recursive non-iterative server, like if your ISP does DNS interception.

> I have tried lots of things like:

2. `chrome://net-internals/#dns` to clear host cache and flushing the sockets too

Clearing browser's DNS cache doesn't clear OS's system-wide cache (maintained by `netd`), though both need to be cleared. Better try testing with some native tool (like `dig` or `nslookup`) which doesn't rely on system's resolver and doesn't do caching itself. On Termux, for instance:

```
~$ dig mymovies @<dnsmasq_IP>
;; ->>HEADER<<- opcode: QUERY, status: NOERROR
;; ANSWER SECTION:
mymovies.com.       0   IN  A   192.168.1.124

```

```
~$ dig mymovies.home @<dnsmasq_IP>
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN
;; AUTHORITY SECTION:
.           10678   IN  SOA a.root-servers.net. nstld.verisign-grs.com. 2020010901 1800 900 604800 86400

```

Note `NOERROR` response and the TTL (`0`) of positive answer, while `NXDOMAIN` response, TTL (`10678`) and `SOA.MINIMUM` (`86400`) of negative answer.

> Even after restarting the phone the DNS lookups have now stopped caching completely and it firstly tries `mymovies.home` every time!

However on the very next query (`dig mymovies.home @<dnsmasq_IP>`), there would be no `AUTHORITY SECTION`. It's because SOA RR (the source of negative TTL) is not cached (as per RR format): *"SOA records are always distributed with a zero TTL to prohibit caching"*. But `dnsmasq` is doing negative caching (see option `--no-negcache`), so this time it's responding with `NXDOMAIN` from its own cache, **but with no TTL**.

That's why if you clear cache on Android, it then keeps on querying `mymovies` as well as `mymovies.home` because both are not being cached on Android due to zero TTL, unless you restart `dnsmasq` or `10678` seconds pass. To verify, send `SIGUSR1` to `dnsmasq` and see in log the expiry time against `mymovies.home` cache entry. However some other DNS servers may behave differently.

---

## CLEARING DNS CACHE:

> 4. `ndc resolver clearnetdns wlan0`

This command clears DNS server, not DNS cache. See How to configure DNS properly?.

> Is there a reliable, reproducible way to clear DNS cache on Android Nougat 7.0?

Yes, but not a straightforward command-line method. From the perspective of negative caching, we don't have anything like `unbound-control flush_negative` on Android. `ndc resolver flushnet <network_ID>` was removed in Android 7, though `flushDnsCache` still exists. Neither we can call `_resolv_flush_cache_for_net` from command-line. Services `network_management` and `netd_listener` also don't provide any such method.

* However `setResolverConfiguration` (part of `netd` service) states: *"Flushes the cache as needed (i.e. when the servers ... change)"*. This can also be called using `ndc`:

~$ ndc resolver clearnetdns \<network\_ID\> ~$ ndc resolver setnetdns \<network\_ID\> home \<dmsmasq\_IP\> \`\`\` <sup>* `network_ID` can be obtained using `dumpsys netd | grep Default`</sup>

So the cache should be cleared with DNS server reset. Additionally sending broadcast `android.intent.action.CLEAR_DNS_CACHE` (`flushVmDnsCache`) might also be required to clear DVM's cache (or kill the apps). A simple explanation can be found here.

But I'm not sure if this method works on all Android releases.

* Turning Wi-Fi OFF and ON (or Airplane Mode) must work as `network_ID` is destroyed and a new one is created.
* Or restart the networking / caching daemon (`netd`). This also restarts dependent services (including `zygote`), so causes a soft reboot and kills all running apps:

~# setprop ctl.restart netd \`\`\`

* There's also a hack to bypass / disable DNS caching entirely using environment variable `ANDROID_DNS_MODE=local`. But it also disables search domains (`.home` suffix in your case).

---
Tags: 7.0-nougat, networking, cache, dns
---


# Question
Title: List of installed apps not showing in Settings
Perhaps naively, I switched the sd card between my phone and my tablet.

Trouble was some of my phone apps has been installed on the sd card and they no longer work, I felt at the time that I could live with that.

The thing is that as the internal memory starts to fill up again, I can no longer bring up the list of apps from the settings screen. When I click on it, it shows the circle like it's working on it but never finishes the job! I'm guesnig this may be because it's looking for apps that were on the sd card which I removed. This is a pain as I can't move or delete any of the apps that are left (in the internal storage).

However, recently my memory went critical and at that point the phone was able to show me a list of apps which allowed me to chose some for deletion, but this only comes up when the phone memory gets critical. So it must be possible for the OS to find the list of apps.

Is there a way to move the apps to the SD card using an app or a PC?

I have an HTC One\_M8, Android 6.0 and HTC sense version 7.0.

# Answer
> 2 votes
You can use for that (please see the corresponding tag-wiki for details on what ADB is and how to get it working on your computer):

```
# list all user-installed packages
adb shell "pm list packages -3"
# now pick one app of that list you want to get rid of
adb uninstall com.package.name

```

That way you could clean up the apps you don't have access to any longer anyway. As for moving apps to the SD card, at least you can define it as "default storage" for new installations (as long as the apps do support that):

```
# 0=let the OS decide; 1=internal, 2=external storage:
adb shell "pm set-install-location 2"

```

However, I'm not aware of any command to move already installed apps. The only thing I know of is you can specify the install location explicitly when you install an app, see How to move spcific apps to/from sd card using ADB? on our sister site.

# Answer
> 0 votes
on my Android phone, also 6.0, I get to "critical" memory usage frequently since it only has 8 GB. and from Settings | Apps, I can move individual apps to the SD card fairly easily. here's an example.

Settings | Apps

Fold app

Fold clicked

Storage clicked

Select SD card

Moving

Moved

---
Tags: 6.0-marshmallow, external-sd, htc-one-m8
---


# Question
Title: Restarting Google Play Services after forced-stopping it
I didn't know I would need Google Play Service if I didn't play games, so I forced stop it.

Any way of getting back, possibly without doing a factory reset?

# Answer
> 0 votes
If you only forced stop it, then you don't have to worry. It will start itself when opening Google Play Store. Check the running apps for Google Play Services.

# Answer
> 0 votes
Yes, even if you Force Stop Google Play Services, it will start again when you open Play Store. However, the Play Services app may misbehave when Force Stopped - when re-opening, (on my Chrome OS) it installs gaming, book, video apps that I never use and have uninstalled at least 10 times. But this is a minor issue and aside from that, you should have no problem re-starting Play Services.

---
Tags: google-play-services
---


# Question
Title: Changing /system/build.prop issues on fully rooted and DM-verity removed device
SO, I have an MT6739 dveice with Android 8.1, it's not A/B seamless, and it is not TREBLE.

I have used a tried and tested method to remove DM-Verity. On this device it was in the DTB, in the boot and also in the vendor partitions. I use Magisk to get me root and I have removed and installed lots of /system/apps, changed the audio, bootanimations etc on the device. I even changed the backgrounds and tweaked the Launcher.

However whenever I come to change anything in /system/build.prop the device bootloops!

I have tried this with Magisk DM-verity ON/OFF with no effect. I also copied back a build.prop from my PC and it worked fine again. So, something must be looking up the build.prop and checking for changes.

All I have done is change the ro.product.model property to be super sure nothing in the build.prop is incorrect. I have tried with setting permissions (644, for some reason they are 600 (RW - - ) on the device so tried that too).

There is a build.prop in the /vendor partition. i have heard of this checking the fingerprint of the system/build.prop, but they are different anyway on the stock ROM.

I also tried just copying the build.prop from /system into here so they were identical.

Fresh out of ideas!!

Does anyone know what is going on here. I can literally change anything I want on the device as normal/pre-verity days except for the build.prop settings.

# Answer
See when you did the DM Verity patch, have you patched the boot.img to support Android 8.1? if working on Win can use ClassyKitchen. If working on Linux, AIK Linux is the way to go. i'd suggest using classykitchen and patch for DM verity and enable 8.1 support. worked for me. running 8.0 Oreo. ;)
> 0 votes

---
Tags: boot-loop, dm-verity
---


# Question
Title: Facebook Messenger Chat always shows one chat unread
The Facebook Messenger app always shows a '1' next to the speech bubble indicating that there is a 'Chat' I haven't read. How can I clear this, or alternatively, find and read this supposedly unread chat?

# Answer
Inspired by SocMedSean's page of fixes:

1. Open Facebook in your desktop web browser (not on mobile)
2. Click on the Messenger (speech bubble) icon
3. Click on 'Settings' (the cog)
4. Click on 'Unread Chats' - this will likely reveal some very old chats that you have never marked as 'read'
5. Click on each old chat to mark them as 'read'
6. Check back in Messenger to see if there are still unread messages showing
> 0 votes

---
Tags: notifications, facebook-messenger
---


# Question
Title: /data/system/packages.xml does not update after install/uninstall of apps. Is that expected?
I am using a android board with a custom ROM based on Android 4.4.2. I was trying to override a /system/priv-app/ app by installing an updated version in normal partition.

While testing I realised that the override only stays till reboot.So I started digging into AOSP source which is when I came across the call to `disableSystemPackageLPw` which in turn calls `writeLPr`.

If `writeLPr` goes through I expect to see my package listed in the "/data/system/packages.xml" file. However that is not the case here and hence I suspect that to be the root cause.

It would be great to know view on expected usage of packages.xml from the community users to confirm the same.

# Answer
> 1 votes
As per stock android code. (AOSP) packages.xml needs to have the entry for installed packages for retaining any fancy priv-app kind of configuration/overrides/updates that we do.

---
Tags: custom-roms, installation, rom, system-apps
---


title: ADB using USB-C to USB 2.0 cable

text:
# Question
Title: ADB using USB-C to USB 2.0 cable
Can I use ADB (USB Debugging) with cable that has USB-C connector on phone side and USB 2.0 Type A plug on the computer side? It should be able to transfer data.

# Answer
> 1 votes
The cable you describe is a standard USB converter cable (USB-A to C).

A lot of manufacturer ship such a cable together with a new phone. You can use it to establish a USB 2.0 (and may be 3.0 if the device supports this) connection between your computer and your phone.

Like any USB cable it is agnostic to the data it transmits, therefore ADB and MTP (file access) will work as expected as long as the used computer is correctly configured.

---
Tags: adb, usb-debugging, usb-c
---


# Question
Title: How can profile (log the charging and discharging current for some time period) my battery?
As the question reads, I want to log the current in milliAmpere or Ampere (both charging and discharging) over a period of time.

Please note I am not asking about charging or discharging rate, but rather on the current. I am aware of the app called Ampere which displays the current, which is good but I want them logged over a period of time. I am also aware of the app Battery Log, which logs the details but not the current.

Device info: Nexus 5 rooted, running stock 5.1.1. Ready to install custom kernel but stock ROM only.

Edit: Based on a comment from Firelord, I could see a file in `/sys/class/power_supply/battery/current_now` which at the moment of writing had a number `835910` and after a second it became `695229`, then `673163`. All these values were during the discharge phase.

When plugged in, it showed `412190` and the Ampere app showed `160mA`. It seems this is the current, but I guess I have to average it out to compare it with Ampere's output.

Interestingly, there is another file named `status` which has values `charging` and `discharging`.

I also happen to know another question in this site.

# Answer
**Ampere** shows us the value of current made available to the system by the kernel. I used three devices with different Android versions to test my answer. Here we go!

---

### Test 1 & 2: Two MTK devices running stock Android 4.2.1 and 4.4.2

Since MTK is involved, thing would behave a bit differently. In both the devices **Ampere** had trouble measuring the current not because it couldn't, but two files were available to measure the current, and the user had to choose one from its **Settings → Basic settings → Measurement interface**. (*Rant*: A design flaw I tend to think since I wasn't aware of that before digging it up).

The two files for my Android 4.2.1:

```
/sys/device/platform/mt6320-battery/power_supply/battery/BatteryAverageCurrent
/sys/class/power_supply/battery/BatteryAverageCurrent

```

The two files for my Android 4.4.2:

```
/sys/device/platform/battery/power_supply/battery/BatteryAverageCurrent
/sys/class/power_supply/battery/BatteryAverageCurrent

```

The file `BatteryAverageCurrent` would show a numeric value with no mention of any unit (be it `A` or `mA`).

In my devices, both the files (second was the symlink of the first) had the same value (dynamic, Current varies of course) like `440` when connected to PC, and `880` when connected to charger. Correspondingly, **Ampere** showed the similar value with a slight mismatch of +- `1-10` mA. // Somebody on XDA said that this app doesn't show true values, but that's none of my concern honestly.

### Test 3: A Qualcomm device running Android 5.0.2 (CyanogenOS 12)

I read that Google made changes in Lollipop related to measurement of current, and among other things, `BatteryAverageCurrent` is nowhere to be found in the system, at least not in my system. Don't blame me since I didn't verify whether the changes were introduce in Lollipop or before, and it's not really a concern to test the things here.

Before I tell the tale further I should mention that **Ampere** had no trouble in this device even though there were two files to measure current:

```
/sys/devices/00-qcom,charger/power_supply/battery/current_now
/sys/class/power_supply/battery/current_now

```

Not to mention that the second one is the symlink of the first one, and `00-qcom,charger` may differ in your device.

Anyhow, when it comes to the content of the `current_now` you can consider everything same as in `BatteryAverageCurrent` except that the value was in negative like `-180` or `-840` (don't ask me why?)

### There's more

The last directory named `battery` has some other cool stuff which might interest some people. Checkout them like Battery temperature, Voltage, capacity, among other things.

If you want a summary of them, look at `uevent` file whose output would be like:

```
POWER_SUPPLY_NAME=battery
POWER_SUPPLY_CHARGING_ENABLED=1
POWER_SUPPLY_STATUS=Charging
POWER_SUPPLY_CHARGE_TYPE=Unknown
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_VOLTAGE_MAX_DESIGN=4350000
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=4400000
POWER_SUPPLY_VOLTAGE_NOW=4316000
POWER_SUPPLY_CAPACITY=100
POWER_SUPPLY_CURRENT_NOW=0
POWER_SUPPLY_INPUT_CURRENT_MAX=100000
POWER_SUPPLY_INPUT_CURRENT_TRIM=33
POWER_SUPPLY_INPUT_CURRENT_SETTLED=0
POWER_SUPPLY_VOLTAGE_MIN=4300000
POWER_SUPPLY_INPUT_VOLTAGE_REGULATION=1
POWER_SUPPLY_CHARGE_FULL_DESIGN=0
POWER_SUPPLY_CHARGE_FULL=0
POWER_SUPPLY_TEMP=311
POWER_SUPPLY_TEMP_COOL=0
POWER_SUPPLY_TEMP_WARM=0
POWER_SUPPLY_SYSTEM_TEMP_LEVEL=0
POWER_SUPPLY_CYCLE_COUNT=0
POWER_SUPPLY_CHARGE_NOW=5048
POWER_SUPPLY_FASTCHARGER=0
POWER_SUPPLY_CHARGE_TIMEOUT=1

```

And if (somehow) you're wondering about `0` in `POWER_SUPPLY_CURRENT_NOW=0` then know that `POWER_SUPPLY_CAPACITY=100` i.e. charging was complete and even **Ampere** was showing `0mA`.

---

As for Logging, sorry! since I've no detailed solution as I didn't bother because the logging can be done using an automation tool like Tasker.

But a brief usage of **Tasker** must be told:

* Create a profile based on time or the type that suits your goal.
* There are two file actions under the action **File** namely `Read File` and `Write File`. If it doesn't work, then you can always do `cat <SOURCE> >> <DESTINATION>` using the action **Code → Run Shell** and you don't need root access.

We're good to go now!
> 4 votes

# Answer
This is not as in-depth as FireLord's answer, but I found a few apps that might be useful.

These all appear monitor current and have a log feature:

These are more general system monitors but they appear to include battery stats and logging:
> 3 votes

# Answer
I tried all of the above apps, but in 2020 they all are either no longer existing or they do not log the data like we hoped.

This one does, though:

3C Battery Monitor Widget
> 1 votes

---
Tags: battery
---


# Question
Title: Samsung Galaxy note 3 SM-N9005 cannot boot due to Power down
I have Samsung galaxy note 3 SM-N9005 and I wanted to make hard reset but I accidental did Power down. And now, my phone does not fully switch on. When I turn on the phone it stops at the Samsung sign. I waited for several minutes but nothing further happened.

# Answer
The OP stated (in a comment),

> I took the phone for repair and found out the problem, they said that they need to reinstall the entire phone again.
> 0 votes

---
Tags: samsung-galaxy-note-3
---