# Question
Title: Empty texts are being sent periodically to specific contact?
When I check my text messages, I am always a bit confused this week. A specific contact in my phone is being sent blank messages over and over again, and I cannot figure out why. What is even more interesting is that the contact that this is happening to does not receive these messages at all. I switched texting apps from Google Messenger to Hangouts hoping the app was just glitching, but still the blank messages continue to appear. They come in groups, one being sent every 2 hours or so (but not in a predicable manner) in packs of 5 to 8 or 9.

I've narrowed down every cause I can think of. All I am down to is my Pebble Time Steel smartwatch or the Android operating system itself that could be causing this.

Anyone have any suggestions to figuring out why this is happening? I don't believe it's the Pebble or the contact in question would be receiving a lot of blank messages and none of these messages appear to go through.

# Answer
> 1 votes
I figured it out. I also have Avast Anti-theft set up, and for some reason all of the messages I send or receive are being forwarded to this contact via binary which is why the messages are empty and why the contact's iPhone is ignoring them.

In short, a bug with avast is the cause. Going to have to give their support a piece of my mind for driving me crazy for two weeks.

---
Tags: sms
---


# Question
Title: Adding cards to Android Pay on rooted device
As the new Android Pay app is now rolling out, I wanted to go ahead and get it set up on my device. Now, as many are finding out, rooted devices will receive the message "Android Pay cannot be used - Google is unable to verify that your device or software running on it is Android compatible".

Now, one fix that I have found is to temporarily disable Root in SuperSU where the message "Superuser is disabled and hidden" appears. After doing this, adding cards is supposed to give no errors.

Unfortunately, I can still not seem to add any cards. Is there any other way I can get google to recognize my device?

> Sony Xperia Z3 (D6616)
>
> Build #: 23.1.C.0.385
>
> SuperSU Version 2.49

# Answer
If you're using SuperSU, this *may* work: Disable it from the options menu

If this doesn't work, the other option is to fully uninstall SuperSU (or whatever you used to root your phone), add credit cards, and then boot into recovery again to reinstall SuperSU. You must do this every time you want to add any credit cards.
> 1 votes

---
Tags: root-access, google-pay
---


# Question
Title: ASUS fonepad 7 (K00Z) is giving an Upgrade. But is the new firmware safe to install?
I would like to know how safe is this upgrade? 'Cause I've heard many people ended up bricking their tablet after upgrading the firmware (like the gentlemen in this forum). So, I would like to know is the upgrade safe?

Also, what am I going to gain with this upgrade? What enhanced features does Kitkat has that Jellybean doesn't?

# Answer
> 0 votes
I contacted ASUS support and they replied that the upgrade is optional. I did it anyway but didn't find any noticeable performance improvements/changes.

---
Tags: 5.0-lollipop, asus-padfone-t00c
---


# Question
Title: Is there a way to turn off app updates when global and app-specific autoupdate setting is already set to Never/Off?
On Monday, January 18th, 2016, on a never-network-locked-or-branded Nexus 5, I've noticed that the Google Chrome app was suddenly updated, together with the user-installed "My Cricket" and one other app (possibly Visual Voicemail?), after doing an intended manual update of some unrelated app. In all, 4 apps were updated, when only one was intended to be.

I've uninstalled the Google Chrome updates (which also resulted in the data-loss of the browser history and the open windows), but wasn't able to restore My Cricket to any prior version, since, being user-installed from the Play Store, there's no option to go back.

Today, Wednesday, 20th, the Google Chrome app was force updated again. I've confirmed that its individual settings are not set to autoupdating, nor are the global settings set to apply the updates. Moreover, one of the top reviews for Google Chrome was a 2-star one, dated 19.01.2016, also alleging a forced autoupdate!

* How do I *really* disable the updates? Like, for real, no exceptions?
* Is there a way to see for sure which exact apps were updated? E.g., what was that forth app that I allege must be the "Visual Voicemail" one? (Only the first three apps were visible in the status in the notification bar, but it was mentioned that 4 updates were performed.)
* Is there a way to backup my browser history and the open-windows, to prevent losing it all when uninstalling the unsanctioned update?
* Is there a way to backup all my apps?

Please kindly note that a user-mistake is highly unlikely -- it happened twice, and was also reported by a highly-voted review in the Play Store. Also note that the phone has been disconnected from Cricket many months ago; it's only used through WiFi; so, any sort of network interference is likewise a quite remote possibility (it still has the SIM, though, but it hasn't registered to any network in a very long time now, always showing no reception in the top status bar).

# Answer
That Google Chrome update is horrendous! It's being forced outside of Play Store, but there is a way to disable it.

It's pretty ugly, but here's how I stopped it, while keeping Play Services (Gmail, Maps, etc): Go into Application Manager, scroll over to the "All" tab, and find "Download manager". Once you disable that, there will be NO updates from anywhere.

Now, Play Store won't open all the way, asking you to turn Download manager back on. So when you need to use Play Store, go back into settings, find Chrome, disable it, then clear data on Download manager and also on Play Store. Then, you can update other apps without updating Chrome.

You also will need to use Firefox or Opera to download PDFs and other files online.

Hope this helps,
> 2 votes

# Answer
This is not a complete answer but answers some of the points:

* > How do I really disable the updates? Like, for real, no exceptions?

You can use my answer or Craig's answer for that. No exceptions, but **requires root access**. The solution is to detach Google Chrome from Play Store's device specific database stored in the device itself. It is always temporary but works.
* > Is there a way to see for sure which exact apps were updated?

Play Store shows a notification for each app that has been updated. If it doesn't then record the details of broadcasted intent: `android.intent.action.PACKAGE_REPLACED`. Use my answer here to get details from that intent. Use File write task to log the app or package name that has been updated with corresponding date and time, into a file using Task → File → Write File action.

You can check the contents of the file at your convenience.
* > Is there a way to backup my browser history and the open-windows, to prevent losing it all when uninstalling the unsanctioned update?

Absolutely yes, but **not without root access**. The reason is simple. Chrome doesn't participate in backup and restore infrastructure of device. This simply means adb can't backup the app's data and so as other user apps.

The solution requires root access. You can use or My Backup Pro for ease of use to backup Chrome's data or simply force stop Chrome, copy the data directory of Chrome i.e. `/data/data/com.android.chrome` to a safe location. You can alternatively archive the directory before storing it, but why add complications? Restoration is as simple as backup.
* > Is there a way to backup all my apps?

Sure. We've a canonical post here. **Note that** not every app can be backed up as noted in last point, so having root access is the only way to backup virtually everything, regardless whether the app permits backup and restore.

Did I mention that making a nandroid backup is another coolest thing to do.
> 2 votes

---
Tags: google-play-store, google, application-autoupdate
---


# Question
Title: Unable to find the contacts backed up to Google account after the loss of the phone
I backed up my contacts to my Google account. I recently got my phone stolen. I have the same number. I have found some pictures from my previous phone but I **can't find my contacts**! Some of these cannot be replaced. The only thing I can find is how to restore contacts from my current phone. How to get my friends back?

# Answer
> 1 votes
Google offers an option to restore your contacts to any state within the past 30 days. This may help you recover deleted contacts. Just go to https://contacts.google.com/, click on More -\> Restore contacts.

# Answer
> 0 votes
I think that when you log in with your Google account into your phone it should automatically sync those contacts into your device if sync is on.

---
Tags: samsung-galaxy-s-3, contacts
---


# Question
Title: Charging works well with new USB cables only
When trying to charge my android devices (Arc S and Nexus 7 (2013)), I noticed that when using new USB-cables, the charging process is going quite fast, but after some weeks (usually four-five) the charging process rapidly slows down, and some weeks later the devices don't charge anymore, i.e. resulting in the need of new cables. Is that a hardware failure, or why do I have to replace the cables every second to third month?

# Answer
> 2 votes
Hardware is not "capable" to decide charging rate based on "newness" or otherwise of cables

In all probability, USB cables you are using are of poor quality, wrong length and thickness

What I would suggest:

1. Google for "24 awg micro USB cables **Less than or equal 2 meter length** and purchase from reputed vendor

**Why these specs for USB cable?** Long explanation but needed to emphasize choosing the right USB cable

* Current carrying capacity depends on resistance, for the same Voltage.
> Ohm's Law Current = Voltage divided by Resistance

Resistance in turn depends on thickness

> Resistance = Length divided by Area (ignoring resistivity)

Resistance is inversely proportional to the area of the wire

Less area = Thinner Wire = More Resistance = Less Current (you cannot make out thickness of the conductor by looking at it- they all seem to be equally thick but internally the conductor thickness varies)

Similarly, reducing length of wire decreases resistance

Arc S has 800 mA and Nexus 7 has 1150 mA Charging current rating and the cable should support that

**Cable Length ,thickness, current rating required for device** both matter when choosing the right cable. USB Cable Resistance: Why your phone/tablet might be charging slow relevant to your device specs says

> For smartphones, with a requirement closer to 1A, 24AWG wires up to 2m could be sufficient, or 1m at 26AWG, and 50cm at 28AWG.

**Nexus 7 is more choosy:** It will **stop** charging if voltage levels drop and resistance comes into play again. Google Nexus 7 Charging goes into details and says

> Nexus 7 will stop charging if the input voltage is less than the internal battery voltage plus 0.2 volts.

2. Use an app like Ampere or 3C Toolbox to measure the charging current (somewhere midway of your regular charging time is a good time to measure, as the values may be different just when you plugged in or towards end of charging)
3. Calculate the charging time required using the Battery Charge Time Calculator ( choose efficiency of charging at 90 %)

Repeating this test say once a month for a few months at least would give an indication if it is a hardware issue (weird as it sounds). If there isn't a significant change, it only confirms that poor USB cables being culprit

---

**For everyone:** USB Cable Resistance: Why your phone/tablet might be charging slow is a useful read to understand why it is a good idea to spend more but **buy the right USB cable**

---
Tags: charging
---


# Question
Title: How can I get the LogCat before my phone restarts?
Recently my phone keeps on restarting randomly through the day, and I would like to trace what is the cause for that.

I tried this app https://play.google.com/store/apps/details?id=org.jtb.alogrec but it doesn't seem to work in Android 6 (It creates the file but it doesn't write anything)

Any ideas on how can I get the logcat or how can I identify the problem?

# Answer
If the reboots are caused by kernel panics (sometimes the case), you can get the last\_kmsg file. It's located at `/proc/last_kmsg`. This file gets reset every time you restart your phone, so you'll have to grab it soon after a reboot.

Look at the bottom of the file to see why the phone is rebooting. If it's a normal shutdown from an app, it may point to the app that initiated the shutdown. If it's a kernel panic, hopefully it'll tell you what's happening.
> 1 votes

---
Tags: crashes, reboot, logging
---


# Question
Title: how to enable Android apps to browse user mount points in /mnt
I want to access and work on my remote documents (such as .docx, .xlsx, etc... and pdfs) from within my apps. For this, I have created a cifs mount point from a network sdcard (NTFS v3.1) to my android device in directory /mnt/routersd ; the problem is that some apps such as WPS Office or Adobe Reader don't offer directory list with access to root directories (Ofcourse, the device is rooted). My question is that how these apps can be enabled to explore root directory list such as /mnt/routersd in order for me to open my remote office documents and pdfs through those apps.

I want my mountpoint to be shown in WPS Office directory listing.

Or, to be shown in Adobe Reader directory explorer.

As you see, the pictures in the mountpoint is displayed by QuickPic.

Also, X-plore file explorer can explorer the mountpoint and do copy/delete operations in there.

So, how can I open my remote docs (/mnt/routersd) from within WPS Office and Adobe Reader apps?

# Answer
> 2 votes
Through my research, I couldn't find a way to create a symbolic link in '/sdcard' (my android internal storage) from `/mnt/routersd` (mountpoint to //192.168.x.x/sdcard); as filesystem for `/sdcard` in android doesn't support symbolic links.

I also tried `busybox mount -o bind /mnt/routersd/ /sdcard/mylink` but `mylink` couldn't be browsed by the said apps (those apps find `mylink` as an empty directory).

Eventually, I created the symbolic link in my external sdcard, namely `sdcard1` (NTFS v3.1), successfully (recent NTFS versions support symbolic links); as follows : `busybox ln -s "/mnt/routersd/" "/storage/sdcard1/mylink"`

As Adobe Reader, WPS Office, and many other apps can browse into external sdcard, mylink can be visible in their dicrectory list happily. Now, I can successfully browse my remote files and work on them from within the said apps.

---
Tags: mount, file-management, remote-control
---


# Question
Title: Mark Gmail as read when archiving from notification
The most recent version of the Gmail app as the great feature where you can choose between archiving or replying to e-mails directly from the notification.

My problem is that, if you archive it from the notification, it remains unread (instead of being marked as read). Is there anyway to get around that?

I'd like for any e-mails that are archived directly from the notification to be automatically marked as read.

# Answer
Did you say Google Script?

Marking Gmail read with Apps Script

The idea behind this script is to mark as read any message that is not in the Inbox (i.e., has been archived).

> 1. Head to script.google.com to start a script.
> 2. Choose to create a script for Gmail in the little popup.
> 3. Delete all the sample code it gives you.
> 4. Replace it with this (written using the API reference):
>
> ```
> function markArchivedAsRead() {
>    var threads = GmailApp.search('label:unread -label:inbox');
>    GmailApp.markThreadsRead(threads);
>  };
> ```
> 5. Save the project with File \> Save.
> 6. Add a new version using File \> Manage Versions and enter "initial version" then submit that.
> 7. Do a test run using Run \> markArchivedAsRead and be sure and authorize the app when it asks you to.
> 8. Add a new trigger using Resource \> Current Project's Triggers and choose to run the above function every minute.
> 9. Save the script again and exit.

I don't know that it's necessary to run it every *minute*, but as long as you run it regularly.

This isn't a direct answer to your issue, and if you have reasons to have unread messages that aren't in your inbox this won't work for you.
> 5 votes

# Answer
I managed to make it work with the following *Google Script*.
It's almos the same as @AlEverett's answer, but it never marks as read messages that skipped the inbox entirely (from a filter or something).

Unfortunately, it won't work for you if you tend archive messages very quickly (less then 30 seconds on average).

```
/** Mark as read archived threads which were previously in the inbox (determined by the label "i"). **/
function cleanAndroidArchived(){
  markArchivedAsRead();
  labelInboxAsI();
}

function markArchivedAsRead() {
  var threads = GmailApp.search('in:unread label:i -label:inbox');
  var label = GmailApp.createLabel("i");
  label.removeFromThreads(threads);
  GmailApp.markThreadsRead(threads);
};

function labelInboxAsI() {
  var threads = GmailApp.search('in:unread label:inbox');
  var label = GmailApp.createLabel("i");
  label.addToThreads(threads);
};

```
> 3 votes

# Answer
I believe I resolved the issue with @BruceConnor's case, needing to wait for the script to execute before it can work.

1. I created a new filter that looks for anything in the inbox
2. assigns the "i" label (which is created by his version)

Gmail complains that the filter will never match anything, but in this case it does match all incoming messages that stay in the inbox.

The result is that all new incoming messages are automatically "memorized" by this tag, then when you hit archive the script can compare the inbox list with the "i" label and know which ones were just archived, and then mark only those as "read". You don't have to wait to archive, because all messages are assigned into the archive "i" queue.

Bonus: I also set the new "i" label to "Hide in message list" and "Hide in label list", so it never shows up at all. (Click the little arrow next to the new "i" label and choose these options.)
> 2 votes

# Answer
@al-e's answer works, but it does have a little bug mentioned in the comments. I've made a different version of the script that solves this bug and have been successfully using it for a few years. Here's the script that I'm using:

```
function markArchivedAsRead() {
  var threads = GmailApp.search('label:unread -label:inbox');
  for (var i=0; i<threads.length; i++)
  {
    var messages = threads[i].getMessages();
    var markUnread = 1;
    for (var j=0; j<messages.length; j++)
    {
      if (messages[j].isInInbox())
        markUnread = 0;
    }
    if (markUnread)
      threads[i].markRead();
  }
};

```
> 1 votes

---
Tags: notifications, gmail
---


title: Stop vibration fedback

text:
# Question
Title: Stop vibration fedback
How can I stop my HTC m8 from vibration at the start and end of call? I turned off all vibration notifications but still I can't stop my phone from vibrating at the start and end of calls.

# Answer
Open the Settings application on your device and Navigate to `Sound` and uncheck the option labelled `Vibrate` with a description of `Vibration feedback for calls`.
> 0 votes

---
Tags: vibration
---


# Question
Title: sshd on CyanogenMod 13 Nightly failing without explanation
I've been trying to setup sshd on CM13, which seems straightforward enough, but doesn't seem to want to work.

I followed the Wiki article Doc: sshd, but when I run the `99sshd` script it produces the following warning and attempts to login just hang indefinitely.

> Could not load host key: /data/ssh/ssh\_host\_dsa\_key

I tried uncommenting the `DEBUG=1` line in the hopes of discovering the issue, but I only get the following from `logcat`.

```
01-21 03:36:24.769 18044 18044 I sshd : debug1: sshd version OpenSSH_6.8, BoringSSL
01-21 03:36:24.771 18044 18044 I sshd : debug1: private host key #0: ssh-rsa SHA256:MMcwKtW+WxaCnIwPHMjHzgOjvdiNOBYPWOVpMKPUw+4
01-21 03:36:24.772 18044 18044 I sshd : debug1: key_load_private: incorrect passphrase supplied to decrypt private key
01-21 03:36:24.772 18044 18044 I sshd : Could not load host key: /data/ssh/ssh_host_dsa_key
01-21 03:36:24.772 18044 18044 I sshd : debug1: rexec_argv[0]='/system/bin/sshd'
01-21 03:36:24.772 18044 18044 I sshd : debug1: rexec_argv[1]='-f'
01-21 03:36:24.772 18044 18044 I sshd : debug1: rexec_argv[2]='/data/ssh/sshd_config'
01-21 03:36:24.773 18044 18044 I sshd : debug1: rexec_argv[3]='-D'
01-21 03:36:24.773 18044 18044 I sshd : debug1: rexec_argv[4]='-d'
01-21 03:36:24.773 18044 18044 I sshd : Set /proc/self/oom_score_adj from -1000 to -1000
01-21 03:36:24.773 18044 18044 I sshd : debug1: Bind to port 22 on ::.
01-21 03:36:24.774 18044 18044 I sshd : Server listening on :: port 22.
01-21 03:36:24.774 18044 18044 I sshd : debug1: Bind to port 22 on 0.0.0.0.
01-21 03:36:24.774 18044 18044 I sshd : Server listening on 0.0.0.0 port 22.

```

It does mention "key\_load\_private: incorrect passphrase supplied to decrypt private key", but it's unclear why or if this is even a failing error.

It also appears the Wiki may be out of date, since certain operations could not be done exactly as stated, such as pushing the public key.

I've also tried manually regenerating the RSA and DSA server keys, but no change. If I comment out the `HostKey /data/ssh/ssh_host_dsa_key` line, the warning about the DSA key no longer appears, but login attempts still just hang. I also tried following this GitHub Gist, but likewise it does not work for CM13.

So my question is, what does it take to get the built-in SSH server in CyanogenMod to work? Please note that I am not looking for app suggestions, and specifically want to avoid using some SSH app.

---

The following are the contents of my config file and init script.

`sshd_config`:

```
#   $OpenBSD: sshd_config,v 1.84 2011/05/23 03:30:07 djm Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.

#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# The default requires explicit activation of protocol 1
Protocol 2

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
HostKey /data/ssh/ssh_host_rsa_key
HostKey /data/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

#RSAAuthentication yes
PubkeyAuthentication yes

# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile  /data/ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
PermitEmptyPasswords no

# Change to no to disable s/key passwords
ChallengeResponseAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM no

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no
#ChrootDirectory none

# no default banner path
#Banner none

# override default of no subsystems
Subsystem sftp internal-sftp

# Example of overriding settings on a per-user basis
#Match User anoncvs
#   X11Forwarding no
#   AllowTcpForwarding no
#   ForceCommand cvs server

```

`99sshd`:

```
#!/system/bin/sh

umask 077

DEBUG=1

DSA_KEY=/data/ssh/ssh_host_dsa_key
DSA_PUB_KEY=/data/ssh/ssh_host_dsa_key.pub
RSA_KEY=/data/ssh/ssh_host_rsa_key
RSA_PUB_KEY=/data/ssh/ssh_host_rsa_key.pub
AUTHORIZED_KEYS=/data/ssh/authorized_keys
DEFAULT_AUTHORIZED_KEYS=/system/etc/security/authorized_keys.default

if [ ! -f $DSA_KEY ]; then
    /system/bin/ssh-keygen -t dsa -f $DSA_KEY -N ""
    chmod 600 /$DSA_KEY
    chmod 644 $DSA_PUB_KEY
fi

if [ ! -f $RSA_KEY ]; then
    /system/bin/ssh-keygen -t rsa -f $RSA_KEY -N ""
    chmod 600 /$RSA_KEY
    chmod 644 $RSA_PUB_KEY
fi

if [[ ! -f $AUTHORIZED_KEYS && -f $DEFAULT_AUTHORIZED_KEYS ]]; then
    cat $DEFAULT_AUTHORIZED_KEYS > $AUTHORIZED_KEYS
fi

if [ "1" == "$DEBUG" ] ; then
    # run sshd in debug mode and capture output to logcat
    /system/bin/logwrapper /system/bin/sshd -f /data/ssh/sshd_config -D -d
else
    # don't daemonize - otherwise we can't stop the sshd service
    /system/bin/sshd -f /data/ssh/sshd_config -D
fi

```

## Update

At the suggestion to increase verbosity, here is the logcat output when I replace `/system/bin/logwrapper /system/bin/sshd -f /data/ssh/sshd_config -D -d` with `/system/bin/logwrapper /system/bin/sshd -f /data/ssh/sshd_config -D -ddd`. I'm not sure why (I've rebooted since last trying), but it no longer hangs and instead it appears when I try to connect sshd crashes instead.

Added before trying to connect:

```
01-21 17:22:42.665  6908  6908 I sshd    : debug2: load_server_config: filename /data/ssh/sshd_config
01-21 17:22:42.669  6908  6908 I sshd    : debug2: load_server_config: done config len = 397
01-21 17:22:42.669  6908  6908 I sshd    : debug2: parse_server_config: config /data/ssh/sshd_config len 397
01-21 17:22:42.669  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:20 setting Protocol 2
01-21 17:22:42.669  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:25 setting HostKey /data/ssh/ssh_host_rsa_key
01-21 17:22:42.669  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:26 setting HostKey /data/ssh/ssh_host_dsa_key
01-21 17:22:42.669  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:40 setting PermitRootLogin no
01-21 17:22:42.669  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:46 setting PubkeyAuthentication yes
01-21 17:22:42.669  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:50 setting AuthorizedKeysFile /data/ssh/authorized_keys
01-21 17:22:42.670  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:63 setting PasswordAuthentication no
01-21 17:22:42.670  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:64 setting PermitEmptyPasswords no
01-21 17:22:42.670  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:67 setting ChallengeResponseAuthentication no
01-21 17:22:42.670  6908  6908 I sshd    : debug3: /data/ssh/sshd_config:116 setting Subsystem sftp internal-sftp
01-21 17:22:42.670  6908  6908 I sshd    : debug1: sshd version OpenSSH_6.8, BoringSSL
01-21 17:22:42.673  6908  6908 I sshd    : debug1: private host key #0: ssh-rsa SHA256:mAYmJuHyM2tCsbXHleMvkLoobGIY5/9WCMe54bdHsiI
01-21 17:22:42.675  6908  6908 I sshd    : debug1: key_load_private: incorrect passphrase supplied to decrypt private key
01-21 17:22:42.675  6908  6908 I sshd    : Could not load host key: /data/ssh/ssh_host_dsa_key
01-21 17:22:42.675  6908  6908 I sshd    : debug1: rexec_argv[0]='/system/bin/sshd'
01-21 17:22:42.675  6908  6908 I sshd    : debug1: rexec_argv[1]='-f'
01-21 17:22:42.676  6908  6908 I sshd    : debug1: rexec_argv[2]='/data/ssh/sshd_config'
01-21 17:22:42.676  6908  6908 I sshd    : debug1: rexec_argv[3]='-D'
01-21 17:22:42.676  6908  6908 I sshd    : debug1: rexec_argv[4]='-ddd'
01-21 17:22:42.676  6908  6908 I sshd    : debug3: oom_adjust_setup
01-21 17:22:42.676  6908  6908 I sshd    : Set /proc/self/oom_score_adj from -1000 to -1000
01-21 17:22:42.676  6908  6908 I sshd    : debug2: fd 5 setting O_NONBLOCK
01-21 17:22:42.677  6908  6908 I sshd    : debug3: sock_set_v6only: set socket 5 IPV6_V6ONLY
01-21 17:22:42.677  6908  6908 I sshd    : debug1: Bind to port 22 on ::.
01-21 17:22:42.677  6908  6908 I sshd    : Server listening on :: port 22.
01-21 17:22:42.677  6908  6908 I sshd    : debug2: fd 6 setting O_NONBLOCK
01-21 17:22:42.677  6908  6908 I sshd    : debug1: Bind to port 22 on 0.0.0.0.
01-21 17:22:42.677  6908  6908 I sshd    : Server listening on 0.0.0.0 port 22.

```

Added after trying to connect:

```
01-21 17:22:51.163  2648  4972 D NetlinkSocketObserver: NeighborEvent{elapsedMs=243550, 192.168.1.1, [60E327ADCC29], RTM_NEWNEIGH, NUD_STALE}
01-21 17:22:52.845  6908  6908 I sshd    : debug3: fd 7 is not O_NONBLOCK
01-21 17:22:52.845  6908  6908 I sshd    : debug1: Server will not fork when running in debugging mode.
01-21 17:22:52.846  6908  6908 I sshd    : debug3: send_rexec_state: entering fd = 10 config len 397
01-21 17:22:52.846  6908  6908 I sshd    : debug3: ssh_msg_send: type 0
01-21 17:22:52.846  6908  6908 I sshd    : debug3: send_rexec_state: done
01-21 17:22:52.846  6908  6908 I sshd    : debug1: rexec start in 7 out 7 newsock 7 pipe -1 sock 10
01-21 17:22:52.900  6909  6909 D /system/bin/sshd: debug3: recv_rexec_state: entering fd = 5
01-21 17:22:52.900  6909  6909 D /system/bin/sshd: debug3: ssh_msg_recv entering
01-21 17:22:52.900  6909  6909 D /system/bin/sshd: debug3: recv_rexec_state: done
01-21 17:22:52.900  6909  6909 D /system/bin/sshd: debug2: parse_server_config: config rexec len 397
01-21 17:22:52.900  6909  6909 D /system/bin/sshd: debug3: rexec:20 setting Protocol 2
01-21 17:22:52.901  6909  6909 D /system/bin/sshd: debug3: rexec:25 setting HostKey /data/ssh/ssh_host_rsa_key
01-21 17:22:52.901  6909  6909 D /system/bin/sshd: debug3: rexec:26 setting HostKey /data/ssh/ssh_host_dsa_key
01-21 17:22:52.901  6909  6909 D /system/bin/sshd: debug3: rexec:40 setting PermitRootLogin no
01-21 17:22:52.901  6909  6909 D /system/bin/sshd: debug3: rexec:46 setting PubkeyAuthentication yes
01-21 17:22:52.901  6909  6909 D /system/bin/sshd: debug3: rexec:50 setting AuthorizedKeysFile /data/ssh/authorized_keys
01-21 17:22:52.901  6909  6909 D /system/bin/sshd: debug3: rexec:63 setting PasswordAuthentication no
01-21 17:22:52.901  6909  6909 D /system/bin/sshd: debug3: rexec:64 setting PermitEmptyPasswords no
01-21 17:22:52.901  6909  6909 D /system/bin/sshd: debug3: rexec:67 setting ChallengeResponseAuthentication no
01-21 17:22:52.901  6909  6909 D /system/bin/sshd: debug3: rexec:116 setting Subsystem sftp internal-sftp
01-21 17:22:52.902  6909  6909 D /system/bin/sshd: debug1: sshd version OpenSSH_6.8, BoringSSL
01-21 17:22:52.903  6909  6909 D /system/bin/sshd: debug1: private host key #0: ssh-rsa SHA256:mAYmJuHyM2tCsbXHleMvkLoobGIY5/9WCMe54bdHsiI
01-21 17:22:52.903  6909  6909 D /system/bin/sshd: debug1: key_load_private: incorrect passphrase supplied to decrypt private key
01-21 17:22:52.903  6909  6909 E /system/bin/sshd: error: Could not load host key: /data/ssh/ssh_host_dsa_key
01-21 17:22:52.903  6908  6908 I sshd    : debug1: inetd sockets after dupping: 5, 5
01-21 17:22:52.904  6908  6908 I sshd    : Connection from 192.168.1.224 port 49372 on 192.168.1.116 port 22
01-21 17:22:52.906  6908  6908 I sshd    : debug1: Client protocol version 2.0; client software version OpenSSH_6.2
01-21 17:22:52.906  6908  6908 I sshd    : debug1: match: OpenSSH_6.2 pat OpenSSH* compat 0x04000000
01-21 17:22:52.906  6908  6908 I sshd    : debug1: Enabling compatibility mode for protocol 2.0
01-21 17:22:52.906  6908  6908 I sshd    : debug1: Local version string SSH-2.0-OpenSSH_6.8
01-21 17:22:52.907  6908  6908 I sshd    : debug2: fd 5 setting O_NONBLOCK
01-21 17:22:52.909  6908  6908 I sshd    : debug2: Network child is on pid 6913
01-21 17:22:52.909  6908  6908 I sshd    : debug3: preauth child monitor started
01-21 17:22:52.918  6908  6908 I sshd    : debug3: privsep user:group 2000:2000 [preauth]
01-21 17:22:52.919  6908  6908 I sshd    : debug1: permanently_set_uid: 2000/2000 [preauth]
01-21 17:22:52.919  6908  6908 I sshd    : debug1: list_hostkey_types: ssh-rsa [preauth]
01-21 17:22:52.919  6908  6908 I sshd    : debug1: SSH2_MSG_KEXINIT sent [preauth]
01-21 17:22:52.920  6908  6908 I sshd    : debug1: SSH2_MSG_KEXINIT received [preauth]
01-21 17:22:52.920  6908  6908 I sshd    : debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1 [preauth]
01-21 17:22:52.921  6908  6908 I sshd    : debug2: kex_parse_kexinit: ssh-rsa [preauth]
01-21 17:22:52.921  6908  6908 I sshd    : debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com [preauth]
01-21 17:22:52.922  6908  6908 I sshd    : debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com [preauth]
01-21 17:22:52.922  6908  6908 I sshd    : debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
01-21 17:22:52.923  6908  6908 I sshd    : debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
01-21 17:22:52.923  6908  6908 I sshd    : debug2: kex_parse_kexinit: none,zlib@openssh.com [preauth]
01-21 17:22:52.923  6908  6908 I sshd    : debug2: kex_parse_kexinit: none,zlib@openssh.com [preauth]
01-21 17:22:52.924  6908  6908 I sshd    : debug2: kex_parse_kexinit:  [preauth]
01-21 17:22:52.924  6908  6908 I sshd    : debug2: kex_parse_kexinit:  [preauth]
01-21 17:22:52.924  6908  6908 I sshd    : debug2: kex_parse_kexinit: first_kex_follows 0  [preauth]
01-21 17:22:52.925  6908  6908 I sshd    : debug2: kex_parse_kexinit: reserved 0  [preauth]
01-21 17:22:52.925  6908  6908 I sshd    : debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 [preauth]
01-21 17:22:52.926  6908  6908 I sshd    : debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss [preauth]
01-21 17:22:52.926  6908  6908 I sshd    : debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se [preauth]
01-21 17:22:52.926  6908  6908 I sshd    : debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se [preauth]
01-21 17:22:52.927  6908  6908 I sshd    : debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 [preauth]
01-21 17:22:52.927  6908  6908 I sshd    : debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 [preauth]
01-21 17:22:52.928  6908  6908 I sshd    : debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib [preauth]
01-21 17:22:52.928  6908  6908 I sshd    : debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib [preauth]
01-21 17:22:52.928  6908  6908 I sshd    : debug2: kex_parse_kexinit:  [preauth]
01-21 17:22:52.929  6908  6908 I sshd    : debug2: kex_parse_kexinit:  [preauth]
01-21 17:22:52.929  6908  6908 I sshd    : debug2: kex_parse_kexinit: first_kex_follows 0  [preauth]
01-21 17:22:52.929  6908  6908 I sshd    : debug2: kex_parse_kexinit: reserved 0  [preauth]
01-21 17:22:52.930  6908  6908 I sshd    : debug1: kex: client->server aes128-ctr hmac-sha1-etm@openssh.com none [preauth]
01-21 17:22:52.930  6908  6908 I sshd    : debug1: kex: server->client aes128-ctr hmac-sha1-etm@openssh.com none [preauth]
01-21 17:22:52.931  6908  6908 I sshd    : debug1: expecting SSH2_MSG_KEX_DH_GEX_REQUEST [preauth]
01-21 17:22:52.931  6908  6908 I sshd    : debug1: SSH2_MSG_KEX_DH_GEX_REQUEST received [preauth]
01-21 17:22:52.931  6908  6908 I sshd    : debug3: mm_request_send entering: type 0 [preauth]
01-21 17:22:52.932  6908  6908 I sshd    : debug3: mm_choose_dh: waiting for MONITOR_ANS_MODULI [preauth]
01-21 17:22:52.933  6908  6908 I sshd    : debug3: mm_request_receive_expect entering: type 1 [preauth]
01-21 17:22:52.933  6908  6908 I sshd    : debug3: mm_request_receive entering [preauth]
01-21 17:22:52.933  6908  6908 I sshd    : debug3: mm_request_receive entering
01-21 17:22:52.933  6908  6908 I sshd    : debug3: monitor_read: checking request 0
01-21 17:22:52.934  6908  6908 I sshd    : debug3: mm_answer_moduli: got parameters: 1024 2048 8192
01-21 17:22:52.934  6908  6908 I sshd    : WARNING: /data/ssh/moduli does not exist, using fixed modulus
01-21 17:22:52.935  6908  6908 I sshd    : debug3: mm_request_send entering: type 1
01-21 17:22:52.937  6908  6908 I sshd    : debug2: monitor_read: 0 used once, disabling now
01-21 17:22:52.937  2200  2200 I DEBUG   : property debug.db.uid not set; NOT waiting for gdb.
01-21 17:22:52.938  2200  2200 I DEBUG   : HINT: adb shell setprop debug.db.uid 100000
01-21 17:22:52.938  2200  2200 I DEBUG   : HINT: adb forward tcp:5039 tcp:5039
01-21 17:22:52.938  6908  6908 I sshd    : debug3: mm_choose_dh: remaining 0 [preauth]
01-21 17:22:52.938  6908  6908 I sshd    : debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent [preauth]
01-21 17:22:53.168  2200  2200 I SELinux : SELinux: Loaded file_contexts contexts from /file_contexts.
01-21 17:22:53.174  2648  3182 W NativeCrashListener: Couldn't find ProcessRecord for pid 6913
--------- beginning of crash
01-21 17:22:53.174  2200  2200 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-21 17:22:53.174  2200  2200 E DEBUG   : AM write failed: Broken pipe
01-21 17:22:53.174  2200  2200 F DEBUG   : Build fingerprint: 'google/shamu/shamu:6.0.1/MMB29S/2489379:user/release-keys'
01-21 17:22:53.174  2200  2200 F DEBUG   : Revision: '0'
01-21 17:22:53.174  2200  2200 F DEBUG   : ABI: 'arm'
01-21 17:22:53.174  2200  2200 F DEBUG   : pid: 6913, tid: 6913, name: sshd  >>> /system/bin/sshd: [net] <<<
01-21 17:22:53.174  2200  2200 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
01-21 17:22:53.177  2200  2200 F DEBUG   :     r0 00000000  r1 00001b01  r2 00000006  r3 00000000
01-21 17:22:53.177  2200  2200 F DEBUG   :     r4 b6f36b88  r5 00000006  r6 b6f36b38  r7 0000010c
01-21 17:22:53.177  2200  2200 F DEBUG   :     r8 000016a4  r9 b6e3cf34  sl fffffe88  fp b6f6a9d8
01-21 17:22:53.177  2200  2200 F DEBUG   :     ip 0000000d  sp becbf2f8  lr b6c8e42d  pc b6c90b90  cpsr 200f0010
01-21 17:22:53.190  2200  2200 F DEBUG   :
01-21 17:22:53.190  2200  2200 F DEBUG   : backtrace:
01-21 17:22:53.190  2200  2200 F DEBUG   :     #00 pc 00049b90  /system/lib/libc.so (tgkill+12)
01-21 17:22:53.190  2200  2200 F DEBUG   :     #01 pc 00047429  /system/lib/libc.so (pthread_kill+36)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #02 pc 0001bbc3  /system/lib/libc.so (raise+10)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #03 pc 0001846d  /system/lib/libc.so (__libc_android_abort+36)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #04 pc 000164cc  /system/lib/libc.so (abort+4)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #05 pc 00061e0d  /system/lib/libcrypto.so
01-21 17:22:53.191  2200  2200 F DEBUG   :     #06 pc 00061c89  /system/lib/libcrypto.so (RAND_bytes+276)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #07 pc 0004143f  /system/lib/libcrypto.so (BN_rand+50)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #08 pc 0004b5d3  /system/lib/libcrypto.so
01-21 17:22:53.191  2200  2200 F DEBUG   :     #09 pc 00024d25  /system/lib/libssh.so (dh_gen_key+44)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #10 pc 0000cdc9  /system/bin/sshd
01-21 17:22:53.191  2200  2200 F DEBUG   :     #11 pc 000253d5  /system/lib/libssh.so (ssh_dispatch_run+232)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #12 pc 00025491  /system/lib/libssh.so (ssh_dispatch_run_fatal+4)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #13 pc 00020d6f  /system/bin/sshd
01-21 17:22:53.191  2200  2200 F DEBUG   :     #14 pc 000162f5  /system/lib/libc.so (__libc_init+52)
01-21 17:22:53.191  2200  2200 F DEBUG   :     #15 pc 000073e4  /system/bin/sshd
01-21 17:22:53.230  2200  2200 F DEBUG   :
01-21 17:22:53.230  2200  2200 F DEBUG   : Tombstone written to: /data/tombstones/tombstone_07
01-21 17:22:53.232  6908  6908 I sshd    : debug1: monitor_read_log: child log fd closed
01-21 17:22:53.232  6908  6908 I sshd    : debug3: mm_request_receive entering
01-21 17:22:53.233  6908  6908 I sshd    : mm_request_receive: socket closed
01-21 17:22:53.233  6908  6908 I sshd    : debug1: do_cleanup
01-21 17:22:53.233  6908  6908 I sshd    : debug1: Killing privsep child 6913
01-21 17:22:53.238  6908  6908 I sshd    : sshd terminated by exit(255)

```

# Answer
> ```
> Could not load host key: /data/ssh/ssh_host_dsa_key
>
> ```

This is not fatal error, but warning. As you already found, you can get rid of it commenting `HostKey` line from your `sshd_config`.

> ```
> 01-21 03:36:24.774 18044 18044 I sshd : Server listening on 0.0.0.0 port 22.
>
> ```

What do you expect from server to do? It waits for your connection.

> but login attempts still just hang.

would you bother yourself with posting the logs from server and client and how you connect? Preferably client with `-vvv` switches and server with `-ddd` instead of just `-d` as in the script.

Excuse me for non-asnwering all your question, but there is too much of them, not enough information and this format would not fit into comment.
> 1 votes

---
Tags: cyanogenmod, ssh
---


# Question
Title: How do I make my profile icon use the same image on my google profile?
I'm currently using Nexus 6P with Marshmallow. I have not added other profiles on my device.

Why does my profile icon not share the same image used on my Google account? I recalled this working on an earlier android version (maybe Kitkat or Lollipop) but it only took effect after adding more users. I might be remembering this completely wrong, though.

Is there a way to make the image share what is already on my google profile?

# Answer
My understanding is that this is controlled by the google+ app.

according to this xda thread try:

> 1. Open Setting -\> Apps -\> All -\> Contacts Storage -\> Clear Data
> 2. Open Google+ -\> Settings -\> Your account (under Account Settings) -\> Contacts -\> Keep contacts up to date
> 7 votes

---
Tags: 6.0-marshmallow, profiles, nexus-6p
---


# Question
Title: Enable Landscape rotation quick settings toggle on unrootable Moto G (maybe using ADB?)
Pretty much what the title says. Apparently the Moto G only has Auto-Rotate and Portrait rotation locking allowed, and I was wondering if there was a way to enable Landscape rotation. I know that there are some apps that can do the trick, but I thought I'd see if it was possible to get the native landscape lock working before I tried those. I just upgraded to Lollipop.

I'm using a Republic Wireless phone, otherwise I'd definitely root the thing. As it is, I don't really want to deal with the hassle.

# Answer
This app can lock your screen in landscape: Rotation Locker - Google Play and doesn't require root. I recommend this app because it has no permissions, is \<100KB (no ads), and if you use Tasker, this app also has Tasker integration.

The explanation for your problem is that carriers and phone brands often decide "you don't need this feature" and just disable it on the front-end. But they don't actually spend the time to really disable that feature. The app works without root because Android provides an API to lock rotation, that's just part of Android.

Hope this helps solve your problem!
> 0 votes

---
Tags: 5.0-lollipop, settings, motorola-moto-g
---


# Question
Title: Change IMEI number to obtain tablet data plan?
It looks like T-Mobile offers very cheap data-only plans, but these are only available for tablets. I have read that this is enforced by tracking your IMEI. I was wondering: Is it possible to change your phone's IMEI to a tablet's IMEI, to trick T-Mobile, so that you can get a data-only plan. Nobody really needs talk and text if they have data. Thanks!

# Answer
This would undoubtedly be a violation of T-Mobile's terms of service. To do so, though, you would need to create a custom ROM and modify the `ro.serialno` system property. Alternatively you could try to modify Build.java and pass in a different value to Build.SERIAL. It's unclear whether that's how T-Mobile is retrieving the IMEI number though.
> 1 votes

# Answer
I believe this does what you are looking for, \[XPOSED\] IMEI Changer & PRO \[RANDOM IMEI Support\]

You will need to your phone and install Xposed

* The ways of can be founded by clicking on theses tags linked or by googling your device model and how to root it.
* What is Xposed Framework For Android & How To Install It \[Guide\]

---

**Keep in Mind** This is in violation of T-Mobiles Terms of Services

**Hopefully** I have linked you to all necessary stuff for you to be able to change your IMEI Number
> 1 votes

---
Tags: samsung-galaxy-s-4, mobile-data, 4g, imei
---


# Question
Title: Droid Explorer - Input string was not in a correct format
When opening Droid Explorer, it gives an error message "Input string was not in a correct format."

How to fix it?

# Answer
> 1 votes
As the developer of Droid Explorer, I would suggest that this is more suitable as a bug report, which actually already exists.

Although, there is probably a workaround that you could do.

I have seen that this usually happens when there is a version of the SDK that was pre-release or something along those lines. The error happens when it tries to verify the SDK version. The folder names are used as the version, and when there is a letter in the version name, Droid Explorer does not like that.

Check the `android-sdk/build-tools` directory and see if there are any folders that have A-Z in them. If one does, that is the problem. For example, I have seen situations where there will be a folder called `android-4.4W`. I would suggest deleting that folder, open the SDK Update Tool and download the versions of the build tools that you want/need.

---
Tags: droid-explorer
---


# Question
Title: Is there anyway to get my droid Maxx to recognize my external hard drive that is NTFS not fat 32
I have done a lot of research on this and it would seem like in this day in age this would not be very hard to figure out

# Answer
> 0 votes
Have you tried Paragon? Paragon Mounter - Play Store

Referenced from here: NTFS With & Without Root

---
Tags: motorola-droid
---


# Question
Title: How to root the Droid Maxx with 4.4.4 KitKat
Is there a way to root the Motorola Droid Maxx (Android 4.4.4 KitKat)? It doesn't even support the ESPN app as-is.

# Answer
There are plenty of rooting apps avialble for rooting kitkat mobiles.. The apps like Framaroot, King Root, VRoot and so on.. for more information check this out..
> 0 votes

---
Tags: rooting, motorola-droid
---


# Question
Title: Why aren't these UI "hacks" more often exploited?
What I'm talking about:

* Facebook publishes a standalone app called Messenger on the Play Store. It's a chat app, for interactions with other Facebook users. It implements something called "chat heads" which are these round bubbles that sit on top of everything else in the Android UI (except the status bar) that allow for opening an Always On Top chat UI.
* Facebook also publish their namesake app, which implemented intrusive notifications for itself, that appear at the top of the screen and contain their relevant content.

They render on top of the system status bar preventing access to it when the app isn't active

These are benign examples but they intrude on userland and feel malicious in the way they manifest themselves -- appearing without warning.

Facebook gave its apps hidden ways to disable these things.

What surprises me is that there are not more apps that exploit these UI security "holes".

If I were in the business of infecting people's phones, I would take advantage of this and make the most infuriatingly annoying malware because it's as if one program is given control of the entire interface with no escape.

Imagine the things a malicious bit of code could do if it literally prevented the user from doing anything about it. They can't use the interface, so they can't kill the app, they can't turn off the phone and on many phones you can't remove the battery, etc.

Is there an obvious reason why this sort of thing isn't more exploited? I can't find much about it.

# Answer
> 4 votes
That chat bubble is there because you granted Messenger the permission "draw over other apps". In simple terms, call it overlay. The qualified name of the permission is `android.permission.SYSTEM_ALERT_WINDOW`.

> Allows an app to create windows using the type `TYPE_SYSTEM_ALERT`, shown on top of all other apps. **Very few apps should use this permission**; these windows are intended for system-level interaction with the user.

(Emphasis mine)

I don't think chat bubbles of Messenger, in any capacity, are meant for system-level interaction with its user, so you can assume that developers of that app and any such app chose to abuse the system's feature for their own interests.

Furthermore, you definitely are not the first person who thought about exploitation of the overlay feature of Android.

ArsTechnica: New Android ransomware locks out victims by changing lock screen PIN

> Dubbed Android/Lockerpin.A, the app ... overlays a bogus patch installation window on top of an activation notice. When targets click on the continue button, they **really grant the malicious app elevated rights that allow it to make changes to the Android settings**. From there, Lockerpin sets or resets the PIN that unlocks the screen lock, effectively requiring users to perform a factory reset to regain control over the device.
>
> ...
>
> Once the continue button is pressed, **the app will acquire administrator rights** \[becomes a Device Administrator\]. From there it will change the PIN and periodically continue to overlay a fake window in an attempt to hold on to the elevated privileges. It's the first known Android lock-screen ransomware to set a phone's PIN lock. Because it requires non-paying victims to factory reset their phones, it causes them to lose all of their data.

(Emphasis mine)

Just so you know, Android understands the potential damage overlay can cause to a device, hence, when an overlay is actively drawn on screen and user attempts to sideload an app, the install button simply fails to work. See Why can't I press the Install button when installing applications from unknown sources?

If only Android extends this feature to activation/deactivation of device administrators, that would be very nice of them.

In case, you want to know which other app has the same permission, you can use my answer on Determine which app is drawing on top of other apps?

---

The notifications you mentioned, intrusive they may be, are called Heads-up notifications. Until Android 5.1, users didn't have an official way to get rid of them without losing all notifications from an app.

Android Design: Heads-up Notification

> When a high-priority notification arrives ..., it is presented to users for a short period of time with an expanded layout exposing possible actions.
>
> After this period of time, the notification retreats to the notification shade. **If a notification's priority is flagged as High, Max, or full-screen, it gets a heads-up notification.**

(Emphasis mine)

As you may have guessed, Heads-up notifications are not the default type of notification a system should be displaying to a user and a developer have to explicitly opt for it in the app's code. It's just that some developers opine that the things their app do are of the ultimate priority in the life of the user, let alone the system, so they often choose to show every notification as a Heads-up notification.

That said, heads-up notifications were introduced only in Lollipop while your device runs Android KitKat, so definitely, as Andrew T. put it in comments, it must be Facebook's native code which is both creating and displaying those pseudo-Lollipop notifications at the top and above a window.

The reason you can't interact with system bar when that pseudo-Lollipop notification is active, is most likely the use of blocking overlays to display a view which is perceived as a notification by the user. Aaron's answer has explained it with a good working example app.

I searched web between the range Oct 2013 to Oct 2014 (the developmental age of Android 4.4.x) and came to know that there were apps available in Play Store primarily meant to create those pseudo-Lollipop notifications. One such app is Floatifications and the other one I found was Metro Notifications Free. Both uses the same blocking overlay to create those pseudo-Lollipop notifications.

I'm surprised you didn't find toasts pesky enough.

# Answer
> 3 votes
Facebook does a lot more than just bloat your viewing window. Have you seen all of the permissions it requires?!

The methods Facebook use to add chat bubbles are called Blocking Overlays. They are built-in feature of Android. There's an app called Tasker that well visualizes these features. Tasker is an automation app, but you can also create activities called "Scenes" that you can design UIs on. Tasker allows you to display these scenes as:

* Full Window Activities,
* Blocking Dialogs (with a Dim Background option, which don't allow the user to click behind the window),
* Blocking Overlays (which allow the user to continue using the foreground app, much like chat bubbles),
* and non-blocking Overlays (these cannot be focussed or tapped on, taps go right through the overlay to whatever is underneath it).

Non-blocking overlays sound pointless, but that's how "night-mode" and "brightness limiter" apps are created. It's just a semi-transparent overlay on the screen.

So, it's not a super bad thing that apps can utilize your window space, if not abused, they can provide features. In the case of Facebook Messenger all the neat little features definitely has a cost, of privacy (app permissions).

I hope I helped explain these "UI hacks" a little better, and that they're not always bad.

---
Tags: security, vanilla-ui
---


title: Nubia Z9 gives error on starting camera

text:
# Question
Title: Nubia Z9 gives error on starting camera
I bought the nubia z9 mini last year November.

About a week ago this message appears when using the camera:

"camera error" "Please make sure no other applications occupy the camera, or try to restart the phone. "

I tried restarting but the same error. As requested, I've run `adb dumpsys`:

```
> adb shell dumpsys media.camera
Camera module HAL API version: 0x100
Camera module API version: 0x100
Camera module name: QCamera Module
Camera module author: Qualcomm Innovation Center Inc
Number of camera devices: 2 Vendor tags left unimplemented.
Camera 0 static information:
   Facing: BACK Orientation: 90
   Device version: 0x100
   Device is closed, no client instance
Camera 1 static information:
   Facing: FRONT
   Device version: 0x100

```

I put the New version V3.67 Android Version 5.1.1 \[ROM\], the error is same. Can you help me?

# Answer
> 0 votes
I was able to solve the problem (thanks to Firelord):

While "being debugged", the camera is turned on. For that, I've simply did the following:

1. the ADB setup and command ready in PC
2. device connected to PC in debugging mode.
3. run `adb logcat > d:\dmp\device.log`
4. run the camera app. Disappeared the error, the camera turns on

---
Tags: camera
---


# Question
Title: How to choose micro USB cable for my device?
The plug sure looks like any old micro USB plug. Will another cable (like the one from my digital camera) work to charge the battery, or do I need one specifically designed for my phone (incredible)

# Answer
Any Micro USB cable that has the capability of charging your phone does excactly that.

I found a link on USB powering. The source is from 2005 but the issue remains the same.

Some cables do charge your device due to a sufficient power flow through the cable while others don't.
> 9 votes

# Answer
**Edit:** Proof of theory is in testing it, so the reults are right on top to encourage making an informed decision while shopping for USB charging cables.

Of late, I noticed that my Huawei Honor 6 device was charging slower and decided to replace USB charging cable. I bought these Tronsmart cables at a price comparable with budget cables. These are 20 AWG thickness for charging (provide best charging) 28 AWG for data (thinner thickness doesn't affect data transfer speeds). Picture below from product

**Performance:** I have two devices Samsung Note 2 and Huawei Honor 6 both with OEM chargers and OEM cables (nearly a year old). Charging current as measured using OEM cables and Tronsmart cables is very encouraging

> * Samsung Note 2 with OEM cable - **1100 mA**, with Tronsmart cable - **1900 mA**
> * Huawei Honor 6 with OEM cable - **550 mA**, with Tronsmart cable - **1750 mA**

**Caution:** Please make sure you don't end up buying *CCA (Copper Clad Aluminum Cables)* instead of Copper cables. Former are comparatively brittle and have lower conductivity compared to Copper conductors

---

**Standards**

* USB standard 3.0 in lays down standards of 10 W: 5 V, 2 A for *smartphones and tablets*
* Battery Charging Revision 1.2 lays down " *standard for establishing the proper way to charge a battery from a USB port* "
* American Wire Gauge (AWG) is a reference for thickness of cables. In this system, **larger numbers indicate thinner wires.** USB specification above makes reference to AWG numbers of 20, 22, 24, 26 and 28,

These standards are to ensure that appropriate **Voltage and Current** are available to the device being charged and selection of **right USB cable is based on these to deliver right amount of Power to charge**

---

*This is applicable for all Android phones- OP's device is taken as an example ( see Notes at end )*

# All USB cables are **NOT the same when it comes to charging**

Selection of USB cables depends on:

* Device it is meant to charge
* Length of cable
* Thickness of cable in AWG ( externally, they may look the same but what matters is the electrical conductor thickness internally ). USB cables of standard make are marked showing the thickness, for example,

`28AWG/2C and 24AWG/2C` or `28AWG/1P + 24AWG/2C`

This means

> The first code is normally the specification of the data signal pair, which is normally 28AWG. "2C" means 2 conductors, and "1P" or "1Pr" means 1 pair. "2C" and "1P" are basically the same.
>
> The **important part is the second code,** which is the specification of the **power distribution pair** (*relevant to the solution here*)

Before we get into details of how to select based on these factors, a quick recap of basic electrify would help:

```
Ohm's Law  Current = Voltage divided by Resistance

Resistance = Length  of cable divided by Area of cable (ignoring resistivity)

Power = Voltage multiplied by Current

```

# What do those equations mean?

Current carrying capacity depends on resistance, for the same Voltage.

Resistance is inversely proportional to the area of the wire ( Less area = Thinner Wire = More Resistance = Less Current )

Resistance is directly proportional to length (Longer cable = More resistance and vice versa )

**Power in turn is therefore dependent on length and thickness of cable (affecting resistance) and Voltage**

In a nut shell, quoting from USB Cable Resistance: Why your phone/tablet might be charging slow

> if you are going to replace your cable with an aftermarket cable, it would be best to see if you can find a cable with the thickest possible conductors for the **power**. If that isn’t possible, stick with short (to very short) lengths, as that always works.

Power (Voltage times Current), thickness, short lengths are qualitative and need to be in numbers to choose the right cable. For this you need to know, firstly, **Power-** Refers to the charger rating of your device . Your device as mentioned is "incredible" and Charger for HTC Droid Incredible shows it to be rated for **1A**

Next, is **Voltage-** For a **5V output**, the USB specification demands that the voltage remains within 5% (i.e. an acceptable voltage drop of 0.25V). Some vendors provide a slightly higher Voltage rating

> .... some vendors have realized the issue (*of Voltage drop* ) and decided to push the output voltage up to 5.1v or 5.2v, which is still within USB specification but allows for an extra 0.1-0.2v voltage drop. This is a potentially nice feature as it means the requirements on the cables are slightly relaxed (i.e. maybe even 0.7v voltage drop is tolerable).

# Choosing the right cable

You know the Power and Voltage , only thing left is to know the **thickness and length of USB cable**. For that refer to the tables (choose under the current rating of table *With Contact Resistance*, which is real life, *without contact resistance* is to give the effect of cable alone) and look for maximum cable length / thickness combinations by choosing "non red" color (green or yellow) which tell you that you can safely choose, as indicated by arrows:

* 24 AWG cable upto 2 metres in length
* 26 AWG cable upto 1 metres in length

Google for this cable specs (normally cables are commonly sold as 24/28 AWG ,in which case select maximum 1 meter length ) and buy from a reputed vendor. Done!!

**Notes**

1. You can calculate the voltage drop using Ohm's law yourself. Tables are for convenience. Helpful pointers on using the tables :

* If the exact rating of your charger is not available, say 1.35 A, select the next higher rating or work it out issuing Ohm's law
    * *Green* color in table indicates, that the values are compliant to USB standard.
    * *Yellow* While yellow-zone figures are not going to be strictly compliant with the USB -0.25V maximum drop, it may still be sufficient for a full charge as many devices can accept somewhat more loss of voltage without detriment to charging
    * *Red* Non compliant to standards. Don't use
    * For lower current rating upto 1.5 A, selection of yellow zone lengths may still be sufficient for a full charge as many devices can accept somewhat more loss of voltage without detriment to charging. For higher currents (more than 1.5V), you need to be more conservative, so you should choose towards the green.
2. For Tablet users: you need to choose what falls in "green" zone only, since Voltage drop sensitivity is higher. See this as an example Google Nexus 7 Charging
3. I am in no way affiliated with the source and I believe it to be credible given the detailed logic presented and relates well with other sources which recommend short cables, without proper justification. It is an educative read for those inclined to get into technical details
> 3 votes

# Answer
My un-technical answer is no. I have a microUSB AC Adapter for a bluetooth headset that charges my headset just fine but won't charge my phone for some reason. I also have a retractable miniUSB cable to connect to the computer with and it is fine for data but it also fails to charge my phone.
> 1 votes

# Answer
I'd say it depends on the cable, but you have a fair chance to get your phoned charged.

I've tested HTC Hero with 3 types of USB cable (universal, bought with my pocket hdd and bough with my dvd-drive), 2 types of a GPS charger and one type of a GPS car charger. All worked well. :)
> 1 votes

# Answer
For what it's worth, I purchased a generic MicroUSB cable on Amazon for like $2, which was advertised as being for BlackBerry users, and it works just fine on my Incredible. I use it as my charger at the office.
> 0 votes

---
Tags: htc-droid-incredible, battery, charging
---


# Question
Title: How do I update my encrypted phone (CyanogenMod 12)?
I want to encrypt my phone(Xperia M). It has CyanogenMod 12 with cyanogenmod recovery. Wanted to know if I could update it the normal way, flashing through recovery, or some other way.

# Answer
As of 04-01-2015 custom recoveries don't support decryption CM12 yet. It will give you a *wrong password* notification when trying to decrypt.

But you can put the `update.zip` in `/cache` partition. Then in the recovery, skip entering the password. And flash from `/cache` partition. This works because you don't need your password to access `/cache` partition.
> 0 votes

# Answer
In upgrading to CM13, I would do wipe both caches, system and data. It is enough demanding for the system to the upgrade also without system encryption. However, I have managed to several updates in encrypted systems as Sparta describes but after many of them something often breaks and fresh installation can be necessary.
> 0 votes

---
Tags: cyanogenmod, updates, recovery-mode, encryption
---


# Question
Title: How to add contacts using adb without user interaction?
Following this I found out how to add a contact using `adb`. The only thing that's bugging me is that the user has to okay/cancel the action, because a create-contact dialog appears on the screen. What I want is for the command to automatically add the contact without waiting for the approval of the user. I've already looked through this, but couldn't find a way. Does anyone know how to do this?

# Answer
> 4 votes
For your Android 4.4.2 device the command to add a contact is (replace the Bo Lawson and #123.. to whatever you want):

```
adb shell am start -a android.intent.action.INSERT -t vnd.android.cursor.dir/contact -e name 'Bo Lawson' -e phone 123456789

```

Now to get it to save. This is Android 4.4.2 specific. Pressing back will save it. For this you need to use key events. With Android 4.4.2 it is key event 4. You are going to need to do it at least twice. Once to exit the keyboard, the other to exit and save. If required use it again to completely exit from Contacts app.

```
adb shell am start -a android.intent.action.INSERT -t vnd.android.cursor.dir/contact -e name 'Bo Lawson' -e phone 123456789
adb shell input keyevent 4
adb shell input keyevent 4

```

This worked on my rooted Samsung Galaxy Tab Pro running Android 4.4.2.

Edit: I found a post on Stack Overflow which references this command.

# Answer
> 1 votes
I think there is not direct way to do that. I would recomend for you to make a simple app to insert a contact or contact list and then use it with adb. You can find an example here http://www.codeproject.com/Articles/578823/Android-Contact-Operations-Insert-Search-Delete

---
Tags: adb, contacts
---


title: wrong currency in my playstore account

text:
# Question
Title: wrong currency in my playstore account
When I tried to make a purchase from HOF I found out that the reason the prices were incorrect was because they were in the wrong currency. When I checked my account it said canadian which is correct. What do I do to correct this issue?

# Answer
> 0 votes
Make sure your network/gps location is correct, then clear app data.

I had a similar issue with Google Maps (hotel price in foreign currency) after international travel.

---
Tags: google-play-games
---


# Question
Title: AndrOpen Office opens SD documents in read-only on Lenovo A7600-F
I've got a fairly new Lenovo A7600-F, which has updated to Android 5 since I purchased it. I'm also fairly new to Android, having gotten my first device (Galaxy S4) five months ago. I wouldn't call myself a power user.

Because I write on my tablet, and on my home computer (Kubuntu 14.04.2 LTS, kept up to date), I searched for a method to directly edit the ODT files from LibreOffice on the tablet, and found AndrOpen Office. Aside from font availability limitations, this has been working pretty well, except for one thing: when I connect the tablet to my computer, I can only access files on the SD card, and then only write to a single folder (LOST.DIR), and files stored there open in AndrOpen Office Writer as read-only, even after formatting the SD card in the tablet. I've tried moving the AndrOpen Office app to SD storage, and that failed, but Android gave no indication (that I've seen) why. Opening a document from internal storage and using "Save As" to put it on the SD card also fails; though I didn't note the exact error message, it said something about "nonexistent object" and "nonexistent file".

I'm able to install other apps directly to SD card when I've selected the SD card as primary write location via Settings. I'm able to copy files to and from the SD card using the File Browser that came pre-installed on the tablet (I'm not sure if this is part of Android or something Lenovo installed; my phone is a Verizon device, and they modify the OS a good bit, making it uncertain to compare built-in apps between phone and tablet). This makes me confident the SD card isn't mounted in read-only mode.

How can I save documents from AndrOpen Office directly to the SD card, or open documents from the SD card in editable form (i.e. to save back to the original file)?

# Answer
> 0 votes
Go to 'Other cloud storage' and your external sd card will be listed there, somewhere on the bottom left. Navigate to the document and you will be able to open ït in read/write mode.

---
Tags: external-sd, openoffice
---


# Question
Title: How to get notified about removed apps from Google Play Store?
Recently I found some apps (which I already installed) have been removed from Google Play Store for different reasons according to Google.

Is there a way to get notified about removed apps from the Play Store, like some app to check currently installed apps, whatever (special) newsletter/feed for this or any other way?

# Answer
The whole answer relies on the fact that when this query is made:

```
https://play.google.com/store/apps/details?id=PKG_NAME    # PKG_NAME is the package name of an app

```

among other things, the HTTP code in the returned headers in most of the cases would either be:

* 404 (resource not found) - app not available
* 200 (success) - app available
* 403 (forbidden) - app not available in your region or you're not authorized to access the resource

I've used the said information in the two solutions proposed here.

# Automation

I found Tasker (user guide) apt as well as flexible for the job. Details on trigger i.e. Profile would follow later. For the time being, follow these instructions for the core.

Create a task named App Status and create the following actions in it:

1. Code→ Run Shell

* Command: `pm list packages -3 -i | grep -e "com.android.vending" -e "com.google.android.feedback"`
    * Store Output In: `%Pkgs`
    * select Continue Task After Error

This will store the list of all the apps' package names installed from Play Store, into variable Pkgs. Remove

```
-i | grep -e "com.android.vending" -e "com.google.android.feedback"

```

from Command if you don't want to restrict the task to apps installed only from Play Store.
2. Variables → Variable Set

* Name: `%ret`
    * To: tap Enter key in your keyboard for once

I learned this step from the post here by plepleus. This step is needed because we intend to copy each line (has a package name of an app) from Pkgs into a separate variable. It is for ease of use.
3. Variables → Variable Split

* Name: `%Pkgs`
    * Splitter: `%ret`

This step splits Pkgs, makes an array of Pkgs and each line is assigned to an index of that array. Hence, the size of the array is the number of lines Pkgs had.
4. Variables → Variable Set

* Name: `%Count`
    * To: `%Pkgs(#)`

We're creating a variable named Count and assigning it the length of Pkgs array, for the purpose of looping.
5. Variables → Variable Set

* Name: `%Tmp`
    * To: `%Pkgs(%Count)`

Now that we're in a loop, we're storing the value assigned to a Pkgs's index into a new variable named Tmp. This step is needed because Tasker has limited functionality when dealing with complex variable names.
6. Variables → Variable Split

* Name: `%Tmp`

This step splits the line at whitespace and store the preceding and succeeding fields into Tmp1 and Tmp2. Tmp1 contains the package name among other things.
7. Variables → Variable Split

* Name: `%Tmp1`
    * Splitter: `:`

This step finally extracts the package name from Tmp1 and stores it into Tmp12. Note that if Tmp was not declared in action 5, we would have been forced to split %Pkgs(%Count)1 which is an invalid variable name for Tasker.
8. Net → HTTP Get

* Server:Port: `https://play.google.com/store/apps/details?id=%Tmp12`
    * Mime Type: `text/html`
    * select Continue Task After Error

This step queries the status of the app in Play Store and saves the returned HTTP code automatically in HTTPR.
9. App → Test App

* Type: App Name
    * Data: `%Tmp12`
    * Store Result In: `%Label`
    * select Continue Task After Error

This step finds the app's label from its package name and stores it in Label.
10. Variables → Variable Subtract

* Name: `%Count`
    * Value: `1`

This step decrements Count variable so that we can move to next cycle of loop.
11. Task → Goto

* Type: Action Number
    * Number: `5`
    * If: `%Count` `!=` `0`

This step finally implements the loop. When this action is executed it checks whether Count is 0 or not. We've assumed that all lines in Pkgs had package name so it amounts to reason loop should run until Count becomes zero, in which case, simply exit.

How you would like to be notified is I leave upon you to decide. Whatever you intended to do for the purpose of notifying yourself the status of an app in Play Store, **do it only between action 9 and 10.** As an example, you can setup App Status task to show a notification when an app is not found in Play Store. You can add the action: Alert → Notify:

* Title: Play Store: App not available
* Text: %Label
* Priority: 5
* If: `%HTTPR` `eq` `404`

You can use AutoNotifications to get around the Tasker's limited functionality of creating notifications.

Considering that a reboot causes loss of all received notifications, you can write the final output of the task into a file. Use the action File → Write File and use it in append mode. That's just an advice per Izzy's comment on the question. I won't be able to offer any help in this regard.

As for the Profile, choose any number of triggers you want. I recommend a time based trigger, but you can also opt to create a shortcut on home screen.

That's all for automation here.

# Command-line

I couldn't ignore command-line which makes the objective so easy to be achieved in this particular case.

## Dependencies

* Requires *busybox* binary. If you don't have it installed, refer to: How do I install missing command line tools onto an Android device?
* Requires *aapt* binary. If you're running a CM or its derivative ROM then ignore this requirement. Otherwise, for Android 4.x, you can consider downloading the binary from here. For the purpose of installing it in device, follow the root or non-root approach mentioned here, appropriately.

Android 5.x users: ask Google for assistance.

### My little script

```
#!/system/bin/sh
# Check if the busybox binary exists under /data/local/tmp/ or /system/xbin.
# Set the detected binary's path into the variable busybox or exit if file
# doesn't exist or executable permission is not set
if [[ -x /data/local/tmp/busybox ]]; then
    busybox=/data/local/tmp/busybox;
elif [[ -x /system/xbin/busybox ]]; then
     busybox=/system/xbin/busybox;
else
     date +'busybox binary not found or executable permission is not set. Exiting';
     exit;
fi

# Check if the aapt binary exists under /data/local/tmp or /system/bin or /system/xbin.
# Set the detected binary's path into the variable aapt or exit if file
# doesn't exist or executable permission is not set
if [[ -x /data/local/tmp/aapt ]]; then
    aapt=/data/local/tmp/aapt;
elif [[ -x /system/bin/aapt ]]; then
    aapt=/system/bin/aapt;
elif [[ -x /system/xbin/aapt ]]; then
     aapt=/system/xbin/aapt;
else
     date +'aapt binary not found or executable permission is not set. Exiting';
     exit;
fi

# List packages which were installed from Play Store  and store the package names under /sdcard/acc_assoc_packages.txt.
# Remove -i | grep -e "com.android.vending" -e "com.google.android.feedback" if you don't want to restrict the script to apps installed only from Play Store.
pm list packages -3 -i | grep -e "com.android.vending" -e "com.google.android.feedback" | $busybox sed 's/package://g'| $busybox awk '{print$1}' > /sdcard/acc_assoc_packages.txt
$busybox printf "List of installed apps not available in Play Store:\n\n" > /sdcard/rm_packages.txt;     # rm_packages.txt would show the list of apps not available in Play Store

# For each package name in acc_assoc_packages.txt, find whether the package is available in Play Store.
# If not, the HTTP return code would be 404 in curl's output. Use it for any processing you want.
while read line; do
    ID="https://play.google.com/store/apps/details?id=";
    ret_http_code=$(curl -skI $ID$line | awk 'FNR==1{print $2}');   # -s is for silent mode, -k is use ignore certificates for SSL connection, -I is to show only header information
    path=$(pm path $line | $busybox sed 's/^package://g');          # get location of APK of package. Required for finding app's label
    label=$($aapt d badging $path 2>&1 | $busybox sed -ne '/application: label=/p' | $busybox cut -d "'" -f2);   # Get app label using $path

    # If returned HTTP code is 404, write into rm_pacakges.txt the corresponding app label, package name and print to standard output.
    # Else simply print to standard output.
    case $ret_http_code in
        404)
            $busybox printf "Status: Not Available - $label ($line)\n";
            $busybox printf "$label ($line)\n" >> /sdcard/rm_packages.txt;
            ;;
        403)
            $busybox printf "Status: Not authorized to access resource - $label ($line)\n";
            ;;
        200)
            $busybox printf "Status: Available - $label ($line)\n";
            ;;
        *)
            $busybox printf "An unknown error occurred. Are we online?\n";
            exit;
    esac
done < /sdcard/acc_assoc_packages.txt

```

Save the script under `/sdcard` into a file named `app_status.sh` and run that file from a terminal emulator app in this manner:

```
sh /sdcard/app_status.sh

```

Demo output:

<sub>(Click image to enlarge)</sub>

# Shortcut

If you've *busybox* and *aapt* binary installed and working in device, you can drastically reduce the steps needs in App Status task.

Store the following script into a file named `app_status.sh` under `/sdcard`.

```
#!/system/bin/sh
pm list packages -3 -i | grep -e "com.android.vending" -e "com.google.android.feedback" | $busybox sed 's/package://g'| $busybox awk '{print$1}' > /sdcard/acc_assoc_packages.txt
$busybox printf "List of installed apps not available in Play Store:\n\n" > /sdcard/rm_packages.txt;

while read line; do
    ID="https://play.google.com/store/apps/details?id=";
    ret_http_code=$(curl -skI $ID$line | awk 'FNR==1{print $2}');
    path=$(pm path $line | $busybox sed 's/^package://g');
    label=$($aapt d badging $path 2>&1 | $busybox sed -ne '/application: label=/p' | $busybox cut -d "'" -f2);

      case $ret_http_code in
        404)
            $busybox printf "Status: Not Available - $label ($line)\n";
            $busybox printf "$label ($line)\n" >> /sdcard/rm_packages.txt;
            ;;
        403|200)
            # Intentionally left blank
            ;;
        *)
            $busybox printf "An unknown error occurred. We'll be victorious next time.\n" >> /sdcard/rm_packages.txt;
            exit;
    esac
done < /sdcard/acc_assoc_packages.txt

```

Now delete any action you have in the task and setup the following ones:

1. Code → Run Shell

* Command: `sh /sdcard/app_status.sh`
    * Store Output In: `%Pkgs`
    * select Continue Task After Error

This step will write into file rm\_packages.txt the entries as the apps not available in Play Store. This is the core action. The following actions are optional and meant only for the purpose of notifying yourself.
2. Task → If: `%Pkgs` `Set`
3. Alert → Notify

* Title: Check apps' status
    * Icon: optional
    * Priority: `5`
    * Actions: Action → App → Launch App → select a text editor app such as QuickEdit → Data: `file:///sdcard/rm_packages.txt`

Example notification:
> 11 votes

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


title: Which Stock Firmware for Galaxy S3

text:
# Question
Title: Which Stock Firmware for Galaxy S3
I'm in a situation where the Galaxy S3 I have is not connecting to Wifi (bug from Android 4.1). I would like to flash a new firmware. I am just confused on which one to use. Can I use any stock firmware as long as it has been made for the GT-I9300 or should I find one which is specific to the region of my phone?

If so, how can I detect the region of the phone?

Phone is unlocked and International version.

# Answer
* You should use the latest firmware pertaining to *your region and model only*
* Authentic source for all Samsung firmware is Sammobile. You will need to register(free) to download. If you want a faster download, there is a paid option. Make sure you select the right region
* For detailed information on Samsung devices (including region as asked) Phone Info Samsung is highly recommended. Developer of this app has an active thread at XDA
> 1 votes

---
Tags: samsung-galaxy-s-3, device-firmware
---


# Question
Title: USB debugging option greyed out in Samsung Galaxy J5 runing Android 5.1.1
As per the rule with a new Android, I have tapped build number 7 times for enabling Developer option. However, USB debugging is shown as greyed out and I cannot start it. Samsung Galaxy J5 comes with latest Android 5.1.1. I have also updated the software to latest version.

Can anyone suggest me what to do?

Here is a screenshot:

(Click image to enlarge)

# Answer
OK, here is I got the solution! there wasn't any bug or error in Android. It is because I have installed Samsung My Knox in my phone. Knox give an extra protection to device and also for some security reasons, Knox disabled USB debugging.

according to Samsung My Knox :

> **If you are using My KNOX, you cannot enable USB debugging mode while the container is installed.**

I have uninstalled Knox and now USB debugging is working properly!

There is another application named Samsung Knox Express which give you option for enabling USB debugging, but only System Administrator can install this application.
> 4 votes

# Answer
This worked for my Samsung Alpha: Enter \*#0808# in your phone's dialer. A new screen will pop up. There, select "MTP+ADB" option and tap OK.

(Click image to enlarge)
> 1 votes

# Answer
Try revoking the usb debugging authorisations. Then turn off developer options and restart your phone. Once your phone has turned on, enable developer options and then see if you are able to enable USB debugging
> 0 votes

---
Tags: 5.1-lollipop, usb-debugging, samsung-galaxy-j5
---


# Question
Title: Is it possible to update the backup android application file from playstore?
Is it possible to update android apk files saved on sdcard but are not installed. any application or any method if it is possible.

**Edit**
I just want upgrade the version of these files because in playstore only installed files can be upgraded.

# Answer
> 1 votes
An `.apk` file already contains a certain version of an application. You can't *update* it since updating already means installation of a higher version `.apk`.

---
Tags: applications
---


title: ssh: HOME variable issue

text:
# Question
Title: ssh: HOME variable issue
I'm in Cyanogenmod 13 and I'm having troubles getting ssh working properly.

Server:
With `AuthorizedKeysFile` commented in the `sshd_config` file, I get a weird path in logcat:

```
Could not open authorized keys '//.ssh/authorized_keys': No such file or directory

```

I set `AuthorizedKeysFile` and the server seems to work with no more problems.

Still I cannot get the client working:

```
root@i9300:/ # ssh 192.168.0.20
Could not create directory '/.ssh'.
The authenticity of host '192.168.0.20 (192.168.0.20)' can't be established.
ECDSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/.ssh/known_hosts).
Permission denied (publickey).

```

As you can see ssh is trying to create the directory `/`, and we all know that it is not possible.
All of this led me to the conclusion that there might be something wrong with the environment variable `HOME`.

Another piece of information:

```
root@i9300:/ # echo $HOME
/data
root@i9300:/ # su shell
shell@i9300:/ $ echo $HOME
/

```

Many thanks in advance for your help!

# Answer
Here is a solid workaround which requires a bit of work if you are not accustomed with the subject:
Edit `BOOT` partition.

In the `BOOT` partition (`boot.img`) are stored all the files that will be loaded in `/` at boot.
I added a symlink in it:

```
.ssh -> /data/.ssh

```

Here are two very helpful tutorials that will get you going:
HOWTO: Unpack, Edit, and Repack Boot Images
Android boot.img manipulation

a little hint:
Do edit the ramdisk in your Android device.
I spent three days in frustration trying to do so in my pc, I guess is a matter of "endianness".
> 0 votes

---
Tags: ssh
---


# Question
Title: "Android Pay is unavailable" on Note 2 running CM 12.1
I have a Samsung Galaxy Note 2 running the latest nightly of CM 12.1. I've installed the correct version of Gapps using OpenGapps Aroma installer. I have root disabled in developer settings, however, when I open Android Pay I get the following error.

Click on Image to enlarge

I looked up other ways to fix this problem on the internet but I could not find any solutions. The only other solution I found was to install the right version of Google Play store, but I also tried that to no avail.

Please let me know a way to solve this problem since I can no longer access the gift cards, loyalty cards, or credit cards I used to have on Google Wallet.

# Answer
Android Pay checks the operating system and if it's not stock Android, it will refuse to run. Some people have reported on that they have fooled the app into working by changing the default.prop file and others install a custom APK of the older version of Google Wallet. Otherwise, there's no way to run Android Pay on CyanogenMod or any other custom ROM.
> 1 votes

---
Tags: cyanogenmod, google-pay
---


# Question
Title: Is there a more efficient way to turn mobile hotspot on / off?
I'd like to reduce the number of steps needed to turn mobile hotspot on or off. Currently it's unlock, then five taps.

Galaxy Note 4, Android 5.0.1 Lollipop.

I did find this question, but it's from 2012 and a lot has changed since then probably.

# Answer
> 1 votes
I figured out a solution. Drag down from the top edge to reveal the "Notification Panel." Within the customization options for the Notification Panel there's a mobile hotspot shortcut (on my phone).

You can make that shortcut more prominent by adjusting the Notification Panel configuration.

---
Tags: settings, wifi-hotspot, mobile-data, app-widgets
---


title: Wifi on when phone is off?

text:
# Question
Title: Wifi on when phone is off?
See this pic

Is this normal or a bug or something?

It states wifi is active though The device is turned off...

Android 5 moto g2.

Ive disabled "find my phone" via moto and google (at least I think I have)

Thanks for ur time

# Answer
It looks like it just persisted the state that Wi-Fi was in when the device was shut off. Given zero power consumption in that period, there's no reason to believe that the device was actually on and transmitting data over Wi-Fi.
> 0 votes

---
Tags: wi-fi
---


# Question
Title: How to change the thumbs up icon in Facebook Messenger chat?
In Facebook Messenger in the web browser or the messenger app, there is a thumbs up sticker button out by default. People I know changed it to some other icons by default, but I can't ask them how.

I don't see any option for it, yet somehow it was changed. After you change it, it will say

> \<person name\> set the emoji to \<emoji here\>.

Can anyone tell me how to change it?

# Answer
Mine doesn't show the option of the I either - you have to go into a chat and click the persons name at the top - there it will give you the option to change color text and emoji :)
> 1 votes

# Answer
Using Facebook Messenger, at the conversation window, go to:

**Details (top-right) --\> Emoji --\> Pick your Emoji.**

There's no option to change Emoji using the web version yet.
> 4 votes

---
Tags: facebook, facebook-messenger
---


# Question
Title: Reboot touchphone without touching the screen
Sometimes touch screen on my phone is swithced off and does not switch on again. The phone is working, you can ring it, even the touch keys have light.

Can you say, it there a method how to reboot it not touching the screen?

My phone is I-Mobile IQ 5.5 (bought in Thailand). OS: Android 4.2.2.

I've searched the phone's manual, there is nothing about this topic.

I know there is a combination of keys from other manufacturers like Samsung, but as I said here there were no word about it in manual.

Maybe there is an app, which can help me reboot the phone by pressing several hard keys?

Now, I am just taking off the battery to reboot the phone.

# Answer
> 4 votes
Pressing and holding the phone's power button for a few seconds might do the trick.

It switches off my Android phones.

# Answer
> 0 votes
Total noob with this stuff myself, I have been reading around, Some applications given access like admin(?) , will have been allowed to install in critical locations to do the special tricks they do.
To fully remove these applications the special permission change made has to be disabled by the program first, then the program itself can be uninstalled.

If the program was allowed (the special permission) to make changes to critical section, then removed without the permission, it is possible for critical changes to be left. (source: fails done by commenters in google play store)
Anytime these high permissions are allowed, and these changes made, it should be turned back off first in the program, prior to uninstalling the program, or unexpected things could occur.

It is possible that a cool trick software has been installed, and forgotten, or not un-installed properly. Maybe an app that turns the screen on or off based on sencors or cameras , or phone or messages, like the proximity, or a shake , docking ? That the application has made changes, or even changes to more critical areas. Lock screen app, lock screen customiser, launcher , special trick home changes, there are hundreds of less documented tricks.

There are "safe Mode" ways of getting into the phones which keeps 3rd party items from operating, the https://android.stackexchange.com/search?q=safe+mode Android site has lots of information on it.
Also
The search of https://android.stackexchange.com/search?q=boot+loop Bootloop. We know you do not have a boot loop, but you still cant do much when this happens, so some of the boot loop information could be applied, which is this safe mode.

Different phones use slightly different methods for getting into the safemode, adding to the fun, finding an expert with the same phone might be a thing to do if you wanted to access safe mode.

# Answer
> 0 votes
My android LG phone had the same problem. I tried the power button, with no success. Then I took of the back cover and then removed the battery, then put it back in. Next, I held the power button down. This rebooted the phone back up. Hope this works for you, and good luck!

---
Tags: reboot
---


title: SMTP auth server settings

text:
# Question
Title: SMTP auth server settings
I'm using my own SMTP server with SMTP AUTH for sending mails. The greeting looks like:

> 250-\[...fqdn...\] Hello \[...fqdn...\] \[...ip...\], pleased to meet you
> 250-ENHANCEDSTATUSCODES
> 250-PIPELINING 250-8BITMIME
> 250-SIZE
> 250-DSN
> 250-AUTH CRAM-MD5 DIGEST-MD5
> 250-DELIVERBY
> 250 HELP

Unfortunately when configuring user name and password for SMTP (no TLS), Android 4.2 (the standard mail app of the Google/LG Nexus 4) does not seem to expect this: `authentication methods aren't supported by server`.

On the server, I see Android disconnecting after that greeting was sent.

What authentication methods are actually supported by Nexus 4's mail app?

# Answer
Probably a bit late to the party, but I'm recording this here for posterity. My wife's Xperia Z5 Compact (Android 5.?), as well as my own Samsung S3 (4.3) suffer from this same problem. I've pulled down the source code to the most recent email client, and it appears that the only authentication mechanisms that the native email client supports is PLAIN, LOGIN and XOAUTH2, otherwise the client comes up with the above error message. As noted in the OP, the mail server is only offering CRAM-MD5 and DIGEST-MD5, which the client doesn't support. I had to add PLAIN and LOGIN to my mail server (after enforcing TLS), at which point the stock mail client was happy.
> 3 votes

---
Tags: email, 4.2-jelly-bean, nexus-4, stock-email-app
---


title: switching my google account

text:
# Question
Title: switching my google account
so I have two Gmail accounts. I made one of them my account on my cell phone and then now, a year later, I switched to my other account. has anything happened? anything changed? and also, why do I need to be signed in with a google account in the first place? to get apps?

# Answer
> 0 votes
Nothing will be affected. when you login to.Your account your Google account gets synced and gets its self updated and yeah definitely you will be having large number of unread e-mails.You can also have multiple Google accounts running at the same time.

---
Tags: gmail, accounts
---


# Question
Title: Is there any way that I can see what is on a phone that has a cracked screen
My son was in a wreck and his phone was crushed is there any way I can find out what was on the phone if I connect it to my computer

# Answer
> 2 votes
Assuming the phone has no security lock enabled, you should be able to see the media it contains if connected to a computer. If it has a memory card, you can try and use it on another device.

Assuming the phone is synced to an online account, its contacts, messages, etc. may be accessed by visiting the account online through a computer, preferably.

The only other choice I see is to repair it.

---
Tags: broken-screen
---


# Question
Title: How to Store BTsync Data Files in SD Card?
The new BTsync 2.3 advertises that it has the feature of storing in the SD card of your Android \>=5.0. However, I cannot find such a setting in Settings of the application. There are two options which to do when having the card in CyanogenMod 13 when first time having SD card in the phone: use it as portable SD card or internally. I chose using as a portable SD card. However, I cannot now see any files in the portable SD card when looking the files with PC.

How can you store BTsync data files in SD card?

# Answer
> 0 votes
Answer from the BTsync support

> Did you disable 'Simple mode" in Sync settings -\> advanced? If yes, then after scanning a QR code from another peer, to which you want to connect, Sync will ask you to pick folder location, and it's here where you'll be able to pick SD card. Please see detailed guide here.
>
> Else, you can start sharing from the mobile - tap on "=" icon -\> add folder and pick a folder from the SD card, share it with other peers. Detailed guide is here.

where disabling the Simple mode is the trigger to solve my case. Then Settings \> Default folder location and you are able to change to SD card.

---
Tags: sd-card, storage, btsync
---


# Question
Title: Connect usb cable and waiting for device problem in bootloader
I wanted to unlock the bootloader for my motorola moto g 3rd gen.

I get to the step where I put my phone into fastboot mode. On the bottom of my screen in fastboot mode, it says 'connect usb data cable' – when my usb is already connected.

I tried `adb kill-server` and `adb start-server` but it never helped. I also tried changing ports, cables and even tried `adb devices` command every ten seconds. None of these worked.

On the PC in *Device Manager* I can see my device as adb. I have tried many things, but am out of ideas now. Please, can someone help me with this?

# Answer
> -1 votes
I'm not entirely sure if it matters in fast boot but to use Aden services normally you need to enable USB debugging in developer options, start the server, then in another terminal type `adb usb`. This listens to USB ports and checks for any open connections. Also, some phones don't like it but my nexus requires unmounting before I use adb.

Hope this helps.

---
Tags: rooting, bootloader, motorola
---