# Question
Title: Device Unable to Boot, Error - mdtp image is corrupted
I am trying to install a custom on my Xiaomi Mi A2 Lite (first timer). However, I am facing a difficulty as my phone is showing me the error "Device Unable to Boot, Error - mdtp image is corrupted".

System I am using: Linux Mint 20.2

Things I did:

1. Downloaded TWRP and ROM file.
2. Unlocked the bootloader.
3. Booted into TWRP by running "fastboot boot twrp\*.img" in the terminal when fast screen appears on my phone. \[I tried out this command "fastboot flash recovery twrp\*.img" before running the above command, but failed and showed remote: partition table doesn't exist\]

\[So, it worked out well. However, I forgot to create backups\]

4. Wiped "Dalvik/ART Cache", Data, System, Internal Storage.
5. Went to "install" and tried to flash the zip file of the ROM. However, it gave an error. \[Probably, error 7, don't know what that mean\]
6. Then, tried to reboot and carry out the same process from the step 3, it gave me the error and I am stuck.

Now, I cannot do anything. Can you please help me out.

Thank You.

# Answer
flash vbmeta (if your device has verified boot) and disable verified boot before flashing custom recovery by the following command.

`fastboot --disable-verification flash vbmeta vbmeta.img`

(ofc get vbmeta img for ur device yourself)

then flash recovery using the following command

`fastboot flash recovery <recovery file name.img`

then try flashing rom, if still fails, flash vendor partition in twrp before flashing rom
> 0 votes

---
Tags: rom-flashing, custom-roms, fastboot
---


title: Keep Awake Not Actually Working

text:
# Question
Title: Keep Awake Not Actually Working
By enabling the *Stay Awake* toggle under *Developer Options*, which are enabled, my previous phone kept the display on when it was connected via USB. This no longer works on my current phone, which runs Android 11. *Developer Options* are enabled and the *Stay Away* toggle is on (Under it says: *Screen will never sleep while charging*) and my *Screen Saver* is also set to *Off*.

Despite these settings being enabled, the screen goes blank after a few minutes even when plugged in. There is another option, *Always On Display* which forces the screen to stay on at all times, even when not plugged-in, but that drains the battery very fast, so it is not practical.

Since I use the phone as one would an alarm-clock, I would like it to keep showing its lock-screen which shows the current time whenever it is connected via its USB-C port. Is there a workaround to restoring the expected behavior?

# Answer
> 1 votes
It turns out another option influences this behavior in Android 11and that is the `Default USB Configuration`. After selecting a specific USB Configuration (any other than `No Data Transfer`), *Stay Awake* behaves as it did in earlier Android releases.

@MorrisonChang provided a good hint in his comment because when plugged to a computer, *Stay Awake* did work as intended but not with a standalone charger, unless a `Default USB Configuration` is set.

---
Tags: screen, android-11, developer-options, sleep
---


title: WhatsApp contact's icon not showing

text:
# Question
Title: WhatsApp contact's icon not showing
I have WhatsApp installed on my HTC Sensation running Android 2.3.4 (Gingerbread). I also have other social contact related apps such as Google Voice, Facebook, LinkedIn, Twitter, etc. For my Google Contacts, it links each of these services up to the people in my address book.

When using WhatsApp, only a few of my contact's icons shows up for the screen with recent messages. When I view the contact in my address book, they have an icon (headshot) either from Google contacts, Facebook, or some other social service.

Why do only some of my WhatsApp contacts have icons showing? The other WhatsApp contacts default to an Android avatar. I've refreshed the WhatsApp contacts list and the problem still persists.

# Answer
Maybe you are talking about the contact picture. The contact picture is only visible if the user has specified it.

By default you can have contacts sync with all account but Profile pictures will not be sync'd in app. Each app may have different profile pictures.

Try this: go to `sdcard -> whatsapp -> profiles Pictures->`

Here you should see what and how many pictures are there. Only those will be shown in WhatsApp contact list.
> 1 votes

# Answer
Try to do as WhatsApp FAQ say, mainly (try other way on link too):

> you can use all your contacts, not just the "visible" ones. To do this:
>
> Go to the Contacts Help screen: From the main Chats screen, tap the pencil icon \> \[Menu Button\] \> Help Scroll down and tap the "Show Invisible Contacts" button If you have any invisible contacts, a checkbox will appear. Make sure that it is checked.

The "Contacts Help screen" is accessible by WhatsApp menu.

Doing so, my contacts that were invisible - that ones that use it and change its visualization are probably most of people that use avatars - become visible again.
> 0 votes

# Answer
Simply, Your phone is not giving ample space to Whatsapp. If that contact is stored on your sim card, move it to phone. In 2.2 to 2.3.6, we are a li'll helpless as it will not update automatically.

a li'll tech :

the contacts photos which are not being shown are those whose photo tag is not saved in your device.

Now just make sure that all tags are there in your phones contact list. Android automatically sets ph\_tag=FALSE if no contact photo is there and anything (any app) below Android 3.0 (API level 11) can not change the tag to TRUE.

So when whatsapp gets ph\_tag=FALSE against any contact, no space is allocated to it for saving a profile pic.

There may also be such issue that the Raw Contact is on SIM space and not in phone memory, hence it is not getting any space to save DP against that particular contact.
> 0 votes

# Answer
Found the issue. Uninstalled and re-installed Whatsapp solved the problem.
> 0 votes

# Answer
I recently have changed my place, basically, I moved out from my country. When I came to a new country, I got a new sim card and I saw that there were missing contacts on my WhatsApp. Even if I tried to refresh all contacts, did not work.

This is because I had not added my phone contacts with the country code. After then, I changed all my contacts with the country code prefix numbers. Then, it has worked. So, the WhatsApp icons came as well. This might be your problem.
> 0 votes

# Answer
Is the app up-to-date? If not, just go to the Play Store and update it.
> -1 votes

---
Tags: contacts, instant-messaging, whatsapp-messenger
---


# Question
Title: Is it safe to use a Temporary or Virtual Number for creating whatsapp account?
This article in link below mentions some web links and apps that can be used to generate temporary or virtual number, for creating whatsapp account

I want to know, whether this whole process is safe/secure or there any major apparent risks in this process?Such as collecting data from android phone(especially from confidential apps like banking apps) on which theses apps/links are opened for creating temporary or virtual phone number ?

https://mobiletrans.wondershare.com/whatsapp/how-to-use-whatsapp-without-phone-number.html

# Answer
> 1 votes
Since WhatsApp uses OTP authentication using your mobile number for login purposes , using one of those temporary number to create an account is not recommended if you want that account to be permanantly with you.

---
Tags: security, whatsapp-messenger, data-monitoring
---


title: How to root my tecno camonX CA7

text:
# Question
Title: How to root my tecno camonX CA7
How to root camon X (CA7) or application for root access. How can i get root access?

Whenever i try it root it, it keeps saying no root access

# Answer
> 0 votes
Dump `boot.img` with SP Flash Tool,
patch with Magisk,
Unlock bootloader,
flash vbmeta disabled, and
flash `boot`

---
Tags: applications, rooting, root-access, processes
---


# Question
Title: Can we consider Huawei phones as unrootable?
Huawei unlocking happened until 2018/05 by getting an unlock code on the manufacturer's website page1 and giving it as an argument to a `fastboot oem unlock`.

In 05/2018, Huawei simply stopped this service with a hardly believable "explanation" citing "customer experience":

Today, two years later, I did not even find any trace on the Huawei's website that this service ever existed.

My google searches shown that probably there is no way more to unlock (= to root) Huawei phones.

I think, some way still remains: the flash chip could be soldered out from the phone motherboard, and modified/rewritten externally. But it requires a well-equipped electronics lab and the company still has various ways to harden it (like building various signature checking in their SoC, which can be disabled only on un-documented ways).

The situation remembers me to the Apple mobile devices, where iOS is sold while users have no way to modify/remove it or gain root access. Thus, Apple can do with their devices as they want to - they can only do what Apple allows.

What is the case now? Is there any known opion to unlock (root) Huawei devices, or we can consider them in the future as an Apple with an Android?

1Reference

# Answer
> 2 votes
I readout bootloader code with HCU-Client

```
15.08.2021 21:24:20
HCU Client   v1.0.0.0378
Account: alecxs

Before detection connect cable to usb and enable Manufacture mode !

Qualcomm and HiSilicon: *#*#2846579#*#*
MTK: *#*#14789632#*#*
Windows: ##2846579#

ProjectMenu
1.Background setting
2.USB ports setting
Select Manufacture mode

Read Bootloader code

2021-08-15 21:24:20.419 Autodetect COM port and phone type start!
2021-08-15 21:24:21.489 Found COM port: COM25
2021-08-15 21:24:21.499 Found phone type: Huawei Android phone (Qualcomm CPU)
2021-08-15 21:24:21.599 Open COM port COM25 (DBAdapter Reserved Interface (COM25))...
2021-08-15 21:24:21.719 Connecting to server...
2021-08-15 21:24:21.849 Connected!
2021-08-15 21:24:25.391 Read phone secure info...
2021-08-15 21:24:25.611 Read phone basic info...

2021-08-15 21:24:25.671 Phone info data backup saved to file C:\Android\HCU_378\Backup\20210815_212425_866248042878049.BAK

2021-08-15 21:24:27.041 Read bootloader code success!

Bootloader code: POIXF6OJK4QQME0D

```

I was able to unlock bootloader Huawei Y6 2018 ATU-L21

```
fastboot oem unlock POIXF6OJK4QQME0D

```

I dumped `ramdisk.bin` from edl.py and patched with Magisk

```
- Device platform: arm64-v8a
- Installing: 23.0 (23000)
- Copying image to cache
- Unpacking boot image
- Checking ramdisk status
- Stock boot image detected
- Patching ramdisk
- Repacking boot image

****************************
 Output file is written to
 /storage/emulated/0/Download/magisk_patched-23000_4A2bd.img
****************************
- All done!

```

Finally flashed from `fastboot` and got device rooted.
(had to `adb pull` file from device because it was invisible from MTP)

```
fastboot flash ramdisk magisk_patched-23000_4A2bd.img

```

---
Tags: rooting, huawei, bootloader-lock
---


title: Move WhatsApp account without SIM

text:
# Question
Title: Move WhatsApp account without SIM
My problem is exactly the one described in Migrate whatsapp from phone (old expired number) to another one?.

I want to move my WhatsApp account from my old phone to a new one, but the SIM of the old phone is already expired (nonetheless, I currently can use my WhatsApp in it). In my case, what I want is to continue using that WhatsApp account on my new phone. I don't care about the chat history or contacts (I already save them).

So, I have read that in a rooted phone, by accessing the `/storage/Android/data` and copying the `com.whatsapp` folder and replacing it in the same directory of the new phone, the account can be moved and no verification number is needed. I have noticed that even with a non-rooted phone, I can access those folders, copy them, and replace them, as in the instruction, but in my case, it did not work.

Is there are differences in the content of, for instance `com.whatsapp` folder, when you access in rooted mode and non-rooted mode? If not, what I am doing wrong?

# Answer
> 1 votes
What you are trying to do is very possible, but your methods will never work. Firstly, you got have to know that there are two different `com.whatsapp` folders. The one you were just talking about is so useless that anyone on any device can access it.

You need the whole directory from `root/data/data/com.whatsapp`. To copy this, you need root permissions right, and to copy them in a new device you need root as well so that you are able to put them in the root dir.

# Answer
> 1 votes
If you can root your device, then transferring your WhatsApp account would be an easy task.

Use Migrate to backup your WhatsApp data from your old device and restore it to your new device. But both phones must have root access.

---
Tags: whatsapp-messenger
---


# Question
Title: How to prevent display to turn on when tapping:Pixel 4a
When I turn off the display of my Pixel 4A using the `power` button and tap the screen, the screen turns back on. It's locked and I have to slide the screen to unlock it. Still, from time to time the screen unlocks in my pocket because of this.

How can I prevent this? Is there a way I can configure the phone so that it *only* activates the screen when I press the power button?

# Answer
Disable *tap to check phone* (Display →Lock Screen →Tap to check phone)
> 1 votes

---
Tags: lock-screens, google-pixel-4a
---


title: Creating Swap memory without rooting

text:
# Question
Title: Creating Swap memory without rooting
I want to set up swap memory for my Android phone.

* How to set up swap memory without rooting the device?
* Is there an app for doing so?

# Answer
There is an app in the play store, the name is "Swap No Root", it is from the same creator of "Swapper". A 2GB of Swap already shows a big performance change.
> 1 votes

---
Tags: ram, swap
---


title: Can adb backup media?

text:
# Question
Title: Can adb backup media?
Some apps use media stored on the phone (audiobooks, movies, epub, ..) Can `adb backup` backup the media too?

# Answer
Assuming those files you mention are stored in the shared storage that is also visible when the device is connected via USB to a PC, then yes adb can backup those files but by default it ignores them (`by default option` -noshared\` is active).

Executing `adb -shared` will create the backup file `backup.ab` containing all the files that are stored within `/sdcard` respectively `/storage/emulated/0` excluding the `Android` folder where app-specific files are located (tested on Android 9).

You can also just add the `-shared` option to an existing `adb backup` command.

BTW: You can still see the `adb backup` comand-line help with all available options which is no longer shown by recent adb versions by executing `adb shell bu help`:

```
 backup [-f FILE] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all]
        [-system|-nosystem] [-keyvalue|-nokeyvalue] [PACKAGE...]
     write an archive of the device's data to FILE [default=backup.adb]
     package list optional if -all/-shared are supplied
     -apk/-noapk: do/don't back up .apk files (default -noapk)
     -obb/-noobb: do/don't back up .obb files (default -noobb)
     -shared|-noshared: do/don't back up shared storage (default -noshared)
     -all: back up all installed applications
     -system|-nosystem: include system apps in -all (default -system)
     -keyvalue|-nokeyvalue: include apps that perform key/value backups.
         (default -nokeyvalue)
 restore FILE             restore device contents from FILE

```
> 1 votes

---
Tags: adb, backup, media-files
---


# Question
Title: Possible to have different passwords for device encryption and screen lock?
I'd like my device encryption password to be very long and complicated but a short screen lock password for convenience. Is this possible?

# Answer
> 5 votes
On old devices with Full Disc Encryption (FDE) this was possible for rooted devices. But on modern devices that use File Based Encryption (FBE) this is no longer possible nor necessary:

In the old times of FDE the use password was directly used to derive the cryptographic key that protected the encrypted user data partition.

On modern devices user authentication and encryption root-key management is executed in the Trusted Execution Engine (TEE) of your CPU. There the Android Gatekeeper code is running that checks the login/screen lock password and is e.g. able to apply anti-brute force measures like enforcing increasing wait times if multiple false passwords were entered. As long as the TEE is secure this makes the device more secure than a long password.

The detailed process of the key-derivation for file-based encryption, according to the AOSP documentations is:

> File-based encryption keys, which are 512-bit keys, are stored encrypted by another key (a 256-bit AES-GCM key) held in the TEE. To use this TEE key, three requirements must be met:
>
> * The auth token
> * The stretched credential
> * The “secdiscardable hash” The auth token is a cryptographically authenticated token generated by Gatekeeper when a user successfully logs in. The TEE will refuse to use the key unless the correct auth token is supplied. If the user has no credential, then no auth token is used nor needed.
>
> The stretched credential is the user credential after salting and stretching with the scrypt algorithm. The credential is actually hashed once in the lock settings service before being passed to vold for passing to scrypt. This is cryptographically bound to the key in the TEE with all the guarantees that apply to KM\_TAG\_APPLICATION\_ID. If the user has no credential, then no stretched credential is used nor needed.
>
> The secdiscardable hash is a 512-bit hash of a random 16 KB file stored alongside other information used to reconstruct the key, such as the seed. This file is securely deleted when the key is deleted, or it is encrypted in a new way; this added protection ensures an attacker must recover every bit of this securely deleted file to recover the key. This is cryptographically bound to the key in the TEE with all the guarantees that apply to KM\_TAG\_APPLICATION\_ID.

---
Tags: security, encryption, password
---


# Question
Title: Android wifi (oreo) dropping. Because of pihole?
First of all, my apologies if I'm posting in the wrong forum. I'm a bit lost in the SE galaxy. But since my issue is quite complex and specific, I feel this is the best place. Let me know if I'm wrong.

So for the issue:

1. I'm using a home router, lent by my service provider. It's local IPv4 is 192.168.1.254.
2. I have a raspberry pi (IP 192.168.1.15) running a dns service (and ad-blocker) called pihole, configured to use unbound (full recursive dns) on the same machine as its upstream source.
3. The router is running a dhcp service and points to the raspberry as the default dns server.

I have no problem on my computers, either in wifi or ethernet. Network configuration is alright, DNS is indeed coming from the pi.

Now I want my nexus 6P using the latest version of android to be able to use wifi at home. So I simply connect it to the router wifi, same as I did with my laptop, which is doing great. However, the smartphone is doing his own stuff. Sometimes all will be great, and more often than not, it will drop the wifi saying that there is no internet connection.

Of course I tried a bunch of stuff:

* Setting network configuration in the phone instead of letting DHCP do its job, no change.
* Changing wifi channel, no change.
* Rebooting router, phone, and both, no change.
* Whitelisting google services like ad service gstatic check and whatever appeared in my pihole admin panel: seemed to solve the problem at the moment, but a few days later, not that great. And not really what I want.
* Try both "google" and "no provider" as wifi quality check provider in the android wifi settings. No effect.
* Use external DNS servers like 1.1.1.1 or 8.8.8.8: seems to do the job. But absolutely not my goal.

Note that dns request going through the pi can take up to 1 sec to be answered since it's doing a full recursive search. And I suspect the problem is coming from here.

So does anyone have any idea how to get my phone to stick on this wifi network? Btw, my phone is not rooted and I'd like to avoid going down this road.

# Answer
> 0 votes
I have a similar if not the same problem - my S7 (Android 8.0.0) works fine with the exact same setup that you have until "the next morning": I have to disconnect and then reconnect to my WiFi in order to access the internet (or get proper DNS resolution?).

I could not yet find out the root cause (is the DNS changed/lost?), but I just installed a network analyzer (called "Ping & Net") in order to see if the DNS server on my phone is lost over night.

# Answer
> 0 votes
Enabling conditional forwarding for pi-hole (found in the DNS settings) temporarily fixed this for me.

---
Tags: networking, wi-fi, router, dns
---


# Question
Title: LineageOS Recovery command line interface?
Is there an adb shell command line interface for LineageOS recovery? Alternatively, which adb commands will work when booted into lineage recovery? I want to factory reset my device as part of an install script running on my desktop, and I can't find any documentation about which commands (if any) are supported. The only command I can find is a fastboot command; `fastboot erase <partition>`, however I would prefer to do it from recovery. My old device had TWRP recovery and that did have a command line interface which could be used from a shell running on the device.

# Answer
> 1 votes
you can always use core utils

```
find /dev/block -iname userdata
blkid /dev/block/bootdevice/by-name/userdata
mkf2fs /dev/block/bootdevice/by-name/userdata

```

mkf2fs is for f2fs
mke2fs is for ext4

---
Tags: adb, recovery-mode, lineageos, shell
---


# Question
Title: Can I open Chrome on Android from command line ?
Is there command line alternative to Chrome Remote Debugging ?

Manually, I can open tabs from `chrome://inspect/#devices` . As well as I can open Chrome on desktop from CLI - e.g. `chrome.exe --incognito --remote-debugging-port=9222`.

But is there option to open tabs on Chrome on Android, which is connected to PC from CLI ? I need such option to semi-automate tests. thanks !

# Answer
> 4 votes
**Note**: You would need root access to run any command mentioned below for Android 4.2.1.

---

Contrary to traditional desktop OS, apps in Android are called upon using their component, an Activity. While developers can call the activities using the programming, the end-users are left with command-line to do the calling.

Android has an Activity Manager `am` to manage the activities, and among other things it can do, the most basic thing it does is to call an activity of an app.

Before we proceed, setup ADB on PC if you haven't since we're going to rely on it. Also make sure that the device is getting detected in PC and by ADB.

The Chrome for Android app's activity responsible for managing tabs is `com.google.android.apps.chrome.ChromeTabbedActivity`. You can find this activity listed in the said app's `AndroidManifest.xml` (inside the APK). As for how I came to know about it, I simply launched Chrome, opened a tab, and looked upon the most recent activity using the command:

```
adb shell dumpsys activity recents

```

Replace `recents` with `activities` for Android 4.2.1.

The real question is:

> \[Is\] there \[an\] option to open tabs \[in\] Chrome on Android?

**(Obsolete)** Enter the following command to do that:

```
adb shell am start -n com.android.chrome/com.google.android.apps.chrome.ChromeTabbedActivity -d "<URL>" --activity-clear-task

```

**(Tested on Sept 21, 2015)** It seems that Chrome has changed the name of the activity responsible for tabs. The new command is:

```
adb shell am start -n com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity -d "about:newtab" --activity-clear-task

```

See *step 3.* in this answer to know the details of the command, if you're interested.

Replace `<URL>` with the address you want, e.g. `127.0.0.1`, `google.com`.

# Answer
> 1 votes
You can also use

```
am start --user 0 -n com.android.chrome/com.google.android.apps.chrome.Main

```

# Answer
> 0 votes
I recently use the follow command

```
adb shell am start -n com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity -d "https://www.google.com"

```

The activity name can be found from `adb shell dumpsys activity recents | grep -i chrome`

---
Tags: chrome-for-android, remote-access, debug
---


# Question
Title: Decrypting a user private key cert in keystore
Would like to ask if it is possible to decrypt the user private key store found in android keystore.

I know that you need the `masterkey` to decrypt it. But is it possible to obtain the `masterkey` from a rooted android device?

# Answer
> 2 votes
The Android Keystore (in code named `AndroidKeyStore`) uses on recent Google Android Devices the hardware based security of the ARM CPUs named Trusted Execution Environment (TEE).

Therefore the private keys are protected in a way that allows Android apps to use them (e.g. decrypt something using that private key) but you can't extract those keys, as the hardware compartment the code is executed in, has no export function.

Therefore even on rooted devices you can not get export or "decrypt" private and also symmetric keys that are stored in the Android Keystore. This means that apps using that keystore are bound to the device and you can't fully backup app data of such apps as the Android Keystore protected keys will always be missing.

---
Tags: storage, vpn, certificates
---


title: Open Wifi QR code on Android 8

text:
# Question
Title: Open Wifi QR code on Android 8
I have an old Wileyfox 2x with Android 8.1 on it.

When I try to open a 'WiFi QR code', instead of creating a new WiFi connection, the pseudo-URL is just opened in a browser window.

Is this even possible on Android 8, and if so, do I maybe need another scanner app? I'm using Firefox's built-in scanner now, but perhaps that only supports http links?

If it's not supported by Android natively, are there other ways of opening such a code? Could this be done by an app?

# Answer
For completeness sake, here's my own answer, thanks to @andrew-t.

It looks as though parsing a Wifi QR code is not something provided by Android, at least not in version 8.1.

The Barcode Scanner app does recognize the type of QR code, and opens the login page for the Access Point.
> 1 votes

---
Tags: wi-fi, 8.1-oreo, qr-code
---


# Question
Title: Is it possible to cancel out echo when using a bluetooth handsfree?
**Equipment used:** I just bought a cheap Bluetooth handsfree from china: http://www.miniinthebox.com/mini-stereo-wireless-v3-0-headset\_p1187467.html

**Explanation:** This works perfect for me, and i don't notice any problems at all. The problem is that for people calling me, or i am calling hears them selves in an echo with about 1 sec lag.

I cannot hear this echo at all, but for everyone i talk to with the handsfree set hears this echo.

If i mute the mic, then the echo disappears.

**My question is this:** Is it possible to remove echo by using any software or android setting?

**I think that there should be two ways of doing this:**

**1.** muting my mic while the other part talks. (nearly like an automatic walkie talkie)

**2.** cancelling what is sent from the other part, and don't send the same sounds back to the other part again.

# Answer
> 2 votes
This is pretty hard to do with software, since there are delays in the audio stream. The transmission from you phone's BT to the headset can take up to 200ms, and the same for the reverse. Therefore before sending the audio from the mic to the recipient, up to 400ms of audio would have to be sampled and cancelled, assuming that the BT connection is stable.

Usually this is done in the BT headset itself, but, as you said, it's a cheap Chinese headset, so the circuits for this have been left out.

As far as I know, the only settings in Android regarding noise cancellation support only on-board noise cancellation mics.

As for the muting solution, some phones use compression to boost the mic strenth, which will raise the noise levels when the person is silent. This would cause the mute to be always on.

# Answer
> 0 votes
Yes, it is possible. Try turning down your volume.

I spent more than a week but couldn't, but suddenly I had a call from my friend and he said it echoes. I couldn't do anything, so I just turn down the volume unknowingly and he said the echo disappeared.

---
Tags: audio, bluetooth-audio, hands-free, echo, echo-cancelling
---


title: Force map-like app to keep screen on

text:
# Question
Title: Force map-like app to keep screen on
How can I force my phone (Motorola One / Android 10) to stay up and not turn off the screen (as it does after 2 minutes), if I have a map-like app in the foreground:

* Strava,
* Google Maps -- just watching map and my location.

So far I only figured out that when Google Maps are in actual navigation mode then screen never sleeps. But, when I just want to watch my location (in GM or Strava) then it turns itself off as usual.

Is there anything I can do (like some way to register app as "never sleeping" in system configuration?). Or is this per application and only developer can add needed feature?

# Answer
> 2 votes
**On non-rooted devices, it is the app that needs to request that the screen stay on.**

The screen is a major source of battery drain which means that mobile apps need to request from the Android framework a wake lock which informs the system that something important to the user is going on such as navigation, an on screen timer, or media playback. So yes developers have to specifically ask to keep the screen on.

# Answer
> 2 votes
This is entirely per application / developer:

1. Strava: ⊙ Record → ⚙ → Screen Display → ☑ Keep Screen On
2. Google Maps with navigation: screen doesn't goes black by default
3. Google Maps without navigation (just map and your location): not possible

When looking from Android system perspective, there is no such thing like "keep screen on" setting per single application. You can either disable screen timeout entirely (for every app) or you need to use whatever given application can offer you.

---
Tags: google-maps, android-10, standby, gps-tracking
---


# Question
Title: How can one start transcription in Microsoft Teams for Android?
How can one start transcription in Microsoft Teams for Android?

I don't see the option:

I use MS Teams on Android 10 with Samsung Galaxy S9.

It's different from turning on captions. I do have the start transcription option in the Microsoft Teams clients for Windows and MacOS.

# Answer
The feature is not yet available for mobile.

> Current limitations
>
> **Live transcription is currently available:**
>
> * For scheduled meetings.
> * When the spoken language is U.S. English.
> * On the installed desktop version of Teams.
> * For customers with the following licenses: Office 365 E1, Office 365 A1, Office 365/Microsoft 365 A3, Office 365/Microsoft 365 A5, Microsoft 365 F1, Office 365/Microsoft 365 F3, Microsoft 365 Business Basic, Microsoft 365 Business Standard, Microsoft 365 Business Premium SKUs.
>
> **The feature is not available:**
>
> * In channel meetings or Meet now meetings.
> * In GCC, GCC-High, and DoD environments.

The only option currently available is to access the transcript, if made available, after the meeting has ended.

Source: View live transcription in a Teams meeting.
> 1 votes

---
Tags: voice-recognition, microsoft-teams
---


# Question
Title: I'm having trouble identifying the SD Card on OnePlus Nord 200 5G for partition and format
I recently got myself a OnePlus Nord 200 5G running Android 11 and I'm trying to format my SD card. The problem is that I can't identify the card in ADB shell. From the shell:

```
OnePlusN200TMO:/ $ sm list-disks
disk:179,0
OnePlusN200TMO:/ $ sm list-volumes all
emulated:179,2;0 unmounted null
private mounted null
private:179,2 mounted a0104c1c-c041-4496-9c7d-aa584d166a71
emulated;0 mounted null

```

So is the 179,0 the internal and 179,2 the SD? If so, and I want to format like half or 2/3 as internal and the remaining as external (256 GB SD) how would I do that? I'm being extra careful because I have seen posts that bricked the phone.

# Answer
> 0 votes
I'm afraid you can't do that without root access

---
Tags: adb, sd-card, partitions, formatting
---


# Question
Title: How to connect a monitor to a Galaxy Tab tablet?
I have a Galaxy Tab A (2018) and a Galaxy Tab S6 Lite tablets and I have to connect them to an external monitor with HDMI FullHD (1920 x 1080), how can I do that?

For example does it work with this adapter? - QGeeM USB C to HDMI Adapter 4K Cable, USB Type-C to HDMI Adapter

What kind of frequencies does it support? My monitor works best at 75 Hz, at 60 Hz it doesn't use all the screen space, it leaves a border of 1-2 cm unused screen space on the border.

# Answer
> 1 votes
You may be able to do what you're looking for with Chromecast.

You'll only need one for each monitor/tv you're trying to use.

It's wireless, which may be a good thing, but it won't be perfect. I think it won't be too good for fast paced games.

---
Tags: tablet, hdmi
---


# Question
Title: Stop Chrome from opening Google Maps app
My Google Maps app has got broken. I think I can use the web version of Google Maps. However, Chrome is redirecting me out from the browser to the app.

How to stop Google Chrome from redirecting me to the Google Maps app?

# Answer
> 3 votes
In case any one else runs into this problem, you can stop this behavior by going to Settings -\> Apps -\> Google Maps and under More settings and permissions -\> Open by default and disabling Open supported links to stop it from launching the app. This works on both Android and Chromebooks to stop the Android app from launching any time a Google Map link comes up.

# Answer
> 0 votes
A few options - open the Maps app info and disable it is the easiest. I also just noticed that with the Xposed module XPrivacyLua if I block Chrome from being able to get applications no links are ever opened in another app.

---
Tags: chrome-for-android, browser, google-maps
---


# Question
Title: Signing TWRP with OpenPGP doesn't work, private key needed?
I am trying to sign TWRP (Redmi Note 8 ginkgo) using GPG on Windows 10. I have imported the TWRP public key, however, when I select the file for signing, it does not show up in the drop-down menu in Kleopatra. From my research, this seems to be due to it being a public key and missing the private key part (correct me if this is wrong please).

I have no idea how to acquire such a key that would allow me to sign TWRP correctly. Could anyone please help me with this?

Additional info: The bootloader is locked and I don't have TWRP installed. I want to use the command `fastboot boot twrp.img`, however, it doesn't work with a locked bootloader. I get the error `FAILED (remote: Fastboot boot command is not available in locked device)`. I read somewhere that it might work if TWRP was signed without having to unlock the bootloader.

Thank you! :)

# Answer
> 1 votes
For correctly signing TWRP you need the device signature private key that only the device manufacturer has.

Therefore it is impossible to sign TWRP for a bootloader locked device.

Furthermore Android images are not PGP signed, therefore a PGP signature would be of no use no matter which key you use. More details about ROM image signatures can be found here: Verifying a (custom) ROM signature

---
Tags: twrp, fastboot, bootloader-lock
---


# Question
Title: Gapps stuck at "Mounting partitions" while installing via TWRP
I'm trying to install LineageOS on my Moto E4. I've been able to successfully sideload the custom ROM and boot into Lineage, but I can't install Gapps. Specifically, after sideloading LOS, I sideload the Gapps ROM. It gets to the message "Mounting partitions" and hangs there.

# Answer
I don't know the precise reason why, but it was because I was booted into TWRP through fastboot instead of from a flashed recovery partition. After flashing recovery and booting there, the Gapps install completed without issue.
> 1 votes

---
Tags: rom-flashing, twrp, gapps
---


title: Data partition corrupted TRT-LX2

text:
# Question
Title: Data partition corrupted TRT-LX2
Please read this question first!!!

I've disabled dm-verify and then it says the data partition is corrupted!

I did a low-level factory reset, but it is still showing that annoying message when I try to boot it up.

How to fix this?

# Answer
> 1 votes
you probably destroyed encryption, this can happen if Universal DM-Verity ForceEncrypt Disk Quota Disabler is used without reading the instructions:

> The zipname tells the installer what to do. Here are the current options:

* Add 'enfec' to zipname to keep forceencrypt enabled if present

This may have caused mismatch between different fstabs. Either restore backup of boot + vendor, or fix fstabs manually, or flash stock ROM

---
Tags: boot, 7.0-nougat, emui, data
---


# Question
Title: How to turn off auto suggestion popups in Google Keep?
When writing lists in Google Keep, sometimes infuriating Clippy-style auto suggestion popups appear, suggesting different things starting with the same word that another person might have wanted to write. These popup boxes are distracting and get in the way, usually overlapping the space I want to press to move to the next item in the list and obstruct seeing what I've written.

I want to turn this feature off. I've been through the settings and help, but there doesn't seem to be any option to turn it off. I've also sent feedback through the app asking for an option to turn it off to no avail.

Looking at the forums, I see people have been asking for a way to turn this off since 2016. There's a common old suggestion that it only turns on if something relating to "Shopping" is in the list title - but in 2018 I still get the popup plague even on lists with no title.

Is there any roundabout way to disable this which works?

# Answer
> 1 votes
Start each list item with a space. That way, you still get your keyboard's auto suggestions but you don't get the annoying Keep ones.

# Answer
> 2 votes
There are some workable workarounds buried in this forum thread.

**The simple way (which makes writing lists take slightly longer):**

* Initially, create the list as a normal note with one line per item (not a checkbox list)
    + OR if it's already created as a checkbox list, press 'Hide checkboxes' under the three vertical dots in the top right. Unfortunately this causes Keep to forget which items were ticked.
* Finish writing or editing the list
* Press the '+' in the bottom left corner, then press 'Tick boxes' to turn it back into a check list

**The more involved way (which in theory, you can do once then forget about)**

* Install a url filter like an adblocker and add the URL for Google's "show some popups of things I didn't type" service to the list of banned addresses. I've not tried this, so I can't guarantee it works - in particular, I don't know if it requires rooting the device or not (please comment if you have tried something like this). Two suggestions from that post:
    + The app uBlock, then going to "Settings -\> My Filters" and adding `https://taskassist-pa.clients6.google.com/v2/taskassist:suggest*`
    + AdBlock, then going to "Customize \> Manually edit your filters" and adding `/v2/taskassist:suggest$domain=taskassist-pa.clients6.google.com`

Don't forget to also go to "Help & feedback" in the app and tell Google that you want a normal option to turn off auto suggestions.

# Answer
> 0 votes
I deleted the keyword, made a new keyword, and the old keyword suggestion was gone. I think it only started doing it when I made the first word say "breakfast" in capital letters.

---
Tags: google-keep
---


title: Export Chrome for Android's history

text:
# Question
Title: Export Chrome for Android's history
Is there a way to export the entire browser history from Chrome under Android, in any file format (CSV, XML, whatever)?

I have Chrome 42.0.2311.111 under Android 4.2.2.

# Answer
You can use Google Takeout to download a JSON file of your Android Chrome history.

You can also download your bookmarks, along with a lot of other Google data.
> 6 votes

# Answer
Chrome doesn't allow backup using ADB and there are no extensions available for mobile version so you should have root access before you proceed further.

1. Grab the `History` file from the location `/data/data/com.android.chrome/app_chrome/Default/` into PC. A Root Explorer may help.
2. Install an SQLite manager such as SQLiteman or DB Browser for SQLite in PC.

Both has the option under menu bar to export the database into an SQL file or a particular table into CSV file.

Well at least you now know where the history is stored, so you may find a relevant software to directly export the database into a CSV or XML file.
> 3 votes

# Answer
If the tabs are still open you may find the following useful, via dev.to - When you never close tabs on your mobile Chrome browser. Not quite a solution here, but was what I was looking for when I came across this question.

# Export open tabs

Chrome's remote debugging has a remote-debugging-legacy mode that allows you to view tabs on a connected computer via `adb`.

### Set up adb

1. First, install the Android Command Line Tools from Android Studio.
2. Enable developer mode on your phone by going to `Settings > About Phone > Build Number` and tapping 7 times
3. Enable USB debug mode from `Settings > Developer options` or `Settings > System > Advanced > Developer options`. This menu will only be visible after the previous step.
4. Connect to laptop and verify with `./adb devices -l`. You may need to configure adb and grant permission from your phone.

### Connect to chrome remote devtools

Once your phone is set up with `adb` you can:

```
# Connect to Chrome Android's legacy debugging API
./adb forward tcp:9222 localabstract:chrome_devtools_remote

# Visit http://localhost:9222 to verify, then
curl http://localhost:9222/json/list > mobile-tabs.json

```
> 1 votes

# Answer
You should be able to export ALL your history from ALL devices under your Google Account on practically any browser. It's generally easiest to do it from your desktop, however.
> 0 votes

# Answer
Touch the 3 dots on right top of screen. choose "history" when it loads, again touch 3 dots and choose "print" Give new filename to save to then scroll to bottom of history and choose "older". after the page loads, repeat the above.

A hassle, but it works for me... Later you can use various apps to combine the created .pdf files. Oh, if this works for you, then.. "You're welcome".
> 0 votes

---
Tags: chrome-for-android, export, browser-history
---


# Question
Title: How to turn on Gmail Android app text autocomplete
When I use Gmail's web version, it makes autocomplete suggestions to the text I'm typing (for example, if I type "long time no" `see` might show in autocomplete). It also underlines in red grammar mistakes and suggests grammar improvements underlining the text in blue.

I recently bought myself an android tablet (Samsung A7). I tried using Gmail Android app because it's hard for me to use the web version with my tablet. The app works fine, but it doesn't give me the above text autocomplete feature nor the grammar notifications.

Is there a way to enable this? This video goes through pretty much all settings and, although it lists an autoreply feature, I can't find anything about text autocomplete or grammar. Is this possible at all on the Android app?

# Answer
1. Open Gmail, go to Settings.
2. Select your account. Enable Smart Reply in email
> 0 votes

---
Tags: gmail
---


# Question
Title: How to find phone when mobile data switched off and ringtone off
My phone fell out of my pocket while I was out walking the dog. The kids use my phone sometimes, so I had switched mobile data off. My wife is a very light sleeper, so the phone was on silent. This made it very difficult to find my phone.

# Answer
> 2 votes
Key parts of this solution:

1. I had previously used my wife's phone as a hot-spot.
2. I could call the lost phone and knew it was receiving the call.
3. I had a way to visit android.com/find to find my own phone and make it ring loudly.
4. I knew it had about 25% battery left, so I knew I could keep calling it.

The approach:

1. Enable hot-spot on a friend's phone which you've previously used as a hot-spot.
2. Keep calling the lost phone. This will keep the lost phone "awake". While it's awake, it'll look for WiFi.
3. Retrace your steps while carrying your friend's phone. Keep looking at the "Connected Devices" screen on your friend's phone.
4. When your phone appears in the "Connected Devices", you're close.
5. At this point you can use android.com/find. How you do that will depend on what resources you have available. You might have to phone home and ask someone to do it on a laptop, or you might be lucky enough to have an old Android device with you, connected to the hot-spot on your friend's phone.

To figure out the method, I went out to the beach with my wife's phone and an old Android of my own (no SIM). I put the old Android on the ground and walked away with the hot-spot so I could figure out what the conditions needed to be for it to regain the WiFi connection to the hot-spot. The key thing was that after leaving the old Android on the ground for a while, it didn't matter how close the hot-spot was, the old Android wouldn't pick it up ... until I pressed a button and made the screen light up.

It took a bit of experimentation, conviction that I would succeed, and a lot of walking, but I eventually found it. Phew!

**Edit**

A note on battery consumption

When I first left the house with my phone for the dog walk, I noticed the battery was on 37%. I made a short call while I was out but didn't use it otherwise. While hunting for the phone, I must've called it 30 or 40 times, letting it ring for a minute each time. When I picked it up, the battery was on 20%.

---
Tags: lost-phone
---


# Question
Title: Does the bootloader reset after removing the battery?
After successfully flashing a modern custom ROM on my old phone, I tried doing the same with my girlfriend's old Lenovo Vibe P1m.

However, after mistakenly pulling out the USB cable at the worst time imaginable (flashing the recovery image), the phone wouldn't start anymore. Nothing worked - power button, power + volume up, down, both - nothing! So I'm guessing the recovery flash got corrupted. In great despair and guilt, I started looking for second-hand phones to swap the internal storage with.

After leaving it unplugged over the weekend though, the battery got drained, and, even though the power button still didn't work, the power + vol down buttons *did* show the boot menu, from which I managed to boot it normally.

That was a great story, but my question here is: what happened when I (practically) removed the battery? I know the clock resets of course, all cache goes away, but.. is the bootloader/recovery also reset?

# Answer
> 1 votes
First your recovery got corrupted during flash interrupt. Then you booted into recovery accidentially, which made device crash. It stucked in crashed state and did not react to buttons, until battery drained. After you charged battery it powered on normally. During boot, recovery was restored from `recovery-from-boot.p`

---
Tags: rom-flashing, recovery-mode, battery, bootloader
---


title: Where can I find the OTA update file?

text:
# Question
Title: Where can I find the OTA update file?
I'm trying to locate the zip file that contains the OTA update for my Droid Bionic. Right now, its failing to update, and every time it fails it deletes the file and I need to re-download it (takes a long time). I was hoping to save off the update so I could try a few things on my phone and try the update. I read online its somewhere in a /cache directory, however I dont see anything at all when I mount it to the PC and do a search for cache or even "\*.zip". Does anyone know how I can find the zip file? Maybe I need to change the PC settings or something to search for it (I have changed the folder settings to view hidden files and system files).

# Answer
Two pieces of ground I want to cover here:

1. `/cache` is typically a separate partition on your device, which wouldn't be mountable by a PC via USB, which is why that isn't working. The USB connection generally accesses a directory named "sdcard" (or similar) which is used as an external storage device, although this storage area doesn't have to be physically external to the device (it may just be a partition named `/sdcard` rather than a physical card).
2. If the OTA is in `/cache` then you should be able to find it with a file explorer or shell on your device. Once you've found it, you could simply move the file from `/cache` to your external storage and then copy it over USB. You'll need root in order to access `/cache`, though. There are a number of file explorers that support root access, but I personally use ES File Explorer.
> 7 votes

# Answer
For Lenovo ,the location for Downloaded Update file is : **internal storage \> LenovoOTA** or **sdcard0/LenovoOTA** folder

**after** download completes **mount** to pc ,copy then **execute** on mobile/device otherwise file 'll be deleted after update
> 1 votes

# Answer
My device is HTC One M7 I managed to find the OTA by doing a dumpsys | grep .zip

I was already in a adb shell su session as the file was being downloaded,(after I exited and re-entered the shell and tried to run the dumpsys command I couldn't find it. I'm guessing dumpsys works on a temporary log.)

eventually I found it in the /data/data/com.android.providers.downloads/cache folder

I managed to copy it to /sdcard but it wouldn't show up in Windows Explorer until I unplugged and re-plugged the USB cable in.

I guess Windows doesn't refresh the folder/directory index (or something) to see new files created in there
> 1 votes

# Answer
For samsung device `/data/fota`

Search for `fota` folder.

In that folder, you will find update.zip
> 1 votes

# Answer
Alternatively, you can flash an FXZ rom image for your current version or later. The benefit of that is that it doesn't matter what state your phone is in or if its missing bloatware that the OTA update requires.

Things you need:

* FXZ image for the desired version (google search for it)
* RSDLite (google search rsdlite 5.7 download)
* Motorola device drivers (found on motorola's site)
* USB cable
> 0 votes

# Answer
I found the OTA package in following location

```
/data/data/com.lenovo.ota/app_otapackages/

```

For my Lenovo K3 Note
> 0 votes

# Answer
for Lineage or /e/ these are saved at `/data/lineageos_updates/`, if you can enable an adb root shell you can pull files from there.
> 0 votes

---
Tags: file-system, ota-update, cache, motorola-droid-bionic
---


# Question
Title: I am having problems with the app when leaving Wi-Fi and connecting to cellular via mobile router on a samsung tablet
I am using a Samsung tablet for an application to manage a fleet of transportation vans. Inside the van we have a wireless router (Pepwave), when in the parking lot the Pepwave has priority to connect to the yards access point. This is to upload any surveillance video needed from the van. I am trying to get rid of the data plan on the tablet and run off of the data plan on the Pepwave via Wi-Fi entirely. It works great... for the most part. The problem I am having is that when leaving the yard the Pepwave switches from Wi-Fi to cellular when the Access point is out of range. The application does not refresh when this data provider transfer takes place. All other apps like YouTube or internet browser for fine after connection reestablishes. The only solution so far is to toggle the Wi-Fi on the tablet on and off. Any suggestions would be greatly appreciated.

# Answer
> 0 votes
I would use an automation assistant such as *Tasker* or *Automate*.

You can set these to detect the WiFi change of state and then toggle your tablet's WiFi setting off then on automatically.

It may only be a workaround for the problem but it may be the simplest fix.

---
Tags: applications, wi-fi
---


# Question
Title: Termux (Terminal) tsu is adding "(unreachable)" to my current working path
When I run `tsu` (which is Termux's version of su), my current working directory gets prefixed with "(unreachable)", as you can see from the transcript of my session.

```
[u0_a116 …/~]$ tsu
[root …/home]# pwd
(unreachable)/data/data/com.termux/files/home
[root …/home]#

```

I did some digging and found what seems to me is the culprit. `tsu` is a script that sets up an environment for the root user and then runs su to give you root privilege with the new environment. This is what the command that tsu is running looks like after opening all the variables. `/sbin/su -c PATH=/sbin/.magisk/busybox env -i PATH=/data/data/com.termux/files/usr/bin:/data /data/com.termux/files/usr/bin/applets:/system/bin:/system/xbin:/sbin:/sbin/bin ANDROID_DATA=/data TMPDIR=/data/data/com.termux/files/home/.suroot/.tmp PREFIX=/ data/data/com.termux/files/usr TERM=xterm-256color LD_PRELOAD=/data/data/com.ter mux/files/usr/lib/libtermux-exec.so ANDROID_ROOT=/system HOME=/data/data/com.ter mux/files/home/.suroot /data/data/com.termux/files/usr/bin/bash`

This causes a problem when I try to run a script that is using relative paths. (I'm running a script to setup a full linux distro with proot in Termux).

If I take out the 'env -i\` from the command then I get the current working directory *without* the prefixed "(unreachable)". This does not setup the new environment, it leaves the old environment intact as if I would have selected --preserve option.

# Answer
Go to Magisk settings if you are rooted device with Magisk and set "Mount Namespace Mode" to "Inherit Namespace" and reboot device.

If you are using SuperSU, go to SuperSU settings and enable "Mount Namespace Separation" mode.
> 1 votes

# Answer
I have had the same problem. I resolved it with a work around. I added to the environment the following. PWD=$(echo $PWD | cut -c 14-)

I added the following lines to the tsu script at line numbers 239 - 241

```
# Following line added to fix the problem of pwd starting with (unreachable)
ENV_BUILT+=" PWD=$(echo $PWD | cut -c 14-)"

```

---

Following is the the full code of the updated tsu script

---

```
#!/data/data/com.termux/files/usr/bin/bash

# Copyright (c) 2020, Cswl C. https://github.com/cswl
# This software is licensed under the ISC Liscense.
# https://github.com/cswl/tsu/blob/v8/LICENSE.md

### tsu
_TSU_VERSION="8.5.1"

log_DEBUG() { __debug_wrapper() { :; }; }

gather_debug_info() {
    echo "Environment: "
    env
    echo "============================"
    dpkg --print-architecture
    echo "Android version:"
    getprop ro.build.version.release
    echo "Android device:"
    getprop ro.product.manufacturer
    getprop ro.product.model
    uname -a

} >>"$LOG_FILE"

# Allow debugging with a long option
if [[ "$1" == '--dbg' ]]; then
    _TSU_DEBUG=true
    printf -v LOG_FILE "%(%Y%m%d)T"
    LOG_FILE="./tsu_debug_$LOG_FILE"
    gather_debug_info
    set -x
    shift
fi

## Support for busybox style calling convention.
## This works because we don't actually `readlink` the script location.
_TSU_CALL="${BASH_SOURCE[0]##*/}"
if [[ "$_TSU_CALL" == "sudo" ]]; then
    _TSU_AS_SUDO=true
fi

show_usage() {
    cat <<"EOF"
tsu A su interface wrapper for Termux

    Usage:
        tsu
        tsu [ -s SHELL ]  [-p|-a] [USER]
        tsu --dbg [ -s SHELL ] [-p|-a] [-E] [USER]
        tsu -h | --help | --version

    Options:
    --dbg        Enable debug output
    -s <shell>   Use an alternate specified shell.
    -p           Prepend system binaries to PATH
    -a           Append system binaries to PATH
    -h --help    Show this screen.

    This package also provides a minimal sudo which is enough to run most programs as root

        sudo command

    https://github.com/cswl/tsu

EOF
}

show_usage_sudo() {
    cat <<"EOF"
sudo - run commands as root or another user
  usage: sudo command
  usage: sudo [-E] [-u USER] command

    Options:
      -E          Preserve environment variables from the current shell.
      -u USER   Switch to USER instead of root..
EOF
}

# Defaults in Termux and Android
TERMUX_FS="/data/data/com.termux/files"
TERMUX_PREFIX="$TERMUX_FS/usr"
TERMUX_PATH="$TERMUX_PREFIX/bin:$TERMUX_PREFIX/bin/applets"
ROOT_HOME="$TERMUX_FS/home/.suroot"
ANDROID_SYSPATHS="/system/bin:/system/xbin"
EXTRA_SYSPATHS="/sbin:/sbin/bin"
#ANDROID_ASROOT_SYSPATHS="/bin:/xbin"

# Some constants that may change in future.
BB_MAGISK="/sbin/.magisk/busybox"

# Options parsing

# Loop through arguments and process them
log_DEBUG TSU_AS_SUDO
if [[ "$_TSU_AS_SUDO" == true ]]; then
    # Handle cases where people do `sudo su`
    if [[ "$1" == "su" ]]; then
        unset _TSU_AS_SUDO
    fi

    _is_pos() {
        for e in -u --user -E --preserve-enviroment; do [[ "$e" == "$1" ]] && return 1; done
        return 0
    }

    for arg in "$@"; do

        # It is important to break as soon as we see a positional argument
        # Otherwise `sudo id -u` or `sudo some_cmd -E` wont work as expected

        if _is_pos "$arg"; then break; fi

        case $arg in
        -u | --user)
            SWITCH_USER="$2"
            shift
            shift
            ;;
        -E | --preserve-enviroment)
            ENVIRONMENT_PRESERVE=true
            shift
            ;;
        esac
    done

fi

log_DEBUG _TSU_AS_SUDO
if [[ -z "$_TSU_AS_SUDO" ]]; then
    for arg in "$@"; do
        case $arg in
        -p | --syspre)
            PREPEND_SYSTEM_PATH=true
            shift
            ;;
        -a | --sysadd)
            APPEND_SYSTEM_PATH=true
            shift
            ;;
        -s | --shell)
            ALT_SHELL="$2"
            shift
            shift
            ;;
        --version)
            echo "tsu - $_TSU_VERSION"
            exit
            ;;
        -h | --help)
            show_usage
            exit
            ;;

        *)
            POS_ARGS+=("$1")
            shift
            ;;
        esac
    done

    SWITCH_USER="${POS_ARGS[0]}"
fi

declare -A EXP_ENV

env_path_helper() {

    # We will try to match the default behavior of normal linux su
    # Unless the user specifically asks to preserve the enviroment,
    # We create a fresh new one.
    log_DEBUG "${FUNCNAME[0]}"

    log_DEBUG SWITCH_USER
    if [[ -z "$SWITCH_USER" ]]; then
        ## By default we start a fresh root shell with HOME set to that of the root home

        # Creat root $HOME if it doesnt exsists yet
        [[ -d "$ROOT_HOME" ]] || mkdir "$ROOT_HOME"
        NEW_HOME="$ROOT_HOME"

        EXP_ENV[PREFIX]="$PREFIX"
        EXP_ENV[TMPDIR]="$ROOT_HOME/.tmp"
        EXP_ENV[LD_PRELOAD]="$LD_PRELOAD"

        log_DEBUG _TSU_AS_SUDO
        if [[ "$_TSU_AS_SUDO" == true ]]; then
            # sudo copies PATH variable, so most user binaries can run as root
            # tested with `sudo env` version 1.8.31p1
            NEW_PATH="$PATH"
            EXP_ENV[SUDO_GID]="$(id -g)"
            EXP_ENV[SUDO_USER]="$(id -un)"
            EXP_ENV[SUDO_USER]="$(id -u)"
        else
            NEW_PATH="$TERMUX_PATH"
        fi

        # Android versions prior to 7.0 will break if LD_LIBRARY_PATH is set
        log_DEBUG "LD_LIBRARY_PATH"
        if [[ -n "$LD_LIBRARY_PATH" ]]; then
            SYS_LIBS="/system/lib64"
            EXP_ENV[LD_LIBRARY_PATH]="$LD_LIBRARY_PATH:$SYS_LIBS"
        else
            ASP="${ANDROID_SYSPATHS}:${EXTRA_SYSPATHS}"
            # Should we add /system/* paths:
            # Some Android utilities work. but some break
            log_DEBUG "PREPEND_SYSTEM_PATH"
            if [[ -n "$PREPEND_SYSTEM_PATH" ]]; then
                NEW_PATH="$ASP:$NEW_PATH"
            else
                NEW_PATH="$NEW_PATH:$ASP"
            fi
        fi

    else
        # Other uid in the system cannot run Termux binaries
        NEW_HOME="/"
        NEW_PATH="$ANDROID_SYSPATHS"

    fi

    # We create a new environment cause the one on the
    # user Termux enviroment may be polluted with startup scripts
    EXP_ENV[PATH]="$NEW_PATH"
    EXP_ENV[HOME]="$NEW_HOME"
    EXP_ENV[TERM]="xterm-256color"

    [[ -z "$_TSU_DEBUG" ]] || set +x
    ## Android specific exports: Need more testing.
    EXP_ENV[ANDROID_ROOT]="$ANDROID_ROOT"
    EXP_ENV[ANDROID_DATA]="$ANDROID_DATA"

    ENV_BUILT=""

    for key in "${!EXP_ENV[@]}"; do
        ENV_BUILT="$ENV_BUILT $key=${EXP_ENV[$key]} "
    done

    # Following line added to fix the problem of pwd starting with (unreachable)
    ENV_BUILT+=" PWD=$(echo $PWD | cut -c 14-)"

    [[ -z "$_TSU_DEBUG" ]] || set -x

}

root_shell_helper() {
    log_DEBUG "${FUNCNAME[0]}"

    if [[ -n "$SWITCH_USER" ]]; then
        ROOT_SHELL="/system/bin/sh"
        return
    fi
    # Selection of shell, checked in this order.
    # user defined shell -> user's login shell
    # bash ->  sh
    log_DEBUG "ALT_SHELL"
    if [[ "$ALT_SHELL" == "system" ]]; then
        ROOT_SHELL="/system/bin/sh"
    elif [[ -n "$ALT_SHELL" ]]; then
        # Expand //usr/ to /usr/
        ALT_SHELL_EXPANDED="${ALT_SHELL/\/usr\//$TERMUX_PREFIX\/}"
        ROOT_SHELL="$ALT_SHELL_EXPANDED"
    elif [[ -x "$HOME/.termux/shell" ]]; then
        ROOT_SHELL="$(readlink -f -- "$HOME/.termux/shell")"
    elif [[ -x "$PREFIX/bin/bash" ]]; then
        ROOT_SHELL="$PREFIX/bin/bash"
    else
        ROOT_SHELL="$PREFIX/bin/sh"
    fi
}

log_DEBUG _TSU_AS_SUDO
if [[ "$_TSU_AS_SUDO" == true ]]; then
    if [[ -z "$1" ]]; then
        show_usage_sudo
        exit 1
    fi
    CMD_ARGS=$(printf '%q ' "$@")
    log_DEBUG ENVIRONMENT_PRESERVE
    [[ -n "$ENVIRONMENT_PRESERVE" ]] || env_path_helper

    STARTUP_SCRIPT="$CMD_ARGS"
else

    root_shell_helper
    env_path_helper

    STARTUP_SCRIPT="$ROOT_SHELL"
fi

SU_BINARY_SEARCH=("/system/xbin/su" "/system/bin/su")

# On some systems with other root methods `/sbin` is inacessible.
if [[ -x "/sbin" ]]; then
    SU_BINARY_SEARCH+=("/sbin/su" "/sbin/bin/su")
else
    SKIP_SBIN=1
fi

# Unset all Termux LD_* enviroment variables to prevent symbols missing , dlopen()ing of wrong libs.
unset LD_LIBRARY_PATH
unset LD_PRELOAD

### ----- MAGISKSU
# shellcheck disable=SC2117
if [[ -z "$SKIP_SBIN" && "$(/sbin/su -v)" == *"MAGISKSU" ]]; then
    # We are on Magisk su
    su_args=("/sbin/su")
    [[ -z "$SWITCH_USER" ]] || su_args+=("$SWITCH_USER")

    su_cmdline="PATH=$BB_MAGISK "
    if [[ -n "$ENVIRONMENT_PRESERVE" ]]; then
        su_args+=("--preserve-environment")
        su_cmdline+="$STARTUP_SCRIPT"
    else
        su_cmdline+="env -i $ENV_BUILT $STARTUP_SCRIPT"
    fi
    su_args+=("-c")
    exec "${su_args[@]}" "${su_cmdline}"
    ##### ----- END MAGISKSU
else
    ##### ----- OTHERS SU
    for SU_BINARY in "${SU_BINARY_SEARCH[@]}"; do
        if [[ -x "$SU_BINARY" ]]; then

            su_args=("$SU_BINARY")
            [[ -z "$SWITCH_USER" ]] || su_args+=("$SWITCH_USER")

            # Let's use the system toybox/toolbox for now
            su_cmdline="PATH=$ANDROID_SYSPATHS "
            if [[ -n "$ENVIRONMENT_PRESERVE" ]]; then
                su_args+=("--preserve-environment")
                su_cmdline+="$STARTUP_SCRIPT "
            else
                su_cmdline+="env -i $ENV_BUILT $STARTUP_SCRIPT"
            fi
            su_args+=("-c")
            exec "${su_args[@]}" "${su_cmdline}"
        fi
    done
fi
##### ----- END OTHERS SU

# We didnt find any su binary
set +x
printf -- "No superuser binary detected. \n"
printf -- "Are you rooted? \n"

if [[ -n "$_TSU_DEBUG" ]]; then
    echo "-------------------------------------"
    echo "tsu ran in debug mode."
    echo "Full log can be found in tsu_debug.log"
    echo "Report any issues to: https://github.com/cswl/tsu "
fi

exit 1

```
> 0 votes

---
Tags: command-line, termux
---


# Question
Title: Error with `adb sideload`when trying to install Android 12 in recovery mode
According to Google's "Get Android 12" guide,

> The easiest way to get Android 12 Beta on a Google Pixel device is to enroll your device in the Android Beta for Pixel program.

but also

> Alternatively, you can flash or manually install the latest Android 12 Beta build on your Pixel device. These approaches can be useful when you need more control over testing, such as for automated testing or regression testing.

I had previously joined the beta program to test Android 11 developer preview so for Android 12, I thought I'd try the flashy way.

I followed this guide to flash the update to my Pixel 3XL. However, when I finally typed the `adb sideload` command and pressed "Enter", it gave

```
adb sideload ~/Downloads/crosshatch-spb4.210715.011-factory-cbdbee68.zip
adb: sideload connection failed: no devices/emulators found
adb: trying pre-KitKat sideload method...
adb: pre-KitKat sideload connection failed: no devices/emulators found

```

and `adb devices` doesn't find any devices connected, although my Pixel 3XL is indeed connected through the cable, and is in recovery mode, up to step 6 of the guide. How do I get pass the error?

# Answer
It turned out that I had not completed the final part of step 6 of the guide, namely, after selecting "Apply update from ADB" in Recovery Mode, I had not pressed the power button one more time.

Once I noticed that and pressed the power button, I suppose that that got my device ready for flashing from my Mac, and `adb devices` started showing the device, and `adb sideload` was ok.
> 1 votes

---
Tags: adb, rom-flashing, recovery-mode, side-loading, android-12
---


# Question
Title: How to upload all Android photo gallery Albums to Dropbox?
I currently have my phone's digital photos uploading to my Dropbox "Camera Uploads" folder, but I recently discovered that some of the folders in my Gallery \> Albums are not uploading. For example, I downloaded photos from the Disneyland app to my Android. Those photos were saved in my Gallery/Albums in a folder called "Disney". Those photos have not uploaded to Dropbox. Meanwhile, other folders in Gallery/Albums (such as my Screenshots folder) have uploaded to Dropbox.

Why would some folders not upload? Is there anything I can do too ensure that every single Album/photo is uploaded to Dropbox automatically?

# Answer
> 0 votes
I have the same question. This is what I learned from Dropbox Community

"The automatic camera upload feature uploads all photos and videos from the "Camera" and "Screenshots" albums on your device."

See https://www.dropboxforum.com/t5/Dropbox-files-folders/Phone-Galleries-and-Camera-Uploads/td-p/539326

---
Tags: dropbox
---


# Question
Title: Phone Crashing due to too many files/directories on SDCard
My Galaxy S9+ running Android 10 crashes whenever I insert my microsd card containing upwards of 9000 sub-directories and 92000 files. The SDCard is using 330GB out of 400GB.

Basically the way this happens is that I insert the sdcard and then a notification displays saying "Checking SanDisk SD card... Reviewing current content

Obviously some kind of timeout is occurring when android attempts to scan the sdcard. I have tried to disable the scanning a number of ways, making all the sub-directories hidden by prefixing them with a dot, putting a .nomedia file in every sub-directory and by not using any sub-directories and instead having all the files loose in the top level of the sdcard. This last "solution" actually works to stop the crashing but is unacceptable to me.

**Basically my question boils down to this: Is there any way to disable android scanning the sdcard upon boot and when it is inserted ? I have rooted my phone so I could make modifications to the system to achieve this.**

I simply want the sdcard to be usuable like on my linux desktop computer, I insert the sdcard, browse it with a file browser, and that's it. I don't want anything to happen by itself when it is inserted, no scanning, no indexing, nothing!

**The MicroSD Card is formatted as exFAT**

# Answer
Irfran Latif's comment answered my question, I ended up mounting formatting the SDCard as ext4 and mounting it from the command line with appropriate namespaces and permissions.
> 0 votes

---
Tags: samsung
---


# Question
Title: Is it possible to install WPA3 on the OnePlus3?
As I understand it, WPA3 is software, so it should be possible to install it, right? If so, how?

I would clearly like to have all my devices on the latest security.

Thanks!

# Answer
> 2 votes
**Unlikely.**

OnePlus 3 was released in 2016.

Qualcomm announced WPA3 mobile chipset support in 2018.

> Qualcomm Technologies expects to incorporate WPA3 security features into chipsets in summer 2018 for mobile devices beginning with the Qualcomm® Snapdragon™ 845 Mobile Platform

The Android framework started supporting WPA3 with Android 10.

and requires:

> Wi-Fi chip with support for WPA3 and OWE

So in addition to using a device with a supporting WiFi chipset, you'll need to be running at least Android 10 as well.

---
Tags: wi-fi, oneplus-3
---


title: How to extract data from an .APK file?

text:
# Question
Title: How to extract data from an .APK file?
I want to extract or copy every detail that .apk contain, like for example extracting data from `whatsapp.apk` or `linked-in.apk` or `twitter.apk`.

Please note that I dont want to extract my personal data from any installed app on my phone instead I want extract the **data and images** which the app developer had added while making the app.

# Answer
An APK is the same as a JAR file which is the same as a ZIP file.

Rename the .APK to a .ZIP and then extract the .ZIP
> 5 votes

# Answer
As suggested earlier, Apktool is a good option,

**Requirements:**

(For Linux and Mac OS the files and installation instructions are also available: Installation for Apktool)

**Usage**

Copy the apktool.bat and apktool.jar files to a folder preferably with no spaces eg inside the `C:\ directory`. (e.g C:\Apktool)

1. Open command prompt by pressing shift and right click simultaneously.
2. In the command prompt type `apktool d [apkname.apk]` (e.g `apktool d WhatsApp`)
3. Find the extracted apk in the folder with the apk name (in this case (`C:\Apktool\WhatsApp`)
4. You can now browse through the folder to find all resources of the app e.g `manifest.xml` and PNG images in `res` folder or doing a search.

Acknowledgements:

Apktool a tool for reverse engineering
> 2 votes

---
Tags: applications, settings, apk
---


# Question
Title: How to get rid of duplicates in my telephone agenda?
After installing Skype a week ago, my telephone agenda duplicated a lot of contacts, for many of them I have seven duplicates - therefore eight entries for each contact.

After installing WhatsApp, I had this problem too - many contacts had one duplicate. But after installing Skype, the telephone agenda is a horrible mess. For each such contact, Skype added five or six more duplicated contacts.

I tried to delete one such duplicated contact and I got the message "This contact is read-only. It can't be deleted, but you can hide it." - and below this message I get the buttons "Hide" and "Delete", but I tried the "Delete" button and it works, so it actually can be deleted! Which is really inconsistent.

So the question is: how can I get rid of all those duplicate contacts? (without having to delete them manually, one by one, of course)

On other phones, you can access WhatsApp from the main contact, it doesn't have to be duplicated in order to send a WhatsApp message from the main telephone contacts list.

My phone is Honor 7s.

The Android version is 8.1.0

I am using the Nova Launcher but it acts the same with the Huawei Home launcher too.

# Answer
> 2 votes
The Skype duplicating contacts has been an issue for me and searching a solution in Google shows that the problem has existed for about 10 years, why the Skype developers can't resolve this is odd.

To try and reduce the problem then I left sync contacts off in Skype and never synced them, but still had many duplicates of the default phone sim entries i.e. customer services etc.

I've just found a method that has resolved the issue and all duplicates in my contacts (caused by Skype) have now vanished. The solution is to deny Skype access to the phone's contacts, you can still use contacts in Skype and add them there, even use Skype from a phone number link in a text file.

To deny Skype access to the phone's contacts (I'm using Android 10), then go to it's 'App info' page and select 'Permissions', select 'Contacts' and the deny option. I also Force stopped the App, cleared the cache and opened it again, all of which seem to speed-up the process of removing the duplicates.

To be able to update / sync my Skype contacts with the phone's contacts (could still be useful at times), then I'll temporarily allow access to contacts again, use the sync contacts in Skype, once done then disabled it and deny permissions again to avoid the duplicates re-appearing.

I've noticed after trying the above to temporarily sync my Skype contacts is that Skype just shows those contacts to invite and with the option in the address book of calling the number via Skype, all of which can be done directly with Skype and so I'll now leave it in deny access to the phone's contacts.

I had the contact duplicating issue on a previous phone as well running Android 6. In my case the issue is that Skype mainly duplicates contact entries from the phone sim card. I did remove the sim contacts but there are some permanent service entries there and so it had been duplicating those with over 10 entries for each. Great to see that the duplication has now stopped after denying Skype access to the contacts as per the details above.

# Answer
> -1 votes
in the contacts app, untick the "whatsapp, skype, etc.." from the "contacts to display" options, select "customize" and done!

---
Tags: contacts
---


title: Remove Termux's extra keys

text:
# Question
Title: Remove Termux's extra keys
I can reduce the extra keys on Termux to one row like this:

```
extra-keys = [[ESC, TAB, CTRL, ALT, {key: '-', popup: '|'}, DOWN, UP]]

```

but this doesn't get rid of them:

```
extra-keys-style = none

```

How do I get rid of Termux's extra keys?

# Answer
add the following line to the `~/.termux/termux.properties` file:

```
extra-keys = []

```

apply the changes by running (or restart Termux):

```
termux-reload-settings

```
> 4 votes

---
Tags: termux
---


# Question
Title: Can the Samsung Android phone be made to not lock the screen after 3 minutes?
I am using Android 11 and Samsung's OneUI 3.1 (updated as of May 1, 2021), and it'd show the "Lock" icon right at the center of the screen and dim everything down after 3 minutes.

All the other OnePlus or Xiaomi phone do not do that. If I follow the instruction online to go to Settings -\> Lock Screen -\> Lock Type to "None", it is still happening. Is there a way to disable it totally?

P.S. There was a "Screen Timeout" in one of the settings option, but (1) It is set to 30 minutes but the phone still shows the lock icon after 3 minutes, and (2) I'd like to set it to "never" but there is no such option

# Answer
Seems like I only see this particular lock screen when playing a game.

When the lock screen appears, tap the padlock icon near the bottom of the screen.

You'll then see an interface that allows you to add or decrease time. Tap the + several times to increase the screen lock to the amount of time you prefer, or even to never.
> 1 votes

---
Tags: samsung, samsung-one-ui
---


# Question
Title: How to automatically turn on the screen on double touch of turned-off screen?
Is it possible to turn on my Android 10 phone's (Samsung Galaxy S9) screen like my Android 11 tablet (Samsung Galaxy Tab S6), by double touching the turned-off screen? Or when detecting that it has been lifted up or somehow it changed its orientation a little bit?

I've searched this website but did not find something useful.

# Answer
> 1 votes
You can enable "Lift to wake" from: Settings -\> Advanced features -\> Motions and gestures

That's a feature in Samsung's OneUI.

# Answer
> 1 votes
You have two other options in addition to what Omar mentioned.

*Settings \> Display \> Navigation Bar \> Hard Press Home Button*

With this activated, there's an area at the bottom of the display, that when pressed, will wake the screen.

Also, if you set the Always on Display to 'Tap to Show', it will wake the Always on Display (might not be what you're wanting though).

*Settings \> Lock Screen \> Always On Display*

---
Tags: screen, android-10, touchscreen, android-11, sensors
---


# Question
Title: How to dictate single letters and number to Android?
at the job we routinely use a web application through our smartphones and on one of its screens we have to input the chassis number of cars, technically called V.I.N.. Just to let you know, a likely VIN could be something like "LJCP013X00123...4F"

We would like to dictate those VINs because we usually wear gloves while we use this web app.

Now... I tried to dictate single letters as "El", "Jay", "Cee", "Pee", "Zero", and so on.

But Android goes nuts, tries to come up with a word that obviously does not exist and just stop listening.

Do you know if there is a workaround to dictate single letters and digits to Android?

# Answer
> 0 votes
So it turns out this behaviour was partially dependant on our application. Our application used to mingle with the dictated text to convert in upper case and to remove blanks while dictating. Once this behaviour has been turned off, we are able to dictate letters and digits too.

---
Tags: voice-recognition, gboard
---


title: `UPDATE.APP` file in Huawei firmwares

text:
# Question
Title: `UPDATE.APP` file in Huawei firmwares
I found an `UPDATE.APP` file inside of TRT-LX2 firmware ZIP (ROM), but I want to know what does the file do? What does it contain?

# Answer
> 2 votes
Huawei OTA updates are traditionally slow for various reasons. However, Huawei let's users manually update their firmware manually and this is where `update.App` comes in. It has the `boot` and `system` image files.

User downloads the latest firmware from Huawei website, extracts this `update.App` and flashes it to update the firmware to the latest. See this blog for the steps. This process may vary for your device and it's best to check on XDA forums to be sure.

Broadly speaking this is the purpose of the `update.App`, though the process seems to have become more complicated over the years (I owned a Honor 6 phone about 4 years ago)

---
Tags: rom-flashing, rom, device-firmware
---


# Question
Title: How to remove the Ubuntu Touch kernel at startup?
I have tried the latest Ubuntu Touch on Nexus 5, but it was useless because an exential app doesn't work with Anbox. So i want to try an Lineage 18.1 unofficial image. I have installed the image with no problems. But I cannot remove/erase the ubuntu kernel at start. I have tried those commands

```
fastboot flash bootloader android/roms/twrp-3.3.1-0-hammerhead.img
Sending 'bootloader' (13290 KB)                    OKAY [  0.640s]
Writing 'bootloader'                               FAILED (remote: 'invalid bootloader image
')
fastboot: error: Command failed

fastboot flash recovery2 android/roms/twrp-3.3.1-0-hammerhead.img
Sending 'recovery2' (13290 KB)                     OKAY [  0.640s]
Writing 'recovery2'                                FAILED (remote: 'partition table doesn't exist')
fastboot: error: Command failed

fastboot erase bootloader
Erasing 'bootloader'                               FAILED (remote: 'Partition table doesn't exist
')
fastboot: error: Command failed

```

How to remove the kernel at startup?

# Answer
Solution found, works on Linux. The phone in example in Nexus 5 so you had to adapt to YOUR phone. WARNING: , I am not responsible for any kind of damage to your phone, follow this solution at your own risk. Connect the phone to usb port of a Linux pc, called "host", all commands must be run from this pc.

a)Download the factory image for Nexus 5 then connect the phone to pc WARNING: IS FOR NEXUS 5 HAMMERHEAD, you MUST select another image if use another phone.

ensure this command return the right thing

```
fastboot device

```

b)then extract the zip image, enter in the dir created and run

```
sh flash-all.sh

```

from the computer host

It will reboot in the factory image of Android 4(sic!) and then you can install Ubuntu touch or a "free" Android rom.
> 1 votes

---
Tags: linux, bootloader
---


# Question
Title: What is this random arrow in the centre left of my Chrome screen?
Arbitrarily an arrow appears on the center left of my mobile Chrome browser. I cannot even click this arrow. It doesn't really affect any underlying features of my web browsing, at least not on the obvious. It is just a bothering little arrow, which has no reason in being there.

My phone details are:

```
My phone is: Samsung Galaxy M31
Model: SM-M315F/DS
Application version: Chrome 92.0.4515.131
Operating system: Android 11; SM-M315F Build/RP1A.200720.012

```

Attaching screenshot of my Chrome browser where the arrow can be seen.

As far as I can recall, this arrow disappears without any apparent activity. Had anyone seen this? Or can shed some light as to what this is? And if it can be removed?

# Answer
As suggested in Google forums-When I rotate the phone an obnoxious arrow overlays the middle of the screen?, force stopping worked. You may try restarting if issue is not resolved.
> 0 votes

---
Tags: samsung, chrome-for-android
---


# Question
Title: Is Google Authenticator data saved in the google backup cloud?
is the Google Authenticator saved with the google backup like wifi passwords, settings, gmail and some other google aps? If I will reflash my current system or make a clean install will it be backed up with all the codes form websites I have there? I do not want to loose it and it will be a lot of work to go to every site I have there, revoke 2step verification and then do it again with new system

# Answer
Google Authenticator in version 5.00 (as of now) permits backup, but only preferences are backed up, and the critical data (secret keys which creates those codes the user need) are not backed up at all. ADB can also back it up with the command:

```
adb backup -keyvalue com.google.android.apps.authenticator2

```

I'm making this claim based on the presence of the attribute *android:allowBackup* set to *true*, and presence of key-value pairs backup provisions in its manifest and a dedicated backup agent is also listed, named *com.google.android.apps.authenticator.backup.AuthenticatorBackupAgent*. This certainly wasn't the case with prior versions.
> 2 votes

# Answer
**Google Authenticator in version 5.10 (as of 2020 now, *finally*) permits backup of all keys (which can then be saved by screenshot to Cloud, or transferred between phones), just update and click your GA toolbar.**

*Please reference I reformulated for the prior/older version information.*
> 1 votes

# Answer
Unfortunately, you can’t back up your Google Authenticator. Some services provide backup codes (such as Google Authenticator). You should save them in some safe place and use them if you lost your phone or reflash your current system. For other websites, you should save QR codes or secret keys in the process of token enrollment. If you have these QR codes you will be able to restore your tokens on any device. If you didn’t save backup codes or QR codes and lost an access to your Google Authenticator, you should contact the Support Team of services which you protect with the Google Authenticator. They will help you to restore an access to your account. Then you will be able to issue new tokens.
> 0 votes

# Answer
Yeah, not being able to export and save is a major pain in the be-hind! All you can do is display the codes and scan them with the new phone. Useless if the original phone screen is broken, and not much help to restore an existing phone (as I found out!)... But you can take a photo (using a normal digital camera) and save them that way...
> 0 votes

---
Tags: applications, factory-reset, google-authenticator
---


title: Activating VoLTE in Moto X Force

text:
# Question
Title: Activating VoLTE in Moto X Force
I had recently had a hand on my friend's Moto X Force 1580. The phone works on Android 7.0. I went through the web and found out some guys claiming to make Moto X Style to work on VoLTE. I followed the same procedure but had no luck. Following is the procedure that I went through.

1. Dial `*#*#4636#*#*`
2. A hidden menu would start, select "Phone Information"
3. In this window, there is a switch that says "VoLTE provisioned". This by default is off, turn this on
4. Restart the phone.

I tried this number of times, but it turns back off every time.

Can anyone help?

# Answer
Basically what you want is to keep your phone in 4G LTE while making/receiving a call, but it is dropping to 3G/2G, right?

I have worked in 2 big Android phone manufacturers on Software teams. And both had the same policy. It's too risky to enable any feature on an Smartphone without tests.

And VoLTE/VoWifi/ViLTE and now VoNR (5G) are all enabled/disabled carrier by carrier. One of the reasons your phone has VoLTE disabled for you carrier could be:

* You bought the phone in a different country than where you are using it.
* When you bough the phone, you carrier didn't support VoLTE at the time. And the cost to test and enable it now is too high for a phone that is not been sold anymore.

So you could try to put a SIM card of a different carrier to see if VoLTE is enabled. Try the biggest carriers of your country.

There is a service named "carrier\_config" that handles all IMS enablement. You can type:

```
$ adb shell
$ dumpsys carrier_config | carrier_volte_available_bool

```

To confirm the parameter. You'll probably get: carrier\_volte\_available\_bool = false

But unfortunately I don't know how to set it to true using ADB. I only know changing the source code.
> 1 votes

# Answer
Your phone doesn't support VoLTE
> 0 votes

---
Tags: moto-x, voice-over-lte
---


# Question
Title: How to safely delete/destroy data from a bricked phone?
I have a "Xiaomi Redmi Note 8 Pro".

My phone is bricked beyond repair (as far as I can tell). I want to safely delete all data before I throw it away.

Can I drill a hole in somewhere? I do not what to risk my health by short-circuiting the battery or something like that.

Edit: My lock screen has 4 digits.

# Answer
Unless you have a means to power the device on and wipe the data properly, you need to physically destroy it. The data lives inside an eMMC chip which is conceptually just a SD card soldered to the motherboard. It will not be damaged by salt water (suggested in another answer) or other means that do not physically break the chip into tiny bits. Unless you understand how it works well enough to judge what would destroy it, just assume most things don't.

Pry the phone open, remove the battery, then destroy the rest of the phone physically in a trash compactor or whatever.
> 3 votes

# Answer
Option 1) In case the phone still boots in recovery mode (usually hold Vol Up and Power-on) and you have root access you could run the command:

```
dd if=/dev/null of=/dev/block/by-name/userdata

```

This will put 0x00 to all your userdata.

As you said, the risk of drilling the battery with a drill is too high.

Option 2) If there is no power at all, you have to open the device to find the main board and destroy it. And it's a little complicated process because you have to put heat on the screen to unglue it from the back part. And then just remove the main board and put holes on every shield you find.

Option 3) I have seen many phones been destroyed by a professional company. What they did was to put the phone into salt water for about 30 minutes. It makes all boards completely unusable.

If you're just a regular user (not a public person) option 3 should be enough. But if you are really, really worried about your data getting in wrogn hands, I would say option 2 is better.
> 1 votes

---
Tags: delete
---


title: What are the changes made to Magisk?

text:
# Question
Title: What are the changes made to Magisk?
John Wu, developer of Magisk, published a blog State of Magisk:2021, a couple of days ago which led to some confusion as to what is to be expected.

Can the changes be explained in *non-technical* language?

**Note**: This is a self-answered question as a reference, consolidating from various sources. Moderators are welcome to convert this into a wiki in case future developments are added by other users.

# Answer
> 5 votes
**References:**

1. State of Magisk: 2021 by John Wu (you need a medium account to access (free)
2. Explanation by Chris Renshaw (better known as osm0sis on XDA)
3. Magisk is dropping support for hiding root access from apps \- XDA blog

John Wu is working with Google (after interning with Apple!) and there have been no updates to Magisk since then, because his job is working with Android security.There is therefore a clear conflict of interest (he has full access to source code) which prompted changes(below). As asked in the question the explanation in the answer is for a *non-technical* user (like me).

# MagiskHide reaches end-of-life

This was always a hide and seek game as explained here Magisk will fail Safety-Net hereafter. Why?.

* Magisk hide will retain a minor subset of infrastructure for apps to fully “opt-out” of modding\[1\], which is explained

> MagiskHide is gone but will be replaced by a module, most likely very soon, which by the way can be even more powerful now thanks to @topjohnwu implementing a "**Zygisk**" hooking API a la Xposed.\[2\]

> Basically, MagiskHide will no longer be hiding root access from apps and will instead be used to ensure that user-selected apps won’t be modified. Making it easier to revert changes will also speed up testing on emulators, as developers will no longer have to reboot or patch emulator images.\[3\]

**Zygisk? What's that?**

> **Zygisk** is Magisk in Zygote. This will run parts of Magisk in the zygote process to make Magisk modules even more powerful\[1\]

> Zygote is the OS process that handles forking each application process, so running parts of Magisk in the zygote process will make modules even more robust (including making root-hiding even more powerful).\[3\]

# The end of the centralized Magisk Module Repo

> Modules aren't gone, just the official repo module list won't be shown in the app anymore. The official repo will change hands, but still exist and be maintained. The app will eventually allow adding multiple module repos, so you'll be able to add the former official back.\[2\]

> Another upcoming change to Magisk is the removal of the Magisk module repo from the app. The integration of the Magisk-Modules-Repo into the Magisk app is what currently allows users to search and download modules from within the app. Its removal will mean that users will have to manually download module ZIP files and install them from within the app, which is a little inconvenient compared to the existing solution but not difficult at all to do. Plus, apps that come with a Magisk module component can easily install the module for the user by running the magisk `--install-module` ZIP command, taking the manual step out of the equation for users.\[3\]

> The bigger loss, though, is for discoverability of new modules through the centralized, curated repo, but topjohnwu says the **Magisk-Modules-Repo will be transferred to “trusted community members”** soon. This means the **repo itself won’t be gone**, but the app won’t point to it for now. Eventually, though, topjohnwu does want to **let users point the Magisk app to whatever online module source they want**, kind of like F-Droid, but this isn’t a high priority for him to implement at the moment.\[3\]

# What won't change?

> Root access in apps, and terminal root prompts with `su` will remain working, as always.\[2\]

---

**Edit: 03 September 2021**

The Magisk manager stub responsible for hiding the manager was closed source. It has now been made open source.

---
Tags: magisk, systemless-root, root-cloak
---


title: Streaming radio in Android

text:
# Question
Title: Streaming radio in Android
I like a couple of Internet radios that I'm currently able to listen to using CorePlayer under Windows Mobile, VLC and WMP on PC. I own the .m3u files for both `www.radio21.ro` and `www.vibefm.ro`, but when trying to open with different players they won't get played. NSWPlayer crashes, RockPlayer says the file can't be played with System Player.

Any tips?

# Answer
Try TuneIn Radio, it has both stations, and it's great (and free)!
> 3 votes

# Answer
M3U files store playlists. The M3U files you are trying to run just have a list of URLs to the radio stations. You can only play M3U files on your Media Player if the player supports playing them.
> 1 votes

# Answer
You can use VLC for Android.

Click the "More" button with three dots in the lower right corner, click the "New stream" button and paste in your URL and you are done.

The main benefits are that VLC is free, open-source, has no ads and on top of that can play just about anything (video or audio).
> 0 votes

---
Tags: music-player, streaming, internet-radio
---


# Question
Title: Can't figure out how to enter recovery mode on Samsung A10s
I have a new Samsung A10s Android phone and I forgot the PIN and remote unlock is turned off.

I don't care about the data on the device so I'm trying to enter the recovery mode to reset it but I can't seem to reproduce the steps to do so. I tried various combinations of holding down the power button and volume up or down button then releasing the power button but it just keeps going to the regular lock screen. One time I got it into safe mode but that was just the lock screen. There may be some timing trick I'm missing with when I release the buttons but I'm not even sure which buttons I'm supposed to press and in what order.

I tried phone support and they insisted I had to keep the power button held down throughout but then the device just kept restarting.

Saw online someone suggested letting the phone battery die first and then trying again after plugging it in and turning it on so waiting to try that now. (I can't just turn off the device because it asks for the PIN to do that, which makes no sense.)

# Answer
I was finally able to get into recovery mode by waiting for the battery to die, plugging it in, giving it a couple minutes to charge, then holding the volume up + power buttons down until the Samsung Galaxy A10S logo showed up.

Then it booted into recovery mode and I was able to do the factory reset and then power off the device.

Then I turned it on normally and went through the setup process, and used my Google account to bypass the factory reset protection. Fortunately this was an option for me because otherwise I’d still need the PIN.

I found this solution on Reddit, so big thank you to u/Paramveer\_singh.
> 1 votes

---
Tags: samsung, recovery-mode
---


# Question
Title: Quick Settings enable/disable each setting/icon on lock screen
I noted on one of my phones in Quick Settings (dropdown) e.g. Wi-Fi icon is enabled on lock screen, on other phone it is asking for screen-pattern. So I want a way to customize this. I've read that article How to Tweak and Rearrange Android’s Quick Settings Drop down-bar Then tried to find out if at least on rooted phones GravityBox app has this tweak but could not find info, only links where all menu is enabled/disabled. Is there a way to set for each icon/setting to be enabled/disabled on locked screen?

Added: by disabling I mean phone allows to use setting w/out unlocking the screen. The setting icon may be present on locked screen, but require unlocking when tapped. Other way setting is visible on unlocked phone but hidden on locked screen. Enabling is the opposite. E.g. many phones from stock setup allow flashlight to be activated on locked screen, but do not allow mobile data connection to be turned on/off. I'm looking for ways to change it - e.g. disable flashlight, enable mobile data connection on/off from locked screen via quick settings.

# Answer
> 1 votes
> I'm looking for ways to change it - e.g. disable flashlight, enable mobile data connection on/off from locked screen via quick settings.

Yes, GravityBox can let you do that. See screen shot below

Take Wi-Fi for instance. If configured as shown, from quick settings via lockscreen, one **cannot** enable Wi-Fi. Because tick means *protected while screen is locked*

However, if you do not tick the Wi-Fi box, you can enable it from quick settings in lock screen mode without entering password.

In addition, some GravityBox specific tweaks like NFC (not stock NFC), Ringer mode, volume, network mode, smart radio, sync, Torch (of GravityBox), sleep, stay awake, quick apps and many more can be be configured to be added to quick settings and managed as described.

Edit: More features that can be added to Quick settings below (in addition to the ones listed). If you tick the second box on right against the feature (currently greyed out), they cannot be enabled from lock screen.

---
Tags: lock-screens, quick-settings, gravitybox
---


# Question
Title: Where's the list of TLD that are converted to link in SMS?
When you send an SMS/Text, the Messaging app converts to clickable link certain patterns of text, when it matches a URL.

Of course I can use the Android emulator to emulate SMS messages and check what top-level domains (TLD) are converted to link. But I was curious and wanted to know the complete list. I have searched the source code of the stock Android app and even other projects (QKSMS) but found nothing.

P.S. When you prefix the URL with 'http://' all TLD are converted to link. Update: My first test (see screenshot) corresponds to Android 7. I've checked that Android 9 recognizes new TLDs.

# Answer
It seems that, at some point in the dependency tree, one of the hundreds of the imported libraries will import `com.google.common.net.InternetDomainName`. That library contains https://android.googlesource.com/platform/external/guava/+/refs/heads/master/guava/src/com/google/thirdparty/publicsuffix/PublicSuffixPatterns.java

That has an encoded version of Mozilla's https://publicsuffix.org/list/public\_suffix\_list.dat
> 1 votes

---
Tags: applications, sms, url
---