# Question
Title: How to view network traffic requested by a specific app?
There are lots of discussion on how to see which app is requesting network connection. I have tried the following apps:

```
tcapturepacket
wifi monitor
connection tracker

```

However, none of them was useful. For example, for a short period of time, I uploaded a 30KB pcap file which can be viewed here. Still I haven't find out which app is requesting connection and to where it is trying to connect.

I also tried to look at `adb logcat`, but didn't find useful information. Maybe something has been missed here. Any guess?

# Answer
> 11 votes
If you have rooted phone, go for `nethogs` (for live monitoring) or `iptables` (to get statistics) commandline tools. Using VPN or Android stats based apps is the only possible non-root solution. Or refer to this answer for a `logcat`/`dumpsys` based solution.

---

First of all, tracking a UID or PID of a network stream isn't straight forward because these aren't network related but OS related parameters. Proposals and abandoned projects do exist.

Android assigns a unique UID to every installed app just like every human user on Linux has a UID. So we can capture packets sent by a specific UID over the network interfaces to track the usage.

## TCPDUMP:

Now how we can capture network traffic? Most of the network sniffers use libpcap family of system-independent libraries for this purpose. It supports **BSD Packet Filter (BPF)** for in-kernel packet filtering. Some popular utilities that use `libpcap` include `tcpdump`, `nmap`, `tshark/wireshark`, `dumpcap`, `nethogs` etc. Android app Network Utilities and others also make use of `tcpdump`.

However UID info is not propagated through the `AF_PACKET`/`PF_PACKET` channel that `pcap` uses at **OSI Layer 2**. So what we can do here is to make use of network sockets (combination of IP and port) being created and used by an app. `netstat -tup` or `ss -tup` will show all network sockets with active/established connections. Both tools are available on Android (or you can get a static binary), `ss` is the newer one. **Socket vs. UID** information can also be directly read from `/proc/net/{tcp,udp}`. Android app Netstat Plus works on same principle. This will provide Local Address (socket) being used by a process.

Once we know what sockets are being used by an app (UID), `tcpdump -i wlan0 src <IP> and port <PORT>` will dump the whole traffic originated from that process.
Similarly a remote socket (if not connected to by multiple apps) can also be used for filtering results.

**LIMITATIONS:**

However there are some issues with this approach:

* Android apps usually launch more than one process at a time in parallel i.e. **multiple PIDs working under same UID**. So we have to capture traffic from all processes.
* Apps keep on creating and deleting sockets. Keeping track of **continuously changing sockets** is almost impossible particularly when there are a large number of apps accessing network simultaneously.
* There is - though rare - possibility that local **sockets are being shared** by multiple processes on UNIX-like OS's. Remote shared sockets such as UDP/53 which is used for DNS resolution cannot be tracked for a single process. This further weakens the approach.

**NetHogs** traverses `procfs` and copes with the above limitations (though not always very successful):

## IPTABLES:

The above described shortcomings of a Layer 2 tool can be mitigated using iptables `LOG` or `NFLOG`. **Layer 2** is just above the Physical Layer i.e. it's the last thing packets encounter before leaving the device. That's why, being at Data Link Layer and working at lower level of net stack, BPF is a kind of stateless packet filtering mechanism as compared to `netfilter` / `iptables` which works at OSI **Layer 3** (nearer to userspace programs). So `iptables` can also get information from TCP/IP stack (**Layer 4**). It filters packets based on their creator UIDs using module `owner` that interacts with sockets to find packet ownership.

`iptables` writes to kernel log which can be read using `dmesg` or `logcat`. UID of an app can be obtained using some app or read from `/data/system/packages.list` or `pm list packages -U`.

```
# iptables -I OUTPUT -m owner --uid-owner <UID> -j LOG --log-level 7 --log-prefix 'SNIFFER: ' --log-uid
# dmesg -w | grep SNIFFER

```

Output can be saved to a file and formatted using tools like `grep`, `awk`, `printf` etc. Network Log \- though very outdated - works in similar way. AFWall+ is a firewall based on `iptables` that can log / notify an app's network activity when the app is blocked.

The only downside with this approach is that it cannot be used to sniff traffic from one process when there are **multiple processes running with same UID**. `iptables` can't capture packets based on PIDs. They decided not to use `iptables` with processes because the process is started before it is blocked/sniffed, and program could easily spawn a child process with new PID which would not be blocked / sniffed. Also PIDs are created and destroyed as quick as sockets are. So there is always room for traffic being leaked.

## QTAGUID:

`owner` module won't work for **incoming or forwarded traffic** because IP packets carry no ownership information. To measure per-app incoming / outgoing network usage, Android patched kernel to include `qtaguid` module. We can read statistics from `/proc/net/xt_qtaguid/stats`. With some shell scripting get live data usage since reboot:

However on Android 9+, `qtaguid` is being replaced with extended BPF (which is also planned to replace `netfilter` framework in Linux kernel). Related: Which process is responsible for capturing data usage?

## IPTABLES + TCPDUMP:

An alternate is to put the outgoing traffic from an app in an `NFLOG` group and later tcpdump captures packets from that group:

```
# iptables -I OUTPUT -m owner --uid-owner 1000 -j NFLOG --nflog-group 30
# tcpdump -i nflog:30

```

This is to ensure that we get closer to physical layer when sniffing outgoing traffic. But it can still give **false positives** e.g. if packets are dropped / lost in routing tables. That's why sniffers work at OSI layer 2. Or even better is to watch from outside e.g. using a proxy / VPN server or on a tethered PC or at router. But this won't capture traffic on per UID/PID basis.

## OTHER OPTIONS:

* Use diagnostic tools like `strace` to track `syscalls` related to network activity of a process. force\_bind and tracedump also work on same principle. Linux kernel's audit subsystem can be used for the same.
* Use Network classifier cgroup with `iptables` `NETFILTER_XT_MATCH_CGROUP` to sniff traffic from certain process(es).
* Use `Network Namespaces` to isolate processes and read data usage on per interface basis. nstrace works on same principle.
* If the intention is entirely to block traffic originating from certain processes, `SELinux` and `seccomp` can be used to restrict the processes' ability to create sockets by defining restricted `policies` and suppressing `syscalls` respectively.

Most of these are not straightforwardly viable options for Android and require advanced configurations.

---

## ANDROID'S APIs (NON-ROOT OPTIONS):

Some apps like NetGuard use **VpnService** API of Android to block traffic at Layer 3 (TUN interface). The app can *"notify when an application accesses the internet"*. Per app capturing and tracking (, ) is possible using VPN API as Android makes use of `UIDs` and `SOcket_MARKs` (, ) to control traffic in network Routing Policy (RPDB), just before leaving the device.

Some apps like NetLive make use of **NetworkStatsManager**, but it lags the real-time usage and *"does not update quickly enough"*, it's *"meant to provide historical data"*.

NOTE: I've no affiliation with any app referenced.

---

**RELATED:**

# Answer
> 4 votes
With PCAPdroid you can see the individual connections made by the apps. It's an open source tool developed by me which works without root (root is optional). It has lots of interesting features for users security and privacy, check it out

# Answer
> 1 votes
If you only want to track which app performs connections to which server I recommend the app Net Monitor to you. It acts as a local VPN and is therefore able to detect all network traffic. Furthermore it shows which app has performed the network request (including remote host, ports, and even if the connection is plain or SSL/TLS).

Therefore if you use this app in combination with the capture tools you already mentioned in your question you should able to trace back each and every network connection.

---
Tags: applications, networking, internet, data-monitoring, processes
---


# Question
Title: Device cannot access Internal Storage without elevated rights
After my NANDroid restore didn't work as expected, flashed a clean ROM + Magisk.

When booted to system, internal storage is not accessible (regular File Manager, MTP, adb shell, MiXplorer's Internal Storage).

But it is accessible via elevated rights (TWRP File Manager, MTP when in recovery mode, su in adb shell, Root option in MiXplorer).

Permission while in recovery and booted to system are respectively:

> drwxrwxrwx 2 system system 4096 1970-01-01 18:21 sdcard
>
> lrw-r--r-- 1 root root 21 2009-01-01 05:30 sdcard -\> /storage/self/primary

--\> Tried `chmod -R 777 sdcard` with no luck. As it is a symlink, did chmod directly to `/storage/self/primary` and `/storage/emulated/0` but it doesn't have an effect.

--\> Tried from scratch, wiping and formatting every partition and entire Internal Storage, tried older known working ROMs. Still the same.

Surely, it's a permissions issue. What am I missing?

# Answer
After being stumbled for days, found a very simple solution. This will need root privileges.

From an ADB shell or terminal emulator in phone:

```
su
restorecon -v -R /data/media

```

This will make Internal Storage mounted at `/data/media` readable again, without any data loss.

Source: XDA, as referred by this post:

Tip: Using different search engines with same keyword helps to find additional threads/ articles.
> 1 votes

---
Tags: root-access, internal-storage, permissions, magisk
---


# Question
Title: Does one grey tick in WhatsApp group chats mean that I am blocked?
I'm still trying to figure out WhatsApp. I want to know if I am blocked. So I am in a group with 50 people (nearly all people are not in my saved contacts, only 2 are). I sent a message, and after more than 12 hours, my message is still shown with one grey tick.

The profile picture of my friends that are saved on my mobile is still showing.

Am I blocked?

# Answer
**One grey tick in WhatsApp group chats means that *someone* has not received the messages** (e.g. no internet, the device is powered off, etc.)

Users can check the real status by long-tapping their own messages and selecting "Info" (tap the "3-vertical dot" overflow menu if it's not shown). It will show:

* Participants who have read the messages
* Participants who have received the messages, and
* A count of participants who have not received the messages as "x remaining"

---

On the other hand, **blocking participants in WhatsApp group chats does not affect anything**.

I just tested this with a group consisting of my 2 WhatsApp accounts, with the recipient blocking the sender:

* When sending private messages
    + Sender: one grey tick (undelivered)
    + Recipient: not receiving the messages
* When sending group chat messages
    + Sender: double grey (delivered) / blue (read) ticks
    + Recipient: still receiving the messages and sending read receipts
> 0 votes

---
Tags: whatsapp-messenger
---


# Question
Title: Google services on Raspberry Pi 4 Model B saying it is offline while connected to WiFi
I have just been setting up Android 12L on my Raspberry Pi 4 Model B. After I installed Google Play onto the Raspberry Pi, no matter how hard I try fixing it, all Google services still say it is offline even when it is connected to ethernet and WiFi (separately).

Help?

# Answer
> 0 votes
So... Turns out that I needed to enable WiFi access to google play and all other corresponding apps manually by going to *Settings* \> *Apps* \> *\[app name; particularly Google Play Store\]* \> *Mobile Data & WiFi* and then turn on Allow Network Access. I didn't even know it was that simple.

---
Tags: google, connection-issues, internet, android-12
---


title: How to list suspended apps?

text:
# Question
Title: How to list suspended apps?
You can "suspend" user apps via `cmd package suspend <packageName>` (which acts kind of like `pm disable`; the differences are explained in this answer by @Firelord), and later unsuspend them using `cmd package unsuspend <packageName>` – which also works for user-installed apps. However: suspended packages seem no longer to be listed via `cmd package list packages` – not even if `-u` (uninstalled) or `-d` (disabled) is specified; not even `dumpsys package` seems to know them anymore.

So is there any way to obtain a list of suspended packages? The syntax output doesn't mention such. But as such apps are still shown in the launcher (though "grayed out"), there must be a way to detect them.

# Answer
> 1 votes
I'm not particularly good with bash scripts so I'm posting a bit of an ugly one-liner which prints the packages which are currently suspended. Tested on Android 11 and 12 (both Android Emulator).

**Works without root access**:

```
adb shell
pm list packages -a | sed -e 's/^package://'| while read package; do status="$(dumpsys package $package | grep -o "suspended=true")"; if [[ "$status" == "suspended=true" ]] then echo "$package"; fi; done

```

What we are doing in simpler terms is get package names of all the installed apps; then for each package dump its content using `dumpsys package`, and within each dump check for the string which *et al* mentions this substring `suspended=true`. If found, we print the package name, otherwise, we skip to the next package name and repeat the process.

**If you have root access (won't work on Android 12)**:

```
adb shell
su
grep 'suspended="true"' /data/system/users/0/package-restrictions.xml | cut -d '"' -f2

```

This is very fast compared to non-root solution. Also prints names of packages which are currently suspended.

---
Tags: command-line, disable-app
---


title: How to write to an Android system file?

text:
# Question
Title: How to write to an Android system file?
Why is writing to `/sys/class/power_supply/battery/status` having no effect?

Accessed manually via `adb shell` as root, eg `echo "Discharging" > /sys/class/power_supply/battery/status` does not change the file's contents. `vi` does not want to save any changes. `touch` also fails to create a test file in the same directory.

Permissions were 444 originally, but changed to 644 with `chmod`.

The goal is to use Battery Charge Limit to limit how much the phone's battery is charged, and that app writes to a control file to achieve this. Since the app isn't working on this phone I tried to test writing manually to diagnose.

The phone is a Samsung Gio GT-S5660M running Cyanogenmod 11 which is the most recent ROM I found for it.

File system and memory:

```
root@gio:/ # df
Filesystem               Size     Used     Free   Blksize
/dev                   136.9M   136.0K   136.7M   4096
/sys/fs/cgroup         136.9M     0.0K   136.9M   4096
/mnt/asec              136.9M     0.0K   136.9M   4096
/mnt/obb               136.9M     0.0K   136.9M   4096
/mnt/fuse              136.9M     0.0K   136.9M   4096
/system                206.4M   185.2M    21.3M   4096
/data                  178.4M   114.7M    63.7M   4096
/cache                  24.8M     4.2M    20.6M   4096
/mnt/media_rw/sdcard0     1.8G     4.3M     1.8G   32768
/mnt/secure/asec         1.8G     4.3M     1.8G   32768
/storage/sdcard0         1.8G     4.3M     1.8G   32768

```

```
root@gio:/ # free
             total         used         free       shared      buffers
Mem:        280276       267796        12480            0         3672
-/+ buffers:             264124        16152
Swap:        49148         4580        44568

```

```
root@gio:/ # mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,mode=750,gid=1000 0 0
none /sys/fs/cgroup/memory cgroup rw,relatime,memory 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/fuse tmpfs rw,seclabel,relatime,mode=775,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/stl12 /system ext4 ro,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/block/stl13 /data ext4 rw,seclabel,nosuid,nodev,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/block/stl14 /cache ext4 rw,seclabel,nosuid,nodev,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/block/vold/179:1 /mnt/media_rw/sdcard0 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0

```

# Answer
By default, the `/sys` directory tree is read-only and maintained by Android's Linux kernel. Using it to control charging would require a customised kernel, and AFAIK Cynogenmod had a pretty generic kernel.
> 1 votes

---
Tags: adb, cyanogenmod, charging, system, file-permissions
---


# Question
Title: Pushing a directory of code to GitHub from Android
I have a directory structure containing code on my Android phone. I would like to push the code to GitHub. I have downloaded the FastHub app and tried the mobile and desktop versions of my GitHub account but am still unable to do it because I want to upload everything in one go.

Perhaps I need a shell client with git installed or added on on Android.

Can someone please tell me how I can accomplish my task?

Thanks.

# Answer
FastHub is just a GitHub client, so it's of no use where Git is needed. As you suspected this requires a Git client, though it doesn't need to be run in a shell.

Up to at least Android 10 MGit is one useable option.

1. GitHub: When starting a new repo, create a repo with a readme so it can be cloned immediately. Copy the URL to the repo, e.g. `https://github.com/username/reponame`.
2. MGit: Go to Settings and set the storage location for repos if the root of emulated external storage isn't a good spot.
3. MGit: Press `+`, paste the repo URL into the "Remote URL" field, check "Clone recursively" if necessary (no idea if that works), and press "Clone". It should quickly start the process, but it can be slow if it's a huge repo.
4. Copy and paste the files with your code into the repo directory using a file manager. Recommend copying so there's a backup in case something goes wrong while still learning this process, but users choice.
5. MGit: Go into the repo and move over to the Status area to confirm your files are being detected.
6. MGit: Open the menu by pressing the hamburger or swiping from the right, press "Add all to stage", and then "Commit", and enter your commit info. Recommend filling the optional Author field so it doesn't use a default, which looks odd on GitHub. Press "Commit" to finalize it.
7. MGit: Open the menu and press "Push" and then "origin". Now the login..
8. GitHub: Go to Settings -\> Developer settings -\> Personal access tokens (easy link). Press "Generate new token" and confirm password if necessary.
9. GitHub, PAT: It's good to add a note specific to the app + repo as it's easy to forget what each is for, and the note apparently can't be changed after. For the scope select "repo", then scroll down and press "Generate token". Make sure the token is copied before leaving the page.
10. MGit: Enter the PAT you just created as the password on the login. Now it should successfully push.

If a shell client is preferred Termux may work. If a real shell client is preferred a Linux chroot environment like UserLAnd is the way to go, as it's almost a real Linux install. Beyond Android 10 this will all probably fail because of storage permission changes.
> 0 votes

---
Tags: applications, shell, file-management, 8.1-oreo, backup-manager
---


# Question
Title: Can I use apps like LADB WiFi ADB or Wi-Fi Debugging without needing a USB cable ever during the process?
I have an old Android tablet that had been rooted but my phone hasn't been rooted....yet. What I need to understand is if there's a way to use my tablet to perform edits on my phone without EVER needing a USB cable to do so. LADB requires Android 11 it seems but my phone (Moto E 2020) isn't eligible for any system upgrades and as I mentioned above, the phone isn't rooted. I've already downloaded apks like TWRP, LADB, Wireless Debugging and I've already enabled adb in the dev options. So is it possible to connect to the phone using the tablet?

# Answer
> 0 votes
This isn't possible. The adb demon on an Android device isn't the same as the one that runs on a Linux, Mac or Windows development machine. The adb client program that is run on a development machine isn't available on Android devices.

---
Tags: adb, root-access, android-10, motorola, developer-options
---


title: Group Text question

text:
# Question
Title: Group Text question
I use message+ for text. I am stuck in 2 group texts from hell. I didn't ask to be included, I just was & now I can't get out! Is there anything I can do to leave these group texts? If I factor reset my phone will it stop? Do I have to go to the extreme & change my number?

# Answer
Why don't you try using another messaging app instead of message+.i believe it would be much better than a factory reset. You could try wiping the App data (message+). Tell me if it helps
> 0 votes

---
Tags: applications
---


# Question
Title: Can't update apps even though I have space
Can't update apps even thhough my Samsung Galaxy S9 Plus is having 10 gigabytes of free RAM. The update fails and the playstore glaims I have "no space". Any idea?

# Answer
Could you send a picture of the playstore result. I believe the s9plus doesn't not have 10GB ram as well. You can try to clear playstore cache or install 3rd party stores like Apkpure or uptodown to install the updates you want if you believe that playstore has problems.
> 0 votes

---
Tags: samsung-galaxy-s-9
---


title: No audio during call

text:
# Question
Title: No audio during call
I just upgraded from Oreo to Pie, and calls are not working. Everything else is perfect.

Completely mute: I can't hear anyone, and no one can hear me. Not even voicemail works

* Whatsapp call **works**
* Tried wiping the phone app
* Tried that option to *erase Wi-fi, Bluetooth, and Mobile network settings*
* Tried soft reset (hold power for 10s)
* Tried manually selecting the carrier
* Tried cleaning the handsfree jack (no use, since whatsapp calls and hardware tests show that the mic and earpiece are good)
* Tried replacing the phone manager by another
* Tried call via bluetooth

Tested side-by-side with another phone I have. Completely mute.

This is the ROM: https://www.stockrom.net/2019/07/xt1925-5.html/amp

All well in according to the model (XT-1925-5)

Is there a way to determine the cause ? Is there a FIX fix ?

Apart from Hard Reset, of course. That would be the third time this month I do that to fix glitches... Problem is that every hard reset forces me to visit two banks to enable the phone.

# Answer
I surrended and reflashed the ROM (again), and it worked.

Don't know if just hard resetting was enough. I skipped that.

Plus, I used another ROM source: https://motostockrom.com/motorola-moto-g6-xt1925-5

Don't know if that made a diffence or was unnnecessary.

Well... Works now
> 0 votes

---
Tags: calls, 9.0-pie
---


# Question
Title: How can I configure Android so that the phone rings when I receive a phone call while in "do not disturb" mode?
I tried to check allow all notifications:

However, after saving it, it gets unchecked again. It works fine for other applications.

How can I configure Android so that the phone rings when I receive a phone call while in "do not disturb" mode?

I use a Google Pixel 6.

# Answer
As Andrew T. commented, go to the `Do No Disturb` settings and change the people option:

Then call option:

Then one can select who may disturb:
> 1 votes

---
Tags: notifications, calls, do-not-disturb, google-pixel-6
---


# Question
Title: How does Android do DNS name resolution?
I am learning about how Windows does name resolution and need to know how Android does it so an app will work on my Windows laptop and from my Android Phone.

Borrowing from a post on superuser.com, the normal resolution method on Windows is as follows:

> 1. The client checks to see if the name queried is its own.
> 2. The client then searches a local Hosts file, a list of IP address and names stored on the local computer.
> 3. Domain Name System (DNS) servers are queried.
> 4. If the name is still not resolved, NetBIOS name resolution sequence is used as a backup. This order can be changed by configuring the NetBIOS node type of the client.

I use `dnsmasq` to provide local DNS resolution so I can map my own made up hostnames to local LAN IP addresses. This also allows me to see, in the `dnsmasq` log file, the DNS query that goes from the client to the DNS server. While testing the website from my phone I could swear using the URL address `http://mywebsite` in a Chrome browser on the phone was loading the website and the `dnsmasq` log showed just that unqualified name - `mywebsite` \- resolving to the desired local IP address the web server is at.

However that was a few days ago, now the `dnsmasq` log always shows that the DHCP server DNS suffix \[home\] has been appended. So I see `mywebsite.home` in the `dnsmasq` log even though I used the URL address `http://mywebsite` in the phones Chrome browser. I didn't change anything with the phone. It is still set up to get its IP address via DHCP, in practice it never changes.

So my questions are:

1. How does Android OS resolve domain names to IP addresses - what things does it try and in what order?
2. Any feedback on why Android seemed to be resolving the unqualified hostname in my browser originally without any DNS suffix being appended. But now the `[home]` suffix is always appended as reported in the `dnsmasq` log file.

**Update 1**

After some more testing I have again seen the scenario where the webpage `http://mymovies` loads from the Android phone but the `dnsmasq` log appears to show the name resolution happening on an unqualified domain name (bare hostname: `mymovies`).

The `x`'s are my redacted routers public IP address.

Can anyone explain what `dnsmasq` is doing here?

Starting from 02:07:22 it initially seems to try resolving the name `mymovies.home`. This makes sense because the phones IP is dynamically allocated by the DHCP server and I can see on my laptop that the DHCP server sends the DNS suffix `[home]` as the connection-specific DNS suffix so it must be doing the same to the phone I guess?

The reason why it fails here is because I do not have an entry for `mymovies.home` in `dnsmasq.conf` \- I commented it out. I DO have an address entry for `mymovies` in `dnsmasq.conf` and that seems to be why it can resolve `mymovies` to an IP address.
Is this a difference of name resolution in Android compared with Windows - that eventually Android OS WILL try to resolve an unqualified domain name (bare hostname) to an IP address?

# Answer
> 13 votes
How DNS queries made by a program are being resolved isn't specific to an OS, but depends on the resolver library the program is using. DNS resolvers have traditionally been part of OS's standard C library e.g. Bionic on Android, `libcmt` on Windows, `glibc`, `musl`, `dietlibc`, `uClibc` and others on Linux. Not all C libraries use the same approach to resolve host/domain names. While `glibc` and alike provide complicated but highly configurable mechanisms like Name Service Switch, others just rely on `hosts` and DNS queries to upstream nameserver as configured in `/etc/resolv.conf`. Android's resolver <sup>(, )</sup> looks up cache, `hosts` and DNS:

> *"DNS lookups are centralized in the `netd` daemon to allow for system-wide caching, while apps call functions (such as `getaddrinfo`) in Bionic. The query is sent over a UNIX socket to `/dev/socket/dnsproxyd` to the `netd` daemon, which parses the request and calls `getaddrinfo` again to issue DNS lookups, then caches the results so that other apps can use them."*

DNS server address is either received through PDP context on Mobile Data or through DHCP on Wi-Fi (also possibly to set manually) or the hard-coded value `8.8.8.8` is used. Since Android 9 Private DNS (DNS over TLS) may also be configured in Settings. It's also possible to set DNS and domain name using `ndc resolver setnetdns` command. See more details in How to configure DNS properly?.

> `dnsmasq` log always shows that the DHCP server `DNS` suffix \[home\] has been appended

`.home` suffix is being provided by your DHCP server (router?) to Android as part of DHCP request (code 15). Android's DHCP client asks server for option 6 (domain name server) and option 15 (domain name), which are then forwarded to C library (\_resolv\_set\_nameservers\_for\_net) through DnsManager, NetworkManagementService and `netd`.

On Linux DHCP client (e.g. `dhcpcd`) modifies `resolv.conf` itself or uses a program like `resolvconf` which is dedicated to manage `resolv.conf`. `nameserver` keyword defines DNS server and `search` defines search list for host-name lookup (DHCP option 119 or 15). Android uses default values hard-coded in different header files other than those received from DHCP or set manually.

Windows's DHCP client and DNS resolver support option 15. Additional configurations which are honored by DNS Client service (`dnscache`) and library can be made through Network Connections or Group Policy Editor or Registry Editor.

> Is this a difference of name resolution in Android compared with Windows - that eventually Android OS WILL try to resolve an unqualified domain name (bare hostname) to an IP address?

As far as I have seen this is almost standard behavior for Linux libc's. Android's DNS resolver code is also based on NetBSD - another Linux-like operating system. A single-label unqualified name is first tried with DNS suffix appended, then tried without suffix 4 times (see *"options attempts:n"* for `resolv.conf`). For multi-label name the order is reversed while a FQDN (with trailing `.`) is never tried with suffix. On Windows you can append dot to unqualified name so that it's treated as FQDN. It's possible to set it as default behavior by adding dot (`.`) to "DNS suffix for this connection". See also for Multi-Label Name Queries.

> I am learning about how Windows does name resolution and need to know how Android does it

As stated in the start, name resolution might not be persistent across whole OS. On Android, for instance, Firefox or Chrome will be depending on Bionic resolver while some `busybox ping` (or even some native libraries included with GUI apps) will be trying to read `resolv.conf` and make DNS queries directly.
Also network troubleshooting tools like `ping` and `getent` rely on OS's internal resolver libraries like NSS, while DNS diagnostic tools like `nslookup`, `dig` and `host` act as independent DNS clients - they don't read `hosts` file and may not honor `resolv.conf` in its entirety. `dig` provides commandline arguments to (not) use options set in `resolv.conf`, and similarly Windows `nslookup` has its own built-in resolver.

So even on same OS you can't expect same DNS resolution behavior when using different GUI/CLI programs because they could be using different libc and/or different resolver and/or different configuration.

---

**RELATED:**

# Answer
> 1 votes
> Can anyone explain what `dnsmasq` is doing here?

* query\[A\] = resolution request for IPv4
* From: obviously the source, as you already stated, your router's public address.
* forwarded to: is the URL forwarding to the DNS servers that you configured for such kind of URLs, in case that no config there, is using the default DNS servers or your GW.
* reply: the DNS Server is not being able to resolve the host because that domain doesn't exist (mymovies.home) and therefore is delivering that "NXDOMAIN" as reply
* 192.168.1.124 is the IP that you have statically configured for mymovies

---
Tags: dns
---


# Question
Title: If my android phone runs out of charge, is it bad for my mobile?
So i have this habit of using my phone till the very end. It isn't like my phone runs out of battery too fast, just that i use it too much. Does this switching off affect my device? Is there any hardware/ software damage sustained?

Samsung J7

# Answer
I have personally used the Samsung Galaxy J7 so I can confirm it shuts down properly when it runs out of juice (almost all OEMs including Samsung ensures that the device shuts down properly before the battery 'literally' runs out of power). So no software damage.

Speaking of hardware, using your device between 20%-80% battery percentage would be a good practice. Discharging or charging to the extremes (0% and 100%) affects the battery cycle and can degrade your net battery capacity faster.

Have a look at this - BU-808: How to Prolong Lithium-based Batteries
> 1 votes

---
Tags: samsung
---


# Question
Title: Why has Android made it impossible to install system fonts?
Fonts in Android are kept in `/system/font` directory. There seems to be no way to install custom fonts without rooting your Android or installing some apps.

* Why has Google made it almost impossible for Android users to install custom fonts?
* What was the engineering decision that led fonts not getting picked up from `~/.fonts/` user directory as happens in a standard Linux Distribution?

The same behaviour is seen in ChromeOS as well.

# Answer
> 7 votes
Fonts can be considered an attack surface so system level fonts are restricted.

The Android Open Source Project documentation has a section on Custom Fonts Fallback which allows for Android 12+ OEMs to modify/update the system font with appropriate system level permission/keys. For Android 11 and earlier, the system font was delivered with a ROM update.

Reading on there is a section on signing font files:

> **Signing font files**
>
> Since font files are risky resources, they must be verified with trusted keys. Carefully review all font files that are to be updated, and sign with your private key. The signature must be `fs-verity` compatible.

where Google calls out that font files are 'risky resources'.

Quoting from: How can a font be used for privilege escalation?

> **Fonts are hard. It's old code. It runs in kernel mode.**

Related post: How to detect suspicious content in a TrueType Font (.ttf) font file

So it can be implied that by not allowing end-user customization of the system fonts, there is a reduction of the attack surface.

Individual apps can embed their own custom font files for use within their own app.

---
Tags: root-access, fonts
---


# Question
Title: How to get the size of the “super” partition on the device?
lpmake requires to get the size of the “super” partition on the device:

> -d,--device-size - The size of the “super” partition on the device. It must match exactly, and it must be evenly divisible by the sector size (512 bytes).

*How can I obtain it?*

Using adb, I was able to run  `ls -la /dev/block/bootdevice/by-name` and see

> `lrwxrwxrwx 1 root root 21 2022-06-13 23:32 super -> /dev/block/mmcblk0p34`

and then using termux, as root, I obtained:

> `blockdev --getsz /dev/block/mmcblk0p34`
> `8388608`

but since the original firmware's `system.img` file is 3.2 GiB (3,435,159,228 \> 8,388,608), this seems quite unlikely.

What am I missing? I am aware of this post, but it did not helped.

The scatter file reads

```
- partition_index: SYS35
  partition_name: super
  file_name: super.img
  is_download: true
  type: NORMAL_ROM
  linear_start_addr: 0x23800000
  physical_start_addr: 0x23800000
  partition_size: 0x100000000
  region: EMMC_USER
  storage: HW_STORAGE_EMMC
  boundary_check: true
  is_reserved: false
  operation_type: UPDATE
  is_upgradable: true
  empty_boot_needed: false
  reserve: 0x00

```

and `0x10000000` is `268435456` (268,435,456), but that's still not enough?

I see another number using fastboot...

```
fastboot getvar partition-size:super
partition-size:super: 100000000
finished. total time: 0.003s

```

and

```
echo "ibase=16; 100000000"|bc
4294967296

```

This one could be valid, since 4,294,967,296 \> 3,435,159,228.

# Answer
Actually, all three sources are in agreement when you know how to read it:

# Scatter

> partition\_size: 0x100000000

`0x100000000` = `4,294,967,296` (I had forgotten a `0` in my question)

# blockdev

> `blockdev --getsz /dev/block/mmcblk0p34`

`8388608` = `8388608` (blocks) x `512` (block size) = `4,294,967,296` (Thanks alecxs!)

# fastboot

> `fastboot getvar partition-size:super`

Gives `0x100000000` = `0x100000000` = `4,294,967,296`
> 1 votes

---
Tags: rooting, partitions
---


# Question
Title: Google Maps navigation stopped playing guidance
I used Google Maps navigation for times without any problem, on several different devices; currently I'm using a Google Pixel 3a, and it first worked properly too.

But suddenly, it began to **cut EACH guidance phrase before the end**, like in this example (freely translated from French):

> In 200 meters, at the roundabout, take the (silent here)

This happened systematically during some days, after which it started working properly again.
But it started again cutting phrases some other days later!

This has occurred during months: working - not working - working - not working...
Till it totally stopped talking: visually the navigation process works fine, but **now the device never says anything at all**.

Obviously I controlled my configuration, which is correctly set to have the guidance playing.

Important precision: very strangely, **this happens for car guidance, but pedestrian one talks normally!**

I tried following numerous help pages from the net, without success: they all address either configuration settings or device malfunction, so **the proposed solution always concerns a general problem** (affecting any sound usage, at least inside of Google Maps), **while my problem clearly happens for only certain parts**.

# Answer
**TL;DR**

Depending on which car (in fact, which software bundled in the car) the device is connected to, the problem may happen or not.
When it happens, the solution is to disconnect the device from the car: then the guidance normally plays again.

**Detailed explanation**

After a lot of tests, I finally discovered that all works fine as long as the device is not connected to the car.
(BTW this explains why it works fine when in pedestrian mode)

A posteriori I also understood why it suddenly started to fail, when I realized that it happened after exchanging my Volvo XC60 for a Volvo V70.
The previous one was a most recent model, and it clearly appears that the bundled software is not exactly the same version.

I guess that something special in the new one (new for me, but older in time) is responsible to cause (may be indirectly) the activation of a certain configuration option (either at the device or app level).
But despite a lot of investigations I couldn't discover which one: all options I could think of seam to remain unchanged when connecting/disconnecting.
**Does somebody have any idea about what might be concerned here?**

So my current solution (not the ideal one, indeed) is simply to disconnect the device when I want to use Google Maps navigation.
I resign myself to not being able to use the phone during this time.

BTW if you wonder why I prefer to use Google navigation system rather than the car-bundled one, it simply comes from the obvious enormous difference at the "enter address" level: Google Maps seam to know any little locality or suburb name, as well as numerous little shops, curiosity points, and so on.
While the car-bundled navigation system (at least the ones I know) labouriously claim for town, street, number... and doesn't know anything else.

Last point: what remains totally unexplained is why, starting to fail, the guidance system was not immediately silent, but began only cutting the end of each sentence...
> 0 votes

---
Tags: audio, google-maps-navigation, google-pixel-3
---


# Question
Title: Does a store see my email address when I pay with Google Pay (NFC)
Can a store see an email address associated with my Google account (a card has been added to) when I pay with Google Pay via NFC?

# Answer
> 2 votes
Google Pay transmits credit card number(s) to the merchant terminal, I don't think the payment NFC standard even has the possibility to transmit an e-mail address (no data field for that).

According to the "Detailed Google Pay transaction process in stores" this data is transmitted from the phone to the payment terminal:

> 2. Merchant receives token: When the customer taps their device on an NFC-enabled terminal at the store’s point-of-sale, the device sends the token, token expiry date, and cryptogram to the terminal via the NFC protocol.

https://support.google.com/pay/merchants/answer/6345242?hl=en#zippy=%2Cdetailed-google-pay-transaction-process-in-stores

The data is processed then by the "Acquirer" and "TSP" both financial companies. In the end the merchant respectively the used terminal just gets a success or failure response but no customer data.

---
Tags: google-account, nfc, google-pay
---


# Question
Title: What is this weird app on the homescreen of ColorOS 11? Is this a malware?
My device is an Oppo F11 Pro that I bought in 2019 and it has ColorOS 11.1 / Android 11.

Recently, this weird app popped out on my phone.

I tried to remove it, but when I tap on it, it says that it wasn't able to open the app, and when I hold the icon, I only get "see the details of this app" which leads to nothing. I found nothing on the app manager, so I thought that my phone was compromised and I reset it to factory settings and changed my passwords using my laptop (which I'm sure isn't compromised because I just got it and only has Firefox on it).

After the resetting, I installed some apps from the Play Store (as you see, Citymapper for example) and I noticed that for some apps (Messenger, Google Podcasts, Forest, and Reddit), this weird icon appears before the apps' icons; while for other icons (Citymapper, Instagram, McAfee Security), nothing happens. And since I got the McAfee 30 days trial, I decided to put it on the phone and it found nothing during its analysis.

I may have randomly found a hint about the app. I was checking the authorizations given to my apps and I noticed that an app called "DMApp" with the same weird Android icon had the authorization for making and managing phones calls. I removed it and there is no way to find that "DMApp" again, but the icons kept multiplicating.

**TL;DR:** A weird-looking icon keeps popping out in my phone with no way to find its origins (even after factory reset). Device: Oppo F11 Pro (bought in 2019). OS: ColorOS 11.1 | Android 11

I hope you can help me figure out what all this is about. Thanks!

# Answer
This is a Color OS bug with Android 11. Me too facing this since a few days so can confirm.
> 1 votes

# Answer
Go to Settings - Homescreen and lockscreen, and turn off and on the icon autofill. It will clear off all those.
> 0 votes

---
Tags: applications, malware, home-screen, android-11, oppo-coloros
---


# Question
Title: How to prevent an app from being uninstalled?
Is there any permission or method to prevent an app from being uninstalled even after factory reset like system app that does not get uninstalled?

# Answer
You will have to root your device and move the app using any application to the system folder. This will enable your app to be on device even after you have formatted your device.

Here is the link of application which provides this administrative feature:

/system/app mover ★ ROOT ★

This app moves apps from and to the `/system/app` folder, making them a system app or a user app. System apps can get more priviledges, so some apps get more functionality when installed as a system app. On the other hand, system apps can not be uninstalled. So this app can also be used to convert system apps to normal user apps by moving them from the `/system/app` directory to `/data/app` directory.

**WARNING:** Uninstalling important system apps might result in a unusable device! Use this function at your own risk and only if you know what you're doing! Make a NANDroid backup first! I won't give any kind of support if something goes wrong - don't install this app if you're not okay with that.
> 2 votes

# Answer
Another method is to make a file from the app **immutable** via elevated (SU) shell command

`chattr -i`

This prevents the file from being moved or deleted, thus, preventing the uninstallation of the APK.

This method is more useful to prevent the app from being updated.
> 0 votes

---
Tags: installation
---


# Question
Title: I uninstalled/deleted a system privileged app (from /system/priv-app) How can I reinstall it?
I uninstalled the DocumentsUI only to know it wasn't "just" a files manager. My `/system/priv-app/DocumentsUI` is empty. Putting any 3rd party DocumentsUI.apk in it results in bootloop. I have a custom rom (Aosp extended).

Flashing the `/system` again would fix the problem I think. Just want to make sure if this will make the condition worse or am I going alright?

# Answer
> 2 votes
The way I did it was a little different.. I made a full twrp backup. Wiped everyhing. Flashed the stock rom. Copied the `DocumentsUI.apk` from twrp. Wiped again. Restored the backup. Placed the copied apk into `/system/priv-app/DocumentsUI`. Everything worked perfectly!

# Answer
> 1 votes
This answer was before the edit but holds

Flashing `/Data` would result in:

* Losing your user data.
* Worse, it's not going to solve your problem.

**Solutions**

* Dirty flash the ROM ( flash `/system` without wiping `/Data`)
* As suggested by Irfan in comments, Extract the file from ROM's zip file and put in proper place with proper permissions.

Second option requires a good understanding of Android. For me, dirty flashing would be fastest and simplest.

# Answer
> 0 votes
You have to root for this

Install any root browser (x-plorer , cx file manager etc.

open /system/priv-app/DocumentsUIGoogle

3.copy all apk files to any internel storage folder

Install all these apk files at once using any split apk installer ( Recommended -com.smartpack.packagemanager ) download link - https://play.google.com/store/apps/details?id=com.smartpack.packagemanager

5.Reboot

Note :- if you are unable to find these apk files then use attached files vvvvv https://mega.nz/folder/R1UxBbYJ#BD6jRT52rADTGA09x6EBcA

Note 2 =\> if you don't have any DocumentsUIGoogle folder then create one and put all apk files into it then install all these apks using package manager.

---
Tags: root-access, boot-loop, system-apps
---


title: adb glob expansion

text:
# Question
Title: adb glob expansion
I'd like to be able to issue:

```
adb pull storage/self/primary/Documents/*20220204* .

```

Right now doing that gives:

```
zsh: no matches found: storage/self/primary/Documents/*20220204*

```

# Answer
The matching of `*` wildcards is failing, because it's being done by zsh on your *computer*, which can't see your Android device's filesystem. It's looking for `storage/self/primary/Documents/*20220204*` in your computer's filesystem, and not finding it. It's fortunate that it doesn't exist on your computer, since if it did, it could only provide a source of confusion.

Here's a way to do the job with `tar`, using the `/data/local/tmp` directory, which you can write to from the adb shell on any Android device.

# Create some example data

`adb shell "cd /data/local/tmp; echo FileA > a.tmp; echo FileB > b.tmp"`

We've created `a.tmp` and `b.tmp` in `/data/local/tmp` on the device.

# Collect the data into an archive file

`adb shell "cd /data/local/tmp ; tar cvfz archive.tar.gz /data/local/tmp/*.tmp"`

The first use of `/data/local/tmp` is getting to the place where you'll create the archive; the second one is the location of the files you want to put into your archive.

# Get the archive out of the Android device onto your Linux machine (or is it macOS?)

`adb pull /data/local/tmp/archive.tar.gz .`

# Extract the archive into your current directory

`tar xvf archive.tar.gz`

# Delete the archive off the Android device

`adb shell "rm /data/local/tmp/archive.tar.gz"`
> 0 votes

---
Tags: adb, shell
---


# Question
Title: Can android studio emulator run without `adb`?
I want to run android-studio emulator without having an `adb`.

On running the emulator It checks for the `adb.exe` using `ANDROID_SDK_ROOT` environment variable and exits if there is no valid one(valid one = having an `adb`).

How to run the emulator without having the `adb`? Is there a command enabling running the emulator without the `adb` or something like that?

# Answer
The emulator's command line options don't include anything for working without adb, and several options implicitly assume adb will be in use. I suspect, though I don't know for sure, that Android Studio uses adb to communicate with the emulator.

It looks as if you'll need to change the emulator to run it without adb.
> 0 votes

---
Tags: adb, android-emulator
---


# Question
Title: How to connect 2 smartphones via WiFi Direct ADB to get the 1st to control applications run on the 2nd?
How to connect 2 smartphones via USB to get the 1st to control applications running on the 2nd?

I don't mean the connection to be limited to screen mirroring or off-lione file transfer only.

I need 1st smartphone to control applications running on 2nd smartphone in interactive mode, exactly as I can control applications run on Android board connected to PC via USB cable.

Ok, OTG and host mode supported since modern smartphones intended to work in parallel.

Another related question: How to start an application using android ADB tools?

A couple of examples:

```
adb shell am start -a android.intent.action.MAIN -n
com.android.settings/.Settings

```

will launch Settings, and

```
adb shell am start -a android.intent.action.MAIN -n
com.android.browser/.BrowserActivity

```

will launch the Browser. If you want to point the Browser at a particular page, do this

```
adb shell am start -a android.intent.action.VIEW -n
com.android.browser/.BrowserActivity http://www.google.co.uk

```

*From: How to run (not only install) an android application using .apk file?*

follow-up 2

connected my 5.0.2 Android smartphone to 4.0.2 Android tablet via microUSB2USB cable inserted into OTG USB2micxroUSB to get microUSB on both hands Enabled usb debugging on both devices, run adb daemon on port 5038 on smartphone. None device connected, no TCPIP established In programming mode I need to select debugging app on tablet: one suggested by default is: com.android.partnerbrowsercustomizations.example other option is None Should I select the above or install one another, called ???

# Answer
This looks like part of your answer: install the Termux app, and then adb to run within it. I have not tried this yet.
> 0 votes

---
Tags: adb, usb-debugging, wifi-direct
---


title: ADB ls doesn't sort by name

text:
# Question
Title: ADB ls doesn't sort by name
Why ls in adb shell doesn't sort by name?

Here is what I am getting in adb shell:

```
AccuWeather apkfiles.com.apk.tar
Amazon Shopping apkfiles.com.apk.tar
GO Weather EX V5 apkfiles.com.apk.tar
Hulu V2 19 2 apkfiles.com.apk.tar
Letgo V1 2 apkfiles.com.apk.tar
Netflix apkfiles.com.apk.tar

```

and where is what I am getting on Ubuntu desktop:

```
aarddict.android_26.apk_d.tar
AccuWeather apkfiles.com.apk.tar
Amazon Shopping apkfiles.com.apk.tar
com.aa.generaladaptiveapps-v1.3.3-41-Android-4.0.apk.tar
com.adobe.reader-v15.2.2-124075-Android-4.0.3.apk.tar
com.amaze.filemanager_18.apk_d.tar

```

# Answer
The `ls` command you run in the adb shell is provided by the Busybox (or Toybox) package *on the device*. The `ls` command you run on your Ubuntu machine is provided by Ubuntu Linux. They are not the same program, so they can have different behaviour.

The on-device commands are designed to be useful while taking up as little of the device storage as practical, because they're on every device, but the vast majority of Android users never know of them, let alone use them. The Linux commands are intended for people who use the Linux command line, which is a high percentage of Linux users. It's far more acceptable for them to have a wide range of options and take up disk space.
> 2 votes

---
Tags: rooting, adb, shell
---


# Question
Title: Phone is plugged into computer via USB, charging but not entering adb mode
I am on Linux, so this is not a driver problem. I have a Huawei Union, USB Debugging is enabled in developer options, and I have previously been able to use ADB when the device is plugged in via USB. The phone displays, "USB debugging is on" in the notification tray, and ADB just works. Now, when I plug in the phone, the phone does not show this notification and `adb devices` shows nothing. Is this a problem with my USB cord or one of the ports on the devices? Because it worked just fine when I got all three parts (the laptop, the phone, and the cord) two weeks ago.

# Answer
> 0 votes
Are you using the usb cable that came with your device? Check another usb port on the laptop, reboot the laptop if another port doesnt work either. If that does not help, check another usb cable. Good luck.

# Answer
> 0 votes
USB debugging on Linux works far better if the adbd deamon is running as root. Try these commands:

```
adb kill-server
sudo adb start-server

```

---
Tags: adb, linux
---


title: Change default camera to USB camera

text:
# Question
Title: Change default camera to USB camera
I'd like to know how to change the default camera on Android to a USB camera, I'd like to use my webcam to authenticate QR codes, but with emulator, the camera doesn't start, I can only get video through a USB camera (v4l2)

>

I'd like to make WhatsApp recognize a USB camera.

# Answer
Unfortunately, WhatsApp only has access to camera id 0 and 1 (main rear camera and main front camera respectively). Further, the part where it scans QR code for Linked Devices it only uses camera 0 i.e. the main rear camera.

In short, the only possible way is to fake your external USB cam as camera 0 which is pretty hard (maybe build Android from source after making the necessary changes?) and since that's not my area of expertise, can't help further.
> 0 votes

---
Tags: whatsapp-messenger, usb, camera
---


# Question
Title: Cannot log in after disabling Android package from TWRP or with ADB
I have Google packages on Android disabled for security. Today I enabled the Play Store, Framework, and other stuff and now I can't log in to Android without restarting. I can't remove the package using ADB because it is unauthorized, as I can't log in.

I am rooted and disabled these Google packages. Enabling them seem to restart the phone at login (after you enter the password)

I can get into TWRP recovery, but it doesn't support the `pm` command-line tool.

I need to disable these packages.

# Answer
> 4 votes
Answering my own question. If you have a package that is crashing or restarting at boot, you can disable it by using a recovery shell from TWRP. You can disable packages by editing the `/data/system/users/0/package-restrictions.xml` file and add `inst="false" stopped="true" nl="true"`inside the XML line of the package that is causing the trouble.

---
Tags: twrp, disable-app
---


# Question
Title: How to make a phone locks automatically when seeing someone's face?
I just want to ask if is it possible to make my phone lock when it sees person A's face. It's reverse to unlocking my phone.

It should work on all screens, whatever I'm doing, does that mean the camera is always accessed?

# Answer
I'm not completely certain. I would think it would be theoretically possible, but it would greatly reduce your phone's usability and battery life. If you just bring up a barcode scanning app and notice how things slow down, I suspect a face locking app/service would be even slower. Also, you would probably have to be viewing the phone from a pretty wide angle so it wouldn't lock when seeing your face. It would also likely interfere with any video meetings or other camera based apps you wanted to use.
> -1 votes

---
Tags: security, lock-screens, face-unlock
---


# Question
Title: Is there any way to control per-device audio balance?
Device: Android 12, Pixel 6 Pro

I recently got a new Pixel 6 Pro and loved it so far, but the earpiece speaker seemed a little quiet to me, so i went into Accessibility settings and changed the audio balance.

Problematically, this also alters balance for Bluetooth headphones, Android Auto, ...

Is there any way through an app or natively that allows me to control balance just for my **phone's** speakers?

Thanks!

# Answer
> 1 votes
I found a solution! With **Wavelet** on Legacy Mode, you can control EQ, balance, and limiter per device.

Works flawlessly and only affect the phone's speakers!

---
Tags: audio, google-pixel, android-12, equalizer
---


# Question
Title: How to retrieve my voicemail messages to audio files?
I want to download a backup of my voicemail messages to mp3 (or any other audio format), but I don't know how to do so.

My scenario is the following:

I received several voicemail messages during the last few months, and now I want to download them for a personal backup.

My voicemail app (built-in from the factory. Samsung galaxy A10) gives me the option to listen to these audios but does not give any option to download/archive/save/forward to these messages.

On my carrier website (Orange in France), I'm able to retrieve (and download) only the last 15 days' messages. They keep the listened messages just for 14 days (30 days for the not listened ones).

I've tried to use third-party apps to download my messages (e.g., "voicemail saver" that is paid and "visual voice mail & missed call alert" that is free), but none of these apps worked to recover these messages.

My question is: since I can listen to these messages, I'm sure they are stored somewhere. So how can I retrieve them?

# Answer
> 1 votes
I assume the apps you have tried are working like call recorders, but as far as I know call recording no longer works on recent Android versions. On modern mobile networks everything is IP as well, but I don't think you can use that interface to access the voice messages this way, as this interface is not public and thus not accessible for you.

The only way to directly download those message is the web interface of your mobile network provider, but as you told us this way does not work.

As you have still access to the voicemail messages via phone the following two options are available:

1. Use your SIM card in an older Android phone (best Android 7 or older) and try a working call recorder app or one of your voicemail saver apps. On those older Android versions they should work.
2. Play back the voicemail on your phone and place a microphone next to the speaker to record it. The microphone can belong to a second smartphone, a PC or any different other (digital) recording device.

# Answer
> 1 votes
Could you physically save them in a analogous manner?

You know, record them with another device whilst playing them from your phone.

---
Tags: samsung, backup, voicemail
---


# Question
Title: How do I get rid of the Read More feature in Outlook?
I am using Outlook 4.2222.2. A few updates ago, it started adding a Read More button about midway through long emails.

I now have to hit Read More to continue, which takes me to a spot in the app where I have to hit the X to get back to the reading pane (and therefore can't move the email to another folder, etc. without exiting).

I searched through the app's settings and did not find one that allowed me to disable it, and a Google search left me with the impression that not many had encountered this feature at all.

How do I turn it off?

# Answer
> 1 votes
It is better if you use the browser, unfortunately there is no option that will remove that button. Your best bet would be to change your mailbox settings. Try to see if you can make your mailbox text size smaller, then go to see if there are options, you can try changing message height to large, also below there are settings saying how should rows be aligned, set it to switch between one and multiple rows based on screen size. You may have to play around with those settings. If none of those options work, go to your settings and make your global text size for all apps smaller. That's what I did for my phone.

---
Tags: email, outlook
---


# Question
Title: How can I increase the maximum stack size of notifications in the notification tray?
So my current phone is a Samsung Galaxy S21. I receive a LOT of push notifications, by choice. The problem is, when I receive those push notifications for, say, Twitter, the number of notifications that are displayed in a single "stack" in the notification tray CANNOT exceed 24; once the stack reaches 24 notifications, I do not receive any further push notifications for that app. This is a HUGE issue when I'm trying to keep track of a big Twitter thread or watch for an important email. My previous phone, a Galaxy S8, had a maximum notification stack size of 40, after which the same issue occurred; this leads me to believe that there is some variable SOMEWHERE that can be changed to increase or decrease the stack size.

Just to clarify, since Google brought up similar questions but no relevant answers:

* I am **not** referring to the notification *badge* displayed on the app icon on my home screen; I am referring to the notifications *in the notification tray* viewable by swiping down from the top of the screen. Image attached to show what I am talking about.
* This issue is not app-specific; all apps seem to have a stack size of 24, whether it's Twitter, Gmail, YouTube, a game, or whatever. Each app DOES have its own stack, but each of those stacks can only go up to 24 notifications.

I have checked every setting I could access on my phone; none of them changed anything relevant. If there is ANY way to change the stack size, even if I have to manually dump my phone's kernel to my PC and use a hex editor to change the relevant bytes, I will do it.

Thanks in advance.

# Answer
> 0 votes
There is no option is on any phone that allows you to do that, sorry.

---
Tags: samsung, notifications, push-notifications
---


# Question
Title: Why is the Google Play Store showing wrong app sizes?
Since recently, the Google Play Store is showing different app sizes when downloading updates. The displayed size of the update is X but the downloading size (of the se update) is slightly greater than X.

For example (see attached screenshots):

* Messenger (FB): 44 MB -- 25% of 46 MB
* Microsoft Teams: 37 MB -- 29% of 39.01 MB
* Spotify: 34 MB -- 32% of 36.10 MB
* Uber: 49 MB -- 22% of 51.00 MB
* etc., etc., for every other update

Is this a recent bug in the Google Play updater?

Or might it be an indication that I have a virus or spyware installed on my phone?

> ..

Some more examples, comparing the size in MiB to the size in MB, as @Robert suggested in his answer:

>

My main question is: Does anyone else has this issue on their Android phone?

# Answer
The Play Store seems to use MiB (1KiB = 1024 bytes) but displays like Windows "MB" as unit. The download size seems to be measured in MB (1KB = 1000 bytes).

```
44 MiB = 45,056 KiB = 46,137,344 bytes = 46,137 KB = 46 MB

```
> 6 votes

---
Tags: google-play-store, android-11, oneplus-6
---


# Question
Title: How to install my own CA (Certificate Authority) root on Samsung S22?
S22 with Android12 here. I am trying to install a root CA so that I could access my internal websites using HTTPS. I seem to be having unexpected trouble doing that.

So far trying to do it by going: Settings/Biometrics.../Other.../Install from device storage/CA Certificate/Install Anyway

* First off, when I copy certificate to internal storage, it is not visible to said installer until I reboot the phone. Annoying, but oh well, I only do it once
* Once this installer sees the cert, it will not import it. "Private key required to install certificate" toast will pop-up after that.
* Exactly same happens when I try to click on certificate in 'Files' app and choose "Certificate installer"

I tried to use following formats:

* cer
* pem (basically cer file renamed to pem)
* p12 or pfx (same file, rename) - it asks me for password but unable to decrypt
* pem/cer containing not only a CA root, but also a device certificate signed by said CA root and it does have private key

Phone not rooted

One thing I never tried and will not try is to export CA certificate with private key (phone has no business knowing CA's private key).

Any ideas?

# Answer
Solved: certificate installation worked using "Install from device storage" when I placed cert into "Downloads"
> 1 votes

---
Tags: samsung, android-12
---


# Question
Title: name resolution on samsung s22 device does not find local host using full name
S22 Android 12 device here.

I have my own DNS server on a local network. Phone seems to pick up local DNS, but it will not address devices using fully-qualified name. Example (in adb):

```
g0q:/ $ ping nas.mydomain.local
ping: unknown host nas.mydomain.local
2|g0q:/ $ ping nas
PING nas.mydomain.local (10.1.1.26) 56(84) bytes of data.
64 bytes from 10.1.1.26: icmp_seq=1 ttl=64 time=2.41 ms
64 bytes from 10.1.1.26: icmp_seq=2 ttl=64 time=13.4 ms
64 bytes from 10.1.1.26: icmp_seq=3 ttl=64 time=10.7 ms
64 bytes from 10.1.1.26: icmp_seq=4 ttl=64 time=16.1 ms

```

Same is happening in firefox and other apps. I can access host via https://hostname, but not https://hostname.mydemain.local. Anyone knows what magic is happening here and how to turn it off?

UPDATE: what I suspect might be happening is that `.local` domain seems to have a special meaning. I am not sure what is different in Samsung implementation, since GrapheneOS (also based on android 12) handles these hostnames fine. If someone has any suggestions how to disable this feature, please let me know

# Answer
> 0 votes
The reason indeed was that domain ended with `.local`. I configured several servers to use `.home` domain name, issues them new certs, and they work resolving properly.

---
Tags: dns, android-12, private-dns
---


# Question
Title: How to verify Samsung/Android firmware files - has Samsung published MD5/SHA256 hashes?
I've soft-bricked my Samsung Galaxy A40FN running Android 9.0 Pie while attempting to disable bloatware via ADB and I'm currently searching for a solution to recover my data and get the system back running. The phone is stuck in a boot loop, but I can get into recovery mode and download mode.

FRP lock is off (no Google account registered on this device) and I didn't activate any encryption on my part.

I didn't try wiping/factory-resetting yet as I need to rescue my data first. One possible solution for this could be to flash the original firmware using Odin while leaving the `/data` folder untouched:

Question: Does anyone have experience with retaining personal data during a firmware flash and know how to verify the authenticity of the files downloaded from unofficial sources such as SamFW?

I.e. does Samsung publish **MD5 hashes** of official firmware updates and would comparing these hashes/checksums be a reliable method to verify that the files have not been tampered with, considering that firmware files are typically 4-5 GB large?

# Answer
> 1 votes
Okay, I can answer my own question: You can download firmware files directly from Samsung using open-source tools such as SamLoader.

---
Tags: rom-flashing, unbricking, malware, device-firmware, odin
---


# Question
Title: Soft-bricked A40 after uninstalling apps ADB
I may have just messed up my smartphone and really need your help. I wanted to get rid of some of the bloatware on my A40 and read online that one can actually uninstall many apps via the Windows command line. So I looked up a list of apps supposedly safe to remove and ran a batch file to uninstall them. This is as far as I got:

```
a40:/ $ pm uninstall --user 0 com.sec.android.app.samsungapps
Success
a40:/ $ pm uninstall --user 0 com.samsung.android.app.camera.sticker.facear.preload
Success
a40:/ $ pm uninstall --user 0 com.sec.android.mimage.gear360editor
Success
a40:/ $ pm uninstall --user 0 com.samsung.android.smartmirroring
Success
a40:/ $ pm uninstall --user 0 com.android.htmlviewer
Success
a40:/ $ pm uninstall --user 0 com.sec.android.provider.badge
Success
a40:/ $ pm uninstall --user 0 com.android.sharedstoragebackup
Success
a40:/ $ pm uninstall --user 0 com.samsung.android.app.simplesharing
Success
1|a40:/ $ pm uninstall --user 0 com.samsung.android.themecenter
Success
a40:/ $ pm uninstall --user 0 android.autoinstalls.config.samsung
Success
a40:/ $ pm uninstall --user 0 com.sec.enterprise.mdm.services.simpin
Success
a40:/ $ pm uninstall --user 0 com.samsung.android.stickercenter
Success
a40:/ $ pm uninstall --user 0 com.sec.android.mimage.avatarstickers
Success
a40:/ $ pm uninstall --user 0 com.samsung.android.knox.analytics.uploader
Success
a40:/ $ pm uninstall --user 0 com.sec.enterprise.knox.cloudmdm.smdms
Success
a40:/ $ pm uninstall --user 0 com.samsung.android.app.camera.sticker.stamp.preload
Success
1|a40:/ $ pm uninstall --user 0 com.sec.factory.cameralyzer
Success
a40:/ $ pm uninstall --user 0 com.samsung.android.sdk.handwriting
Success
a40:/ $ pm uninstall --user 0 com.sec.android.app.fm
Success
a40:/ $ pm uninstall --user 0 com.sec.enterprise.knox.attestation
Success
a40:/ $ pm uninstall --user 0 com.samsung.android.mdm
Success
1|a40:/ $ pm uninstall --user 0 com.sec.android.widgetapp.samsungapps
Success
1|a40:/ $ pm uninstall --user 0 com.samsung.android.app.spage
Success
1|a40:/ $ pm uninstall --user 0 com.samsung.android.drivelink.stub
Success
1|a40:/ $ pm uninstall --user 0 com.wsomacp
Success
1|a40:/ $ pm uninstall --user 0 com.samsung.android.game.gametools
Success
a40:/ $ pm uninstall --user 0 com.samsung.android.game.gos
Success
1|a40:/ $ pm uninstall --user 0 com.dsi.ant.sample.acquirechannels
Success
a40:/ $ pm uninstall --user 0 com.dsi.ant.service.socket
Success
a40:/ $ pm uninstall --user 0 com.dsi.ant.server
Success
1|a40:/ $ pm uninstall --user 0 com.android.egg
Success
a40:/ $ pm uninstall --user 0 com.sec.android.easyonehand
Success
1|a40:/ $ pm uninstall --user 0 com.sec.android.app.launcher
Success
a40:/ $ pm uninstall --user 0 com.samsung.android.mateagent
Success
1|a40:/ $ pm uninstall --user 0 com.samsung.android.app.watchmanagerstub
Success
a40:/ $ pm uninstall --user 0 com.sec.android.daemonapp
Success
a40:/ $ pm uninstall --user 0 com.samsung.android.app.social
Success
1|a40:/ $ pm uninstall --user 0 com.samsung.android.wellbeing
Success
a40:/ $ pm uninstall --user 0 com.samsung.android.da.daagent
Success
1|a40:/ $ pm uninstall --user 0 com.android.bips
Success
1|a40:/ $ pm uninstall --user 0 com.samsung.android.authfw
Success

```

Right before that, I had moved apps related to "Knox" and "MDM" and everything seemed fine. But even while the last commands were running, the "desktop" disappeared (the home screen with all my app shortcuts) and some kind of "busy notification" was running instead (I think it said something like "starting up apps" or "launching apps"). But the phone didn't reboot, it just seems that the homescreen had crashed. I then noticed that I might have slipped in apps for deletion that I actually needed or was using, such as

```
com.sec.android.app.launcher
com.samsung.android.wellbeing

```

Since the phone seemed to be stuck in this "busy loop", I decided to restart it by long-pressing the power button and selecting restart. But from this point, the phone wouldn't restart and got stuck in a reboot loop, where only the Samsung logo pops up, followed by a short vibration pulse, then reboot etc.

At this point I panicked and started searching online for solutions (which also brought me to this forum). I've read about using OEM unlocking, firmware-flashing using Odin, Samsung Tool Pro, TWRP etc. but quickly got lost in the woods and didn't want to risk breaking things more.

There are log files I can access from the boot menu which might contain a lot of useful information regarding the cause of the problem, but it's way too much to type it:

```
/cache/recovery/last_log
/cache/recovery/last_kmsg
/cache/recovery/last_history
/cache/recovery/rescueparty.log
/cache/recovery/last_avc_msg_recovery
/cache/recovery/last_log.1
/cache/recovery/last_kmsg.1
[...]
/cache/recovery/last_log.9
/cache/recovery/last_kmsg.9

```

Is there a way I could somehow read these log files via a USB connection? For example, in *rescueparty\_log*, there is some "serious-sounding" stuff:

```
!@*** FATAL EXCEPTION IN SYSTEM PROCESS: main
java.lang.RuntimeException: There must be exactly one installer; found []
?at com.android.server.pm.PackageManagerService.getRequiredInstallerLPr(PackageManagerService.java:4422)
?at com.android.server.pm.PackageManagerService.<init>(PackageManagerService.java:3954)
?at com.android.server.pm.PackageManagerService.main(PackageManagerService.java:2856)
?at com.android.server.SystemServer.startBootstrapServices(SystemServer.java:985)
?at com.android.server.SystemServer.run(SystemServer.java:762)
?at com.android.server.SystemServer.main(SystemServer.java:762)
?at java.lang.reflect.Method.invoke(Native Method)
?at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
?at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:945)
Error reporting crash
java.lang.NullPointerException: Attempt to invoke interface method 'void android.app.IActivityManager.handleApplicationCrash(android.os.IBinder, android.app.ApplicationErrorReport$ParcelableCrashInfo)' on a null object reference
?at com.android.internal.os.RuntimeInit$KillApplicationHandler.uncaughtException(RuntimeInit.java:144)
?at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1068)
?at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1063)
?at java.lang.Thread.dispatchUncaughtException(Thread.java:1955)

```

Also, some more information from the boot screen output:

```
Android Recovery
samsung/a40eea/a40
9/PPR1.180610.011/A405FNXXU3ATA4
user/release-keys

#Reboot Recovery Cause is [system_server:7340 RecoverySystemRescueParty]#
Support SINGLE-SKU

Block-Based OTA
Supported API: 3

MANUAL MODE v1.0.0#

```

Is anyone perhaps familiar with this problem and knows of a way how I could get the phone to start up properly, so I can at least recover all my personal data?

My impression is that I might have deleted some important system app, since the problem occurred right in the middle of the uninstall process (see shell history above), and I'm a little bit hopeful that maybe it's possible to just reinstall it somehow. I haven't tried the "Wipe data/factory reset" option in the boot menu as I don't want to lose all my data.

Thank you so much for your help, any advice is super-appreciated!!

### Update/additional information:

...from the downloading mode information text:

> ***FRP LOCK: OFF***

> *OEM LOCK: ON(L)*

> *Secure Download: Enabled*

Also, I never registered a Google account on this device.

# Answer
encryption is hardware-backed therefore userdata can decrypted on device itself only. to get adb access you need combination ROM + DID token.
Still userdata is not accessable unless device is unlocked/decrypted with lock screen credentials (might not possible from adb in current boot state).

Factory reset device from recovery and unlock FRP with samsung or google account afterwards.

Next time backup your important data before trying to disable system apps
> 1 votes

# Answer
I'm proposing a possible way to solve this issue.

There is an interesting comment below the answer to Can system apps be enabled/disabled directly from the filesystem? :

***"It is also safe to simply remove the package-restrictions.xml file — a new 'clean' file will be recreated on next reboot."** – ccpizza Oct 3, 2021 at 16:43*

As far as I understand, Android 9.0 switched from Full-Disk Encryption (FDE) to File-Based Encryption (FBE), which means that encryption is done on a file-by-file basis by default.

If it's possible to locate `package-restrictions.xml` on the internal storage, deleting the file (instead of modifying its content in order to restore individual app settings) will cause the stock version to be restored on the next reboot. Any problem due to a prior misconfiguration of `package-restrictions.xml` by `pm uninstall` will then be magically gone.
> 1 votes

---
Tags: adb, samsung, boot-loop, unbricking, system-apps
---


# Question
Title: Exclamation mark in red box on top of the screen with white lines on both sides
I have a Samsung Galaxy S10 5G and my Android version is Android 11. While using one of the regular apps that I use every day, I noticed that a red box with an exclamation mark inside appeared on the top of the screen.

Also, two lines on both sides of the screen appeared and they rotate with the screen. I don't understand how this issue started it just came from nowhere.

Please advise what to do. By the way, the box and the two-line do not appear on the lock screen.

# Answer
Your 'Switch-Access' in accessibility is activated. Go into settings and deactivate it & the red box with an exclamation mark will go away. I dont know off hand exactly where in settings they are but you can search for it as soon as you pull up settings by tapping the search bar. My accessibility settings menu is always available at the bottom corner of my screen. I set it that way in settings. The exclamation box only appears for me when 'Switch-Access'is activated.
> 1 votes

# Answer
Step 1: Setting - Apps & Notification - All apps - Android Accessibility Suite - Force stop. In case if it doesn't work then restart the device in Safe mode and repeat "Step 1".

Good luck! (Y)
> 0 votes

---
Tags: screen, samsung-galaxy-s, android-11, samsung-galaxy-s-10, overlay
---


title: How can I control volume of Zoom app?

text:
# Question
Title: How can I control volume of Zoom app?
I have installed official Zoom app for my Motorola One / Android 10.0 to be able to join meetings directly from my mobile phone as an alternative to the regular PC connection.

However, I have each call very loud and I cannot control volume in any way:

* I have both *Media volume* and *Call volume* set to 0 (mute?) and still can hear Zoom call's audio (and still can hear it very loudly)
* Changing any of these two params does not change Zoom's volume even a tiny bit.

What am I missing? Is this some kind of bug? **How should I control1 call volume in Zoom app for Android**?

I understand (correct me, if I am wrong) that:

* *Call volume* is specific to Phone app only and to an actual over-the-phone calls / cellular networks' calls
* *Media volume* should control in-media volume of all apps so this would mandate (?) Zoom's in-app audio call's volume as well

If I am correct then the good question is, why any of these two working?

Of course, I have this problem in Zoom app **only**. Phone's volume buttons are working correctly. All other apps responds to *Media volume* correctly and I can control any other aspect related to volume in my phone without any problems. Zoom only seems to be the exception here.

1Note that I am talking about controlling / decreasing volume of Zoom calls. I am aware of this question and mine isn't a duplicate. I don't want to *disable* the Zoom meeting's totally (I know how to disconnect audio out of any Zoom meeting). I just want to make it a way, way lower. Because right now I have to keep my headphones on my chins, at least 5-10 cm from my ears to not get deaf.

# Answer
I figured out that it is a bug in Zoom app.

## Alternative connection methods

Uninstall Zoom app and:

1. Use browser call-in feature on your mobile browser, if that's an option in your company.
2. Use call-in feature. You can't see video this way, but at least you can participate in meetings without destroying your ears and boiling your brain.

I use mobile device for participation in Zoom calls at a very rare basis. The most times I use PC to be able to share my computer screen. So both options work in my case (i.e. I don't need Zoom app as it turned out).

## Physical volume control

Get a new headphones or extend your existing ones with any kind of solution that allows you to use physical volume control (irespective of volume control in your phone, which is not working in case of Zoom app):

1. Get a cable with such element, if your current headphones supports detaching and replacing audio cable:

2. Get an extension cable to your existing headphones cable that does pretty much the same:

3. Get a new headphones with volume control built-in:

In my case the first option was a dream come true, not only with Zoom app, but in many other scenarios. You can get cables like that for a 1-2 USD on Alibaba or Aliexpress, so I've got ten of them in one package (assuming that half will be DoA which turned out to be not true).
> 1 votes

---
Tags: volume-control, volume, zoom-cloud-meetings
---


title: Silence all notifications by default

text:
# Question
Title: Silence all notifications by default
How can I silence all notifications by default on Android 12 without resorting to DnD?

I just replaced my old phone (Google Pixel 4a, same as the old one) and restored everything from backup, but sadly the notification configuration has not been restored and the phone is beeping like there's no tomorrow.

I only need sound if someone calls me on the phone or some other app like WhatsApp. Other notifications should be silent.

I don't want to use DnD which I use by night when I don't want any ringing sounds either.

It seems to me I need to silence each individual app, but there are like 100 of them. I want the default notification to be silent and then be able to turn on sounds for WhatsApp e.g.

# Answer
> 3 votes
Depending on the device model, Android version, and custom ROM, there may be a built-in setting to set the default notification sound. The default option may include "no sound", or otherwise preparing an audio file with no sound may be an alternative workaround.

For the Google Pixel series, Android 12 particularly: Settings - Sound & vibration - Default notification sound. Inside "My Sounds", choose "None".

---
Tags: notifications, settings, audio, android-12
---


# Question
Title: Is it possible to dump the internal storage of an unrooted, boot-looping Android 9 with locked bootloader?
Is it possible to dump the internal storage of an *unrooted*, *boot-looping* Android 9 with *locked bootloader* via USB or to SD card, e.g. using some firmware tool in download or recovery mode?

If YES, what is the procedure, and if NO, how **exactly** does Android prevent read access while simultaneously allowing full read & write access in download mode (= required for flashing/updating firmware files)? Shouldn't it be possible to read out data *from* disk if it's possible to write data *to* disk?

# Answer
What all Samsung devices have in common, download mode (fastboot) has been replaced with proprietary Odin protocol.
Benjamin Dobell (author of Heimdall) has reverse engineered Odin Software, or at least some parts of the protocol by sniffing libusb traffic. I remember that Heimdall can read the PIT from device. So my assumption is there may exist secret commands not yet discovered. If Samsung call the firmware flashing process "Download", then what you're looking for is "Upload" aka read back data off the device. Feeding search engine with some keywords give this answer:

There exist a Heimdall based S-Boot Dump that uses the Exynos exploit SVE-2019-15230 (discovered by Alexander Tarasikov) to dump memory (RAM?) off the device in UPLOAD\_MODE.
The vulnerability has been fixed, but there exist other causes (and maybe secret command?) that will switch from download into upload mode.

you can read step by step tutorial here
https://hexdetective.blogspot.com/2017/02/exploiting-android-s-boot-getting.html
> 0 votes

---
Tags: rooting, boot-loop, bootloader, usb-debugging, usb-connection-mode
---


# Question
Title: Back up officially purchased app as APK (no root)?
Version: Android 11

Context: The app has been de-listed from the Play Store but I have the app installed from an official purchase. I want to move the app to another device.

---

I found this related thread but it requires rooting and the "AppMonster" app linked in the accepted answer is no longer available. The discussion also pertains to a very old Android version.

Is there a newer method available without rooting? I don't want to void my warranty just yet.

# Answer
There are plenty of app-based solutions available specialized on this (also some file managers like Amaze mentioned in Robert's comment on your question cover this as well) – or you could simply use .

If you're on Linux (Mac or Cygwin should work as well), my tool Adebar has a fitting script in its `tools/` directory which can even deal with split APKs, watch out for `getapk`: when called without parameters it gives you details on its syntax. The script can extract single APKs, or APKs of all system or user-installed apps at once.
> 1 votes

# Answer
I used the SuperBackup app which I had many moons ago and I remembered it had the ability to backup installed apps as APK.

When I backed up the de-listed app, it said along the lines of "APK saved but has no user data because your device is unrooted". I went ahead anyway and installed the APK on another device and logged in with the same Google Account I purchased it with as previously suggested.
> 2 votes

# Answer
Install MiXplorer (https://forum.xda-developers.com/attachments/mixplorer\_v6-58-4-api29\_b22020920-apk.5532509/) and then follow these steps.

1. Open MiXplorer
2. Press on the three lines (top left)
3. Click on the App category.
4. Press the User App at the top
5. Locate the APK containing your app
6. Copy it to the internal storage/SD Card category
7. Upload it to the cloud in a web browser or the service's official app. (e.g. Google Drive, OneDrive)
> 1 votes

---
Tags: backup, apk
---


# Question
Title: Issue with FTP over hostapd hotspot and specifically an Android client using ProFTPD
So I have been using this setup with an iPhone quite successfully.

The "server" box is running Fedora 34, on which is installed ProFTPD. I went through and configured through the visual client the firewalld zone to allow the FTP service through, I even disabled the firewall to check.

I have an Android phone which is a tad aged. It's using Android version 5.1. I try to connect via an Android client and via the Chrome browser in the usual manner.

Now, on my server machine, I opened up Wireshark and watched the hotspot interface. Sure enough, ARP hits "Who is 192.168.x.x", no problem, reports the correct MAC and IP addresses. The FTP request is visible. Even pinging the device from the server works. But for some reason, no response is being sent back from the server, and it's not because it's blocked. The connection just times out.

I note that this only seems to be happening when I use this Android phone, it's a ghost in the shell scenario for sure. I'm going to try a different phone, shouldn't matter right? Makes no sense that it should matter!

The local login of the server still works and there are no options regarding bind address, so I cannot assume it's that.

# Answer
Whatever the problem is it doesn't occur with this wonderful project on which I have not had ONE AP-DISABLED error occur or network drop thus far !

https://github.com/garywill/linux-router

Does the same thing with some extras and doesn't require tinkering with configuration files.
> 0 votes

---
Tags: networking, wifi-hotspot, ftp
---


title: adb device always unauthorized

text:
# Question
Title: adb device always unauthorized
I'm running Ubuntu 16.04

```
adb version
Android Debug Bridge version 1.0.32

```

However, when I plug in my devices for testing via ADB, I always get an unauthorized error.

```
adb devices

List of devices attached
LGD855a1098057  unauthorized

```

adb works flawlessly on Windows 7 x64 SP1 with Koushik Douttas Universal ADB driver and my friend's Macbook, this singles out the Ubuntu 16.04 as the problem.

Things I have tried:

* I tried revoking previous USB authorizations: nothing happened.
* Switching adb debugging on and off: however, the CLI just keeps telling me with the unauthorized error.
* Switching ports: each port on my 16-port development rig has been tried.
* Updating adb:

```
android-tools-adb is already the newest version (5.1.1r36+git20160322-0ubuntu3).
android-tools-fastboot is already the newest version (5.1.1r36+git20160322-0ubuntu3).

```

# Answer
Same problem here with exact same Linux Ubuntu version. The solution for me that works well is

1. `adb kill-server`
2. `sudo adb usb`

After this, your mobile will ask for authorization and work well. So, adb needs root privilege.
> 6 votes

# Answer
Kill the *adb* server if running:

```
adb kill-server

```

Remove `~/.android` directory with all its content:

```
rm -rf ~/.android

```

Don't forget to *Revoke USB debugging authorizations* in developer options on your Android device.

Start the adb server:

```
adb start-server

```

Search for devices:

```
adb devices

```
> 1 votes

# Answer
This worked for me:

* I revoked previous USB authorizations
* I killed and restarted the adb server using these commands:

```
adb kill-server
adb start-server

```
* I restarted the phone
* And ran `adb devices`

And the device didn't appear as unauthorized!
> 1 votes

---
Tags: adb, linux
---


# Question
Title: Can I create a file on Android similar to Windows that reads and processes commands?
In Windows, it is possible to use a "bat" file format that reads and processes written commands, such as a command to open the Windows Calculator (which you can also do via CMD).

Is this also possible on Android? If yes, which app and which Android command library can I use?

# Answer
> 1 votes
Since Android is a linux-based Operating System, it would be shell scripts (.sh) instead of batch files, probabiy run with sh, a bash like shell located in /system/bin/sh

To open applications using a shell script you ~~would need root access and~~ can use a terminal emulator like termux.

First of all, grant termux full storage rights

```
termux-setup-storage

```

To launch apps, you must write commands using Activity Manager

For instance, to launch calculater (I'm using Google Calculator for the guide) using a shell script in android, the procedure would be this

1. Create a file eg calc.sh in /storage/emulated/0 ie the user-accessible part of your internal storage, with the following content

```
#!/system/bin/sh
am start com.google.android.calculator/com.android.calculator2.Calculator

```
2. Open Termux

```
cd /storage/emulated/0
sh calc.sh

```
3. The calculator should launch

Bonus: You can also execute commands on android using your PC via ADB

# Answer
> 0 votes
Use a terminal emulator like Termux to run shell scripts.

---
Tags: applications, terminal
---


# Question
Title: Why does the internet connection lag when I hold the phone in a specific way?
I want to know what's really at play between my smartphone, Android 11, and my holding has to do with loading content.

By "loading content", I mean when I enter a search term in Chrome, when I open YouTube, to Chrome loading the search results, to the search result I click on, going to the web page. Once on the web page, the content loading just trying, trying, trying to load.

It takes a noticeable time to complete the loading, which sometimes doesn't load at all until I sit the phone down like a table or anything really, out of my hands, off of my lap when I'm sitting, not touching the phone, and bam, the content loads almost immediately.

It's happened so much that I took notice of it, now I want to know what's really going on here.

# Answer
Humanoids (that's you... and maybe even me) are made of materials that are fairly effective at blocking (absorbing) radio signals of many different wavelengths and frequencies.

To transmit and receive data via radio waves (such as by WiFi and mobile data), your phone uses at least one antenna. When you place your grubby paws over an antenna, your extremities restrict - to a degree - effective transmission/receipt of radio waves.

When I get any new phone, I always determine where the antennas (and microphone(s)!) are located within the device so I don't accidentally block them with as I hold the device.

A *"pro tip"* I discovered years ago is to keep a short, but wide, round glass cup where you often use your phone. When you need a better connection, place your phone in the empty glass cup. This will keep your hands off the phone while providing a stand that may actually improve reception just a bit. This technique has worked well for me for quite a few years.
> 1 votes

# Answer
Try turn off Experimental QUIC Protocol by navigating to chrome://flags/#enable-quic and disable it from the dropdown.
> 0 votes

---
Tags: hardware, internet
---


title: How to clone an app in 2022?

text:
# Question
Title: How to clone an app in 2022?
So, I tried to clone an app but it didn't work. My goal is to have an application with 2 different versions installed on the same smartphone, without using additional applications such as Parallel Space.

On the old version of the app, I was able to do it normally using Lucky Patcher(LP). But on the latest version of the app, I failed to use LP to clone the app. Then, I tried to kill signature verification before cloning, but that didn't work either. Then I tried killing signature verification using MT Manager and re-signing it before putting it in LP, but it didn't work either.

On LP, it shows the application has been cloned successfully. However when I open it, the app is like force close before fully opening. How to do it? Did I miss something?

# Answer
> 1 votes
Lucky Patcher tends to not work on newer apps. Your best option would be apps like Parallel Space or a phone/custom ROM with that functionality built-in.

# Answer
> 0 votes
It's resolved now. I have no idea why using LP sometimes it's not work on a specific app.

I used the APK Editor app to solve this problem. By going through killing signature verification and changing the package name a bit.

---
Tags: applications
---


# Question
Title: How to turn off debugging in Android 10. Menu is missing developer options?
I have a bank application that won't run because it says something about Android Bridge and debugging over USB or something like that. I would love to share the exact message but it flips on and off screen so fast it's hard to read and I could barely make the above out after trying to start it repeatedly.

I found these instructions which would seem to exactly answer my problem: https://docs.microsoft.com/en-us/mem/intune/user-help/you-need-to-turn-off-usb-debugging-android

However, there is no "Developer options" under the System settings. Is there maybe some setting to turn on advanced configuration options somewhere that would make it appear that I'm overlooking?

# Answer
> 1 votes
Samsung? There is a bug where the dev options are hidden but enabled.

> To unhide the Developer options menu:
>
> 1. Go to "Settings", then tap "About device" or "About phone".
> 2. Scroll down, then tap "Build number" seven times. Depending on your device and operating system, you may need to tap "Software information", then tap "Build number" seven times.
> 3. Enter your pattern, PIN or password to enable the Developer options menu.
> 4. The "Developer options" menu will now appear in your Settings menu. Depending on your device, it may appear under Settings \> General \> Developer options.
> 5. To disable the Developer options menu, tap the switch.

Samsung Support - How do I turn on the Developer Options menu on my Samsung Galaxy device?

Use another phone to take a video of the phone that has the problem. Then pause the video at the right moment and you can see the error message in all its glory.

# Answer
> 1 votes
Settings \> Build ops \> tap 7x, every time you tap that, it will give a toast "you are `n` times away from being a developer" \> final tap will show "you are a developer" \> Settings options `Developer Option` will be seen.

Note that for getting the full benefit of `rooting`, you will also need to enable `OEM unlocking` option.

---
Tags: usb-debugging, developer-options
---