# Question
Title: Problems with the DNS Network part (or maybe virus/malware-related) on Android 6.0 Marshmallow (Alcatel Vendor)
I've been experiencing some strange problems maybe that be related with the DNS Network part in Android 6.0 Marshmallow, and could mention these two origins as the main likely sources of problems:

• Due to recent Network changes, as the adding of a new Router on the Network, the same that might have caused some conflicts recently;

• Maybe due or the low quality signal or an insatisfatory range on the space of my Home on my Wi-Fi Repeater, that insists in to fail sometimes recently, and also, maybe, needs to be resetted, for clean its cache, avoiding conflicts and mal-function.

I could mention that in Google Chrome for Android, is common to occur these two error codes below:

* "ERR\_ADDRESS\_UNREACHABLE";

. And this last error shown, after a power offing of Wi-Fi, and after yet of this action a Restart of the OS, for so then power on again the Wi-Fi, all DNS Network resolvings stayed going back to function correctly during a certain period of time:

* "ERR\_NAME\_NOT\_RESOLVED" .

\*( according to this webpage, DNS related:

**\<https://forums.androidcentral.com/ask-question/557992-how-can-i-fix-err\_name\_not\_resolved-my-sg4.html\>** )

**Note:** Only Incognito Mode on Google Chrome works Ok for now. The YouTube, Mozilla Firefox and Google Play all them are currently refusing to work correctly on my initial tests.

**URL Address References:**

**\<https://support.google.com/chrome/forum/AAAAP1KN0B0sv0YttC20cU/?hl=en\>**

Browsing on the Web on my Smartphone since yesterday is being problematic.

This page below, describes the main reasons for the DNS problems on Android 6.0 codenamed Marshmallow (or maybe serves to other versions too):

**\<http://www.androidbeat.com/2015/12/how-to-fix-wi-fi-problems-android-6-0-marshmallow/\>**

. Reading this Article above superficially initially, I could confirm that only a Restart resolved temporarily the problem (or an 'issue' how you may prefer to call it) for me at the moment, and I stayed knowing that only Incognito Mode is working correctly for now (using this Google Product Forums Reference):

**Chrome keeps telling me that site can't be reached?**

After, the same problems/issues back to occur again, as if nothing had been done in respect. Practically only Google, and some https Forum websites are loading and finishing its page loadings, these without any errors on the Google Chrome normal mode. My Android is configured with the DHCP Mode, so it's sounds like as strange that a conflict can still be there, if DHCP resolves the things automatically on the Network (as my understanding about these knowledges), without any intervention of the user. Doing on/off of my Wi-Fi on my Smartphone equiped with Android Marshmallow, normally would help on the DNS problem. I don't touched in any DNS parts since a long time ago, and I don't remember what I've did to fix DNS resolvings problems when it started to occur at that last time. The Advanced Configurations on Wi-Fi are hidden on my Android Smartphone (signal that these parts should not be altered, without any knowledge prior this -- I haven't altered anything there).

As all the solutions on this page below are esgoted:

**\<http://www.androidbeat.com/2015/12/how-to-fix-wi-fi-problems-android-6-0-marshmallow/\>**

seems like or this is a inconsistence on Network DNS part (that I'm not aware how to resolve and diagnose), or a recent bug introduced by Google on Android recently (again?), as described on the above provided url address. Drastic solutions, in addition to the procedures that I already performed as "clean cookies on the web browsers" or "restart the mobile device", procedures like "restore the device to the original factory settings" will be totally avoided here.

Any thoughts? Is there an App for Android that automatically finds and resolves DNS problems, or inconsistences on Android, available on Google Play Store? Don't knows about any logical solution, or trivial fix, because I'm a newbie when the subject is Network. And my Android is closed for alterations, so, despite as I'm experienced and familiar with Linux commands, I still can not properly use the Terminal Emulator on my Android from Alcatel, because many functions on the ROM from Alcatel Vendor are locked for access and alterations by the user, these customizations coming from the Manufacturer.

Please ask me for more information, if do you see this as necessary.

No more information I could provide here at the moment, except if asked by some of you here on this Forum.

# Answer
Try the new Cloudflare app "1.1.1.1" It will give you privacy enhanced DNS which will circumvent your ISP.

I am not associated with the app or its vendor.

I recently learned that my mobile vendor provides my phone with its DNS results. I had been under the impression that Google DNS servers were always used by Android. Whether my mobile provider is providing DNS through proxy or DHCP, I don't know. I don't care. I don't want them seeing my requests. The "1.1.1.1" app prevents it. It would also provide you with highly reliable DNS independent of your mobile provider.
> 1 votes

# Answer
**NEVERMIND** (for the moment). Maybe was the ISP that was having problems on the Network by some instability on the environment of the Internet Provider. Now the Internet access is correct. If the problems come back, I'll reopen this Topic. Never had seen this kind of problems happening before on my Mobile Internet Browsing experiences.
> 0 votes

---
Tags: wi-fi, 6.0-marshmallow, connection-issues, malware, dns
---


title: How do I "unroot" my android device

text:
# Question
Title: How do I "unroot" my android device
Now with Pokemon GO pushing the new update and not allowing rooted devices in the game, I want to reverse that.

So how do I unroot my device

**Bonus**: How do I manipulate the app into thinking I do not have root access

**Edit**: I used SuperUser's Full unroot option but it does not remove root access. Either SuperUser has a problem or my phone's jacked up

# Answer
If you want to unroot only to play Pokemon Go, you don't need to do so.

Just root with Magisk:

Now, to hide root from Pokemon GO:

* Go to Magisk Hide and enable Pokemon GO
* Go to Settings, and press on Hide Magisk Manager

It will take a while, just let it work. When it finishes, reboot your device and open Pokemon Go. If it still detects root, clear the data of Pokemon Go.
> 1 votes

# Answer
**How to Unroot**

1. Open SuperSU and go to the settings tab.
2. Scroll down and press "Full unroot".
3. You'll be asked to confirm you want to fully unroot, press continue.
4. SuperSU will close when finished, now restart your device.
5. Now uninstall SuperSU and you should be unrooted.
**Make Pokemon GO think you're unrooted**
An application called Magisk can do this. I have not tried it, but you're meant to be able to "turn off" root when playing Pokemon GO, and back on again when you're not. This will also work for Android Pay because it also uses the same method to detect root.
I would probably try this one:
Magisk! – How to Play Pokemon Go on Rooted Android!

Or you can search online for other tutorials on how to do this.
> 0 votes

# Answer
You don't need to unroot. You can use Magisk to hide your root status. Head over to XDA to learn how to do it.
> 0 votes

# Answer
## First How to Just Unroot the Device

You can unroot the phone by opening SuperSU app and choosing full unroot (or just removing /system/bin/su is sufficient usually, and can be done with a file manager like ES File Manager (left hand tray has tools header and under that is the root access toggle and Mount R/W tap that and select /system to be rw) you can then delete the su binary in /system/bin (sometimes /system/xbin though this is more rare)).

## More Detail and possible solutions \[First Guest Account\]

I do not know of any direct ways of hiding SU from apps, but you could try a guest user and if you leave the multi user option in SuperSU unchecked then the guest user account may be able to run the app and the app may not see the root.

## More Detail and possible solutions \[Second Unroot then use Custom Recovery to Apply Root when Done\]

You can lose root and be OK if you maintain the custom recovery. Then what you could do is do full unroot from inside SuperSU app and restart device. Now install and/or run Pokemon GO!. When done restart to recovery and flash SuperSU.zip and restart again. Now you will have root access back until next time you wish to play Pokemon GO!.

## Editorial \[some Concern for Users from the Author\]

Now you do realize Pokemon GO! was done by an NSA contracted company and is used by the government as a general spy tool (think about it a bunch of people running anround with phone cameras and mics running is a wet dream for those guys), so you may want to re-think what games you play and what permissions you are allowing apps running on your devices to use (same guy that designed Google Earth Originally for the CIA/NSA before Google Bought it and same guy who wrote the Game Ingress that was originally done by a company under direct CIA contract before Google bought them).

Reference \[I'm not just a conspiracy theory nut without backup proof ;-)\]: https://www.corbettreport.com/the-cias-pokemon-go-app-is-doing-what-the-patriot-act-cant/ http://www.networkworld.com/article/3099092/mobile-wireless/the-cia-nsa-and-pokmon-go.html
> -2 votes

---
Tags: root-access
---


# Question
Title: sync contacts from Samsung S5 to Google account
my phone says it has synced contacts to my google account but when I log into the google account there are no contacts. what am I doing wrong?

# Answer
• You sure that device doesn't have 2 different gmail accounts added. Might be the contacts backed up is in 'account 1' and you're looking for contacts in 'account 2'.

In case you have only one account added to the device, check this.

*Open Settings/Accounts/Google.*

Or

*Open Settings/Cloud and Accounts/Accounts/Google.*

Click your account, there you will see different options that can be enable or disable as per user choice. Make sure 'Sync Contacts' is enabled for that particular account. Tap above 3 dots on the upper right corner on the screen and click 'Sync Now'.
> 2 votes

# Answer
https://contacts.google.com

that is the site you have to go to see if you have any contacts on the google account. If there aren't any or there aren't one you synced, then it is probably phone sync problem.

I would rather suggest you to export all contact to storage then, import them, but while importing them import to google account as it gives you an option to do that. That should fix your problem. And, yes, delete the phone contacts after syncing, as they might cause "doubled contacts"

Make sure you have proper working internet connection while doing that, poor connection might also cause trouble while syncing.
> 0 votes

---
Tags: samsung
---


# Question
Title: How do I install Google Pixel Launcher on HTC U Ultra?
I used to be able to use the Google Now Launcher on my old HTC U Ultra device. Now I got a new device with Android 8.0.0 and here I cannot install the program anymore. How can I fix that?

Edit: I learned, that Google Now Launcher was replaced by Google Pixel Launcher which is not available on Play Store on this phone but can be downloaded from apkmirror.com.

# Answer
> 3 votes
* Google Now Launcher was Google's first public launcher, and it was shipped on Nexus phones as well as millions of other devices, which was a simpler launcher for Android Ecosystem.
* The Google Now Launcher is now listed as incompatible with almost every Android device in Play store.
* Google announced retirement of Google Now launcher in Feb 2017.
* The current default launcher by Google is Pixel Launcher, which released for Pixel devices.

You can download google now launcher from apkmirror website, and try to install it. The last build available is of Dec 6, 2017\[link\].

* Pixel launcher is available on Play Store, but not available for every devices(mostly for pixel devices). But, you can download Pixel Launcher from this link.

Download apk from apkmirror website which suits with your device's android version, architecture, screen DPI. This FAQ link may help you to find right apk for your device from apkmirror website

# Answer
> 2 votes
If I'm getting correct, here is the direct download link of it through apkmirror, you only need to confirm it when pop up comes from your download manager.

Above one is latest version of Google Now Launcher and it was lastly updated in Nov,2017. Since then no official updates from Google.

There could be another solution to your problem. If you have any problem downloading by searching here and there, you can avoid it and simply download it from playstore on any operable/compatible device then share it to your phone through any 'Sharing App'.

---
Tags: launcher, 8.0-oreo, google-now
---


# Question
Title: Error: Google Play Services keep stopping
This errorr message keeps flashing. I tried the solutions offered but on Settings the google play services app does not open the disable or force stop buttons. I tried uninstalling updates but I get the message that it can't uninstall because google is an device administrator. Switching off my mobile data and wifi did not work, switching the device off and on did not work. Any other advice?

# Answer
> 4 votes
Open *Settings/Apps/Google Play Services/Storage.*

Click *Manager Storage* and Click *Clear All Data.*

Then Re-install Google Play Services.

---
Tags: samsung
---


# Question
Title: Is it possible to get root permission using Magisk in Work Profile?
I had flashed Magisk in the recovery, but when I run Magisk Manager in Work Profile it says Magisk is not installed. Does this imply that there is an independent recovery for Work Profile as well? Is there any way to gain root access in Work Profile?

# Answer
Choose `User-independent` option in `Multiuser Mode` Settings of Magisk app.

User profiles and multi users are managed inside OS, nothing to do with recovery.
> 2 votes

---
Tags: root-access, 9.0-pie, magisk
---


title: Accessing light sensor raw data

text:
# Question
Title: Accessing light sensor raw data
Is it possible to access light sensor raw data logs from an Android device (in my case, an LG Optimus)? If so, how is this possible and what format would the log be in?

# Answer
The Android system monitors the light sensor (for things like auto-adjusting the backlight), but to my knowledge doesn't specifically log that data by default.

You can get an app like AndroSensor which allows access to all your phone sensors and can monitor and log the data for you.
> 1 votes

# Answer
Sadly, although Android does have light sensor data, it does not store it anywhere (as far as I'm aware anyway). Luckily, there is a *very* simple way of accessing and storing the data yourself!

Just follow the steps below, and you should be up and running with light sensor data in no time!

---

1. Download **Tasker** from the **Play Store**
2. Make a new **.txt** file in your documents folder and name it to `Light_sensor_data.txt` (You may need a file viewer/editor such as **File Explorer**).
3. Open **Tasker** and click `+`**Event****System****Device Boot.**
4. Click on the gear (back) in the top left corner.
5. A pop-up menu will appear. Tap on **New Task** and name it `Light Sensor Data` (Or whatever you want).
6. Within the task, click on `+`**File****Write File**.
7. To the right of where it says **File**, there is a magnifying glass; Click on it.
8. Now tap **Documents****Light\_sensor\_data.txt**
9. Click the "pencil" to the right of **Text.** Now scroll down the list that says **Variable Select** and find **Light Level**. It is close to the middle.
10. Now click the **Gear** or `Back` button.
11. Tap `+`**Task****Wait**. If you need your results to update quickly, I would suggest setting **MS** to anywhere between `10` and `100`, however this will use a lot of CPU so if you're ok with slower updating results, I would set **Seconds** to between `1` and `5`.
12. Once again, click on the **Gear** (back). Now select `+`**Task****Goto** and set **Type** to `Action Number` and **Number** to `1`.
13. Tap the **Gear** (back) twice to get to the **Tasks** screen. Now click **Profiles** at the top of the screen.
14. Tap on `+`**Event****System****Device Boot** and click the **Gear** (back). A menu should pop-up; select **Light Sensor Data.**
15. On the **Profiles** tab there should be a **On/ Off** switch to the right of your **Task.** Turn it to `Off` and then back to `On`.
16. Restart your device.

**Important note**: not only you must have a light sensor on your device, but it must also be enabled. You can check if it is enabled or not by hitting the three dots in the upper right corner of tasker → Preferences and selecting the *monitor* tab. Now scroll down to *Light Sensor* and ensure that *Yes* is selected.

---

Given that everything was setup properly, you should now be able to access light levels by reading **Light\_sensor\_data.txt** You can also *read* the light level data using **Tasker** and even create a pop-up displaying the current information.

Good luck, and I hope this helps you.
> 1 votes

# Answer
I have a rooted Samsun 7 device (sm-g935v) and I can read the raw data from: `/sys/class/sensors/light_sensor/lux`
> 1 votes

# Answer
Easy way to access it is to install Termux, a Linux terminal emulator that gives you access to the Linux commands on Android. On Samsung A3, you can access the data with

```
cat /sys/class/sensors/light_sensor/lux
cat /sys/class/sensors/light_sensor/raw_data  #alternative

```

You can install Python with Termux and write a Python script that will read the content of these files, and publish it on any Pub/sub system with MQTT. I've tried Mosquitto, and it works perfectly with Termux. You can even publish to cloud IOT of either AWS or Microsoft or Google. Any IoT broker will do.
> 0 votes

---
Tags: sensors
---


title: Flash Galay S 3 Mini on Linux

text:
# Question
Title: Flash Galay S 3 Mini on Linux
I tried to root my Samsung Galaxy S3 Mini (GT-I8190) to pull the boot.img to flash a custom kernel.

However rooting doesn't seem to be that easy for the Galaxy S3 mini. I was recommended to flash a custom recovery (CWM) to be able to install a random ZIP update file, which is rooted. (I can't believe, it's that difficult, but it seems like...)

So I downloaded all the necessary files (CWM and Update.zip) and looked for a Flashing software. Quickly saw, that `fastboot` didn't work (Seriously Samsung?!). So I looked for other tutorials *NOT including Odin*, since I'm working on Arch Linux. I finally found *Heimdall* and built it.

So I thought I could now flash the recovery. In my PIT, the Partition no. 20 (Index 19) and with the name "Kernel2".

So I tried to flash it: `heimdall --Kernel2 recovery.img` and `heimdall --19 recovery.img`. Both reported success, on both methods, the device download screen showed, that the download was complete and the device rebooted.

Still stock recovery

I even tried to flash the Android kernel (Index: 20, Name: "Kernel") with my compiled boot.img, which didn't contain a ramdisk (I don't care, if the device is lost. It's a test device). And it booted. With stock Android.

What's even wierder, is that my device shows:

`CUSTOM BINARY DOWNLOAD: YES (5 counts)`

`CURRENT BINARY: CUSTOM`

`SYSTEM STATUS: CUSTOM`

So it did in fact receive the images, but didn't flash them somehow.

Thanks for reading that question and even more thanks for helping!

# Answer
> 1 votes
Ok, I figured it out.

I had to run it with root permissions.

I don't know, if I've overseen the sharp in the instructions, or if it really wasn't mentioned.

Anyways. Here's my solution, if you're asking the same (in order to not be that guy )

---
Tags: samsung, rom-flashing, heimdall
---


# Question
Title: Preventing auto login to the default email on an android tablet
When using an android tablet for the first time, I have to set a default email google account.

When I click on the Gmail icon, it automatically log into my gmail account.

Is there a way to prevent the system from automatic logging in to the default gmail account by clicking on the Gmail icon.

I am seeking a way to force the system to ask for my gmail login password each time there is a try to login to my account by clicking on the gmail icon. This is to prevent anyone who could manage to use my tablet from logging in to my gmail account.

# Answer
If it is possible to sign out, the login will appear the next time you try to sign in like signing out from the desktop or laptop. However, it is not possible to sign out of Gmail for Android unless you remove your account as stated in Sign out of Gmail

> The only way to sign out of the Gmail app is to remove your entire account from your phone or tablet

A possible solution to add a security layer before opening Gmail app is to install an app lock from Google Play Store or any market of your preference. These apps allow to lock individual apps. You will still be login to your Gmail account but before opening the app, you will be prompted to enter a pin or pattern.
> 2 votes

---
Tags: gmail, google-account
---


# Question
Title: How to duplicate screen on a secondary monitor in Phoenix OS?
I usually use my laptop as a CPU. I put it aside and it is connected to a screen via a VGA cable. Recently, I installed Phoenix OS in my laptop, but nothing was displayed on my secondary monitor. In windows 10, I only have to press "Windows + P" to see split screen option, but in this OS I couldn't find such settings.

How to get that setting?

# Answer
Replace with this command on `grub.cfg` (if dual boot with Windows 10, then search how to edit `grub.cfg` on Windows 10):

```
menuentry 'Phoenix OS--ext display' --class android-x86 {
    insmod part_gpt
    insmod fat
    search --file --set=root /EFI/PhoenixOS/kernel
    linux /EFI/PhoenixOS/kernel quiet root=/dev/ram0 androidboot.hardware=android_x86 SRC=/PhoenixOS vga=788 video=1920x1080 video=eDP-1:d
    initrd /EFI/PhoenixOS/initrd.img
}

```

where `1920x1080` is my secondary display resolution, `eDP` is my laptop screen, and `-1` disables it. In your case, it may be `LVDS-1:d`. Try to add both.
> 3 votes

---
Tags: external-display, phoenix-os
---


title: Disable "open with" in chrome

text:
# Question
Title: Disable "open with" in chrome
How do I disable the "open with" feature in chrome on android? An alternative would be to have chrome itself in the list of alternatives.

# Answer
> 3 votes
Apps has an option as 'In-App Browser' which enables an app to open links within the app and it can be disabled by disabling 'In-App Browser' in that particular Settings of App.

For another thing like clicking twitter links, for ex- 'https://t.co/something' we have two ways either clear default app in settings that enables system to ask you from which app you want to complete this task or copy the link(s) and open it in browser itself.

---
Tags: chrome-for-android
---


# Question
Title: Huawei bootloader: what is "FB Lock" and how to unlock it?
I was playing around with my spare Huawei phone trying to bypass the security without wiping data and came along this article: https://blog.salvationdata.com/2018/09/07/case-study-mobile-forensics-a-practical-solution-to-unlock-huawei-bootloader/

In step 3, you should "temporarily disable FB lock". **What does this mean and how do I unlock it using fastboot?** I suppose, that I cannot do that using standard *fastboot oem unlock* command, but I couldn't find anything else in the fastboot documentation.

EDIT: Result of *fastboot help* command as requested: https://pastebin.com/2rhr1PTT

```
platform-tools$ ./fastboot help
usage: fastboot [OPTION...] COMMAND...

flashing:
 update ZIP                 Flash all partitions from an update.zip package.
 flashall                   Flash all partitions from $ANDROID_PRODUCT_OUT.
                            On A/B devices, flashed slot is set as active.
                            Secondary images may be flashed to inactive slot.
 flash PARTITION [FILENAME] Flash given partition, using the image from
                            $ANDROID_PRODUCT_OUT if no filename is given.

basics:
 devices [-l]               List devices in bootloader (-l: with device paths).
 getvar NAME                Display given bootloader variable.
 reboot [bootloader]        Reboot device.

locking/unlocking:
 flashing lock|unlock       Lock/unlock partitions for flashing
 flashing lock_critical|unlock_critical
                            Lock/unlock 'critical' bootloader partitions.
 flashing get_unlock_ability
                            Check whether unlocking is allowed (1) or not(0).

advanced:
 erase PARTITION            Erase a flash partition.
 format[:FS_TYPE[:SIZE]] PARTITION
                            Format a flash partition.
 set_active SLOT            Set the active slot.
 oem [COMMAND...]           Execute OEM-specific command.

boot image:
 boot KERNEL [RAMDISK [SECOND]]
                            Download and boot kernel from RAM.
 flash:raw PARTITION KERNEL [RAMDISK [SECOND]]
                            Create boot image and flash it.
 --cmdline CMDLINE          Override kernel command line.
 --base ADDRESS             Set kernel base address (default: 0x10000000).
 --kernel-offset            Set kernel offset (default: 0x00008000).
 --ramdisk-offset           Set ramdisk offset (default: 0x01000000).
 --tags-offset              Set tags offset (default: 0x00000100).
 --page-size BYTES          Set flash page size (default: 2048).
 --header-version VERSION   Set boot image header version.
 --os-version MAJOR[.MINOR[.PATCH]]
                            Set boot image OS version (default: 0.0.0).
 --os-patch-level YYYY-MM-DD
                            Set boot image OS security patch level.

Android Things:
 stage IN_FILE              Sends given file to stage for the next command.
 get_staged OUT_FILE        Writes data staged by the last command to a file.

options:
 -w                         Wipe userdata.
 -s SERIAL                  Specify a USB device.
 -s tcp|udp:HOST[:PORT]     Specify a network device.
 -S SIZE[K|M|G]             Break into sparse files no larger than SIZE.
 --slot SLOT                Use SLOT; 'all' for both slots, 'other' for
                            non-current slot (default: current active slot).
 --set-active[=SLOT]        Sets the active slot before rebooting.
 --skip-secondary           Don't flash secondary slots in flashall/update.
 --skip-reboot              Don't reboot device after flashing.
 --disable-verity           Sets disable-verity when flashing vbmeta.
 --disable-verification     Sets disable-verification when flashing vbmeta.
 --wipe-and-use-fbe         Enable file-based encryption, wiping userdata.
 --unbuffered               Don't buffer input or output.
 --verbose, -v              Verbose output.
 --version                  Display version.
 --help, -h                 Show this message.

```

# Answer
> 5 votes
There are two types of bootloader locks in Huawei devices: FB Lock and USER Lock.

USER Lock restricts the standard partitions like system, data, recovery, kernel etc, but not the critical bootloader-partitions which I don't remember the names of. (So you can't edit them even if you perform a USER Unlock) The USER Lock is what requires the bootloader unlock code to unlock. Also, there are some hidden hardware commands which are used for serious debugging like JTAG, that cannot be accessed with a USER Unlock.

FB Lock is used for protecting these restricted functions. A FB Unlock works as a key for all of Fastboot. (So if you perform a FB Unlock then you can unlock everything USER Unlock does, and the other restricted stuff) FB Lock is intended to be used by Huawei personnel for repairing. It is NOT supposed to be unlocked by users, but it is possible anyway, as I discovered after quite some research, but it doesn't work on very new firmware versions like EMUI 8.2 or July/August Security patch. It has been used for years by paid software for performing FRP Unlock, full system restoring, and it can even be used for obtaining a bootloader code for USER Unlock. A FB Unlock is usually temporary.

The method of FB Unlock has been kept behind cover for quite some time now, but I saw recently that it has been leaked on XDA. You can check it out here. That guide also covers a method for extracting the NVME partition for a permanent FB Unlock. If you don't want a permanent FB Unlock, but would like just a normal USER Unlock, you can skip doing steps after 3, but instead when you boot into TWRP, you can use:

```
su -c "grep -m1 -aoE 'WVLOCK.{14}[0-9]{16}' /dev/block/mmcblk0p7 |grep -aoE '[0-9]{16}'"

```

That will output the bootloader unlock code which you can use for standard USER Unlock. Good Luck!

---
Tags: fastboot, bootloader, huawei
---


title: Emails address on two cell phones

text:
# Question
Title: Emails address on two cell phones
How do I delete 1 googled account on two phones? One google email on two phones with different phone numbers how doI delete without losing apps.

# Answer
> 2 votes
One can remove Google Account from a device without any loss of apps installed.

However it is necessary to add atleast one Google Account in a device to enable downloading apps from playstore or using any Google App within the device.

To remove - Open Settings/Accounts/Google

Tap on Google account you want to remove and tap 3 dots on the upper right corner of the screen. Choose 'Remove Account'.

And remember to add an Google Account if you don't have any logged in after removing existing one.

# Answer
> 1 votes
Go to settings -\> Accounts -\> service provider(google or whatever it is) -\> click on account -\> click on the 3 dots at top -\> remove this account

# Answer
> 1 votes
Go to Settings \> Personal \> Accounts \> Google \> select account that you want to delete \> menu(top right) \> Remove account

---
Tags: google
---


title: Unable to handle subfolders in Termux

text:
# Question
Title: Unable to handle subfolders in Termux
I'm trying to run a program which has its own directory. Termux doesn't allow creating the directory nor accessing the folder (`permission denied` error) after moving it to the Termux home directory with a root file explorer app. Also with p7zip (command line port of 7-Zip) I can't create a new directory with `7z x -o <folder name> <archive name>`, I can only extract to the Termux home folder.

Termux FAQ has a page for the error, but the `chmod` command results in `operation not permitted`. I wonder if this issue is related to the differences in Linux distributions and Android:

> Why do I keep getting 'No such file or directory' when trying to execute binary (it's file exists) ?
>
> This happens when you are executing binary compiled for Linux distribution, e.g. Ubuntu or Arch Linux. This is caused by ABI difference between GNU libc and Bionic libc.
>
> Create a proper chroot (proot) environment and try to execute binary from it.

# Answer
It's likely that the permission or owner has messed up.

Go find a folder where Termux operates normally, and run `ls -ln` to get the UID and GID of Termux (they should be the same, on the 3rd and 4th column of `ls -ln`). Then switch to root with `su` or `tsu` and change the owner of the problematic directory to Termux like this:

```
chown -R 10001.10001 path/to/dir

```

where `10001` should be replaced with the UID of Termux. Then you should be good to go.
> 0 votes

---
Tags: termux
---


# Question
Title: How to use lsof, netstat and ps commands with complete options on Android?
I tried T-ui and although it has the `lsof` command, it cannot do `lsof -i` for example, so I need to go through every single process in Android. My phone is rooted and I wanna know the PID of the process listening to a specific port. Thanks!

**EDIT:**
Oh yeah, `netstat` command also don't allow any option, so if you guys know some terminal with the complete netstat command that would do it.

# Answer
> 2 votes
Standard `lsof` source code has some differences with Android implementation. Android's own `/system/bin/lsof` or `/vendor/bin/lsof` (both provided by `toybox`) work perfectly, but with somewhat limited options.

However, to view listening ports, you have multiple options:

* `netstat` static binary compiled from standard source
* Netstat Plus app
* Netstat applet shipped with busybox (app or any standalone busybox) or the one that comes bundled with Android (at least on Android Pie, not sure about older versions); `/system/bin/netstat` or `/vendor/bin/netstat` (both provided by `toybox`) also offer enough options
* `ss` command; the Android one (standalone binary shipped at least with Pie) i.e. `/system/bin/ss` or static binary

To view processes:

* `ps` static binary compiled from standard source
* `ps` applet that comes bundled with Android; `/system/bin/ps` or `/vendor/bin/ps` (both provided by `toybox`) also offer enough options
* `ps` provided by Termux (procps-ng package) is a complete Linux ps

---
Tags: 5.0-lollipop, linux, terminal, command-line
---


# Question
Title: How to view pdf file with chrome on android
I downloaded a pdf file on Windows and transferred it to my android phone. I want to know if there is any way to view the file using chrome browser.

# Answer
> 2 votes
There isn't. Chrome on Desktop/Linux uses Chrome PDF Viewer, a plug-in. Plug-ins are not supported by Chrome on Android.

Source: Quora

---
Tags: pdf
---


title: What is /storage/emulated/0/?

text:
# Question
Title: What is /storage/emulated/0/?
Recently, I've figured out that if I delete files from `/sdcard/Download` it deletes files from `/storage/emulated/0/Download`. And if I add the files into `/sdcard/Download` it duplicates them in `/storage/emulated/0/Download`.

So what is `/storage/emulated/0/`? For what purposes do we have it in our android file system?

# Answer
`/storage/emulated/0/Download` is the actual path to the files.

`/sdcard/Download` is a symlink to the actual path of `/storage/emulated/0/Download`

However, the *actual* files are located in the filesystem in `/data/media`, which is then mounted to `/storage/emulated/0` (and often other mountpoints as well)

A Symlink In computing, a symbolic link is a term for any file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution. Symbolic links were already present by 1978 in minicomputer operating systems from DEC and Data General's RDOS.
> 61 votes

# Answer
`/storage/emulated/0/` is actually `/data/media/0/` exposed through an emulated / virtual filesystem, not the actual one.

This is with reference to my previous answer here, but with more relevant details.

## **ANDROID STORAGE:**

On Android 5:

```
/sdcard >S> /storage/emulated/legacy >S> /mnt/shell/emulated/0
/mnt/shell/emulated >E> /data/media

```

On Android 6+:

```
# for (Java) Android apps (running inside zygote virtual machine)
# "/storage to VIEW" bind mount is inside a separate mount namespace for every app
/sdcard >S> /storage/self/primary
/storage/self >B> /mnt/user/USER-ID
/mnt/user/USER-ID/primary >S> /storage/emulated/USER-ID
/storage/emulated >B> /mnt/runtime/VIEW/emulated
/mnt/runtime/VIEW/emulated >E> /data/media

# for services/daemons/processes in root/global namespace (VIEW = default)
/sdcard >S> /storage/self/primary
/storage >B> /mnt/runtime/default
/mnt/runtime/default/self/primary >S> /mnt/user/USER-ID/primary
/mnt/user/USER-ID/primary >S> /storage/emulated/USER-ID
/storage/emulated >B> /mnt/runtime/default/emulated
/mnt/runtime/default/emulated >E> /data/media

```

* `>S>` for symlink, `>E>` for emulated and `>B>` for bind mount
* `USER-ID` of current user in case of `Multiple Users` or `Work Profile`, normally `0` i.e. that of device owner
* `VIEW` is one of `read` (for apps with permission.READ\_EXTERNAL\_STORAGE) or `write` (permission.WRITE\_EXTERNAL\_STORAGE) or `default` (for processes running in root/global mount namespace i.e. outside zygote)
* There were minor differences on previous Android versions but the concept of emulation was same ever since implemented.
* For a little bit more details on Android's mount namespace implementation, see this answer.

In short, `/sdcard` and `/storage/emulated/0` \- which represent a FAT/vFAT/FAT32 filesystem - point towards `/data/media/0` (or `/mnt/expand/[UUID]/media/0` in case of Adoptable Storage) through `FUSE` or `sdcardfs` emulation.

Being not Android specific but generally Linux related, symlink and bind mount (see "Creating a bind mount") are out of the scope of this question, as the question is about emulation part mainly.

## **EMULATION:**

Why the emulation is here? Emulated filesystem is an abstraction layer on actual filesystem (`ext4` or `f2fs`) that serves basically two purposes:

* Retain USB connectivity of Android devices to PCs (implemented through MTP now a days)
* Restrict unauthorized access of apps/processes to user's private media and other apps' data on SD card.

Read Android's Storage Journey for details, the summary is:

Early Android devices were short on internal storage and relied on (physically) external SD cards that traditionally use FAT family of filesystem to ensure compatibility with most of the PCs (refer to Microsoft's dominance on PC world).
When the internal storage grew in size, same filesystem was shifted to internal (still called "external") SD card.
But the FAT/vFAT implementation had two major issues which were addressed by Google gradually:

* Android devices were connected to PCs directly (USB Mass Storage) just as we connect a USB drive these days. UMS exposes the device at block level and disconnects the SD card from Android framework (un-mounts), thus making whole data unavailable to apps and possibly breaking many functionalities.
* FAT (being Windows' favorite in development days) was never designed to enforce UNIX permissions (mode, uid, gid and likewise symlinks, and `ioctls` like `FS_IOC_FIEMAP`). So, all data on SD card was available to all apps (since every Android app is a UNIX/Linux user and has a uid) with no restrictions, hence raising serious privacy and security concerns.

Both of these issues were addressed through emulation:

* Actual SD card storage was moved to `/data` partition (or independent /sdcard partition on some devices previously) which holds `ext4` filesystem (gradually being replaced by `f2fs`), fully implementing UNIX permissions.
* This design made using UMS impossible because whole `/data` partition could not be exposed to PC for 2 more reasons: `(1)` it contains a lot of settings and apps' data which is to be protected from other apps as well as human users. `(2)` Linux filesystems are not supported by Windows.
So UMS was replaced with Media Transfer Protocol which is a client-server type extension to PTP - an already established protocol. MTP doesn't expose block device but works through software stack. MTP host runs on Android as an app (`android.process.media`) fully sandboxed in Android framework, not capable of doing any escalated tasks.

Now the apps (and MTP, which is also an app) interact with emulated storage instead of `/data/media`, achieving both purposes at the same time i.e. enforcing permission checks underneath and looking like FAT filesystem on upper surface.

Google is now implementing emulation through sdcardfs to overcome shortcomings of FUSE; one major being the input/output overhead i.e. to improve read/write speeds.

**EXTERNAL STORAGE PERMISSIONS:**
Concept of Public and Private files on external storage can be demonstrated using an example:
Install Termux app.
Create directories `/sdcard/Android/data/com.termux/test_dir` and `/sdcard/test_dir`.
Create files `/sdcard/Android/data/com.termux/test_file` and `/sdcard/test_file`.
Execute following commands:

* You should have WhatsApp installed or select some other app's private folder.

Now Force Stop the Termux app and grant Storage permission. Execute the commands again:

See the difference in permissions of same files and directories. This seems not to be simply possible without emulation on a native Linux filesystem when there are hundreds of apps (users) to be dealt with simultaneously. This is the filesystem emulation that lets the same file to be exposed with three different sets of permissions at same time independent of it's original permissions on actual filesystem:

```
# touch /data/media/0/test_file

# stat -c '%a %u %g %n' /data/media/0/test_file
644 1023 1023 /data/media/0/test_file

# stat -c '%a %u %g %n' /mnt/runtime/*/emulated/0/test_file
660 0 1015 /mnt/runtime/default/emulated/0/test_file
640 0 9997 /mnt/runtime/read/emulated/0/test_file
660 0 9997 /mnt/runtime/write/emulated/0/test_file

```

Also see What is the “u#\_everybody” UID?

**Related:**
> 32 votes

---
Tags: storage
---


# Question
Title: Prevent Gmail from adding calendar events from emails
Every time I buy a plane or train ticket, gmail automatically creates a calendar event relative to the flight/train. I would like to disable this feature; I've already tried to do so from the google calendar options, but that didn't stop the calendar events from being created.

I suppose it's the Gmail app on my phone that does that, but I can't find an option to set to make it stop.

# Answer
> 0 votes
Gmail scans emails and automatically adds reservations to the calendar to remind users of the upcoming events.

To stop reservations from being added to the calendar, you must follow the steps described in Events from Gmail

> 1. Open the Google Calendar app.
> 2. In the top left, tap Menu Menu and then Settings.
> 3. Tap **Events from Gmail**.
> 4. Switch off **Add events from Gmail**.

---
Tags: gmail, calendar
---


# Question
Title: Meaning of fields in "Enable Wi-Fi verbose logging"
Does anyone have a link to clear docs on the meaning of all the fields for Wi-Fi networks when I **Enable Wi-Fi verbose logging** in the developer options?

I can guess a few and worst case I can read the source, but I was hoping for a clear and simple table.

Specific fields are:

* rssi (this is about the only one I'm 100% clear on)
* score
* tx
* rx

Also, the extra data after the mac address of each access point, e.g.

```
[(1){FF:FF:FF:FF:FF:FF*=2462,-49,4s};]

```

# Answer
The data after: the first number should be frequency (Mhz) and signal strength (dB) of the connection. Don't know about last one, but (n)s is standard notation for (n)seconds... Perhaps the log interval.
> 0 votes

---
Tags: wi-fi, logging, developer-options
---


# Question
Title: Determine app that keeps turning on bluetooth
I recently got back from a holiday without internet, when I got back heaps of my apps updated and one of them now continuously turns my Bluetooth on. How can I determine which app it is?

I have a rooted Nexus 4 running 4.4.4

# Answer
For me it was FireChat.

With *aSpotCat* you can check which apps have the permission to turn bluetooth on/off.
> 3 votes

# Answer
Check in Android settings. Security and privacy --\> permission--\> Turn Bluetooth on. Check which apps you want to keep enabled.
> 3 votes

---
Tags: applications, bluetooth
---


title: Disable wifi signin popup?

text:
# Question
Title: Disable wifi signin popup?
When I connect to a hotspot that requires signin, I don't want a popup that fills the entire screen. A simple notification would suffice.

Can this popup be disabled on Android 8?

Samsung Galaxy S9+

# Answer
> 1 votes
Short answer: it's not possible because this popup come from the SystemUI or from the Framework apk. It's not come from a file that contain a setting, it's a JAVA runtime code.

Some customs ROMs could integrate it (not sure), but it's not the case of Android stock.

---
Tags: 8.0-oreo
---


title: twrp problems flashing SuperSU

text:
# Question
Title: twrp problems flashing SuperSU
I try to install something like SuperSU. All it gives me is

```
Updating partition details...
...done
Full SELinux support is present.
Simulating actions...
Updating partition details...
...done

```

I press reboot system as up there it says "Successful".

When I get in the phone there is no SuperSU.

The zip file is ok, I tried it on another phone and it worked well. Nothing on twrp works: no wipe no nothing, it just gives the above again.

# Answer
> 2 votes
according to your logs TWRP is currently in simulation mode.

Updating partition details... ...done Full SELinux support is present. `Simulating actions`... Updating partition details... ...done

1) go to Settings

2) toggle simulation mode off.

Try to flash the .zip again. You should be good to go

---
Tags: twrp
---


# Question
Title: How to view recovered (deleted earlier) images?
I, sometime ago, formatted my memory card, and few days later I recovered the data in it. I then copied the recovered data to memory card again. However, I am unable to see many photos in my computer. I thought my Android phone would support this. But my phone also failed to show me those photos.

The images I want to see are of the previous size of the image, when I captured them. E.g. if I captured an image of size 1.2mb, the recovered image is also of the same size.

My phone is running Android 7.0, has 1GB RAM and internal storage of 8GB. The problem is with SD card. When I try to open those pictures I see this:

# Answer
> 2 votes
Recovering images from a previously formatted media usually means that the images are "carved" from the RAW data by detecting the image headers.

Images that are not stored as one data block (image is fragmented on file-system level) can not be fully recovered using the carving method because the information which blocks belong together was erased by formatting the media. You end up in having image files of the original size but from a certain point on the images just contain garbage data, not the image data.

A good image recovery tool should detect those defect images and let you decide what to do with them. Looks like your software does not work this way and now you have broken images that can't be loaded fully - e.g. for generating the thumbnail.

You may find software that is able to display the remaining parts of the original image, and save it to a new file. But this software has be be able to deal with defect image files and I don't know what Android apps could be used in such a case.

---
Tags: data-recovery, images
---


# Question
Title: How to access andriod to my pcs hardrive using wifi
I would like to connect my samsung galaxy s4 over wifi with my pcs harddrive. It should be the same way as by the remote desktop apps but indstead of them only to use the pc hardrive. I want to get and send files between my whole 1 TB hardrive therefore I don't want to use cloud services like dropbox. Also I don't need to sync.

# Answer
> 0 votes
AirStream: Stream PC on mobile could help you. There is no root or registration required.

# Answer
> 0 votes
I do all manner of communication between android and Windows. I have several android TV PCs with monitors used as thin clients, and I use TV PCs for streaming on big TVs. For remoting into Windows use Microsoft Remote Desktop Beta from the play store. Many android file browsers connect to Windows file sharing. I use ES File Explorer Pro to copy files and update the TV PCs. I use FolderSync Pro to backup my cell phone to Windows. This all works flawlessly and is easy to set up if you have Windows security knowledge. Also use a fixed IP address for the Windows machine, using that as the server name. The Windows machine name often is not found via DNS, but the IP address always works. Do not include a domain name in server set up for android apps.

Windows security is a pain. Do not take a shortcut and give too much access to your android devices. Create a user on the Windows machine for the intended purpose, and give that user access to one or more folders required. It's fine to give full access to that user for just those folders. Permission must be given at the Windows share name and the Windows folder. These are two different sets of permissions.

---
Tags: wi-fi, samsung-galaxy-s-4, data-connection
---


# Question
Title: How to restore an encrypted SD card backup after factory reset?
I did a factory reset and then realized that I didn't decrypt my SD Card. I know that the data is probably lost, but I did make a complete copy of the Internal Storage.

Is there a way to copy back to the phone, the encryption key? I also know the password I used to generate the encryption. Where is the encryption key file located?

Edit: I made a copy of Internal Storage folder connecting the Samsung J5 mobile to a PC, but I can't find /data/misc/vold. What am I doing wrong?

# Answer
> 2 votes
The encryption key should be located in `/data/misc/vold`. If you backed up that directory, you should see a `.key` file with a long name inside. Open that file with a hex editor, and copy the 16-bit key. You can decrypt your storage using this command in a Linux distribution:

```
dmsetup create crypt1 --table "0 `blockdev --getsize <your device ID, ex:/dev/sdb>` crypt \aes-cbc-essiv:<key you copied> 0 <your device ID again> 0"

```

Source of the command

---
Tags: sd-card, encryption
---


title: List apps on SD card

text:
# Question
Title: List apps on SD card
I'm running LineageOS 14 (Android 7) and my SD card was formatted as adoptable storage. I want to revert it to portable storage, without loosing apps, so I need to move those apps back to internal storage beforehand.

However I don't know which apps are stored on the SD card just now, and checking them manually, one after the other, using the Settings menu, is quite slow and error-prone.

How do I get a list of apps that are stored the SD card?

# Answer
> 0 votes
~~Very simple use the file manager and browse to `sdcard/Android/data` all the apps are there. Using solid explorer I can even see the app icons.~~ (Not guaranteed, can show apps that don't store data on the SD card)

Alternatively you can just view the storage settings, click the sdcard f2fs and then apps and they are all listed there.

---
Tags: lineageos, adoptable-storage
---


# Question
Title: after rooting phone, can I remove all traces of original phone carrier?
Forgive my mobile ignorance. I have a Galaxy S4 from Verizon (sch-i545), and I do not use it as a phone anymore. What I want to do is turn it into basically a very simple media device for kids' use on wifi at home. Almost a tablet. I want a very clean version of Android, and I will install a very few number apps, just a few carefully-selected things that my children can use.

If I root the phone and then install a custom ROM (I haven't done this yet but see plenty of tutorials online), will I be able to achieve what I want, or will my phone keep complaining about not having a SIM card? And will it still think it is associated with Verizon (custom splash screen and who-knows-what-else)?

Certainly, I could just factory reset it and disable the dozens of bloatware apps, but I'd feel especially content to do a little more than that and have the knowledge that it's just a little computer running the custom android version I want without any Verizon fingerprints upon it.

# Answer
As its hardware is still altered by Verizon, you'll likely not be able to perfectly swap out the OS, since the bootloader of your device is still locked down by Verizon, and that makes sure you don't touch anything related to boot (it won't boot up if you do), so it is also impossible to replace the splash screen that shows up first when you boot the device up.

That being said, it still shouldn't complain about anything Verizon wants the device to complain about. Everything you see after the device ends the boot animation and displays the lock screen are controlled by the custom ROM. So if the custom ROM developer doesn't want the ROM to complain about anything (and that is kind of the point of a custom ROM!) you should be fine. Also Verizon would not be able to interfere with your device functions remotely.
> 1 votes

---
Tags: root-access, custom-roms, samsung-galaxy-s-4, tablet, verizon
---


# Question
Title: How to fix "fastboot FAILED (command write failed (Success))" error?
I tried to flash twrp image in POCO F1 by using the command `fastboot flash recovery twrp.img`. But it didn't work. It showed the error message:

```
fastboot FAILED (command write failed (Success))

```

What could be the possible reasons?

# Answer
It can be one of the following issues:

1) Your TWRP image is corrupt. Try downloading the image again, or download from another source.

2.) There is an issue with your USB connection. Check your USB ports and the cable, or try another PC.

Also, are you using a Linux distribution? There is a known issue with Fastboot that sometimes causes the error you mentioned in Linux, so try a Windows PC if you can.
> 2 votes

---
Tags: fastboot, xiaomi-pocophone-f1
---


# Question
Title: How would I go about purposely disabling all microphones on an Android phone?
I'm attempting to repurpose older Android phones, and I'm looking for a way to disable the microphones to avoid having spy-accessible microphones all over my house.

Is there a way of removing or purposely breaking the microphone drivers without breaking the ability to play audio?

# Answer
> 1 votes
I can not see a purpose for this but ultimately the easiest method if you never want to use the microphone again is to just break the microphone with a small pin or something,
you could disconnect them from the motherboard altogether and rebuild the device with no microphone...

I'm recommending hardware based solutions because it's ultimately the safest method of complete removal....

If you are familiar with the mobile phone security protocol "SS7" and you have read your mobile phone provider's terms and conditions then you'd be aware that you don't actually have the legal right to remove the ability for police or other law enforcement agency's to have access to the microphone ( even while your device is switched OFF ) ... This is clearly stated on most or all mobile phone provider's term's and conditions ...

The main reasons you can't legally do it ( without an unexplainable hardware fault - I strongly discourage tampering with your device )

* You don't actually BUY the device, you ONLY buy the RIGHT to USE the device from the company or copyright holder.
* You AGREE to ALLOW police and law enforcement angecys to have access to your microphone even while your device is switched OFF

So now that's clear,

This solution is provided for Educational use only.

---
Tags: operating-system, microphone
---


# Question
Title: Is "localhost" not supposed to point to localhost?
I have several applications on my device that can run HTTP servers. I can access the server just fine if I user the actual private IP address, but `localhost`, `127.0.0.1`, and `[::1]` all fail to access the server. Before you ask, the port and protocol are both correct since I use them in accessing my device's server through its private IP address. Why won't this work? How do I get it to work?

# Answer
> 1 votes
`Localhost` won't work because the server app that you're using is not configured to listen localhost network interface. I even doubt that the http server (web server) you're using has capabilities to listening on the loopback interface. Thus you need to be using private IP address instead (on the network interface i.e wifi, ethernet, etc) .

In fact as discussed by Firelord and Irfan, you'd need to be using a real, **dedicated webserver** application that has the ability to listen on all network interfaces. Then bind the server to the localhost (or loopback interface)

> Additionally if you are using `localhost`, resolvers may or may not resolve that to `127.0.0.1` if it's not explicitly mentioned in /etc/hosts

---
Tags: web-server
---


# Question
Title: Where to find information about WiFi connectivity of the device?
is there a way I can find information about my device's connectivity to WiFi network? I need information like: what network I'm connected too, what is the mac address of the router, how long have I been connected, when was the initial connection. I tried looking in `proc/net`, but I didn't find any useful information there? Is there any other place I can look in?

# Answer
> 3 votes
You can use various Wifi/network analysis apps from Play Store to get some of the information you're looking for. I suggest IP Tools. In its default screen/view, you would get to see following information *et al*:

* SSID
* Internal IP
* Your Android device's MAC address
* Gateway
* DNS
* Frequency
* BSSID (your router's MAC address)
* Lease duration

If you need more information, you'd need to setup and issue this command:

```
adb shell dumpsys wifi

```

It would throw incredible amount of information, most of it incomprehensible for an end-user. However, it would show even such information not available to apps, such as, when was the device last connected or disconnected from a Wi-Fi.

In my Android 8.1.0 (OnePlus 6), I get to see this information *et al*:

```

WifiMetrics:
mConnectionEvents:

startTime=12-23 21:36:05.762, SSID="Connected, no internet", BSSID=ROUTER'S_MAC_ADDRESS, durationMillis=1530, roamType=ROAM_UNRELATED, connectionResult=
1, level2FailureCode=NONE, connectivityLevelFailureCode=NONE, signalStrength=-34, wifiState=WIFI_DISCONNECTED, screenOn=true. mRouterFingerprint: mCo
nnectionEvent.roamType=0, mChannelInfo=2412, mDtim=0, mAuthentication=2, mHidden=false, mRouterTechnology=4, mSupportsIpv6=false

startTime=12-23 22:32:56.874, SSID="Connected, no internet", BSSID=ROUTER'S_MAC_ADDRESS, durationMillis=1541, roamType=ROAM_UNRELATED, connectionResult=
1, level2FailureCode=NONE, connectivityLevelFailureCode=NONE, signalStrength=-28, wifiState=WIFI_DISCONNECTED, screenOn=true. mRouterFingerprint: mCo
nnectionEvent.roamType=0, mChannelInfo=2412, mDtim=0, mAuthentication=2, mHidden=false, mRouterTechnology=4, mSupportsIpv6=false

startTime=12-23 22:36:49.886, SSID="Connected, no internet", BSSID=ROUTER'S_MAC_ADDRESS, durationMillis=1542, roamType=ROAM_UNRELATED, connectionResult=
1, level2FailureCode=NONE, connectivityLevelFailureCode=NONE, signalStrength=-28, wifiState=WIFI_DISCONNECTED, screenOn=true. mRouterFingerprint: mCo
nnectionEvent.roamType=0, mChannelInfo=2412, mDtim=0, mAuthentication=2, mHidden=false, mRouterTechnology=4, mSupportsIpv6=false

```

The aforesaid information tells me the last three times (because I restarted my device earlier, so not much of earlier information available) my device connected to a Wi-Fi.

If you look into the log entries under *Dump of WifiConnectivityManager* you would get to know more info on when the device was disconnected and then connected.

Moreover, the dump output also has all the information I listed above for IP Tools app. It is only a matter of filtering the important information out of that dump.

---
Tags: shell, system, kernel, command-line
---


# Question
Title: Bootloader/BIOS, flashing ROMs and related risks. Why are Android devices more brickable than PCs?
I have solid experience with installing different OSes (Linux, Windows,...) on PCs. I would like to try just for fun to install Linux on an unbranded Android low cost tablet acquired in 2015. I spent some time browsing the web and as far as I understand there is a risk that during the flash procedure the device could be potentially damaged. So I read extensively on how to backup the ROM using TWRP and all related matters. I would like just to have some explanations on the below topic:

Scenario #1:
I have a PC, if I want to try another OS I can just format the hard disk and install it, in no way is there a risk of damaging the BIOS or motherboard. Motherboard and hard-disk are separated, so no problems can arise.

Scenario #2:
I have a tablet, want to wipe out Android and install an upgraded version of Android or a Linux distro suitable for mobile devices.

* Why in this scenario is there a risk of ending up with an unusable device?
* Is this because in this case the motherboard and unit memory are bundled together? So wiping the memory would also erase the configuration settings of the motherboard?
* Do we have here the equivalent of BIOS settings?

# Answer
> 12 votes
## SHORT ANSWER:

Android phones are more brickable than PCs because they can hardly communicate with us if the bootloader is erased. And bootloader(s) live on Flash memory (eMMC) partitions which are prone to deletion quite easily (even during an update process). If you unluckily damage these partitions or they are worn out, there is a great chance you won't be able to communicate with device ever afterwards.
See Boot Process: Android vs. Linux and Android Device Partitions and Filesystems for details.

## LONG ANSWER:

A device is considered bricked if we are unable to communicate with it. Now let's see how we communicate with devices at very lower level - say - when there is no Operating System installed or it gets corrupted/erased accidentally.

**PERSONAL COMPUTERS:**

There is a standardization in PC world. BIOS is a mature firmware that provides a well developed platform to communicate with the system. It has ability to enumerate the hardware i.e. load basic hardware including motherboard, CMOS/NVRAM, RAM, hard drive, optical drive, graphics card and screen, keyboard, mouse, network card, and other peripherals connected to USB.
During Power On Self Test (POST), BIOS identifies all above said hardware by communicating at all internal and external `buses` whose paths are hard-coded with BIOS, sending them a signal like `who is where?`
UEFI - an evolution of BIOS - overcomes the limitations of 16-bit operation mode and maximum 1MB RAM usage. It's a minimal OS in itself which can even recognize and use filesystems, providing a better user interface, more configurable boot options and support for larger disk drives.

After this initialization of system, BIOS/UEFI reads bootsectors/bootloaders from bootable media like hard drives, USB storage or even network. It means that a PC is able to communicate with us even if there is no hard drive installed; it'll inform us: `No bootable media detected`. It's because BIOS/UEFI is stored on Electrically Erasable Programmable Read Only Memory (EEPROM that evolved from ROM, PROM and EPROM) connected to motherboard. If you somehow manage to erase or damage this EEPROM, yes your PC will also be bricked but that's rare.

**ANDROID DEVICES:**

Now coming to Android devices, hardware components are not connected to motherboard through buses, instead the core components that include CPUs, GPU, RAM, Flash/eMMC (equivalent of HDD or SSD), WiFi and bluetooth module, USB connectivity, UART (serial ports), JTAG (a very lower level serial communication protocol), GPS, modems (for cellular connectivity) are all built on a single System on Chip (SoC). Most of these components are not discoverable by SoC firmware (roughly equivalent of BIOS/UEFI) unless a Device Tree is loaded by final bootloader (e.g. ABOOT) into device memory i.e. just before kernel (OS) is loaded. And if you have no OS on the device, you are just depending on the minimal communication protocols provided by bootloader(s). At this stage only a few hardware components (usually graphics, NAND and some way of serial communication) are working, and that too with limited functionality.

Manufacturers may provide protocols at pre-bootloader or bootloader level e.g. Download Mode (QFIL / QPST / Qualcomm HS-USB QDloader 9006 and 9008 modes; PS: I don't know much about MTK or other SoC vendors), Fastboot, Odin etc. But these - `Service Modes`; what they call it - are disabled by OEMs for security reasons and as a part of their business strategies. Some manufacturers allow unlocking these service modes at user's risk after special approvals. Some hacks may also be used e.g. finding some test points on main board, shortening USB wires, using JIGs etc.
Lower level communication protocols e.g. JTAG are for development purpose only and those are almost impossible to be discovered and used for repairing purpose, though the same would have been possibly used for initial writing of firmware (including bootloaders) to flash memory. Some hacking tools like eMMC Flasher boxes/adapters may also use similar protocols for IMEI unlocking and other "black" stuff ;)
Also there have been successful attempts to boot Android from USB / UART ports but that's very rare now a days and requires a lot of technical knowledge and hacking skills.

All of these methods used to unbrick devices are not officially supported by most of the vendors, vary from vendor to vendor (not standardized) and are poorly documented for end user's usage.
That's why Android devices (or generally saying devices with embedded components) are more brickable than PCs.

---

**RELATED:**

**SOURCES:**

**See Also:**

---
Tags: bootloader, unbricking, rom
---


# Question
Title: What happens if vendor partition is corrupted?
I mistakenly flashed recovery image in vendor partition while installing a custom rom. I am using Lenovo K6 Power with Lineage OS Oreo Karate by Karthik with TWRP. I was flashing Resurrection Remix Oreo while this happened.

I haven't rebooted my device till now and it is charging. So what will happen now? When I try to flash RR I get error: `/vendor cannot be mounted`, when I try to restore I get the same error message.

Currently I am downloading stock rom and planning to flash it via Qfil in hopes of fixing it. Any ideas what to do?

# Answer
> 3 votes
`/vendor` is sister partition of `/system` on Android devices which holds system applications and libraries that do not have source code available on AOSP but added by vendors (OEM's). It also contains SoC firmware images i.e. hardware specific libraries and binaries (OpenGL, ISP...). Proprietary blobs (HALs) usually live in /vendor as shared libraries (.so files) which are loaded by Android binders when processes call a hardware component. This partition was optional before Treble support and `/vendor` used to be just a symlink to `/system/vendor`. However, on Treble devices it contains a separate filesystem, usually same as that of `/system` i.e. `ext4` or `f2fs`.

If you accidentally flashed recovery image over vendor partition, it won't brick your device unless you have a ROM or factory firmware to flash. However its filesystem is erased which needs to be recreated. Factory firmware flasher will do this for you but you can also manually format it from TWRP `Wipe` menu or through terminal emulator using `mkfs.ext4` or `mkfs.f2fs` commands.

Further reading: ANDROID DEVICE PARTITIONS and FILESYSTEMS

---
Tags: custom-roms, 8.0-oreo, lenovo
---


# Question
Title: How to remove old Android images/packages/apps?
The initial setup on my Android device was using 4gb of space. After several upgrades it's using 7.5gb and most of that is Android OS crap. Personal files and non-Google apps are on an SD card. I need to clean up internal storage. This is the equivalent of finding an old Linux image in `synaptic` and then `remove completely`.
Is there a tool similar to synaptic for Android?

# Answer
> 2 votes
Synaptic is a GUI tool over `apt` package manager that manages `.deb` packages built for Linux distros. Android's package management is inside a Java environment, totally different from Linux distros. Android's Java apps are built as `.apk` (zip) files and are managed by PackageManager which may also be used from commandline tool pm.

What you are looking for i.e. the `purging` of old packages is not simply achievable on Android. You can uninstall user apps and their data will also be deleted from `/data/app/<PKG-NAME>`, `/data/data/<PKG-NAME>` and `/sdcard/Android/data/<PKG-NAME>`. You can delete any left over files from `/sdcard` yourself.

But there are a number of packages (system apps) that are part of Android core framework and they store their data on different directories under `/data` which also include your preferences, settings, databases, backups, contacts, messages, caches, logs etc. You can't remove them all because - unlike Linux - everything on Android isn't neceassarily a part of some package.

So what you can do easily is `Factory Reset`. It'll bring your device to clean state by removing almost everything from `/data` partition. However it will remove your settings, personal data & all user installed apps. So keep a backup before doing so.

If you don't want to start from zero, you need to analyze space usage manually, not possible without `root` access or at least custom recovery. If you have rooted your device, you can use a GUI app like SDMaid to check space usage of `/data` (and even other format-able) partitions in detail. Or simply use `du` command from recovery or from terminal emulator within Android. See this for a practical example of space usage.

---
Tags: 6.0-marshmallow
---


# Question
Title: Why can't I see Android storage as a partition on PC?
I'm trying to recover an accidentally deleted video from Huawei P10. I use Ubuntu, so I tried to recover it using `photorec`. The problem is that I can't see the mobile's internal storage or SD card storage in the list:

```
  PhotoRec is free software, and
comes with ABSOLUTELY NO WARRANTY.

Select a media (use Arrow keys, then press Enter):
>Disk /dev/sda - 2000 GB / 1863 GiB (RO) - ST2000DM006-2DM164
 Disk /dev/sdb - 240 GB / 223 GiB (RO) - KINGSTON SA400S37240G
 Disk /dev/sdc - 1000 GB / 931 GiB (RO) - WD My Passport 259F
 Disk /dev/sr1 - 3504 KB / 3422 KiB (RO) - Linux File-CD Gadget

```

Original screenshot

The first row is an HDD, the second row is SSD, the third is an external HDD, and the last row is present only when the mobile is connected to the PC.

The mobile is connected to the PC through a USB cable and I've set the Transfer files option. Same result with Transfer photos.

Do you know what to do?

# Answer
Connecting to PC through USB (MTP) doesn't expose underlying filesystem (`ext4` or `f2fs`) of internal storage (`/data` partition) to PC. But recovery programs need direct access to filesystem i.e. block level access and won't work with MTP (Transfer Files) which is just a client-server type protocol for data transfer.

You need USB Mass Storage (**UMS**) which is disabled on Android 3.1.x and above, when MTP was introduced and then UMS was discontinued gradually afterwards in later releases. See Android's Storage Journey and my answer to What is /storage/emulated/0/? for details.

OEMs may add UMS configuration to their devices. For samples you may see `on property:sys.usb.config=mass_storage` triggers in `init.qcom.usb.rc` and `init.msm.usb.configfs.rc` files in a Qualcomm device source.

However it's always possible to enable UMS manually provided that kernel support is present. The process described below should also work for older devices those had UMS officially supported. You need **root access** or at least **custom recovery** to enable UMS.

---

## HOW TO ENABLE UMS?

Android Composite Gadget driver (which is an extension to Linux kernel's USB Gadget API) exposes Android in *USB device* mode to a *USB host* like PC. Different USB functions (like UMS, MTP, RNDIS etc.) can be configured and switched using `sysfs` interfaces. Later mainline Linux kernel added the ability to configure USB gadget modes through `configfs` interfaces. New Android devices also use the same (see this sample `init`'s `.rc` file).

**OLD DEVICES:**

Kernel must be built with `CONFIG_USB_F_MASS_STORAGE` and Android Composite Gadget driver (`CONFIG_USB_G_ANDROID`):

```
cd /sys/class/android_usb/android0
echo -n 0 >enable
echo -n '/dev/block/bootdevice/by-name/userdata' >f_mass_storage/lun/file
echo -n 'mass_storage' >functions
echo -n <VID> >idVendor
echo -n <PID> >idProduct
echo -n 1 >enable

```

* Other files in gadget such as `{iSerial,iProduct,iManufacturer}` are usually set on device boot when creating the gadget.

**NEW DEVICES:**

Kernel must be built with `CONFIG_USB_CONFIGFS_MASS_STORAGE`:

```
cd /config/usb_gadget/g1
echo -n 'msc' >configs/b.1/strings/0x409/configuration
echo -n <VID> >idVendor
echo -n <PID> >idProduct
for f in configs/b.1/f*; do rm $f; done
ln -s functions/mass_storage.0 configs/b.1/f1
echo -n '/dev/block/bootdevice/by-name/userdata' >configs/b.1/f1/lun.0/file

```

* Other files in gadget such as `UDC` and `strings/0x409/{manufacturer,product,serialnumber}` are usually set on device boot when creating the gadget.

**NOTES:**

* Paths may vary - including directories `g1`, `b.1`, `f1` etc. - depending on device and the hard-coded configuration.
* In most cases you need to set proper USB Vendor ID (VID) and Product ID (PID) to make the PC identify the mass storage device. E.g. `05C6` is Qualcomm's VID and `1000` is their PID for UMS device. See `.rc` files on your device for device specific IDs.
* Exposing mounted `/data` filesystem to UMS may corrupt the filesystem, and must be avoided. Use UMS in recovery mode.
* If your `/data` partition is FDE encrypted, you need to decrypt it before exposing to UMS.
* **To make sure your data is recoverable**, see my answer to How to make a complete factory reset, without anyone being able to retrieve my data?

Now `/data` will appear as a partition on Linux PC which you can mount (preferably read-only to avoid overwriting data). However recovery tools including `extundelete` mostly don't need mounting filesystems.

If you have custom recovery, another option is to `dd` out an image of `/data` partition to external SD card and then mount it on Linux PC as a loop file. For this and other options to access internal storage at block level, see my answers to related questions.

**PS:**
Using the same methods it's possible to expose a ***loop file*** like ISO image or any other filesystem as UMS or CDROM device by writing its path instead of block device path.

---

**RELATED:**
> 8 votes

---
Tags: data-recovery, linux, usb-mass-storage
---


# Question
Title: Galaxy Tab S can't boot into fastboot mode
I want to install a custom ROM on my Galaxy Tab S. Therefore, I need to install TWRP as recovery. For that, I need to unlock my bootloader. I'm following this guide to unlock my bootloader: http://rootmygalaxy.net/unlock-bootloader-android-using-fastboot-commands/

I installed the appropriate drivers and ADB&Fastboot on my computer. Then, I enabled debugging on my Galaxy Tab S. Then, I opened the command console and typed: "adb reboot bootloader". My tablet then restart, but doesn't go into fastboot mode. Instead, it simply reboot normally.

I've tried this on both, Mac OS and Windows. It does the same thing on both systems.

I've tried to boot while manually pressing Home, Power and Volume down buttons. Then, my Tab S into a special mode: Odin mode. I know I've used Odin previously to upgrade my Tab S from Lollipop to Marshmallow. I don't know if the fact that I hve Odin doesn't allow my tablet to boot into fastboot. However, I would need to boot into fastboot to unlock my bootloader and, later on, to install TWRP in order to installer the AOSP 7.0 Nougat custom ROM to my Galaxy Tab S.

How can I do to boot into fastboot mode?

Thank you very much,

Blaccko

# Answer
You must use

```
adb reboot-bootloader

```
> -1 votes

---
Tags: fastboot, odin
---


# Question
Title: How many days will take to delete my WhatsApp account after uninstalling?
I am very irritated with my friends and WhatsApp messages. I can't concentrate on my works. I am decided to uninstall my WhatsApp app from mobile. How many days will take to delete my WhatsApp account after uninstalling?

# Answer
I'm pretty sure you need to delete it separately... Unless they check active installations and remove accounts accordingly, the usual method of handling active user's is to require them to press "Delete Account" in Account settings prior to uninstalling.

An uninstall on android doesn't usually run anything, so it'd be hard for WhatsApp to remove the account whilst uninstalling ... Example, windows computers can run an extra code while uninstalling, it'll ask if you'd like to view the website or provide feedback on the uninstall.... Android should implement this one day, but for now it's seen as a method of stopping the app from being uninstalled, for example, your app could kill the uninstall process every time you attempt to uninstall it ... Making it a stubborn virus ( hypothetically ) ... Windows computers suffer with this problem and i don't think Android wants the same problems...

So because the application is sandboxed on uninstall, it can't remove your account from the server if you are uninstalling it .... This is extremely unhelpful for developing applications that modify system files and need to repair the files on an uninstall.. The app is killed on uninstall and can not restore the original files without including an uninstall button inside the application to handle everything prior to using uninstall ( make your own uninstaller ) ....

You need to remove, delete or disable your account on the WhatsApp Account settings prior to performing an uninstall... It's a limitation of Androids uninstalling process.

Alternatively WhatsApp could also check active installations and accounts associated with them, after an installation is missing, they can identify the account associated with it and remove it automatically... i believe this is what you theorized would happened, this usually isn't the method taken by any company, most want more user's and easier sign up processes, so it'd be counterproductive to remove accounts... it's easier for the end user to just reinstall the app and use the old logon information than to recreate an entire account, and it's better for the company to have more ( " Active " ) users.
> 1 votes

---
Tags: whatsapp-messenger
---


# Question
Title: How to edit the list of reserved ports (under 1024) on Android?
Is it possible to edit list of reserved ports on Android (0 - 1023) to move lower port (under 1024) to higher port (equal or above 1024).

My mobile phone is rooted and I want to use lower port.

One option can be to reboot device so that to kill the process using some specific lower port.

Does Android provide any file in system files with table of reserved ports for edit?

# Answer
Ports are not reserved by Android (or by any other OS) but are assigned by IANA for specific use. If a port is free i.e. no process is connected to or listening on that, you may use that with your program. But this may break the app's functionality for which the port is reserved. Otherwise you'll have to modify the source code and rebuild all the programs that are using a fixed port. It doesn't seem logical and practically possible.

For instance UDP port 68 is reserved for DHCP clients and the same is on Android:

```
# ss -up
Recv-Q  Send-Q   Local Address:Port   Peer Address:Port
0       0         192.168.1.11:68      192.168.1.1:67      users:(("system_server",pid=4521,fd=249))

```

So if you want to use this port for your program, your will have to modify Android source code to replace all instances of port 68 with some other unused port and then rebuild the ROM.
However you are free to use it when device is not connected to some network through WiFi or mobile data which obviously doesn't make much sense. Or you can configure static IP, Gateway and DNS so that DHCP is no more needed and the port gets free for other usage.

**Further reading:**
> 1 votes

---
Tags: rooting, root-access, system-apps, superuser, supersu
---


title: How do I unmute a contact?

text:
# Question
Title: How do I unmute a contact?
On my S6 with Android 6.0.1, one of the contacts in the default SMS app has a mute symbol (strike-through speaker) displayed next to the name. For this contact, new text messages don't trigger a notification. How do I change this? I've looked through all options in the message app and in the contact app and didn't find anything.

# Answer
> 0 votes
In the thread, click the contact name, this will take you to the "notification" setting for the contact.

# Answer
> 1 votes
Had the same problem. Took me a bit to figure it out.

Go to messages, tap on the thread for that contact, tap on their name in the top left corner, this will take you to conversation settings, turn notifications on.

---
Tags: contacts, sms, notifications, samsung-galaxy-s-6
---


title: Can the LG K20V be rooted?

text:
# Question
Title: Can the LG K20V be rooted?
I can't find anywhere stated the LG K20 phone can be rooted safely. Does anyone know if its possible? And what steps do you take? Thanks.

# Answer
> 0 votes
The LG K20V is a Verizon phone, Verizon phones come with locked bootloader, and there is no known way to unlock the bootloader. It is not possible to root without unlocking bootloader, so it is not possible to root a LG K20V phone.

---
Tags: rooting, lg
---


title: Shortcut directly to specific screen

text:
# Question
Title: Shortcut directly to specific screen
There are some apps I that I only ever access for one specific purpose. I’d like to create a shortcut into a specific screen in the app - for example, open the app and navigate to charge history. Alternatively, I'd like to alias a series of actions to one action, so I can open it and navigate to the relevant part of the app quickly. Does anything like this exist? I've read about `QCustomShortcut`, not sure if it's a) suitable and b) safe.

# Answer
"Deep inks" into apps have to be supported by the app itself. Each app defines "activities" and you can only open the app if there is an activity for that screen you want and the activity has to be exported.

An app that allows you to list available activities and create shortcuts for them is Activity Launcher just as an example.
> 0 votes

---
Tags: home-screen-shortcuts
---


# Question
Title: How to trace a process sending data over network?
I found that some mobile data is consumed by unknown process. There's a huge difference between my ISP report and glasswire report, around 40mb for each 100mb used.

I know my phone is infected and someone spying on me but couldn't find how to get rid of that.

I wiped boot/recovery/data/cache and dalvik partitions before installing a custom ROM (dotOS) from a trusted computer. I managed to root the phone and install a firewall to check what's happening but got nothing worth it.

My assumption is that some process is still running somewhere, I have no idea how can I, at least, see what's going on. I do not have any background with Android development but I understand most of the concepts around it.

It's not a system application so please do not mention that.

# Answer
There are multiple ways to sniff outgoing network traffic. Since Android uses Linux kernel, we can make use of in-kernel reliable firewall: `netfilter` which is controlled using userspace utility `iptables`. It's the easiest available option for rooted phones.
Through a root commandline:

```
# iptables -I OUTOUT -j LOG --log-prefix "SNIFFER " --log-uid --log-level 7

```

This will log all outgoing traffic to kernel log that you can capture and save to text file:

```
# dmesg -w | grep SNIFFER

```

This will provide you `uid` of the all the processes sending out traffic, which can be used to trace the processes.

`AFWall+` app also makes use of iptables `owner` module to block traffic from certain user/system apps (UIDs) including root.

For further details on capturing packets, see View network traffic requested by app.
> 0 votes

---
Tags: mobile-data
---


# Question
Title: How to mount Internal Storage as USB Mass Storage for recovering data?
I accidentally formatted my Android phone's storage partition while updating to Android Oreo today. When I tried to restore the backup I realized that the backup of the data partition had failed and basically is an empty file with 0 Bytes.

I would like to run PhotoRec over it but I'm somehow unable to get my phone into mass storage mode. It seams like Google has ditched it for MTP. I tried some apps from XDA but none of them really worked with my device. I was able to get the external SD mounted but not the internal storage. The custom recoveries that are available for my device only support MTP as well.

Does anyone have an idea how it could be possible to recover my files? I'm rooted and bootloader is unlocked.

# Answer
You can't do that. Google has made MTP the default since version 3.0 and remove mass storage mode completely years ago in Android 4.0

If you want to do things directly on the data partition you have 2 ways

* Run command in adb shell
* Start in recovery mode (if you're using a custom ROM)

Since you're running a restore from backup, I assume you're on a custom ROM and still have the backup file with you, why don't just do the restoration again?
> 1 votes

# Answer
You can see my answer to Why can't I see Android storage as a partition on PC? for methods to enable UMS and make `/data` (`userdata`) appear as a partition on PC, which can be mounted on Linux.

Other options to access internal storage at block level are answered in How to take full image backup of partitions or eMMC? and How to recover a deleted file from /data partition?.
> 0 votes

---
Tags: internal-storage, data-recovery
---


# Question
Title: Why is application data of the same application stored in different locations?
I have installed the same application on

* a device running Android 7.0 (**not rooted**) and
* on a tablet running Android 4.4 (**root**),

but nevetheless I noticed that the application data (databases/files etc) is stored in different locations on each device:

On the tablet device the files are located at: `/storage/sdcard0/Android/data/com.packagename` and can be easily manipulated (i.e copy, back up etc) but not on the smartphone which likely leaves the storage location being: `/data/data/com.packagename` which I have no access to.

---

I understand that it is usually stored on `/data/data` (*protected internal app storage*) or `/storage/sdcard0/Android/data` (*storage on user's internal storage partition*), else on a SD card if present. In addition, a related question has been asked here: Where Android apps store data?

My biggest surprise is **why is this happening on the same application** (same version - sideloaded)?

This reference page also explains how a developer can configure the default location of application data. It would have been understandable if there were different versions of the application, but here I am only dealing with the same application (i.e `.apk` file). Is there something I am missing here or things have changed in recent versions of Android?

My concern is that I can't access these files on `/data/data` without root and since these are large files and I need to back them up just in case the app data is accidentally cleared (and I have already done that by mistake :(.

Most importantly I don't want to **continuously download** them over again.

Note: Both devices have **no** external storage attached.

From the look of things the biggest obstacle is not being able to access files on `/data/data` (device 1), hence no backup possible...(I would appreciate if there is **another reliable workaround to achieve this**)

# Answer
> 1 votes
As strange as it sounds, I had a successful workaround to this issue:

* I had to manually move the necessary application data (files) from `/data/data` to `/Android/data` (with exception of `shared_preferences` folder and database folder i.e the normal config).
* Second I had configure the app to use a private directory by modifying the `userDefault.xml` file (maybe different depending on application in question) and adding this necessary line of code:

`<int name="app_private_dir"value_"1"/>`

# Answer
> 1 votes
All apps have private storage in the protracted /data folder. Some apps choose to temporarily store data in public locations. Unfortunately I cannot say for certain what the exact results of this were, but I know the way shared data is handled changed in Android 7 for security reasons.

---
Tags: applications, internal-storage
---


# Question
Title: Why am I unable to get my nook to remap the upper left button to work as a CTRL key?
Recently, I had to re-root my nook simple touch after the stock recovery removed the su binary. Unfortunately, it deleted my settings for remapping my upper left page button to use as a CTRL key. I would love to go back to using the terminal app running an Ubuntu Distro.

I tried fixing the problem by installing the patched jars needed for nook touch tools. Although, I successfully installed them but when I go to the app to do the remapping the CTRL option no longer exists in the list of options!

I already found my keymap file in this directory

> /system/usr/keylayout/

The file is named **TWL4030\_Keypad.kl**

The content of the **TWL4030\_Keypad.kl** file is here.

```
    key 399   GRAVE
key 2     1
key 3     2
key 4     3
key 5     4
key 6     5
key 7     6
key 8     7
key 9     8
key 10    9
key 78    0
key 158   BACK              WAKE_DROPPED
key 14    BACK              WAKE_DROPPED
key 230   SOFT_RIGHT        WAKE
key 106   SOFT_RIGHT        WAKE
key 107   ENDCALL           WAKE_DROPPED
key 62    ENDCALL           WAKE_DROPPED
key 60    ENDCALL           WAKE_DROPPED
key 229   MENU              WAKE_DROPPED
key 139   MENU              WAKE_DROPPED
key 59    MENU              WAKE_DROPPED
key 127   SEARCH            WAKE_DROPPED
key 217   SEARCH            WAKE_DROPPED
key 228   POUND
key 66    POUND
key 227   STAR
key 65    STAR
key 231   CALL              WAKE_DROPPED
key 102   CALL              WAKE_DROPPED
key 232   DPAD_CENTER       WAKE_DROPPED
key 108   DPAD_DOWN         WAKE_DROPPED
key 103   DPAD_UP           WAKE_DROPPED
key 63    HOME              WAKE
key 105   DPAD_LEFT         WAKE_DROPPED
key 106   DPAD_RIGHT        WAKE_DROPPED
key 115   VOLUME_UP
key 114   VOLUME_DOWN
key 116   POWER             WAKE
key 212   CAMERA
key 148   DPAD_CENTER
key 149   SEARCH
key 202   EXPLORER
key 203   ENVELOPE
key 102   HOME
key 16    Q
key 17    W
key 18    E
key 19    R
key 20    T
key 21    Y
key 22    U
key 23    I
key 24    O
key 25    P
key 26    LEFT_BRACKET
key 27    RIGHT_BRACKET
key 43    BACKSLASH
key 30    A
key 31    S
key 32    D
key 33    F
key 34    G
key 35    H
key 36    J
key 37    K
key 38    L
key 39    SEMICOLON
key 40    APOSTROPHE
key 61    DEL
key 353   ENTER
key 44    Z
key 45    X
key 46    C
key 47    V
key 48    B
key 49    N
key 50    M
key 51    COMMA
key 52    PERIOD
key 53    SLASH
key 28    ENTER
key 56    ALT_LEFT
key 100   ALT_RIGHT
key 42    ALT_LEFT
key 54    SHIFT_RIGHT
key 15    TAB
key 57    SPACE
key 150   EXPLORER
key 155   ENVELOPE
key 58    SHIFT_RIGHT
key 12    MINUS
key 13    EQUALS
key 215   AT
key 407   RIGHT_NEXTPAGE
key 412   CTRL_LEFT       <----------Here I tried to edit the file in adb
key 139   LEFT_PREVPAGE              but is not recognized by the nook.
key 158   RIGHT_PREVPAGE

```

# Answer
I furnished two solutions to my problem.

Get into the nook touch tools app and set up key bindings by clicking the button on the far right. You should see something like this. Where it says, left-bottom button select the option Volume\_Down.

After rebooting get into the terminal app's settings to set up key bindings.

The terminal app has options that permit you set up key bindings that will allow me to emulate the control key.

I have taken screenshots of the terminal's settings. I go into nook touch tools and set up the binding to use the left bottom page button to be used as a volume button. You must do this for it to work. Select preferences.

The next step is to go to keyboard and you'll see the select control key option. Under the sub-list of options select volume-down for use as the CTRL key. Then you can now use the left bottom page button as the control key.

The second option is to download the hacker's keyboard and install the multi-touch zips with the CWM based recovery on a sdcard via re-boot. But the ctrl key doesn't work so you still have to set up the settings in the terminal app. The multi-touch hack allows you to use two keys at the same time therefore allowing the binding of the alt key to be used as the ctrl key.
> 1 votes

---
Tags: 2.1-eclair, nook
---


# Question
Title: How do I view root ( / ) with Termux if termux-setup-storage doesn't help?
After reviewing this, I used `termux-setup-storage` on my phone and Andy Android emulator.

After running the above command, I am able to view root directory with `ls` on Andy emulator but not on phone.

**INFO:**
Android version 7.1.1
Xperia XZ
SoftBank locked the phone BIOS (or whatever it was) so I can't root it.
Storage permissions are granted.

What else can I try to use `ls` on root directory on my phone?

# Answer
> 1 votes
If you can't root your phone, you can't see root / The termux-storage-storage allows you to access SD card storage and NOT root /

Note: Andy emulator IS rooted by default \- Thanks l3l\_aze, iBug, Death Mask Salesman, Irfan Latif

# Answer
> 4 votes
`termux-setup-storage` only grants android.permission.WRITE\_EXTERNAL\_STORAGE that lets the app access internal SD card i.e. `/sdcard`.

Android's init creates rootfs `/` with permissions `0:0` (uid:gid) and `0755` (mode). So the root directory should be accessible to any non-root user.
However SELinux plays its role restricting unauthorized access to rootfs. You can view such policy denials by:

```
dmesg | grep 'avc: denied'

```

* Most probably SELinux will deny this command too if run from non-root app

To view all SEPolicy rules, `sesearch` tool from setools-android can be used.

To set SELinux permissive:

```
echo 0 >/sys/fs/selinux/enforce
# or
setenforce 0

```

Or add an exception to SELinux policy:

```
supolicy --live 'allow untrusted_app rootfs dir { read open }'

```

* `supolicy` tool is provided by rooting solutions e.g. Magisk, SuperSu

This policy allows reading rootfs but still you may get errors because reading attributes of files/directories under rootfs isn't permitted by policy.

Also both solutions need root privileges and are nonpersistent i.e. need to be set after reboot.

So if you are running a non-rooted production build of Android (with enforcing SELinux), you won't be able to read rootfs `/`.

---
Tags: internal-storage, stock-android, termux
---


# Question
Title: Does Chrome for Android implement tab discarding, and how to access its controls?
I'm trying to diagnose an issue on my Android. See below for more background on the underlying issue. But what I want to ask you now is why I can't seem to find anything in my Android Chrome (version 71) related to Chrome's "tab discarding". (For background on tab discarding and page refreshes, see http://superuser.com/questions/1353931/how-can-i-get-chrome-to-stop-killing-my-tabs-in-the-background/1353940.) I want to see if tab discarding might be the cause of my problem, but it's hard to diagnose because I can't find the parts of Chrome relating to tab discarding.

In particular, there are supposed to be tab discarding-related flags at chrome://flags, but I can't find any. There's also supposed to be a tool for learning about tab discarding information, at chrome://discards, but Chrome says that's an invalid link. (These flags/features *do* appear on my desktop version of Chrome 71, though.) It makes me wonder if my Android build of Chrome even does tab discarding.

As for the underlying issue I'm trying to debug: I have this webapp/website/webapge that uses JavaScript to play audio. I want this page to keep playing its audio indefinitely on my phone, even when Chrome isn't the foreground app. This works properly for a while (10-30 minutes maybe), but eventually Chrome will reload the page for no obvious reason. My current hypothesis is that it maybe has something to do with tab discarding.

# Answer
Your device is out of memory. Like your Android phone or tablet, Chrome is silently closing background tabs in order to make memory available. When you click on one of those tabs it reloads.
> 0 votes

---
Tags: chrome-for-android
---


title: When to 'force stop' and it's effects

text:
# Question
Title: When to 'force stop' and it's effects
I have read over many q and A's regarding the 'force stop' option for most apps. All explain what it's function is, but aren't too clear on when it is really necessary to go thru my list of apps and force stop them (EVEN ONES THAT ARE NOT CURRENTLY IN THE LIST OF RUNNING APPS?!?!?) That was and still is a bit hard for me to understand also. If my phone says the apps are not currently running what I'd it that I'm forcing to stop? And will it effect the function or start up of the app when I need to use it?

# Answer
The answer is easy: Under normal circumstances you never need to "force stop" any app. Android automatically handles which app should be stopped in case the system is running out of free RAM.

Anyway even if you force an app to stop it usually should be able to start again at any time. Note that "starting an app" may even happen without user interaction based on certain events like change of battery level, a new Wifi was found, or simply because another app has triggered the app to run in background.
> 3 votes

---
Tags: applications
---


# Question
Title: Why do I have to download music to Android internal storage then copy to SD card to work?
Samsung 9+ 128 GB SanDisk SD Card Android version 8.0.0 (Samsung Experience version 9.0) Service provider Verizon

The issue I'm having is with copying music files from my Windows 10 PC directly to the Android's SD card via USB cable. When I do this, the first song in an album is playable, but all the others only play for a second before skipping to the next.

The workaround I found is to copy the files from the PC to Android ***internal storage*** and then to ***move*** them to the SD card storage. Moving the files from internal to SD storage works equally whether I use an Android file manager or Windows explorer.

This is obviously a very cumbersome process when dealing with a thousand files. Ideally, I'd like to download files directly to the SD card. Does anyone know what is going on?

Thanks for your help.

# Answer
> 0 votes
Windows 10 has currently some bugs in the MTP system (MTP is the system used for transferring data from/to your phone via Windows Explorer). This might be the reason for your problems.

Alternatively you can enable Debug mode and ADB on your device and then use a GUI tool that uses ADB for file transferring, e.g. this one:

---
Tags: samsung, windows, file-management, media-files
---