text:
My device is encrypted. Does flashing a new software ruin it? Can I get the decryption key of my device?
I have Lollipop 5.11 (Note 4), and I have the device encrypted.
Will flashing CWM or TWRP or a new software (like Marshmallow) ruin my phone?
I would like to add the device is still not rooted.
Also one more question, is it possible that I can get the decryption key of my phone as a file for emergencies?

Full disk encryption only encrypts data partition. Recovery partition remains out of the reach of encryption. Dirty flashing an OS may or may not ruin the device. It can't be guaranteed.

@Firelord What do you mean by Dirty Flashing? I plan to flash with stock roms only (apart from root requirements).

Dirty flashing means flashing a ROM without wiping out cache and data partition.

@Firelord Thanks for the info. So for flashing I MUST wipe my data partition? Even if I just want to flash the boot loader with CWM or TWRP?

No. If you intend to flash a recovery then there is no need to touch anything other than recovery partition. I'm not sure but is the bootloader of your device unlocked? If not, then unlocking a bootloader would trigger a wipe of data partition.

@Firelord Actually KNOX is already there and I'm planning to trip it. Are you saying that flashing CWM or TWRP will destroy my data?

I don't know how Samsung devices function when it comes to flashing so that's all I could offer. I would suggest you wait some time for others experienced with Samsung devices to chime in.

@Firelord Thanks a lot! I appreciate you providing what you know :-)

@TheQuantumPhysicist Here I am. So, I can confirm that triggering the KNOX flag does not destroy your data. If you make use of the KNOX app embedded into a stock Samsung firmware, though, said app (and anything that mentions KNOX) will become unusable.

What carrier is your Note for?  I don't think all US carriers have unlocked bootloaders.  I personally nearly bricked my Developer Edition Galaxy S5 because I accidentally left "Reactivation Lock" enabled.
If your data partition is encrypted, I would strongly suggest you take due care and unencrypt it if possible and make a backup of your data before you proceed.
Being a Samsung, I think you will need to use TWRP, but I suggest joining the forums over at XDA.  There are a huge number of posts and input concerning rooting and loading custom ROMs over there.  It's what they do.
Rick

Thanks for the response. It's not from a specific carrier... I bought the phone over eBay Germany. It's a N910C. Does that say anything?


text:
How to move SMS from hangouts to messenger app
My Nexus 6p has 2 messaging services. Google Hangouts and the stock Google messenger app. I usually use the Google messenger app to send SMS, but the problem is that the message they respond with always comes through the hangouts app. Is there any way to change that so that all SMS always comes from the messenger app?
OS: Android 6.0.1
Carrier: Google Project Fi
(The phone is not rooted)
Any help would be much appreciated

Open your settings App and search for the Apps entry in the first page.

In Apps, tap on the wrench icon at top right to open Advanced / Configure Apps.

Select Default Apps under Advanced

Select SMS App and select the default app of your choice.

Alternatively, you can select Settings ––> Default SMS App to change it.

Devin, I am not extremely familiar with stock Android, so I apologize if some of what I try to describe does not work exactly as I try to explain it.
The SMS messages on your phone is maintained in a single database.  That means you can use different messaging apps for SMS and the message "streams" or "history" stays the same regardless of the SMS app you use.
Within Android, you can decide which app is your default messaging app and by doing so you are saying which one will show you incoming messages.
You can change this default behavior by going into your phone Settings app and then Applications.  Inside that, there should be an option labelled Default Applications (I use a Galaxy, so it might be slightly different).  Inside Default applications, there should be a listing for Messaging App and your default SMS app listed.  I will assume that it is Hangouts.  You can tap that and change it to another app - and choose Google Messages.  You will still be able to use Hangouts for sending SMS messages, but incoming SMS notifications will by default show up in the Google app.  Also, you may need to disable SMS notifications within the Hangouts app so you don't get multiple SMS notifications for each incoming text message.
Hope this helps.
Rick

This is exactly correct.  On a Nexus with 6.0.1 it's Settings->Apps, tap the Settings menu icon, which takes you to the Configure apps screen.  From there, click on Default Apps, and then it looks like this: http://imgur.com/a/sp1FC

Go to Hangouts and either check or uncheck the option  for using Google Fi as the SMS in the sub-options level.  If you have it checked then the messages will go to FI's SMS system which is not integrated.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Fastboot saying "Unsupported command"
Hey guys i just rooted my Motorola Droid RAZR (HD) with kingroot and i want to install CM 12.1 nightly. Before i proceed, i need to unlock my bootloader. After sitting infront of PC for 3-5 hours now, i finally give up.
I downloaded Android SDK + fastboot. Enabled USB debugging and booted phone in fastboot mode. The problem is, when i try the oem commands, get_unlock_data for instance, it says "unsupported command". I am really sick of it, i need serious help.
Any alternatives to get unlock data or unlock bootloader would be appreciated.

Are you sure you've typed the correct commands for your device?

Does the Droid Razr HD unlock that way?!?! I thought you had to use an exploit to unlock the bootloader such as Motopocalypse, like described here http://forum.xda-developers.com/showthread.php?t=2783912

AndroidDev yes i typed that command like 100 times.
@acejavelin i am looking into that thread, any other alternatives would help a lot.

The Droid Razr HD cannot be unlocked using the standard Moto unlock procedure from there website, the only known way of unlocking the bootloader after root is achieved is via Motopocalypse written by Dan Rosenberg and available from his blog site here.
The basic jist of it is from the link above is:
Instructions
The tool may be downloaded here. It may be used as follows:

Extract the entire contents of the zip file.
If you are using Windows, ensure you have installed the latest Motorola USB drivers available for your phone.
Ensure your device has been rooted and you have a working installation ofsu.
Ensure USB Debugging mode is enabled on your device.
If you are using Windows, navigate to the extracted directory and execute run.bat. If you are using Linux or OS X, navigate to the extracted directory in a terminal and execute ./run.sh.

You may also be interested in the RazrHD Toolkit 5.0 which can automate some of the processes involved, but I generally recommend doing it manually, so if something goes wrong you can see what happens and potentially correct the issue. All in one tool kits tend to mask the processes, which if they work is fine, but if there is a failure it can be very difficult to diagnose and correct.

i tried that, it stucks at "getvar:all FAILED (remote: unsupported command)" same as what happens at manual fastboot command line. I think i am doing something wrong. I granted ADB the root permissions, followed every step.

@user3762712 At this point I would go to XDA and post in the Moto Razr HD Q&A area then, or at least research there. http://forum.xda-developers.com/droid-razr-hd

Alright thanks for your time, i'll start a thread there. Meanwhile, i will look forward for a solution here as well.

I did this, was able to get to recovery mode using safestrap, it did not install CM 12 at first, said FAILED, then i downloaded CM 10 (stable) and it gave same error, i restarted phone and its now at login loophole, i am scared i cant even get to safe mode, i can only get to fastboot by giving 10-15 tries, please help.

@user3762712 Did you backup in recovery before flashing CM? If so, restore the backup... If you didn't I'm afraid I've never had that problem and no longer have access to any older Razr phone to guide you. I suggest going to XDA for assistance unless someone else here can help.

i did it using safestrap, i did process till 100 in flashing. But i dont know how to recover it. I repeat, i can only get to fastboot mode.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
What's the difference between these two volume bars in Android Marshmallow?
What's the difference between the top volume bar (squiggle) and bottom volume bar (bell)?

I think they both have something to do with notification volume, and most of the time changing one also changes the other. I am running Cyanogenmod 13 (but I don't think it is a Cyanogenmod-specific feature).

Are you using a theme? Can you revert to stock theme and then post a screenshot? Stock Android 6 doesn't show four bars and CM13 doesn't show that squiggle. Instead, it shows the ringer volume. What does Settings -> Sounds gives? I think you have notification and ringtone volumes linked as well.

I was using blakZent theme, after reverting to the stock theme the top bar shows a ringing phone instead of a squiggle, which makes things much clearer. You're right, in Settings -> Sounds, there is a toggle 'Link ringtone & notification volumes', which I had switched on. Thanks!

I think one is ringer or notifications, the other (music note) is probably media volume.

It appears from the screenshot that a theme is in place with its own set of icons. Stock Android Marshmallow doesn't show four but only three bars. The extra one CM shows is for notification volume. Anyhow, a theme alters the icon but not the order of bars. You can always revert to stock theme or icons and get this result:
(Click an image to enlarge it)

First bar      : Ringer volume
Second bar : Media volume
Third bar     : Alarm volume
Fourth bar   : Notification volume

If you don't intend to revert the theme icons, then head over to Settings app → Sounds and behold the meaning of icons yourself:


text:
How to unbrick phone when both recovery and system are abcent?
I have Lenovo A328 phone, after trying to upgrade to cyanogen it has no system and no recovery, when turning it on there is only loading screen. ADB asks to authorize the phone, but no dialog appears on the phone's screen.

I hate to be the one to break it to you, but you sound like your phone is dead and buried. Does it have Fastboot?

I was a bit wrong, it appeared that i had no system and no bootloader (through which I used to launch recovery). I held both volume buttons and sticked usb cable during this - and it helped.


text:
Is google location history accurate
my girlfriend's location history show her places on different days that she swears she had not been to. I
s this info accurate

It depends. It will be dependant on how you have your GPS Settings set.
One option gives precise mobile position. The other will fluctuate a bit to correspond with the cell phone tower the phone is pinging.
For example my phone on 4G will sometimes display my location is Orange City which is about 8 miles from where I actually am. But if I do a search to find my phone, it will show me as my actual location.

That's correct, although Google says that I'm more than 100km away from my real position.


text:
Are there any Google devices that support file based capabilities in their default kernel?
If I systemless root (no modification done to /system partition) a Nexus device, would I be able to able to set capabilities on executables without changing the original kernel binary ?
I often want to manage files without restrictions from my terminal (requireCAP_DAC_READ_SEARCH). However, I also want to not use the superuser.
The required things are tools for setting caps along kernel support for using them (it doesn't rely on other user space things).
The problem is, I don’t own such device. So I can’t tell if it would work on any of Nexus 5X Nexus 6P Nexus 9 Pixel C.

I was also unable to find a nexus emulator…

I doubt it... Since Android uses Bionic libc and not the standard GNU libc (glibc) library, it is not even close to POSIX compliant. You might be able to compile your own kernel with a different libc like CrystaX NDK instead of Bionic, but I don't know if those features are in that either.

@acejavelin : the userland part is only required for setting extended attributes containing capabilities. Everything else is kernel side. I just noticed the/system/bin/pingcommand isn’t setuid on my real samsung device, suggestingCAP_NET_RAW. However, I won’t root a real device and I don’t know which tool I can use to see the relevant informations, so I can’t check.

Why would you not root a Nexus device? It is intended for that and does not void your warranty. It is very simple to restore any Nexus device to it's default, unrooted and locked state, the device is basically unbrickable.

@acejavelin : I don’t own a nexus device… My aim is security research and google only reward for it’s own devices. So I need to know if the kernel of one of the devices in my question support using capabilities xattr. What I’m seeing on my galaxy tab is probably only samsung related. If I don’t involve rooting in my question it might be closed as unclear.

OK, I thought from your question's verbiage that you had one but wanted to know if it also worked on all other Nexus models. I misunderstood that this was just a hypothetical or research question.

@acejavelin : I wroteThe problem of course is I don’t own such device.In my question.

Though the question is old, it keeps on appearing on top of Unanswered (my tags) questions. So I think I should answer this :)
AOSP'S SUPPORT FOR CAPABILITIES:
Question is specifically about Google devices, I have never used a Google device. However what I can say for sure is that Linux (process) capabilities must have been enabled on most of the devices (if not all) running as low as Android 1.6. Reference is found in init and system_server, both very primary components of AOSP. In Android 4.2, for instance, installd - another core component - was made to run with dropped capabilities.
Filesystem capabilities were one of the major Security Enhancements in Android 4.3 which removed set-uid/set-gid from binaries like run-as, setting file capabilities on them. This caused revolutionary changes in Android's rooting journey.
Support for Ambient capabilities was added in Android 8 which discourages the use of file capabilities:

File capabilities, in turn, present a security risk since any process executing a file with file capabilities will be able to gain those capabilities.

Many init services depend on them e.g. storaged, including my own sshd and dnscrypt-proxy services.
KERNEL'S SUPPORT FOR CAPABILITIES:
Coming to the kernel part, building kernel without capabilities isn't optional:

From kernel 2.5.27 to kernel 2.6.26, capabilities were an optional kernel component, and could be enabled/disabled via the CONFIG_SECURITY_CAPABILITIES kernel configuration option.

And:

In kernels before Linux 2.6.33, file capabilities were an optional feature configurable via the CONFIG_SECURITY_FILE_CAPABILITIES option. Since Linux 2.6.33, the configuration option has been removed and file capabilities are always part of the kernel.

The oldest common kernel version on Android repositories is 2.6.39 which includes support for file capabilities too.
Support for filesystem capabilities on kernel side must have been delayed from some OEMs but they had to switch, because otherwise functionalities would break. For instance surfaceflinger (Android's surface composer) won't work without file capabilities since Android 7.1.
Mainline Linux kernel 4.3 was patched in in Sep'15 for Ambient (process) capabilities, backported to Android kernel 3.18 and 4.1 in 2016. So they are necessarily a part of kernel.
CONCLUSION:
On Linux distros, a very few programs make use of Linux capabilities. Though there is pam_cap, mostly (or all?) distros still use set-uid on su, sudo, ping, mount, passwd and so on.  But on Android capabilities are deeply integrated in framework and core services. Removing them would require editing hundreds or may be thousands of lines in AOSP and kernel source. It makes no sense that an OEM (particularly Google, who developed AOSP and modified Linux kernel for Android) doesn't make use of this free-of-cost security feature when it's readily available in Android kernel. It's a pure OS related feature, doesn't demand any extra hardware support. So any phone from any manufacturer must have capabilities supported.

QUESTIONS:

would I be able to able to set capabilities on executables without changing the original kernel binary?

Yes, you must be.

The required things are tools for setting caps ...

I have been using capsh, getcap, setcap, getpcaps from libcap and netcap, pscap from libcap-ng without any problems. But I prefer Ambient capabilities, those are easy to configure and don't depend on any filesystem features like Extended Attributes as in case of file capabilities. You can also use listxattr, getxattr, setxattr and removexattr tools from xattr_syscall_wrapper to manipulate security.capability or any other XATTR directly.
From your comment:

I just noticed the /system/bin/ping command isn’t setuid on my real Samsung device, suggesting CAP_NET_RAW

Android's ping neither has set-uid nor CAP_NET_RAW. It creates a special non-RAW socket IPPROTO_ICMP which - unlike IPPROTO_RAW - doesn't require any privileges.

FURTHER REFERENCES:
In addition to 10+ references given above, here are a few other parts of AOSP code supporting and making use of Linux capabilities:

Core components: Bionic libc, init, trusty (OS)
External components: libcap, libcap-ng
Daemons / services: zygote (forked apps and system_server), hostapd, wpa_supplicant, dnsmasq, logd, netd (NetLink manager, private DNS), debuggerd (test), sdcard daemon, performanced, incidentd, mtpd, traced_probes (perfetto), racoon (IPSec), wificond, a number of HAL daemons including rild.
Executables: reboot (init), dumpstate, tcpdump, strace, iputils (ping, traceroute etc.)
Minijail: A dedicated sandboxing tool and library which revolves around capabilities. adbd makes use of this library to drop privileges.
SELinux uses capability class to grant / deny capabilities to domains.

It concludes that Android highly depends on Linux capabilities, it's not a little-used feature.

RELATED:

What special privileges “/system/xbin/su” does have w.r.t. root access?
Permissions, Root User and Linux Capabilities: Linux vs. Android

Doesn’t answer anything at all. Everything you stated is known. The point of the question is since it’s little‑used is wether Google branded devices include it.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Cmd / windows key with Chrome Remote Desktop
I am trying to use Chrome Remote Desktop on a tablet with Android 5.1.1 to remotely access my work iMac. I have a Bluetooth keyboard, and the problem is that I'm unable to use the cmd key on my Bluetooth keyboard to do things like cmd-c or cmd-tab when connected to the iMac, which make the whole thing practically unusable.
I suspect that Android is intercepting this key for a feature I've seen referred to as "Quick Launch", so Chrome Remote Desktop maybe doesn't even know I pressed that key. Is there a way on Android for the cmd key to "work, so I can do things like cmd-c and cmd-tab in Chrome Remote Desktop? If not, is this possible with another "remote desktop" app, or is that a limitation of the OS?


text:
How to hard reset tablet with partially unresponsive screen?
I am facing an issue with the display of my LG Gpad 8.3, running latest Android available for that model: 4.2.2.
Background
My issue appeared after installing an app which was not from the PlayStore. The app has no icon and can not be removed, that's why I am inclined to believe that in my case it is not an hardware issue (but I am not ruling it out completely).
Besides that the unresponsive strip occurs exactly on the area where the confirmation dialog boxes for this OS appear.
I noticed that this issue has been discussed previously here and here in SE but the problem there occurs to be hardware related.

What I have done so far
Luckily my tablet is not something I use daily. Most of the time it stays in the drawer and turned off. So I have no fear of losing any data in case of hard-reset, although I feel the malware might access my google account data.
Anyways, I tried to hard reset the tablet using the standard LG tools & key combinations, as explained here: http://www.lg-phones.org/how-to-flash-unbrick-lg-g-pad-8-3-back-to-stock.html
The installation completes, but the "malware" remains in the system.
On top of that the CSNin Settings --> About Phone --> Hardware Information is broken. It shows all 0.

Last resort
I think the only option I have is to use a "dirty way" of wiping the phone and reinstalling the OS.
What should I use in that case?
Or, do you have a solution for this exact problem?
Edit:
Some additional information:

I think my phone is not rooted because I reverted it back to stock couple of months ago, due to camera issues. I tried the bootloader combinations, none worked.

UPDATE:
After all, I think the problem might not be related to the malware :/. It might well be a hardware issue.

I formatted the device and reverted back to an older version of the stock rom. The unresponsive strip is still there.
I rooted the device and installed TWRP, just to see whether the unresponsiveness will remain in the TWRP menu. Unfortunately it did.

Remaining Options:

Wiping everything in the phone using TWRP, but I don't know how to do this.
Installing a new OS; one that is modified.

Important: The CSN is still all 0s, as shown in the picture.

Somewhat unrelated: A friend of mine had really similar problem with the screen. Try installing something like this https://play.google.com/store/apps/details?id=org.crape.rotationcontrol&hl=en_GB to rotate the screen 180' and possibly click everything again  (one orientation or the other)?
Moreover if you tried going back to stock, from the link, this should have fixed your problems ... Try installing a different version of android (if available) or different rom.

What's the app you installed that's causing all this ?

Another thing you can try is SYstem app remover (Even if you don't have root, you should be able to get some, but judging by how this app behaves, I'm guessing you are rooted) and see if your app is in that list ...

Dear @ИвоНедев, the interesting thing is that going back to stock did not solve the problem... that't where I am stuck. I would like to install something else but I don't know how to do it. The app I installed was from some shady website, I tried to locate it but could not find. And, I don't think I have root... Can you please submit an answer providing resources for the steps you suggest?

If you don't have root, then no app can be that harmful, even after Hard Reset ... Download Root Checker from the market and see if you are rooted or not. It really might be hardware issue.

I received Sorry, root not properly installed on this device... What could be the problem now?

@ИвоНедев it is the CSN which makes me believe it still is a software problem


text:
Internal storage management of files and folders
My Xiaomi phone stores some folders inside internal storage (cannot store app data to external) after installing some apps. And, when that app is uninstalled, these folders remain there. Also, I can see several files ( may be system files) with and without extension other than app folders. Cleaner application also not clearing folders and files.

Why these folders are not automatically get removed, during uninstall?
Whether files,that have no extension and with extension, creates slow down of device?

Without a list of your internal storage content, it's hard to discern useless files from useful ones. Without further info, the only answers I can give you are the following:

When you uninstall an app, the system deletes the trees corresponding to the app's package name under /data/app/ (application executable) and /data/data/ (application's internal data). It should also wipe some folders into your internal and external storages, namely those corresponding to the app's package name, and placed under Android/data/. Any other folder, created by the app in a path different from the abovementioned gets ignored.
It may depend. Generally, those which slow down badly your device are files which are big in size. Since, as already said, they're not cleaned by the system, that's a burden that falls on you, the user.

As a footnote, the files residing in an internal storage are not fundamental (and I remark that I'm talking about files, not folders). Generally, they can be files which are placed there by an app for the purpose of flag, meaning that said app looks if such file is present, and performs something. Else, it does something else.
Finally, if you delete any of these files, they may be regenerated, if the app that created them is still installed.

You missed Android/obb/ for those apps (games?) which need APK expansion files. They are also arguably the largest app-related files.

@TamoghnaChowdhury Thanks for the input! Actually, I just tested this hypothesis, and it seems that the content corresponding to the app, under Android/obb/, didn't get wiped.

Odd. It normally does get wiped (personal experience). Your device and Android version, and the apps you tested are?

@TamoghnaChowdhury Samsung Galaxy S4 Mini, powered by CM12.1 Snapshot. App tested: DQ6


text:
Why doesn't my Whatsapp group show in my contacts?
I am new to Whatsapp Messenger.
I have contacts in my address book.
I have been added as a member into a GROUP, why doesn't the group appear in my contacts please the same as my contacts do?
Many thanks

Check this link for more info :https://www.whatsapp.com/faq/en/general/21073373

Whatsapp does not have an option to display the group in the contacts list.
Whatsapp has the feature to show in which group does the contact is under his profile(and common with you and the contact)

Whatsapp does not have a separate pane to show the groups however if you want to see all your groups listed just like contacts, just select a message from any chat then go to "Forward" option. There you will see a separate pane for groups where you can find all your groups listed just like your contacts.

Is this still relevant for new updates?

Yes it is. There is still no standalone view for groups and this workaround is perfectly valid

I couldn't find this, is this removed in the new version?


text:
Add custom search engines on Chrome for Android
One of the most powerful productivity tools I use on Chrome is custom search engines. However, I was wondering how I can do the same thing on Chrome for Android?
I went through the settings on Chrome for Android, but understandably it doesn't have that feature. Ideas?

According to the sources, the option is reported by a few users for it. And hope so it would be released in future updates.
As of now, it is not possible to change the default search engine in Android.

do you have a reference?

its open in google forums asked similar to you by fans of chrome

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
android boot with forceencrypt take a long time
I am building cm-13.0 for oneplus bacon here. I want the ROM to encrypt on first boot, so I changed the flag in Android fstab file (device/oneplus/bacon/rootdir/etc) from encryptable to forceencrypt.
Before:
/dev/block/platform/msm_sdcc.1/by-name/userdata     /data           ext4    noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,errors=panic wait,check,formattable,encryptable=/dev/block/platform/msm_sdcc.1/by-name/reserve4
/dev/block/platform/msm_sdcc.1/by-name/userdata     /data           f2fs    noatime,nosuid,nodev,rw,inline_xattr                            wait,check,formattable,encryptable=/dev/block/platform/msm_sdcc.1/by-name/reserve4

after:
/dev/block/platform/msm_sdcc.1/by-name/userdata     /data           ext4    noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,errors=panic wait,check,formattable,forceencrypt=/dev/block/platform/msm_sdcc.1/by-name/reserve4
/dev/block/platform/msm_sdcc.1/by-name/userdata     /data           f2fs    noatime,nosuid,nodev,rw,inline_xattr                           wait,check,formattable,**forceencrypt**=/dev/block/platform/msm_sdcc.1/by-name/reserve4

and it worked, but the first boot took more than 2 hours. And I read on android development site (https://source.android.com/security/encryption/index.html)

What we’ve added for Android 5.0 Created fast encryption, which only
encrypts used blocks on the data partition to avoid first
boot taking a long time. Only ext4 and f2fs filesystems
currently support fast encryption. Added the forceencrypt flag to
encrypt on first boot.

How can I avoid this long boot time?
Note: if I keep the flag "encryptable" and boot the device then go to Settings -> security -> encryption and click encrypt, it will take less than 7 minutes for the process to finish. Why is it so long?


text:
How to get to know via command-line/adb where boot process hangs?
Question:
(How) is it possible to get to know via adb where exactly a booting-up android device is hanging?
My problem/ background information:
I recently did changes on the automatic display brightness threshold settings, and while doing the device just did "reset" itself (rebootet), and is stuck with showing the boot animation.
I see that the automatic display brightness works.
I can connect with adb via USB and have full shell access.
Logcat also spits out a lot of things.
When I try to start trebuchet manually with am start -a android.intent.action.MAIN -c android.intent.category.HOME com.cyanogenmod.trebuchet, I get
Error type 2
android.util.AndroidException: Can't connect to activity manager; is the system running?
        at com.android.commands.am.Am.run(Am.java:100)
        at com.android.commands.am.Am.main(Am.java:81)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
        at dalvik.system.NativeStart.main(Native Method)

Can't connect to activity manager; is the system running? also appears when I try to play around with am in other ways.
So I deduce the device did not finish booting up and hangs somewhere. For fixing it, I first need to find out where. Then there might be a follow-up question how to understand and fix it, depending what the problem is.
I wiped dalvik cache and cache-partition from ClockWorkMod, after that it does the usual "optimizing apps", but when finished still does not complete booting and showing the boot animation.
I am not familiar with the Android boot process, is there any good information on it suitable for people familiar with the internals Unix boot process (Linux, sysvinit, openrc, in my case)? Is there a way to do a verbosely logged boot process?
Device information:
It's a Sony sk17i (marketing name "Xperia mini pro"), running Cyanogenmod 10.1-extended which is based on Android 4.1.2 and nAa kernel 2.6.32.60.
getprop and uname outputs:

getprop ro.build.version.release: 4.1.2
getprop ro.build.version.sdk: 16
getprop ro.product.model: Xperia Mini Pro
uname -r: 2.6.32.60-nAa-01
getprop:
[BUILD_UTC_DATE]: [0]
[com.qc.hardware]: [true]
[com.qc.hdmi_out]: [false]
[dalvik.vm.dexopt-flags]: [m=y]
[dalvik.vm.heapgrowthlimit]: [48m]
[dalvik.vm.heapsize]: [128m]
[dalvik.vm.heapstartsize]: [5m]
[dalvik.vm.lockprof.threshold]: [500]
[dalvik.vm.stack-trace-file]: [/data/anr/traces.txt]
[debug.camcorder.disablemeta]: [1]
[debug.composition.type]: [gpu]
[debug.mdpcomp.logs]: [0]
[debug.sf.hw]: [1]
[gsm.current.phone-type]: [1]
[gsm.sim.operator.alpha]: []
[gsm.sim.operator.iso-country]: []
[gsm.sim.operator.numeric]: []
[gsm.version.ril-impl]: [Qualcomm RIL 1.0]
[hwui.disable_vsync]: [true]
[hwui.render_dirty_regions]: [false]
[init.svc.adbd]: [running]
[init.svc.akmd8975]: [running]
[init.svc.bootanim]: [running]
[init.svc.compcache]: [stopped]
[init.svc.console]: [running]
[init.svc.dbus]: [running]
[init.svc.debuggerd]: [running]
[init.svc.drm]: [running]
[init.svc.hw_config]: [stopped]
[init.svc.installd]: [running]
[init.svc.keystore]: [running]
[init.svc.media]: [running]
[init.svc.netd]: [running]
[init.svc.netmgrd]: [running]
[init.svc.qmuxd]: [running]
[init.svc.ril-daemon]: [running]
[init.svc.servicemanager]: [running]
[init.svc.surfaceflinger]: [running]
[init.svc.ueventd]: [running]
[init.svc.vold]: [running]
[init.svc.zygote]: [running]
[keyguard.no_require_sim]: [true]
[net.bt.name]: [Android]
[net.change]: [net.qtaguid_enabled]
[net.hostname]: [sk17i-netzclub]
[net.qtaguid_enabled]: [1]
[net.tcp.buffersize.default]: [4096,87380,704512,4096,16384,110208]
[net.tcp.buffersize.edge]: [4096,26280,35040,4096,16384,35040]
[net.tcp.buffersize.evdo]: [4096,87380,563200,4096,16384,262144]
[net.tcp.buffersize.evdo_b]: [4096,87380,704512,4096,16384,262144]
[net.tcp.buffersize.gprs]: [4096,8760,11680,4096,8760,11680]
[net.tcp.buffersize.hsdpa]: [4096,87380,704512,4096,16384,262144]
[net.tcp.buffersize.hspa]: [4096,87380,704512,4096,16384,110208]
[net.tcp.buffersize.hspap]: [4096,87380,1220608,4096,16384,393216]
[net.tcp.buffersize.hsupa]: [4096,87380,704512,4096,16384,262144]
[net.tcp.buffersize.lte]: [4096,87380,1220608,4096,16384,563200]
[net.tcp.buffersize.umts]: [4096,87380,563200,4096,16384,110208]
[net.tcp.buffersize.wifi]: [524288,1048576,2097152,262144,524288,1048576]
[persist.chargemon.active]: [1]
[persist.radio.adb_log_on]: [0]
[persist.radio.net_pref_0]: [0]
[persist.radio.nitz_lons_0_0]: [<CENSORED>]
[persist.radio.nitz_plmn_0]: [<CENSORED>]
[persist.radio.nitz_sons_0_0]: [<CENSORED>]
[persist.radio.sma_voice_3gpp]: [0]
[persist.ro.ril.sms_sync_sending]: [1]
[persist.service.zram]: [18]
[persist.sys.country]: [DE]
[persist.sys.hdcp_checking]: [never]
[persist.sys.language]: [de]
[persist.sys.localevar]: []
[persist.sys.profiler_ms]: [0]
[persist.sys.purgeable_assets]: [1]
[persist.sys.root_access]: [3]
[persist.sys.strictmode.visual]: []
[persist.sys.timezone]: [Europe/Berlin]
[persist.sys.usb.config]: [mass_storage,adb]
[persist.sys.use_dithering]: [0]
[ril.ecclist]: [112,911,112]
[rild.libargs]: [-d/dev/smd0]
[rild.libpath]: [/system/lib/libril-qc-1.so]
[ro.allow.mock.location]: [0]
[ro.baseband]: [unknown]
[ro.board.platform]: [msm7x30]
[ro.boot.emmc]: [0]
[ro.boot.hardware]: [semc]
[ro.boot.serialno]: [BX902GVWR3]
[ro.bootloader]: [unknown]
[ro.bootmode]: [unknown]
[ro.build.characteristics]: [default]
[ro.build.date.utc]: [1370165795]
[ro.build.date]: [Sun Jun  2 02:36:35 MST 2013]
[ro.build.description]: [SK17i-user 4.0.4 4.1.B.0.587 tL1_3w test-keys]
[ro.build.display.id]: [cm_mango-userdebug 4.1.2 JZO54K eng.M66B.20130602.023102 test-keys]
[ro.build.fingerprint]: [SEMC/SK17i_1254-2184/SK17i:4.0.4/4.1.B.0.587/tL1_3w:user/release-keys]
[ro.build.host]: [iof303]
[ro.build.id]: [JZO54K]
[ro.build.product]: [mango]
[ro.build.tags]: [test-keys]
[ro.build.type]: [userdebug]
[ro.build.user]: [M66B]
[ro.build.version.codename]: [REL]
[ro.build.version.incremental]: [eng.M66B.20130602.023102]
[ro.build.version.release]: [4.1.2]
[ro.build.version.sdk]: [16]
[ro.carrier]: [unknown]
[ro.cm.device]: [mango]
[ro.cm.version]: [10-20130602-UNOFFICIAL-mango]
[ro.com.android.dataroaming]: [false]
[ro.com.android.dateformat]: [MM-dd-yyyy]
[ro.com.android.wifi-watchlist]: [GoogleGuest]
[ro.com.google.clientidbase]: [android-google]
[ro.com.google.locationfeatures]: [1]
[ro.config.alarm_alert]: [Hassium.ogg]
[ro.config.notification_sound]: [Deneb.ogg]
[ro.config.ringtone]: [Orion.ogg]
[ro.debuggable]: [1]
[ro.emmc]: [0]
[ro.factorytest]: [0]
[ro.goo.developerid]: [M66B]
[ro.goo.rom]: [Xtended]
[ro.goo.version]: [1370165462]
[ro.hardware]: [semc]
[ro.hsdpa_cat]: [8]
[ro.modversion]: [10-20130602-UNOFFICIAL-mango]
[ro.opengles.version]: [131072]
[ro.product.board]: [mogami]
[ro.product.brand]: [SEMC]
[ro.product.cpu.abi2]: [armeabi]
[ro.product.cpu.abi]: [armeabi-v7a]
[ro.product.device]: [mango]
[ro.product.locale.language]: [en]
[ro.product.locale.region]: [US]
[ro.product.manufacturer]: [SEMC]
[ro.product.model]: [Xperia Mini Pro]
[ro.product.name]: [SK17i]
[ro.revision]: [0]
[ro.ril.def.agps.feature]: [1]
[ro.ril.def.agps.mode]: [2]
[ro.ril.gprsclass]: [10]
[ro.ril.hsxpa]: [1]
[ro.rommanager.developerid]: [cyanogenmod]
[ro.secure]: [1]
[ro.serialno]: [<CENSORED>]
[ro.setupwizard.enterprise_mode]: [1]
[ro.sf.lcd_density]: [160]
[ro.telephony.call_ring.multiple]: [false]
[ro.telephony.default_network]: [0]
[ro.telephony.ril_class]: [SemcRIL]
[ro.tethering.kb_disconnect]: [1]
[ro.url.legal.android_privacy]: [http://www.google.com/intl/%s/mobile/android/basic/privacy.html]
[ro.url.legal]: [http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html]
[ro.use_data_netmgrd]: [true]
[ro.wifi.channels]: []
[service.bootanim.exit]: [0]
[sys.mem.max_hidden_apps]: [10]
[sys.usb.config]: [mass_storage,adb]
[sys.usb.state]: [mass_storage,adb]
[system_init.startsurfaceflinger]: [0]
[vold.post_fs_data_done]: [1]
[wifi.interface]: [wlan0]
[wifi.softap.interface]: [wlan0]
[wifi.softapconcurrent.interface]: [wlan0]

Update:
Now operating for over an hour (for copying files off the device via adb), the boot animation finished and the "log in"-screen (i.e, with the clock and the lock to wipe to the side to get access) appears, shortly for about a second, then disappers, black screen, after two seconds appears again, stays looping like that. Found out that it is the process /system/bin/bootanimation which stopped after a while. Same behaviour if killed by hand.
Update 2:
There are a lot of files /data/system/dropbox/system_server_crash@1460671235961.txt (the numbers are timestamps and differ from file to file), a few per minute, all with the content
    Process: system_server
    Build: SEMC/SK17i_1254-2184/SK17i:4.0.4/4.1.B.0.587/tL1_3w:user/release-keys

    java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
            at com.android.server.PowerManagerService$10.run(PowerManagerService.java:2839)
            at android.os.Handler.handleCallback(Handler.java:615)
            at android.os.Handler.dispatchMessage(Handler.java:92)
            at android.os.Looper.loop(Looper.java:137)
            at android.os.HandlerThread.run(HandlerThread.java:60)

Try the logs. In your case, I'd first check adb logcat (which you already did if I read that correctly), and then adb dmesg.

@lzzy: logcat (btw.: I run everything from the shell started with adb shell, if needed a root shell) gives lot of output, not stopping. What should I look for? I am not familiar with all that android-specific stuff which is printed there. dmesg I'll try -- but the problem really does not look like a kernel problem, since I can connect to the device fine via USB cable and adb.

All those logs are ring buffers where's continuously written to, so naturally logcat won't stop. What I'd do is running it from the computer (root or not doesn't really matter), redirecting the output to a file, and then hitting Ctrl-C when I think I've captured enough (e.g. when the loop is "complete"). e.g.: adb logcat -v time > debug.log. And no, I don't have something specific in mind; I'd later grep the file for crashes and errors: stack traces are easy to identify, and error messages usually start with "E:", so one can filter (-v time adds a time-stamp to the start of each line).

@lzzy: Is there really only this way, via the spammed logcat? No way to stepwise boot?

Not that I know of. Check the help page for filter options to narrow down things in output (you might miss other details then) – or capture all and filter later. I'm not aware of a third variant .

android seems to complicated to debug in those cases. I now simply copy everything over by having mounted the device with adbfs, and then will wipe and re-install. The question seems to be left unanswered ...

Okay, there's a couple of reasons why this could be happening. 1. Are you using an official or unofficial CyanogenMod ROM?
2. If the lockscreen appears for a second, it means that some part of the system is crashing right after the lockscreen appears. You should be able to use Android Studio to filter debug output. (PS: I'd put a shorter version of this in a comment but I don't have enough reputation.)

I am not anymore on that issue, since android is somewhat really confusing. Just a fresh re-install.


text:
LG G Pro E980 stuck loop on TWRP openrecovery script
My LG G Pro E980 is rooted. It was working fine. Today I did factory reset to reset phone and delete data. But after restarting it has got stuck on TWRP openrecovery script, showing errors and keeps restarting.
This is the screenshot of the problem:

Anyone please help!

Did you issue the factory reset from Settings app? If yes, then setup [tag:adb] in PC, boot device into TWRP, connect device to PC and using adb delete everything under Cache partition. Now reboot again into TWRP and use its factory reset option.

Yes I did reset from Settings. Device is not booting into TWRP. It boots directly into the openrecovery script (above screenshot) and then it restarts. It happens in loop continuously.

Have you able to solve this problem and get your phone fixed? I have exactly the same problem and desperate for some help. Will you please let me know ASAP? Thanks, Bill

so did u fix it.
im having the same problem so ....

@BrickedGPro, I wasn't able to resolve it myself. I took it to a mobile repair shop, and the guy resolved it in half an hour. I don't know how he did it.

@ezg Check my comment above.


text:
Disable hardware keys on Cyanogenmod 12.1 / SM-T800 (Samsung Galaxy Tab S)
I've hated the hardware keys on my Samsung tablet since I bought it. Even after a year, I have to be careful not to brush the keys with my palm or else I'm suddenly exiting the book I'm reading or web page I'm viewing.
I rooted the device to try and fix this, however the instructions I've found for enabling on-screen navigation (by editing build.props) either gave me a black bar with no navigation buttons or, on later Samsung updates, prevented my tablet from booting.
I finally got around to installing CyanogenMod 12.1 (cm_chagallwifi-userdebug 5.1.1 LMY49J 11fa7f9ea1), and I can enable on-screen navigation using the following command (taken from this question):
settings put secure dev_force_show_navbar 1

Now I need to disable the hardware buttons. Most instructions I've found indicate to edit /system/usr/keylayout/Geneic.kl and comment out the keys for HOME, BACK and MENU. I mounted /system as read-write and commented out keycodes 127 (Menu), 158 (back)and 172 (home). Yet after a reboot, my hardware keys are still enabled!
I also cannot disable the LEDs on the keys either. I found a script that attempt to do this sending a 0 to /sys/class/leds/button-backlight/brightness, which does not exist on my CM12.1 system. I can't find any other files under /sys/class/leds that seem to deal with the hardware button backlights either and there's nothing in the settings menu for them.
All I want is to be able to disable the hardware keys. Turning off the LEDs would be nice too.

Can you install Xposed Additions? You would need Xposed Framework. Using that app, you can set your hardware buttons to act as disabled. To remain on safe side, try only with overview/menu button instead of going all out for all HW buttons. BTW, do you not have the setting named Buttons under Settings app?

I got an answer for this on this xda developers thread:
Isnt the key file in cm called something different sec_touchscreen.kl or something or other?

Why yes ashyx, it is! In fact, it only has two entries! One is for the app switcher button and the other for the back button. After commenting out these lines, the buttons were disabled.
After digging through the settings, I also found that the button back lights are adjustable in this build of Cyanogen and was able to turn them off.


text:
Can't install apps!! OUT OF SPACE error!! HTC DESIRE 626
I'm using HTC Desire 626. I have more than 2 GB space left on Phone Storage. But I can't install any more apps or games. It's saying that my phone is out of space.

I've tried cleaning up all kind of cache files. But no luck!
Please help me out! This problem is driving me mad.

Can you please say whether or not you are rooted, as well as if you have an SD Card.  If you do have an SD Card, please note how much space it has.

My phone is rooted and I don't have any SD card

Get an SD Card.  Since you are rooted, you can move apps quite easily to this SD Card by going to the application manager and clicking "Move to SD Card".

(from an Android 4.4.4 user on a Nexus 7 2013)
I began to have this problem after installing the Xposed module "XInstaller". I uninstalled that module and everything went back to normal.
Important: It can get easy to confuse all of these X words. It wasn't "Xposed Installer" that was the issue. The issue was the module for Xposed called "XInstaller". This module lets you change some of Android's default app installation/uninstallation behaviors. For now, I'm leaving that module alone.

I had faced same issue with my micromax mobile.
Issue in my case was only 890 mb was available for installing apps. Even though there was around 4.5 Gb free space in phone memory. Your issue seems to be same as mine. What you have to do is to  reparation the phone memory so as to allocate more space for installing the apps. Downside is whatever memory allocated for apps can only be used for installing apps. You cannot store photos or music in it . further your phone should be routed. Repartitioning procedure for your phone may be available in net.
Check if your phone has separate internal SD card.
I had repartitioned to increase app memory to 2.5 GB.
I am attaching link with similar issue.
Micromax Unite 2 A106, app installation error

That makes sense. But I don't know how to repartition the phone memory and allocate more space for installing apps. Btw my phone is ROOT-ed.

Maybe the problem is not the lack of space but the google Play app that doesn't work properly. If you really have free space in your phone, try to download any APK and install it (You might need to activate the option "Unknown Sources" from security settings)....if that doesn't work either.....Try to clear Cache/Data for Google Play app and see if that works.


text:
Android auto-dim on face down?
I'm looking for an Android app that will temporarily dim the screen (not turn it off!) when the phone is face down, and return it to my normal brightness setting when face up. Does such an app exist? I've had no luck finding one...

I don't quite understand what you are trying to achieve or solve but 1) app recommendations are off-topic here. 2) Doesn't the auto-brightness baked into android does exactly the same thing? Considering that when you put your phone face down your screen will dim because there isn't that much light that hits the sensor. So you might want to clarify what you really want to achieve :)

If you're using Android 5.x/6.x, then under Display setting of Settings app you should be able to find an option named Adaptive Brightness. That should precisely do the job. In preceding Android versions, there is Auto Brightness but I do not know how it functions. If what benjaminS stated is true, then it should work well.
In any case, if the auto/adaptive brightness isn't working out for you then you can consider an automation app  to do the job precisely.  I tried with Tasker (full 7 day trial; userguide)
 on Nexus 6 running stock Android 6.0.1:

Profile: State → Sensor → Orientation → Is: Face Down
Task: (Action):

Display → Display Brightness:

Level: set the desired minimum
tick Disable Safeguard
tick Ignore Current Level

Done. Whenever the device would be facing downwards, the brightness level would change. Whenever the orientation would change, the brightness level would be restored.
If you don't want the brightness to be restored automatically, long press on the profile → tap on settings icon next to a trash can → untick Restore Settings.
Note:

Auto/Adaptive Brightness might interfere here so you're advised to keep it disabled.
Display Timeout is not bypassed by this and after the timeout the screen would turn off. You can extend the timeout under Display action group though.


text:
How can I run continuous Logcat in the background?
I want to run a continuous logcat in the background to capture everything happening on my phone.
This needs to be written to disk line by line without delay. I want to capture the cause of random reboots.

Open a command line and issue logcat -f /path/where/to/save/the/log. The logcat tool will continue recording everything until you kill the terminal.

You need root for this (where I was making mistakes).
So, in a terminal:
su
logcat V > /sdcard/logcat.txt
then, without killing the command, just press home to keep the terminal running in the background.

V means verbose (the highest level of detail)
D means debug

and there are other less detailed levels.
Exercise caution when sharing D and V level logs; they contain highly sensitive information.

Run this command:
adb -e logcat > log_file_name.txt


text:
Difference between bootloader and Download mode in Samsung Galaxy tablets
I'm working on Samsung Galaxy Tab tablets, specifically with Tab 3 (SM-T210) and Tab 4 (SM-T230), and being learning a bit about the boot and recovery images and the bootloader. I have not being able to find the answer to this very simple question: Is Download Mode Samsung's Bootloader? If not what is the difference?

Yes and no. The Download Mode is an interface between the Loke component, which resides in the bootloader, and Odin/Heimdall. In fact, if you issue the reboot bootloader from your device's command line, it will boot the Download Mode.

@DeathMaskSalesman Thanks for your comment. Do you have any tutorial or articles regarding the information you supplied, so I can read on?

Sadly, I don't have any direct link at hand. You may want to search at XDA. If you're interested in the Odin tool, though, I was researching its features, and you can find my notes under a question named Odin configuration file analysis, or something similar, in this very SE.

@DeathMaskSalesman I issued the reboot bootloader and rebooted into normal mode, same happened when I issued the adb reboot-bootloader. The only one that worked was adb reboot recovery.

This is quite strange. It may be a difference noticed only on tablets? My S4 Mini does what I expected it to do. See if you can experiment on a Samsung smartphone, and if the result is the expected one.

@DeathMaskSalesman For realz though, is totally stealing your comment and reposting it as an answer like the guy did below allowed here on SE?

@AndyYan Nice objection. I'll downvote and flag the answer accordingly. Had he politely asked, I would've let him use my info, but it's not the case.

Downvote it if it's not an answer.  If it is, then don't post it as a comment.

@MatthewRead An answer is not such if it doesn't solve the issue, and that's why I usually post them as comments first. An answer which doesn't solve anything is pointless, thus I let any OP evaluate it before writing a real answer.

Yes and no. The Download Mode is an interface between the Loke component, which resides in the bootloader, and Odin/Heimdall. In fact, if you issue the reboot bootloader from your device's command line, it will boot the Download Mode. (thanks to @death-mask-salesman)


text:
Does my battery seriously have a problem or do I have a virus?
This notification keeps popping up on my phone and I don't know if it's real or not, it reads:
"Battery has been infected by 6 serious problem! Install DU Battery and all problems will be wiped out."

Look, man. Look at the popup's horrible grammar. Now think: can a battery, which is not programmable, be infected? The obvious answer is no. Close that popup without tapping the "Protect now" and flee posthaste.

how do i get it to stop popping up??

You probably installed some weird app, and that's most likely the culprit. Unless you wish to start uninstalling them one by one, I recommend you to give us a list.

ilauncher, control center and inoty

Uninsatll the app which has any relations with DU battery. What i mean is the which is having option to install DU Battery in inside settings.

When pop up shows? Is it on any specific act or an app?

It's a virus/maleware.
Sources that describe very similar situations:
http://forums.androidcentral.com/ask-question/658156-apus-du-battery-saver-virus.html
https://productforums.google.com/forum/#!topic/nexus/7XbiK-frhVA
It sounds like it's actually a really old scam (this may be a newer variant of it)  Here's a story from 2011 that sounds like the same issue:
http://www.pcworld.com/article/241967/sleazy_ads_on_android_devices_push_bogus_battery_upgrade_warnings.html

To give a  view of why it is impossible for an app to diagnose much less than fix battery problems, a little background is in order

Battery houses a sensor/chip that is responsible for  monitoring vital parameters like temperature, voltage, NFC etc. This information is conveyed to the OS  through one of the pins that makes contact when the battery is in place (normally three pins, one being for this and other two for charging / discharging)
This information is conveyed to the battery driver portion of the ROM. These drivers cannot be modified permanently, even if your device is rooted, since these are initialised during boot up

Hence to identify state of the battery (other than the vital parameters) discussed above, you require a physical way of interacting with the battery. This should convince you that the claims made by the app are nonsense , aimed at attracting revenue

Android doesn't need anti virus - see Is an antivirus really needed for Android?. So that only leaves malware as the cause. Have a look at our malware  tag for solutions to fix. This suggests factory reset can fix, in which case you are lucky or you may need to flash stock ROM again- in any case make a back up of your data

This is very annoying situation.
First thing to try is remove all cache files of those apps which has internet connectivity. On net there are many sites, those try to inject some malicious codes. This is first step to identify.

If first is not helpful, try to check the background running apps. Any suspicious app that you think, force stop that. See if it helps. If you find out any app which is on play store, you must contact and report this to developer.
You may also try to check all downloaded apps. May be something there.


text:
Applications not working
Device: Samsung Galaxy Note 2 - GT-N7100 - Android Kitkat 4.4.2
This problem has been going on for some time. I factory reset the phone and reinstalled all apps. But the problem is recurring. "Unfortunately, Clock has stopped working".

Application Manager error (click image for larger variant)
This is how the apps show in the Application manager. This happens over time with all the apps.
Sometimes, the phone suddenly stops working and restarts itself. During this time, it also wipes out all cache information from all apps.
Any help will greatly appreciated.

Have you considered re-flashing the stock firmware with Odin? Might be the easiest option if you don't fear missing data :P


text:
How do I bring custom app (activity) atop of lock screen?
Some applications (for example, MortPlayer Music and other music players, Camera app, etc.) can work atop of lock screen, without requiring to enter PIN.
How do I force existing app to show an activity even if screen is locked?
For example, I have some custom Calculator app and I think it is secure enough to be callable without unlocking the device. I can already start it without unlocking (method of doing so is out of scope for this question), but it's window gets visible only after closing lockscreen.
To do this I suppose one should "inject" android.permission.SYSTEM_ALERT_WINDOW permission and WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED and WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD window flags.
Is this already done by somebody? Maybe there is some XPosed module for this?


text:
Can my location be tracked/can my phone be duplicated
I believe someone is keeping track of me via my phone. Is this possible and, if so, what can I do to disable that? Also, is it possible for someone who has had access to my phone to duplicate it so that they can see my texts?

I don't think so. Your phone is rooted?

Basically, if someone got physical access, he could have installed a tracking app and something that forwards your SMS – there are apps for both things available. There might even be some which are "cloaking" (i.e. hiding from the user). If you suspect something like that, first step would be checking installed apps for suspicious candidates (i.e. user-installed apps which you didn't install). Hard to do a remote diagnostic on that.

If someone has access to your Google Account, they could track your device via that.

As soon as there is no details in your question I'll answer in general: if you've got an android device - you could be tracked. This is not only about some sort of embedded Google telemetry or hidden spying apk - any app, that has permission to access your sms/camera/other data can do so.
This is how it may look like:
:
Of course there are couple of ways to avoid such a mess

Download and install XPrivacy. It's free application and it's rather hard to use, but this is the most clean way as soon as this app is opensource. Further instructionshere. Root access required.
Use other restricting permission app: there are plenty and here is the quick comparsion. Check out this and this tool. May require root access.
Freeze suspected apps which receives sms. This tool could do the trick. Root access required.
Just do not install any app that desires sms privilege - kinda tricky but the only way if previous are not possible.


text:
Unable to boot my Nexus 5 into recovery mode
I was having Marshmallow stock ROM rooted with TWRP installed. The way I had installed TWRP recoery made the monthly security updates uninstallable.
After learning the mistake, I decided to download the MOB30D build and flashed as I said in my answer.
After installing the phone was working normally. I tried to install TWRP through ADB command line and there was no error messages.  When I rebooted the phone in recovery mode I find a red triangle.  After some fiddling with power and volume buttons I saw the following recovery screen and used it for rebooting only:

I tried to flash the latest TWRP version, downloading again thinking the download might be corrupted. I then tried several old version of TWRP and same result.  I tried flashing stock recovery, doing all these again with erasing the recovery partition first - all results in red triangle.
I then tried Nexus RootKit flashing stock and TWRP image (downloading again); still no use.  I tried Nexus Rootkit's "Boot into temp recovery image" which did not work well but suddenly worked.  I flashed latest TWRP image through the temp TWRP and it too says all okay, but no joy:

Question:
I am not sure what else I can do to install TWRP. I want TWRP basically to root and for emergency purposes.  What I can do further to install TWRP and if not at least root without a recovery partition.
Update
I tried CWM recovery as well and same result. I tried to lock the bootloader and unlock again there by resetting everything. Still no use.

If the device isn't rooted, how did you successfully flash TWRP using adb? 2. After flashing TWRP zip from that temp TWRP image, what did you immediately do? rebooted straight into recovery or something else?

If you are referring to "I was having Marshmallow stock ROM rooted with TWRP installed" I flashed TWRP first and installed root. 2. I rebooted straight into recovery.

The problem is your not flashing SuperSU or deleting /system/bin/install-recovery.sh. Android has safeguards which revert to the stock recovery thru the install-recovery.sh, SuperSU by default disables this function so I'd recommend flashing it after you install TWRP.
Steps

fastboot flash recovery twrp.img or fastboot boot twrp.img
flash twrp.img inside of recovery if you just booted it instead of using fastboot flash
flash SuperSU-2.79-SR3.zip

OR

tap the mount tab
tap System
go back to main screen and tap advanced then file manager
navigate to /system/bin and delete install-recovery.sh

I recommend using the SuperSU route but whatever floats your boat.

I am still puzzled about how the recovery issue is so stubborn. However, after reading through a blog post on root-your-android-device-without-flashing-custom-recovery, I understood that you can boot your phone temporarily on a custom recovery and install root binary.
Being lazy and already downloaded the Nexus Root Kit, I just clicked Root which exactly did this and voila, the device is rooted.
I am still hunting for a solution for my recovery issue though. Thought this new approach could help some one.


text:
Update APK Installed App
I recently installed an app to my phone using an APK, because this app is not available in my country. When I looked it up in my Google Play Store (I only get to view this app in my wishlist, because it doesn't show up when I just search for it), there is a mark on my wishlist that this app is now installed on my phone, but when I view the app, there is still the notice message of "This item isn't available in your country."
Will I be able to receive the update? If not, is there a way to update this app?

Not if you update from the Play Store. You could try an alternative store like Aptoide, though, which will show you the available updates when the apk's signature matches the signature of the one you installed.

You can update the app using a VPN and fake GPS.

@SuperThomasLab - I tried using VPN and fake GPS, but it causes a malware on my phone, which drains the battery when it is on idle. Had to restore my phone to factory settings to get rid of it. So I'm not "in" with this solution. Maybe I just did something wrong, but I just installed "Hotspot Shield Free VPN", but it doesn't work. Maybe this solution will work for most people.

@DeathMaskSalesman I searched for Aptoide, looks good to me. I'll try it when a new update for the app has been released. Cheers!

I used "TunnelBear" and "fake GPS".

No. The only way to update the app is download the new version apk and install it.
I had similar experience with a game they released only for certain parts of the world. Then they released an update that I had to install in order to play the game, but since it wasn't available in my country I had to look for the updated apk and install it outside Google Play Store.

Thanks for the answer. I'll have to test it out first when a new update has been released.

Ivo, your answer is mostly correct but not fully – the app might be available at [tag:alternative-markets] as well (see e.g. the first comment on the question itself).

@Izzy Thanks! I'll try the Aptoide market as suggested by DeathMaskSalesman in my post. I'll test it out when a new update has been released.

Take care which repos you chose there then, Logan – for details, see How safe is it to use Aptoide?

@Izzy Well yeah, but if the developer uploads to alternative markets, he'd make it unavailable to me there too. So its exactly the same thing as downloading it from anywhere on the internet. SOmeone went backed up the apk from their phone, then uploaded it somewhere else on the internet. I typically distinguish two places where you can get your apps, google play store and everything else.

You're wrong with that, Ivo. Several developers keep their apps updated in multiple places (usually GPlay and Amazon, sometimes GPlay and F-Droid). While you're mostly correct when it comes to Aptoide, where some repos do exactly that, it's often done regularly though – so updates might be a bit delayed, but still are available and the user gets notified.


text:
Which Android version first featured auto-upgrade?
Modern Android versions enable auto-upgrading installed apps.
Which Android (or play store / market app) version first featured this?

You're on the wrong path, Adam. It's not Android enabling that, but the corresponding "market apps" (e.g. Google Play Store). So it has nothing to do with the Android version. Apart from that, what's the practical background of this question? What issue are you trying to solve?

@Izzy Thanks for the info. I am investigation some strange behavior pattern in an app, which might be related to version upgrades, and it would be helpful to know whether the user upgraded the app manually or not.

hard to tell that remotely. Playstore offers automatic updates, but one can turn those off. One can sideload apps from different sources in different ways as well. There's an installer flag when dumping package details which can help identifying the source (but that shows "unknown" when not installed via an app, i.e. when using adb install or pm install manually, or having downloaded the .apk to the device and installed from e.g. a file manager). But what you most likely mean is whether between v1 and v3 the v2 was skipped. Not sure if that's on-topic here (being a dev question).


text:
mount in shell as user or root with different output
I have a rooted Android Phone and a native service which detects if the system partition is mounted read-write or read-only.
If I run the mount command in the user shell, the partition is mounted read-only.
mount | grep /system

I can open a different shell, login as root and run the command
mount -o remount,rw /system

In the root shell, the system is mounted read-write, but in the previous opened user shell, the system partition is still mounted as read-only. Even if I switch back in the rooted shell with Ctrl+D to the normal user shell, the system partition is mounted read-only. It is only read-writeable in the root shell.
So it is not possible to detect as non root, if the partition was remounted in a different context. Why is that? As it is of my knowledge, in Linux mount points are handled globally.
Update: Android 5.0.2, Samsung SM-A300FU and SM-A300M

I suppose it is happening because of mount namespaces.

Device and Android version might be relevant here. I've read about such cases several times, but never experienced them myself.


text:
forcing all calls to be dialed by hangouts
How do we configure the phone so that tapping on a contact number triggers the hangouts app to place to call? ( instead of the local carrier kicking in such as at&t. )
If I'm not mistaking, there was such an option, which I think I opted out, or I'm totally dreaming cause I can't find that darn setting.   :)
Currently, my phone is configured so that only the international calls are routed thru hangouts.
thanks
note 3.

I have had the same problem before. I During setup, the Google Voice app (this is what you mean, right) asks whether you want all calls router, just international calls, or no calls routed through it. If you didn't select All calls during setup, it cannot be found in settings. But the solution is to use the Google Voice toggle widget (looks just like the Google voice all, 1x1). Place it on your home screen, then tap on it until you see the toast that says Route All Calls through Google Voice (or something like that).
Otherwise, if you want everything to be routed through Google Hangouts, you have two options. But note that this routes calls through your data plan, not your phone plan. Both solutions require use of the Google Hangouts Dialer app. Download it from the play store. The first method is simple. Replace your dialer with Google Hangouts Dialer. When you open the app, it takes you to a tab in Hangouts that contains a dialpad, or your call log. If you do not see the dial pad, click the dialpad button at the bottom. Then dial, like you normally would. The second is a little more complicated, but it allows you to use your existing dialer. Clear your app defaults for both Hangouts Dialer, and your native Dialer app. Then when you dial a phone number, your phone should prompt whether to call using your phone app, or Hangouts Dialer. Select Hangouts Dialer.
If this helped you, please select the green Check mark(✔✅) on the left of the answer, so the community knows this is the best answer. Thanks

Very thorough. I cannot test what you suggested now since I don't have that phone yet. Thank you for the details and the reminder about the green-check-mark. So, the things to do is 1) get the "Google Voice toggle widget", and run it to answer that setting question to set "I want only the international calls to be routed by Google Voice".  AND at that time, we should be done with that widget, right? I gather that this is kind of like back-door setting tool that allows you to get to the Google Voice App's initial set up config values and therefore we can delete it off the phone, once we done

Yes. That's perfect.


text:
Why can't use the external SD card with my voice recorder app?
I'm the owner of an Honor 5x.
The external SD card inside the phone works fine with the photos/video application, and I can write/read from ES file manager but the apps for voice recording that I tried (Total Recall, Voice Recorder, RecForge) don't let me save the file on the external SD.
Can anyone help me and/or explain what's happening?

What version of Android? On Marshmallow, apps request permission to access SD Card. If the apps don't request, are aren't designed to target Android M, the OS won't allow the apps to access the SD card

The versione is Lollipop (5.1.1).

How to save files to external SD card on a non-rooted Android?


text:
Wirelessly sync music folder to microSD card
I am looking for a way to sync, wirelessly or over a cloud service, a (music) folder from my computer to the microSD card on my rooted phone.
I've been trying this on Android MM with Titanium Media Sync app but it seems MM restricts the app from writing on the SD-card "Error. Failed to create local folder."
I recall to be able to do so on another phone with CynogenMod...

You could take a look at the FolderSync app (which is what I use). Cannot test it on MM, though, as I have no MM device.

ok, thanx! I'll have a look. which OS do you use?

I use Linux on all of my computers. But FolderSync supports all kind of protocols, including CIFS (in case you're using Windows; I use SFTP/SCP here with Linux).

cool, I also mainly use linux. and which Androd versions do you use? :)

Mostly 4.4 (though my tabbies are still stuck on 4.1/4.2).

Probably the feature that TMS is missing is superuser permissiom request. FolderSync as noted in the comments does asks for superuser priviledges and can perform two way syncing!


text:
I cant hear the audio unless i plug in earphones
Please help. Im always wearing earphones to listen to music on my LG G Stylo but When i tried to listen to music without earphones i heard nothing. I also cant hear anyone on the phone without earphones. I tried putting up the volume but instead of showing the speaker symbol it showed the earphones one. Help!

May sound stupid, but did you unplug your earphones from the device – or in case of Bluetooth earphones, did you disconnect them? (besides, what kind of earphones we're talking about here: cable-bound or wireless?)

Your device has a physical problem, either the headphone plug in the device is defective or there is something in it causing a short so the phone thinks headphones are still plugged in. Look into the headphone plug with a light and see if you can see anything obvious, but this typically requires a complete disassembly and cleaning or replacement of the headphone plug.
I am not familiar with your specific device, but this can vary product to product from a simple plug-in module, to a micro resoldering job that requires specialized tools.
I would recommend trying a factory default first, although this is usually a hardware issue, it is possible something in software is just "stuck".
If you are not confident performing this procedure, I would suggest contacting a reputable repair vendor or LG.


text:
How to lock camera and volume control when phone is locked
When my phone is locked, the camera and volume controls still work which I find strange.
How can I lock these down also, I don't want these controls to be pressed when in my pocket by mistake.

Which Android version and device are you using? Is the Android rooted? If yes, then Xposed Additions could help, provided that your ROM is compatible.

My device doesn't have a separate camera key, so I was able to test my solutions only with volume up and down keys. AutoInput with Tasker (full 7 day trial; userguide) is what you can try. You would either have to buy or enable full trial of former since the solution featuring AutoInput would not work.
Important: Launch AutoInput and enable its accessibility service.
For Tasker:

Profile: State → Display → Display State → Is: Off
Task: (Action):

Plugin → AutoInput → Modes

Configuration:

Key Suppress: Enable
Keys: tick the entries viz. Volume Up, Volume Down and Camera

Timeout: None

Exit task: (Action):

Plugin → AutoInput → Modes

Configuration:

Key Suppress: Disable
Keys: tick the entries viz. Volume Up, Volume Down and Camera

Timeout: None

That did the job in stock Android 6.0.1 in Nexus 6, at least for volume rockers.

On a rooted Android, you can try Xposed Additions app. It requires a compatible Xposed Framework1.
Instructions:

Launch Xposed Additions → tap Buttons
Tap Add new key and when the dialog appears press your hardware key once to register it
Tap the newly created entry for the button you pressed earlier
Tap Add new Condition → Screen Off
Tap the newly created Screen Off entry → tick Click under Single Actions

Follow the said instructions for the rest of your relevant hardware keys.
Note: If Ambient Display is enabled, then during the moments when the display lightens up briefly, pressing any of the relevant keys would result in their actual intended effect and not the one the two solutions aim for.

1 Xposed Framework: Android 4.x, Android 5.x and 6.x


text:
ADB-client stops working when root is turned on
Very strange - I've Cyanogenmod rooted device and cannot use the adb-client from computer when rooting is turned on. In other words  i have to go to developer settings, turn off rooting - then I can access the device from the computer.
The problem i need to be able to connect computer with the device in rooted mood cince i've an nandroid there to push back to clockworkmod on the device.
What could the reason be adb from computer no longer work when root is turned on?
I dont get it!
And another question - whats the alternatives if I want to copy a rom-image from computer back to the device?
thanks in advance

Which CM version and build is it and for which device? See if adb root works.

@Firelord CM version: 6.0.4.6 ; Kernel-version: 3.0.31-ArchiKernel-CM-gd13f4d1root@ArchiDroid#1.;  Samsung Galaxy SIII i9300

is adb-daemon residing in kernel or userspace? just curious


text:
How to use, learn, and practice Dvorak layout with hardware external keyboards?
I have an hardware USB keyboard I want to practice Dvorak using my Android device. I've tried several games and such that purport to be typing games or tutors and they are all horrible, or at least clearly designed for other purposes. (Some of them even disable external keyboards because they have leaderboards for speed).
I'm looking for a gimmick-free typing tutor for Android that teaches Dvorak layouts.
Also, how do I convert qwerty input to dvorak?

I solved this by installing Termux, which is a "terminal emulator".  This particular terminal emulator can install gtypist for you, which is a superb, well thought out free and open source typing tutor, well-known in the linux world.  gtypist is very easy to use, and you only need to know two Termux commands.  Just install Termux from the Play store, open a new session (if not automatically done) and type:
apt install gtypist

and press enter/go/return.  It should download and install, and might ask you to confirm.  After that, use the command:
gtypist

(and enter/go/return) to use the tutor.  Instructions for tutor will be on screen.  Happy typing!
If you have a dvorak keyboard, then great, this should work out of the box provided you android device language settings are correct.  Otherwise I found an app called External Keyboard Helper (Demo/Pro) to be extremely powerful in solving individual key map issues, as well as supporting every layout I've heard of.  I tried the demo on one of my devices and once in a while it inserts text "... DEMO VERSION ..." into what I'm doing, but pro version is only $1.99 as of this writing.
These apps also support other layouts, including Colemak, and gtypist is extensible, so you can install other lessons (not tested on Termux version, but I don't see a reason why it wouldn't work).


text:
Does USB Internet option require root access?
Hi I want to reverse tether from PC, OS Win 8.1 to android device but is it required root?
In Activity in Local Area Connection Status (Local Area Connection is my Remote NDIS...) I get increased Sent values but this increase is very slow(i.e 168 bytes and after few seconds 210 bytes, and another secs 252 bytes) and not fluent, Received values increase proper and relatively faster than Sent values
I have on the phone 'USB internet active' notification, on PC
I have in Connection section in General
IPv4 Connectivity: 'No network access'
the same with IPv6
Media State: Enabled
Duration: (8 minutes and is increasing)
Speed: 425.9 Mbps
Ethernet is my PC connection with speed 100 Mbps but I live in dorm and really I have lower speed
Phone Model: Quantum 350
I have tried enable sharing tab
and when I launch Opera mini go to some website i.e www.google.com then browser loads and loads and after few minutes I get confirm dialog with info that cannot connect but during the 39 minutes my phone received 395,000 bytes and increasing now (during 45 minutes) I have 460,000 and increasing

ReverseTethering does not require a rooted device. Depending on your device, it might come with a preinstalled reverse tethering option. Unfortunately, this preinstalled solution is only included in very few devices.
I am the developer of ReverseTethering NoRoot, an app that brings reverse tethering to any Android device running Android 4.0 or newer. No root required. All major host OSs are supported. The app is available on Google Play.


text:
Titanium backup only shows "Overview" tab
A few days ago, my phone ran an automatic update of Titanium backup, which used to work fine.
Now when I launch it, I am stuck on its home screen. I've tried restarting my phone, nothing changed :

There is no backup/restore tab, no schedule tab...
What can I do to remedy this ? Will reinstalling TB be useful ? Will doing so delete its data (like the back uped apps) ?
The phone : Asus Zenfone 2 Laser (ze500kl) rooted with SuperSU, using Android 5.0.2

Have you tried hitting "Menu"?  Have you uninstalled and re-installed the app to see if anything changes?

What did you do? It says Backup directory unavailable. Have you tried setting it up from Preferences under Menu?

If @Firelord's comment doesn't work, try:

Settings -> Apps -> Titanium -> Force Stop and Clear Data and Clear Cache
Rename folder /data/data/com.keramidas.TitaniumBackup
Rename folder data/com.keramidas.TitaniumBackup on both your internal and external SD cards
Uninstall / reinstall Titanium Backup
Open Titanium Backup, go through initial welcome screens
Settings -> Apps -> Titanium -> Force Stop only
Restore the copy of the old /data/data/com.keramidas.TitaniumBackup/databases to restore labels and schedules

These days I backup Titanium Backup with Helium to avoid such problems :)

Ihad the same problem as you. Open SuperSU and go to settings. From there, uncheck "Mount namespace separation" and then reboot.


text:
Galaxy S3 turning on and off repeatedly even after factory reset
I have a bricked samsung galaxy s3! It is shutting off and on again and I need to remove the battery to make it stop. I have tried the following...
-tapping out stuck power button
-options in recovery menu (reboot, wipe cache, wipe data and factory rest)
-I have wiped and installed fresh from Odin, which was difficult because my charge port is apparently not working great.
Once I reset with Odin my phone booted up nicely and walked me through setting up my phone. Once i got to the main screen my hopes and dreams were promptly crushed and the phone started shutting  down and restarting again..
Thoughts?

Reload your BOOTLOADER because that is what will be stopping your device from booting sincerely it works a bit like BIOS. I, sadly, dont have any tips on how to do so though. Google search maybe?


text:
How to remove a single client certificate?
Isn't it possible to remove a single client certificate from a device?
On a Galaxy S6 running 5.0.2 I can remove all client certificates using:
System settings
  Lock screen and security
    Other security settings
      Clear credentials

Or I can delete a single trusted CA certificate from:
System settings
  Lock screen and security
    Other security settings
      View security certificates
        User

However there seems to be no option to remove a single client (non-CA) certificate.

Same problem here. Android separates the certificates into two categories: certificates for "VPN and apps" and certificates for "Wi-Fi". While I can remove single "VPN and apps" certificates, I have to use the "Clear credentials" feature (which clears ALL user-installed certificates, both "VPN and apps" and "Wi-Fi") to remove a single "Wi-Fi" certificate. Very annoying. Just, why? PS: I'm using a Samsung Galaxy S9+ with Android 8.0.0.

It is indeed annoying, same on Magic UI 4.

Just forget the wireless SSID the cert is for and it will delete the cert. I've verified this on Galaxy S7 running 8.0.0 and Note 8 running 8.0.0 as well.

The certificate is not for any SSID, the certificate is for TLS connections in general.


text:
Where on an Android device can I find information about the make, model, etc of the device?
I don't own a smartphone and I don't use Android but other than that I'm a tech guy (-:
My father has a Samsung Android phone but doesn't know what model it is and it has no markings on the case. I want to find out the specs of his phone.
I expect there must be some app or settings on every Android device, or possibly a proprietary Samsung one, that tells us all kinds of info about the phone.
But neither of us can find it. What should I find and click on any arbitrary Android (or Samsung) device?

that tells us all kinds of info about the phone. is way too vague. What exactly you wanted to know?

User dktr.k1 did not find it vague at all, though their answer didn't quite match my father's device.

@hippietrail What kind of specs do you need? There are tons of technical specs (what CPU/GPU, screen resolution and dots-per-pixel, hardware revisions, and more). If you only need the "very basics", the on-board solution offered by dktr.k1 will suffice. If you need further details, you might need a 3rd party app (or specific technical knowledge to extract those details e.g. via [tag:adb]). That's what AADTechnical means by "too vague" (just mentioning this in case there's a language barrier on your end ;)

As mentioned I just wanted to find what model it was. The submitted answer told me how to find that. Now that I know the model number I can easily Google any of the other specs. This question wasn't about directly getting all the technical specs. So maybe my wording was a bit vague blurring that I wanted the model number and what I wanted it for.

Android devices have an item called About phone or About device – usually directly in the Settings menu (scroll to the very end), but some manufacturers like Samsung often move it into a Sub-Menu like Settings › System.
That page gives you the most essential details, but by far not all. If what you need cannot be found there, you might need 3rd party tools for System Information like SysHard Info – or, with some technical background and knowledge, can explore system internals via adb, e.g. using the adb dumpsys command.

Do you mean Settings -> System -> About phone/device? Or is this something that varies by Android version or due to Samsung-specific proprietary changes?

for me it is Settings -> About Phone. but the exact way to get there depends on the android version, might also have a slight change on your Samsung device... do you know which year it was released? can you remove the battery?

No we didn't know any of those details but managed to find it now due to your help, despite the difference with his device. Thanks.

great! please edit my amswer to suit the right method and mark it as the right answer. or post an answer yourself (:

@dktr.k1 I took the freedom to expand it a bit. As it was, it rather looked like a comment :) Hope this edit is OK for you; feel free to adjust it if it's not.

@Izzy thanx for the edit and extension!  I am satisfied with it (:


text:
Cryptfs : unmounting /data failed: Device or resource busy
I am trying to encrypt my rooted Nexus 5 (running CyanogenMod 13/Marshmallow).
Here is how I am doing:

With the phone running and connected to USB, make sure that /mnt/asec/ is empty
Long-press the power physical button, this makes the Power off dialog pop up
Long-press the "Power off" option of the pop up, confirm that you want to reboot in Safe Mode
Without starting any app, run adb shell on the computer then su to get root then pkill -KILL daemonsu to kill the SuperSU daemon
Settings > Security > Encrypt phone, confirm
The phone reboots, from the computer type adb logcat

Here is what I see:
I ServiceManager: service 'drm.drmManager' died
D libEGL  : loaded /vendor/lib/egl/libEGL_adreno.so
D libEGL  : loaded /vendor/lib/egl/libGLESv1_CM_adreno.so
D libEGL  : loaded /vendor/lib/egl/libGLESv2_adreno.so
I Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 09/02/15, 76f806e, Ibddc658e36
E BootAnimation: couldn't find audio_conf.txt
W BootAnimation: Audio service is not initiated.
D BootAnimation: Use save memory method, maybe small fps in actual.
D BootAnimation: Use save memory method, maybe small fps in actual.
E Cryptfs : unmounting /data failed: Device or resource busy
E Cryptfs : Bad magic for real block device /dev/block/platform/msm_sdcc.1/by-name/metadata
W vold    : type=1400 audit(0.0:19): avc: granted { read } for name="mmcblk0p28" dev="tmpfs" ino=6735 scontext=u:r:vold:s0 tcontext=u:object_r:userdata_block_device:s0 tclass=blk_file
W vold    : type=1400 audit(0.0:20): avc: granted { read open } for name="mmcblk0p28" dev="tmpfs" ino=6735 scontext=u:r:vold:s0 tcontext=u:object_r:userdata_block_device:s0 tclass=blk_file
W vold    : type=1400 audit(0.0:21): avc: granted { ioctl } for path="/dev/block/mmcblk0p28" dev="tmpfs" ino=6735 ioctlcmd=1260 scontext=u:r:vold:s0 tcontext=u:object_r:userdata_block_device:s0 tclass=blk_file
D Cryptfs : Just asked init to shut down class main
W vold    : emulated unmount requires state mounted
E Cryptfs : unmounting /data failed: Device or resource busy
W SocketClient: write error (Broken pipe)
W SocketClient: Unable to send msg '200 8 -

At that point the CyanogenMod loading screen keeps animating for 10+ hours and probably forever if I don't stop it. Pressing the Power physical button for 5 seconds makes it reboot and start normally this time. Obviously encryption has not been performed.
I tried the whole procedure twice.
What could be causing this Cryptfs : unmounting /data failed: Device or resource busy problem?

As I've found in this bug report, you can watch the current open files by running this command in a second shell:
while true; do lsof | grep /data; sleep 0.2; done

This checks every 0.2s which files are still in use on /data. In my case it was chainfire's SuperSU, which had a logfile opened.
Additionally, I've found out that a 2nd SDCard partition was mounted to /data/sdext2:
mount | grep "/data"

This was due to an app "Link2SD". With this command I was able to figure out, where the mounting happens:
adb shell
# make system partition writable
mount -o remount,rw /system
grep -R "/data/sdext2" /system

I've commented the "mount" commands out and restartet my phone. Now encryption works fine.

I've spend all day with the issue of the never ending encryption (LG Nexus 5, Cyanogenmod 13) and somehow figured out to check the logs and eventually came across this question here on Stack Exchange. @mattelacchiatos hint is a good one, but a little bit complicated. TL;DR I was able to fix this by simply booting into safe mode.
For the record, this is the log of the error I had (same as OP):
01-24 00:15:05.132   871  1170 D CryptdConnector: SND -> {1 cryptfs getfield SystemLocale}
01-24 00:17:05.077   871   910 D CryptdConnector: SND -> {2 cryptfs setfield SystemLocale de-DE}
05-26 20:33:36.401   871   910 D CryptdConnector: SND -> {3 cryptfs setfield SystemLocale en-US}
05-26 20:35:05.696   871  1760 D CryptdConnector: SND -> {4 cryptfs setfield PatternVisible 0}
05-26 20:35:05.697   871  1760 D CryptdConnector: SND -> {5 cryptfs setfield PasswordVisible 1}
05-26 20:35:05.706   871  3096 D CryptdConnector: SND -> {6 cryptfs setfield SystemLocale en-US}
05-26 20:35:06.491   871  3095 D CryptdConnector: SND -> {7 cryptfs enablecrypto inplace default}
05-26 20:35:06.495   150   162 E Cryptfs : Bad magic for real block device /dev/block/platform/msm_sdcc.1/by-name/metadata
05-26 20:35:06.498   150   162 D Cryptfs : Just asked init to shut down class main
05-26 20:35:37.010   150   162 E Cryptfs : unmounting /data failed: Device or resource busy
05-26 20:35:37.140   150   162 E Cryptfs : Bad magic for real block device /dev/block/platform/msm_sdcc.1/by-name/metadata
05-26 20:35:37.145   150   162 D Cryptfs : Just asked init to shut down class main
05-26 20:35:57.212   150   162 E Cryptfs : unmounting /data failed: Device or resource busy

What I did, was the following. Since I tried a lot and wiped/flashed the device around a hundred times, I assume it only works on a clean install of cyanogenmod. Also, I read something about issues with Team Win Recovery Mode (TWRP) and how it formats the partitions. So here is what I did:

Flashed the Cyanogenmod recovery image
sudo fastboot flash recovery /path/to/cm-13.0-20160418-SNAPSHOT-ZNH0EAO2NM-hammerhead-recovery.img

Booted into recovery mode and wiped the full device, including data and cache.
Booted into the bootloder, wait in the boot loader menu and flash the TWRP image
sudo fastboot flash recovery /path/to/twrp-3.0.2-0-hammerhead.img

Still in the bootloader, go into the recovery mode, twrp this time.
Push the cyanogenmod zip to the phone.
adb push /path/to/cm-13.0-20160418-SNAPSHOT-ZNH0EAO2NM-hammerhead.zip /sdcard

Use twrp to install cyanogenmod from the zip. Do not wipe cache or format data! It's tempting since a button pops up, but I read that there might be issues with malformed partitions. Also, do not reboot yet! Just go back.
Reboot into the bootloader. Don't boot cyanogenmod yet. Make sure you are in the boot loader.
Flash the Cyanogenmod recovery image again.
sudo fastboot flash recovery /path/to/cm-13.0-20160418-SNAPSHOT-ZNH0EAO2NM-hammerhead-recovery.img

Now, boot cyanogenmod, set language, date, time, timezone. Don't change any settings yet, don't connect to wifi.
Press the power button until the Shutdown dialog pops up.
Long press the shut down option until a confirmation dialog comes, which askes you to confirm rebooting into safe mode.
Confirm and reboot into safe mode.
Go to settings and security, hit encrypt phone and confirm encryption, again.
Wait a few minutes. On a clean install, it should not take more than 5-10 minutes on a Nexus 5.
It will reboot into normal mode as soon as it finished. Confirm in security settings the phone is encrypted.

Here's the adb logcat to confirm it worked out:
05-26 21:17:20.694   799   897 D CryptdConnector: SND -> {1 cryptfs getfield SystemLocale}
05-26 21:17:33.095   799  1055 D CryptdConnector: SND -> {2 cryptfs getpw}
05-26 21:17:33.096   149   160 D VoldCryptCmdListener: cryptfs getpw
05-26 21:17:33.097   799  1055 D CryptdConnector: SND -> {3 cryptfs clearpw}
05-26 21:17:33.098   149   160 D VoldCryptCmdListener: cryptfs clearpw
05-26 21:18:42.691   799   981 D CryptdConnector: SND -> {4 cryptfs setfield PatternVisible 0}
05-26 21:18:42.692   799  1637 D CryptdConnector: SND -> {5 cryptfs setfield PasswordVisible 1}
05-26 21:18:42.701   799  1055 D CryptdConnector: SND -> {6 cryptfs setfield SystemLocale en-US}
05-26 21:18:43.476   799   981 D CryptdConnector: SND -> {7 cryptfs enablecrypto inplace default}
05-26 21:18:43.480   149   160 E Cryptfs : Bad magic for real block device /dev/block/platform/msm_sdcc.1/by-name/metadata
05-26 21:18:43.484   149   160 D Cryptfs : Just asked init to shut down class main
05-26 21:18:44.950   149   160 D Cryptfs : unmounting /data succeeded
05-26 21:18:44.951   149   160 I Cryptfs : keymaster module name is Keymaster QCOM HAL
05-26 21:18:44.951   149   160 I Cryptfs : keymaster version is 3
05-26 21:18:44.951   149   160 I Cryptfs : Found keymaster0 module, using keymaster0 API.
05-26 21:18:44.954   149   160 I Cryptfs : keymaster module name is Keymaster QCOM HAL
05-26 21:18:44.954   149   160 I Cryptfs : keymaster version is 3
05-26 21:18:44.954   149   160 I Cryptfs : Found keymaster0 module, using keymaster0 API.
05-26 21:18:45.553   149   160 I Cryptfs : Using scrypt with keymaster for cryptfs KDF
05-26 21:18:46.034   149   160 I Cryptfs : keymaster module name is Keymaster QCOM HAL
05-26 21:18:46.034   149   160 I Cryptfs : keymaster version is 3
05-26 21:18:46.034   149   160 I Cryptfs : Found keymaster0 module, using keymaster0 API.
05-26 21:18:46.035   149   160 I Cryptfs : Signing safely-padded object
05-26 21:18:47.040   149   160 D Cryptfs : Just triggered post_fs_data
05-26 21:18:47.090   149   160 D Cryptfs : post_fs_data done
05-26 21:18:49.091   149   160 D Cryptfs : Just triggered restart_min_framework
05-26 21:18:49.091   149   160 I Cryptfs : Using scrypt with keymaster for cryptfs KDF
05-26 21:18:49.676   149   160 I Cryptfs : keymaster module name is Keymaster QCOM HAL
05-26 21:18:49.676   149   160 I Cryptfs : keymaster version is 3
05-26 21:18:49.676   149   160 I Cryptfs : Found keymaster0 module, using keymaster0 API.
05-26 21:18:49.685   149   160 I Cryptfs : Signing safely-padded object
05-26 21:18:50.297   149   160 I Cryptfs : Enabling support for allow_discards in dmcrypt.
05-26 21:18:50.297   149   160 I Cryptfs : target_type = crypt
05-26 21:18:50.297   149   160 I Cryptfs : real_blk_name = /dev/block/platform/msm_sdcc.1/by-name/userdata, extra_params = 1 allow_discards
05-26 21:18:50.300   149   160 I Cryptfs : Encrypting ext4 filesystem in place...
05-26 21:18:50.300   149   160 I Cryptfs : Encrypting group 0
05-26 21:18:50.301   149   160 I Cryptfs : Encrypting from sector 0
05-26 21:18:50.371   149   160 I Cryptfs : Encrypted to sector 790016
05-26 21:18:50.371   149   160 I Cryptfs : Encrypting from sector 802816
05-26 21:18:50.378   149   160 I Cryptfs : Encrypted to sector 813568
05-26 21:18:50.378   149   160 I Cryptfs : Encrypting from sector 819200
05-26 21:18:50.388   149   160 I Cryptfs : Encrypted to sector 840704
    [...]
05-26 21:19:43.819   149   160 I Cryptfs : Encrypting group 215
05-26 21:19:43.821   149   160 I Cryptfs : Encrypted to sector 3590587392
05-26 21:19:43.821   149   160 I Cryptfs : Encrypting from sector 3607101440
05-26 21:19:43.896   149   160 I Cryptfs : Encrypting group 216
05-26 21:19:43.898   149   160 I Cryptfs : Encrypted to sector 3607364608
05-26 21:19:43.898   149   160 I Cryptfs : Encrypting from sector 3623878656
05-26 21:19:43.971   149   160 I Cryptfs : Encrypting group 217
05-26 21:19:43.974   149   160 I Cryptfs : Encrypted to sector 3624141824
05-26 21:19:43.974   149   160 I Cryptfs : Encrypting from sector 3640655872
05-26 21:19:44.108   149   160 I Cryptfs : Encrypted to sector 3641183744

Good luck encrypting your phone in safe mode!


text:
Kindle Not showing up and backup not converting in Droid Explorer. Titanium Backup also not working
So I had to get my Kindle 10" replaced, so I created two backup's. One in Droid Explorer and one in Titanium Backup. Titanium Backup wont see the files for some reason, and now Droid Explorer won't read my Kindle. It see's my kindle, but it doesn't show the file system, nor will my back up convert to a basic backup.
Am I missing something? I'm rooted, everything installed as before but nothing is working.

ADB wasn't given proper root permission, so it wasn't seeing the device's file structure. As for the backup, I made a copy of the abex file in to my adb folder (probably irrelevant where), then tried converting it again and it worked. With the .ab file however, Droid Explorer crashes when trying to run the restore, but it ran fine with running the command manually. adb restore .ab.

::disclaimer: i am the developer of droidexplorer:: I was going to suggest the permissions. Glad you got it sorted out. With the ABEX file, you would not have been able to restore that one directly, because the ABEX is directly tied to a specific device. the crash, i will file an issue on that and investigate it. Thank you, glad you got it working.