# Question
Title: Is there a way to send a video signal into an Android device?
I have Samsung 6 and I'd like to use it with Gear VR. I would like to send an external signal into it like my VCR or Laser Disc player (I'm joking I'm not that old, geewhiz). I'm actually thinking of sending a regular HDMI signal into it.

Is there anyway to do this? Even if it requires hacking? I remember at one point it was impossible to send the video signal out an Android device but now it's not so there is hope?

# Answer
TrinusVR is an app that allows you to stream HD video from you PC to your smartphone, either wireless with some latency, or with a USB cord without latency. Meant for video games but it will stream whatever is on your computer screen. Then you need an HDMI capture device connected to your PC, and you've got a way to port HDMI into your Android. The catch is that it split screens the image for use in VR goggles, but I believe you can bypass that.
> 1 votes

---
Tags: video, hdmi, video-recording, video-streaming
---


# Question
Title: ADB Device Unauthorized [Android 6.0.1 Nexus 6P]
I've literally tried everything it seems like. There was an another unanswered post on here asking something similar but obviously it didn't help since no one had answered.

# RSA Fingerprint Dialog is not displaying - regardless of what I do

My phone used to display the RSA fingerprint dialog after selecting USB Debugging under developers settings. Now it doesn't. I'm very frustrated as I've only purchased this phone for the sole purpose of installing Kali nethunter on it.

I had the phone rooted before and installed the wrong rom for kali nethunter so I flashed the stock ROM back on to it and all is well and working except USB Debugging. I'm about to throw my phone away at this point... I've tried everything it seems:

## Past, Frustrating Attempts

* Try a different cable
* Switch phone to PTP and MTP mode
* Switch USB debugging on and off
* Install and uninstall universal driver and google drivers
* try different usb port
* ADB kill-server / ADB start-server (Device still unauthorized under ADB Devices)
* Install SDK manager and update ADB / Fastboot
* Try a differnet OS (Windows 7, Windows 8.1, Windows 10, Kali Linux)
* Factory Reset
* Delete RSA Keys under 'C:.android'

All of these did not work.

My phone as it sits is unrooted (because I can't put it in USB Debugging mode) 6.0.1 marshmallow and TWRP installed as custom recovery.

# Answer
You can reset the list of authorized devices by doing:

> * Developer Options
> * Under Debug Group select "Revoke USB Debug Authorization" (I'm translating from italian but should be something similar)
> * Unplug your phone and go to your launcher
> * Plug the cable to pc
> * Check when you connect the cable that Data transfer is enabled (from the notification that appears)

Hope this can fix the issue
> 1 votes

# Answer
I have a very similar problem with the Galaxy Tab A, which I finally solved. I think this may solve your problem as well. The upshot is that I had to restart the "adbd" (adb daemon) on the device itself... I don't think it was particular to the Galaxy Tab A I was using.

In order to get adb working again I had to put the device into recovery mode (power down, then power up while holding power, up-volume, home button). I then went to the terminal application of the Team Win Recovery. In terminal I issues "stop adbd" then "start adbd". At this point the device now shows up on the local host PC when I run "adb devices" (it shows up as "recovery" rather than unauthorized). I can adb root/shell to the device now. This is really all I need to do. I expect this will solve my problem in non-recovery mode as well. Or, at this point I can push my PC pub key to the device and it should be fine.
> 0 votes

---
Tags: rooting, adb, 6.0-marshmallow, twrp, nexus-6p
---


# Question
Title: Set default storage to SD card on Moto E running Lollipop
I have Moto E 2nd gen. and I want to set SD card as my default storage. I googled but nothing useful found. Can someone help me?

# Answer
There are several ways for doing this:

* See this video on YouTube, if your phone can support this method; Or,
* See this video to use default file manager to change the storage; Or,
* Use file managers like **ES File Explorer File Manager**. When you try to download a file, it shows you the pop up menu and then you can choose the path for storing the files; Or,
* Use Google Chrome Browser. In Chrome, tap the tools drop-down bar in the top right corner → tap **Settings** → tap **Show advanced settings**, and enter the file path you want where the file should download.

In other browsers the process is very similar.
> 1 votes

# Answer
Here is an easy way:

1. Open the Camera app.
2. Swipe on the middle of the screen from the left to the right. This may take a couple of tries so be persistent.
3. This gives a half-moon shaped menu on the left. Slide this menu counter clockwise to the icon of an sd card. Tap on this.
4. Choose Phone or SD card for the storage location.
> 0 votes

---
Tags: 5.0-lollipop, sd-card, motorola-moto-e
---


# Question
Title: Is it possiblchange touchwiz to HTC sense?
I have an s6 edge, and i want to change touchwiz skin to HTC sense. Does anyone have any ideas on how to do this?

# Answer
You can't get the full Sense experience (both TW and Sense are heavily embedded in SystemUI/framework/etc.), but you can install a bunch of ported Sense apps, including Sense Home, weather, music and many you've come to know about, to get a half-complete one.

Get the set of apps here:

HTC Sense™ Home - Themes | New Apps | Sense 7 | for all devices \[19/10/2015\]
> 0 votes

---
Tags: samsung-galaxy-s-6, htc-sense, samsung-touchwiz
---


# Question
Title: How to stop unwanted Nvidia Shield TV wake up?
My Nvidia Shield TV wake up from standby mode undesirably (and wake up my tv).

So my first question: Is it possible to get a log to see what awakens it?

On a more empirical approach, I have noticed two behaviors somewhat contradictory and strange:

* If I connect a wired gamepad, the shield tv wakes up more often.
* Without internet access (but with a local network) the shield tv doesn't wake up

So, my other question is: what can I do to stop these wake up?

(My shield tv is rooted and I have sideloaded some apps, maybe it's related but I prefer to avoid a reset...)

Thank you.

# Answer
1. try to shake your gamepad slightly to see if this action will trigger the wake up of you tv.
2. install the Greenify on you Nvidia Shield TV, which will show you the wake up relation, and also you can disable the wake up.
3. alternatively, if you found out the apps that wake up your tv, you can use ice box to freeze the apps.
> 1 votes

---
Tags: standby, android-tv, nvidia-shield
---


# Question
Title: How to take a screenshot of an entire scrolling activity?
I have a Samsung Galaxy Y, and I have an application that has a scrollable activity. I wanted to take a screenshot but the "Home button - Power button" combination only captures the contents that are visible on the screen. What I wanted is to capture the full activity of the app including the unscrolled parts... I hope I explained it well ...

# Answer
You can check the scrollscreenshot tool: https://github.com/PGSSoft/scrollscreenshot

It makes multiple screenshots and simulates drag events to scroll content between each screenshot, then join all images into one.

Disclaimer: I'm author of this tool, it was published by my employer. Feature requests are welcome.
> 10 votes

# Answer
As was said - this cannot be done. I am just putting this in an answer form...

The reason being is that screenshots work by converting what is on the screen to an image - what is on the screen is pulled directly from the hardware.

Obviously, the screen doesn't know what is *going* to be displayed, a bit like we don't know exactly what is going to happen tomorrow (unless you're psychic, but we will ignore that for this analogy).

As such, there is no way to do this.

What you *could* do however, is to take many screenshots, scrolling down a bit, and then use a graphics package to stick the two screenshots together - may not look nice, but it will have to do I am afraid.
> 1 votes

# Answer
As said, a simple screenshot cannot do this for the mentioned reasons. What you could, however, do, is a *ScreenCast* -- which is easiest described as a video recording of your activities. AirDroid is one of the apps offering this for free (experimental, and root required). Searching the playstore for "screencast" will show you additional candidates. However, root will be required to operate them.

Aside from that, and not requiring root, is to make a series of screenshots, as suggested by t0mm13b already, and then using an image editor to connect them.
> 0 votes

# Answer
If you want to take a scrolling screenshot of any webpage in android or iPhone you need to install an app for this.

Android Users can install **Stitch & Share app** in your android device from play store and follow the simple steps provided in demo.

iOS users can install **Trytailor app** or **Stitch It app** from app store. Once you download this app check the video and follow the steps. Also don’t forget to give access to your photos.

Source: How to Take Scrolling Screenshots on Android and iPhone

**Disclosure**: I'm the author of the linked article.
> 0 votes

---
Tags: screenshots, samsung-galaxy-y
---


# Question
Title: Too many pattern attempts with no data connection? GS1
So i locked myself out of my GalaxyS1(i9000) I Have lots of stuff on there that i really need. I have no wifi or data connection on,debugging is off,no root. only bluetooth on... I know it seems like a lost cause but i really need a creative way in.. Thanks..

# Answer
> 1 votes
**Method 1:**

(If you have rooted device and activated adb from developer options on your phone previously. I have mentioned it here so it may help others.)

1. Download and install adb kits and driver from here
2. Connect the phone via usb to your pc
3. In command prompt type the commands below

* adb shell
    * cd data/system
    * su
    * rm \*.key
4. Reboot.

---

**Disclaimer:** I'm not responsible if you brick your device by this method. Think carefully before doing it.

**Method 2:**

1. Download Aroma File Manager and place it in your sdcard.(Rename it to update.zip if needed)
2. Go to recovery mode by powering off your device and press Volume up + Home then Power button.
3. Select update/install zip from sdcard and flash the aroma zip.
4. Go to `/data/system`
5. To remove pattern lock delete gesture.key and If you want to remove password, delete password.key
6. Reboot.

---

If these thing doesn't work I am afraid that you have to do a Hard Reset from Recovery.

**Suggestion:** If you don't have privacy issue always backup your important documents(like:- contacts, messages etc.) in cloud or sync them with google's backup services.

---
Tags: sim-unlocking, pattern-lock
---


title: Cerberus not start when mobile restart

text:
# Question
Title: Cerberus not start when mobile restart
Hello I have a Xiaomi redmi 3 Pro with MIUI 8 and I installed the app `cerberus` and I have made the app is not shown in the menu. The problem is this, I restarted the phone and want to access the app now, I put the code 23723787 for show the app in the menu and I also tried to send a command from the web and I have not received a response. It is as if the app had not started after restarting mobile. Any suggestion?

# Answer
After searching some information I found the way. You have to go to `Settings -> permissions -> autostart` and check the App Cerberus and other apps you want start automatically. Then I restart the phone and try the code or the web command and this work for me.

I found other way if you want to delete the App and then install it again. This way involves installing the App ROM Toolbox, that lets you delete a hidden App without being root and then install Cerberus again and follow the steps before.

This work for me, I hope this is the best way to do it, but I appreciate it corrected if I'm wrong.
> 0 votes

---
Tags: miui, xiaomi
---


# Question
Title: Sim card not detected after installing CM13 (unofficial) on xperia l
i'm new to android. I recently bought a xperia l phone from my friend in which he had Cm11 installed i decided to upgrade to cm13 and it really messed up the phone.. the sim card was not detected and play store didn't work!!! so i came back to cm11 which then entered boot loop. So i decided to go with cm12.1. Now the pay services work like charm... BUTTTT sim not detected problem still persists!!! so can some one here gimme the link of the radio or modem files of xperia l c2104 or help me with any other solution for this problem... thanks in advance

# Answer
> 1 votes
Your baseband was messed up. Try to flash the stock ROM and don't flash CM13.

This happened on my Samsung Galaxy A3, when its baseband was messed up when I try to install it.

# Answer
> -2 votes
Yea flash stock rom of xperia...(model)..via download mode... You need PC Qpst installed on it& And to go in download mode press volume+&volume- then connect the USB cable

---
Tags: cyanogenmod, sim-card, radio-firmware, sony-xperia-l
---


title: GPS issue when Mobile Data is enabled

text:
# Question
Title: GPS issue when Mobile Data is enabled
I have two Motorola devices, a **Moto X2** and **Moto G3**, both with **Android M 6.0** (Original most recent ROM without root).

I have recently noticed problems with the GPS on both devices. Google Maps and Waze many times the GPS signal drops and can not determine the location.

In my test I could find that the GPS problem happens when the Mobile Data (only 3G) are active. Just disabling mobile data and GPS back to work with good accuracy and even on rainy days.

I researched on the Internet and can not find a solution to the problem. Already restored the network connections and even restored the factory settings. Also I have been tested to work with modes **High Accuracy** and **Only GPS**. The problem persists.

The issue is the same in both devices.

# Answer
> 1 votes
After a few days of research I discovered that the problem it is a conflict between some Android devices and some 3G networks. (In my case, in Brazil)

*Sorry about the portuguese content, but I could not find more details in english communities.*

I contacted Motorola, I will send my devices for repair. I believe it is difficult to be a solution, but I will update my answer whenever I have news.

**## UPDATE 17 Out 2016**

My Moto X2 was sent for repair and returned with the same problem, I'm trying a new contact with the manufacturer.

---
Tags: 6.0-marshmallow, gps, motorola
---


# Question
Title: Is there a non-app tool for batch backup of APK files?
Just as the other times, an answer to my question *shall not* contemplate an app from either the Play Store, or any other source. What I'm after, is a tool capable to backup **user apps**, **system apps** or **both those categories**, when launched from within a working Android OS.

Backing up the apps' external data *is not relevant*. The only thing that counts, is the ability to batch backup the **base.apk** file, found in each **/data/app/appName/** directory, in order for me to be able to reinstall it either in order to revert to a previous version, or to install it from scratch.

Lastly, I would prefer for the tool to be freely customizable (e.g. not compiled). Maybe something like a shell script?

# Answer
> 5 votes
**This script is outdated and no longer supported. For the newest version, which requires Android 5+ and Python 3.5+, and supports Arcus theme variants and Substratum overlays, see my GitHub repository.**

---

Here's my revamped script, now dubbed **NEMRIS**, which satisfies the question. As usual, it's freely editable by anyone, and sh-compliant as well, meaning that it can be ran from the Android shell.

Actually, the script depends upon the **aapt** utility, can discern if the utility is installed, is able to determine whether the `backupDir` and the `appsToBackup` variables are empty or not and, if they are, it sets default values instead of aborting.

Still, the **date** binary cannot determine your true time zone, so everyone should manually edit their `TZ` variable.

Once it has been ran for the first time, the tool is able to discern whether an APK has already been backed up or not, by making use of an array filled with MD5 checksums.

It also stores said array into a dictionary, called **md5sums.txt**, which is a plaintext file located into the APK backup directory. This feature is able to reduce the elapsed time of a good half, but it depends on a **stat** binary able to measure a file's exact size in bytes. If **stat** does not comply, the checksums will be computed each and every time, as in the previous version of the script. This is to ensure that NEMRIS will depend only upon **aapt**. Remember to manually wipe the **md5sums.txt** if you do some cleanup in the backup folder.

As a plus, the script now has a `maxDictSize` variable, which accepts an integer value. The inputted value will be interpreted as bytes. This can be customized, and serves to recompute the checksums dictionary if its size exceeds the maximum.

Finally, I patched it to support third-party apps whose names have forward slashes in them. No more weird errors, I guess.

I hope it may prove useful.

License: GNU General Public License, version 3 or later.

---

```
#!/system/bin/sh

# nemris - an Android app backup tool

# Copyright (C) 2016 Death Mask Salesman
# <http://android.stackexchange.com/users/152843/death-mask-salesman>

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License at <http://www.gnu.org/licenses/> for
# more details.

#This variable is used to calculate the total elapsed time
#DO NOT alter it, or the script won't be able to calculate it
SECONDS=0

#This variable is used to output the time when the script is launched
#Edit the plus/minus and the value after "UTC", to force date into displaying your correct time zone
timeAtStart="$(TZ=UTC-2 date +%H:%M:%S)"

#This variable stores the path where to backup your apps' APK files
#Edit it freely, but do not forget the quotes
backupDir=""

#This variable stores the path where the script is located
scriptDir="$(dirname "$(readlink -f "$0")")"

#This variable tells the script which apps to backup
#Supported values are:
# - "User": tells the script to backup only third-party apps
# - "System": tells the script to backup only system apps
# - "All": tells the script to backup both 3rd party and system apps
appsToBackup=""

#This variable contains the maximum size of the checksums dictionary, in bytes
#It is used to decide whether to flush the dictionary or not
typeset -i maxDictSize=20000

#This function outputs the time when the operations start. Purely cosmetic: can be disabled safely
#///Beginning of function "timeInfo"///
function timeInfo {
 echo "[ INFO ] Operations started at "$timeAtStart"."
}
#///End of function "timeInfo"///

#This function checks if the "aapt" and "stat" utilities are installed
#///Beginning of function "dependencyChecker"///
function dependencyChecker {
 echo "[ INFO ] Checking if aapt and stat are installed..."
 whence -v aapt &> /dev/null
 isAaptAbsent="$(echo $?)"

 whence -v stat &> /dev/null
 isStatAbsent="$(echo $?)"

 if [ "$isAaptAbsent" == "0" ]; then
  echo "[ INFO ] aapt has been found."
  unset isAaptAbsent
 else
  echo "[ FATAL ] aapt cannot be found. Aborting."
  exit
 fi

 if [ "$isStatAbsent" == "0" ]; then
  echo "[ INFO ] stat has been found."
  echo ""
  echo "[ INFO ] Checking if stat can measure exact file sizes..."

  stat -c %s "$scriptDir/nemris.sh" &> /dev/null
  if [ "$(echo $?)" == "0" ]; then
   echo "[ INFO ] Measurement successful."
   isStatUsable="1"
   unset isStatAbsent
  else
   echo "[ WARNING ] Measurement failed. stat will be ignored."
   isStatUsable="0"
   unset isStatAbsent
  fi
 else
  echo "[ WARNING ] stat cannot be found."
  isStatUsable="0"
  unset isStatAbsent
 fi
}
#///End of function "dependencyChecker"///

#This function verifies whether the values into "backupDir" and "appsToBackup" have anything inside or not
#In the case that the variables are empty, default values will be used, instead
#///Beginning of the function "variablesChecker"///
function variablesChecker {
 echo "[ INFO ] Checking if a backup path has already been specified..."
 if [ "$backupDir" == "$(cat /dev/null)" ]; then
  echo "[ WARNING ] A backup path has not been specified."
  echo "[ WARNING ] Setting the path to default (/sdcard/AppsBackup)."
  backupDir="/sdcard/AppsBackup"
 else
  echo "[ INFO ] Backup path has already been specified."
 fi
 echo ""

 echo "[ INFO ] Checking if the typology of apps to backup has already been chosen..."
 if [ "$appsToBackup" == "$(cat /dev/null)" ]; then
  echo "[ WARNING ] A typology of apps to backup has not been specified."
  echo "[ WARNING ] Setting the default typology (User)."
  appsToBackup="User"
 else
  echo "[ INFO ] A typology of apps has already been specified."
 fi
}
#///End of the function "variablesChecker"///

#This function emulates the case insensitivity for "appsToBackup", usually provided by brace expansion, but lacked by sh
#In the case that an unsupported value is found, a default value will be used instead
#///Beginning of the function "caseInsensitiveWorkaround"///
function caseInsensitiveWorkaround {
 systemArray="$(echo -n {s,S}{y,Y}{s,S}{t,T}{e,E}{m,M})"
 userArray="$(echo -n {u,U}{s,S}{e,E}{r,R})"
 allArray="$(echo -n {a,A}{l,L}{l,L})"

 case ${appsToBackup:0:1} in
  s|S)
   for i in $systemArray; do
    case "$appsToBackup" in
     $i)
      appsToBackup="System"
      ;;
    esac
   done
   ;;
  u|U)
   for i in $userArray; do
    case "$appsToBackup" in
     $i)
      appsToBackup="User"
      ;;
    esac
   done
   ;;
  a|A)
   for i in $allArray; do
    case "$appsToBackup" in
     $i)
      appsToBackup="All"
      ;;
    esac
   done
   ;;
  *)
   echo "[ WARNING ] \""$appsToBackup"\": invalid typology."
   echo "[ WARNING ] Setting the default typology (User)."
   appsToBackup="User"
   ;;
 esac

 case "$appsToBackup" in
  System|User|All)
   ;;
  *)
   echo "[ WARNING ] \""$appsToBackup"\": invalid typology."
   echo "[ WARNING ] Setting the default typology (User)."
   appsToBackup="User"
   ;;
 esac
}
#///End of the function "caseInsensitiveWorkaround"///

#This function checks if the backup directory already exists
#///Beginning of the function "backupDirCheck"///
function backupDirCheck {
 echo "[ INFO ] Checking if the backup directory already exists..."
 if [ -d "$backupDir" ]; then
  echo -n "[ INFO ] Backup directory already exists, "

  cd "$backupDir"
  #echo "[ INFO ] Checking if the directory is empty..."
  if [ "$(ls | grep "\.apk$" | head -n 1)" == "$(cat /dev/null)" ]; then
   echo "and does not have any APK file inside."
  else
   echo "and has at least an APK file inside."
   isDirectoryEmpty="0"
  fi
 else
  echo "[ INFO ] Backup directory does not exist. Creating it now."
  mkdir -p "$backupDir"
  cd "$backupDir"
 fi
}
#///End of the function "backupDirCheck"///

#This function compares the size of the checksums dictionary and flushes it if too big
#///Beginning of function "sizeComparer"///
function sizeComparer {
 echo "[ INFO ] Comparing the dictionary size to the max value..."

 typeset -i dictSize="$(stat -c %s "$backupDir/md5sums.txt")"
 if [ $dictSize -ge maxDictSize ]; then
  echo "[ INFO ] The dictionary size exceeds the maximum value. The checksums will be recomputed."
  dictTooBig="1"
  unset dictSize
 else
  echo "[ INFO ] The dictionary size does not exceed the maximum value."
 fi
}
#///End of function "sizeComparer"///

#This function generates a MD5 array, filled with the checksum of each APK file
#///Beginning of the function "checksumsGenerator"///
function checksumsGenerator {
 echo "[ INFO ] Generating file checksums..."
 apkList="$(printf "%s\n" * | grep "\.apk$")"
 for i in $apkList; do
  tempMd5=($(md5sum $i))
  md5Array="$tempMd5 $md5Array"
 done

 cat << EOF > "$backupDir/md5sums.txt"
md5Array="$md5Array"
EOF

 echo "[ INFO ] MD5 array generated."
}
#///End of the function "checksumsGenerator"///

#This function creates a list of the apps to backup, based on the content in "appsToBackup"
#///Beginning of the function "appListGenerator"///
function appListGenerator {
 case "$appsToBackup" in
  System)
   echo "[ INFO ] Retrieving system apps list..."
   appList="$(pm list packages -s)"
   ;;
  User)
   echo "[ INFO ] Retrieving third-party apps list..."
   appList="$(pm list packages -3)"
   ;;
  All)
   echo "[ INFO ] Retrieving apps list..."
   appList="$(pm list packages)"
   ;;
 esac

 echo "[ INFO ] Applications list retrieved."
}
#///End of the function "appListGenerator"///

#This function creates an array, filled with each app's full path
#///Beginning of the function "apkPathRetriever"///
function apkPathRetriever {
 echo "[ INFO ] Collecting the path of each app's APK..."
 for i in $appList; do
  apkPath="${i#p*:}"
  apkPath="$(pm path $apkPath)"
  apkPath="${apkPath#p*:}"
  pathArray="$apkPath $pathArray"
 done
 echo "[ INFO ] Paths collected."
}
#///End of the function "apkPathRetriever"///

#This function extracts the label or the package name for the APK supplied to it
#It extracts the app label for any third-party app, the package name for any system app
#///Beginning of the function "appNameRetriever"///
function appNameRetriever {
 case "$1" in
  /system/*)
   appName="${aaptOutput#*name=\'}"
   appName="${appName//\'*/}"
   displayedName="$appName"
   ;;
  /data/*|/mnt/asec/*)
   appName="${aaptOutput#*application-label:\'}"
   appName="${appName//app*/}"
   appName="${appName%\'*}"
   displayedName=$appName
   appName="${appName//\//}"
   appName="$(printf "%s" $appName)"
   ;;
 esac
}
#///End of the function "appNameRetriever"///

#This function retrieves the version number of the APK
#///Beginning of the function "appVersionRetriever"///
function appVersionRetriever {
 appVersion="${aaptOutput#*versionName=\'}"
 appVersion="${appVersion//platformBuildVersion*/}"
 appVersion="${appVersion%\'*}"
 appVersion="$(printf "%s" $appVersion)"
}
#///End of the function "appVersionRetriever"///

#This function compares the MD5 of the APK in question against any MD5 in the array
#If it finds a match, then the function exits and the APK isn't backed up
#///Beginning of the function "md5Compare"///
function md5Compare {
 alreadyBackedUp=0
 appMd5=($(md5sum "$1"))

 for c in $md5Array; do
  if [ "$alreadyBackedUp" == "0" ]; then
   if [ "$appMd5" == "$c" ]; then
    alreadyBackedUp=1;
   fi
  else
   break;
  fi
 done
}
#///End of the function "md5Compare"///

#This function decides whether to backup an app or not
#It calls both "appNameRetriever" and "appVersionRetriever" for renaming any copied "base.apk"
#It also decides whether to call "md5Compare" or not, in order to see if an app has already been backed up
#///Beginning of the function "apkBackup"///
function apkBackup {
 for i in $pathArray; do
  aaptOutput="$(aapt d badging "$i")"

  appNameRetriever "$i"
  appVersionRetriever

  if [ "$isDirectoryEmpty" == "0" ]; then
   md5Compare "$i"

   if [ "$alreadyBackedUp" == "0" ]; then
    echo -n "[ INFO ] Backing up "$displayedName"... "
    cp "$i" "$backupDir"/$appName"_"$appVersion.apk
    echo "done."
    md5Array="$appMd5 $md5Array"
   else
    echo "[ INFO ] "$displayedName" has already been backed up."
   fi
  else
   echo -n "[ INFO ] Backing up "$displayedName"... "
   cp "$i" "$backupDir"/$appName"_"$appVersion.apk
   echo "done."
  fi
 done

 if [ "$md5Array" != "$(cat /dev/null)" ]; then
  cat << EOF > "$backupDir/md5sums.txt"
md5Array="$md5Array"
EOF
 fi
}
#///End of the function "apkBackup"///

#This is the core of the tool
echo "**************************"
echo " NEMRIS - App backup tool "
echo "  by Death Mask Salesman  "
echo "**************************"

timeInfo
echo ""

dependencyChecker
echo ""

variablesChecker
echo ""

caseInsensitiveWorkaround
echo ""

backupDirCheck
echo ""

#This section checks whether to analyze the dictionary size
#It also decides whether to compute the checksums
if [ "$isDirectoryEmpty" == "0" ]; then
 if [ -e "$backupDir/md5sums.txt" ]; then
  if [ "$isStatUsable" == "1" ]; then
   sizeComparer
   echo ""
  else
   dictTooBig="1"
  fi

  if [ "$dictTooBig" == "1" ]; then
   checksumsGenerator
   echo ""
  else
   source "$backupDir/md5sums.txt"
  fi
 else
  echo "[ INFO ] Checksums not calculated yet."
  checksumsGenerator
  echo ""
 fi
fi

appListGenerator
echo ""

apkPathRetriever
echo ""

apkBackup
echo ""

echo "[ INFO ] Operations took "$(((SECONDS/60)/60))" hours, "$(((SECONDS/60)%60))" minutes and "$((SECONDS%60))" seconds."
echo "[ INFO ] All done!"

```

# Answer
> 1 votes
This is a particular, improved version of the standard **Nemris** tool. It constitutes a separate answer because, while it provides a dramatic speed improvement, it's mostly untested (it works for certain under **CM12.1** and **CM13**).

---

## License

This tool is licensed under the WTFPL license. In other words, do what you want with it. Reuse its components, sublicense it... and quote me as the original author, if you wish. I take no responsibilities, though.

---

## Differences from the old Nemris

* The verbosity of the tool has been reduced.
* stat is no longer necessary.
* The backup speed has been greatly improved: a delta backup takes around 25 seconds, rather than one minute.
* Fixed the buggy backup of system apps by ignoring aapt.
* Added support for backup of disabled apps.
* Two optional command line arguments have been added; the usage is below.

---

## Default backup directory

To specify a custom backup directory, manually edit **line 17**. If you leave it blank, the script will default to **/sdcard/NemrisBackup**.

---

## Usage

Nemris can be either launched without arguments, or with two optional arguments. Usage:

```
nemris.sh [app_typology] [reset]

```

. The first argument can be **User**, **System**, **Disabled** or **All**, or even be left blank. If the supplied argument is unrecognized or null, the tool defaults to **User**. Case insensitivity is supported.

The second argument may only be **reset**, and may be specified only if the first argument has been specified as well. If you do so, the tool will delete and recreate its configuration files, which are located in the same place as the script.

---

```
#!/system/bin/sh

# A bunch of variables and a function that facilitate the script's workings
# Do not alter them unless you know what you're doing
SECONDS=0
app_typology="$1"
null="$(cat /dev/null)"
script_location="$(dirname "$(readlink -f "$0")")"

function var_to_file {
 echo "$1=\"$2\"" >> "$script_location/nemris_config.txt"
}

####################

# This variable is needed to define the backup location
backup_location=""

####################

# This function cleans up the files generated in a previous execution
function settings_md5_files_delete {
 echo -ne "[ INFO ] Deleting Nemris configuration and MD5 dictionary..."

 if [ -e "$script_location/nemris_config.txt" ]; then
  if [ -e "$script_location/md5_dictionary.txt" ]; then
   rm "$script_location/nemris_config.txt" "$script_location/md5_dictionary.txt"
  else
   rm "$script_location/nemris_config.txt"
  fi
 else
  if [ -e "$script_location/md5_dictionary.txt" ]; then
   rm "$script_location/md5_dictionary.txt"
  else
   echo -ne " no files to remove..."
  fi
 fi

 echo " done. The files will be regenerated."
}

# This function checks if a settings file has been generated from a previous execution and loads its data
function settings_file_check {
 echo -ne "[ INFO ] Checking for Nemris configuration file..."

 if [ -e "$script_location/nemris_config.txt" ]; then
  echo " found."

  if [ "$backup_location" == "$null" ]; then
   source "$script_location/nemris_config.txt"
  else
   temp="$backup_location"
   source "$script_location/nemris_config.txt"
   backup_location="$temp"

   unset temp
  fi
 else
  echo " not found. The configuration will be regenerated."

  touch "$script_location/nemris_config.txt"
 fi
}

# This function reads the list of the packages and generates a special dictionary
# This is the reason of the time gain between the legacy Nemris and this version
function packages_file_write {
 echo -ne "[ INFO ] Generating refined packages list..."

 if [ -e "$script_location/packages.txt" ]; then
  echo -n "$null" > "$script_location/packages.txt"
 fi

 cat "/data/system/packages.xml" | grep "package name" > "$script_location/packages.txt"

 IFS=$'\n'

 packages="$(cat "$script_location/packages.txt")"
 echo -n "$null" > "$script_location/packages.txt"

 for i in $packages; do
  package_name="${i//*package name=\"/}"
  package_name="${package_name//\"*/}"

  package_path="${i//*codePath=\"/}"
  package_path="${package_path//\"*/}"

  if [ "$(echo -ne "$package_path" | grep "\.apk$")" == "$null" ]; then
   package_path="$package_path/$(ls "$package_path" | grep "\.apk$")"
  fi

  echo "$package_name:$package_path" >> "$script_location/packages.txt"
 done

 unset IFS package package_name package_path

 echo " done."
}

# This function checks if aapt is installed
function aapt_check {
 echo -ne "[ INFO ] Checking for aapt..."

 whence -v aapt &> /dev/null
 is_aapt_missing="$(echo $?)"

 var_to_file "is_aapt_missing" "$is_aapt_missing"

 echo " done."
}

# This function sets the backup location and the app typology to backup to default
function variables_default {
 case $1 in
  0)
   echo -ne "[ INFO ] Setting backup directory and app typology to default..."

   backup_location="/sdcard/NemrisBackup"
   app_typology="User"

   var_to_file "backup_location" "$backup_location"

   echo " done."
   ;;
  1)
   echo -ne "[ INFO ] Setting backup location to default..."

   backup_location="/sdcard/NemrisBackup"

   var_to_file "backup_location" "$backup_location"

   echo " done."
   ;;
  2)
   echo -ne "[ INFO ] Setting app typology to default..."

   app_typology="User"

   echo " done."
   ;;
 esac
}

# This function ensures case insensitivity and saves a headache to the user
function app_typology_sanitize {
 case ${app_typology:0:1} in
  s|S)
   if [ "$system_permutations" == "$null" ]; then
    permutations_already_calculated=0
    system_permutations="$(echo -n {s,S}{y,Y}{s,S}{t,T}{e,E}{m,M})"
   fi

   for i in $system_permutations; do
    if [ "$app_typology" == "$i" ]; then
     app_typology="System"
     break
    fi
   done

   if [ "$permutations_already_calculated" == "0" ]; then
    var_to_file "system_permutations" "$system_permutations"
   fi
   ;;
  u|U)
   if [ "$user_permutations" == "$null" ]; then
    permutations_already_calculated=0
    user_permutations="$(echo -n {u,U}{s,S}{e,E}{r,R})"
   fi

   for i in $user_permutations; do
    if [ "$app_typology" == "$i" ]; then
     app_typology="User"
     break
    fi
   done

   if [ "$permutations_already_calculated" == "0" ]; then
    var_to_file "user_permutations" "$user_permutations"
   fi
   ;;
  d|D)
   if [ "$disabled_permutations" == "$null" ]; then
    permutations_already_calculated=0
    disabled_permutations="$(echo -n {d,D}{i,I}{s,S}{a,A}{b,B}{l,L}{e,E}{d,D})"
   fi

   for i in $disabled_permutations; do
    if [ "$app_typology" == "$i" ]; then
     app_typology="Disabled"
     break
    fi
   done

   if [ "$permutations_already_calculated" == "0" ]; then
    var_to_file "disabled_permutations" "$disabled_permutations"
   fi
   ;;
  a|A)
   if [ "$all_permutations" == "$null" ]; then
    permutations_already_calculated=0
    all_permutations="$(echo -n {a,A}{l,L}{l,L})"
   fi

   for i in $all_permutations; do
    if [ "$app_typology" == "$i" ]; then
     app_typology="All"
     break
    fi
   done

   if [ "$permutations_already_calculated" == "0" ]; then
    var_to_file "all_permutations" "$all_permutations"
   fi
   ;;
  System|User|Disabled|All)
   ;;
  *)
   echo -ne "[ WARN ] \"$app_typology\": invalid value. Setting to default (User)..."

   app_typology="User"

   echo " done."
   ;;
 esac

 case $app_typology in
  System|User|Disabled|All)
   ;;
  *)
   echo -ne "[ WARN ] \"$app_typology\": invalid value. Setting to default (User)..."

   app_typology="User"

   echo " done."
   ;;
 esac
}

# This function checks if the backup directory contains any APK
function backup_location_check {
 if [ -d "$backup_location" ]; then
  if [ "$(ls "$backup_location" | grep "\.apk$")" == "$null" ]; then
   backup_directory_is_empty=1
  else
   backup_directory_is_empty=0
  fi
 else
  echo -ne "[ INFO ] Creating backup directory..."

  mkdir -p "$backup_location"

  echo " done."
 fi

 cd "$backup_location"
}

# This function generates a MD5 checksums dictionary
# This shortens down the operations time in any execution of the script
function md5_dict_generate {
 echo -ne "[ INFO ] Generating MD5 checksums..."

 apk_list="$(printf "%s\n" * | grep "\.apk$")"

 for i in $apk_list; do
  temp=($(md5sum "$i"))
  md5_array="$temp $md5_array"
 done

 echo -n "md5_array=\""$md5_array"\"" > "$script_location/md5_dictionary.txt"

 echo " done."
}

# This function retrieves the list of installed apps
function apps_list_retrieve {
 case $app_typology in
  System)
   echo -ne "[ INFO ] Retrieving system apps list..."

   for i in $(pm list packages -s); do
    pkg="${i//p*:/}"
    pkg="${pkg//./\\.}"
    apps_list="$apps_list $pkg"
   done

   echo " done."
   ;;
  User)
   echo -ne "[ INFO ] Retrieving third-party apps list..."

   for i in $(pm list packages -3); do
    pkg="${i//p*:/}"
    pkg="${pkg//./\\.}"
    apps_list="$apps_list $pkg"
   done

   echo " done."
   ;;
  Disabled)
   echo -ne "[ INFO ] Retrieving disabled apps list..."

   for i in $(pm list packages -d); do
    pkg="${i//p*:/}"
    pkg="${pkg//./\\.}"
    apps_list="$apps_list $pkg"
   done

   echo " done."
   ;;
  All)
   echo -ne "[ INFO ] Retrieving apps list..."

   for i in $(pm list packages); do
    pkg="${i//p*:/}"
    pkg="${pkg//./\\.}"
    apps_list="$apps_list $pkg"
   done

   echo " done."
   ;;
 esac
}

# This function retrieves the APKs paths via their package name (from the dictionary)
# Actually, this is the second part of the magic
function apks_paths_retrieve {
 echo -ne "[ INFO ] Collecting the path of each app's APK..."

 for i in $apps_list; do
  row="$(cat "$script_location/packages.txt" | grep "$i:")"
  paths_list="$paths_list ${row//*:/}"
 done

 echo " done."
}

# This function retrieves the app name
# If an app has no name, it falls back to the package name
function app_name_retrieve {
 app_name="$(echo -ne "$aapt_output" | grep "application-label:\'")"

 if [ "$app_name" != "$null" ]; then
  app_name="${app_name//application-label:\'/}"
  app_name="${app_name%\'*}"
  displayed_name="$app_name"
  app_name="${app_name//\//}"
  app_name="$(printf "%s" $app_name)"
 else
  app_name="$(echo -ne "$aapt_output" | grep "package: name.")"
  app_name="${app_name//package: name=\'/}"
  app_name="${app_name//\'*/}"
  displayed_name="$app_name"
 fi
}

# This function retrieves the app version
# If an app has no version (weird, but that happens) it defaults to "None"
function app_version_retrieve {
 app_version="${aapt_output#*versionName=\'}"
 app_version="${app_version//platformBuildVersion*/}"
 app_version="${app_version%\'*}"
 app_version="$(printf "%s" $app_version)"

 if [ "$app_version" == "$null" ]; then
  app_version="None"
 fi
}

# This function sets the app name to the name of the APK file
# It's used when the app to be backed up is a system app, which may make aapt go crazy
function system_app_name_set {
 app_name="$(basename $1)"
 app_name="${app_name%\.apk}"
 displayed_name="$app_name"
}

# This function checks if the checksum of any app figures in the already backed up apps
# This way, any app is backed up exactly once, and Nemris cannot be fooled by file names
function md5_compare {
 already_backed_up=0
 app_md5=($(md5sum "$1"))

 for c in $md5_array; do
  if [ "$already_backed_up" == "0" ]; then
   if [ "$app_md5" == "$c" ]; then
    already_backed_up=1
   fi
  else
   break
  fi
 done
}

# This function backs up the APK files, and calls the appropriate functions to handle both system and third-party apps
function apk_backup {
 for i in $paths_list; do
  case $i in
   /system/*)
    system_app_name_set $i
    ;;
   /data/app/*|/mnt/asec/*)
    aapt_output="$(aapt d badging "$i")"

    app_name_retrieve
    app_version_retrieve
    ;;
  esac

  if [ "$backup_directory_is_empty" == "0" ]; then
   md5_compare "$i"

   if [ "$already_backed_up" == "0" ]; then
    echo -ne "[ INFO ] Backing up "$displayed_name"..."

    case $i in
     /system/*)
      cp "$i" "$backup_location"/$app_name.apk
      ;;
     /data/app/*|/mnt/asec/*)
      cp "$i" "$backup_location"/$app_name"_"$app_version.apk
      ;;
    esac

    md5_array="$app_md5 $md5_array"

    echo " done."
   else
    echo "[ INFO ] "$displayed_name" has already been backed up."
   fi
  else
   echo -ne "[ INFO ] Backing up "$displayed_name"..."

   case $i in
    /system/*)
     cp "$i" "$backup_location"/$app_name.apk
     ;;
    /data/app/*|/mnt/asec/*)
     cp "$i" "$backup_location"/$app_name"_"$app_version.apk
     ;;
   esac

   echo " done."
  fi
 done

 if [ "$md5_array" != "$null" ]; then
  echo -ne "md5_array=\""$md5_array"\"" > "$script_location/md5_dictionary.txt"
 fi
}

# This function informs about the time that has been required by all of the operations
function goodbye {
 echo "[ INFO ] Operations took "$(((SECONDS/60)/60))" hours, "$(((SECONDS/60)%60))" minutes and "$((SECONDS%60))" seconds."
 echo "[ INFO ] All done!"
}

####################

# This is the core of the tool
echo "**************************"
echo " NEMRIS - App backup tool "
echo "  by Death Mask Salesman  "
echo "**************************"
echo ""

# Logic that handles the optional second argument that may be supplied by an user
# Only the "reset" argument is detected
if [ "$2" == "reset" ]; then
 settings_md5_files_delete
else
 settings_file_check
fi

packages_file_write

if [ "$is_aapt_missing" == "$null" ]; then
 aapt_check
fi

# Logic that aborts the execution if aapt is not present
if [ "$is_aapt_missing" == "1" ]; then
 echo "[ FATAL ] aapt is not installed: aborting."
 exit
fi

# Logic that decides whether variables to check
if [ "$backup_location" == "$null" ]; then
 if [ "$app_typology" == "$null" ]; then
  variables_default 0
 else
  variables_default 1
  app_typology_sanitize
 fi
else
 if [ "$app_typology" == "$null" ]; then
  variables_default 2
  else
   app_typology_sanitize
 fi
fi

backup_location_check

# Logic that checks whether to compute the checksums of the already backed up apps
if [ "$backup_directory_is_empty" == "0" ]; then
 if [ ! -e "$script_location/md5_dictionary.txt" ]; then
  md5_dict_generate
 else
  source "$script_location/md5_dictionary.txt"
 fi
fi

apps_list_retrieve

apks_paths_retrieve

echo ""

apk_backup

echo ""

goodbye

```

---
Tags: backup, apk, shell
---


# Question
Title: How can I record game audio with screen without using microphone?
I found so many apps which can record screen on my android device. Some of them can record audio and video at the same time, but only when I turned on the "Record with microphone" option.

That's not realy good, becouse the game sound can be a little bit noisy that way, so I need to record the game audio without using my microphone for best quality.

I would be grateful if the solution does not require a computer for audio recording.

My device is:
Sony Xperia Z2
Android version 5.1.1
Not rooted and can't root it becouse if I do, I lose my warranty.

# Answer
> 0 votes
Well, I have been using the SCR Pro for game recording without using microphone. Install the app, then you launch the app, there are 3 buttons, tap on the setting icon, scroll down to the Audio tab, tap source, tap System Audio Output (or Internal). And there you go. But I am not sure if that one requires root or not.

---
Tags: video-recording, audio-recording
---


# Question
Title: Moto e - flashed stock firmware but bootloader message says "Software Status: modified"
I have a motoE 2 LTE (XT1514 Surnia) that originally had Android 5.0.2, but it went to motorola for repair and came back with 6.0. Despite the upgrade, the bootloader screen still showed "software status: official".

Then I have unlocked the bootloader, installed TRWP and used it to flash supersu. The log says the process was successful but I checked with the app root checker that it was not.

Then I wanted to go back with the stock ROM. I downloaded the XT1514\_SURNIA\_RETBR\_DS\_6.0\_MPI24.65-39\_cid12\_subsidy-DEFAULT\_CFC.xml ROM from this link I found on xda-developers and flashed it using RSD Lite. The system works but the bootloader screen now says "software status: modified"; before this process I made a backup using TWRP but after restoring the bakcup image the message still didn't change back to "software status: official".

I thought maybe I need to install the original Android (5.02) and then upgrade it to 6.0, so I downloaded the XT1514\_SURNIA\_RETBR\_DS\_5.0.2\_LXI22.50-53.8\_cid12\_subsidy-DEFAULT\_CFC.xml ROM from the same link. The problem is I get a failure message when I try to flash the 5.0.2 image

```
    # mfastboot flash partition gpt.bin
    target max-sparse-size: 256MB
    sending 'partition' (32 KB)...
    OKAY [  0.125s]
    writing 'partition'...
    (bootloader) Preflash validation failed
    FAILED (remote failure)
    finished. total time: 0.570s

```

I did try with RSD Lite too, but I get the same message. I've read somewhere you can't dowgrade stock firmware, is this the problem here ? Is there any workaround ?

My final objective is to have stock firmware with android 6.0 installed and the bootloader message saying it is official. I appreciate any help =)

this is the log of RSD Lite flashing the stock image with android 6.0

```
    28/16 05:39:10  The FlashLog key is turned off.
    09/28/16 05:39:10  Multi upgrade started for 1 phones
    09/28/16 05:39:10  [Device ID: 0] 1/20 getvar max-sparse-size
    09/28/16 05:39:10  [Device ID: 0] 2/20 oem fb_mode_set
    09/28/16 05:39:10  [Device ID: 0] 3/20 flash partition "gpt.bin"
    09/28/16 05:39:11  [Device ID: 0] 4/20 flash bootloader "bootloader.img"
    09/28/16 05:39:12  [Device ID: 0] 5/20 flash logo "logo.bin"
    09/28/16 05:39:12  [Device ID: 0] 6/20 flash boot "boot.img"
    09/28/16 05:39:15  [Device ID: 0] 7/20 flash recovery "recovery.img"
    09/28/16 05:39:18  [Device ID: 0] 8/20 flash system "system.img_sparsechunk.0"
    09/28/16 05:39:42  [Device ID: 0] 9/20 flash system "system.img_sparsechunk.1"
    09/28/16 05:40:03  [Device ID: 0] 10/20 flash system "system.img_sparsechunk.2"
    09/28/16 05:40:22  [Device ID: 0] 11/20 flash system "system.img_sparsechunk.3"
    09/28/16 05:40:42  [Device ID: 0] 12/20 flash system "system.img_sparsechunk.4"
    09/28/16 05:40:49  [Device ID: 0] 13/20 flash modem "NON-HLOS.bin"
    09/28/16 05:40:54  [Device ID: 0] 14/20 erase modemst1
    09/28/16 05:40:54  [Device ID: 0] 15/20 erase modemst2
    09/28/16 05:40:54  [Device ID: 0] 16/20 flash fsg "fsg.mbn"
    09/28/16 05:40:54  [Device ID: 0] 17/20 erase carrier
    09/28/16 05:40:55  [Device ID: 0] 18/20 erase cache
    09/28/16 05:40:55  [Device ID: 0] 19/20 erase userdata
    09/28/16 05:40:57  [Device ID: 0] 20/20 oem fb_mode_clear
    09/28/16 05:40:57  [Device ID: 0] reboot
    09/28/16 05:40:57  CMultiFlashFlex::RebootPhone, waiting for phone to disconnect, status=2, state=0.
    09/28/16 05:40:58  Removal, interface=28(0x0), device id=1636460.
    09/28/16 05:40:58  CMultiFlashFlex::RebootPhone, waiting for phone to connect, status=3, state=4.
    09/28/16 05:48:08  00002de8 Phone.cpp   1571    0   ERROR   Waiting for phone's handle is setted successfully after restart [430000 ms] completion. failed
    09/28/16 05:48:08  CMultiFlashFlex::RebootPhone, unable to wait for phone, status=3, state=4.
    09/28/16 05:48:08  [Device ID: 0] Please manually power up this phone.
    09/28/16 05:55:18  00002de8 Phone.cpp   3974    -1  ERROR   CPhone::WaitForPhone timed out. Iteration-1
    09/28/16 05:55:18  [Device ID: 0] Please manually power up this phone.
    09/28/16 06:02:28  00002de8 Phone.cpp   3974    -1  ERROR   CPhone::WaitForPhone timed out. Iteration-2
    09/28/16 06:02:28  [Device ID: 0] Please manually power up this phone.
    09/28/16 06:08:36  Arrival, interface=36(0x0), device id=1636460.
    09/28/16 06:08:36  [Device ID: 0] Waiting for others to finish current operation.
    09/28/16 06:08:36  Arrival, interface=20(0x0), device id=1636460.
    09/28/16 06:08:36  Arrival, interface=19(0x0), device id=1636460.
    09/28/16 06:08:36  The FlashLog key is turned off.
    09/28/16 06:08:36  FlashLog file is turned off.
    09/28/16 06:08:36  Multi upgrade finished.

```

# Answer
> 0 votes
The bootloader showing the "Modified" status is normal in your situation, since you've unlocked the bootloader and flashed TWRP, then used TWRP to flash a ROM. Motorola won't allow a downgrade like you are doing (at least in my experiences w/ them, so 6.0 to 5.0.2), so your best bet is to try and get the 6.0 factory image for your device, and flash that with RSD Lite, then see what the bootloader says after that.

---
Tags: rom-flashing, stock-android, motorola, motorola-moto-e
---


title: Rooting HTC One M7 Verizon

text:
# Question
Title: Rooting HTC One M7 Verizon
I have an unrooted HTC One M7, from Verizon. I used to be able to root it with KingoRoot, but now that does not work. I have tried many things to do this:

* KingRoot
* KingoRoot
* TowelRoot
* WeakSauce
* The PC Version for KingoRoot
* iRoot (PC and app)
* And several other programs

None of those worked. I am running 5.0.2 I can not unlock my bootloader with HTCDev.com because my phone is branded by Verizon.

Also, Rumrunner does not work. I get either: (F\**k it) or (Such dumb issues you have...). I would also like to know what is causing this.

My end goal is to be root with Cyanogenmod and TWRP Touch.

Thanks in advance

EDIT:

I think it would be good if I provide some more information:

The HTC Sense version is 6.0

The Software number is 6.22.605.6

The HTC SDK API level is 6.55

The PRI Version is 4.79\_002

The PRL version is 15480

The ERI Version is 5

The Kernel version is:

```
3.4.10-gdcab6f5
and@AABM #1
SMP PREEMPT

```

The Baseband Version is 1.13.41.1209

The Build number is 6.22.605.6 CL495599 release-keys

And the Software status is Official

I think some of these aren't relevant, but I just put everything to be sure.

# Answer
> 0 votes
http://theroot.ninja/

Support almost all HTC devices, starting with HTC M7 up to HTC 10 and also Motorola's.

The only chance that you have is the Sunshine root app. But this is a paid method, and there is not free version. It will check if the device is supported and if root is available and then ask you to pay using Paypal (that was the last method when i used it awhile ago).

---
Tags: 5.0-lollipop, rooting, htc-one
---


# Question
Title: How to transfer files I created programmatically back to my PC?
I created JSON files on my Android using something like this: https://stackoverflow.com/a/33572815/1075211

The files are now stored in /data/user/0/com.xxxxx.collector.

But how do I now transfer those files to my PC?

# Answer
> 1 votes
You have saved the file in athe app-private directory. As it name indicates it is private therefore you can't access any files in there unless you have rooted your phone (or use the work-around via `adb backup` and then extract the backup using ABE).

If you want to save a file that will be copied later outside of your phone save it onto the sd-card section `getExternalStorageDirectory()`. Then you can pull it from the device via `adb pull`.

---
Tags: file-system, storage, file-transfer
---


# Question
Title: How to fix "Cant play this video" error in Camera MX Live Shots after upgrade?
I use a Galaxy Note 4. To get 'live shots', a few months ago I downloaded the app Camera MX. I just received an OTA update to Marshmallow, and now every time I try to view live shots created before the update I get the error: "Can't play this video".

So far, I've found that the app stores the video clip that comprises the 'live shot' as a standard .mp4 video clip in a hidden folder '.LiveShot'. I've tried to find some sort of file that maps the .jpg pictures to the corresponding .mp4 in the .LiveShot folder, but I can't seem to find anything. I even used exiftool on the .jpg files to see if it was embedded somehow, but exiftool doesn't see it. Is there some sort of fix out there for this problem?

# Answer
After using exiftool I went one level deeper and just opened one of the .jpg files with a hex editor. Turns out the path to the 'live shot' is indeed embedded in the .jpg file, just not as EXIF data (or at least not standard EXIF data that exiftool can read). I put my SD card into my linux laptop and tried using the following sed command to fix them:

```
sed -i 's/\/storage\/extSdCard\/Android\/media\/com\.magix\.camera_mx\/Camera MX (SD)\/\.LiveShot/\/storage\/3F25-4093\/Android\/media\/com\.magix\.camera_mx\/Camera MX (SD)\/\.LiveShot/g' *.jpg

```

This worked for some of the files, but others (with even older paths such as /storage/emulated/0) simply became corrupt afterward. If anyone knows of a better fix I'd love to hear it.
> 0 votes

---
Tags: ota-update, video
---


# Question
Title: How can i divert calls from my phone to a different phone
I want to know if its possible to divert calls from my current phone to a different phone using different numbers.Anybody got help?

# Answer
> 0 votes
It sounds like you want call forwarding, which allows you to send incoming calls on phone number 1 to phone number 2.

You can set this in the standard Phone application. Phone App -\> Settings -\> Call Settings -\> Call Forwarding

# Answer
> 0 votes
I think i have got the answer to my question;

Setting up Call Forwarding with shortcodes Dial \**21\* followed by the number you wish the calls to forwarded to, followed by # for example \**21\*13106565655# Press 'yes/ok/send' You will either see a message on your screen or receive a text message saying that forwarding has been enabled Restart your phone When you wish to stop forwarding your calls, dial ##21# to disable call forwarding http://www.callforwardinginstructions.com/

---
Tags: calls, mobile-network
---


# Question
Title: Internal storage sd read in laptop: where are the files?
I am trying to read in a laptop my micro sd card (which was used as internal storage), through a SD card adapter. Goal is to access to my pictures.

On the laptop (using Linux), I see some folders, but none of them contains the pictures. Why am I not able ot access the files themselves? Is there some encryption going on?

The micro sd structure looks like this on Ubuntu:

```
 ── Android
│   ├── data
│   │   ├── com.android.vending
│   │   │   └── files
│   │   ├── com.google.android.apps.docs
│   │   │   └── cache
│   │   ├── com.google.android.music
│   │   │   └── files
│   │   ├── com.motorola.MotGallery2
│   │   │   └── cache
│   │   └── com.skype.raider
│   │       └── cache
│   └── media
│       └── com.motorola.MotGallery2
└── LOST.DIR

```

Thanks!!

# Answer
SD cards used as internal storage on Marshmallow devices are encrypted, you cannot read them in a computer, or any other device under normal conditions.

There are articles about how to extract the encryption key from the phone and use it to mount the encrypted file system in Linux, but it is still not perfect. https://nelenkov.blogspot.com/2015/06/decrypting-android-m-adopted-storage.html
> 2 votes

---
Tags: sd-card, internal-sd
---


# Question
Title: When I receive a reply to an exchange email, the gmail notifications show my original message, not the reply
I'm having a really odd problem with my Nexus 5X. I had the problem when I got it (marshmellow) and it still persists when upgraded to nougat.

When I send out an email on my desktop computer, and someone replies to it, i'll see the notification pop up on my phone. However, the notification shows the text of my original email, not the text of the reply. I have to tap the notification to open the gmail app and see the actual reply. This is very frustrating because i cannot "at a glance" see what the email is, and instead have to open it, marking it read, which will mess with my flow on the desktop client.

Has anyone else run into this problem? Anybody have a solution?

# Answer
You can't do nothing... The problem is in Gmail's app. You must wait for future upgrades/updates or you can send an email to Gmail's developer.
> 0 votes

# Answer
A work around is to deactivate "conversation view" in the Gmail general preferences. It solves it but you loose the conversation grouping of emails
> 0 votes

---
Tags: gmail
---


title: How to ignore a call?

text:
# Question
Title: How to ignore a call?
When someone calls me and I don't want to pick up nor reject (sending to voicemail), I silence the ringing and have to wait until the ringing is over before I can use my phone again (the screen is stuck on showing me that I'm getting a phone call).

I want to be able to both silence the call and get back to what I was doing immediately, even if the other side is still ringing. Is this possible?

I'm on a Samsung S7 Edge with Android 6.0.1.

# Answer
Macrodroid , easy to learn automation app can help you

You can create a *macro* as below to

* Reject calls
* Create customisable SMS to let the callers know reason for rejection

To activate the macro you have two choices :

* In *Constraints* add the condition you want the macro to run, like day of the week or time of day
* From the app *widget* . Select the widget, drop it on to your home screen and assign this macro to the widget. You would then be able to manually enable / disable the macro if the earlier option is not suitable

To understand how MacroDroid works and required **settings**, my answer here
> 0 votes

---
Tags: 6.0-marshmallow, calls
---


title: Question about the goolge play balance

text:
# Question
Title: Question about the goolge play balance
I am playing clash of clans and I am trying buy premium item which is gem.

I am considering buying $30 google play store gift card.

And I am wondering if I can use google play balances to buy additional things in apps that are connected to google play.

If so, please tell me how to pay with them.

# Answer
> 2 votes
Yes you can

> Redeemed gifts and some promo codes appear as part of your Google Play balance. This can be used for many purchases on Google Play

> You usually can't combine your Google Play balance with other forms of payment to make a purchase. You can only combine it when the remaining Play Balance is less than the total order amount of your purchase. Then you can use the rest of your Play Balance and combine it with another form of payment (for example, credit/debit card, Wallet Balance, DCB, PayPal) to complete your purchase.

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


# Question
Title: Is there a way to exclude an app from Doze?
Doze has been bringing great benefit for my aging Nexus 5. But sadly, its presence also marks an end for my WhatsApp Web experience; since their "web" app is actually just a mere "interface" and still requires the phone to be actively connected to the Internet.

As we all know, Doze puts one's phone into a stand-by state where every unnecessary connection is halted. This means it will also halt the WhatsApp app in my phone (and thus in my computer's browser).

Now, is there a way to exclude WhatsApp from Doze? I mean, is something like that possible?

***p.s.****, I prefer a non-rooted approach to this problem, but should rooting be my only option, so be it.*

# Answer
This answer is based off my Nexus 9 on MRA58K. It should be similar for any app.

Follow the steps as given below:

1. Go to Settings → Battery
2. Tap on the top right 3-dot menu, and choose Battery Optimisation.
3. There should be a dropdown below the actionbar on the top left, choose All Apps from the list.
4. Find your app in the list (in this case, Whatsapp)
5. Tap on it. You will get a popup with 2 options, Optimise and Don't Optimise
6. Optimise should be selected by default.
7. Select "Don't Optimise", and press "Done" below.
8. That's it. I hope it works for you.
> 18 votes

# Answer
The instructions provided by Tamoghna are the easiest ones to follow when it comes to doing something from GUI. However, there exists other ways to achieve the goal.

You can use the system service named *deviceidle* to manipulate the battery optimization for an app. You would need setup in PC. Once you have the latter, execute:

```
adb shell dumpsys deviceidle whitelist +PACKAGE

```

Replace `PACKAGE` with package name of the app which you intend to exclude from Doze mode. Follow View app's full package name? if you do not know the package name of your app.

To revert changes, replace `+` with `-` in the said command and execute it.

An example, performed for Kde Connect app:

**Note** that both the GUI and command-line method make changes in the file `/data/system/deviceidle.xml`. If you're up to the task and have root access, you can edit that file, reboot the device and your app would be found under "Not Optimized" tab of Battery Optimization.

I came to know about that command from this question by user2281606. I was also reading Optimizing for Doze and App Standby - Testing your app with Doze.
> 5 votes

# Answer
If you want your app permanently removed from optimization and if you have root access, you can just add a simple xml-file to your system partition:

Create a \*.xml file with any name and add following content:

```
<?xml version="1.0" encoding="UTF-8"?>
<config>
    <allow-in-power-save package="com.your.package.name" />
    <allow-in-power-save-except-idle package="com.your.package.name" />
</config>

```

Remount your system partition `mount -o remount,rw /system` and copy the file to your `/system/etc/sysconfig/` folder. You may also remove the preinstalled \*.xml files to disable the forced system services.
> 4 votes

---
Tags: 6.0-marshmallow
---


# Question
Title: How to root cyanogen OS? (On Wileyfox swift)
I would like to know how to root Cyanogen OS on WileyFox Swift

# Answer
Simply by flashing SuperSU.**1** There's a thread at XDA explaining the steps:

1. download SuperSu
2. save it to your external sdcard
3. enable developer options (settings - about - click mutliple times on the build number)
4. enable OEM unlock in the developer options settings on the device
5. reboot Wileyfox Swift into fastboot mode: with the device powered down, hold the `Volume Up` and connect USB
6. to unlock the boot loader **(WARNING!!! This wipes your user data!!!),** type from your computer:

```
fastboot oem unlock
fastboot -i 0x2970 oem unlock-go
fastboot oem unlock-go

```
7. download latest recovery image from Cyanogen
8. to boot the custom recovery, on your computer type

```
fastboot boot <name_of_recovery>.img

```
9. install supersu update zip from recovery menu (choose zip from extenal SD)
10. reboot and enjoy root access

Note that steps 6 and 8 require the matching drivers being installed on your computer if you run Windows.

### Updating a rooted Swift

Also note that "incremental updates" are no longer working with the device rooted. Please see how to update rooted fox at XDA for alternatives. Each of those updates will probably break root, so you'll have to repeat the above procedure after each update to regain root access.

Alternatively, you can also switch from *CyanogenOS* to CyanogenMod, which includes root access.

---

**1:** Note that's not the latest version – but the one reported working at the time of that post. The always latest version is available here.
> 5 votes

# Answer
Izzy's answer is great. A couple of additions - I hit an issue where my device would not Boot past the TWRP Recovery tool. If you hit the same roadblocks make sure:

* **Use TWRP version 3.2.0.4 or newer**. The previous version I used did not work. You can choose your Custom Recovery tool. I used TWRP instead of CWM.
* I followed these instructions: https://www.youtube.com/watch?v=NaK5OxUeDKM. Key points: Wipe data first, via TWRP. Use **Advanced Wipe** and select **Cache, Dalvik/Art Cache, System** and **Data**
* You can use adb sideload from TWRP (select the Advanced button). Make sure you **install the rooted ROM and the gapps zip files** before you reboot.

If it helps, I was running the non-rooted Cyanogen O/S. You download the rooted version from: `https://download.cyanogenmod.org/?device=crackling`. I found the newest version of TWRP on xda-forums. Then I used adb sideload to get the new version of TWRP onto my device.
> 1 votes

---
Tags: rooting
---


# Question
Title: How do I connect to PPPoE-based broadband on Android-x86 using ethernet?
I have installed Phoenix OS on my laptop. I don't connect to the internet with a WiFi router, but with a direct Ethernet port.

I found How to connect Android phone to a Wifi network using PPPoE? but it did not work out for me as mine is not a WiFi PPPoE issue.

How do I connect my Android installation to this PPPoE broadband?

# Answer
> 0 votes
You need to know username and password to connect to the Internet using Ethernet port if you are using an Ethernet modem which is not configured. Ask your ISP for the username and password.

---
Tags: internet, android-x86, ethernet, pppoe
---


# Question
Title: Authentication Problem: Even after typing the correct passoword
I have Digisol router in my home. My phone was connected to it for a time, but then suddenly it started showing **no internet**. So I tried to reconnect by **Forgot** password. But since then I am facing the \*Authentication Problem\** every time I tried to connect. Some points:

* It is connected to a PC by LAN and two phones by WiFi. It is working fine in all of them.
* I have tried to *clear Google Services Framework* cache and restart. Still nothing happened.
* Also I tried to turn Airplane mode on and off.

Please help...

# Answer
That's a common problem that occurs with may users. well the solution is pretty simple Go to settings \> wifi \> select the wifi you want to connet Now when it ask for password. Fill the password. down below there will be advance settings open that. Locate Ip settings and change it from DHCP to Static there just change de ip to 192.168.1.X \[X\] be any number like 32,24,64

just do that and click connect. it will connect.
> 0 votes

---
Tags: wi-fi
---


# Question
Title: Cannot find where Google Play Music stores downloaded files (different from similar posts)
About a year or two ago, I decided to use Google Play Music as my "cloud host", so I took all of my old music that I'd had sitting on my computer, and uploaded it to Google Play Music. This is all my own purchased music, mostly originally from CDs (I'm older).

I now want to download some songs onto my Android device not simply so that I can listen to them, but so that I can have the `.mp3` files. (E.g., to edit one down so it can be my wake up alarm, that sort of stuff.)

I cannot seem to find where Google Play Music put any of these. I have not rooted my device, and while I could go there, I'd rather avoid it, if possible. I saw other posts mentioning:

* `/<external card>/Android/data/com.google.android.music/cache` or
* `/<external card>/Android/data/com.google.android.music/files` or
* `/data/data/...`

There is nothing in the first 2 directories, and it seems I need root access to get at the last directory. I read some similar posts that pointed to these directories, but some others that said this was for older versions. My version is `6.0.1984S.2219729`. And, if it matters, I have a Samsung Galaxy S4 and Android version `5.0.1`

It's really obnoxious that these apps refuse to play with each other nicely. Google and Samsung just have to kiss and make up, because it's ridiculous that Google apps can only talk to Google, and Samsung can only talk to Samsung. I shouldn't have to scurry around looking for all this. Desktop / Laptop OS's don't have this problem. It's an invented problem to help ensure monopoly ecosystems and frustrated customers. :-(

# Answer
In the settings of Google Play Music, if you have it set to cache on the external SD card, your cache location will be `/external_sd/Android/data/com.google.android.music/files/music/`.

If you have it use the internal storage, the path will be `/sdcard/Android/data/com.google.android.music/files/music`.

Note that these files are named `[some-id].mp3`, like 124.mp3. So just copying them from this location will be difficult to determine what song they are. Not only that, as GiantTree mentions, the files are encrypted, so even if you copy them off, you cannot play them. It requires Google Play Music to play them.

Here is a screenshot of my files on the external sdcard that I navigated to within .

And Here is using Windows MTP to browse the files.
> 8 votes

# Answer
if it's downloaded on internal, it's locked in com.music but you'll just see Music.id file and you cannot access that database without password. And its not encrypted if it's being downloaded to sd card just move from its Cache location and your good to go. Use star tag editor to add album art and tags . And songs purchased from Google aren't even .aac or .m4a just normal mp3 320Kbps 44khz .
> 3 votes

# Answer
This is from Windows 10 After reading all the posts and digging through my S7 to find my music files I downloaded from Google play, I found the location where they are stored. Simply plug in your phone and change the setting (on the phone) to "File Transfer" (without the quotes). This will allow you to access both your files on the phone storage as well as the SD card storage. Open "This PC", choose "Card" then go to the following (for Windows 10): This PC\PhoneName\Card\Android\data\com.google.android.music\files\music.

The files are named or referred to as "MP3 Format Sound" and are numbered rather than the actual name of the song, i.e. "191". That's it! Don't forget to change the setting on your Google Play to save the files onto your SD card. The default is internal storage. Good luck!
> 1 votes

---
Tags: file-system, google-play-music, files, media-files
---


# Question
Title: How to choose a firmware before downgrading Andriod version?
I have a Note4 which was shipped from the UAE (but I don't live in UAE). The current version of the device is 6.0.1 and I want to downgrade it to 4.4.4 (the stock version). I am having some trouble selecting the right firmware and was hoping if someone could help.

I came across this: http://www.sammobile.com/firmwares/database/SM-N910C/XSG/ but I don't know which version to choose. My phone's baseband version (N910CXXU1DPC1) is not listed here.

Can I choose any 4.4.4 version and hope it will work on my phone ?

# Answer
According to this site, this is for Region XEO, which would be Poland, located here. You can't just choose any version and have it work, and Samsung is known to not allow you going backwards in firmware versions due to a lock in the bootloader preventing this. You may be able to go back to 5.1.1, but most likely not 2 Android versions backwards, and even going back to 5.1.1 may not be possible.
> 1 votes

# Answer
As long as downgrading itself is possible and the firmware is of the right model, firmware from any region will work, you just get a different set of preinstalled stuff and slightly tweaked modem for the corresponding region. This is why I always go for European (XX) firmwares - they're simply cleaner and still work.
> 1 votes

---
Tags: downgrade
---


# Question
Title: Phone to computer without computer install
I want to display my phone screen on my computer so that it can be projected on a screen.

I am not allowed to install any software on the computer or alter any setting of the browser. I have tried various tools such as Airdroid, but they require software installation or Chrome additions (again, something which I can't use).

I don't really want to go down the road of dedicated cables for a particular phone because I will have to change my phone at some time.

I just thought: although I can't install any software, self-executing .jar files do seem to work on our current network.

Edit: I don't want to ROOT my phone if possible: it is too expensive to take the risk.

# Answer
> 0 votes
I have found an answer that works: Screen Mirror. When you run the app it generates a URL. You type that address (a little fiddly because it is all numbers) into a web browser and the page appears. You can alter the resolution and run it full screen in landscape mode to fill your computer screen. I didn't notice any lag (looking from the phone to the screen) and so any gap is too small to be any worry.

I was running the phone wirelessly and the computer through a wired network -- they are the same network, but both aren't wireless, something required by many products.

# Answer
> 1 votes
I'm not sure if how this works but have you tried this? http://www.guidingtech.com/36734/mirror-android-display-pc-tv/

# Answer
> 1 votes
Have you tried something like VNC for Android? I have had great luck using VNC over the years. One example of a server app is https://play.google.com/store/apps/details?id=org.onaips.vnc. You can view, and indeed completely control, the computer running the VNC server by running the VNC viewer on your computer. This can either be an installed viewer (not possible in your case), as an uninstalled program like TightVNC or by running the Java applet that the server will serve up to your browser, if you have Java installed ov the viewing computer.

# Answer
> 0 votes
How about streaming your phone screen to YouTube (with something like Gusher), then watch it on your PC?

---
Tags: hardware
---


# Question
Title: Misc. file identifications and importance
I see things like roidapp, .chartboost, .mobvista, .ravesocial, etc. No idea what they are but eating up storage. How do I identify them as necessary?

# Answer
These are folders apps use to store some or (less likely) all of their data. If you delete that folder, some app data associated with the folder will be gone.

In most cases you can safely delete that folder **given that you uninstalled the app prior to deleting it**.

The folders usually have the same name as the app they represent. The reason they have a dot at the beginning is so Android detects them as hidden and doesn't show them unless you tell it to do so.

You can just Google the folder names (without the dot) to find what app made them, what does it do and wether you want to keep it or not.
> 1 votes

---
Tags: storage
---


# Question
Title: No way to access to internet conecting PC to hotspot wifi Android device
My phone connects to internet properly. When activating Hotspot wifi, PC detects and reveices an optimal signal but there is no connection to internet at all. With other wifi signals it is properly working. Using USB the same happens. It seems that Bluetooth connection is allowing access to internet but it is too slow. Any idea about how to make it work? Thank you.

# Answer
> 0 votes
Your phone only has one (1) WiFi chip.
This means it can only connect to one WiFi AP **or** act as a hotspot,
not both at once.

When you activate the WiFi hotspot, you get a warning, telling you that this will disconnect you from your current AP and use mobile data.

---
Tags: connection-issues, wifi-hotspot
---


# Question
Title: Plugging in wired headset opens Google App and changes volume, nonstop
I recently got a ZTE Maven (running Android 5.1). I plugged a headset into the headset jack, and the phone does detect the headset's presence, but after 30 seconds or so it starts to sporadically and repeatedly open the Google App and reduce the phone's volume. It doesn't just do this once, in a way that could be resolved by closing the app and readjusting the volume - it does this continuously, basically locking out the phone and making interaction impossible.

I plugged the same headset into a family member's Galaxy S5 and it works perfectly. A test call revealed no problems.

The headset is a basic PC headset terminating in a TRRS plug. There's no `Volume` control or "answer/hang up" button or anything; just an earpiece and a mic.

I have tried removing the Google App widget from the home screen as well as disabling voice control within the Google App, to no avail.

What's causing this, and how do I resolve it so that I can use a wired headset with my phone?

# Answer
> 2 votes
I procured a second wired headset, and it works with the Maven. However, it does not work with the Galaxy S5.

I got out my multimeter and tested each connection on each headset, and found that they are wired differently. The ZTE Maven and my new headset use the CTIA/AHJ standard, and the Galaxy S5 and my old headset use the OMTP standard. The difference between these two standards is that the ground and microphone connections are swapped.

From Wikipedia (formatting added):

> **OMTP**:
>
> * Tip: Left audio
> * Ring: Right audio
> * Ring: Microphone
> * Sleeve: Ground
>
> *old Nokia (and also Lumia starting from the 2nd gen), old Samsung (2012 Chromebooks), old Sony Ericsson (2010 and 2011 Xperias), Sony (PlayStation Vita), OnePlus One, X Box One controller with head phone jack, iPhone sold in China*
>
> **CTIA / AHJ**:
>
> * Tip: Left audio
> * Ring: Right audio
> * Ring: Ground
> * Sleeve: Microphone
>
> *Apple, HTC, LG, Blackberry, latest Nokia (including 1st gen Lumia as well as later models), latest Samsung, Jolla, Sony (Dualshock 4), Microsoft (including Surface and Xbox One controller with chat adapter), most Android phones*

My guess is that, when an incorrect headset is used, random noise in the ground connection is sent to the microphone input, which the Galaxy S5 handles gracefully (detects the headset but doesn't receive or transmit any audio) while the Maven does not. This is solved by using a headset of a suitable standard for the given device.

---
Tags: google, headphones, headset
---


# Question
Title: SM N900A rooted Google Play Store Immediate Shutdown Hosts File Deleted
Recently i rooted my phone. Note 3 att. using kingo root.it worked fine google play was fine but after some days some shitty thing started to happen and my facebook, gapps were all shut.no updating. when i opened my google play it simply shut down almost instantaneously."Google play has stopped working" was all i got and sometimes not even that. i deleted google play from system downloaded new one also deleted play services and downloaded latest ones.it didnt work "connection failed retry" and "unreliable network" problems. finally i did some research and found this "root browser" and deleted hosts file from system/etc, rebooted and bam google play worked i started getting updates notifications and i thought it went fine but after i opened google play for about 10 seconds after accepting the google terms of use it crashed and every then and now it keeps crashing immediately as i open them. i dont have google play sign in problems or syncing problems like before all things fine just the play store crashes freaking spontaneously. IDK if its the host files ive deleted or play store being faulty. I am SERIOUSLY PISSED non stop 2 days of googling(never googled so long in my entire life) and im tired of this. ANYONE HAS ANY IDEA how am i gonna fix this. and please spare me the cache, data wipe and factory reset and rebooting bullshit. ANY HELP IS TOTALLY APPRECIATED. HELLLP PLEASE.

# Answer
Actually all i needed to do was get link2sd ,shift playstore and google play services from system into the sd and reboot and again put it back to the system and voila! It worked like a charm.Guess the gapps need to be jolted into the system so as not to have a connection timed out error.HOPE THIS HELPS!!
> 0 votes

---
Tags: google-play-store, hosts
---


# Question
Title: Is it possible to adblock while on mobile data?
I can use AdBlock Plus to block ads on wifi. Is there a way to do it while on mobile data? I'd like to use it in Chrome, if possible.

# Answer
> 0 votes
It used to work on older android versions. I'm not sure about newer android versions..

Basically it involves changing the active mobile network APN to add proxy and port that is suggested by AdBlock Plus.

**Proxy:** `localhost` or `127.0.0.1`
**Port:** `2020` or what AdBlock notifies in status bar.

Save the APN and run AdBlock Plus to see the changes. And if AdBlock Plus isn't running after changing APN, you may not be able to browse through mobile data, complaining about proxy server. Revert APN changes to revert.

If you try the above method, please post the results. And make sure the adblock plus active filter subscription has the ability to block what you need to.

# Answer
> 0 votes
I am using Chrome on lollipop and downloaded ab+, it suggested easy list filter so I didn't add more. Created an alternate mobile nw on phone since t-mobile blocked editing the main entry. I added localhost and proxy 2020, switched to the new entry, and social media bar was gone on pages even without a reboot. If your provider doesn't whine about root that would be easier (my carrier whines about everything but that's another discussion). Too early to tell if any downside but for now i can finally read text on a page

---
Tags: browser, mobile-data, mobile-network, adblock-plus
---


# Question
Title: I got "Your device is corrupt. It can't be trusted and may not work properly" on a brand new Nexus 5X. What should I do?
Through Project Fi of Google, I ordered and got a brand new Nexus 5X with Android 6.0 on it. The first time it powered up, it said

```
Your device is corrupt. It can't be trusted and may not work properly.

```

Although I can still use the phone, every time I restart or turn on the phone, the above message will show for a few seconds.

What can be done?

# Answer
> 2 votes
Unlocked bootloader = yellow triangle warning; modified system/kernel = red triangle warning.

As long as the device functions fine you shouldn't worry much; however if restoring is what you need, then flash a factory image then relock bootloader. Do turn on "OEM unlocking" in Developer options after that, so that you have a chance to recover in case anything happens.

---
Tags: 6.0-marshmallow, nexus-5
---


# Question
Title: WhatsApp MessageService is always killed shortly after exiting the app
A couple of days ago I noticed that I no longer receive WhatsApp messages until I manually start the app, which is when the pending messages get delivered all at once.

I started my investigation by monitoring the `com.whatsapp.messaging.MessageService` in the Application Manager.

Here's what it looks like at first, after I exit WhatsApp:

And here's what it looks like a few minutes later:

It looks like the `MessageService` either quit, or it was terminated. To verify this, I checked with adb. I can see the service at first:

```
$ adb shell dumpsys activity services | grep wh
  * ServiceRecord{43deec28 u0 com.whatsapp/.messaging.MessageService}
    intent={act=com.whatsapp.messaging.MessageService.START cmp=com.whatsapp/.messaging.MessageService}
    packageName=com.whatsapp
    processName=com.whatsapp
    baseDir=/data/app/com.whatsapp-1.apk
    dataDir=/data/data/com.whatsapp
    app=ProcessRecord{42d19f90 10037:com.whatsapp/u0a10187}

```

But then this service disappears, even though the main process is still running:

```
$ adb shell ps | grep wh
u0_a187   10037 215   988084 78996 ffffffff 00000000 S com.whatsapp

```

The service does not get terminated at the same time. I have seen it killed as early as 6 minutes after exiting WhatsApp, and as late at 11 minutes. But in the vast majority of cases, it is terminated some time on the 8th minute.

I have carefully examined the `logcat` during the moment of service termination with the following logcat query, which I believe silences only the stuff I don't care about:

```
adb logcat -v time LightSensor:s LightsService:s  SensorService:s SensorManager:s STATUSBAR-BatteryController:s BatteryService:s HeadsetStateMachine:s android.widget.GridLayout:s MP-Decision:s SignalStrength:s McClient:s McDaemon:s QcrilMsgTunnelSocket:s | grep -v ss_tz_mobicore | grep -v ss_daemon

```

I was not able to see anything in the logs that would hint at what happened to the service. Did it quit? Did something kill it? How can I find out?

I thought that maybe the service was terminated b/c the OS was low on RAM, but this does not appear to be so. Here's the RAM at the moment of termination:

```
$ adb shell free -m
             total         used         free       shared      buffers
Mem:          1821         1587          234            0           75
-/+ buffers:               1511          310
Swap:          399          134          265

```

While working on this issue, I have used Titanium Backup to freeze all apps that might interfere with normal operation of WhatsApp, so these are the apps I froze:

* Greenify
* Amplify
* XPrivacy

I also turned off "Per App Hacking", which is an Xposed Module.

Any ideas on how I can learn more about why MessageService is being terminated?

**EDIT 1**: Is it possible that MessageService is supposed to get terminated, and that WhatsApp relies on GCM to be notified when there are new messages?

# Answer
I've been having exactly the same issue as yours. I can also see that the MessageService service is being killed after around 10 minutes. After the service is killed, messages are only received when opening the app. While googling today for this problem, coincidentally found this thread which you had posted just 3 hours ago.

I'm using a new phone on which I installed Cyanogenmod 13. I've already tried to change several settings related to battery usage, memory optimization etc., but to no avail.

I've started using this phone 2 days ago and the whatsapp issue has been happening since then. Tomorrow I'll try to uninstall and reinstall whatsapp from the Play Store, since this one was restored from a Titanium Backup backup. I saw in a forum someone who resolved a similar issue by doing that... he also had restored from a TiBu backup and was having such problem.

By the way, your theory about GCM seems to point to the right direction - in my wife's phone the MessageService service is also killed after around 10 minutes, however, she doesn't have any delays in receiving whatsapp messages - so maybe it indeed relies on GCM for that.

Let me know if you make any progress on the investigation or come to a solution. Let me also know if I can help you with anything else.
> 0 votes

---
Tags: whatsapp-messenger, task-management, services
---


# Question
Title: How to automate command line when specific application is launched?
So basically I want to run a few line of code each time a specific application is launched and closed.

Is there application which could do that ? (Busybox ?)

I actually have to print it my self in a terminal emulator and it's a bit harsh :/

# Answer
Using Terminal Emulator and Macrodroid, an automation app

Create a macro in which the *Trigger* is launch application of your choice and action is *Launch Shortcut* where you choose *Term Shortcut* and key in the commands in the *arguments* . See Firelord's answer here for additional details Home screen icon for terminal program?
> 1 votes

---
Tags: terminal
---


title: Limit YouTube to Wi-Fi only

text:
# Question
Title: Limit YouTube to Wi-Fi only
My daughter loves to share videos on YouTube with her friends. As a result she's blown through her monthly 2GB data allotment on multiple occasions.

While I've educated her on the difference between 3G and Wi-Fi, and she's a smart kid, it would simply be easier if I could limit her YouTube app to only allow streaming while on Wi-Fi.

I looked in the app settings but unless it's in some weird location there is no such setting. How can I prevent YouTube streaming to be only allowed on Wi-Fi?

(If it matters: Droid Incredible 2, Gingerbread)

# Answer
> 9 votes
Don't know of any YouTube option for that end, but if you are open to use an app to limit other apps, you can give a go to Onavo Count | Monitor Data that has an option to limit the app to Wi-Fi only:

> Save money on your mobile bill - avoid costly overage fees! Onavo Count puts you in control of your 3G data plan. Easy setup, three brand new widgets, tailored alerts and automatic blocking tools will keep you safe from bloated data bills.

**Update September 2016**:
It looks like Onavo Count is no longer compatible with some modern Android devices including devices like Nexus 6P. Onavo has a new "Protect Free VPN+Data Manager", which still has the above functionality in addition to some cool VPN features.

# Answer
> 3 votes
avast! Mobile Security has, in addition to multiple layers of protection, a firewall module that allows individual control of each application with toggling of Wi-Fi/data/roaming access.

Onavo also works great as mentioned but doesn't have the other features that Avast has.

# Answer
> -1 votes
No Root Firewall can restrict cellular access on per app basis

https://play.google.com/store/apps/details?id=app.greyshirts.firewall

---
Tags: wi-fi, youtube, data-monitoring
---


title: Replacing pre-installed Settings app

text:
# Question
Title: Replacing pre-installed Settings app
I own Intex Aqua Life III with Android Lollipop. The pre-installed Settings app behaves like malware, automatically installing unwanted apps. On uninstalling this pre-installed Settings app, the issue is resolved.

I tried to install the Settings app from my Lava Iris X8, but it did not work.

How can I replace the pre-installed Settings app with another one? What's the procedure?

# Answer
> 1 votes
## Possible Solutions

* **Grab APK from another of the SAME model phone running the EXACT SAME ROM your phone is:**

The only thing you may be able to do is grab a settings.apk from another phone with the exact same ROM.

* **Re-Flash just the System partition:**

Otherwise you will need to re-flash your ROM. ***Don't Panic!!*** If you just format the following via the Recovery menu:

* ART/Dalvick cache
* System
* and Cache

you can retain all your apps and everything else in /data.

***Note:*** You may wish to do a backup of your launcher settings if you use something like Nova or ADW or Apex or Go custom home launchers (stock won't have a layout backup function). ***The only settings you may lose*** are any system settings (***though MOST will be backed up anyways*** for you as most apps in /system use an area of /data to store settings files. Some do not and is why I mention it) that do not save their settings somewhere in /data or /sdcard.

Other than that, this process as such (as long as you do not delete /data) will retain all your apps and their settings (the boot after the flash will take longer than usual as it will need to generate the cache for all the extra apps on the initial boot, but an extra couple min is a small price to pay to not have to re-setup everything IMHO ;-) (and you should get a countdown as it is running through the apps)). ***AND since you will be flashing the exact same ROM*** there is no chance of problems \[**when changing ROMs if they use a different code base you can run in to issues where you are forced to format /Data** as part of install, **BUT NOT THE CASE when flashing the exact same ROM**\].

## Tech Note on How This May Have Happened and Ways to try and defend against this sort of thing (nothing is a guarantee)

***The only way something could mess with anything you have in the /system partition (including the system settings menu) can only be messed with by an app that has root access. So, be careful what apps you are granting SuperUser access to*** (and be VERY VERY VERY careful if you download apks outside the Google Play Store. It may seem like a good idea, but crackers can take ANY apk and add a virus to it and put it on a random site. Then you think you just got the newest angry birds and in fact you did, BUT they added a nasty surprise to it.

**You could also try out a Virus scanner** (ONLY download this via the Google Play Store, and ONLY use reputable big name brands to be safest. If unsure just fire up google and google the name of the anti virus and read up on user reviews and related material to get a feel for if what you are looking at is a good and safe option. Of course, even if you have a virus scanner something may still get by it so still best to keep things like the above paragraph in mind at all times.

---
Tags: settings, installation, system-apps
---


# Question
Title: Is there a folder system viewable by applications
is there a folder system view able by application android, i.e. if i put a music file for example in it, I can see it from the music app??

I have android 5 on a tablet.

# Answer
A music application will look in certain places for MP3 (or other format) music files, and show them in whatever graphical browser the application has built in.

Conversely, a file manager will show you the file and folder structure of your Android system (well, as much as is allowed by root/non-root permissions).
> 0 votes

---
Tags: storage, system
---


# Question
Title: Android X86 6.0 boot stuck on Boot Logo in VMWare
Today I downloaded the ISO file for the latest Android X86 (64-bit)version - the stable build for Android 6.0 AKA Marhmallow - from https://osdn.jp/projects/android-x86/downloads/65890/android-x86\_64-6.0-r1. I have installed this on a virtual machine with **2 processor cores**, **4 GB RAM** and **20 GB Storage** which I think is more than sufficient for this specific OS.

Earlier I was having this problem where the system would boot into `CLI` and not `GUI` hence I googled a bit and followed the instructions from http://techanji.blogspot.in/2013/04/android-wont-boot-into-gui-only-command.html which worked perfectly fine and now I have proper Android boot logo but I kept my system to boot for 15 minutes without any progress which makes me think this has stuck at boot!

**A bit about setup:**

* I did **not** choose GPT for partioning
* I have made one **primary partition** of 20 GB and made it boot partition
* I have formatted my partition with **ext4** file system
* I **installed GRUB** but **not EFI GRUB**

Hopefully, these details are enough and you guys can help me with this.

**PS: For those members who are in a hurry to mark a question as duplicate by just reading the question, I would like to kindly bring it to your notice that I have read and tried ALL the solutions to similar questions and none of them has worked so far, hence posting this question**

# Answer
> 4 votes
At first I had the same issue. But I changed the Display settings and now it works.

* Go to the VM settings's
* Go to Display settings
* Check the Accelerate 3D graphics
* Set the graphics memory to 1GB (if possible)
* Start your VM!

---
Tags: android-x86, vmware
---


# Question
Title: How to root HTC Desire 816 running Android 5.0.2
I have a htc 816 desire running android 5.0.2 and i have tried many a times to root my device but it always fails. I've unlocked the bootloader and tried kingoroot and towelroot all modes i.e., zip, apk, exe.

# Answer
> 1 votes
Since your bootloader is already unlocked, I'm going to skip that process.

This is going to install Cyanogenmod12, which is a rooted version of Android Lollipop (5). Go ahead and download your version of CM. The link is download.cyanogenmod.org/get/jenkins/129826/cm-12-20151011-NIGHTLY-a5.zip

I would post that as a directly clickable link, but I don't have enough rep.

Now move that downloaded file to a place on your phone, and note its location.

You can head over to TWRP and and find your build. If its not there you can go to this link. It is a direct download link. Then (on your phone) go to Settings\>About\>find Build Number or Build Version (or something like that) and tap it repeatedly until you get a toast saying that developer options is on. Go to the developer options and find USB Debugging or ADB Debugging and turn that on. Then plug your phone into your computer. If you don't have ADB installed on your computer, install it:

For linux:

```
apt-get install adb

```

For windows, find a download somewhere on the internet. But stay away from the "15 second adb and fastboot installer", that is a virus.

Once ADB is installed, plug in your phone, wait for the device to show up as a connected devices, and open cmd or terminal and type:`adb devices`. If it shows up, your good, go on. If you get something saying that adb is not a known command, cd to that directory that adb is installed in. Also, make sure you have fastboot.

Now, type in `adb reboot-bootloader`

Once the phone is in the bootloader, type `fastboot flash recovery recoveryImgName.img`. Once that finishes, reboot your phone. Then type `adb reboot-bootloader`. When it boots to the bootloader, find Recovery, and choose it. Use the volume keys to navigate and the power button to choose. Depending on which recovery img you used, find something like 'Install' and navigate to the Cyanogenmod file and install that.

Your phone should be rooted running Android 5!

---
Tags: 5.0-lollipop, rooting
---


# Question
Title: How to decrease touch sensivity (Accidental taps)
When I try to scroll a list of elements, the system interprets it as a "tap" many times (but not always).

It is very annoying. To clarify, for example it happens when I make a search inside an app. I want to view all the results but when I try to move down so I can see the lower items, I accidentally select one of the items of the list and then when I go back to the list, it is again on the begining. When there is a lot of results I waste a lot of time to reach the end.

I'm using ResurrectionRemix (based on CyanogenMod 13) on Oneplus 3. It tried to do a full wipe and install latest version and it continues happening. I looks the same problem occuts on TWRP.

I drop my phone 1-2 month ago and my screen got cracked, but I didnt notice this problem until several days ago. May it be related to this problem?

# Answer
It was a hardware failure. Replacing my screen panel did the trick.
> 0 votes

---
Tags: 6.0-marshmallow, touchscreen, system
---