# Question
Title: Adb command(s) to get screen state and locked state
**Background:**

I'm using automated tests on many different variants of devices (*Samsung tablets and smartphones such as Galaxy A5, S8, S7 etc.*) where the devices have different versions of Android (*6.0, 6.0.1, 7.0 and 7.1.1*) - all in varying combinations.

Some of my tests require locking the screen (turning it off) and then turning it on and PIN-ing in. I have not been able to find a (universal) adb-command to get the phones' state. Ideally, I would like **one** command to tell me in which of the following states the phone is in:

1. Screen turned off (Assumed locked as well)
2. Screen turned on, locked
3. Screen turned on, unlocked

My best solution *so far* is to use the following 2 (bash terminal) commands:

```
#1:
adb shell dumpsys display | grep "mScreenState"

#2:
adb shell service call trust 7

```

Command #1 tells me whether the screen is on, off or "dozed".

Command #2 tells me whether the phone is locked or unlocked.

**Questions:**

Is there a single adb command which can give me the information I need? Is this command compatible with the Android versions listed above?

On Android version 6.\* command #2 **always** indicates that the phone is locked. What is the "Android 6.\* compatible" alternative of command #2? ----\> *By pure chance I found that "service call trust **6**" works as expected on Android 6.* devices!\*

**Note:**

The resource I've found that most closely resembles my issue is the following SO question/response. However, not all of the devices have/use NFC so the following command (although compatible with most devices/versions) is not acceptable in my tests:

```
adb shell dumpsys nfc | grep 'mScreenState='

```

Since timing is an issue, the proposed solution (best answer in the link) is not acceptable either.

# Answer
I am a Windows fanboy, so the solution contains `find` instead of using `grep`, just replace find with grep.

```
adb shell dumpsys power | find "mWakefulness="
adb shell dumpsys power | find "mHoldingWakeLockSuspendBlocker="

```

> Screen **OFF** and **Locked** = mWakefulness=**Asleep** & mHoldingWakeLockSuspendBlocker=**false**
>
> Screen **ON** and **Locked** = mWakefulness=**Awake** & mHoldingWakeLockSuspendBlocker=**false**
>
> Screen **ON** and **Unlocked** = mWakefulness=**Awake** & mHoldingWakeLockSuspendBlocker=**true**

**P.S:** I've tested it on **Android 7.0**, don't know if it'll work with other versions.
> 3 votes

# Answer
As I've run into this recently and since using the Daydream lockscreen is not an requirement on Android, here's some newer variables that are (probably) universal.

They *should* be available starting at **Android M (6.0 / API 23)** since they come with Doze mode; I've **confirmed** them with Android 10 on a Samsung Galaxy Tab S4 and Android 12 on a Pixel 4 XL.

```
$ adb shell dumpsys deviceidle | grep '\bm[A-Z]'
mLightEnabled=true  mDeepEnabled=true
mForceIdle=false
mUseMotionSensor=true mMotionSensor={Sensor name="Significant Motion", vendor="Google", version=1, type=17, maxRange=1.0, resolution=1.0, power=0.25, minDelay=-1}
mScreenOn=false
mScreenLocked=true
mNetworkConnected=true
mCharging=false
mMotionActive=true
mNotMoving=false
mMotionListener.activatedTimeElapsed=36192
mLastMotionEventElapsed=0
mLocating=false mHasGps=false mHasNetwork=false mLocated=false
mState=INACTIVE mLightState=IDLE
mInactiveTimeout=+30m0s0ms
mNextAlarmTime=+22m36s283ms
mNextIdleDelay=+10m0s0ms (flex=+2m0s0ms)
mNextLightAlarmTime=-23s699ms
mCurLightIdleBudget=+1m0s0ms

```

Of course, the prize jewels here are `mScreenOn` and `mScreenLocked`, which are booleans doing exactly what you went them to.
> 1 votes

# Answer
You could use awk to spit out the answer you want. Here is a quick and dirty awk script I whipped up just now:

```
adb shell dumpsys power | awk -F"[ =]" '/mWakefulness=/ { mw=$NF; }
/mHoldingWakeLockSuspendBlocker=/ {mh=$NF;}
END {
  print mw
  print mh
}'

```
> 0 votes

# Answer
has answered in Is there a way to check if Android device screen is locked via adb? - Stack Overflow and copy to here:

* My Phone: `XiaoMi 9`
    + Android: `10`

# use adb to check status of screen locked

## method 1: (universal) use `mDreamingLockscreen`

* Command: `adb shell dumpsys window | grep mDreamingLockscreen`
* Output:
    + `mShowingDream=false mDreamingLockscreen=true mDreamingSleepToken=null` -\> Screen **Locked**
        - no matter Screen is `ON` or `OFF`
    + `mShowingDream=false mDreamingLockscreen=false mDreamingSleepToken=null` -\> Scrren **Unlocked**

## method 2: use `nfc` (if android has NFC module)

* Command: `adb shell dumpsys nfc | grep 'mScreenState='`
* Output:
    + `mScreenState=OFF_LOCKED` -\> Screen OFF and Locked
    + `mScreenState=ON_LOCKED` -\> Screen ON and Locked
    + `mScreenState=ON_UNLOCKED` -\> Screen ON and Unlocked
> 0 votes

---
Tags: adb, lock-screens
---


# Question
Title: Make mounted cifs/smb share visible for normal user in Android-x86
With ES Explorer not to be trusted any more, I needed another solution for easy access to my SMB/CIFS network shares. Mounting a SMB/CIFS network share in Android-x86 (version 9 R2) turned out to be a lot easier than any of the solutions I found on StackExchange. I did not need to install any software or app, `mount -t cifs` works just out of the box.

The problem is that I cannot make this mount visible for normal user. Only root or superuser, whatever it is called in Android, sees and can use the mounted file system, whereas the normal user keeps seeing the mountpoint as a directory of Android's own filesystem.

To clarify, have a look at this terminal session. In this example, Android is running in a Virtual Box VM, the IP address is that of the host itself. I make a subdirectory in /sdcard/Download/ to mount on, with the intent of easily moving files from Download to the share mounted on that subdirectory. I mount the share as superuser, with appropriate options, and then, both as normal and as super user, list the subdirectory contents and stat the subdirectory :

```
$ cd "/$EXTERNAL_STORAGE"/Download/ # i.e. /sdcard/Download/
$ mkdir SERVER_SHARE
$ touch SERVER_SHARE/"NOT THE MOUNTED SHARE" # a marker for the base directory
$ su -c "mount -v -o username=guest,rw,noperm,iocharset=utf8 -t cifs //192.168.1.10/SHARE $PWD/SERVER_SHARE"
$ ls SERVER_SHARE/
'NOT THE MOUNTED SHARE'
$ su -c "ls SERVER_SHARE"
... lists all the files on the share ...
$ stat SERVER_SHARE
  Size: 4096        Blocks: 0          IO Block: 512   directory
Device: 1dh/29d Inode: 409629          Links: 2
Access: (0770/drwxrwx---)  Uid: ( 0/    root)   Gid: ( 9997/everybody)
...
$ su -c "stat SERVER_SHARE"
  Size: 0           Blocks: 0          IO Block: 512   directory
Device: 1eh/30d Inode: 217          Links: 2
Access: (0755/drwxr-xr-x)  Uid: ( 0/    root)   Gid: ( 0/    root)
...

```

You see the difference between normal and super user: `ls` shows different directory contents because `stat` says they see the subdirectory on a different Device. A possible explanation could be that the normal user has the file descriptor for the directory open, and keeps using that file descriptor and the contents it points to, even after some other file system is mounted over it. But that would probably not explain why exactly the same thing happens if I put the `mkdir` inside the su command for the `mount`.

For the time being, I can only access the mounted samba share of the VM host from the terminal, as super user, to copy files between the share and the Download folder. I have put the `mkdir` and `mount` commands in a script, and added the `touch` command to mount the directory under the mountpoint as 'not the network share'.

**My question is this**: how do I make the mounted share visible to the normal user, so that I can use the Android apps like "Files" and other file managers to access it in a GUI.

# Answer
## Management summary

* **You probably do not need this.**
* There are free (gratis, yes) apps to access network shares.
* Mounting network shares does not even need these apps; everything you need is included with Android-x86.

## How to access your network shares as user of Android-x86

* There are plenty of file manager apps that allow you to copy files between your Android directories and your network shares. One that I find particularly suitable for this is a free app called X-Plore File Manager, because in it you can set up shortcuts to your network shares, and it has a dual pane view, so that you can open source and destination directories each in their own pane.
* However, to directly access network shares from within apps, without intermediation of a file manager, it is usefull to mount those network shares into Android's user visible folders like Downloads, Movies, Music or Pictures.
* Though not really linux, one of the linuxy things Android-x86 uses to complicate life for the unsuspecting user, for her or his own good, is *Security-Enhanced Linux* or SELinux. It is straightforward to mount a network share, there is nothing to install. But you need the appropriate security context to mount a network share so that it is visible to you as user.
* To make things reproducible, you can script the mounting procedure. Android-x86 comes with a stripped MirBSD Korn shell. You can read it's man page online.
* You can use my script as example; I clarified it with comments. In this script, fill in your own servername and server's ip address, and maybe the share name you use most; mine is named RAMDISK, which is ... a ramdisk.
* Because my Androix-x86 device is not accessible for others, I hard coded my username and password. I hope you can not retrieve my original answer after I modified it to hide myusername and mypassword. You probably prefer not to code your credentials in a script; you can use the shell's builtin read command to enter them on the command prompt.

```
#!/bin/sh
main() {
    # default to my preferred share
 typeset share="${1:-RAMDISK}"
    # MY SERVER
 typeset servername=MYSRV
 typeset serverip=192.168.1.10
    # SELinux context for the virtual filesystem sdcardfs:
 typeset context="context=u:object_r:sdcardfs:s0,iocharset=utf8"
    # mount (from root mount namespace) to /mnt/runtime/write/emulated which is
    # propagated to all apps' mount namespaces.
 typeset mntpt=/mnt/runtime/write/emulated/0/Download/"$servername"_"$share"
    # make mountpoint and add file as warning: if you see that file,
    # you do not see the network share
 [ -d "$mntpt" ] || su -c "mkdir -p \"$mntpt\" ; \
    touch \"$mntpt\"/\" @=# NOT A MOUNTED NETWORK SHARE #=@. \""
    # first try to mount with my credentials, used as file ownership on server, else as guest
    # su not needed when already running as su, but does no harm either
 su -c "mount -v -o username=myuser,password=mypassword,rw,noperm,$context \
    -t cifs //$serverip/\"$share\" \"$mntpt\" || \
   mount -v -o username=guest,ro,noperm,$context \
    -t cifs //$serverip/\"$share\" \"$mntpt\" || \
   echo mount of \"<$share>\" failed"
 unset -f main
}
main "$@"

```
* I saved this script on my Android-x86 device as `/sdcard/mounty`. SELinux makes it tricky to make it executable, but that is not needed: you can let the shell's builtin commands `source` or `.` execute it. From a terminal app, or after pressing Alt-F1 to go to the *tty1* terminal (Alt-F7 brings you back to the GUI), just enter

```
. /sdcard/mounty MYSHARENAME

```
* Instead of a mountpoint in `.../Download/`, you could mount your shared movies under `/mnt/runtime/write/emulated/0/Movies/`, and the network share with your family album under `/mnt/runtime/write/emulated/0/Pictures/`, of course.

## Technical details

* You can read up on the reason why you need a SELinux context in this answer to *"How to bind mount a folder inside /sdcard with correct permissions?"*. I only understand half of it, but the gist is that under Android not only users, but apps too need access rights as well.
* To implement this, a special file system called `sdcardfs` is used. It exposes the folders that a user sees under `/sdcard`, to the apps on 3 different mount points, depending on an app's access rights, and on 1 extra mount point for the user's access. This is an extract of what the `mount` command reports :

```
/data/media on /mnt/runtime/default/emulated type sdcardfs (rw,...,gid=1015,multiuser,mask=6)
/data/media on /mnt/runtime/read/emulated type sdcardfs (rw,...,gid=9997,multiuser,mask=23)
/data/media on /mnt/runtime/write/emulated type sdcardfs (rw,...,gid=9997,multiuser,mask=7)
/data/media on /storage/emulated type sdcardfs (rw,...,gid=1015,multiuser,mask=6)

```
* The `/read/` and `/write/` mountpoints speak for themselves.
* I guess that the `/default/` mountpoint is for navigating through directories only, for apps with neither read nor write access.
* Exploring the directory tree with the command `ls -l`, you find directory `/storage/emulated/` holding a subdirectory for each user. In single user installations this will be user `0`, wherein you will find the user directories `Download`, `Movies` etc. When user `0` logs in, his `/storage/emulated/0/` is mirrored onto `/storage/self/primary/`.
* Directory `/sdcard/` finally is, in fact, a symbolic link to that `/storage/self/primary/`, and voilà, that is why the user sees his user directories under `/sdcard/`, which is all a non-root user gets to see of his filesystem.
* Mounting the network share, with the right SELinux context, onto a directory under `/mnt/runtime/write/emulated/0/` (note the `write` directory), as in my script, makes the share visible somewhere under the same 4 directories:

```
//192.168.1.10/RAMDISK on /mnt/runtime/default/emulated/0/Download/FRT_RAMDISK type cifs (rw,...
//192.168.1.10/RAMDISK on /mnt/runtime/read/emulated/0/Download/FRT_RAMDISK type cifs (rw,...
//192.168.1.10/RAMDISK on /mnt/runtime/write/emulated/0/Download/FRT_RAMDISK type cifs (rw,...
//192.168.1.10/RAMDISK on /storage/emulated/0/Download/FRT_RAMDISK type cifs (rw,...

```
> 2 votes

---
Tags: mount, android-x86, superuser, cifs
---


# Question
Title: Turn off "double-tap to unlock" on Samsung Galaxy S7
For some reason, whenever someone calls me, the Samsung Galaxy S7 now shows the phone put, tells me to double-tap to unlock, then it does it a few seconds later. I have never seen this before, never wanted to double-tap.

I have gone to the talkback and it is off.

I don't know why it started doing this but how do I make it stop?

# Answer
Go to Settings -\> Display -\> Double tap -\> Turn on double tap is enabled.
> 1 votes

# Answer
Also try this. Go setting / accessibility / talkback. Turn off talkback. When talkback is on, it will prompt to double tap to unlock. But this double tap is using two finger and swipe up.
> 1 votes

# Answer
I have a Galaxy S7 SM-G930U and had the same issue. Both during incoming and outgoing phone calls my phone would display a padlock symbol and a message reading "Double tap to unlock." This would overlay the call information screen behind. When the message was displayed, I was unable to hear a ring or voice on the call.

The workaround was to quickly double-tap and press speaker to allow the phone call to function.

I had recently installed a new head phone jack inside the phone and had also received a software update. Trying new phone apps did not solve the problem, so I suspected it was a hardware issue. I went through all of the steps necessary to remove the back cover, disassemble the phone and removed and reattached the battery connection. I had taken this step to replace the headphone jack. Somehow the battery connection must have been loose because reattaching the battery solved the 'double-tap' issue for me. Disassembling your phone is a process, be careful, or take your phone to a shop to check it.
> 0 votes

# Answer
0

I have a Galaxy S7 SM-G930T and had just changed the battery. When looking for an answer to the double tap to unlock problem, one answer suggested proximity sensor problem and then found Androi\_toulouse answer. Both these suggested to me that the problem might be with the ear speaker not being connected properly since that was what was not working even when I double tapped. Removing the back cover which I had only seal light at the sides, I inspected the area at the top end of the fone and found that the small top circuit board was not seated correctly. A couple of tabs at the top needed to be tucked under the frame. Remove the board and loosened 3 screws on the speaker/batt cover to lift and help accomodate the board so that it laid flat and secure. Turned the fone back on and made a call ... everything worked fine after that.
> 0 votes

---
Tags: samsung, lock-screens
---


# Question
Title: SD card has 81% free space but says insufficient space for App2SD (native, Huawei Honor 4X)
I have downloaded OLX app and presently it is in internal memory. When I try to move this app to SD card it says "Insufficient space. Can't move to SD card". Please help. I am using Huawei Honor 4X handset now.

# Answer
> 0 votes
Try to move some small apps from SD card to phone memory, then try moving any apps from phone memory to SD card, as you said Ola, or any other. I did the same when I had that issue.

# Answer
> 0 votes
There are some cheap cards that are actually hacked - they lie their capacity to the system. I'd suggest you to make a test to check if you didn't get a fake SD card. This site recommends you to install H2testw in a Windows computer or SD Insight Android app to test the card's properties. Another option for newer Android is True SD Card Capacity & Speed Test: Pro Version app.

Unfortunately, cheap SD cards most of the time mean fake SD cards - they often have a much smaller capacity than what they announce (and smaller than all the OS recognizes), causing data corruption when you try to store more data than what those fake cards actually supports - among other problems...

---
Tags: applications, insufficient-memory, huawei
---


title: Start application from ADB

text:
# Question
Title: Start application from ADB
I have an Android device which I don't have physical access to. But I can access it through ADB commands. I have Teamviewer host installed on it. But unfortunately it's not running. How can I start it using ADB commands? Below is the Teamviwer app that I am using.

https://play.google.com/store/apps/details?id=com.teamviewer.host.samsung&hl=en

# Answer
You can launch apps with the `am start` command. Or if you don't know its launcher activity, use the `monkey` command.

Try

```
adb shell

monkey -p your.package.name -v 500

```

where package name is the name of the app package – making the command, in your case:

```
monkey -p com.teamviewer.host.samsung -v 500

```
> 9 votes

# Answer
A very simple solution to access a device could be SCRCPY https://github.com/Genymobile/scrcpy

It runs over ADB and mirrors your device on your PC. You can click on all the elements on the devices screen and also type with your PC keyboard.
> 0 votes

---
Tags: adb
---


# Question
Title: How to root Vodafone 858 (froyo) / Huawei u8160
I have a *Vodafone 858* smart phone running Froyo (Android 2.2). Manufacturer is Huawei (u8160). How can I root this device?

# Answer
> 0 votes
Apparently the recommended tool would be SuperOneClick. It seems that this is malware infested though. Apparently most sites took down their downloads, so maybe it is indeed bad. I tried to find another tool and found this: http://www.kingoapp.com/android-root.htm

I tested it with an online scanner and it got 6 hits out of 65, so use at your own risk. However I tried to find information about it and it seems to be ok and the alarams are claimed to be false positives. I used it successfully to root my VF 858, so it works. However if somebody finds out that this is indeed infested with malware then remove this answer or drop a note.

Usage is pretty simple as you just have to connect your device, enable USB debugging and then press the buttons in the Wizard.

# Answer
> 0 votes
The device you mentioned (Vodafone 858 Smart) has a Qualcomm MSM7225 Snapdragon S1 and android 2.2 (from GSMArena).

As far as I know most Qualcomm soc can be rooted. But as you already have a lower android version I won't suggest getting hands dirty. Instead use one click root tools from XDA. Famous ones like dirty cow, one click root, and frama root, etc like old days.

If you still can not root your device use Qualcomm edl method to dump boot img, then use magisk to patch it.

---
Tags: rooting, 2.2-froyo
---


# Question
Title: How can I change the time and date for an app without changing my phone settings?
I want to change the time and date for an app without changing my phone settings.

How can I do that?

# Answer
> 1 votes
**Here's the methods you can use to set custom time for specific apps:**

1. Xposed Hook - You can use Xposed modules that hook into date time functions inside the app. Everytime the app requests date time the module returns custom data. AppSettings, Xprivacy, Xprivacy Lua are few well known modules. (For using Xposed without root you can use taichi / virtualXposed)
2. Frida Hook - Just like Xposed you can hook date time methods to return different data. I cannot find an example of this, but it's very possible.
3. Patch Smali - You can decompile the apk and patch all date time calls with constant values. So it returns same date and time. Some thrid party cloner apps do this for you with nice GUI.

---
Tags: applications, date-and-time
---


# Question
Title: How to install recovery for S7 when in bootloop and not recognized by USB
My Samsung Galaxy S7 (SM-G930F) that was installing LineageOS 18.1 is stuck in a bootloop and I can not get into recovery or pretty much do anything. I can, however, get into download mode, but the phone is not recognized by USB connection. (From what I read a year ago, I think that this is an issue with some Samsung Galaxy S7 phones. It has not worked for a while).

Is there a way to install/get in recovery without a USB connection (since the USB is not recognized). The USB connection does put power into the device so the issue is likely with the connection and data transfer.

# Answer
I was able to drain down the battery and in that manner get into recovery mode.

Update: also realized that the following may work. VolUp+VolDown+Home+Power eventually puts into reboot, and then Jump in and do VolUp+Home+Powerand when Samsung logo comes, let go of power. This is a touch-and-go and may not always work. Needs considerable artistry to make it work.
> 1 votes

---
Tags: recovery-mode, twrp, samsung-galaxy-s7
---


# Question
Title: Need one-line adb shell su push & pull to access /data from Windows batch file
I wrote a Windows batch file that replaces Amazon lockscreen ads with user images on *rooted* kindle fire hd 7", 2013 (kfsowi). Just learned I botched the adb commands because I was running "adb insecure" so was getting su access without writing it into the adb commands.

**What I need:** To run in batch file, I need one-line adb shell su commands to pull from/push to `/data` on this device. (Or I could use `adb -d shell su -c "mount -o remount rw, /data` on one line followed by the pull or push)

I have fixed an ls command like this:

* this worked with adb insecure: `adb ls "/data/securedStorageLocation"`
* what I needed was: `adb shell su -c "ls ./data/securedStorageLocation"`

Now I need same for pull and push. The problem:

* With adb insecure, this works fine: `adb pull "/data/securedStorageLocation" "C:/destination"`
* Without adb insecure I get: `remote object '/data/securedStorageLocation/' does not exist`

Above happens even if I first run: `adb -d shell su -c "mount -o remount rw, /data`

Can someone tell me how to do the pull and push with adb shell and su?

EDIT: `adb root` command doesn't gain root on this device

# Answer
Well, you have to do a few commands, as I don't believe it will work in one.

You need to do:

1. `adb shell`
2. `su`
3. `cd /data/path/of/file`
4. `cp /data/path/of/file/copyme /data/local/tmp`
5. `chown shell.shell /data/local/tmp/copyme`
6. `exit`
7. `exit`
8. `adb pull /data/local/tmp/copyme /destination/copyme`

This works for me every time.
> 11 votes

# Answer
```
adb root; adb push /local/file /distant/root/owner/file

```

"adb root" will restart adbd as root then your push is accepted
> 4 votes

# Answer
Thanks for this discussion. It led me to a solution that worked well enough for me while backing up my phone that won't mount its internal ext4, before I do something drastic while trying to fix it (apparently this needs root permissions).

Note that `adb shell` generally sets up a text terminal (so can convert single end-of-line characters to CRLF, mangling binary data like partition images or TAR archives). While you can work around this in Unix/Linux versions of adb (e.g. add `stty raw` to your shelled command) or use some newer adb with `exec-out` option, on Windows it still writes CRLF to its output. The neat trick is to pass data through base64 encoding and decoding (binaries are available for Windows en-masse). Also note that errors or verbose messages printed to `stderr` in shell end up on `stdout` of `adb shell` program in the host system - so you want to discard those after inevitable initial experimentation.

Here goes:

```
adb shell "su -c 'cat /dev/block/mmcblk0p25 | base64' 2>/dev/null" | base64 -d > p25

```

Can be easily scripted by Windows to cover all the partitions (can look the list up by `ls -la /dev/block/` and/or by `cat /proc/diskstats` or `cat /proc/partitions`), e.g.:

```
for /L %P in (1,1,25) do ..\platform-tools\adb shell "su -c 'cat /dev/block/mmcblk0p%P | base64' 2>/dev/null" | base64 -d > s3-mmcblk0p%P.img

```

(Note to use `%%P` in CMD batch files, or `%P` in interactive shell).

Don't forget that there are also `mmcblk0boot[01]` partitions, and that the `mmcblk0` overall contains all those partitions in a GPT wrapping, just like any other harddisk or impersonator of one :)

To estimate individual partition sizes, you can look at the output of:

```
fdisk -u -l /dev/block/mmcblk0*

```

Unfortunately, I did not quickly and easily manage to `tar cf - mmcblkp0*` and get the partition contents, so I could pipe it to e.g. `7z x -si` and get the data out as multiple files in a portable one-liner as well.

To `tar` some files you can:

```
adb shell "su -c 'cd /mnt/data && tar czf - ./ | base64' 2>/dev/null" | base64 -d > s3-mmcblk0p25-userdata.tar.gz

```

UPDATED: Found some more tricks to transfer binary data.

Hope this helps someone else, Jim Klimov
> 2 votes

# Answer
Not necessarily will it be one-line, but you can try to do the following actions:

* (with adb shell, su) Copy the files to a temporary accessible location on your device (for example, `/sdcard`, or external SD card)
* (with adb pull) Copy these files from the temporary location to your machine
* Delete temporary copy

Possible drawback: between first and last step a malicious app, if you happen to be "using" it, may read and/or modify there files in temporary publicly accessible directory. In practice, this is very unlikely.
> 1 votes

# Answer
I use the batch script (`extract-db-from-emulator.bat`) below to pull local database out to the host:

```
@@echo off
SET adb_path="%USERPROFILE%\AppData\Local\Android\sdk\platform-tools\"
SET application_id="com.example.myapp"
SET root_access_filepath="/data/user/0/%application_id%/databases/local.db"
SET pullable_filepath="/mnt/sdcard/DCIM/local.db"
SET host_directory="%USERPROFILE%\Desktop"
SET root_command="su 0 cp"
%adb_path%adb.exe shell "%root_command% %root_access_filepath% %pullable_filepath%"
%adb_path%adb.exe pull %pullable_filepath% %host_directory%

```
> 1 votes

# Answer
I see an error with

```
adb shell "su -c '<your command>'"

```

> su: invalid uid/gid '-c'

The **solution** is on Linux

```
adb shell su 0 '<your command>'

```
> 0 votes

---
Tags: adb, root-access, linux, amazon-kindle-fire, command-line
---


# Question
Title: Does deleting a photo from my android phone's gallery app also delete it from Google Photos(I have backup & sync turned on).If yes, how to prevent it
I have a samsung (android) device and I use samsung gallery app. Question: Does deleting a photo from the gallery app also delete it from Google Photos in which I have my backup and sync turned on. And if yes, then how to prevent it. ie I want a photo to stay in Google Photos even after I delete it from Samsung Gallery app.

PS: If the solution is to turn off sync then how to Turn on just backup on Google Photos without turning on sync.

# Answer
> 1 votes
Yes, Google Photos does send it to the bin.

You can prevent this from happening by tapping the "Free up space" feature in Google Photos, which will delete all the photos on your phone that have already been backed up to Google Photos.

# Answer
> 0 votes
If you want to delete specific photos from your device without deleting them from your Google account, the following steps should do it:

1. Remove your Google account from your phone:
    1. Go to Settings
    2. Tap Accounts
    3. Tap your Google account
    4. Tap Remove account
2. Delete the desired photos from your phone.
3. Re-add your Google account to the phone.

Note: this might result in some minor inconveniences the next time you launch various other apps that use your Google account. And it's certainly much more of a hassle than using the method alecxs provided.

---
Tags: samsung, backup, sync, gallery, google-photos
---


# Question
Title: How to reliably recover data from a dead Samsung Galaxy S8 phone?
My friend has a Samsung Galaxy S8 (not S8+) that has a broken screen, but after operating with this broken screen for a while, wouldn't boot past the Samsung logo, and now won't respond to a power connection at all.

So to be clear, the phone doesn't do anything when plugged in to power. No partial boot, nothing on the screen. Nothing happens.

**What are the options for recovering the data on the device, that's on the onboard memory module (not on the Micro SD card)?**

1. Is it possible to move the memory module to new phone hardware?
2. Could the phone still be partially alive and be able to use a diagnostic mode to download the data via cable?
3. What other troubleshooting steps should I use to diagnose what state the phone is in?

(I'm quite technical so feel free to get in to infinite detail.)

# Answer
According to iFixit tear down Samsung Galaxy S8 has a separate flash chip, it is the chip marked orange:

But Samsung Galaxy S8 exists in multiple variants which can have a totally different hardware layout and components.

Technically a skilled person with the right tools may be able to desolder the flash chip and move it to a new mainboard or read it's content in a special flash chip reader. But this whole procedure may be useless if the device was encrypted. I don't know if S8 comes encrypted by default. If it is encrypted all attempts to read it with a different hardware will (most likely) fail because the encryption key is not include in the flash memory.

Regarding the current state: If the phone does not power on only an expert on Samsung devices can answer that question.
> 2 votes

---
Tags: samsung, data-recovery, samsung-galaxy-s-8
---


title: recovering contacts from apk file

text:
# Question
Title: recovering contacts from apk file
I have backups made using OAndBackupX from my android phone and would like to recover my contacts from there. From looking around, I see that I have a directory called com.android.contacts which has in it a Contacts.apk file and a data.tar.gz file (which has shared\_prefs/com.android.contacts.xml, which does not appear to be that useful) inside it. Is it possible to get my contacts (name and phone number) from this apk list? If so, how?

The Contacts.apk file opens into a bunch of folders and files:

```
AndroidManifest.xml  classes.dex  META-INF/  resources.arsc
assets/              com/         res/       shared_prefs/

```

Which, if any, of these would have the data I am looking for?

# Answer
After mucking around a bit, I have been able to get enough information to reconstruct my contacts information. Thank you to @Izzy for pointing it out to me.

I obtained my `ContactsProvider.apk` from my backup and also `data.tar.gz` and `device_protected_files.tar.gz`.

I then unzipped my ContactsProvider.apk using `unzip ContactsProvide.apk` and got:

```
databases/  files/  shared_prefs/

```

The databases

```
calllog.db          contacts2.db  profile.db
calllog.db-journal  profile.db-journal

```

It would perhaps make sense that contacts2.db would have this information, so I looked into this sqlite3 file (as it is what I found below):

```
$ file contacts2.db
contacts2.db: SQLite 3.x database, user version 1400, last written using SQLite version 3022000

$ sqlite3 contacts2.db
SQLite version 3.36.0 2021-06-18 18:36:39
Enter ".help" for usage hints.
sqlite> .tables
_sync_state               phone_lookup              view_data_usage
_sync_state_metadata      photo_files               view_entities
accounts                  pre_authorized_uris       view_groups
agg_exceptions            presence                  view_metadata_sync
agg_presence              properties                view_metadata_sync_state
android_metadata          raw_contacts              view_raw_contacts
contacts                  search_index              view_raw_entities
data                      search_index_content      view_stream_items
data_usage_stat           search_index_docsize      view_v1_contact_methods
default_directory         search_index_segdir       view_v1_extensions
deleted_contacts          search_index_segments     view_v1_group_membership
directories               search_index_stat         view_v1_groups
groups                    settings                  view_v1_organizations
metadata_sync             status_updates            view_v1_people
metadata_sync_state       stream_item_photos        view_v1_phones
mimetypes                 stream_items              view_v1_photos
name_lookup               v1_settings               visible_contacts
nickname_lookup           view_contacts
packages                  view_data

```

Carrying on with the above, I did the following:

```
$sqlite contacts2.db
sqlite> .separator , # to get the information in a CSV file with comma separation
sqlite> .output raw_contacts.csv #Where to save the file
sqlite> select * from raw_contacts; # Get it from raw_contacts in in the table above
sqlite> .exit

```

Then the file `raw_contacts.csv` has the information I want. There are several tables that have this information, and I just think that this one is fine from the ones I tried. Perhaps there are others that are better.
> 0 votes

---
Tags: contacts, apk
---


# Question
Title: Cannot list all folders in /data/data in few apps
I have a rooted Android 11.

Using Termux, or Es File Explorer, I can see all the 284 directories in `/data/data`.

Unfortunately, many file explorer apps (*with* root privileges, such as Total Commander, ZArchiver) can only see 2 folders : `com.google.android.gms` (don't know why), and their own data folder.

I thought this was related to this, but apparently no since I granted the root privileges to both apps...

How could I see all the folders in /data/data using (for example) Total Commander? Doing a `chmod 755` in Termux? Or maybe there is a problem with these apps as if they they don't use root privileges if at least one folder/file is visible in "normal user" mode?

# Answer
To mark this question as solved.

As @alecxs said, these apps does not handle correctly mounting namespaces, and therefore we need to select in Magisk settings `Mount Namespace Mode`-\>`Global Namespace` instead of Inherit.
> 1 votes

---
Tags: root-access, file-permissions
---


# Question
Title: After a factory reset the restore of SMS, call-history etc. fails
I turned on "backup to google drive" using an account on a "legacy free edition of Google Apps" domain and then factory reset my Pixel 3. When I worked through the re-configuration, at the very end, the restore failed with a message saying "`Couldn't finish restoring the backup`". Several attempts at re-running this didn't change anything.

# Answer
My working theory is that the failure is due to the default installed version of the apps in question, after a factory reset, being older than the version that created the backup before the factory reset. What is needed is to defer the restore-from-backup (which seems to be impossible to directly trigger once the initial setup is "done") until after they are all updated.

What ended up working was to do the following:

* During the initial setup bypass adding an account at all and defer as much setup as possible (remind me later, skip, etc.). As soon as possible, get a home screen. (I just left the setup screens idle in the background.)
* Once at a basic home screen,use the app update screen and prompt an immediate update of ***everything***,
* Wait for those updates to completely finish.
* Then, add the primary account.
* Finally, resumed the setup, hope and pray that that it will now attempt the restore from backup using the newly added account.

I'm likely missing a number of details so you may have to try this several times to figure out exactly what things take.

Another thing I did, which might have an effect, was to restore only the thing I actually needed, ... but my gut says that wasn't the big difference that made it work.
> 1 votes

# Answer
This problem appears to be caused by Google Workspace domains which have policies set which require connected devices to have passwords/PINs/patterns. Which is the default for Workspace domains. But during initial setup on many phones, this happens before one has the chance to *set* a password/pin/pattern/whatever.

The method above presumably works because you have set up a PIN before trying to conenct a Google account - and it's probably the best way to do it.

An alternative solution, which I just followed successfully, is to turn off this requirement for the domain using the instructions at https://support.google.com/a/answer/6328679. This does, of course, require you to have permission to adjust admin settings for the Google domain.
> 1 votes

---
Tags: backup, factory-reset
---


# Question
Title: Install Python to run speedtest-cli on Android phone with no access to device - via adb
I want to install Python on an Android phone (the phone is connected to a Raspberry Pi so I don't have any GUI or physical access to the device). I can connect to the phone via `adb shell` and run/install packages via APK files easily. I want to install Python on the device to run `speedtest-cli` remotely via `adb shell`. https://github.com/sivel/speedtest-cli

`speedtest-cli` requires Python. So far I have tried the following based on online articles.

1. Installed Termux app via APK. I can access the underlying files remotely. I tried to install python using `pkg` command but could not. Error below.
```
1|:/data/data/com.termux/files/usr/bin # ./pkg install python
This must NOT be run as root as it will break your environment (root will be required for nearly everything due to changed file permissions)
1|marlin:/data/data/com.termux/files/usr/bin # whoami
root

```
2. Installed Qpython on the device using adb. However, the issue is that when I launch adb command to launch Qpython, I see a prompt on the device - "Allow Qpython to access media Options - Accept or Deny". Since I don't have access to the device, I can't select either of the options. Is there a way to send a command via ADB to select - Accept?

I would appreciate any other ideas as well. My end goal is to run the `speedtest-cli` utility via `adb shell` on a device that is not physically accessible.

# Answer
Solved this eventually. Here is what I did -

1. Installed Termux via downloading the APK and performing `adb install com.termux.apk`
2. Remotely launched the Termux app via ADB (monkey) (this is needed to complete the installation on the device) `monkey -p com.termux -c android.intent.category.LAUNCHER`
3. Once Termux is installed, I installed `python` and `speedtest-cli` on the device using `adb input text` and `keyevents` -

```
adb input text "pkg install python"
adb input keyevent "66"
adb input text "pip install speedtest-cli"

```
4. Then navigate to `/data/data/com.termux/files/usr/bin`. Here you should have the `speedtest-cli` script that you can invoke from `adb shell`

```
/data/data/com.termux/files/usr/bin # ./speedtest-cli
Retrieving speedtest.net configuration...
Testing from XXXXX
Testing download speed................................................................................
Download: 20.18 Mbit/s
Testing upload speed......................................................................................................
Upload: 3.98 Mbit/s

```
> 2 votes

# Answer
I basically followed the solution given by rfguy.
But I had this error:

> could not find a version that satisfies the requirement speedtest-cli (from versions: none)
> pip is configured with locations that require tls/ssl

I solved installing `openssl` too on Termux, as follows:

```
# uninstall Termux
adb uninstall com.termux
sleep 2

# install the apk
adb install -r ~/Desktop/Termux.apk
sleep 2

# open the app
adb shell monkey --pct-syskeys 0 -p com.termux 1
sleep 8

# install python
adb shell input text 'pkg%sinstall%spython'
sleep 2

# enter
adb shell input keyevent 66
sleep 15

# yes
adb shell input text 'Y'
sleep 2

# enter
adb shell input keyevent 66
sleep 60

# install openssl
adb shell input text 'pkg%sinstall%sopenssl'
sleep 2

# enter
adb shell input keyevent 66
sleep 10

# yes
adb shell input text 'Y'
sleep 2

# enter
adb shell input keyevent 66
sleep 15

# install speedtest-cli
adb shell input text 'pip%sinstall%sspeedtest-cli'
sleep 2

# enter
adb shell input keyevent 66
sleep 30

# run speedtest-cli
adb shell /data/data/com.termux/files/usr/bin/speedtest-cli

# hide termux
adb shell pm hide com.termux

```

You can run this script with a `sh .\this_script.sh` if you are already connected to the device with an `adb connect your_device_ip`
> 1 votes

---
Tags: adb, termux, python
---


# Question
Title: Why do I have Termux and Termux(failsafe)?
Why do I have two Termux applications, and what's the difference? This happened recently, after updating Termux I believe. I've installed Termux from F-Droid, and it mentions (failsafe) in the application name there. Cannnot see that in the Play Store.

# Answer
Termux (failsafe) is shown on the app drawer since the last update. When you update Termux to the latest version, it is also shown.

From this comment from what is Termux (failsafe)?:

> We have made sessions auto-closeable, see #988 for more information.
>
> Auto-closeable sessions may put application into "denial-of-service" condition if user will mess with files like .bashrc - in such case access to files on internal storage will be completely lost. Thus we had to create a separate icon.
>
> It's very unlikely that we will remove it. Easy access to failsafe shell is mandatory but unfortunately there no other reliable variants that will work on all Android versions.

Also based in this comment in Termux github:

> This creates a limited shell using only the Android system tools.

If for whatever reason Termux is unable to start, then use Termux failsafe.
> 2 votes

# Answer
It's just like the recovery mode feature for your Termux environment.

See: Termux Wiki - Recover a broken environment
> 0 votes

# Answer
**Scenario**

A new user just decided to change their default Termux shell to Fish instead of Bash. The easiest solution they came up with is to add these lines to `.bashrc` (`../usr/etc/bash.bashrc`)

```
fish
exit

```

It worked, but for some reason, they don't like Fish. They uninstalled/removed it and closed Termux without changing the contents of `.bashrc`. The next time they opened Termux, they saw this

```
The program fish is not installed. Install it by executing:
 pkg install fish

[Process completed (code 127) - press Enter]

```

Now, to fix this, they either need to **edit `.bashrc`** or **install Fish** again. For this, we need a shell that **doesn't run `.bashrc`**. Failsafe mode is the easiest and most helpful thing now.
> 0 votes

---
Tags: termux, f-droid
---


title: How do I export all Colornote to text?

text:
# Question
Title: How do I export all Colornote to text?
How can I export my notes from Colornote to a text file? My notes are very valuable to me and I want a way to keep them which is independent of Colornote.

This is the link to the App: ColorNote Notepad Notes

# Answer
> 2 votes
* Select the note you want to export.
* Press the 3-dot, then select Send.
* Select Drive, select the folder where the note must be saved, click on Save. The note will be saved and you will be able to open it as a text file even if it does not have a txt extension.

You must repeat the process for each file as the app does not allow to send a batch of notes.

---
Tags: colornote
---


title: App not installed error

text:
# Question
Title: App not installed error
When i try to install a minecraft apk it tells me app not installed after further digging it shows me this error:

> INSTALL\_FAILED\_UPDATE\_INCOMPATIBLE: Package com.mojang.minecraftpe signatures do not match previously installed version; ignoring!

# Answer
> 2 votes
Apps can only be updated if the are signed by the same developer key.

It seems that the currently installed or the apk you are trying to install are not genuine: they are not signed by the same developer key and thus you are getting the error message "signatures do not match".

You can only uninstall the old apk (this deletes all local data) and then install the new APK file if you trust the developer.

But you should ask yourself where you got got the old and the apk file from. So you really trust the person who has published it? Why do the files have different signatures, may be the APK has been modified and malware has been injected into the APK.

See also how to check if two APKs are signed with the same developer key and show the content of the signing certificate (e.g. the contained name):

---
Tags: installation, apk, signature-error
---


title: Termux access /sdcard/data

text:
# Question
Title: Termux access /sdcard/data
**Most of the apps are now not permitted to access /sdcard/data**

* the only app i know which can access this folder is Files(not files by google)\[com.google.android.documentsui\]
* a few days ago i see this app called X-plore

```
~ $ ls /emulated/0/Android/data/
ls: cannot access '/emulated/0/Android/data/': No such file or directory

~ $ ls /sdcard/Android/data/
ls: cannot open directory '/sdcard/Android/data/': Permission denied

```

It asked the permission to access this folder, with files like allowing access to newly inserted memory card,

---

***is there a way to make termux ask to allow access to that folder***

---

or, is there a command to do it like, termux-setup-storage
Or is there a way to do it directly with `am` command

And I'm **not a rooted user**

# Answer
I believe that you are talking about `/sdcard/Android/data` instead of `/sdcard/data`.

From what I gathered, this is an intentional "security" feature. It is possible to bypass by root, but that is not an option for you.

There is the permission `MANAGE_EXTERNAL_STORAGE`, so if you manage to grant it to termux it should theoretically work, but may require some app patching to the manifest beforehand.

The last thing you can do is use adb on yourself using localhost with adb over network and edit the files from `adb shell`, that however requires the use of the `run-as` command which only works for debuggable apps.

*I will look into more solutions and edit this answer later.*
> 4 votes

---
Tags: data-monitoring, file-permissions, termux
---


title: Remove default packages' caches

text:
# Question
Title: Remove default packages' caches
I removed a package installed default via this command (with adb):

```
pm uninstall -k --user 0 the_package

```

Because of `-k`, the command does not remove the package's cache. How can I remove its cache after removing package's itself? I can't use the command again without the option because I have removed the package and now I do not have it.

# Answer
> 1 votes
You should be able to uninstall the data directories of an already uninstalled app by executing:

```
pm clear <package name>

```

respectively on recent devices using cmd command

```
cmd package clear <package name>
cmd package clear --user 0 <package name>

```

This will delete all files (for the selected user) in `/data/data/<package name>`. Only the empty directory itself will remain and the app package name will not be removed from the list of uninstalled apps.

If you don't remember the correct package name you can list all packages including those uninstalled by the command

```
cmd package list package -u

```

---
Tags: adb, default-applications
---


# Question
Title: Single-purpose Android Tablet for handicapped person
My brother is profoundly disabled. He enjoys working word search problems. I live 1400 miles away from him, and I only get to visit him once per year. During that time I install different word search apps on his Fire tablet. But within a few days, something happens and the Fire sits unused until my next visit.

What I would like to do is create a tablet that only runs the word search puzzle, and nothing else. I would like it to boot in this mode, and run only this app. Ever. Until the tablet dies for good

He has an effective IQ below 60, and he cannot understand ads, other apps, complicated boot up sequences.

I have heard about the kiosk mode, maybe that would work, but I have not been able to understand how to implement.

Ideally, I would buy an inexpensive tablet, configure it to run one word-search app, and send it to him in the mail. And for the most part, never need to worry about it. It would be a "tablet as an appliance".

Could I please get advice on how to do this? I lament my inability to make a tablet work in a way that would let my brother tap into the larger potential of Android, but just having a single app would be a game changer.

# Answer
> 0 votes
Take a look at screen pinning. It is available in all Android devices and allow a specific app to be locked on UI.

https://support.google.com/android/answer/9455138?hl=en

Alternatively,there are multiple third party apps available on Play store which will allow you to set kiosk mode on any device with apps of your choice.

---
Tags: accessibility, kiosk-mode
---


# Question
Title: Do android apps look at your pictures if not needed?
Maybe I'm a bit paranoia, but I'm wondering if apps who don't work with your documents or files (games for examples) look at your pictures/files for advertising purposes. They will exist, but I'm I correct that this is a minority of the apps?

# Answer
> 1 votes
Android apps can only access some resources if you explicitly give permissions for that. One app can request this permission, but you are free to give it or not, and even to revoke that permission in a later moment. These are the permission types you can give:

* Body sensors: Get sensor info about your vital signs.
* Calendar: Use your default calendar.
* Call logs: Access and change your call history.
* Camera: Use your camera to take pictures or videos.
* Contacts: Access your contacts list.
* Location: Gets your device’s location. Learn about location settings.
* Microphone: Record audio.
* Nearby Bluetooth devices: Apps can discover and connect to nearby devices.
* Phone: Make and manage phone calls.
* Physical activity: Get info about your activity like walking, biking, step count, and more.
* SMS: Access incoming and send outgoing text messages.
* Storage: Get photos and other files on your phone.
* Files and media: Use photos, media, and other files on your phone.

If you want, for instance, to revoke the microphone or camera access from all apps in your device, follow these steps:

1. On your phone, open the Settings app.
2. Tap Privacy.
3. Turn off Camera access or Microphone access.

The same thing can be done for your storage, for instance...

More information

---
Tags: applications, google-play-store
---


# Question
Title: Installed magisk after LineageOS upgrade and now wifi doesn't work
I have a OnePlus 7 Pro. I had LineageOS 17 (Android 10) with microG, magisk, and vanced on it running just fine for almost a year. I upgraded the Android version to 11 first (which LineageOS documentation says is a pre-requirement) then I upgraded to LineageOS 18, and everything seemed to work just fine. I can confirm that my recovery and wifi worked.

A few days later I wanted to open Vanced YT, but it was no longer installed, then I noticed that magisk was no longer installed. So I installed it according to it's instructions which was basically using the app to patch the `boot.img` I got from the extracted files (from a payload-dumper) and then installed the produced `magisk_patched-24200_Y0Qmv.img`.

Ever since then is my problem. I can no longer turn on my wifi, I no longer have recovery mode, and every time I turn on/reboot the device I am greeted with a "System UI Crashed" error message. I can hit ok and everything else seems to work as expected. With the exception to my wifi not being able to turn on

What I've tried:

* re-flashed the original `boot.img`
* re-flashed the recovery image
* uninstalled magisk
* I tried re-flashing other images from the payload dump (modem.img, etc) the same way the LineageOS documentation said to upgrade and I get the following error

```
fastboot flash --slot=all modem modem.img
fastboot: error: Could not check if partition modem has slot all

```

I have no idea what that error means. Nothing changed. I'm still greeted with the same crash message. I still can't turn on my wifi. And I still can't boot into recovery mode.

To make sure I'm clear, my question is; "Where should I go from here? What things can I tell you in order to help me get my wifi working again, and to fix this 'System UI Crashed' error message?"

# Answer
> 1 votes
So I figured out what I did wrong. I basically patched the wrong `boot.img` so the kernel was mismatched. I patched the one from the OnePlus OxygenOS. Instead I needed to patch the one from LineageOS.

The steps I took in order to fix it was:

1. unzip the LineageOS zip
2. extract the payload with a payload dumper
3. copy the boot.img to my device
4. patch that boot.img
5. copy the magisk patched image which was produced from the magisk app to my computer with `adb` and `fastboot` on it
6. booted my android device into fastboot mode
7. flashed that magisk patched boot image to my device

After that when it rebooted, everything worked as expected with one exception; GCam. But I think this is related to the LinageOS upgrade. I was able to fix this by re-installing microG and upgrading to a newer version of GCam. All other original issues where cleared though. Wifi, phone, etc.

I hope this helps someone.

---
Tags: lineageos, magisk, oneplus-7-pro, micro-g
---


# Question
Title: Flutter Android Debug Bridge (ADB) over different network on VSCODE
I am using VScode for flutter development.

I am also using "ADB Interface for VScode" to debug the coding over the same network wirelessly.

When I am not at home, I remote into my desktop to do some work but I see that most of the ADB only works on the same network.

Does anyone know how to use the ADB over a different network (for example, cellular network on your phone).

Thanks!

# Answer
> 0 votes
I think i will just post links to the project called scrcpy and it does it over adb. There is no point in me tutoring about something that has been tutored on the internet.

https://github.com/Genymobile/scrcpy

https://www.xda-developers.com/scrcpy-control-android-on-pc/

---
Tags: usb, remote-access
---


title: How to remove an emergency alert?

text:
# Question
Title: How to remove an emergency alert?
I have a LG phone, android version 10. How do I remove a "Florida Blue Alert" from almost 2 weeks ago? I can't even see the actual message any more, just a web link, which doesn't work. As I recall, it showed a couple of views of some man, a fugitive, I think. Typing the link into my laptop browser gets me a screen saying the alert has been cancelled and the situation resolved. Swiping left and/or right gets me nothing.

Thanks!

# Answer
The solution is to restart the phone. Did this to verfy time change, and the alert vanished
> 0 votes

# Answer
Go to Messages \> click the three dotted menu in the top tight corner \> Settings \> Advanced \> Wireless emergency alerts.

You should now see a list of alerts you have received and you should be able to remove them either individually or all at once via the three dotted menu in the top right corner.
> 0 votes

---
Tags: android-10
---


# Question
Title: Backup Android phone directly to network location periodically
I want to backup as much as possible from a rooted Android phone(`user-data, app-data`, etc) on a daily basis to a Synology NAS.

I've found this tutorial:

Automatic Nightly Backups for Your Android Device to Your Computer | Guysoft's Weblog https://guysoft.wordpress.com/2012/11/01/android-nightly-backups/

The only problem remaining is that `Titanium Backup` performs the backup image on the phone, which is then copied to the NAS via `rsync`. I cannot afford this, since I don't have an SD card slot, nor much space left on the phone.

Any ideas on how to save directly to NAS(smb share) instead?

On the other hand, I was thinking at `adb`, as an alternative way to do a backup, but I haven't seen anyone installing it on a NAS. Besides installing, there should be some scripting involved, in order to detect the connection to the phone via `USB` or `WiFi`, and then the backup process.

# Answer
SMBSync2 might be what you're looking for.
> 0 votes

---
Tags: backup, images, cifs
---


# Question
Title: Where is the root folder of BlueStacks located in PC?
Is there a way to locate the files in PC as shown in the root explorer of BlueStacks?

I.e. how to move files of BlueStacks (APKs or any other file) to PC or from PC without opening BlueStacks?

Like, moving files of BlueStacks or computer through the PC directories without involving the use of a shared folder or root explorer or `adb` shell a simpler way?

# Answer
> 6 votes
BlueStacks is an Android emulator, which is basically running virtual machine with different operating system, therefore you can't access your files directly.

You can find your data files under: `C:\ProgramData\BlueStacks\UserData\SharedFolder` on Windows or `Library/BlueStacks/Android` on Mac, but the data files are in 'VDI' format (VirtualBox Drive Image).

So you can try to convert .vdi files into RAW image which you can mount by the following command:

```
VBoxManage clonehd --format RAW Root.vdi Root.img

```

Then you can try to mount these files by some software which can support Linux ext3 file systems.

---

Alternatively you can install *Total Commander*, *Root* or *File Explorer* (or similar app) in BlueStacks, then transfer your files into fake SSD card and they should appear in `C:\ProgramData\BlueStacks\UserData\SharedFolder` folder. On Mac, you probably need to convert `SDCard.vdi` file into RAW format (as mentioned above) and mount the image, or use VirtualBox software to access the VDI image.

---

Another easier way is simply to install FTP or SCP plugin for *Total Commander* app and transfer the files via network.

# Answer
> 3 votes
Follow the steps on this Xda developer page to get to the root directory of bluestacks: Find Bluestacks SD Card Location in Your PC. Here are the steps:

> * First Download 'Root Explorer' (Included Below) and Install 'Root Explorer' in Bluestacks
> * Decide on which directory to give access in BlueStacks. You can either choose an entire hard drive, or a particular folder of your choice.
> * Access the Windows Registry by going to Start \>\> Run and type in 'regedit' and hit Enter. This opens up the Registry Editor.
> * Go to `HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Guests\Android\SharedFolder\0`.
> * Right Click on 'Path' and click on 'Modify'.
> * Write the path of the folder which you want to include in SD card. (Example `C:\SDCard`)
> * Restart your computer for the changes to take effect.
> * You can find the folder at '(Root)/sdcard/bstfolder/ BstSharedFolder/'
>
> If u don't wanna change your Registry, You can simply copy and paste the file's that you want in SD Card at 'C:\ProgramData\BlueStacks\UserData\SharedFolder\\' and find the files at above location in Root Explorer (ie '(Root)/sdcard/bstfolder/ BstSharedFolder/').

---

Also if that isn't what you are looking for here is another link to get to the actual folder which apps are stored: Access your local files from BlueStacks on Windows. Here are the different methods:

> * Using Bluestacks Shared folder
>
> > * Download and install OI File Manager in BlueStacks.
> > * On Windows, navigate to BlueStacks Shared Folder \[C:\ ProgramData\ BlueStacks\ UserData\ SharedFolder\] and place the files you want to use in BlueStacks (like photos, videos, downloaded APK files, etc.). You can also use the Windows Library Folders for this purpose.
> > * In BlueStacks, launch *OI File Manager* and navigate to BlueStacks shared folder \[(Root)/ sdcard/ bstfolder/ BstSharedFolder\]. If you have placed files in your Windows Library, locate the respective folder from bstfolder directory in BlueStacks.
> > * Similarly if you want to access BlueStacks files from your computer, copy the particular file to BstSharedFolder using OI File Manager and the same file will be available in Windows SharedFolder location.
>
> * Using Drag and Drop (for copy the files in BlueStacks).
>
> > * When BlueStacks is fully ready and running, just drag the particular file from its Windows folder into the BlueStacks interface.
>
> * Using Cloud Sync
> * Using Windows Registry

For further details, follow above link.

# Answer
> 1 votes
Now you can just go to Android settings in BlueStacks and under BlueStacks Settings, you'll find an option "Import files from Windows". Select it and find your file and import it.

# Answer
> 1 votes
BlueStacks also has a Media Manager available in its System Tools app in the emulator.

See https://support.bluestacks.com/hc/en-us/articles/360034476511-Introducing-the-Media-Manager-on-BlueStacks-4 or https://support.bluestacks.com/hc/en-us/articles/360055684992-Media-Manager-on-BlueStacks-5

---
Tags: bluestacks
---


# Question
Title: Access my application files of an old App
I have this old-ish Android app running on my Pixel4 w/Android12 phone, the app was last updated on 2018 and it clearly uses old API or whatever and the built-in backup functions are obsolete. It offers option to export its DB to a folder but it can only access `/data/user/0/com.cooly.OilChangeSchedulePro/files` folder (yes, I'm giving out the app name)

My question is how the heck I can take that file out of my phone? I do not have it rooted (and rooting will make it wipe, so no sense), please don't ask me to root the phone.

1. tried using adb run-as package but then the package is not debuggable.
2. tried to make the package debuggable by changing Manifest and repacking, but i cannot upgrade the app with my custom package.
3. tried `adb backup com.cooloy.OilChangeSchedulePro` and it gets an empty backup, nothing inside.

Any other way I can access that folder on my phone and copy out my DB to be restored on other phone?

# Answer
> 1 votes
If the app does not disallow backup in it's `AndroidManifest.xml` then you should able to retrieve the data using `adb backup`.

Some older apps make use of key/value storage which is not included in backup by default. To include this data change the adb backup command to:

```
adb backup -keyvalue -f oilchangesBackup.ab com.cooly.OilChangeSchedulePro

```

Just make sure to use the correct packageName of the app because if you make a typo the backup file will be empty.

---
Tags: applications, backup, file-system, files
---


title: Oneplus 7 pro stuck at boot animation

text:
# Question
Title: Oneplus 7 pro stuck at boot animation
I have a rooted Oneplus 7 Pro. Today my phone said that an OTA had finished downloading and to reboot to install the update. I had been postponing this update and decided to finally go through with it.

I went through all the steps to keep my root, uninstall magisk, download OTA, flash twrp ab retension script, install magisk to inactive slot, and finally reboot. I am now stuck at the boot animation.

When I try to boot into TWRP, the screen keeps flashing at the TWRP loading screen but I can never actually get into it. I am able to ADB into the phone at this point though and the recovery.log says something about `Fatal signal 6 (SIGABRT), code -6 (SI_TKILL)` Does anyone know know how to fix this? Any help would be greatly appreciated!

Edit: I have made a little progress. I was able to change the partition back to the original partition and while I still can't boot, I can get into TWRP now.

Edit2: I updated my TWRP and can now get into TWRP on both partitions. On the old partition I can decrypt my data with pattern (and was able to back everything up), but on the new partition it is asking for a password and I don't have one. Still get stuck on the boot animation are both partitions. I have also tried uninstalling all my magisk modules (except for one adb one) and that didn't help either.

# Answer
> 0 votes
If you are someway able to boot into fastboot, try flashing stock boot.img there (Google might help you in finding stock imgs).

Otherwise, get the firmware flashing tools for OnePlus and reinstall stock from scratch which but would erase userdata though.

---
Tags: adb, ota-update
---


# Question
Title: Trying to mimic data usage through certain apps
my current data plan has unlimited usage for only certain apps; Facebook, Instagram, Twitter, YouTube, WhatsApp, Facebook Messenger, and Telegram.

Any other form of data usage isn't unlimited taking from my limited data pool.

Would it be possible to mimic the data usage of a HotSpot to go through any one of these apps. Any help would be greatly appreciated as my home internet is out for the next couple of mounths :)

# Answer
> 0 votes
I totally understand your concern but there's nothing you can do for this. Your telecom operator is doing the whitelisting (of those apps) on their end; there's nothing you can do as a client.

---
Tags: applications, mobile-data, wifi-hotspot, data-monitoring, data-plan
---


title: Decompile Weight Loss App

text:
# Question
Title: Decompile Weight Loss App
Where can the gifs in these applications be stored? Play Store

1. I decompiled the APK but found no results
2. I looked in the data folder with the help of a rooted device but couldn't find anything.
3. I noticed that there is still data in my app when I login without internet which means it is not downloading over internet

There is only one question; Where might these files be stored?

# Answer
> -1 votes
In the 'Res' directory after decompiling

---
Tags: applications, google-play-store
---


# Question
Title: Hiding the content of the message while the phone is unlocked!
How can I hide the message content in this "drop down menu -- I don't know what's its name". It is hidden when the phone is locked I want to hide it when the phone is unlocked as well.

# Answer
> 0 votes
You will have to completely block the notifications from showing. Or go with the app @Firelord advised on the comments.

From WhatsApp's Configuring your notifications:

> Navigate to your phone's Settings app \> Apps & notifications \> WhatsApp \> App notifications . On most phones, you will have the option to:
>
> * Block all notifications if you wish for no notifications and not even the WhatsApp icon to appear on your phone's status bar.

The above advice can be applied to any app.

# Answer
> 0 votes
Just use an applock for those apps you wanna hide notifications from. Most applocks (if your device doesn't have one built in) have an option to hide notification content of locked apps.

---
Tags: privacy, samsung-galaxy-note-9
---


# Question
Title: Bluetooth volume defaults to maximum on each new connection
Every time I connect a Bluetooth headphone to my android phone the (Bluetooth) volume changes to max volume.

It doesn't matter what was the level of the normal volume (non-Bluetooth volume).

Example: Listening on the phone speaker at 50% volume, I connect the Bluetooth headphone and once the connection is established the volume jumps to 100%.

How can I change that behavior?

It wasn't happening before with similar audio devices and now it happens with all/some devices.

# Answer
This issue is like a bug or a corner case.

Once it starts happening there is no CLEAR FIX.

Here I describe the path I took that lead me to resolve the issue.

**Test** after every change until resolved.

**Repeat** these steps (or variations of them) until resolved.

```
Connect bluetooth audio device
    Disable absolute volume option in Developer Options
Disconnect  bluetooth audio device
Connect bluetooth audio device
    Enable absolute volume option in Developer Options
Disconnect  bluetooth audio device
Connect bluetooth audio device
Disconnect  bluetooth audio device
    Disable absolute volume option in Developer Options
Connect bluetooth audio device
Disconnect  bluetooth audio device
    Enable absolute volume option in Developer Options
Connect bluetooth audio device
Disconnect  bluetooth audio device

```

Once resolved, you may want to do this once more to protect your ears.

```
Enable absolute volume option in Developer Options

```

The easier way to find the setting is to search for **volume**

And here is the specific setting
> 0 votes

---
Tags: bluetooth
---


# Question
Title: Is possible pass SafetyNet with official Xposed Framework?
I know LSPosed passes SafetyNet on Magisk but I want pass SafetyNet on official Xposed Framework.

Is possible with modules like HiddenCore, or maybe a snet.jar or framework patching trick?

# Answer
> 0 votes
Official Xposed is dead since years (sadly). So No hope in doing these things via it...

---
Tags: magisk, xposed-framework, safety-net
---


# Question
Title: Is there a way in 2022 to remove factory reset option on android device
So I’ve Removed some bloatware like the browser google play store etc. and like you all are aware a simple factory reset brings them all back , the first solution I thought of was to remove the settings app but that’s not convenient at all (although it may work) . I’m trying to find a way to keep setting app however remove the factory reset option , would anybody have a code for such thing ? Or any alternative opinion is welcome. Thank you I can use any advice I can get

# Answer
Make script to debloat and run it after every factory reset...

like this one

https://github.com/jasineri/android-bloatware
> 1 votes

---
Tags: settings, factory-reset
---


# Question
Title: Android 9: Configure DNS while connected via cable
I've got an Android TV Box (orbsmart S86) running on Android 9. It is connected to the LAN and internet via a cable. Wifi is not used.

Now I've configured PIHole on another device and want to tell the android box to use the Pihole as DNS.

When using WiFi, I can go to the WiFi-settings and configure the settings there. How do I do this on this device?

So far I've tried `ndc resolver setifdns eth0 mydns` but without luck.

Note, that I've got root access. Thanks in advance.

# Answer
```
su
setprop net.dns1 <dns here>

```

eg, setprop net.dns2 123.123.123.123
> 1 votes

---
Tags: dns
---


title: Download an APK file on SD card

text:
# Question
Title: Download an APK file on SD card
I want to download an APK file to my SD card so I can take that SD card and put it in my Nook to get Google Play. I honestly don't know what I'm doing and I have an older model of the Nook Color. I only have my phone so I don't even know if this is possible.

# Answer
> 0 votes
You need to use either Your smartphone or the card reader. Insert appropriate for Your nook (apparently it is a tablet according to what Google told me. Have never encountered it before) SD/memory card in the phone/card reader and connect it to Your PC/laptop.

After downloading the needed .apk file on Your computer, copy it into a folder of the SD/memory card (for example "E:\Downloads" or any other name it will be given by the system) and disconnect the card reader/phone from comp. via safe way (most probably nothing will happen if You will simply plug it out, but just in case).

Insert the memory card (if it was in your phone in the first place - take it out beforehand. Don't forget to switch off devices when inserting/unmounting memory cards) into your nook device and switch it on. Go for the file browser (aka File Manager and so on), find the folder you have put .apk file before (Downloads folder for example) and open it via touching it's name. The system will suggest to install .apk file and demand for Your approval of the action.

That should be it, pardon if too much text/too detailed explanation.

# Answer
> 0 votes
Downloading APK's(Android Package Kits) to an SD Card is trivial. It depends on the browser or the method.

These methods would include:

**Browsers**

* Chromium Based
* Mozzila Based

**Download Managers**

* Internet Download Manager

**Torrent Download Clients**

* BitTorrent
* QTorrent

**Dedicated App Store**

* Aurora Droid
* F-Droid
* Aptoide

On Android 5 and above you need to allow Storage access permissions from your devices settings. You can check out this article from Android Central that elaborates more on this topic.

Android 5.0 Lollipop changes the way your SD card works — and that's a good thing

After allowing access to SD Card you can change the default download location per app to select the SD Card to download apps.

For Chromium based Browsers such as Vivaldi, Edge, Brave, Opera, Chrome, and De-Googled Chromium you can change the default download storage/location from the App settings.

This method applies for most things. And most of the time all you have to do is check the apps support page to figure out to change those settings.

---
Tags: external-sd, apk, downloading
---


# Question
Title: ICal Events Not Showing Up In Device Calendar
I have a Sony Xperia Z with Android 5.1.1, and I'm trying to get events from calendars I subscribed to on Google Calendar's web interface to show up on my stock calendar app. Specifically, some of the calendars I subscribed to don't show up in the app. I tried checking if they were disabled but they aren't even in the calendar list on the sidebar.

Using this app I was able to find that the calendar subscriptions I wanted actually exist on my device but are listed with "0 events," even though their events show up on Google Calendar's web interface.

I have tried rebooting my device, checking that all calendars are enabled both in the stock calendar app and in settings, and manually syncing from settings.

How can I get the calendar events to sync and show up?

# Answer
> 1 votes
I finally managed to fix this.

If anyone else has this problem:

* Go to Settings \> Apps \> All and clear data and cache for Calendar and Calendar Storage
* Go to Settings \> Accounts \> Google, choose the menu and re-sync all
* Wait for sync
* Open the Calendar app and set it up again

# Answer
> 0 votes
It's either a sync issue like the previous answer OR you might have multiple Google accounts on your phone and Google Calendar is only showing calendar events for your default Google Account.

In your app settings make sure that the tag group for ICal is set set to sync.

---
Tags: sync, calendar, sony-xperia
---


# Question
Title: Airtel 4g network not working on certain apps
So I am using Vivo V7 on an airtel 4g data connection and every time I try to open apps like swiggy or foodpanda I get a message saying "there was a problem" "please try again later. However when I open these apps on a wifi they work fine. What is going wrong here??

# Answer
> 0 votes
It may cause due to of bad connection low signals or due to data roaming is off.

Steps to fix step:-

1. Go to settings and find cellular settings.
2. Open them and turn on data roaming.
3. Now change network mode 4G or LTE only depends to various device.
4. Save them turn of data if on.
5. Reboot your device.
6. Turn on data might fix it.

**If above-mentioned didn't work go to step 3 and select 3G Only mode and perfom other steps same as mentioned**

# Answer
> 0 votes
Simple: Go to APN settings and set APN protocol to IPV4 only from IPV4/IPV6 and save.

---
Tags: 4g, vivo
---


# Question
Title: How to edit build.prop file in Android 11
I have a TCL 20e (6125A) with Android 11. I want to increase the torch brightness. As I read in another post, this can be done by adding these two lines in the file:

```
ro.media.capture.flashintensity=50
ro.media.capture.torchintensity=50

```

I look everywhere and can't root my device, and the two custom recoveries that I find don't work on my phone.

Is it possible to edit this file without custom recovery? Any other chance?

# Answer
> 0 votes
1. Factory reset and install Magisk app 24.3
2. Patch your firmware’s boot and nulled vbmeta by Magisk app
3. Install TWRP app and wait for your TWRP images on XDA ...
4. Flash your device’s TWRP by any PC tools
5. Flash Magisk patched boot and vbmeta by TWRP
6. Flash your GSI, and you’ve been rooted (VNDK GSI ROM’s are rw, others are ro)
7. Patch your vbmeta and boot once more to root on GSI again
8. Edit sth you need to edit by root apps

---
Tags: file-permissions, android-11, flashlight, build.prop
---


# Question
Title: VPN broke my network connection, how can I restore it?
I have a problem on my Lenovo K33a48 with Android 7.0. The problem manifests in almost all my google apps showing that there is no internet connection (Chrome, Play Store, Gmail), not syncing to my account (Google Calender) or simply crashing (Drive, Photos), see screen shots below:

If I try to do a system update (Settings-\>About-\>System Update) I also get displayed that there is no internet connection:

Nevertheless, I actually have an internet connection, both over wifi or cellular data, and can successfully send messages with Whatsapp. I think the problem cascades to other apps that can't open or keep crashing, e.g. Viber, and I think these apps are connected to my Google account.

I think the problem is the result of me installing, using and deleting a VPN app or/and me uninstalling and installing again songs on Spotify. **Anyways, can you help me restore my network connection? Can I undo any possible changes the VPN app has done? Can I reset my network settings?** I actually did in the Settings "Network Settings reset", I deleted the cache of all apps and restarted the phone, but it had no effect on the problem. Thanks for suggestions!

# Answer
> 1 votes
I fixed this problem with the instructions written by Darren here:

Clearing Google Play Store

1. Settings -\> Apps & notifications
2. Google Play services -\> Storage
3. Clear Cache & Clear Storage

Uninstalling Google Play Updates

1. Settings -\> Apps & notifications
2. Google Play services
3. 3 Dots (Top-right corner) Uninstall Updates

Afterwards restart the phone and check if the problem is solved!

---
Tags: google-play-store, wi-fi, google-account, networking, vpn
---


title: POCO X3 flash fail

text:
# Question
Title: POCO X3 flash fail
TL;DR - Tried to flash TWRP and ended up with TWRP where my OS should be. Have both Mi and TWRP recoveries on device now.

Using a POCO X3(not the pro) and I wanted to install TWRP on it. I found an unofficial build (by a recognized dev) on XDA and proceeded to flash it in fastboot mode. I also pressed the right key combo immediately after running fastboot reboot, but it kept going back to Mi recovery 5.0. I did this a couple more times but to no luck, it'd keep booting to Mi recovery. I then tried booting temporarily into TWRP using fastboot boot command after flashing the boot image one more time. I could access TWRP now, so I thought that's that and powered it off. Then I pressed the recovery combo and Mi recovery flashes on the screen again. I select reboot to system and it then took me to TWRP. So now I have both Mi and TWRP on my device somehow. I don't know what caused this spectacular mess or how to get out of it. Any ideas?

# Answer
download MIUI according to your current version.
in TWRP connect adb shell

```
adb push boot.img /tmp
adb push "TWRP 3.5.0-0 By mahajant99.img" /tmp
adb shell
cd /tmp
dd if=boot.img of=/dev/block/bootdevice/by-name/boot
dd if=TWRP\ 3.5.0-0\ By\ mahajant99.img of=/dev/block/bootdevice/by-name/recovery
reboot recovery

```

Note: in order to disable avb/dm-verity one must install Magisk. rename Magisk-v24.3.apk -\> Magisk-v24.3.zip

```
adb push Magisk-v24.3.zip /tmp

```

TWRP -\> Install -\> tmp -\> Magisk-v24.3.zip -\> Swipe to install
> 0 votes

---
Tags: rom-flashing, twrp, xiaomi
---


title: Allowlist permission on android

text:
# Question
Title: Allowlist permission on android
I was reading about the read external storage permission on https://developer.android.com/reference/android/Manifest.permission#READ\_EXTERNAL\_STORAGE. It says:

> This is a soft restricted permission which cannot be held by an app it its full form until the installer on record whitelists the permission. Specifically, if the permission is allowlisted the holder app can access external storage and the visual and aural media collections while if the permission is not allowlisted the holder app can only access to the visual and aural medial collections. Also the permission is immutably restricted meaning that the allowlist state can be specified only at install time and cannot change until the app is installed.

Am I correct that An app without this permission can still Access photos on the external storage? Or what does allowlisted means? What are the medial and aural collections?

# Answer
By design\*, the application cannot access the external storage if it does not have the `READ_EXTERNAL_STORAGE` permission granted.

Allowlisted means that the permission is granted to the application.

Probably medial and aural collection are the defaults medias for ringtones or notifications (IS\_RINGTONE or IS\_NOTIFICATION) as no special permission is needed to be accessed.

By design\*: Supposing that the application does not exploit a vulnerability on the Android system.
> 1 votes

---
Tags: applications, permissions
---


# Question
Title: Apps asking only permission to read external storage
Some of my apps only ask for a permission to read external storage, not to write. I trust these apps (even my banking app), so I guess they are not looking at my files. Any idea why they need this permission? Is this a useless permission?

# Answer
> 0 votes
It's mostly useless (unless the app has some feature to download your transactions etc to external storage) but alas you are helpless there not to grant it anyway. The app mostly would force you to grant it neverthless

---
Tags: permissions
---


# Question
Title: Sending messages to iPhone with File attachment
I just switched phones and carrier, going from a Huawei P20 to a Samsung S20 FE 5G. I used to be able to easily send PDFs and other files via MMS (as long as the file didn't exceed a certain size).

Since I changed phone/carrier, I am no longer able to send files to iPhone users. I still have the options to send files to other Android user, but that doesn't seem to be an option with iPhones, which is an absolute deal breaker for me as I rely on it quite a lot for work where everyone but me is using an iPhone.

Do you know of a work around or way that would allow me to send PDF files via "text message" as I used to? And I of course mean actual files, not links to cloud drive.

Thank you for your help!

# Answer
I changed my messaging app from the default Samsung Messages to Google Messages and I can now send PDF to iPhones again.

From the answers I got earlier, I understand that it is not MMS, despite what it says. But I'll let you guys figure out what protocol it is and who's phone is to blame. I'm just glad it works.
> 2 votes

# Answer
SMS/MMS are both standard protocols that just send text/pictures to other phone numbers. The protocol does neither know the receiver is android or iOS nor does it depend on.
If you can't send MMS picture this is purely issue with your phone.
If someone can't receive MMS picture this is purely their problem and cannot solved by anything on your phone.

Btw MMS do not support file attachments, only audio and images. If you sent PDF via MMS this is non-standard extension (I never seen)

---

**3GPP Technical Specification TS 26.140 Release V16.1.0 (2020-09)**

Media formats and codecs

**4.1 Plain text**
Unicode (e.g. US-ASCII, ISO-8859-1, UTF-8, Shift\_JIS, etc.)

**4.2 Speech**
AMR speech codec
AMR-WB wideband speech codec

**4.3 Audio**
enhanced aacPlus
extended AMR-WB
MPEG-4 AAC

**4.4 Synthetic audio**
SP-MIDI SMF
Mobile DLS
Mobile XMF
G.711 A-law codec

**4.5 Still Image**
JPEG
JFIF
EXIF

**4.6 Bitmap graphics**
GIF87a
GIF89a
PNG

**4.7 Video**
MPEG-4
H.263
H.264 (AVC)
H.265 (HEVC)

**4.8 Vector graphics**
SVG Scalable Vector Graphics Tiny 1.1/1.2
ECMAScript

**4.9 File Format for video and associated speech/audio media types**
3GPP

**4.10 Media synchronization and presentation format**
HTML5
SMIL
XHTML

**4.11 Timed text**
3GP

**4.12 Digital Rights Management**
DRM 1.0

**4.13 PIM**
vObject Personal Data Interchange

**4.14 Dynamic and Interactive Multimedia Scene** (3GPP TS 26.142)
SVG Tiny 1.2
ECMAScript
DIMS Streams
doScript
LASeR
> 2 votes

---
Tags: mms, ios, attachments
---


# Question
Title: Android runtime permissions and older apps
Since android 6 there are runtime permissions. Is this applicable to all apps? Or only apps that target the API of android 6 and higher?

# Answer
> 2 votes
As far as i know, to all apps from android 6. Otherwise it would be a security issue.

# Answer
> 2 votes
This applies only to apps targeting Android 6 or higher, which must be able to deal with them. Runtime permissions mean the app itself must request them from the user at runtime – which was not possible before (and thus no API available to do so). Hence older apps (and those targeting Android 5 or lower) cannot implement this.

For apps targeting Android 5 or older, the old permission model will be applied.

---
Tags: permissions
---


# Question
Title: Is it possible to deactive vibration and ringtone for a call by a certain/specific number?
I would like to deactivate

1. the ringtone and
2. vibration,

when a certain/specific number is calling me. Is this possible?

# Answer
Yes, that is possible depending on the app you use for calling.

In the AOSP phone app, when you click on a contact, behind the three-dot overflow button there is such an option. I am not aware of a feature to disable vibrations, but as this is handled by your telephony app, you should be able to replace it (by installing a new one and making it default for telephony) with one that supports this feature.

Another option would be to programmatically disable sound and vibrations when a specified number is calling, achievable in a number of different android automation apps (such as Tasker, Automate).
> 0 votes

---
Tags: calls, ringtone, vibration
---


title: Connecting ACODE to Termux

text:
# Question
Title: Connecting ACODE to Termux
Hi guys I have successfully connected ACODE to termux using sftp from ACODE to termux SSH using openssh `sshd` and dropbear `dropbear` via generated password `passwd` and username `whoami` and it works. I've been trying to write nodejs codes generated outside storage directory since **storage** refuses to install **expressjs** or **reactjs**, but ssh crashes after writing few lines of code and I attempt to save the file.

# Answer
> 1 votes
I was using localhost as my connection host that's why it was crashing. I switched to inet **IP** and it worked. You can check your **inet** configuration with `ifconfig` on termux

---
Tags: ssh, termux
---


# Question
Title: How can I find out if my keyboard is connecting to the internet?
I have it cut off from the internet on AFWall+ and I'm using XPrivacyLua with everything checked except "read clipboard". How can I now make sure whether or not it's connecting to the internet?

# Answer
You can also use an app like **PCAPDroid** to watch (and record) the traffic caused by apps. Traffic can be filtered per app if you want. I recommend installing it from F-Droid (which I generally recommend as first place to go for apps, not just for privacy reasons).

I took your screenshot from your comment, and added a second one from the app's listing at Google Play: the first shows there are indeed connection attempts made by the app, the second shows how the details would look like if you'd tap one entry in the list. In this second screen it would be interesting to see how many packages have been transferred up and down – i.e. if there really was any traffic, or if it's all just failed attempts.
> 1 votes

---
Tags: root-access, keyboard, firewall
---


title: /etc/hosts file is ignored (android)

text:
# Question
Title: /etc/hosts file is ignored (android)
I changed my hosts file using ES Explorater after root to

```
127.0.0.1 youtube.com

```

but it still takes to the real website, I tried on chrome browser and the default browser. I found the same problem on many forums but it didn't help me at all. can any one help me?

# Answer
> 2 votes
I had a similar issue.

Check if the content of `hosts` ends with a line feed. The trailing line feed **is** required.

# Answer
> 1 votes
Make sure you turn off Data Saver and any proxies. From the Google Chrome Support Page: "If you're using Data Saver, keep in mind that: ... • Changes you made to your /etc/hosts file won't work."

Source: https://support.google.com/chrome/answer/2392284

# Answer
> 0 votes
I had to clear the data and cache (*this will wipe your bookmarks, addons, etc*) of Firefox for Android for it to pick up the new hosts file.

# Answer
> -1 votes
On the most Android systems, `/system/etc/hosts` is used as the hosts file.

You can read how to change the hosts file from a desktop computer here.

---
Tags: hosts
---


# Question
Title: Is it possible to turn an Android device into a USB Pendrive on a rooted device through a OTG cable?
I tried using USB Mountr but it turns up as `Linux File-CD Usb Gadget Device` and it doesn't work for my car's music player. Is it possible to emulate a USB flash drive using an OTG cable?

# Answer
How I solved a similar situation few years back was by mounting the device after booting to TWRP/custom recovery... That way your device behaves like a USB Pendrive
> 1 votes

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


# Question
Title: What's the best approach in Android for disabling all peripheral ports for certain applications?
My company has their own Android tablets created by an OEM partner and we are using custom ROM based on Android 11. The stakeholders have a strange requirement now. They want to allow only our applications (identified by bundle id) to have access to printers and bar code scanners connected to the peripheral ports. Users are allowed to install any application of their choice from the Playstore and they will function normally but when it comes to printing or scanning via peripheral ports, it shouldn't work.

We have full control over the AOSP build and can do whatever we want to ensure above requirements are met. I have no clue where to start and appreciate some help.

# Answer
> 0 votes
Remove the drivers for any OTHER peripherals from the linux kernel used in your AOSP build..... I don't know how is it done etc refer to the linux documentation as well as AOSP documentation to figure it out

---
Tags: applications, usb, aosp
---


title: Game install and android thing

text:
# Question
Title: Game install and android thing
Why is my Android phone adding these android symbols when ever I install a new game from Google play and can I remove them ?

# Answer
> 0 votes
Bug with Realme UI/ Color OS ... No proper solutions so far...

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


# Question
Title: Android 10 device won't reach one specific web-site?
My android 10 device is failing to access one particular website. All others are fine. This started happening a few weeks ago.

I have contacted my mobile ISP and they say their systems are working ok.

I have contacted the website support, and they say I am not blocked by them.

If I use a VPN, I can actually get to the website from the device.

If I tether to the device from a PC and look at the tcp traffic, I can see that a UDP name server request for the website is repeatedly sent to the device, without reply.

Can anyone suggest a remedy?

# Answer
> 2 votes
Yeah two solutions I am aware of

1. Cause: improper configuration of IPV6 from ISP
Solution: Go to APN settings and disable IP V6 (set apn protocol to ipv4 from ipv4/v6 and save the current APN)
2. Cause: DNS issue
Solution: Change DNS settings to Google's DNS or anything else (it's called 'private DNS' in some devices under settings)

---
Tags: wifi-hotspot, android-10, dns
---


# Question
Title: "This site can't ask for your permission" Chrome error on LG Velvet?
I get this error whenever selecting any choice for permissions prompts in Chrome Dev. No results on Google, XDA, or here; Google has a similar but irrelevant hit for Hwaiwei devices (something to do with a trackball, which this phone does not have). I've checked all permissions, can't for the life of me figure out how to fix this? My device is stock, and this has been present since day one.

**Specs**
~~Model: Stock LM-G900TM14j<br>Android 10 (No root)~~ Model: Stock T-Mo LG V60 ThinQ 5G (LMV600TMLATMOCB)
Android 11 (No root)

EDIT: Strangely enough, I traded up to the V60 but am still experiencing this error.

# Answer
> 3 votes
I just wanna add this for future spectators, until the problem gets fixed.

Chrome (for Android anyway) just has really crappy, limited permissions management, which is not good enough for LG. From what I can tell, there's nothing to be done about it. If you can do whatever it is you need to do in a different browser and switch back to Chrome Dev when you're done, you should.

This worked for me in Vivladi, where I was initally experiencing the same problems. Click "block" instead of "allow". Then go to site settings, click on whatever permission you need, and you'll see the site is now in the "blocked" list. Just click on it and change it to allowed, and it should work.

...whereas Chrome won't even generate a list for you or let you choose something more powerful than "ask me"...smh

# Answer
> 0 votes
Try opening phone settings - then look for applications or app management or apps or apps and notification such options. Then try to navigate to list of applications. Look for chrome application. Then click on App permission & make sure the needed permission is given. In settings menu - additional settings look for quick ball. In quick ball settings select hide automaticaly for all apps. Then open chrome browser and try to give permission

# Answer
> 0 votes
You can fix the issue by following the steps below

* Click on the Google Chrome icon and choose the info option. Alternatively, you can go to the settings --\> installed apps/apps --\> Google chrome.
* Click on Storage --\> Manage storage --\> Clear all data.
* Go back to the info page and select the Permissions option.
* Allow all the permission that you require for the site (at least camera and microphone).
* Now, try opening the app.
* ***If you are still facing the issue then you might have opened any screen recording apps or any other apps like small bubbles in the background. So you have to close them to clear this error.***

You can refer to the following video for a quick fix.

https://www.youtube.com/watch?v=xsNZnTFu0r8

---
Tags: chrome-for-android, permissions, application-error
---


# Question
Title: Default launcher on Android TV via ADB problem
After setting the new GoogleTV Launcher as default via ADB (using the command `adb shell cmd package set-home-activity "com.google.android.apps.tv.launcherx"`) on my Android TV Box, checking the default launcher (always via ADB) using two different methods the shell returns a mismatching result as you can see below, and in practice the manufacturer's own launcher (timvision.launcher) always opens as default. Any suggestions? Thanks in advance.

```
m393gena_tim:/ $ cmd package resolve-activity -c android.intent.category.HOME
priority=2 preferredOrder=0 match=0x108000 specificIndex=-1 isDefault=true
ActivityInfo:
  name=timvision.launcher.ui.HomeActivity
  packageName=timvision.launcher
  labelRes=0x7f110056 nonLocalizedLabel=null icon=0x7f0801e8 banner=0x7f0801e8
  enabled=true exported=true directBootAware=false
  taskAffinity=timvision.launcher targetActivity=null persistableMode=PERSIST_ROOT_ONLY
  launchMode=3 flags=0x300220 privateFlags=0x0 theme=0x0
  screenOrientation=0 configChanges=0x33 softInputMode=0x0
  lockTaskLaunchMode=LOCK_TASK_LAUNCH_MODE_DEFAULT
  resizeMode=RESIZE_MODE_UNRESIZEABLE
  ApplicationInfo:
    name=timvision.launcher.TimLauncher
    packageName=timvision.launcher
    labelRes=0x7f110056 nonLocalizedLabel=null icon=0x7f0e0000 banner=0x0
    className=timvision.launcher.TimLauncher
    processName=timvision.launcher
    taskAffinity=timvision.launcher
    uid=10028 flags=0x28d83ec5 privateFlags=0xc000918 theme=0x7f120013
    requiresSmallestWidthDp=0 compatibleWidthLimitDp=0 largestWidthLimitDp=0
    sourceDir=/data/app/timvision.launcher-_GWEhSuSRLHmn1MVNH9JyQ==/base.apk
    seinfo=default:privapp:targetSdkVersion=29
    seinfoUser=:complete
    dataDir=/data/user/0/timvision.launcher
    deviceProtectedDataDir=/data/user_de/0/timvision.launcher
    credentialProtectedDataDir=/data/user/0/timvision.launcher
    enabled=true minSdkVersion=26 targetSdkVersion=29 versionCode=1216031 targetSandboxVersion=1
    supportsRtl=true
    fullBackupContent=true
    HiddenApiEnforcementPolicy=2
    usesNonSdkApi=false
    allowsPlaybackCapture=true
m393gena_tim:/ $ cmd shortcut get-default-launcher
Launcher: ComponentInfo{com.google.android.apps.tv.launcherx/com.google.android.apps.tv.launcherx.home.HomeActivity}
Success
m393gena_tim:/ $

```

# Answer
For me I had to run

```
db shell pm disable-user --user 0 com.google.android.tungsten.setupwraith

```

Wraith seems to hijack the home action.
> 0 votes

---
Tags: adb, launcher, android-tv, smart-tv, google-tv
---


# Question
Title: For RealVNC viewer for android is it possible to have the cursor go to where you touch?
I'am using RealVNC viewer android to control my computer but I would like to make a left click where I touch with my finger. Dragging the cursor around is tiring when you have to make a lot of clicks...

# Answer
I use AVNC, an open source application for VNC connections available on F-Droid and it does exactly what you're looking for, clicking the screen performs a left click on the clicked position
> 1 votes

---
Tags: vnc
---